diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..7b016a8 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "automatic" +} \ No newline at end of file diff --git a/day01/README.en.md b/day01/README.en.md deleted file mode 100644 index 96923bc..0000000 --- a/day01/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# sfbx-cloud - -#### Description -四方保险 - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/day01/README.md b/day01/README.md index fd6a5ae..00b429e 100644 --- a/day01/README.md +++ b/day01/README.md @@ -1,37 +1,435 @@ -# sfbx-cloud +# 第 1 章-项目介绍&环境搭建 -#### 介绍 -四方保险 +# 学习目标 -#### 软件架构 -软件架构说明 +- 了解保险行业背景与发展趋势前景 +- 掌握《四方保险》项目核心架构、项目模板、技术架构、数据库总述 +- 快速搭建《四方保险》项目环境并建立 git 项目管理 +# 1、背景与趋势 -#### 安装教程 +## 1.1、行业背景 -1. xxxx -2. xxxx -3. xxxx +在过去的十年内保险行业的发展如何?IT 行业对于保险行业的发展又如何呢?下面我们来看下一组数据: -#### 使用说明 +![](http://115.28.184.253:9000/tomysnote/day01/Bt1IbnFB2oSWidxum3VcWZDsnib.png) -1. xxxx -2. xxxx -3. xxxx +上述数据可以看出从 2014 开始保险的总体保费收入在逐年上升,并且中国的保险 IT 行业呈现稳定增长趋势: -#### 参与贡献 +- 数字化转型已成为保险行业的趋势,这为保险 IT 市场创造了巨大的机会 +- IT 技术为保险公司提供了创新工具和支持,有助于提高业务效率和客户体验 +- 人工智能、大数据分析、规则引擎计算等先进技术的应用使保险公司能够更好地评估风险、优化产品,实现个性化定制 +- 从 2018 年到 2021 年,保险 IT 市场投资规模增长了约 128.4 亿元,这表明行业在资本支持方面表现强劲 +- 平均复合增速为 12.06%,显示了市场的持续健康发展。示着市场在未来依然有望保持增长。 -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request +对于学习保险类项目对于后期的个体发展、职业规划将会有巨大的支持: +- 拥有特有行业的项目经验,提升个人在就业职业发展竞争力 +- 提升个人对于复杂业务系统的分析设计能力、开发能力、维护能力 -#### 特技 +## 1.2、项目背景 -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) +在整个金融保险行业,保险 IT 行业是保险行业数字化转型的重要组成部分,涵盖了多个细分领域。其中包括传统保险业务系统,官方直销系统,专业中介代理平台,互联网保险平台,以及其他保险系统。学习 `《四方保险》` 项目后各位小伙伴可以向不同方向的保险项目进行个人发展学习。 + +![](http://115.28.184.253:9000/tomysnote/day01/HYSxbtAfyoAQnyxwY4Fc7t8PnWh.PNG) + +《四方保险》属于专业互联网保险平台(**保险销售平台**),是一种在线保险销售平台;提供不同保险公司的保险产品销售、试算、投保和支付等功能。这些平台通常涵盖了整个保险业务流程,从产品购买、保单管理到理赔服务,主要作用是提高用户体验、降低交易成本、加强风险**、可以对比多家保险公司的保险产品管理。** + +![](http://115.28.184.253:9000/tomysnote/day01/Vo8Gb41xHooEd9xli2yc9Dg2nKd.PNG) + +> [!TIP] +> Tips:互联网保险知多点 +> 2C 表示 to customer,即产品是直接面向客户;一般保险公司自己网站直接销售保险产品属于这种类型 +> 2B 表示 to branch,即产品是直接面向渠道;比如:中介公司、互联网公司都属于渠道 +> 2A 表示 to agent,即保险代理人;代理人自行拉客户 + +《四方保险》项目中功能介绍: + +- 在线购买和投保: 用户可以通过互联网平台方便地浏览、**比较和购买不同保司的各类保险产品**,完成投保流程。 +- 个性化推荐产品: 平台可能提供根据用户需求定制的保险产品,满足个性化的保险需求。 +- 数字化保单管理: 用户可以在平台上轻松管理和查看自己的保单信息,包括保单状态、保费支付等。 +- 在线理赔服务: 提供在线理赔服务,用户可以通过平台提交理赔申请、上传必要的文件和信息,加速理赔流程。 +- 风险评估和数据分析: 利用大数据和规则引擎技术对用户进行风险评估,提供更精准的保险方案。 +- 移动端应用支持: 提供移动端应用,方便用户随时随地进行保险业务的管理和操作。 +- 数字化营销和推广: 利用数字化营销手段,通过社交媒体、搜索引擎等渠道推广保险产品,吸引更多用户。 +- 合作伙伴关系: 与其他互联网平台、金融机构等建立合作伙伴关系,拓展渠道,提供更全面的保险服务。 + +## 1.3、项目演示 + +管理端演示地址:[http://sf.mgt.itheima.net/](http://sf.mgt.itheima.net/) + +默认账号:admin@qq.com 密码:pass + +![](http://115.28.184.253:9000/tomysnote/day01/P8D8bVaW8oIk1lx5Dz1cZvhTnzb.png) + +用户端演示地址:[http://sf.app.itheima.net/](http://sf.app.itheima.net/) + +默认账号:15156403088 默认验证码:123456 + +![](http://115.28.184.253:9000/tomysnote/day01/Sx26bjYh4o9mOexP2ECc3M5lnIe.png) + +# 2、项目介绍 + +## 2.1、系统架构 + +四方保险属于一个保险销售平台;有两个终端: + +- 后台管理端 +- APP 用户端 + +业界同类销售平台([https://www.zhongmin.cn/](https://www.zhongmin.cn/)) + +整体架构如下: + +![](http://115.28.184.253:9000/tomysnote/day01/JxrybjGHuot26CxoeLfcwqA4nJf.png) + +**代理服务:**保险平台和保险销售平台通过的 nginx、gateway 网关 + +**路由处理:**gateway 网关负责路由通用服务和业务服务,同时做数据埋点和网关权限校验 + +**服务治理:**gateway 网关、通用服务、业务服务、seata 等服务注册和配置都放入 nacos 中统一管理 + +**通用服务:**抽离出加密安全、统一鉴权、消息系统、支付结算、配置存储、数据埋点、数字字典等基础微服务 + +**基础支持:**在线文档 knife4j、时序数据库 influxDB、redisson 缓存客户端、xxl-job 计划任务、spring-cloud-stream + +**外部服务:**支付宝、微信支付、ocr、三方核保、批单、承保平台 + +## 2.2、核心业务 + +管理后端的核心流程: + +app 端核心流程: + +## 2.3、课程内容 + +- 项目介绍&环境搭建 +- 保险基础数据管理-分析与设计 +- 保险产品 +- 产品附件—对象存储 +- 产品详情-性能优化与数据脱敏 +- 投保试算-保障类 +- 投保试算-理财类 +- 投保处理-投保处理 +- 支付处理-一次性支付 +- 支付处理-周期性扣款 +- 数据埋点 +- 数据中心——时序数据库 +- 短信服务 + +# 3、环境搭建 + +在了解了系统架构和核心业务流程后;我们把项目跑起来直接运行感受会更加直接。项目的运行需要使用到系列的组件等环境;步骤如下: + +1)导入虚拟机到 vmware;验证各个组件启动情况 + +2)IDEA 打开项目并启动; + +3)启动前端应用服务器; + +4)设置系统 hosts 文件中 IP 与域名; + +详细的操作请参考:[第 0 章-环境搭建](https://j1wtmv7ajj.feishu.cn/wiki/FG5AwAXHCivrwskoxTIcQcSfn4e) + +# 4、修复 BUG + +在刚刚进入项目组后,一般不会布置开发任务,而是先熟悉项目代码。为了帮助大家熟悉整个项目,我们预留了个 BUG,让大家在修复 BUG 的过程中熟悉项目代码。 + +一般修复 BUG 的过程是这样的: + +- 熟悉项目 +- 重现 bug +- 分析解决 +- 测试 + +因此,解决 BUG 的过程,就是熟悉项目的过程。 + +## 4.1、熟悉项目 + +熟悉项目的第一步是熟悉项目的结构、用到的技术、编码的一些规范等。 + +### 4.1.1、项目结构 + +下面我们介绍一下各个模块的主要职能: + +├── sfbx-cloud # 项目模块父工程,统一管理 JAR 版本和插件内容 + +│ ├── sfbx-apache-httpclient # 远程调用通信框架(第三方、保司接口调用) + +│ ├── sfbx-dict # 数字字典:其他功能用到的常用字段维护 + +│ ├── sfbx-file # 对象存储:支持 OSS、七牛云的文件存储服务 + +│ ├── sfbx-framework # 基础支持:缓存、消息中间件、分布式事务、线程池、脱敏、调度等支持 + +│ ├── sfbx-gateway # 网关路由:销售端、运营端、接口端网关路由 + +│ ├── sfbx-insurance # 保险业务:四方保险主业务服务包括用户端和管理端 + +│ ├── sfbx-points # 数据埋点:数据采集、存储、分析 + +│ ├── sfbx-rule # 规则引擎:规则引擎的 UI 支持服务 + +│ ├── sfbx-security # 权限系统:基于 oauth2.0 的权限管理 + +│ ├── sfbx-sms # 短信服务:支持阿里云短信、简单短信、腾讯云短信的短信微服务 + +│ ├── sfbx-task # 计划监听:统一调度响应和监听 + +│ ├── sfbx-trade # 交易服务:支持支付宝、微信支付的多种场景的支付平台 + +> 14 个微服务;我日常开发只需要启动 3-5 个就可以了 +> 注意: +> 一般正式使用和发布的系统;如果所有的微服务加起来,数据库中的表大概 200+ +> 例如:商城 300 - 500 张表; 四方保险类的大概 300 左右 + +### 4.1.2、开发规范 + +- 在项目模块中;*-app 的是针对 app 端的应用服务;*-mgt 的是针对 web 后台管理的应用服务; +- 项目中带有 *-interface 的模块是 feign 客户端放置的模块工程;而应用到的 dto 放置在 `framework-commons` 模块中,该模块中的实体类以* VO 结尾命名; +- 有需要使用到其它微服务提供的接口的话就引入对应的 *-interface 即可; +- 一般项目中,如 insurance-mgt 的 feign 包内的相当于当前服务中某些业务对外提供的接口功能(不是接口类);这些对外业务接口处理器的请求路径命名一般为 *-feign + +![](http://115.28.184.253:9000/tomysnote/day01/HSo1bTiOVoWZaGxklbYcWohYnou.png) + +### 4.1.3、配置文件 + +四方保险的项目公共配置项目全部都由 nacos 管理;所以在每个项目中会有一个 bootstrap.yml 的启动配置文件。这个文件几乎不需要修改,只保留了最基础的内容;而对应项目需要使用到的公共组件或配置都在这个配置文件中引入了,要修改的话需要到 `nacos` 的配置中找对应的配置项修改即可。 + +![](http://115.28.184.253:9000/tomysnote/day01/EiqnbvEiloeuLnxtpgpceZUCnRf.png) + +## 4.2、复现 BUG + +1)访问 [http://sf.app.itheima.net/#/pages/login/login](http://sf.app.itheima.net/#/pages/login/login) 点击 `注册` + +2)注册新账号之后,使用新账号登录 [http://sf.app.itheima.net/#/pages/login/login](http://sf.app.itheima.net/#/pages/login/login) + +3)任意查看一个保险产品;如: + +![](http://115.28.184.253:9000/tomysnote/day01/R0LrbleCFozkjaxSBT1cqANon9c.png) +![](http://115.28.184.253:9000/tomysnote/day01/OOeab3qaZod0QkxGcjYcH6n1n2b.png) +![](http://115.28.184.253:9000/tomysnote/day01/ZLRtb2HSYoNr5RxjdHmcVfTenCc.png) + +在上述的 `为谁买` 填写了 姓名、身份证号码 之后;点击 `保存` 。 + +> 注意;不用点击 我要投保 + +4)返回到首页——》再次找任意一个产品;产品详情页面中发现刚刚填写的 `本人` 信息还是空。 + +![](http://115.28.184.253:9000/tomysnote/day01/BC30b5eAPody7KxsUn1cQnglnTh.png) + +## 4.3、修复 BUG + +### 4.3.1、分析 + +如果是我们自己写的代码,肯定很容易找到业务入口、整个业务线路。但现在我们是接手他人项目,所以只能通过其它途径来梳理业务: + +- 1)如果开发业务的同事还在,直接与开发该业务的同事交流 +- 2)如果开发者已离职,可以查看相关接口文档 +- 3)如果没有文档,也可以查看前端请求,顺藤摸瓜 + +此处由于我们没有人可以交流,只能通过查看前端请求来分析了。 + +#### 1)保存 + +![](http://115.28.184.253:9000/tomysnote/day01/WEM2b73Cfo1Lr8xDTyOcwNuAnSf.png) + +上述的 保存 的时候;使用浏览器查看其请求地址如下: + +![](http://115.28.184.253:9000/tomysnote/day01/LTRbbkyksoQaVEx7eVGcVI0lnVh.png) + +![](http://115.28.184.253:9000/tomysnote/day01/J4WNbuu2koTZAWxeqPPcjtLYnPf.png) + +按照之前我们的环境部署方案,sf.app.itheima.net 这个域名会被解析到 `127.0.0.1` 这个地址,然后被 Nginx 反向代理到网关微服务。 + +而网关则会根据请求路径和路由规则,把请求再路由到具体微服务。这里请求路径以 `/api/insurance-app` 开头,对应的微服务是 `insurance-app`,也就是保险 app 端微服务。 + +这样,整个请求链路就比较清楚了: + +找到了具体的微服务,接下来,我们就进入微服务,查看对应源码,找出问题即可。 + +请求到达保险 app 服务后的路径是 ` ``/insurance-app/mine-home/customer-relation`,对应的 `controller` 是: + +![](http://115.28.184.253:9000/tomysnote/day01/IZXrbeZTroBXE2xr9Tfc5ejCn8f.png) + +跟入 service 代码;发现是比较正常的,保存也没有报错;但是为何再次返回详情页面的时候没有查到呢? + +接下来;我们看在详情页面的时候;它是怎么查的。 + +#### 2)详情页面查询 + +还是在 app 端;点击产品后跳转到的详情页面;发现有如下的请求: + +![](http://115.28.184.253:9000/tomysnote/day01/NyASb5YOUoxYAaxKcLicd7aqnDc.png) + +尝试测试之后;只有在返回的数据中 relation 字段的值为 0 的情况下;才会回显。而提交的时候是 u。 + +说明前端在上述的请求返回数据之后;根据返回的对象的 relation 的值进行了过滤显示。relation 属性的值必须要为 0 。 + +### 4.3.2、修复 + +已经分析问题: + +- 1、在用户注册的时候;携带的状态为 `u` 保存到了 `sfbx-insurance.tab_customer_relation` 数据库表中 +- 2、而查询的时候,回显的时候;前端中对 relation 的值为 `0` 才会回显; + +解决方法: + +找到注册时候;保存的业务代码,在前端不配合或者不便于修改的情况下;我们在保存的业务代码中,将 `u` 替换为 `0` 即可 + +修改如下: + +![](http://115.28.184.253:9000/tomysnote/day01/RltvbSS1EoQp8UxkwL9ctFs5nFd.png) + +再次进行测试即可。 + +# 5、数据库建模-Power Designer + +在需求分析之后;需要进行数据库表的创建,如果系统功能模块多,也就是数据库表多;逐个表创建不太现实,而且表之间的关系不那么明显能看出。**通过数据库建模可以更加从整体上查看对于需求的理解是否到位;数据库表设计是否存在问题。** + +在更加规范或者正式的单位、机构他们要求项目验收需要对应的数据库建模文档; + +- **常见的模型** + + - 概念模型 CDM + - 物理模型 PDM +- **常见的设计工具** + + - **Power Designer** + - pdman + +## 5.**1、概念模型 CDM** + +- **为什么?** + +> 在需求、产品原型评审之后,可以通过图形的方式更加直观的了解是否对需求理解到位。还可以对后续的开发做出引导。 +> 在做需求分析的过程中;常常看到很多要实现的模块,这些模块或者功能基本上都是要处理的实体(名词;领域模型)。例如:在原型或者需求文档中的 xx 管理;xx 一般就是实体;系统中这些实体之间是有关系的,开发与其息息相关。;由这些领域模型画出来的图就是概念模型,也被称为 **ER 图** +> 在实际开发中;一开始立项的时候是不知道使用哪款 DBMS(Oracle/DB2/Sybase/SQL Server/MySQL)的;所以不能直接基于某一款数据库创建对应的建表语句。可以先创建概念模型,一旦定下来 DBMS 则可以直接转换。 + +- **是什么** + +用于描述**实体与实体之间的关系的****图形**;也被业界称为 `ER图` + +- **怎么画**(9 字诀) + **1、****列实体** + + - 将原型、需求中的那些实体(名词、领域模型)先列出来;在原型中常见的有模块名称、下拉框(内容是变化的)。 + - 例如:产品 + **2、****填属性** + 根据原型、需求文档中对于上述列出的实体设置属性;做法就是结合**输入**和**输出**的综合。(输入:新增、添加 等按钮之后的页面;输出;列表、详情页) + - 例如:产品(ID,保险代码,名称,类型 ID,排序,状态,创建时间...) + + **3、****画关系** + 要将需求中实体之间的关系画出来;常见的关系: + +## 5.2**、物理模型 PDM** + +- **为什么?** + +可以通过物理模型 PDM **直接创建整个数据库的表及其关系**。创建数据库及表的时候使用 pdm 非常方便。 + +如果已经确定使用哪种 DBMS 之后或者数据库表设计比较特殊,那么也可以直接画 PDM 而不画 CDM。 + +- **是什么** + +是一个**描述表与表之间关系的图形**。可以通过该图形直接获得整个库的 sql 语句。 + +- **怎么画** + +在确定了客户使用哪种 DBMS 之后;可以通过 CDM 直接转换为 PDM。 + +也很多公司,开发之初就确定使用哪款 DBMS 了;所以可以跳过概念模型直接创建物理模型。 + +## 5.3**、案例** + +**需求**:将人员组织架构的 CDM 画出来。 + +人员组织架构:用于管理人员的系统;里面会涉及到:机构、部门、角色、权限、人员 + +**1、列实体** + +- 机构、部门、角色、权限、人员 + +**2、填属性----》(基础,关联,辅助)** + +- 机构(机构 ID,名称,状态) +- 部门(部门 ID,名称,状态) +- 角色(角色 ID,名称,状态) +- 权限(权限 ID,名称,状态) +- 人员(人员 ID,姓名,性别,... 状态) + +**3、画关系** + +- 一个机构可以有多个部门;——》一对多 +- 一个部门下可以有多个人员;——》一对多 +- 一个角色可以有多个权限;一个权限可以被多个角色使用 ——》多对多 +- 一个人可以有多个角色;一个角色可以被多个人使用 ——》多对多 + +## 5.4、PD 画图 + +### 5.4.1、pd 设置 + +![](http://115.28.184.253:9000/tomysnote/day01/Gz8bbxeKdoMilkxUq3GcgMXOnJT.png) + +![](http://115.28.184.253:9000/tomysnote/day01/FeWJbWtKUoSKblxIf1VcZqlHnWh.png) + +设置概念模型中可以使用同一个字段名字: + +![](http://115.28.184.253:9000/tomysnote/day01/MKSMbmDReooY22xFKQOcdmYHnac.png) + +### 5.4.2、模型 + +概念模型 + +![](http://115.28.184.253:9000/tomysnote/day01/XdIXbrHZFoasuMx0LMVcoxhRnff.png) + +物理模型 + +![](http://115.28.184.253:9000/tomysnote/day01/H5VsbquyKoY4qGxCbdbcWnQ2nId.png) + +## 5.5、误区 + +![](http://115.28.184.253:9000/tomysnote/day01/BwX2bKUdHoGoY3xWSKScyghqngh.png) + +> **思考**:数据库表范式 +> 越符合范式则说明连接的表越多,查询效率就相应的低 +> 并不是范式越高性能越好的;而且一般反范式反而数据库表查询性能好 + +# 6、作业 + +访问 [http://sf.mgt.itheima.net/#/base/type](http://sf.mgt.itheima.net/#/base/type) + +分析:筛选、保障项、系数、分类这四类数据的关系。 + +保险-基础数据。通过基础数据功能的学习我们主要解决下列问题: + +- 什么是基础数据,包含哪些,分表有什么作用? +- 基础数据的表结构如何设计进行设计? +- 分类项与保障项、系数项、筛选项有什么关系? + +![](http://115.28.184.253:9000/tomysnote/day01/KQHJbAIKZoo8UJxahG4c1Rc6nnf.png) + +上图是用户端功能截图,从中我们提炼并定义下列 4 个名词: + +- **保障项:**通常是指在购买保险时所包含的具体风险或事件,以及在这些风险或事件发生时,保险公司愿意提供的经济赔偿或保障。不同类型的保险产品涵盖不同的保障项 +- **系数项:**通常是指一系列用于计算保险费率的因子或系数。这些因子可以包括被保险人的年龄、性别、健康状况、驾驶记录、保险类型、地理位置等,它们会影响最终的保险费率计算。 +- **筛选项:**通常是指一系列因素和选项,需要根据你的具体需求和情况来考虑,来选择自己需要的保险服务。 +- **分类项:**通常是指保险根据不同的标准和覆盖范围进行的分类,不同的分类涵盖的方面不同,此处我们主要讨论下列几类保险:医疗、重疾、意外、养老金、旅游等分类 + +> [!TIP] +> Tips: +> 结合 app 端的界面分析;从分类开始分析起 + +# 7、午间问题 + +- 你们与保险公司有什么关系 +- 为什么到你们平台来购买保险?直接到保险公司对应的 app 上买不是更好吗? +- 你们常卖的保险有哪些类型 +- 描述一下系统的技术架构 +- 说一下你们开发团队情况 +- 介绍一下你们项目的集群部署情况?有几个微服务;你开发的话要启动几个微服务 +- 面试:介绍一下你简历中写的保险项目 + + - 是什么、做什么的 + - 有什么功能 + - 技术栈 diff --git a/day01/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java b/day01/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java index a203d41..e3eae5d 100644 --- a/day01/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java +++ b/day01/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java @@ -1,4 +1,123 @@ package com.itheima.sfbx.insurance.web; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保障项响应接口 + */ +@Slf4j +@Api(tags = "保障项") +@RestController +@RequestMapping("safeguard") public class SafeguardController { + + @Autowired + ISafeguardService safeguardService; + + /*** + * @description 多条件查询保障项分页 + * @param safeguardVO 保障项VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保障项分页",notes = "保障项分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"}) + public ResponseResult> findSafeguardVOPage( + @RequestBody SafeguardVO safeguardVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page safeguardVOPage = safeguardService.findPage(safeguardVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(safeguardVOPage); + } + + /** + * @Description 保存保障项 + * @param safeguardVO 保障项VO对象 + * @return SafeguardVO + */ + @PutMapping + @ApiOperation(value = "保存Safeguard",notes = "添加Safeguard") + @ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO") + @ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"}) + public ResponseResult createSafeguard(@RequestBody SafeguardVO safeguardVO) { + SafeguardVO safeguardVOResult = safeguardService.save(safeguardVO); + return ResponseResultBuild.successBuild(safeguardVOResult); + } + + /** + * @Description 修改保障项 + * @param safeguardVO 保障项VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保障项",notes = "修改保障项") + @ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO") + @ApiOperationSupport(includeParameters = {"safeguardVO.id","safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"}) + public ResponseResult updateSafeguard(@RequestBody SafeguardVO safeguardVO) { + Boolean flag = safeguardService.update(safeguardVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除保障项 + * @param safeguardVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除保障项",notes = "删除保障项") + @ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO") + @ApiOperationSupport(includeParameters = {"safeguardVO.checkedIds"}) + public ResponseResult deleteSafeguard(@RequestBody SafeguardVO safeguardVO) { + Boolean flag = safeguardService.delete(safeguardVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保障项列表 + * @param safeguardVO 保障项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保障项列表",notes = "多条件查询保障项列表") + @ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO") + @ApiOperationSupport(includeParameters = {"safeguardVO.dataState","safeguardVO.safeguardKey","safeguardVO.safeguardKeyName","safeguardVO.safeguardVal","safeguardVO.safeguardType","safeguardVO.sortNo","safeguardVO.remake"}) + public ResponseResult> safeguardList(@RequestBody SafeguardVO safeguardVO) { + List safeguardVOList = safeguardService.findList(safeguardVO); + return ResponseResultBuild.successBuild(safeguardVOList); + } + + /*** + * @description 按safeguardKey查询SafeguardVO + * @param safeguardKey 保障项key + * @return SafeguardVO + */ + @PostMapping("safeguard-key/{safeguardKey}") + @ApiOperation(value = "保障项key查询SafeguardVO",notes = "保障项key查询SafeguardVO") + @ApiImplicitParam(paramType = "path",name = "safeguardKey",value = "保障项key",dataType = "String") + public ResponseResult findBySafeguardKey(@PathVariable("safeguardKey") String safeguardKey) { + SafeguardVO safeguardVO = safeguardService.findBySafeguardKey(safeguardKey); + return ResponseResultBuild.successBuild(safeguardVO); + } + } diff --git a/day01/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java b/day01/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java index c5a5773..03ce89d 100644 --- a/day01/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java +++ b/day01/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java @@ -1,4 +1,220 @@ package com.itheima.sfbx.insurance.service.impl; -public class SafeguardServiceImpl { +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.insurance.pojo.Safeguard; +import com.itheima.sfbx.insurance.mapper.SafeguardMapper; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.SafeguardCacheConstant; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.enums.SafeguardEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:保障项服务实现类 + */ +@Slf4j +@Service +public class SafeguardServiceImpl extends ServiceImpl implements ISafeguardService { + + + /*** + * @description 保障项多条件组合 + * @param safeguardVO 保障项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SafeguardVO safeguardVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //条例键查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getSafeguardKey())) { + queryWrapper.lambda().eq(Safeguard::getSafeguardKey,safeguardVO.getSafeguardKey()); + } + //条例键名称查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getSafeguardKeyName())) { + queryWrapper.lambda().eq(Safeguard::getSafeguardKeyName,safeguardVO.getSafeguardKeyName()); + } + //条例值查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getSafeguardVal())) { + queryWrapper.lambda().eq(Safeguard::getSafeguardVal,safeguardVO.getSafeguardVal()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getSortNo())) { + queryWrapper.lambda().eq(Safeguard::getSortNo,safeguardVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getRemake())) { + queryWrapper.lambda().eq(Safeguard::getRemake,safeguardVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(safeguardVO.getDataState())) { + queryWrapper.lambda().eq(Safeguard::getDataState,safeguardVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Safeguard::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SafeguardCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#safeguardVO.hashCode()") + public Page findPage(SafeguardVO safeguardVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SafeguardPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(safeguardVO); + //执行分页查询 + Page safeguardVOPage = BeanConv.toPage( + page(SafeguardPage, queryWrapper), SafeguardVO.class); + //返回结果 + return safeguardVOPage; + }catch (Exception e){ + log.error("保障项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SafeguardCacheConstant.BASIC,key ="#safeguardId") + public SafeguardVO findById(String safeguardId) { + try { + //执行查询 + return BeanConv.toBean(getById(safeguardId),SafeguardVO.class); + }catch (Exception e){ + log.error("保障项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SafeguardCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =SafeguardCacheConstant.BASIC,key = "#result.id")}) + public SafeguardVO save(SafeguardVO safeguardVO) { + try { + //转换SafeguardVO为Safeguard + Safeguard safeguard = BeanConv.toBean(safeguardVO, Safeguard.class); + boolean flag = save(safeguard); + if (!flag){ + throw new RuntimeException("保存保障项失败"); + } + //转换返回对象SafeguardVO + SafeguardVO safeguardVOHandler = BeanConv.toBean(safeguard, SafeguardVO.class); + return safeguardVOHandler; + }catch (Exception e){ + log.error("保存保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SafeguardCacheConstant.BASIC,key = "#safeguardVO.id")}) + public Boolean update(SafeguardVO safeguardVO) { + try { + //转换SafeguardVO为Safeguard + Safeguard safeguard = BeanConv.toBean(safeguardVO, Safeguard.class); + boolean flag = updateById(safeguard); + if (!flag){ + throw new RuntimeException("修改保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SafeguardCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SafeguardCacheConstant.LIST,key ="#safeguardVO.hashCode()") + public List findList(SafeguardVO safeguardVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(safeguardVO); + //执行列表查询 + List safeguardVOs = BeanConv.toBeanList(list(queryWrapper),SafeguardVO.class); + return safeguardVOs; + }catch (Exception e){ + log.error("保障项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.LIST_FAIL); + } + } + + + @Override + @Cacheable(value = SafeguardCacheConstant.LIST,key ="#safeguardKeyList.hashCode()") + public List findShowPageItemByKey(List safeguardKeyList) { + try { + //构建查询条件 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(Safeguard::getSafeguardKey,safeguardKeyList); + queryWrapper.eq(Safeguard::getDataState, SuperConstant.DATA_STATE_0); + //执行列表查询 + List safeguardVOs = BeanConv.toBeanList(list(queryWrapper),SafeguardVO.class); + return safeguardVOs; + }catch (Exception e){ + log.error("保障项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.LIST_FAIL); + } + } + + @Override + @Cacheable(value = SafeguardCacheConstant.BASIC,key ="#safeguardKey") + public SafeguardVO findBySafeguardKey(String safeguardKey) { + try { + //构建查询条件 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(Safeguard::getSafeguardKey,safeguardKey); + queryWrapper.eq(Safeguard::getDataState, SuperConstant.DATA_STATE_0); + //执行列表查询 + return BeanConv.toBean(getOne(queryWrapper),SafeguardVO.class); + }catch (Exception e){ + log.error("保障项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.FIND_ONE_FAIL); + } + } } diff --git a/day02/.gitignore b/day02/.gitignore new file mode 100644 index 0000000..80fabd3 --- /dev/null +++ b/day02/.gitignore @@ -0,0 +1,76 @@ +# Compiled class file +*.class + +# Log file +*.log +*.imi +*.lst + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* + +.idea +*.iml +.settings/ +.project +.classpath +target/ +logs/ + +.DS_Store +node_modules/ +dist/ +npm-debug.log* +yarn-debug.log* +yarn-error.log* +**/*.log + +tests/**/coverage/ +tests/e2e/reports +selenium-debug.log + +# Editor directories and files +.idea +.vscode +*.suo +*.ntvs* +*.njsproj +*.sln +*.local + +package-lock.json +yarn.lock +# Build and Release Folders +bin-debug/ +bin-release/ +[Oo]bj/ +[Bb]in/ + +# Other files and folders +.settings/ + +# Executables +*.swf +*.air +*.ipa +*.apk + +# Project files, i.e. `.project`, `.actionScriptProperties` and `.flexProperties` +# should NOT be excluded as they contain compiler settings and other important +# information for Eclipse / Flash Builder. diff --git a/day02/README.md b/day02/README.md new file mode 100644 index 0000000..dc857b2 --- /dev/null +++ b/day02/README.md @@ -0,0 +1,1242 @@ +# 第 2 章-保险基础数据-设计与开发 + +# 学习目标 + +- 设计开发基础数据中的保障项、系数项、筛选项、保险分类功能 + +# 1、基础数据介绍 + +保险-基础数据。通过基础数据功能的学习我们主要解决下列问题: + +- 什么是基础数据,包含哪些,分别有什么作用? +- 基础数据的表结构如何进行设计? +- 分类与保障项、系数项、筛选项有什么关系? + +![](http://115.28.184.253:9000/tomysnote/day02/OpB0bKd4vo7yfmxb3DfcmSEpnGc.png) + +上图是用户端功能截图,从中我们提炼并定义下列 4 个名词: + +- **保障项:**通常是指在购买保险时所包含的具体风险或事件,以及在这些风险或事件发生时,保险公司愿意提供的经济赔偿或保障。不同类型的保险产品涵盖不同的保障项 +- **系数项:**通常是指一系列用于计算保险费率的因子或系数。这些因子可以包括被保险人的年龄、性别、健康状况、驾驶记录、保险类型、地理位置等,它们会影响最终的保险费率计算。 +- **筛选项:**通常是指一系列因素和选项,需要根据你的具体需求和情况来考虑,来选择自己需要的保险服务。 +- **分类项:**通常是指保险根据不同的标准和覆盖范围进行的分类,不同的分类涵盖的方面不同,此处我们主要讨论下列几类保险:医疗、重疾、意外、养老金、旅游等分类;[附录-保险分类](https://j1wtmv7ajj.feishu.cn/wiki/Au95wpmubiP9emkDFr7coayFndb?from=from_copylink) + +这几个数据结合目前四方保险数据库中的表实际情况而梳理的概念模型为: + +![](http://115.28.184.253:9000/tomysnote/day02/AJP5bh2y3oUyjyxT6sHc3Jyzngr.png) + +从上述概念模型可以看出;分类与三类基础数据都有关系;与它们的关系为: + +- 一个分类下可以有多个保障项,一个保障项也可以对应不同的分类; + +> 分类与保障项的关系为:多对多 + +- 一个分类下可以有多个系数项,一个系数项也可以对应不同的分类; + +> 分类与系数项的关系为:多对多 + +- 一个分类下可以有多个筛选项,一个筛选项也可以对应不同的分类; + +> 分类与筛选项的关系为:多对多 + +概览看起来比较多;我们逐个来实现,一个个分析;以后实际的开发也都将是如此,先一个业务分析,完成之后再做另外的。 + +# 2、保障项-保险保障范围 + +## 2.1、需求分析 + +由于项目是 `1->2` 的项目;界面与当时产品设计的界面存在出入;所以更好的做法是直接启动项目看系统里面的页面来进行分析更好。要查看保障管理的界面;需要启动的服务有: + +- 前端 nginx +- 后端微服务:GatewayMgtStart、InsuranceMgtStart、SecurityOauthStart、SecurityWebStart + +访问:[http://sf.mgt.itheima.net/#/login](http://sf.mgt.itheima.net/#/login) ;登录之后;再点击 基础数据——》保障管理 + +![](http://115.28.184.253:9000/tomysnote/day02/P3JFbFgTTohvfex1Q7icqsf3nzg.png) + +![](http://115.28.184.253:9000/tomysnote/day02/UedbbVxRhos44axGrl7cc1zJnfc.png) + +> **保障项分类**:并不是保险产品分类,只有规则和信息两个下拉选项;如果以后遇到产品原型也是类似的,这信息在 2 个选项以内的话;一般可以写常量或者写死(不需要对这些选项做管理) +> **保障项值**:可以设置多个不同的内容(值名称,值,分数) +> ① 可以将这些存到一个子表 ----》比较清楚;但是缺点就是以后查询关联比较麻烦 +> ② 可以设计一个字段存储保障项值,这个值的类型为 json ---》比较灵活;尤其是这些内容是在前端展示和使用的,返回给前端的话也方便操作 ----》以后遇到类似的原型和设计,可以采用此方法 + +而在 app 端点击产品查看详情时,也能够看到这些保障项的使用: + +![](http://115.28.184.253:9000/tomysnote/day02/P8fJbvKo3oRlLLxlGWHcFNUNn4c.png) + +**功能方面**:分页搜索、新建、删除、编辑(前端加载数据,不需要后端实现)、保存编辑、启用/禁用、功能栏的全部/启用/禁用(前端未实现;但也是分页查询);也就是要实现的功能总共 **5** 个。 + +**数据方面**:只是保存编辑页面中的数据、主键、列表中需要的创建时间等。 + +## 2.2、数据库表设计 + +按照需求分析中的思路;只需要设计一张表 `sfbx-insurance.保障项表tab_safeguard` 具体表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/QMZBb3x28oLULbxVUDTc5ibwnte.png) + +> 保障项值;在数据库中存储一个 json 字符串;json 的格式参考如下: +> [{"name":“共享 400 万”,"val":"4000000",“score”:"1"},{"name":“共享 300 万”,"val":"3000000",“score”:"2"}] + +## 2.3、接口设计 + +- **方式一**:后端结合原型界面,和自己设计的数据库表;先自己设计,然后再与前端确认。在我们项目中,项目已存在,接口被固定;暂时不太适用。 +- **方式二**:在 `1-2` 的项目中;接口已经确定,前端也已经使用接口在开发或者前端已经完成;那么作为后端就只需要去追踪出来对应业务模块的接口信息即可;这是更省事的做法。而四方保险属于这种情况。接下来;咱们梳理出来对应分析出来的 **5** 个接口信息: + +### 1)分页搜索 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/safeguard/page/{pageNum}/{pageSize}
**请求方式**
POST
**请求参数**
SafeguardVO 对应的数据结构如:{pageSize: 10, total: 1, pageNum: 1, safeguardKey: "", safeguardKeyName: "身故保险金"}
**响应结果**

ResponseResult> 返回的结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": {
"records": [
{
"id": "1753336375152783362",
"createTime": "2024-02-02 16:35:42",
"updateTime": "2024-05-13 18:44:03",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"safeguardKey": "BZ056",
"safeguardKeyName": "身故保险金",
"safeguardVal": "[{\"val\": \"1\", \"name\": \"详见保险条款\", \"score\": \"100\"}]",
"safeguardType": "0",
"sortNo": null,
"remake": null,
"checkedIds": null
}
],
"total": 1,
"size": 10,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"hitCount": false,
"countId": null,
"maxLimit": null,
"searchCount": true,
"pages": 1
},
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "com.baomidou.mybatisplus.extension.plugins.pagination.Page",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 18:44:03"
}
+ +### 2)新建 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/safeguard
**请求方式**
PUT ---> 全量更新,如果不存在则新增
**请求参数**
{
"safeguardKeyName": "test111",
"safeguardKey": "111",
"safeguardVal": "[{\"name\":\"111\",\"val\":\"11\",\"score\":\"1\"}]",
"safeguardType": "1",
"icon": "",
"dataState": "0",
"resourceType": "F"
}
**响应结果**
ResponseResult 数据结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": {
"id": "1789999088167677954",
"createTime": "2024-05-13 20:40:13",
"updateTime": "2024-05-13 20:40:13",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"safeguardKey": "111",
"safeguardKeyName": "test111",
"safeguardVal": "[{\"name\":\"111\",\"val\":\"11\",\"score\":\"1\"}]",
"safeguardType": "1",
"sortNo": null,
"remake": null,
"checkedIds": null
},
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "com.itheima.sfbx.insurance.dto.SafeguardVO",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 20:40:13"
}
+ +### 3)保存编辑 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/safeguard
**请求方式**
PATCH ---》部分更新,不存在的话更新失败
**请求参数**
SafeguardVO 数据结构参考如下:
{
"id": "1789999088167677954",
"createTime": "2024-05-13 20:40:14",
"updateTime": "2024-05-13 20:40:14",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"safeguardKey": "111",
"safeguardKeyName": "test1112",
"safeguardVal": "[{\"val\":\"11\",\"name\":\"111\",\"score\":\"1\"}]",
"safeguardType": "1",
"sortNo": null,
"remake": null,
"checkedIds": null
}
**响应结果**
ResponseResult 数据结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": true,
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "java.lang.Boolean",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 20:45:02"
}
+ +### 4)启用/禁用 + +这个功能与 保存编辑是一模一样的接口;所以并不需要再写,调用 保存编辑 的接口即可。 + +### 5)删除 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/safeguard
**请求方式**
DELETE
**请求参数**
SafeguardVO 只传递了要删除的Id数组;数据结构参考:{checkedIds: ["1789999088167677954"]}
**响应结果**
ResponseResult
{
"code": 200,
"msg": "操作成功",
"data": true,
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "java.lang.Boolean",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 21:04:36"
}
+ +## 2.4、开发实现 + +### 2.4.1、分页搜索 + +#### 1)编写处理器 + +先删除再创建 `insurance-mgt\src\main\java\com\itheima\sfbx\insurance\web\SafeguardController.java` 内容如下: + +```java +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@Api(tags = "保障项") +@RestController +@RequestMapping("/safeguard") +public class SafeguardController { + + @Autowired + private ISafeguardService safeguardService; + + _/**_ +_ * 分页查询_ +_ * @param safeguardVO 查询条件_ +_ * @param pageNum 页号_ +_ * @param pageSize 页大小_ +_ * @return 查询结果_ +_ */_ +_ _@ApiOperation("分页查询") + _/*swagger 注解说明_ + _@ApiImplicitParams 表示能接受的参数列表。_ + _@ApiImplicitParam 表示具体的参数说明和属性_ + _@ApiOperationSupport 表示swagger的扩展属性,可以对指定参数做扩展补充_ + _includeParameters 表示参数safeguardVO中的属性,可以指定哪些属性需要swagger展示_ + _ */_ + @ApiImplicitParams({ + @ApiImplicitParam(name = "safeguardVO",value = "VO对象",required = true,dataType = "SafeguardVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"safeguardVO.safeguardType","safeguardVO.safeguardKey","safeguardVO.safeguardVal","safeguardVO.remake"}) + @PostMapping("/page/{pageNum}/{pageSize}") + public ResponseResult> findSafeguardVOPage( + @RequestBody SafeguardVO safeguardVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize + ){ + Page page = safeguardService.findPage(safeguardVO, pageNum, pageSize); + return ResponseResultBuild._successBuild_(page); + } + +} +``` + +#### 2)实现业务方法 + +因为项目中其它地方有引用到保障项业务接口;所以已经存在 `sfbx-insurance\insurance-service\src\main\java\com\itheima\sfbx\insurance\service\ISafeguardService.java` 这个接口不需要创建; + +**只需要删除并重编写对应的实现类如下**: + +`insurance-service\src\main\java\com\itheima\sfbx\insurance\service\impl\SafeguardServiceImpl.java` + +```java +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.enums.SafeguardEnum; +import com.itheima.sfbx.insurance.mapper.SafeguardMapper; +import com.itheima.sfbx.insurance.pojo.Safeguard; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class SafeguardServiceImpl extends ServiceImpl implements ISafeguardService { + @Override + public Page findPage(SafeguardVO safeguardVO, int pageNum, int pageSize) { + Page safeguardPage = new Page<>(pageNum, pageSize); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + _//根据保障项编号_ +_ _queryWrapper.eq(!EmptyUtil._isNullOrEmpty_(safeguardVO.getSafeguardKey()), + Safeguard::getSafeguardKey, safeguardVO.getSafeguardKey()); + _//根据保障项名称_ +_ _queryWrapper.like(!EmptyUtil._isNullOrEmpty_(safeguardVO.getSafeguardKeyName()), + Safeguard::getSafeguardKeyName, safeguardVO.getSafeguardKeyName()); + _//状态_ +_ _queryWrapper.eq(!EmptyUtil._isNullOrEmpty_(safeguardVO.getDataState()), + Safeguard::getDataState, safeguardVO.getDataState()); + _//按照创建时间降序排_ +_ _queryWrapper.orderByDesc(Safeguard::getCreateTime); + + Page resultPage = page(safeguardPage, queryWrapper); + + _//转换为VO_ +_ _Page safeguardVOPage = BeanConv._toPage_(resultPage, SafeguardVO.class); + return safeguardVOPage; + } + + @Override + public SafeguardVO findById(String safeguardId) { + return null; + } + + @Override + public SafeguardVO save(SafeguardVO safeguardVO) { + return null; + } + + @Override + public Boolean update(SafeguardVO safeguardVO) { + return null; + } + + @Override + public Boolean delete(String[] checkedIds) { + return null; + } + + @Override + public List findList(SafeguardVO safeguardVO) { + return null; + } + + @Override + public List findShowPageItemByKey(List safeguardKeyList) { + return null; + } + + @Override + public SafeguardVO findBySafeguardKey(String safeguardKey) { + return null; + } + +} +``` + +#### 3)测试 + +访问 [http://sf.mgt.itheima.net/#/base/guarantee](http://sf.mgt.itheima.net/#/base/guarantee) 界面中;根据编号、名称能够查询出保障项数据的话则说明开发测试成功。 + +![](http://115.28.184.253:9000/tomysnote/day02/Pe21bURiRoRoT1xibBycPP4JnZG.png) + +### 2.4.2、新建 + +#### 1)处理器方法 + +新增 `com.itheima.sfbx.insurance.web.SafeguardController#createSafeguard` 方法如下: + +```java +_/**_ +_ * 新增保障项_ +_ * @param safeguardVO 保障项VO对象_ +_ * @return 新增结果_ +_ */_ +@ApiOperation(value = "新增保障项", notes = "新增保障项") +@ApiImplicitParam(name = "safeguardVO",value = "VO对象",required = true,dataType = "SafeguardVO") +@ApiOperationSupport(includeParameters = {"safeguardVO.safeguardType","safeguardVO.safeguardKey","safeguardVO.safeguardVal","safeguardVO.remake", "safeguardVO.dataState", "safeguardVO.sortNo"}) +@PutMapping +public ResponseResult createSafeguard(@RequestBody SafeguardVO safeguardVO){ + SafeguardVO result = safeguardService.save(safeguardVO); + return ResponseResultBuild._successBuild_(result); +} +``` + +#### 2)业务方法 + +实现 `com.itheima.sfbx.insurance.service.impl.SafeguardServiceImpl#save` 方法如下: + +```java +@Override +public SafeguardVO save(SafeguardVO safeguardVO) { + try { + _//将safeguardVO转换为safeguard_ +_ _Safeguard safeguard = BeanConv._toBean_(safeguardVO, Safeguard.class); + _//保存数据_ +_ _boolean flag = save(safeguard); + if (!flag) { + throw new RuntimeException("保存保障项失败!"); + } + _//将safeguard转换为safeguardVO并返回_ +_ _return BeanConv._toBean_(safeguard, SafeguardVO.class); + + } catch (Exception e) { + _log_.error("保存保障项失败:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(SafeguardEnum._SAVE_FAIL_); + } +} +``` + +### 2.4.3、保存编辑 + +#### 1)处理器方法 + +新增方法 `com.itheima.sfbx.insurance.web.SafeguardController#updateSafeguard` 如下: + +```java +_/**_ +_ * 修改保障项_ +_ * @param safeguardVO 保障项VO对象_ +_ * @return 修改结果_ +_ */_ +@PatchMapping +@ApiOperation(value = "修改保障项", notes = "修改保障项") +@ApiImplicitParam(name = "safeguardVO",value = "VO对象",required = true,dataType = "SafeguardVO") +@ApiOperationSupport(includeParameters = {"safeguardVO.id","safeguardVO.safeguardType","safeguardVO.safeguardKey","safeguardVO.safeguardVal","safeguardVO.remake", "safeguardVO.dataState", "safeguardVO.sortNo"}) +public ResponseResult updateSafeguard(@RequestBody SafeguardVO safeguardVO){ + Boolean result = safeguardService.update(safeguardVO); + return ResponseResultBuild._successBuild_(result); +} +``` + +> Put 发送完整数据更新数据,如果不存在可根据提交的数据创建 +> Patch 可发送部分(只包含要更新的字段内容)更新数据 + +#### 2)业务方法 + +新增方法 `com.itheima.sfbx.insurance.service.impl.SafeguardServiceImpl#update` 如下: + +```java +@Override +public Boolean update(SafeguardVO safeguardVO) { + try { + _//将safeguardVO转换为safeguard_ +_ _Safeguard safeguard = BeanConv._toBean_(safeguardVO, Safeguard.class); + + _//更新并返回更新结果_ +_ _boolean flag = updateById(safeguard); + if (!flag) { + throw new RuntimeException("更新保障项失败!"); + } + return flag; + } catch (Exception e) { + _log_.error("更新保障项失败:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(SafeguardEnum._UPDATE_FAIL_); + } +} +``` + +### 2.4.4、删除 + +#### 1)处理器方法 + +新增方法 `com.itheima.sfbx.insurance.web.SafeguardController#deleteSafeguard` 内容如下: + +```java +_/**_ +_ * 删除保障项_ +_ * @param safeguardVO 保障项VO对象_ +_ * @return 删除结果_ +_ */_ +@DeleteMapping +@ApiImplicitParam(name = "safeguardVO",value = "VO对象",required = true,dataType = "SafeguardVO") +@ApiOperationSupport(includeParameters = {"safeguardVO.checkedIds"}) +public ResponseResult deleteSafeguard(@RequestBody SafeguardVO safeguardVO){ + Boolean result = safeguardService.delete(safeguardVO.getCheckedIds()); + return ResponseResultBuild._successBuild_(result); +} +``` + +#### 2)业务方法 + +新增方法 `com.itheima.sfbx.insurance.web.SafeguardController#deleteSafeguard` 内容如下: + +```java +@Override +public Boolean delete(String[] checkedIds) { + try { + List idsList = Arrays._asList_(checkedIds).stream().map(Long::new).collect(Collectors._toList_()); + boolean flag = removeByIds(idsList); + if (!flag) { + throw new RuntimeException("批量删除保障项失败!"); + } + return flag; + } catch (RuntimeException e) { + _log_.error("删除保障项异常;{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(SafeguardEnum._DEL_FAIL_); + } +} +``` + +## 2.5、小结 + +**保障项的作用:** + +- 用户在购买保险时,保险产品所包含的具体风险或事件 +- 风险或事件发生时,保险公司愿意提供的经济赔偿或保障 + +**保障项的数据结构-示例:** + +- 保障项名称:住院医疗费用 +- 保障项 key: B001-ZY +- 保障项值: [{"name":“共享 400 万”,"val":"4000000",“score”:"1"},{"name":“共享 300 万”,"val":"3000000",“score”:"2"}] + +# 3、系数项-保险保费定价 + +课堂练习该模块 + +## 3.1、需求分析 + +要查看系数管理的界面;需要启动的服务有: + +- 前端 nginx +- 后端微服务:GatewayMgtStart、InsuranceMgtStart、SecurityOauthStart、SecurityWebStart + +访问:[http://sf.mgt.itheima.net/#/login](http://sf.mgt.itheima.net/#/login) ;登录之后;再点击 基础数据——》系数管理 + +![](http://115.28.184.253:9000/tomysnote/day02/DVYJbsiaFoXWnkxQAeCccYdunHh.png) + +![](http://115.28.184.253:9000/tomysnote/day02/TPrVbWGsro4IFpxe31vci1FXnKg.png) + +而在 app 端点击产品查看详情时,也能够看到这些系数项的使用: + +![](http://115.28.184.253:9000/tomysnote/day02/CXqpb4KQAo8lMGxm9sGc5Psknje.png) + +**功能方面**:分页搜索、新建、删除、编辑(前端加载数据,不需要后端实现)、保存编辑、启用/禁用、功能栏的全部/启用/禁用(前端未实现;但也是分页查询);也就是要实现的功能总共 **5** 个。 + +**数据方面**:只是保存编辑页面中的数据、主键、列表中需要的创建时间等。 + +## 3.2、数据库表设计 + +按照需求分析中的思路;只需要设计一张表 `系数表tab_coefficent` 具体表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/WsNvbW1tEor1T9xH9uCcZi9Onge.png) + +> 系数项值;在数据库中存储一个 json 字符串;json 的格式参考如下: +> [{"name":“10 年”,"val":"10",“calculatedVal”:"10"},{"name":“20 年”,"val":"20",“calculatedVal”:"20"}] + +## 3.3、接口设计 + +### 1)分页搜索 + + + + + + + + + + + + +
说明
请求信息
接口地址
http://sf.mgt.itheima.net/api/insurance-mgt/coefficent/page/{pageNum}/{pageSize}
**请求方式**
POST
**请求参数**
CoefficentVO 对应的数据结构如:
{pageSize: 10, total: 15, pageNum: 1, coefficentKey: "", coefficentKeyName: "投保人数", insuranceType: ""}
**响应结果**

ResponseResult> 返回的结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": {
"records": [
{
"id": "1718453920591900673",
"createTime": "2023-10-29 10:25:17",
"updateTime": "2023-11-30 16:40:55",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"coefficentKey": "XS016",
"coefficentKeyName": "投保人数",
"coefficentVal": "[{\"end\": \"\", \"start\": \"\", \"endUnit\": \"\", \"startUnit\": \"\"}]",
"sortNo": 0,
"remake": null,
"coefficentType": "1",
"checkedIds": null
}
],
"total": 1,
"size": 10,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"hitCount": false,
"countId": null,
"maxLimit": null,
"searchCount": true,
"pages": 1
},
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "com.baomidou.mybatisplus.extension.plugins.pagination.Page",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-15 18:11:12"
}
+ +### 2)新建 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/coefficent
**请求方式**
PUT
**请求参数**
{
"coefficentKeyName": "test系数名称",
"coefficentKey": "123",
"dataState": "0",
"coefficentType": "1",
"sortNo": 0,
"coefficentVal": "[{\"start\":\"\",\"startUnit\":\"\",\"end\":\"\",\"endUnit\":\"\"}]"
}
**响应结果**
ResponseResult 数据结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": {
"id": "1790686821181591553",
"createTime": "2024-05-15 18:13:02",
"updateTime": "2024-05-15 18:13:02",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"coefficentKey": "123",
"coefficentKeyName": "test系数名称",
"coefficentVal": "[{\"start\":\"\",\"startUnit\":\"\",\"end\":\"\",\"endUnit\":\"\"}]",
"sortNo": 0,
"remake": null,
"coefficentType": "1",
"checkedIds": null
},
"operatorId": 1371500419615895553,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "com.itheima.sfbx.insurance.dto.CoefficentVO",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-15 18:13:02"
}
+ +### 3)保存编辑 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/cofficent
**请求方式**
PATCH
**请求参数**
CoefficentVO数据结构参考如下:
{
"id": "1790686821181591553",
"createTime": "2024-05-15 18:13:02",
"updateTime": "2024-05-15 18:13:02",
"createBy": "1371500419615895553",
"updateBy": "1371500419615895553",
"dataState": "0",
"creator": null,
"coefficentKey": "123",
"coefficentKeyName": "test系数名称22",
"coefficentVal": "[{\"end\":\"\",\"start\":\"\",\"endUnit\":\"\",\"startUnit\":\"\"}]",
"sortNo": 0,
"remake": null,
"coefficentType": "1",
"checkedIds": null
}
**响应结果**
ResponseResult 数据结构参考如下:
{
"code": 200,
"msg": "操作成功",
"data": true,
"operatorId": 13715004196158955xx,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "java.lang.Boolean",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 20:45:12"
}
+ +### 4)启用/禁用 + +这个功能与 保存编辑是一模一样的接口;所以并不需要再写,调用 保存编辑 的接口即可。 + +### 5)删除 + + + + + + + + + + + + +
说明
请求信息
**接口地址**
http://sf.mgt.itheima.net/api/insurance-mgt/coefficent
**请求方式**
DELETE
**请求参数**
CoefficentVO 只传递了要删除的Id数组;数据结构参考:{checkedIds: ["1790686821181591553"]}
**响应结果**
ResponseResult
{
"code": 200,
"msg": "操作成功",
"data": true,
"operatorId": 13715004196158955yy,
"operatorName": "admin@qq.com",
"operatorSex": "0",
"_class": "java.lang.Boolean",
"tip": "本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!",
"operationTime": "2024-05-13 21:04:46"
}
+ +## 3.4、开发实现 + +由于系数项的处理器已经在工程中存在;也就是这个类:`com.itheima.sfbx.insurance.web.CoefficentController` 里面已经包含了对应接口的处理方法;所以接下来的实现可以删除之后重写处理器方法;对应的业务对象亦如此。 + +### 1)分页搜索 + +在 `com.itheima.sfbx.insurance.service.impl.CoefficentServiceImpl` 里面实现方法如下: + +```java +_/***_ +_* 系数项多条件组合_ +_* @param coefficentVO 系数项_ +_* @return QueryWrapper查询条件_ +_*/_ +private QueryWrapper queryWrapper(CoefficentVO coefficentVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + _//系数键名称查询_ +_ _queryWrapper.lambda().eq(!EmptyUtil._isNullOrEmpty_(coefficentVO.getCoefficentKeyName()), + Coefficent::getCoefficentKeyName, coefficentVO.getCoefficentKeyName()); + _//系数键查询_ +_ _queryWrapper.lambda().eq(!EmptyUtil._isNullOrEmpty_(coefficentVO.getCoefficentKey()), + Coefficent::getCoefficentKey, coefficentVO.getCoefficentKey()); + _//状态查询_ + if (!EmptyUtil._isNullOrEmpty_(coefficentVO.getDataState())) { + queryWrapper.lambda().eq(Coefficent::getDataState,coefficentVO.getDataState()); + } + _//按创建时间降序_ +_ _queryWrapper.lambda().orderByDesc(Coefficent::getCreateTime); + return queryWrapper; +} + +@Override +@Cacheable(value = CoefficentCacheConstant._PAGE_,key ="#pageNum+'-'+#pageSize+'-'+#coefficentVO.hashCode()") +public Page findPage(CoefficentVO coefficentVO, int pageNum, int pageSize) { + try { + _//构建分页对象_ +_ _Page coefficentPage = new Page<>(pageNum, pageSize); + + _//构建查询条件_ +_ _QueryWrapper queryWrapper = queryWrapper(coefficentVO); + + _//执行分页查询_ +_ _Page page = page(coefficentPage, queryWrapper); + + _//返回结果_ +_ _return BeanConv._toPage_(page,CoefficentVO.class); + }catch (Exception e){ + _log_.error("系数项分页查询异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CoefficentEnum._PAGE_FAIL_); + } +} +``` + +### 2)新建 + +在 `com.itheima.sfbx.insurance.service.impl.CoefficentServiceImpl` 里面实现方法如下: + +```java +@Override +@Transactional +@Caching(evict = {@CacheEvict(value = CoefficentCacheConstant._PAGE_,allEntries = true), + @CacheEvict(value = CoefficentCacheConstant._LIST_,allEntries = true)}, + put={@CachePut(value =CoefficentCacheConstant._BASIC_,key = "#result.id")}) +public CoefficentVO save(CoefficentVO coefficentVO) { + try { + _//转换CoefficentVO为Coefficent_ +_ _Coefficent coefficent = BeanConv._toBean_(coefficentVO,Coefficent.class); + + _//保存_ +_ _boolean flag = save(coefficent); + if (!flag) { + throw new RuntimeException("保存系数失败!"); + } + + _//转换返回对象CoefficentVO_ +_ _return BeanConv._toBean_(coefficent,CoefficentVO.class); + }catch (Exception e){ + _log_.error("保存系数项异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CoefficentEnum._SAVE_FAIL_); + } +} +``` + +### 3)保存编辑 + +在 `com.itheima.sfbx.insurance.service.impl.CoefficentServiceImpl` 里面实现方法如下: + +```java +@Override +@Transactional +@Caching(evict = {@CacheEvict(value = CoefficentCacheConstant._PAGE_,allEntries = true), + @CacheEvict(value = CoefficentCacheConstant._LIST_,allEntries = true), + @CacheEvict(value = CoefficentCacheConstant._BASIC_,key = "#coefficentVO.id")}) +public Boolean update(CoefficentVO coefficentVO) { + try { + _//转换CoefficentVO为Coefficent_ +_ _Coefficent coefficent = BeanConv._toBean_(coefficentVO,Coefficent.class); + + _//保存_ +_ _boolean flag = updateById(coefficent); + if (!flag) { + throw new RuntimeException("保存系数失败!"); + } + + return true; + }catch (Exception e){ + _log_.error("修改系数项异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CoefficentEnum._UPDATE_FAIL_); + } +} +``` + +### 4)启用/禁用 + +与编辑功能是一样的;共用了编辑的实现方法,所以不用再实现。 + +### 5)删除 + +在 `com.itheima.sfbx.insurance.service.impl.CoefficentServiceImpl` 里面实现方法如下: + +```java +@Override +@Transactional +@Caching(evict = {@CacheEvict(value = CoefficentCacheConstant._PAGE_,allEntries = true), + @CacheEvict(value = CoefficentCacheConstant._LIST_,allEntries = true), + @CacheEvict(value = CoefficentCacheConstant._BASIC_,allEntries = true)}) +public Boolean delete(String[] checkedIds) { + try { + List idsList = Arrays._stream_(checkedIds).map(Long::_parseLong_).collect(Collectors._toList_()); + boolean flag = removeByIds(idsList); + if (!flag) { + throw new RuntimeException("删除系数失败!"); + } + return true; + }catch (Exception e){ + _log_.error("删除系数项异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CoefficentEnum._DEL_FAIL_); + } +} +``` + +## 3.5、小结 + +**系数项的作用:** + +- 用户在购买保险时,通过系数项的选择会有不同的保费报价,系数是影响投保价格的唯一因素 + +**系数项的数据结构-示例:** + +- 系数项名称:保障年限 +- 系数项 key: X001-BZNX +- 系数项值格式: + + - 选项系数:[{"name":“10 年”,"val":"10",“calculatedVal”:"10"},{"name":“20 年”,"val":"20",“calculatedVal”:"20"}] + - 范围系数:[{"end": "10", "start": "28", "endUnit": "YEAR", "startUnit": "DAY"}, {"end": "20", "val": "", "name": "", "start": "10", "endUnit": "YEAR", "startUnit": "YEAR", "calculatedVal": ""}, {"end": "30", "val": "", "name": "", "start": "20", "endUnit": "YEAR", "startUnit": "YEAR", "calculatedVal": ""}] + - 年限系数:[ {"val": "20YEAR", "name": "20 年", "unit": "YEAR", "calculatedVal": "20"},{"val": "30YEAR", "name": "30 年", "unit": "YEAR", "calculatedVal": "30"}] + +# 4、筛选项-查找保险产品 + +与前面的两个是一样的做法;阅读该模块的实现即可。 + +## 4.1、需求分析 + +登录后台管理系统——》基础数据——》筛选管理 + +![](http://115.28.184.253:9000/tomysnote/day02/JvOLbs1nVomYBkxsQbNcuXennqd.png) + +![](http://115.28.184.253:9000/tomysnote/day02/J9KcbQXwtooYgtxr8lVc1uVinXd.png) + +而在 app 端点击产品查看详情时,也能够看到这些筛选项的使用: + +![](http://115.28.184.253:9000/tomysnote/day02/GrHXb3yNNol1XTxIf4kcfdgin7p.png) + +## 4.2、数据库表设计 + +按照需求分析中的思路;只需要设计一张表 `筛选项表tab_condition` 具体表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/NQZwbCeT7oHOJsxFfPbchpIcnDZ.png) + +> 筛选项值;在数据库中存储一个 json 字符串;json 的格式参考如下: +> [{"name":“有其他慢性病”,"val":"MXB"},{"name":“健康”,"val":"JK"}] + +## 4.3、接口设计 + +项目中已经引入了 knife4j(swagger);所以可以直接访问接口管理平台:[http://sf.mgt.itheima.net/doc.html#/home](http://sf.mgt.itheima.net:7066/doc.html#/home) 这样可以更加直观的查看、调试接口。 + +![](http://115.28.184.253:9000/tomysnote/day02/NqUKbSgNroH3Z5xt1qTcF6ABnvc.png) + +## 4.4、测试 + +既然我们在这个模块中已实现全部功能,那么只需要在测试管理平台中进行功能的确认测试。 + +### 1)新建 + +测试地址:[http://sf.mgt.itheima.net/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/createConditionUsingPUT](http://sf.mgt.itheima.net:7066/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/createConditionUsingPUT) + +测试数据参考如下: + +```json +{ + "conditionKeyName": "test111", + "conditionKey": "11123", + "dataState": "0", + "sortNo": 0, + "conditionVal": "[{\"name\":\"值1\",\"val\":\"1\"}]" +} +``` + +![](http://115.28.184.253:9000/tomysnote/day02/Ezaaby0hDoJi0Kxm4eocsDOenzg.png) + +### 2)编辑 + +测试地址: + +[http://sf.mgt.itheima.net/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/updateConditionUsingPATCH](http://sf.mgt.itheima.net:7066/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/updateConditionUsingPATCH) + +测试数据参考: + +```json +{ + "id": "1790749993443848194要替换为刚刚创建的数据对应的id", + "conditionKeyName": "test1112222", + "conditionKey": "11123", + "dataState": "0", + "sortNo": 0, + "conditionVal": "[{\"name\":\"值1\",\"val\":\"1\"}]" +} +``` + +![](http://115.28.184.253:9000/tomysnote/day02/VCuBbc5a6oy1Vbxjd5xcOY7Xn9g.png) + +### 3)搜索 + +测试地址: + +[http://sf.mgt.itheima.net/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/findConditionVOPageUsingPOST](http://sf.mgt.itheima.net:7066/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/findConditionVOPageUsingPOST) + +![](http://115.28.184.253:9000/tomysnote/day02/WJKrbZdDpo3k0vxgCkycmzJinJg.png) + +### 4)删除 + +测试地址: + +[http://sf.mgt.itheima.net/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/deleteConditionUsingDELETE](http://sf.mgt.itheima.net:7066/doc.html#/default/%E7%AD%9B%E9%80%89%E9%A1%B9/deleteConditionUsingDELETE) + +![](http://115.28.184.253:9000/tomysnote/day02/ELE6b6V3MoK6j6xXPCiczz3Pnhi.png) + +## 4.5、小结 + +**筛选项的作用:** + +- 用户在购买保险时,通过筛选项的选择满足自己需求的保险。 + +**筛选项的数据结构:** + +- 筛选项名称:健康情况 +- 筛选项 key: S001-JKQK +- 筛选项值: [{"name":“有其他慢性病”,"val":"MXB"},{"name":“健康”,"val":"JK"}] + +# 5、保险分类-保险产品归属 + +## 5.1、需求分析 + +在后台管理端中分类管理: + +![](http://115.28.184.253:9000/tomysnote/day02/CsSnba34eorAI6xWdjncEH0KnCg.png) + +> 上述的 关联系数 只能关联到叶子节点上;比如:储蓄 是 3 级分类,它还有 财富年金、教育金两个叶子节点;它自己是不能关联系数等的。 但是 财富年金 是叶子节点则可以关联系数 + +在 app 端中分类使用的场景: + +![](http://115.28.184.253:9000/tomysnote/day02/J9R2bsjuUo5UH0xIbYgcIvh9nKg.png) + +## 5.2、数据库表设计 + +分类与关联关系的总体关系为: + +![](http://115.28.184.253:9000/tomysnote/day02/OGHebQQfHoL1LpxUfxecnILInQb.png) + +### 5.2.1、分类 + +查看界面发现;分类有层级关系,且最多 4 级——》设计一张存储层级关系的数据库表 `tab_category`(红色的部分) + +![](http://115.28.184.253:9000/tomysnote/day02/BQSfbrsWVofdkMx27BxcRiPZnOb.png) + +![](http://115.28.184.253:9000/tomysnote/day02/PXi1bjYeOo2TDwxupFncUoENnfg.png) + +### 5.2.2、关联关系 + +- **分类与保障** + +一个分类可以对应管理多个不同的保障项 ===》一对多 + +一个保障项可以被不同的分类关联 ===》一对多 + +双向一对多;**说明分类与保障项的关系为:多对多** ===》需要设计中间表 `tab_category_safeguard` 来保存 分类与保障的关系 + +![](http://115.28.184.253:9000/tomysnote/day02/MFc6bpO4loGVRjxWrXAcj5Fpnfb.png) + +与分类的关系如上图;具体的表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/ZdYDb1UfZoxiNxxImk3cxtpmn1o.png) + +- **分类与系数** + +一个分类可以对应管理多个不同的系数项 ===》一对多 + +一个系数项可以被不同的分类关联 ===》一对多 + +双向一对多;**说明分类与系数项的关系为:多对多** ===》需要设计中间表 `tab_category_coefficent` 来保存 分类与系数的关系 + +![](http://115.28.184.253:9000/tomysnote/day02/XuS8bMWy5oO0vNxIrDfcISeLnJh.png) + +与分类的关系如上图;具体的表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/JhjkbBshjo5sdex43CLcxznhnZd.png) + +- **分类与筛选** + +一个分类可以对应管理多个不同的筛选项 ===》一对多 + +一个筛选项可以被不同的分类关联 ===》一对多 + +双向一对多;**说明分类与筛选项的关系为:多对多** ===》需要设计中间表 `tab_category_condition` 来保存 分类与筛选的关系 + +![](http://115.28.184.253:9000/tomysnote/day02/VJLHbYfImogHPMx5f4Ucnpr0nnb.png) + +与分类的关系如上图;具体的表结构如下: + +![](http://115.28.184.253:9000/tomysnote/day02/EqaWbrQT2o55Ynxpv49cHJSWnwe.png) + +## 5.3、接口设计 + +### 5.3.1、分页查询 + +在分类的分页查询中,与前面的几个分页查询稍微有不同,它有保障项、系数项、筛选项的关联关系并且需要在查询时候**一次性全部查询出来**。接口信息地址:[http://sf.mgt.itheima.net/doc.html#/default/%E4%BF%9D%E9%99%A9%E5%88%86%E7%B1%BB/findCategoryVOPageUsingPOST](http://sf.mgt.itheima.net:7066/doc.html#/default/%E4%BF%9D%E9%99%A9%E5%88%86%E7%B1%BB/findCategoryVOPageUsingPOST) + +![](http://115.28.184.253:9000/tomysnote/day02/OSglbe35BoyxxvxXqSGc8mnpnhf.png) + +### 5.3.2、修改--关联关系 + +分类与保障项、系数项、筛选项的关联是在列表中点击 关联关系 之后的编辑页面中;也就是 修改分类。在修改的页面中发现可以添加这几项数据,但总的来说就是保存修改。具体的接口信息地址: + +[http://sf.mgt.itheima.net/doc.html#/default/%E4%BF%9D%E9%99%A9%E5%88%86%E7%B1%BB/updateCategoryUsingPATCH](http://sf.mgt.itheima.net:7066/doc.html#/default/%E4%BF%9D%E9%99%A9%E5%88%86%E7%B1%BB/updateCategoryUsingPATCH) + +![](http://115.28.184.253:9000/tomysnote/day02/XjZLbvQlPobGyVx7V5lc2gR0nCh.png) + +## 5.4、开发实现 + +### 5.4.1、分页查询 + +删除 `findPage` 方法原有内容;重写如下代码 `com.itheima.sfbx.insurance.service.impl.CategoryServiceImpl#findPage` + +```java +@Override +@Cacheable(value = CategoryCacheConstant._PAGE_,key ="#pageNum+'-'+#pageSize+'-'+#categoryVO.hashCode()") +public Page findPage(CategoryVO categoryVO, int pageNum, int pageSize) { + try { + _//构建分页对象_ +_ _Page categoryPage = new Page<>(pageNum,pageSize); + _//构建查询条件_ +_ _QueryWrapper queryWrapper = queryWrapper(categoryVO); + _//查询分页基本列表数据_ +_ _Page page = page(categoryPage, queryWrapper); + if (EmptyUtil._isNullOrEmpty_(page.getRecords())) { + return null; + } + _//转换为要返回的VO列表数据_ +_ _Page resultPage = BeanConv._toPage_(page, CategoryVO.class); + + _//获取分类列表的每个分类编号放置到一个集合set中_ +_ _Set categoryNoSet = page.getRecords().stream().map(Category::getCategoryNo).collect(Collectors._toSet_()); + + _/*处理每个分类的保障项:_ +_ ①根据查询到的分类编号查询出分类下的保障项列表;_ +_ ②对保障项列表根据分类分组;_ +_ ③遍历分类列表设置对应的保障项列表_ +_ */_ +_ _List categorySafeguardVOs = categorySafeguardService.findListInCategoryNo(categoryNoSet); + Map> categorySafeguardVOMap = categorySafeguardVOs.stream(). + collect(Collectors._groupingBy_(CategorySafeguardVO::getCategoryNo)); + if (!EmptyUtil.isNullOrEmpty(resultPage.getRecords())) { + resultPage.getRecords().forEach(tmpCategoryVO -> { + if (categorySafeguardVOMap.containsKey(tmpCategoryVO.getCategoryNo())) { + tmpCategoryVO.setCategorySafeguardVOs(categorySafeguardVOMap.get(tmpCategoryVO.getCategoryNo())); + } else { + // 这个很重要,要设置空集合,前端判断不是很宽松,不设置为null的话就无法回显 + tmpCategoryVO.setCategorySafeguardVOs(List._of_()); + } + }); +} + _/*处理每个分类的系数项:_ +_ ①根据查询到的分类编号查询出分类下的系数项列表;_ +_ ②对系数项列表根据分类分组;_ +_ ③遍历分类列表设置对应的系数项列表_ +_ */_ +_ _List categoryCoefficentVOs = categoryCoefficentService.findListInCategoryNo(categoryNoSet); + Map> categoryCoefficentVOMap = categoryCoefficentVOs.stream(). + collect(Collectors._groupingBy_(CategoryCoefficentVO::getCategoryNo)); + if (!EmptyUtil.isNullOrEmpty(resultPage.getRecords())) { + resultPage.getRecords().forEach(tmpCategoryVO -> { + if (categoryCoefficentVOMap.containsKey(tmpCategoryVO.getCategoryNo())) { + tmpCategoryVO.setCategoryCoefficentVOs(categoryCoefficentVOMap.get(tmpCategoryVO.getCategoryNo())); + } else { + tmpCategoryVO.setCategoryCoefficentVOs(List._of_()); + } + }); +} + _/*处理每个分类的筛选项:_ +_ ①根据查询到的分类编号查询出分类下的筛选项列表;_ +_ ②对筛选项列表根据分类分组;_ +_ ③遍历分类列表设置对应的筛选项列表_ +_ */_ +_ _List categoryConditionVOs = categoryConditionService.findListInCategoryNo(categoryNoSet); + Map> categoryConditionVOMap = categoryConditionVOs.stream(). + collect(Collectors._groupingBy_(CategoryConditionVO::getCategoryNo)); + if (!EmptyUtil.isNullOrEmpty(resultPage.getRecords())) { + resultPage.getRecords().forEach(tmpCategoryVO -> { + if (categoryConditionVOMap.containsKey(tmpCategoryVO.getCategoryNo())) { + tmpCategoryVO.setCategoryConditionVOs(categoryConditionVOMap.get(tmpCategoryVO.getCategoryNo())); + } else { + tmpCategoryVO.setCategoryConditionVOs(List._of_()); + } + }); +} + + _//返回结果_ +_ _return resultPage; + }catch (Exception e){ + _log_.error("保险分类分页查询异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CategoryEnum._PAGE_FAIL_); + } +} +``` + +### 5.4.2、修改--关联关系 + +#### 1)完善加载保障项列表 + +在 分类关联——关联关系 中;查看某个分类的保障项、系数项、筛选项时候;都需要获取这些数据的列表;而 保障项是我们从无到有写的,当时并没有写查询列表的接口;需要再实现该接口。( 系数项、筛选项都已实现不需要再写。) + +查询保障项列表接口信息 + + + + + + + + + + + + +
说明
请求信息
接口地址
http://sf.mgt.itheima.net/api/insurance-mgt/safeguard/list
**请求方式**
POST
**请求参数**

**响应结果**
ResponseResult>
+ +编写处理器方法: + +`com.itheima.sfbx.insurance.web.SafeguardController#safeguardList` + +```java +_/***_ +_ * 多条件查询保障项列表_ +_ * @param safeguardVO 保障项VO对象_ +_ * @return List_<_SafeguardVO_> + _*/_ +@PostMapping("list") +@ApiOperation(value = "多条件查询保障项列表",notes = "多条件查询保障项列表") +@ApiImplicitParam(name = "safeguardVO",value = "保障项VO对象",required = true,dataType = "SafeguardVO") +@ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"}) +public ResponseResult> safeguardList(@RequestBody SafeguardVO safeguardVO){ + List safeguardVOList = safeguardService.findList(safeguardVO); + return ResponseResultBuild._successBuild_(safeguardVOList); +} +``` + +实现业务方法: + +`com.itheima.sfbx.insurance.service.impl.SafeguardServiceImpl#findList` + +```java +@NotNull +private static LambdaQueryWrapper queryWrapper(SafeguardVO safeguardVO) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + _//根据保障项编号_ +_ _queryWrapper.eq(!EmptyUtil._isNullOrEmpty_(safeguardVO.getSafeguardKey()), + Safeguard::getSafeguardKey, safeguardVO.getSafeguardKey()); + _//根据保障项名称_ +_ _queryWrapper.like(!EmptyUtil._isNullOrEmpty_(safeguardVO.getSafeguardKeyName()), + Safeguard::getSafeguardKeyName, safeguardVO.getSafeguardKeyName()); + _//状态_ +_ _queryWrapper.eq(!EmptyUtil._isNullOrEmpty_(safeguardVO.getDataState()), + Safeguard::getDataState, safeguardVO.getDataState()); + _//按照创建时间降序排_ +_ _queryWrapper.orderByDesc(Safeguard::getCreateTime); + return queryWrapper; +} + +@Override +public List findList(SafeguardVO safeguardVO) { + try { + LambdaQueryWrapper queryWrapper = _queryWrapper_(safeguardVO); + List list = list(queryWrapper); + if (!EmptyUtil._isNullOrEmpty_(list)) { + return BeanConv._toBeanList_(list, SafeguardVO.class); + } + } catch (Exception e) { + _log_.error("查询保障项列表失败;{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(SafeguardEnum._LIST_FAIL_); + } + return List._of_(); +} +``` + +#### 2)保存 分类和关联 + +在关联关系时候;就是调用修改方法;提交到后台的 CategoryVO 数据结构参考如下: + +```json +{ + "id": "1715250693712924674", + "createTime": "2023-10-20 14:16:48", + "updateTime": "2023-11-08 10:04:02", + "createBy": "1371500419615895553", + "updateBy": "1371500419615895553", + "dataState": "0", + "creator": null, + "parentCategoryNo": "100001001000000", + "categoryNo": "100001001002000", + "categoryName": "门诊险", + "icon": "", + "leafNode": null, + "showIndex": "0", + "categoryType": "1", + "sortNo": 9, + "remake": null, + "checkRule": "0", + "checkedIds": null, + "categoryConditionVOs": [ + { + "conditionKey": "SX006", + "conditionKeyName": "保多久" + }, + { + "conditionKey": "SX003", + "conditionKeyName": "特色保障" + } + ], + "categoryCoefficentVOs": [ + { + "coefficentKey": "XS008", + "coefficentKeyName": "投入周期" + }, + { + "coefficentKey": "XS001", + "coefficentKeyName": "有无医保" + } + ], + "categorySafeguardVOs": [ + { + "safeguardKey": "BZ042", + "safeguardKeyName": "专家门诊预约" + }, + { + "safeguardKey": "BZ001", + "safeguardKeyName": "一般医疗保险金" + } + ], + "checkedCategoryNos": null, + "nodeFloors": null +} +``` + +分析上述的数据结构;可以发现包含了:分类基本信息、分类对应的保障项、系数项、筛选项集合;也就是说;需要同时将这 4 类数据保存到数据库中就算实现完成。 + +具体实现代码: + +`com.itheima.sfbx.insurance.service.impl.CategoryServiceImpl#update` + +```java +@Override +@Transactional +@Caching(evict = {@CacheEvict(value = CategoryCacheConstant._PAGE_,allEntries = true), + @CacheEvict(value = CategoryCacheConstant._LIST_,allEntries = true), + @CacheEvict(value = CategoryCacheConstant._BASIC_,key = "#categoryVO.id")}) +public Boolean update(CategoryVO categoryVO) { + try { + _//1、保存分类基本信息_ +_ _Category category = BeanConv._toBean_(categoryVO, Category.class); + boolean flag = updateById(category); + + _//2、保存分类保障项信息_ +_ //2.1、删除分类保障项:根据分类编号删除分类保障项_ +_ _categorySafeguardService.deleteByCategoryNo(category.getCategoryNo()); + _//2.2、保存分类保障项:保存每个分类保障项需要设置分类编号_ +_ _List categorySafeguardList = categoryVO.getCategorySafeguardVOs().stream().map(tmpCategorySafeguardVO -> { + tmpCategorySafeguardVO.setCategoryNo(category.getCategoryNo()); + return BeanConv._toBean_(tmpCategorySafeguardVO, CategorySafeguard.class); + }).collect(Collectors._toList_()); + categorySafeguardService.saveBatch(categorySafeguardList); + + _//3、保存分类系数项信息_ +_ //3.1、删除分类系数项:根据分类编号删除分类系数项_ +_ _categoryCoefficentService.deleteByCategoryNo(category.getCategoryNo()); + _//3.2、保存分类系数项:保存每个分类系数项需要设置分类编号_ +_ _List categoryCoefficentList = categoryVO.getCategoryCoefficentVOs().stream().map(tmpCategoryCoefficentVO -> { + tmpCategoryCoefficentVO.setCategoryNo(category.getCategoryNo()); + return BeanConv._toBean_(tmpCategoryCoefficentVO, CategoryCoefficent.class); + }).collect(Collectors._toList_()); + categoryCoefficentService.saveBatch(categoryCoefficentList); + + _//4、保存分类筛选项信息_ +_ //4.1、删除分类筛选项:根据分类编号删除分类筛选项_ +_ _categoryConditionService.deleteByCategoryNo(category.getCategoryNo()); + _//4.2、保存分类筛选项:保存每个分类筛选项需要设置分类编号_ +_ _List categoryConditionList = categoryVO.getCategoryConditionVOs().stream().map(tmpCategoryConditionVO -> { + tmpCategoryConditionVO.setCategoryNo(category.getCategoryNo()); + return BeanConv._toBean_(tmpCategoryConditionVO, CategoryCondition.class); + }).collect(Collectors._toList_()); + categoryConditionService.saveBatch(categoryConditionList); + + return flag; + }catch (Exception e){ + _log_.error("修改保险分类异常:{}", ExceptionsUtil._getStackTraceAsString_(e)); + throw new ProjectException(CategoryEnum._UPDATE_FAIL_); + } +} +``` + +# 6、午间问题 + +- **说出常见保险保障项** + + - 一般医疗保险金 + - 特定疾病医疗保险金 + - 重大疾病医疗保险金 + - 重大疾病关爱保险金 + - 特定药品费用医疗保险金 + - 门诊挂号及陪诊、100 种重大疾病津贴保险金 + - 押金垫付、癌症质子重离子放疗、恶性肿瘤特效药、就医绿色通道、医疗费用垫付 +- **常见系数项** + + - 有无医保 + - 投入方式 + - 付款方式 + - 年龄范围 + - 保障期限 + - 投入时长 + - 保障金额 + - 自动续保 + - 投入周期 + - 什么时候开始领 + - 领取多久 + - 领取周期 +- **常见筛选项** + + - 为谁买 + - 健康状况 + - 特色保障 + - 特色服务 + - 保多久 + - 交通工具 +- **常见分类** + +医疗险、重疾险、意外(出行、运动)、旅游(境内、境外)、人寿(终身、定期、双全)、年金(养老、教育、财富) + +- **你工作时的开发流程描述一下** +- **你日常开发都使用哪些软件工具** +- **说一下你开发过最复杂的业务涉及多少张表?分别是什么?涉及最多字段的表有几个字段?** +- **遇到这种关联性、关系比较多和复杂的表;你有什么设计或者优化经验吗** +- +- **简历职责-候选**:优化保险管理后端中分类列表查询的查询效率;将分类、系数、保障项、筛选项等 7 张表的连接查询从 1335ms 优化到 150ms,查询效率提升超过一倍。 + +下次课====》进行设计实战 + +- 新需求 +- 保险基础数据 diff --git a/day02/docker-compose.yml b/day02/docker-compose.yml new file mode 100644 index 0000000..da00429 --- /dev/null +++ b/day02/docker-compose.yml @@ -0,0 +1,125 @@ +version: "3.8" + +services: + #mysql数据库脚本 + mysql: + image: mysql:5.7 + container_name: mysql + restart: always + ports: + - 3306:3306 + volumes: + - ./mysql/mydir:/mydir + - ./mysql/data:/var/lib/mysql + - ./mysql/conf/my.cnf:/etc/my.cnf + - ./mysql/source:/docker-entrypoint-initdb.d/ + environment: + MYSQL_ROOT_PASSWORD: pass + networks: + extnetwork: + ipv4_address: 172.21.0.2 + #nacos服务脚本 + nacos: + image: nacos/nacos-server:2.0.2 + container_name: nacos + restart: always + ports: + - "8848:8848" + environment: + SPRING_DATASOURCE_PLATFORM: mysql #数据源平台 仅支持mysql或不保存empty + MODE: standalone + MYSQL_SERVICE_HOST: mysql + MYSQL_SERVICE_DB_NAME: nacos + MYSQL_SERVICE_PORT: 3306 + MYSQL_SERVICE_USER: root + MYSQL_SERVICE_PASSWORD: pass + NACOS_APPLICATION_PORT: 8848 + JVM_XMS: 512m + JVM_MMS: 256m + JVM_XMN: 128m + networks: + extnetwork: + ipv4_address: 172.21.0.3 + depends_on: + - mysql + #seata服务脚本 + seata-server: + image: seataio/seata-server:1.5.2 + container_name: seata-server + restart: always + ports: + - "9200:9200" + - "7091:7091" + - "8091:8091" + volumes: + - ./seata-server:/seata-server/resources + environment: + SEATA_IP: 192.168.12.129 + SEATA_PORT: 9200 + networks: + extnetwork: + ipv4_address: 172.21.0.4 + depends_on: + - nacos + #rabbitmq脚本 + rabbitmq: + image: rabbitmq:3.8.3-management + container_name: rabbitmq + restart: always + ports: + - 15672:15672 + - 5672:5672 + volumes: + - ./rabbitmq/data:/var/lib/rabbitmq + environment: + RABBITMQ_DEFAULT_USER: admin + RABBITMQ_DEFAULT_PASS: pass + networks: + extnetwork: + ipv4_address: 172.21.0.5 + xxl-job: + image: xuxueli/xxl-job-admin:2.1.2 + container_name: xxl-job-admin + restart: always + ports: + - 8280:8080 + volumes: + - ./xxl-job/data:/data/applogs + environment: + PARAMS: "--spring.datasource.url=jdbc:mysql://mysql:3306/xxl-job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=root --spring.datasource.password=pass" + networks: + extnetwork: + ipv4_address: 172.21.0.9 + depends_on: + - mysql + redis: + image: redis:5.0.0 + container_name: redis + restart: always + command: redis-server --requirepass pass + ports: + - 6379:6379 + volumes: + - ./redis/data:/data + networks: + extnetwork: + ipv4_address: 172.21.0.10 + influxdb: + image: influxdb:1.8.0 + container_name: influxdb + restart: always + ports: + - 9083:8083 + - 8086:8086 + - 8088:8088 + privileged: true + volumes: + - ./influxdb/data/influxdb:/var/lib/influxdb + - ./influxdb/config/influxdb.conf:/etc/influxdb/influxdb.conf +# docker容器内网地址 +networks: + extnetwork: + name: extnetwork + ipam: + config: + - subnet: 172.21.0.0/16 \ No newline at end of file diff --git a/day02/pom.xml b/day02/pom.xml new file mode 100644 index 0000000..78c5c77 --- /dev/null +++ b/day02/pom.xml @@ -0,0 +1,473 @@ + + + 4.0.0 + com.itheima.sfbx + sfbx-cloud + 2.0-SNAPSHOT + + + sfbx-dict + + sfbx-framework + + sfbx-file + + sfbx-points + + sfbx-trade + + sfbx-security + + sfbx-sms + + sfbx-task + + sfbx-insurance + sfbx-gateway + sfbx-apache-httpclient + + sfbx-rule + + + pom + + sfbx-cloud + http://www.example.com + + + UTF-8 + + 2.0-SNAPSHOT + + 2021.0.6 + + 2021.0.1.0 + + 3.1.0 + + 2.7.10 + + 3.4.0 + + 1.1.20 + + 1.1.22 + + 3.0.3 + + 1.5.4 + + 5.8.10 + + 3.8.1 + + 4.0.2 + + 2.2.0 + + 4.38.61.ALL + + 0.4.8 + + 23.0 + + 1.2.73 + + 4.1.1 + + 3.11.2 + + 4.0.7 + + 2.1.2 + + 2.12.2 + + 7.7.0 + + 8.0.19 + + + + + + + + com.itheima.sfbx + framework-commons + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-redis + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-out-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + dict-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-ai + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-rule-base + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-knife4j-web + ${sfbx-cloud.version} + + + com.itheima.sfbx + sfbx-apache-httpclient + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-knife4j-gateway + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-gateway + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-web + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-feign + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-seata + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-rabbitmq + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-mybatis-plus + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-task-executor + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-xxl-job + ${sfbx-cloud.version} + + + + com.itheima.sfbx + framework-influxdb + ${sfbx-cloud.version} + + + + com.itheima.sfbx + security-interface + ${sfbx-cloud.version} + + + com.itheima.sfbx + rule-client + ${sfbx-cloud.version} + + + + com.itheima.sfbx + file-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + sms-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + points-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + trade-interface + ${sfbx-cloud.version} + + + + com.itheima.sfbx + insurance-service + ${sfbx-cloud.version} + + + + com.itheima.sfbx + insurance-interface + ${sfbx-cloud.version} + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + com.alibaba.cloud + spring-cloud-alibaba-dependencies + ${spring-cloud-alibaba.version} + pom + import + + + + org.springframework.boot + spring-boot-dependencies + ${spring.boot.version} + pom + import + + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + ${sharding-jdbc.version} + + + + org.apache.shardingsphere + sharding-transaction-xa-core + ${sharding-jdbc.version} + + + + org.apache.shardingsphere + sharding-transaction-base-seata-at + ${sharding-jdbc.version} + + + + cn.hutool + hutool-all + ${hutool.version} + + + com.google.zxing + core + 3.3.3 + + + org.apache.commons + commons-lang3 + ${commons.lang3.version} + + + com.alibaba + fastjson + ${fastjson.version} + + + ma.glasnost.orika + orika-core + ${orika-core.version} + + + com.google.guava + guava + ${guava.version} + + + + com.github.xiaoymin + knife4j-spring-boot-starter + ${knife4j.version} + + + + mysql + mysql-connector-java + ${mysql.version} + + + + com.alibaba + druid-spring-boot-starter + ${druid-spring-boot-starter} + + + com.alibaba + druid + ${druid.version} + + + + com.baomidou + mybatis-plus-boot-starter + ${mybatis-plus-boot-starter.version} + + + + com.baomidou + mybatis-plus-generator + ${mybatis-plus-boot-starter.version} + + + + com.alipay.sdk + alipay-easysdk + ${alipay.easysdk.version} + + + + com.alipay.sdk + alipay-sdk-java + ${alipay-sdk-java.version} + + + + com.github.wechatpay-apiv3 + wechatpay-apache-httpclient + ${wechatpay.version} + + + + org.redisson + redisson-spring-boot-starter + ${redisson-spring-boot} + + + + com.xuxueli + xxl-job-core + ${xxl-job-core.version} + + + + org.springframework.cloud + spring-cloud-starter-stream-rabbit + ${stream-rabbit.version} + + + + com.baidubce + bce-java-sdk + 0.10.119 + + + + com.aliyun + dysmsapi20170525 + 2.0.24 + + + + com.tencentcloudapi + tencentcloud-sdk-java + 3.1.270 + + + + com.alibaba + transmittable-thread-local + ${transmittable.version} + + + + com.qiniu + qiniu-java-sdk + ${qiniu.version} + + + + com.alibaba.cloud + spring-cloud-starter-alicloud-oss + 2.2.0.RELEASE + + + com.aliyun.oss + aliyun-sdk-oss + 3.10.2 + + + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 11 + 11 + + + + + + org.springframework.boot + spring-boot-maven-plugin + 2.3.0.RELEASE + + + + + org.apache.maven.plugins + maven-surefire-plugin + 2.4.2 + + + true + + once + -Dfile.encoding=UTF-8 + + + + + + diff --git a/day02/sfbx-apache-httpclient/pom.xml b/day02/sfbx-apache-httpclient/pom.xml new file mode 100644 index 0000000..f7ac17f --- /dev/null +++ b/day02/sfbx-apache-httpclient/pom.xml @@ -0,0 +1,63 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-apache-httpclient + sfbx-apache-httpclient + + http://www.example.com + + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + org.apache.httpcomponents + httpclient + + + org.apache.httpcomponents + httpmime + + + com.fasterxml.jackson.core + jackson-databind + + + cn.hutool + hutool-all + + + org.projectlombok + lombok + + + org.slf4j + slf4j-api + + + commons-logging + commons-logging + 1.2 + + + junit + junit + test + + + + diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/BoleeHttpClientBuilder.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/BoleeHttpClientBuilder.java new file mode 100644 index 0000000..4078bd7 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/BoleeHttpClientBuilder.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx; + +import com.itheima.sfbx.auth.*; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.impl.client.HttpClientBuilder; +import org.apache.http.impl.execchain.ClientExecChain; + +/** + * @ClassName BoleeHttpClientBuilder.java + * @Description 保乐三方请求HttpClient对象构建 + */ +public class BoleeHttpClientBuilder extends HttpClientBuilder { + + //系统相关属性 + private static final String OS = System.getProperty("os.name") + "/" + System.getProperty("os.version"); + private static final String VERSION = System.getProperty("java.version"); + + //凭证构建 + private Credentials credentials; + + //校验者 + private Validator validator; + + + public static BoleeHttpClientBuilder create() { + return new BoleeHttpClientBuilder(); + } + + private BoleeHttpClientBuilder() { + String userAgent = String.format("sfbx-Apache-HttpClient/%s (%s) Java/%s", this.getClass().getPackage().getImplementationVersion(), OS, VERSION == null ? "Unknown" : VERSION); + this.setUserAgent(userAgent); + } + + public BoleeHttpClientBuilder withCredentials(String appId,String privateKey) { + this.credentials = new BoleeCredentials(appId, new PrivateKeySigner(privateKey)); + return this; + } + + + public BoleeHttpClientBuilder withValidator(String publicKey) { + this.validator = new BoleeValidator(new PublicKeyVerifier(publicKey)); + return this; + } + + public CloseableHttpClient build() { + if (this.credentials == null) { + throw new IllegalArgumentException("缺少身份认证信息"); + } else if (this.validator == null) { + throw new IllegalArgumentException("缺少签名验证信息"); + } else { + return super.build(); + } + } + + protected ClientExecChain decorateProtocolExec(ClientExecChain requestExecutor) { + return new DecorateClientExecChain(this.credentials, this.validator, requestExecutor); + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Credentials.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Credentials.java new file mode 100644 index 0000000..b143f78 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Credentials.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx; + +import org.apache.http.client.methods.HttpRequestWrapper; + +import java.io.IOException; + +/** + * @ClassName Credentials.java + * @Description 认证凭证创建处理 + */ +public interface Credentials { + + /*** + * @description 创建请求认证凭证 + * @param request 请求对象 + * @return: java.lang.String 凭证字符串 + */ + String createCredentials(HttpRequestWrapper request) throws IOException; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/DecorateClientExecChain.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/DecorateClientExecChain.java new file mode 100644 index 0000000..9726491 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/DecorateClientExecChain.java @@ -0,0 +1,75 @@ +package com.itheima.sfbx; + +import lombok.extern.slf4j.Slf4j; +import org.apache.http.HttpEntity; +import org.apache.http.HttpException; +import org.apache.http.HttpRequest; +import org.apache.http.StatusLine; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpEntityEnclosingRequestBase; +import org.apache.http.client.methods.HttpExecutionAware; +import org.apache.http.client.methods.HttpRequestWrapper; +import org.apache.http.client.protocol.HttpClientContext; +import org.apache.http.conn.routing.HttpRoute; +import org.apache.http.entity.BufferedHttpEntity; +import org.apache.http.entity.ByteArrayEntity; +import org.apache.http.entity.ContentType; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.execchain.ClientExecChain; +import org.apache.http.util.EntityUtils; + +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + +import static org.apache.http.HttpHeaders.AUTHORIZATION; +import static org.apache.http.HttpStatus.SC_MULTIPLE_CHOICES; +import static org.apache.http.HttpStatus.SC_OK; + +/** + * @ClassName SignatureExec.java + * @Description 请求执行者 + */ +@Slf4j +public class DecorateClientExecChain implements ClientExecChain { + + private final ClientExecChain mainExec; + + private final Credentials credentials; + + private final Validator validator; + + protected DecorateClientExecChain(Credentials credentials, Validator validator, ClientExecChain mainExec) { + this.credentials = credentials; + this.validator = validator; + this.mainExec = mainExec; + } + + protected void convertToRepeatableResponseEntity(CloseableHttpResponse response) throws IOException { + HttpEntity entity = response.getEntity(); + if (entity != null) { + response.setEntity(new BufferedHttpEntity(entity)); + } + } + + @Override + public CloseableHttpResponse execute(HttpRoute httpRoute, HttpRequestWrapper httpRequestWrapper, + HttpClientContext httpClientContext, HttpExecutionAware httpExecutionAware) throws IOException, HttpException { + //请求头添加认证令牌 + httpRequestWrapper.addHeader(AUTHORIZATION,credentials.createCredentials(httpRequestWrapper)); + //执行请求 + CloseableHttpResponse response = mainExec.execute(httpRoute, httpRequestWrapper, httpClientContext, httpExecutionAware); + //对成功应答验签 + StatusLine statusLine = response.getStatusLine(); + if (statusLine.getStatusCode() >= SC_OK && statusLine.getStatusCode() < SC_MULTIPLE_CHOICES) { + convertToRepeatableResponseEntity(response); + if (!validator.validate(response)) { + throw new HttpException("应答的签名验证失败"); + } + } + return response; + } + +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Encryptor.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Encryptor.java new file mode 100644 index 0000000..b949601 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Encryptor.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx; + +import com.itheima.sfbx.dto.EncodeDTO; + +import java.io.IOException; + +public interface Encryptor { + + + /*** + * @description 加密body体消息的方法 + * @param body 请求消息体 + * @return: boolean 校验结果 + */ + boolean encode(EncodeDTO body) throws IOException; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/RequestTemplate.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/RequestTemplate.java new file mode 100644 index 0000000..f3aead5 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/RequestTemplate.java @@ -0,0 +1,163 @@ +package com.itheima.sfbx; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.Mode; +import cn.hutool.crypto.Padding; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.auth.BoleeEncryptor; +import com.itheima.sfbx.constants.BoleeSecurityConstant; +import com.itheima.sfbx.dto.CredentialsDTO; +import com.itheima.sfbx.dto.EncodeDTO; +import com.itheima.sfbx.utils.SecurityUtil; +import lombok.Builder; +import lombok.Data; +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.util.EntityUtils; +import org.springframework.beans.factory.annotation.Autowired; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.util.HashMap; +import java.util.Map; + +/** + * RequestTemplate + * + * @author: wgl + * @describe: 对外统一发送模板--组装各个模组 + * 加密模组 + * 解密模组组装 + * @date: 2022/12/28 10:10 + */ +@Data +public class RequestTemplate { + + private String privateKey; + + private String publicKey; + + private String appId; + + private URIBuilder uriBuilder; + + private RequestConfig requestConfig; + + @Builder + public RequestTemplate(String privateKey, String publicKey, String appId, URIBuilder uriBuilder,RequestConfig requestConfig) { + this.privateKey = privateKey; + this.publicKey = publicKey; + this.appId = appId; + this.uriBuilder = uriBuilder; + this.requestConfig = requestConfig; + } + + + public T doRequest(Object params,Class t) throws URISyntaxException, IOException { + CloseableHttpClient httpclient = BoleeHttpClientBuilder.create() + .withCredentials(appId, privateKey) + .withValidator(publicKey) + .build(); + //=============基础配置=================== + RequestConfig requestConfig = null; + if(ObjectUtil.isNull(requestConfig)) { + requestConfig = RequestConfig.custom() + .setSocketTimeout(100000) + .setConnectTimeout(100000) + .build(); + }else{ + requestConfig = this.requestConfig; + } + try { + URI url = uriBuilder.build(); + HttpPost httpPost = new HttpPost(url); + httpPost.setConfig(requestConfig); + EncodeDTO encodeDTO = new EncodeDTO(); + JSONObject body = JSONUtil.parseObj(params); + encodeDTO.setBody(body.toString()); + if(new BoleeEncryptor(privateKey).encode(encodeDTO)){ + StringEntity stringEntity = new StringEntity(encodeDTO.getEncodeBody(), "utf-8"); + httpPost.setEntity(stringEntity); + httpPost.addHeader(BoleeSecurityConstant.HEAD_NAME_BODY_KEY,encodeDTO.getHeadAESSecurityKey()); + httpPost.addHeader("Content-Type","application/json;charset=utf-8"); + CloseableHttpResponse apiRes = httpclient.execute(httpPost); + //验签完毕后需要对数据进行解密 + HttpEntity entity = apiRes.getEntity(); + String content = EntityUtils.toString(entity); + String responseJson = decryptRequestBody(content, apiRes.getFirstHeader(BoleeSecurityConstant.HEAD_NAME_BODY_KEY).getValue()); + if(StrUtil.isEmpty(responseJson)){ + throw new RuntimeException("参数解析为空"); + } + return JSONUtil.toBean(responseJson, t); + } + } catch (Exception e) { + e.printStackTrace(); + throw e; + } + return null; + } + + /** + * 解密请求body体 + * + * @param dody 返回数据对象 + * @param aesKeyRSA 获取请求头中加密后的AES密钥 + * @return + */ + private String decryptRequestBody(String dody, String aesKeyRSA) { + try { + //先使用rsa解密aes秘钥 + RSA rsa = SecureUtil.rsa(null, publicKey); + String aesKey = SecurityUtil.decryptFromStringRSAPublicKey(rsa, aesKeyRSA); + //使用aes进行解密 + // 使用解密后的AES密钥进行AES解密请求体数据 + String requestBody = SecurityUtil.decryptFromStringAES(dody, Mode.CBC, Padding.ZeroPadding,aesKey); + return requestBody; + } catch (Exception e) { + e.printStackTrace(); + // 解密失败,可以根据你的需求进行异常处理 + return null; + } + } + + /** + * 构建请求参数 + * 1694953272 + * xHct36JgHbj6tXBx + * Modified: {"msg":"ok","code":"100","data":null} + * + * @param authorization + * @param response + * @return + */ + private CredentialsDTO buildRequestParam(String authorization, CloseableHttpResponse response) { + try { + authorization = authorization.replaceAll("\"", ""); + String[] authorizations = authorization.split(","); + Map authMap = new HashMap<>(); + for (String authorizationIndex : authorizations) { + String[] split = authorizationIndex.split("="); + authMap.put(split[0], split[1].substring(0, split[1].length())); + } + CredentialsDTO credentialsDTO = new CredentialsDTO(); + credentialsDTO.setNonce(authMap.get("nonce_str")); + credentialsDTO.setTimestamp(authMap.get("timestamp")); + credentialsDTO.setSignature(authMap.get("signature")); +// credentialsDTO.setSecurityBody(getPostData(req)); + return credentialsDTO; + } catch (Exception e) { + e.printStackTrace(); + } + return null; + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Signer.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Signer.java new file mode 100644 index 0000000..3e2508c --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Signer.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx; + +/** + * @ClassName Signer.java + * @Description 签名加密者 + */ +public interface Signer { + + String sign(byte[] message); + +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Validator.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Validator.java new file mode 100644 index 0000000..c44689a --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Validator.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx; + +import com.itheima.sfbx.notify.NotifyRequest; +import org.apache.http.client.methods.CloseableHttpResponse; + +import java.io.IOException; + +/** + * @ClassName Validator.java + * @Description 签名验证处理 + */ +public interface Validator { + + /*** + * @description 验证应答签名 + * @param response 响应结果 + * @return: boolean 校验结果 + */ + boolean validate(CloseableHttpResponse response) throws IOException; + + /*** + * @description 验证通知请求签名 + * @param notifyRequest 响应结果 + * @return: boolean 校验结果 + */ + boolean validateNotify(NotifyRequest notifyRequest); +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Verifier.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Verifier.java new file mode 100644 index 0000000..eada15e --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/Verifier.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx; + +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.Sign; +import cn.hutool.crypto.asymmetric.SignAlgorithm; +import org.apache.commons.codec.binary.Base64; + +/** + * @ClassName Verifier.java + * @Description 验签解密者 + */ +public interface Verifier { + + boolean verify(byte[] data,byte[] signature); + + +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeCredentials.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeCredentials.java new file mode 100644 index 0000000..7b3ae8e --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeCredentials.java @@ -0,0 +1,49 @@ +package com.itheima.sfbx.auth; + +import com.itheima.sfbx.Credentials; +import com.itheima.sfbx.Signer; +import com.itheima.sfbx.utils.ClientUtils; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.binary.Base64; +import org.apache.http.client.methods.HttpRequestWrapper; + +import java.io.IOException; + +/** + * @ClassName BoleeCredentials.java + * @Description 认证凭证创建处理实现 + */ +@Slf4j +public class BoleeCredentials implements Credentials { + + //应用id + protected final String appId; + + //签名者 + protected final Signer signer; + + public BoleeCredentials(String appId, Signer signer) { + this.appId = appId; + this.signer = signer; + } + + @Override + public String createCredentials(HttpRequestWrapper request) throws IOException { + //临时字符串 + String nonceStr = ClientUtils.generateNonceStr(); + //时间戳 + long timestamp = ClientUtils.generateTimestamp(); + //请求数据 + String message = ClientUtils.requestMessage(nonceStr, timestamp, request); + log.debug("authorization data:{}", message); + //生成签名字符串 + String signature = signer.sign(Base64.decodeBase64(message)); + //返回认证令牌对象 + String credentials = "appId=\"" + this.appId + "\"," + + "nonce_str=\"" + nonceStr + "\"," + + "timestamp=\"" + timestamp + "\"," + + "signature=\"" + signature + "\""; + log.debug("authorization credentials=[{}]", credentials); + return credentials; + } +} \ No newline at end of file diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeEncryptor.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeEncryptor.java new file mode 100644 index 0000000..262ccc5 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeEncryptor.java @@ -0,0 +1,59 @@ +package com.itheima.sfbx.auth; + +import cn.hutool.crypto.Mode; +import cn.hutool.crypto.Padding; +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.crypto.symmetric.AES; +import com.itheima.sfbx.Encryptor; +import com.itheima.sfbx.constants.BoleeSecurityConstant; +import com.itheima.sfbx.dto.EncodeDTO; +import com.itheima.sfbx.utils.ClientUtils; +import com.itheima.sfbx.utils.SecurityUtil; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.binary.Base64; +import org.apache.http.client.methods.HttpRequestWrapper; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +/** + * BoleeEncryptor + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Slf4j +public class BoleeEncryptor implements Encryptor { + + //私钥签名 + protected String privateKeyBase64; + + + public BoleeEncryptor(String privateKey) { + this.privateKeyBase64 = privateKey; + } + + /** + * 对数据进行加密 + * @param body 请求消息体 + * @return + * @throws IOException + */ + @Override + public boolean encode(EncodeDTO body){ + //获取AES加密秘钥 + String bodySecurity = ClientUtils.generateNonceStr(); + //使用AES加密 body体里的数据 + String aesSecurity = SecurityUtil.encryptFromStringAES(body.getBody(), Mode.CBC, Padding.ZeroPadding,bodySecurity); + body.setEncodeBody(aesSecurity); + //使用RSA加密AES的对称加密秘钥 + RSA rsa = new RSA(privateKeyBase64, null); + String securityToken = SecurityUtil.encryptFromStringRSAPrivateKey(rsa, bodySecurity); + body.setHeadAESSecurityKey(securityToken); + //将新生产的AES的body返回 + return true; + } +} \ No newline at end of file diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeValidator.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeValidator.java new file mode 100644 index 0000000..be833c6 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/BoleeValidator.java @@ -0,0 +1,48 @@ +package com.itheima.sfbx.auth; + +import com.itheima.sfbx.Validator; +import com.itheima.sfbx.Verifier; +import com.itheima.sfbx.notify.NotifyRequest; +import com.itheima.sfbx.utils.ClientUtils; +import org.apache.commons.codec.binary.Base64; +import org.apache.http.client.methods.CloseableHttpResponse; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +/** + * @ClassName BoleeValidator.java + * @Description 签名验证处理实现 + */ +public class BoleeValidator implements Validator { + + protected final Verifier verifier; + + public BoleeValidator(Verifier verifier) { + this.verifier = verifier; + } + + @Override + public boolean validate(CloseableHttpResponse response) throws IOException { + //校验请求参数 + ClientUtils.validateParameters(response); + //构建响应体信息 + String message = ClientUtils.responseMessage(response); + //获得签名信息 + String signature = response.getFirstHeader("signature").getValue(); + //验证签名 + return verifier.verify(message.getBytes(StandardCharsets.UTF_8), Base64.decodeBase64(signature)); + } + + @Override + public boolean validateNotify(NotifyRequest notifyRequest) { + //校验请求参数 + ClientUtils.validateParametersNotify(notifyRequest); + //构建响应体信息 + String message = ClientUtils.notifyMessage(notifyRequest); + //获得签名信息 + String signature = notifyRequest.getSignature(); + //验证签名 + return verifier.verify(message.getBytes(StandardCharsets.UTF_8), Base64.decodeBase64(signature)); + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PrivateKeySigner.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PrivateKeySigner.java new file mode 100644 index 0000000..bc041cb --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PrivateKeySigner.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.auth; + +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.Sign; +import cn.hutool.crypto.asymmetric.SignAlgorithm; +import com.itheima.sfbx.Signer; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.codec.binary.Base64; + +/** + * @ClassName PrivateKeySigner.java + * @Description TODO + */ +@Slf4j +public class PrivateKeySigner implements Signer { + + protected final String privateKey; + + public PrivateKeySigner(String privateKey) { + this.privateKey = privateKey; + } + + + @Override + public String sign(byte[] message) { + Sign sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA,Base64.decodeBase64(privateKey),null); + return Base64.encodeBase64String(sign.sign(message)); + } +} \ No newline at end of file diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PublicKeyVerifier.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PublicKeyVerifier.java new file mode 100644 index 0000000..62ca569 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/auth/PublicKeyVerifier.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.auth; + +import cn.hutool.crypto.SecureUtil; +import cn.hutool.crypto.asymmetric.Sign; +import cn.hutool.crypto.asymmetric.SignAlgorithm; +import com.itheima.sfbx.Verifier; +import org.apache.commons.codec.binary.Base64; + +/** + * @ClassName PublicKeyVerifier.java + * @Description 公钥验证 + */ +public class PublicKeyVerifier implements Verifier { + + protected final String publicKey; + + public PublicKeyVerifier(String publicKey) { + this.publicKey = publicKey; + } + + @Override + public boolean verify(byte[] data,byte[] signature){ + Sign sign = SecureUtil.sign(SignAlgorithm.SHA256withRSA,null, Base64.decodeBase64(publicKey)); + return sign.verify(data,signature); + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/config/SecurityConfig.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/config/SecurityConfig.java new file mode 100644 index 0000000..13efd1f --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/config/SecurityConfig.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * SecurityConfig + * + * @author: wgl + * @describe: 客户端秘钥配置 + * @date: 2022/12/28 10:10 + */ +@ConfigurationProperties(prefix = "itheima.security") +@Data +public class SecurityConfig { + + /** + * 客户appId + */ + @Value("${itheima.security.client.appid}") + private String appId; + + /** + * 客户端私钥 + */ + @Value("${itheima.security.client.privateKey}") + private String privateKey; + + + /** + * 服务端公钥 + */ + @Value("${itheima.security.server.publicKey}") + private String publicKey; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/constants/BoleeSecurityConstant.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/constants/BoleeSecurityConstant.java new file mode 100644 index 0000000..5b98f1c --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/constants/BoleeSecurityConstant.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.constants; + +/** + * BoleeSecurityConstant + * + * @author: wgl + * @describe: 宝乐保险秘钥常量 + * @date: 2022/12/28 10:10 + */ +public class BoleeSecurityConstant { + + /** + * 宝乐保险中body体中的信息 + */ + public static String HEAD_NAME_BODY_KEY = "bolee_security_key"; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/CredentialsDTO.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/CredentialsDTO.java new file mode 100644 index 0000000..79076cb --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/CredentialsDTO.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.dto; + +import lombok.Data; + +/** + * RequestParamDTO + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Data +public class CredentialsDTO { + + /** + * 请求方式 + */ + private String methodd; + + /** + * 接口路径 + */ + private String uriPath; + + /** + * 时间戳 + */ + private String timestamp; + + /** + * 签名数据 + */ + private String signature; + + /** + * 密文数据 + */ + private String securityBody; + + /** + * 随机字符串 + */ + private String nonce; + + + + /** + * 构建签名字符串 + * return request.getRequestLine().getMethod() + "\n" + * + canonicalUrl + "\n" + * + timestamp + "\n" + * + nonce + "\n" + * + body + "\n"; + * @return + */ + public String buildSignBody(){ + StringBuilder sb = new StringBuilder(); + sb.append(methodd + "\n"); + sb.append(uriPath + "\n"); + sb.append(timestamp + "\n"); + sb.append(nonce + "\n"); + sb.append(securityBody + "\n"); + return sb.toString(); + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/EncodeDTO.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/EncodeDTO.java new file mode 100644 index 0000000..586d001 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/EncodeDTO.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.dto; + +import lombok.Data; + +/** + * EncodeDTO + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Data +public class EncodeDTO { + + /** + * 原始body参数 + */ + private String body; + + /** + * 加密后的密文 + */ + private String encodeBody; + + /** + * head中rsa加密后的aes密钥 + */ + private String headAESSecurityKey; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/ResponseDTO.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/ResponseDTO.java new file mode 100644 index 0000000..1c7da93 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/dto/ResponseDTO.java @@ -0,0 +1,22 @@ +package com.itheima.sfbx.dto; + +import lombok.Data; + +import java.util.Map; + +/** + * ResponseDTO + * + * @author: wgl + * @describe: 返回结果对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class ResponseDTO { + + private String msg; + + private String code; + + private Map data; +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifiyHandler.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifiyHandler.java new file mode 100644 index 0000000..a5bcec5 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifiyHandler.java @@ -0,0 +1,64 @@ +package com.itheima.sfbx.notify; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.ObjectReader; +import com.itheima.sfbx.Validator; +import com.itheima.sfbx.Verifier; +import com.itheima.sfbx.auth.BoleeValidator; +import com.itheima.sfbx.auth.PublicKeyVerifier; + +import java.io.IOException; + +/** + * @ClassName NotifiyHandler.java + * @Description 通知验证及解析出来 + */ +public class NotifiyHandler { + + //校验者 + private Validator validator; + + private static final ObjectMapper objectMapper = new ObjectMapper(); + + public NotifiyHandler(String publicKey) { + this.validator = new BoleeValidator(new PublicKeyVerifier(publicKey)); + } + + /** + * 解析通知请求结果 + * @param notifyRequest 微信支付通知请求 + * @return 微信支付通知报文解密结果@StreamListener(FileSink.FILE_INPUT) + * public void onMessage(@Payload MqMessage message, + * @Header(AmqpHeaders.CHANNEL) Channel channel, + * @Header(AmqpHeaders.DELIVERY_TAG) Long deliveryTag) throws IOException { + * String jsonConten = message.getcontent(); + * log.info("[onMessage][线程编号:{} 消息内容:{}]", Thread.currentThread().getId(), message); + * FileVO fileVO= JSONObject.parseObject(jsonConten,FileVO.class); + * Boolean responseWrap = fileBusinessFeign.clearFileById(fileVO.getId()); + * channel.basicAck(deliveryTag,false); + * + * } + */ + public NotifyResponse parse(NotifyRequest notifyRequest) throws IOException { + // 验签 + boolean validate = validator.validateNotify(notifyRequest); + if (!validate){ + throw new RuntimeException("验证签名失败"); + } + // 解析请求体 + return parseBody(notifyRequest.getBody()); + } + + /** + * 解析请求体 + * + * @param body 请求体 + * @return 解析结果 + * @throws IOException 解析body失败 + */ + private NotifyResponse parseBody(String body) throws IOException { + ObjectReader objectReader = objectMapper.reader(); + NotifyResponse notifyResponse = objectReader.readValue(body, NotifyResponse.class); + return notifyResponse; + } +} \ No newline at end of file diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyRequest.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyRequest.java new file mode 100644 index 0000000..65276cf --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyRequest.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.notify; + +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * @ClassName NotificationRequest.java + * @Description 通知请求对象 + */ +@Data +@NoArgsConstructor +public class NotifyRequest { + + //时间戳 + private String timestamp; + //随机字符串 + private String nonce; + //签名 + private String signature; + //请求体 + private String body; + + @Builder + public NotifyRequest(String timestamp, String nonce, String signature, String body) { + this.timestamp = timestamp; + this.nonce = nonce; + this.signature = signature; + this.body = body; + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyResponse.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyResponse.java new file mode 100644 index 0000000..0f5dcec --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/notify/NotifyResponse.java @@ -0,0 +1,117 @@ +package com.itheima.sfbx.notify; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * @ClassName NotifyResponse.java + * @Description TODO + */ +@JsonIgnoreProperties(ignoreUnknown = true) +public class NotifyResponse { + + @JsonProperty("id") + private String id; + @JsonProperty("create_time") + private String createTime; + @JsonProperty("event_type") + private String eventType; + @JsonProperty("resource_type") + private String resourceType; + @JsonProperty("summary") + private String summary; + @JsonProperty("") + private Resource resource; + private String decryptData; + + @Override + public String toString() { + return "Notification{" + + "id='" + id + '\'' + + ", createTime='" + createTime + '\'' + + ", eventType='" + eventType + '\'' + + ", resourceType='" + resourceType + '\'' + + ", decryptData='" + decryptData + '\'' + + ", summary='" + summary + '\'' + + ", resource=" + resource + + '}'; + } + + public String getId() { + return id; + } + + public String getCreateTime() { + return createTime; + } + + public String getEventType() { + return eventType; + } + + public String getDecryptData() { + return decryptData; + } + + public String getSummary() { + return summary; + } + + public String getResourceType() { + return resourceType; + } + + public Resource getResource() { + return resource; + } + + public void setDecryptData(String decryptData) { + this.decryptData = decryptData; + } + + @JsonIgnoreProperties(ignoreUnknown = true) + public class Resource { + + @JsonProperty("algorithm") + private String algorithm; + @JsonProperty("ciphertext") + private String ciphertext; + @JsonProperty("associated_data") + private String associatedData; + @JsonProperty("nonce") + private String nonce; + @JsonProperty("original_type") + private String originalType; + + public String getAlgorithm() { + return algorithm; + } + + public String getCiphertext() { + return ciphertext; + } + + public String getAssociatedData() { + return associatedData; + } + + public String getNonce() { + return nonce; + } + + public String getOriginalType() { + return originalType; + } + + @Override + public String toString() { + return "Resource{" + + "algorithm='" + algorithm + '\'' + + ", ciphertext='" + ciphertext + '\'' + + ", associatedData='" + associatedData + '\'' + + ", nonce='" + nonce + '\'' + + ", originalType='" + originalType + '\'' + + '}'; + } + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/ClientUtils.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/ClientUtils.java new file mode 100644 index 0000000..f52662c --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/ClientUtils.java @@ -0,0 +1,153 @@ +package com.itheima.sfbx.utils; + +import com.itheima.sfbx.notify.NotifyRequest; +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.HttpEntityEnclosingRequest; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpRequestWrapper; +import org.apache.http.util.EntityUtils; + +import java.io.IOException; +import java.net.URI; +import java.nio.charset.StandardCharsets; +import java.security.SecureRandom; +import java.time.DateTimeException; +import java.time.Duration; +import java.time.Instant; + +/** + * @ClassName ClientUtils.java + * @Description 客户端工具类 + */ +public class ClientUtils { + + //随机字符串处理 + protected static final String SYMBOLS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; + //随机函数 + protected static final SecureRandom RANDOM = new SecureRandom(); + + /*** + * @description 时间戳创建 + * @return: long 返回时间戳 + */ + public static long generateTimestamp() { + + return System.currentTimeMillis() / 1000; + } + + /*** + * @description 随机字符串 + * @return: java.lang.String 字符串 + */ + public static String generateNonceStr() { + char[] nonceChars = new char[16]; + for (int index = 0; index < nonceChars.length; ++index) { + nonceChars[index] = SYMBOLS.charAt(RANDOM.nextInt(SYMBOLS.length())); + } + return new String(nonceChars); + } + + /*** + * @description 构建请求信息: 请求方式+请求路径+请求时间戳+随机字符串+请求体 + * @param nonce 随机字符串 + * @param timestamp 时间戳 + * @param request 请求对象 + * @return: java.lang.String 请求信息 + */ + public static String requestMessage(String nonce, long timestamp, HttpRequestWrapper request) throws IOException { + URI uri = request.getURI(); + String canonicalUrl = uri.getRawPath(); + if (uri.getQuery() != null) { + canonicalUrl += "?" + uri.getRawQuery(); + } + String body = EntityUtils.toString(((HttpEntityEnclosingRequest) request).getEntity(), StandardCharsets.UTF_8); + return request.getRequestLine().getMethod() + "\n" + + canonicalUrl + "\n" + + timestamp + "\n" + + nonce + "\n" + + body + "\n"; + } + + /*** + * @description 检测应答参数 + * @param response 应答对象 + */ + public static final void validateParameters(CloseableHttpResponse response) { + //返回头中存在的内容:签名字符串,随机字符串,时间戳 + String[] headers = {"signature","nonce_str","timestamp"}; + Header header = null; + for (String headerName : headers) { + header = response.getFirstHeader(headerName); + if (header == null) { + throw new RuntimeException("验证返回参数"+headerName+"不全"); + } + } + //获得最后时间戳,判断应答时间戳到当前时间超过5分钟则认为应答失败 + String timestampStr = header.getValue(); + try { + Instant responseTime = Instant.ofEpochSecond(Long.parseLong(timestampStr)); + // 拒绝过期应答 + if (Duration.between(responseTime, Instant.now()).abs().toMinutes() >= 5) { + throw new RuntimeException("应答超时"); + } + } catch (DateTimeException | NumberFormatException e) { + throw new RuntimeException("应答时间处理异常"); + } + } + + /*** + * @description 构建应答信息 + * @param response 应答结果 + * @return: java.lang.String 应答信息 + */ + public static String responseMessage(CloseableHttpResponse response) throws IOException { + String timestamp = response.getFirstHeader("timestamp").getValue(); + String nonce = response.getFirstHeader("nonce_str").getValue(); + HttpEntity entity = response.getEntity(); + String body = (entity != null && entity.isRepeatable()) ? EntityUtils.toString(entity) : "";; + return timestamp + "\n" + + nonce + "\n" + + body + "\n"; + } + + /*** + * @description 构建notify信息 + * @param notifyRequest 推送请求结果 + * @return: java.lang.String 应答信息 + */ + public static String notifyMessage(NotifyRequest notifyRequest) { + String timestamp = notifyRequest.getTimestamp(); + String nonce = notifyRequest.getNonce(); + String body = notifyRequest.getBody(); + return timestamp + "\n" + + nonce + "\n" + + body + "\n"; + } + + public static void validateParametersNotify(NotifyRequest notifyRequest) { + //请求中必须存在的内容:签名字符串,随机字符串,时间戳 + String signature = notifyRequest.getSignature(); + if (signature==null){ + throw new RuntimeException("签名字符串为空"); + } + String nonce = notifyRequest.getNonce(); + if (nonce==null){ + throw new RuntimeException("随机字符串为空"); + } + String timestamp = notifyRequest.getTimestamp(); + if (timestamp==null){ + throw new RuntimeException("时间戳为空"); + } + //获得最后时间戳,判断应答时间戳到当前时间超过5分钟则认为应答失败 + try { + Instant responseTime = Instant.ofEpochSecond(Long.parseLong(timestamp)); + // 拒绝过期应答 + if (Duration.between(responseTime, Instant.now()).abs().toMinutes() >= 5) { + throw new RuntimeException("应答超时"); + } + } catch (DateTimeException | NumberFormatException e) { + throw new RuntimeException("应答时间处理异常"); + } + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/SecurityUtil.java b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/SecurityUtil.java new file mode 100644 index 0000000..e49d855 --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/java/com/itheima/sfbx/utils/SecurityUtil.java @@ -0,0 +1,123 @@ +package com.itheima.sfbx.utils; + +import cn.hutool.core.util.CharsetUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.crypto.Mode; +import cn.hutool.crypto.Padding; +import cn.hutool.crypto.asymmetric.KeyType; +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.crypto.symmetric.AES; +import org.apache.commons.codec.binary.Base64; + +import javax.crypto.spec.IvParameterSpec; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; + +/** + * @ClassName SymmetricCryptoUtil.java + * @Description TODO + */ +public class SecurityUtil { + + /** + * 16字节 + */ + private static final String ENCODE_KEY = "1234567812345678"; + private static final String IV_KEY = "0000000000000000"; + + public static void main(String[] args) { + String password = "zdm321123."; + String encryptData = encryptFromStringAES(password, Mode.CBC, Padding.ZeroPadding); + System.out.println("AES加密:" + encryptData); + String decryptData = decryptFromStringAES(encryptData, Mode.CBC, Padding.ZeroPadding); + System.out.println("AES解密:" + decryptData); + RSA rsa = new RSA(); + encryptData = encryptFromStringRSA(rsa,password); + System.out.println("RSA加密:"+encryptData); + System.out.println("================用于网络传输==========="); + decryptData = decryptFromStringRSA(rsa,encryptData); + //解密内容生成字符串 + System.out.println("RSA解密:" + decryptData); + + } + + public static String encryptFromStringAES(String data, Mode mode, Padding padding) { + AES aes; + if (Mode.CBC == mode) { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES"), + new IvParameterSpec(IV_KEY.getBytes())); + } else { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES")); + } + return aes.encryptBase64(data, StandardCharsets.UTF_8); + } + + public static String encryptFromStringAES(String data, Mode mode, Padding padding,String securityKey) { + AES aes; + if (Mode.CBC == mode) { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES"), + new IvParameterSpec(securityKey.getBytes())); + } else { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES")); + } + return aes.encryptBase64(data, StandardCharsets.UTF_8); + } + + public static String encryptFromStringRSA(RSA rsa,String password) { + //byte[]内容加密 + byte[] encrypt = rsa.encrypt(StrUtil.bytes(password, CharsetUtil.CHARSET_UTF_8), KeyType.PublicKey); + //加密后base64处理用于网络传输 + return Base64.encodeBase64String(encrypt); + } + + public static String encryptFromStringRSAPrivateKey(RSA rsa,String password) { + //byte[]内容加密 + byte[] encrypt = rsa.encrypt(StrUtil.bytes(password, CharsetUtil.CHARSET_UTF_8), KeyType.PrivateKey); + //加密后base64处理用于网络传输 + return Base64.encodeBase64String(encrypt); + } + + public static String decryptFromStringAES(String data, Mode mode, Padding padding) { + AES aes; + if (Mode.CBC == mode) { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES"), + new IvParameterSpec(IV_KEY.getBytes())); + } else { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES")); + } + byte[] decryptDataBase64 = aes.decrypt(data); + return new String(decryptDataBase64, StandardCharsets.UTF_8); + } + + public static String decryptFromStringAES(String data, Mode mode, Padding padding,String aesKey) { + AES aes; + if (Mode.CBC == mode) { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES"), + new IvParameterSpec(aesKey.getBytes())); + } else { + aes = new AES(mode, padding, + new SecretKeySpec(ENCODE_KEY.getBytes(), "AES")); + } + byte[] decryptDataBase64 = aes.decrypt(data); + return new String(decryptDataBase64, StandardCharsets.UTF_8); + } + + public static String decryptFromStringRSA(RSA rsa, String encryptData) { + //对byte数组进行解密 + byte[] decrypt = rsa.decrypt(Base64.decodeBase64(encryptData), KeyType.PrivateKey); + return new String(decrypt, StandardCharsets.UTF_8); + } + + public static String decryptFromStringRSAPublicKey(RSA rsa, String encryptData) { + //对byte数组进行解密 + byte[] decrypt = rsa.decrypt(Base64.decodeBase64(encryptData), KeyType.PublicKey); + return new String(decrypt, StandardCharsets.UTF_8); + } +} diff --git a/day02/sfbx-apache-httpclient/src/main/resources/META-INF/spring.factories b/day02/sfbx-apache-httpclient/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..16a165a --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itheima.sfbx.config.SecurityConfig \ No newline at end of file diff --git a/day02/sfbx-apache-httpclient/src/test/java/com/itheima/sfbx/BoleeHttpClientTest.java b/day02/sfbx-apache-httpclient/src/test/java/com/itheima/sfbx/BoleeHttpClientTest.java new file mode 100644 index 0000000..13009bb --- /dev/null +++ b/day02/sfbx-apache-httpclient/src/test/java/com/itheima/sfbx/BoleeHttpClientTest.java @@ -0,0 +1,104 @@ +package com.itheima.sfbx; + +import cn.hutool.crypto.asymmetric.RSA; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.auth.BoleeEncryptor; +import com.itheima.sfbx.auth.PrivateKeySigner; +import com.itheima.sfbx.auth.PublicKeyVerifier; +import com.itheima.sfbx.constants.BoleeSecurityConstant; +import com.itheima.sfbx.dto.EncodeDTO; +import org.apache.commons.codec.binary.Base64; +import org.apache.http.HttpEntity; +import org.apache.http.client.config.RequestConfig; +import org.apache.http.client.methods.CloseableHttpResponse; +import org.apache.http.client.methods.HttpPost; +import org.apache.http.client.utils.URIBuilder; +import org.apache.http.entity.StringEntity; +import org.apache.http.impl.client.CloseableHttpClient; +import org.apache.http.util.EntityUtils; +import org.junit.Test; + +import java.io.IOException; +import java.net.URI; +import java.net.URISyntaxException; +import java.security.PrivateKey; +import java.security.PublicKey; +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName BoleeHttpClientTest.java + * @Description TODO + */ +public class BoleeHttpClientTest { + + private static String privateKeyBase64 = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAILdGdmrbwdn0tkD5I1RYB/whGEUsAOYprsy/F0cCdRFcUfNT6Q4BcErwcJAmdXPDuSYSbPsImKA0EbLN+pGh/wwlrYtBueItE4zGV2GdMNhAU3P6CquIAm5H58UFeDmVEUnE81laylXjaiaZduXBVTiLgTPVcpSxus70ZJQQirBAgMBAAECgYAg0sBHHn7MxrfWAunyoDSSDkvF5eB4JnO7hIBUAlJc0cYmElMlh3+6AfWpeXaccED2CVSDMnk1Z8XV2+b8dhBpTo3IHG+IQwZvz89bfMcwhhpRT9eXpC5YkG5UHlh11Ftm7byAo7s0HG/JynquxWZDRifWnvrA2bYE2sk6oN2zuQJBAMxlxcDDcSIdsZbXH7zTFJ6c0WEYlsXndRJhT1OfmxzwNitN+8PicbyJh6GfDcM+PR+13rqGZ4x+yGyKSjsp9XMCQQCj5tRLINjRUcNalPrJnvvUMhlJ0yrxsKReX81L1lwDXjbFpcMsy9eZddgdLjGXRgH7K9tYmLGZ6hflRGTcbrH7AkEAt/HDFOYOU1iLsKbrDgCcJt4T5CC/11ykVCU0wZn6ewGGjlRBBhksqDLQ19ePCC1jzrzas9wvJhYXAu81PKdXFwJAUftq4u1aJlFcgtmUG/efBUPN7GRozZ3Kib4nxTBCtBiTEwfX+Xc4r3UHlYj+mykUYptMSyONamxyaWZtgOkJswJBAMLjyUR61F4UPjoyGGg5G4eRTM3fJ1w7ulHYYxlEy5u2UAC/jBtd07wv030lsqPSA7abTdK+6iNM2v0gA7KODKk="; + + private static String publicKeyBase64 = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCC3RnZq28HZ9LZA+SNUWAf8IRhFLADmKa7MvxdHAnURXFHzU+kOAXBK8HCQJnVzw7kmEmz7CJigNBGyzfqRof8MJa2LQbniLROMxldhnTDYQFNz+gqriAJuR+fFBXg5lRFJxPNZWspV42ommXblwVU4i4Ez1XKUsbrO9GSUEIqwQIDAQAB"; + + @Test + public void testTemplate() throws URISyntaxException, IOException { + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost("localhost:8080") + .setPath("/insure"); + RequestTemplate requestTemplate = RequestTemplate.builder() + .appId("10001") + .privateKey(privateKeyBase64) + .publicKey(publicKeyBase64) + .uriBuilder(urlBuilder) + .build(); + Map params = new HashMap<>(); + params.put("name","张三"); + params.put("age","18"); + params.put("sex","男"); + Map map = requestTemplate.doRequest(params, Map.class); + System.out.println(map); + } + + + + + @Test + public void BoleeHttpClientBuilderTest(){ + CloseableHttpClient httpclient = BoleeHttpClientBuilder.create() + .withCredentials("10001", privateKeyBase64) + .withValidator(publicKeyBase64) + .build(); + //=============基础配置=================== + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost("localhost:8080") + .setPath("/insure"); + RequestConfig requestConfig = RequestConfig.custom() + .setSocketTimeout(1000) + .setConnectTimeout(1000) + .build(); + try { + URI url = urlBuilder.build(); + HttpPost httpPost = new HttpPost(url); + httpPost.setConfig(requestConfig); + EncodeDTO encodeDTO = new EncodeDTO(); + JSONObject body = JSONUtil.parseObj(new HashMap<>() { + { + put("age", 19); + } + }); + encodeDTO.setBody(body.toString()); + if(new BoleeEncryptor(privateKeyBase64).encode(encodeDTO)){ + StringEntity stringEntity = new StringEntity(encodeDTO.getEncodeBody(), "utf-8"); + httpPost.setEntity(stringEntity); + httpPost.addHeader(BoleeSecurityConstant.HEAD_NAME_BODY_KEY,encodeDTO.getHeadAESSecurityKey()); + httpPost.addHeader("Content-Type","application/json;charset=utf-8"); + CloseableHttpResponse apiRes = httpclient.execute(httpPost); + HttpEntity entity = apiRes.getEntity(); + String content = EntityUtils.toString(entity); + System.out.println("接收到了返回信息:"+content); + } + } catch (Exception e) { + e.printStackTrace(); + } + } + +} diff --git a/day02/sfbx-dict/dict-interface/pom.xml b/day02/sfbx-dict/dict-interface/pom.xml new file mode 100644 index 0000000..d117713 --- /dev/null +++ b/day02/sfbx-dict/dict-interface/pom.xml @@ -0,0 +1,23 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-dict + 2.0-SNAPSHOT + + + dict-interface + dict-interface + + http://www.example.com + + + + com.itheima.sfbx + framework-feign + + + diff --git a/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/config/DictFeignConfig.java b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/config/DictFeignConfig.java new file mode 100644 index 0000000..796ccbd --- /dev/null +++ b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/config/DictFeignConfig.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.dict.config; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName DictFeignConfig.java + * @Description feign的最优化配置 + */ +@Configuration +@EnableFeignClients(basePackages = "com.itheima.sfbx.dict") +public class DictFeignConfig { +} diff --git a/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeign.java b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeign.java new file mode 100644 index 0000000..d1068d5 --- /dev/null +++ b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeign.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.dict.feign; + +import com.itheima.sfbx.dict.hystrix.DataDictHystrix; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName DataDictFace.java + * @Description:数字字典feign接口类 + */ +@FeignClient(value = "dict-web",fallback = DataDictHystrix.class) +public interface DataDictFeign { + + /** + * @Description 根据parentKey获取value + * @return + */ + @PostMapping("data-dict-feign/parent-key/{parentKey}") + List findDataDictVOByParentKey(@PathVariable("parentKey") String parentKey); + + /** + * @Description 根据dataKey获取DataDictVO + * @return + */ + @PostMapping("data-dict-feign/data-key/{dataKey}") + DataDictVO findDataDictVOByDataKey(@PathVariable("dataKey") String dataKey) ; + + /** + * @Description 根据dataKey获取DataDictVO集合 + * @return + */ + @PostMapping("data-dict-feign/findValueByDataKeys") + List findValueByDataKeys(@RequestBody ArrayList dataKeys); + +} diff --git a/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeign.java b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeign.java new file mode 100644 index 0000000..99d72b6 --- /dev/null +++ b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeign.java @@ -0,0 +1,25 @@ +package com.itheima.sfbx.dict.feign; + +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +import java.util.List; + +/** + * @ClassName PlacesFeign.java + * @Description 地区feign服务 + */ +@FeignClient(value = "dict-web") +public interface PlacesFeign { + + /*** + * @description 查询下级 + * @param parentId 父层Id + * @return + */ + @PostMapping("places-fegin/{parentId}") + public List findPlacesVOListByParentId(@PathVariable("parentId") Long parentId); +} diff --git a/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/DataDictHystrix.java b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/DataDictHystrix.java new file mode 100644 index 0000000..e0e1475 --- /dev/null +++ b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/DataDictHystrix.java @@ -0,0 +1,32 @@ +package com.itheima.sfbx.dict.hystrix; + +import com.itheima.sfbx.dict.feign.DataDictFeign; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName DataDictHystrix.java + * @Description DataDictFeign的Hystrix处理 + */ +@Component +public class DataDictHystrix implements DataDictFeign { + + + @Override + public List findDataDictVOByParentKey(String parentKey) { + return null; + } + + @Override + public DataDictVO findDataDictVOByDataKey(String dataKey) { + return null; + } + + @Override + public List findValueByDataKeys(ArrayList dataKeys) { + return null; + } +} diff --git a/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/PlacesHystrix.java b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/PlacesHystrix.java new file mode 100644 index 0000000..40c1414 --- /dev/null +++ b/day02/sfbx-dict/dict-interface/src/main/java/com/itheima/sfbx/dict/hystrix/PlacesHystrix.java @@ -0,0 +1,20 @@ +package com.itheima.sfbx.dict.hystrix; + +import com.itheima.sfbx.dict.feign.PlacesFeign; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @ClassName PlacesHystrix.java + * @Description PlacesFeign的Hystrix + */ +@Component +public class PlacesHystrix implements PlacesFeign { + + @Override + public List findPlacesVOListByParentId(Long parentId) { + return null; + } +} diff --git a/day02/sfbx-dict/dict-web/Dockerfile b/day02/sfbx-dict/dict-web/Dockerfile new file mode 100644 index 0000000..450cf21 --- /dev/null +++ b/day02/sfbx-dict/dict-web/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /dict-web +ARG PACKAGE_PATH=./target/dict-web.jar +ADD ${PACKAGE_PATH:-./} dict-web.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m\ +-Dspring.profiles.active=test" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS dict-web.jar"] \ No newline at end of file diff --git a/day02/sfbx-dict/dict-web/pom.xml b/day02/sfbx-dict/dict-web/pom.xml new file mode 100644 index 0000000..2e1c5f0 --- /dev/null +++ b/day02/sfbx-dict/dict-web/pom.xml @@ -0,0 +1,97 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-dict + 2.0-SNAPSHOT + + + dict-web + + dict-web + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.itheima.sfbx + framework-web + + + + com.itheima.sfbx + framework-seata + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + + com.itheima.sfbx + framework-mybatis-plus + + + + com.itheima.sfbx + framework-task-executor + + + + com.itheima.sfbx + framework-redis + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + com.itheima.sfbx + framework-knife4j-web + + + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + dict-web + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/DictWebStart.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/DictWebStart.java new file mode 100644 index 0000000..bc3ac23 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/DictWebStart.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.dict; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +/** + * 后台管理中的 系统管理-数字字典 + */ +@SpringBootApplication(scanBasePackages = {"com.itheima.sfbx"}) +public class DictWebStart { + + public static void main(String[] args) { + SpringApplication.run(DictWebStart.class, args); + } +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeignController.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeignController.java new file mode 100644 index 0000000..b4d5d20 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/DataDictFeignController.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.dict.feign; + +import com.itheima.sfbx.dict.service.IDataDictService; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName DataDictController.java + * @Description 数字字典controller + */ +@Slf4j +@RestController +@RequestMapping("data-dict-feign") +@Api(tags = "数字字典feign") +public class DataDictFeignController { + + @Autowired + IDataDictService dataDictService; + + /** + * @Description 父项键查询 + * @return List + */ + @PostMapping("parent-key/{parentKey}") + @ApiOperation(value = "父项键查询",notes = "父项键查询") + @ApiImplicitParam(paramType = "path",name = "parentKey",value = "字典parentKey",example = "URGE_TYPE",dataType = "String") + List findDataDictVOByParentKey(@PathVariable("parentKey") String parentKey) { + return dataDictService.findDataDictVOByParentKey(parentKey); + } + + /** + * @Description 子项键查询 + * @return DataDictVO + */ + @PostMapping("data-key/{dataKey}") + @ApiOperation(value = "子项键查询",notes = "子项键查询") + @ApiImplicitParam(paramType = "path",name = "dataKey",value = "字典dataKey",example = "URGE_TYPE",dataType = "String") + DataDictVO findDataDictVOByDataKey(@PathVariable("dataKey")String dataKey){ + return dataDictService.findDataDictVOByDataKey(dataKey); + } + +} + diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeignController.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeignController.java new file mode 100644 index 0000000..e6e5860 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/feign/PlacesFeignController.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.dict.feign; + +import com.itheima.sfbx.dict.service.IPlacesService; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName PlacesFeignController.java + * @Description 地区controller + */ +@RestController +@RequestMapping("places-fgign") +@Api(tags = "地区fegin") +public class PlacesFeignController { + + @Autowired + IPlacesService placesService; + + /** + * @Description 保存字典数据 + * @return + */ + @PostMapping("{parentId}") + @ApiOperation(value = "地区下拉框",notes = "地区下拉框") + @ApiImplicitParam(name = "parentId",value = "父层id",required = true,dataType = "Long") + public List findPlacesVOListByParentId(@PathVariable("parentId") Long parentId) { + return placesService.findPlacesVOListByParentId(parentId); + } +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitDataDict.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitDataDict.java new file mode 100644 index 0000000..3c9a553 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitDataDict.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.dict.init; + +import com.itheima.sfbx.dict.service.IDataDictService; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.util.Set; +import java.util.Timer; +import java.util.TimerTask; + +/** + * @ClassName InitDataDict.java + * @Description 热加载数字字典 + */ +@Component +public class InitDataDict { + + @Autowired + IDataDictService dataDictService; + + @Async + @PostConstruct + public void initDataDict(){ + Timer timer = new Timer(); + timer.schedule(new InitTask(timer),10*1000); + } + + class InitTask extends TimerTask{ + + private Timer timer; + + private InitTask(Timer timer) { + this.timer= timer; + } + + @Override + public void run() { + //所有ParentKey的set集合 + Set parentKeyAll = dataDictService.findParentKeyAll(); + if (EmptyUtil.isNullOrEmpty(parentKeyAll)){ + return; + } + //初始化父亲目录下所有有效状态的数据 + parentKeyAll.forEach(n->{ + dataDictService.findDataDictVOByParentKey(n); + }); + //所有dataKey的set集合 + Set dataKeyAll = dataDictService.findDataKeyAll(); + if (EmptyUtil.isNullOrEmpty(parentKeyAll)){ + return; + } + //初始化datakey对应有效状态的数据 + dataKeyAll.forEach(n->{ + dataDictService.findDataDictVOByDataKey(n); + }); + } + } +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitPlaces.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitPlaces.java new file mode 100644 index 0000000..b221d18 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/init/InitPlaces.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.dict.init; + +import com.itheima.sfbx.dict.service.IPlacesService; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +import javax.annotation.PostConstruct; +import java.util.List; +import java.util.Timer; +import java.util.TimerTask; + +/** + * @ClassName InitPlaces.java + * @Description 热加载区域 + */ +@Component +public class InitPlaces { + + @Autowired + IPlacesService placesService; + + @Async + @PostConstruct + public void initPlaces(){ + Timer timer = new Timer(); + timer.schedule(new InitTask(timer),10*1000); + } + + class InitTask extends TimerTask { + + private Timer timer; + + private InitTask(Timer timer) { + this.timer= timer; + } + + @Override + public void run() { + //初始化省列表 + List provinces = placesService.findPlacesVOListByParentId(SuperConstant.CHINA_CODE); + if (EmptyUtil.isNullOrEmpty(provinces)){ + return; + } + //初始化市列表 + provinces.forEach(n->{ + List citys = placesService.findPlacesVOListByParentId(n.getId()); + if (EmptyUtil.isNullOrEmpty(citys)){ + return; + } + //初始化区列表 + citys.forEach(k->{ + placesService.findPlacesVOListByParentId(k.getId()); + }); + }); + } + } +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/DataDictMapper.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/DataDictMapper.java new file mode 100644 index 0000000..a96412f --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/DataDictMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.dict.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.itheima.sfbx.dict.pojo.DataDict; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:数据字典表Mapper接口 + */ +@Mapper +public interface DataDictMapper extends BaseMapper { + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/PlacesMapper.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/PlacesMapper.java new file mode 100644 index 0000000..70d120e --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/mapper/PlacesMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.dict.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.itheima.sfbx.dict.pojo.Places; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:地方表Mapper接口 + */ +@Mapper +public interface PlacesMapper extends BaseMapper { + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/DataDict.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/DataDict.java new file mode 100644 index 0000000..0cd679a --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/DataDict.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.dict.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:数据字典表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_data_dict") +@ApiModel(value="DataDict对象", description="数据字典表") +public class DataDict extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DataDict(Long id, String dataState, String parentKey, String dataKey, String dataValue, String discription) { + super(id, dataState); + this.parentKey = parentKey; + this.dataKey = dataKey; + this.dataValue = dataValue; + this.discription = discription; + } + + @ApiModelProperty(value = "父key") + private String parentKey; + + @ApiModelProperty(value = "数据字典KEY") + private String dataKey; + + @ApiModelProperty(value = "值") + private String dataValue; + + @ApiModelProperty(value = "描述") + private String discription; + + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/Places.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/Places.java new file mode 100644 index 0000000..282723f --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/pojo/Places.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.dict.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:地方表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_places") +@ApiModel(value="Places对象", description="地方表") +public class Places extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Places(Long id, String dataState, Long parentId, String cityName) { + super(id, dataState); + this.parentId = parentId; + this.cityName = cityName; + } + + @ApiModelProperty(value = "父ID") + private Long parentId; + + @ApiModelProperty(value = "名称") + private String cityName; + + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IDataDictService.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IDataDictService.java new file mode 100644 index 0000000..7e46e92 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IDataDictService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.dict.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.dict.pojo.DataDict; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; + +import java.util.List; +import java.util.Set; + +/** + * @Description:数据字典表 服务类 + */ +public interface IDataDictService extends IService { + + /*** + * @description 数据字典列表数据 + * + * @param dataDictVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + Page findDataDictVOPage(DataDictVO dataDictVO, int pageNum, int pageSize); + + /** + * @Description 检测key是否已经存在 + * @return + */ + Boolean checkByDataKey(String dataKey); + + /** + * @Description 保存字典数据 + * @return + */ + DataDictVO saveDataDict(DataDictVO dataDictVO) ; + + /** + * @Description 修改字典数据 + * @return + */ + DataDictVO updateDataDict(DataDictVO dataDictVO); + + /** + * @Description 根据dataKey获取value + * @return DataDictVO + */ + DataDictVO findDataDictVOByDataKey(String dataKey); + + /** + * @Description 获得所有不重复的ParentKey的set集合 + * @return Set + */ + Set findParentKeyAll(); + + /** + * @Description 获取父key下的数据 + * @return List + */ + List findDataDictVOByParentKey(String parentKey); + + /** + * @Description 获得所有不重复的DataKey的set集合 + * @return Set + */ + Set findDataKeyAll(); +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IPlacesService.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IPlacesService.java new file mode 100644 index 0000000..1baf0cb --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/IPlacesService.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.dict.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.dict.pojo.Places; +import com.itheima.sfbx.framework.commons.constant.dict.PlacesCacheConstant; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import org.springframework.cache.annotation.Cacheable; + +import java.util.List; + +/** + * @Description:地方表 服务类 + */ +public interface IPlacesService extends IService { + + /*** + * @description 查询下级 + * @param parentId + * @return: List + */ + List findPlacesVOListByParentId(Long parentId); + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/DataDictServiceImpl.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/DataDictServiceImpl.java new file mode 100644 index 0000000..6a91ab0 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/DataDictServiceImpl.java @@ -0,0 +1,191 @@ +package com.itheima.sfbx.dict.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.dict.mapper.DataDictMapper; +import com.itheima.sfbx.dict.pojo.DataDict; +import com.itheima.sfbx.dict.service.IDataDictService; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.dict.DataDictCacheConstant; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.enums.dict.DataDictEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * @Description:数据字典表 服务实现类 + */ +@Slf4j +@Service +public class DataDictServiceImpl extends ServiceImpl implements IDataDictService { + + /*** + * @description 构建多条件查询条件 + * @param dataDictVO 查询条件 + * @return 查询条件 + */ + private QueryWrapper queryWrapper(DataDictVO dataDictVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //多条件查询 + if (!EmptyUtil.isNullOrEmpty(dataDictVO.getDiscription())){ + queryWrapper.lambda().like(DataDict::getDiscription,dataDictVO.getDiscription()); + } + if (!EmptyUtil.isNullOrEmpty(dataDictVO.getParentKey())){ + queryWrapper.lambda().like(DataDict::getParentKey,dataDictVO.getParentKey()); + } + if (!EmptyUtil.isNullOrEmpty(dataDictVO.getDataKey())){ + queryWrapper.lambda().like(DataDict::getDataKey,dataDictVO.getDataKey()); + } + if (!EmptyUtil.isNullOrEmpty(dataDictVO.getDataValue())){ + queryWrapper.lambda().like(DataDict::getDataValue,dataDictVO.getDataValue()); + } + if (!EmptyUtil.isNullOrEmpty(dataDictVO.getDataState())){ + queryWrapper.lambda().eq(DataDict::getDataState,dataDictVO.getDataState()); + } + queryWrapper.lambda().orderByDesc(DataDict::getCreateTime).orderByAsc(DataDict::getDataKey); + return queryWrapper; + } + + @Override + @Cacheable(value = DataDictCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#dataDictVO.hashCode()") + public Page findDataDictVOPage(DataDictVO dataDictVO, int pageNum, int pageSize) { + try { + Page page = new Page<>(pageNum, pageSize); + QueryWrapper queryWrapper = this.queryWrapper(dataDictVO); + return BeanConv.toPage(page(page, queryWrapper),DataDictVO.class); + }catch (Exception e){ + log.error("查询数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.PAGE_FAIL); + } + + } + + @Override + public Boolean checkByDataKey(String dataKey) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DataDict::getDataKey,dataKey); + return !EmptyUtil.isNullOrEmpty(getOne(queryWrapper)); + }catch (Exception e){ + log.error("检查数字字典重复性异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.CHECK_FALL); + } + } + + @Override + @Caching( + evict={@CacheEvict(value = DataDictCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = DataDictCacheConstant.PARENT_KEY,key = "#dataDictVO.parentKey")}, + put={@CachePut(value = DataDictCacheConstant.DATA_KEY,key = "#dataDictVO.dataKey")}) + @Transactional + public DataDictVO saveDataDict(DataDictVO dataDictVO) { + try { + DataDict dataDict =BeanConv.toBean(dataDictVO,DataDict.class); + boolean flag = save(dataDict); + if (flag){ + return BeanConv.toBean(dataDict,DataDictVO.class); + }else { + log.error("数据字典保存异常!"); + throw new ProjectException(DataDictEnum.SAVE_FAIL); + } + }catch (Exception e){ + log.error("数据字典保存异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.SAVE_FAIL); + } + } + + @Override + @Caching( + evict={@CacheEvict(value = DataDictCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = DataDictCacheConstant.PARENT_KEY,key = "#dataDictVO.parentKey"), + @CacheEvict(value = DataDictCacheConstant.DATA_KEY,key = "#dataDictVO.dataKey")}) + @Transactional + public DataDictVO updateDataDict(DataDictVO dataDictVO) { + try { + DataDict dataDict = BeanConv.toBean(dataDictVO, DataDict.class); + DataDict dataDictTemp = getById(dataDictVO.getId()); + dataDict.setCreateBy(dataDictTemp.getCreateBy()); + dataDict.setCreateTime(dataDictTemp.getCreateTime()); + boolean flag = updateById(dataDict); + if (flag){ + return BeanConv.toBean(dataDict, DataDictVO.class); + }else { + log.error("修改数据字典列表异常!"); + throw new ProjectException(DataDictEnum.UPDATE_FAIL); + } + }catch (Exception e){ + log.error("修改数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.UPDATE_FAIL); + } + } + + @Override + public Set findParentKeyAll() { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DataDict::getDataState, SuperConstant.DATA_STATE_0); + List list = list(queryWrapper); + return EmptyUtil.isNullOrEmpty(list)?null:list.stream().map(DataDict::getParentKey).collect(Collectors.toSet()); + }catch (Exception e){ + log.error("查询数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.FIND_PARENTKEY_ALL); + } + } + + @Override + @Cacheable(value = DataDictCacheConstant.PARENT_KEY,key = "#parentKey") + public List findDataDictVOByParentKey(String parentKey) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DataDict::getParentKey,parentKey) + .eq(DataDict::getDataState, SuperConstant.DATA_STATE_0); + return BeanConv.toBeanList(list(queryWrapper),DataDictVO.class); + }catch (Exception e){ + log.error("查询数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.FIND_DATADICTVO_PARENTKEY); + } + + } + + @Override + public Set findDataKeyAll() { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DataDict::getDataState, SuperConstant.DATA_STATE_0); + List list = list(queryWrapper); + return EmptyUtil.isNullOrEmpty(list)?null:list.stream().map(DataDict::getDataKey).collect(Collectors.toSet()); + }catch (Exception e){ + log.error("查询数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.FIND_DATAKEY_ALL); + } + } + + @Override + @Cacheable(value = DataDictCacheConstant.DATA_KEY,key = "#dataKey") + public DataDictVO findDataDictVOByDataKey(String dataKey) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DataDict::getDataKey,dataKey) + .eq(DataDict::getDataState, SuperConstant.DATA_STATE_0); + return BeanConv.toBean(getOne(queryWrapper),DataDictVO.class); + }catch (Exception e){ + log.error("查询数据字典列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(DataDictEnum.FIND_DATADICTVO_DATAKEY); + } + } + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/PlacesServiceImpl.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/PlacesServiceImpl.java new file mode 100644 index 0000000..f87bf31 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/service/impl/PlacesServiceImpl.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.dict.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.dict.mapper.PlacesMapper; +import com.itheima.sfbx.dict.pojo.Places; +import com.itheima.sfbx.dict.service.IPlacesService; +import com.itheima.sfbx.framework.commons.constant.dict.PlacesCacheConstant; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import com.itheima.sfbx.framework.commons.enums.dict.PlacesEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Description:地方表 服务实现类 + */ +@Slf4j +@Service +public class PlacesServiceImpl extends ServiceImpl implements IPlacesService { + + @Override + @Cacheable(value = PlacesCacheConstant.LIST,key = "#parentId") + public List findPlacesVOListByParentId(Long parentId) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Places::getParentId,parentId); + return BeanConv.toBeanList(list(queryWrapper),PlacesVO.class); + }catch (Exception e){ + log.error("查询parentId下列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlacesEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/DataDictController.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/DataDictController.java new file mode 100644 index 0000000..379e5d2 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/DataDictController.java @@ -0,0 +1,115 @@ +package com.itheima.sfbx.dict.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.dict.service.IDataDictService; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName DataDictController.java + * @Description 数字字典controller + */ +@Slf4j +@RestController +@RequestMapping("data-dict") +@Api(tags = "数字字典") +public class DataDictController { + + @Autowired + IDataDictService dataDictService; + /*** + * @description 数据字典分页 + * @param dataDictVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "数据字典分页",notes = "数据字典分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "dataDictVO",value = "字典查询对象",required = false,dataType = "DataDictVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters ={"dataDictVO.parentKey","","dataDictVO.dataKey", + "dataDictVO.dataValue","dataDictVO.discription"} ) + ResponseResult> findDataDictVOPage( + @RequestBody DataDictVO dataDictVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page dataDictVOPage = dataDictService.findDataDictVOPage(dataDictVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(dataDictVOPage); + } + + /** + * @Description 保存字典数据 + * @return + */ + @PostMapping + @ApiOperation(value = "数字字典添加",notes = "数字字典添加") + @ApiImplicitParam(name = "dataDictVO",value = "字典信息",required = true,dataType = "DataDictVO") + @ApiOperationSupport(ignoreParameters ={"dataDictVO.id", "dataDictVO.updateTime", + "dataDictVO.createBy","dataDictVO.updateBy", "dataDictVO.creator"} ) + public ResponseResult saveDataDict(@RequestBody DataDictVO dataDictVO) { + DataDictVO dataDictVOResult = dataDictService.saveDataDict(dataDictVO); + return ResponseResultBuild.successBuild(dataDictVOResult); + } + + /** + * @Description 修改字典数据 + * @return + */ + @PatchMapping + @ApiOperation(value = "数字字典编辑",notes = "数字字典编辑") + @ApiImplicitParam(name = "dataDictVO",value = "字典信息",required = true,dataType = "DataDictVO") + @ApiOperationSupport(ignoreParameters ={"dataDictVO.updateTime", "dataDictVO.createBy", + "dataDictVO.updateBy", "dataDictVO.creator"}) + public ResponseResult updateDataDict(@RequestBody DataDictVO dataDictVO) { + DataDictVO dataDictVOResult = dataDictService.updateDataDict(dataDictVO); + return ResponseResultBuild.successBuild(dataDictVOResult); + } + + @PostMapping("data-state") + @ApiOperation(value = "数字字典状态编辑",notes = "数字字典状态编辑") + @ApiImplicitParam(name = "dataDictVO",value = "字典信息",required = true,dataType = "DataDictVO") + @ApiOperationSupport(ignoreParameters ={"dataDictVO.id", "dataDictVO.dataState"}) + ResponseResult updateDataDictEnableFlag(@RequestBody DataDictVO dataDictVO) { + DataDictVO dataDictVOResult = dataDictService.updateDataDict(dataDictVO); + return ResponseResultBuild.successBuild(dataDictVOResult); + } + + /** + * @Description 父项键查询 + * @return List + */ + @PostMapping("parent-key/{parentKey}") + @ApiOperation(value = "父项键查询",notes = "父项键查询") + @ApiImplicitParam(paramType = "path",name = "parentKey",value = "字典parentKey",example = "URGE_TYPE",dataType = "String") + ResponseResult> findDataDictVOByParentKey(@PathVariable("parentKey") String parentKey) { + return ResponseResultBuild.successBuild(dataDictService.findDataDictVOByParentKey(parentKey)); + } + + /** + * @Description 子项键查询 + * @return DataDictVO + */ + @PostMapping("data-key/{dataKey}") + @ApiOperation(value = "子项键查询",notes = "子项键查询") + @ApiImplicitParam(paramType = "path",name = "dataKey",value = "字典dataKey",example = "URGE_TYPE",dataType = "String") + ResponseResult findDataDictVOByDataKey(@PathVariable("dataKey")String dataKey){ + return ResponseResultBuild.successBuild(dataDictService.findDataDictVOByDataKey(dataKey)); + } + +} + diff --git a/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/PlacesController.java b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/PlacesController.java new file mode 100644 index 0000000..a9d8ebc --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/java/com/itheima/sfbx/dict/web/PlacesController.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.dict.web; + +import com.itheima.sfbx.dict.service.IPlacesService; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.dict.PlacesVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @ClassName PlacesFeignController.java + * @Description 地区controller + */ +@RestController +@RequestMapping("places") +@Api(tags = "地区") +public class PlacesController { + + @Autowired + IPlacesService placesService; + + /** + * @Description 保存字典数据 + * @return + */ + @PostMapping("{parentId}") + @ApiOperation(value = "地区下拉框",notes = "地区下拉框") + @ApiImplicitParam(name = "parentId",value = "父层id",required = true,dataType = "Long") + public ResponseResult> findPlacesVOListByParentId(@PathVariable("parentId") Long parentId) { + List placesVOList = placesService.findPlacesVOListByParentId(parentId); + return ResponseResultBuild.successBuild(placesVOList); + } +} diff --git a/day02/sfbx-dict/dict-web/src/main/resources/banner.txt b/day02/sfbx-dict/dict-web/src/main/resources/banner.txt new file mode 100644 index 0000000..065e5dd --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 献给可爱的传智人 :: diff --git a/day02/sfbx-dict/dict-web/src/main/resources/bootstrap-test.yml b/day02/sfbx-dict/dict-web/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..b24fabf --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/bootstrap-test.yml @@ -0,0 +1,53 @@ +#服务配置 +server: + #端口 + port: 7071 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: +# profiles: +# active: test + config: + activate: + on-profile: + - test + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: dict-web + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-dict/dict-web/src/main/resources/bootstrap.yml b/day02/sfbx-dict/dict-web/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..8282c38 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/bootstrap.yml @@ -0,0 +1,45 @@ +#服务配置 +server: + #端口 + port: 7071 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + profiles: + active: dev + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: dict-web + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-dict/dict-web/src/main/resources/generrator.properties b/day02/sfbx-dict/dict-web/src/main/resources/generrator.properties new file mode 100644 index 0000000..97a4659 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/generrator.properties @@ -0,0 +1,33 @@ +#\u6570\u636E\u5E93\u5730\u5740 +url=jdbc:mysql://192.168.12.129:3306/restkeeper-dict?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&tinyInt1isBit=false +#\u6570\u636E\u5E93\u8D26\u53F7 +userName=root +#\u6570\u636E\u5E93\u5BC6\u7801 +password=pass +#\u6B64\u5904\u4E3A\u672C\u9879\u76EEsrc\u6240\u5728\u8DEF\u5F84\uFF08\u4EE3\u7801\u751F\u6210\u5668\u8F93\u51FA\u8DEF\u5F84\uFF09 +serviceProjectPath=D:/easy-cloud/easy-dict/dict-web +#\u8BBE\u7F6E\u4F5C\u8005 +author=Admin +#\u81EA\u5B9A\u4E49\u5305\u8DEF\u5F84 +parent=com.itheima +#\u88C5\u4EE3\u7801\u7684\u6587\u4EF6\u5939\u540D +moduleName=project +#\u8BBE\u7F6E\u8868\u524D\u7F00\uFF0C\u4E0D\u8BBE\u7F6E\u5219\u9ED8\u8BA4\u65E0\u524D\u7F00 +tablePrefix =tab_ +#\u6570\u636E\u5E93\u8868\u540D(\u6B64\u5904\u5207\u4E0D\u53EF\u4E3A\u7A7A\uFF0C\u5982\u679C\u4E3A\u7A7A\uFF0C\u5219\u9ED8\u8BA4\u8BFB\u53D6\u6570\u636E\u5E93\u7684\u6240\u6709\u8868\u540D) +tableName=tab_data_dict,tab_places +#pojo\u7684\u8D85\u7C7B +SuperEntityClass = com.itheima.sfbx.framework.commons.basic.BasicPojo +#pojo\u7684\u8D85\u7C7B\u516C\u7528\u5B57\u6BB5 +superEntityColumns = id,created_time,updated_time,sharding_id,enable_flag +#\u751F\u6210\u7684\u5C42\u7EA7 +entity=true +entity.ftl.path=/templates/entity.java +mapper=true +mapper.ftl.path=/templates/mapper.java +service=false +service.ftl.path=/templates/service.java +serviceImp=false +serviceImp.ftl.path=/templates/serviceImpl.java +controller=false +controller.ftl.path=/templates/controller.java diff --git a/day02/sfbx-dict/dict-web/src/main/resources/logback.xml b/day02/sfbx-dict/dict-web/src/main/resources/logback.xml new file mode 100644 index 0000000..921bf78 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/dict-web-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/controller.java.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/controller.java.ftl new file mode 100644 index 0000000..2de776b --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/controller.java.ftl @@ -0,0 +1,34 @@ +package ${package.Controller}; + + +import org.springframework.web.bind.annotation.RequestMapping; + +<#if restControllerStyle> +import org.springframework.web.bind.annotation.RestController; +<#else> +import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> +import ${superControllerClassPackage}; + + +/** + * @Description:${table.comment!} 前端控制器 + */ +<#if restControllerStyle> +@RestController +<#else> +@Controller + +@RequestMapping("<#if package.ModuleName??>/${package.ModuleName}/<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> +class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> +<#if superControllerClass??> +public class ${table.controllerName} extends ${superControllerClass} { +<#else> +public class ${table.controllerName} { + + +} + diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/entity.java.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/entity.java.ftl new file mode 100644 index 0000000..3e63065 --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> +import ${pkg}; + +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +<#if superEntityClass??> +@EqualsAndHashCode(callSuper = true) + <#else> +@EqualsAndHashCode(callSuper = false) + + +<#if table.convert> +@TableName("${table.name}") + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> +public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> +public class ${entity} extends Model<${entity}> { +<#else> +public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + + + @Builder + public ${entity}(Long id,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.name}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.name}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.name}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.name}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.name}") + + <#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + + <#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if entityBuilderModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if entityBuilderModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.java.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.java.ftl new file mode 100644 index 0000000..b0fbe2d --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.java.ftl @@ -0,0 +1,15 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; + +/** + * @Description:${table.comment!}Mapper接口 + */ +<#if kotlin> +interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> +public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + +} + diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.xml.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..d9ca71c --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + +<#if enableCache> + + + + +<#if baseResultMap> + + +<#list table.fields as field> +<#if field.keyFlag><#--生成主键排在第一位--> + + + +<#list table.commonFields as field><#--生成公共字段 --> + + +<#list table.fields as field> +<#if !field.keyFlag><#--生成普通字段 --> + + + + + + +<#if baseColumnList> + + +<#list table.commonFields as field> + ${field.name}, + + ${table.fieldNames} + + + + diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/service.java.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/service.java.ftl new file mode 100644 index 0000000..590ce9c --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/service.java.ftl @@ -0,0 +1,15 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; + +/** + * @Description:${table.comment!} 服务类 + */ +<#if kotlin> +interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> +public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + +} + diff --git a/day02/sfbx-dict/dict-web/src/main/resources/templates/serviceImpl.java.ftl b/day02/sfbx-dict/dict-web/src/main/resources/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..5b2968b --- /dev/null +++ b/day02/sfbx-dict/dict-web/src/main/resources/templates/serviceImpl.java.ftl @@ -0,0 +1,21 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; + +/** + * @Description:${table.comment!} 服务实现类 + */ +@Service +<#if kotlin> +open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + +} +<#else> +public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + +} + diff --git a/day02/sfbx-dict/pom.xml b/day02/sfbx-dict/pom.xml new file mode 100644 index 0000000..dc39e20 --- /dev/null +++ b/day02/sfbx-dict/pom.xml @@ -0,0 +1,22 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-dict + pom + sfbx-dict + + dict-interface + dict-web + + + http://www.example.com + + diff --git a/day02/sfbx-file/file-interface/pom.xml b/day02/sfbx-file/file-interface/pom.xml new file mode 100644 index 0000000..83192c5 --- /dev/null +++ b/day02/sfbx-file/file-interface/pom.xml @@ -0,0 +1,23 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-file + 2.0-SNAPSHOT + + + file-interface + file-interface + + http://www.example.com + + + + com.itheima.sfbx + framework-feign + + + diff --git a/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/config/FileFeignConfig.java b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/config/FileFeignConfig.java new file mode 100644 index 0000000..f99b8fd --- /dev/null +++ b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/config/FileFeignConfig.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.file.config; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName DictFenginConfig.java + * @Description feign的最优化配置 + */ +@EnableFeignClients(basePackages = "com.itheima.sfbx.file.feign") +@Configuration +public class FileFeignConfig { +} diff --git a/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileBusinessFeign.java b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileBusinessFeign.java new file mode 100644 index 0000000..bed9a27 --- /dev/null +++ b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileBusinessFeign.java @@ -0,0 +1,83 @@ +package com.itheima.sfbx.file.feign; + +import com.itheima.sfbx.file.hystrix.FileBusinessHystrix; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName FileFeign.java + * @Description 附件feign接口 + */ +@FeignClient(value = "file-web",fallback = FileBusinessHystrix.class) +public interface FileBusinessFeign { + + /** + * @Description 业务与文件绑定 + * @param fileVO 附件对象 + * @return com.itheima.travel.req.FileVO + */ + @PostMapping("file-feign/bind-file") + List bindFile(@RequestBody FileVO fileVO); + + /** + * @Description 业务绑定多个附件 + * @param fileVOs 相同业务的多个附件对象 + * @return + */ + @PostMapping("file-feign/bind-batch-file") + List bindBatchFile(@RequestBody ArrayList fileVOs); + + /** + * @Description 移除业务原附件,并绑定新的附件到业务上 + * @param fileVO 附件对象 + * @return + */ + @PostMapping(value = "file-feign/replace-bind-file") + Boolean replaceBindFile(@RequestBody FileVO fileVO); + + /** + * @Description 移除业务原附件,并批量绑定新的附件到业务上 + * @param fileVOs 附件对象 + * @return + */ + @PostMapping(value = "file-feign/replace-bind-batch-file") + Boolean replaceBindBatchFile(@RequestBody ArrayList fileVOs); + + + /** + * @Description 按业务ID查询附件【对象传递参数方式】 + * @param businessIds 业务IDS + * @return List + */ + @PostMapping("file-feign/find-in-business-ids") + List findInBusinessIds(@RequestBody List businessIds); + + + /** + * @Description 删除业务相关附件 + * @param businessIds 业务IDS + * @return Boolean + */ + @DeleteMapping("file-feign/delete-by-business-ids") + Boolean deleteByBusinessIds(@RequestBody ArrayList businessIds); + + /** + * @Description 定时清理文件 + * @return + */ + @DeleteMapping("file-feign/clear-file") + Boolean clearFile(); + + /** + * @Description 延迟队列清理文件 + * @return + */ + @DeleteMapping("file-feign/clear-file-id/{id}") + Boolean clearFileById(@PathVariable("id") Long id); + + +} diff --git a/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileDownLoadFeign.java b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileDownLoadFeign.java new file mode 100644 index 0000000..b106c07 --- /dev/null +++ b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/feign/FileDownLoadFeign.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.file.feign; + +import com.itheima.sfbx.file.hystrix.FileBusinessHystrix; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * @ClassName FileFeign.java + * @Description 文件下载feign接口 + */ +@FeignClient(value = "file-web",fallback = FileBusinessHystrix.class) +public interface FileDownLoadFeign { + + /*** + * @description 文件下载-服务远程调用-base64方式返回 + * @param fileId 上传对象 + * @return: com.itheima.travel.req.FileVo + */ + @PostMapping("file-feign/down-load/{fileId}") + FileVO downLoad(@PathVariable("fileId") Long fileId); + +} diff --git a/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileBusinessHystrix.java b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileBusinessHystrix.java new file mode 100644 index 0000000..b42ad68 --- /dev/null +++ b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileBusinessHystrix.java @@ -0,0 +1,57 @@ +package com.itheima.sfbx.file.hystrix; + +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import org.springframework.stereotype.Component; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName FileHystrix.java + * @Description FileFeign的Hystrix + */ +@Component +public class FileBusinessHystrix implements FileBusinessFeign { + + + @Override + public List bindFile(FileVO fileVO) { + return null; + } + + @Override + public List bindBatchFile(ArrayList fileVOs) { + return null; + } + + @Override + public Boolean replaceBindFile(FileVO fileVO) { + return null; + } + + @Override + public Boolean replaceBindBatchFile(ArrayList fileVOs) { + return null; + } + + @Override + public List findInBusinessIds(List businessIds) { + return null; + } + + @Override + public Boolean deleteByBusinessIds(ArrayList businessIds) { + return null; + } + + @Override + public Boolean clearFile() { + return null; + } + + @Override + public Boolean clearFileById(Long id) { + return null; + } +} diff --git a/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileDownLoadHystrix.java b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileDownLoadHystrix.java new file mode 100644 index 0000000..4e0946d --- /dev/null +++ b/day02/sfbx-file/file-interface/src/main/java/com/itheima/sfbx/file/hystrix/FileDownLoadHystrix.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx.file.hystrix; + +import com.itheima.sfbx.file.feign.FileDownLoadFeign; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import org.springframework.stereotype.Component; + +/** + * @ClassName FileHystrix.java + * @Description FileFeign的Hystrix + */ +@Component +public class FileDownLoadHystrix implements FileDownLoadFeign { + + + @Override + public FileVO downLoad(Long fileId) { + return null; + } +} diff --git a/day02/sfbx-file/file-web/Dockerfile b/day02/sfbx-file/file-web/Dockerfile new file mode 100644 index 0000000..e8413cf --- /dev/null +++ b/day02/sfbx-file/file-web/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /file-web +ARG PACKAGE_PATH=./target/file-web.jar +ADD ${PACKAGE_PATH:-./} file-web.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m\ +-Dspring.profiles.active=test" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS file-web.jar"] \ No newline at end of file diff --git a/day02/sfbx-file/file-web/pom.xml b/day02/sfbx-file/file-web/pom.xml new file mode 100644 index 0000000..b96b433 --- /dev/null +++ b/day02/sfbx-file/file-web/pom.xml @@ -0,0 +1,105 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-file + 2.0-SNAPSHOT + + + file-web + file-web + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.alibaba.cloud + spring-cloud-starter-alicloud-oss + + + com.aliyun.oss + aliyun-sdk-oss + + + com.itheima.sfbx + framework-rabbitmq + + + com.itheima.sfbx + framework-seata + + + com.itheima.sfbx + framework-web + + + com.itheima.sfbx + framework-mybatis-plus + + + com.itheima.sfbx + framework-redis + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + com.itheima.sfbx + framework-knife4j-web + + + com.qiniu + qiniu-java-sdk + + + com.google.code.gson + gson + + + javax.xml.bind + jaxb-api + 2.3.1 + + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + file-web + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/FileWebStart.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/FileWebStart.java new file mode 100644 index 0000000..84c97c6 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/FileWebStart.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.file; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +/** + * 文件上传处理微服务 + */ +@SpringBootApplication(scanBasePackages = "com.itheima.sfbx") +public class FileWebStart { + + public static void main(String[] args) { + SpringApplication.run(FileWebStart.class, args); + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/FileStorageAdapter.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/FileStorageAdapter.java new file mode 100644 index 0000000..9692bd9 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/FileStorageAdapter.java @@ -0,0 +1,79 @@ +package com.itheima.sfbx.file.adapter; + +import com.itheima.sfbx.file.pojo.File; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +/** + * @ClassName FileStorageAdapter.java + * @Description 文件存储适配处理 + */ +public interface FileStorageAdapter { + + /** + * 文件上传 + * @param fileVO {@link FileVO} 文件信息对象 + * @param inputStream 文件流 + * @return pathUrl 全路径 + */ + String uploadFile(FileVO fileVO, InputStream inputStream); + + /*** + * @description 分片上传-初始化分片请求 + * @param fileVO {@link FileVO} 文件信息对象 + * @return uploadId 文件上传id + */ + File initiateMultipartUpload(FileVO fileVO); + + /*** + * @description 分片上传-上传每个分片文件 + * @param filePartVo {@link FilePartVO} 文件信息对象 + * @param inputStream 当前分片文件流 + * @return PartETag json字符串 + */ + String uploadPart(FilePartVO filePartVo, InputStream inputStream); + + + /*** + * @description 分片上传-合并所有上传文件 + * @param fileVO {@link File} 文件信息对象 + * @return 合并结果 + */ + String completeMultipartUpload(FileVO fileVO); + + /** + * @Description 下载文件 + * @param storeFlag 存储源标识 + * @param bucketName 资源存储区域名称 + * @param pathUrl 资源文件路径地址(其中包含文件名称) + * @return + */ + InputStream downloadFile(String storeFlag,String bucketName,String pathUrl) throws IOException; + + /** + * @Description 文件删除 + * @param pathUrl 全路径 + * @throws Exception + */ + void delete(String storeFlag,String bucketName,String pathUrl); + + + /** + * @Description 批量文件删除 + * @param pathUrls 全路径集合 + * @throws Exception + */ + void deleteBatch(String storeFlag,String bucketName,List pathUrls); + + /** + * @Description 获取文件文本内容 + * @param pathUrl 全路径 + * @return + * @throws IOException + */ + String getFileContent(String storeFlag,String bucketName,String pathUrl) throws IOException; +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/impl/FileStorageAdapterImpl.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/impl/FileStorageAdapterImpl.java new file mode 100644 index 0000000..7213194 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/adapter/impl/FileStorageAdapterImpl.java @@ -0,0 +1,100 @@ +package com.itheima.sfbx.file.adapter.impl; + +import com.itheima.sfbx.file.adapter.FileStorageAdapter; +import com.itheima.sfbx.file.handler.FileStorageHandler; +import com.itheima.sfbx.framework.commons.constant.file.FileConstant; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.RegisterBeanHandler; +import com.itheima.sfbx.file.pojo.File; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.io.InputStream; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @ClassName FileStorageAdapterImpl.java + * @Description 文件存储适配处理 + */ +@Component +public class FileStorageAdapterImpl implements FileStorageAdapter { + + @Autowired + RegisterBeanHandler registerBeanHandler; + + private static Map fileStorageHandlers =new HashMap<>(); + + static { + fileStorageHandlers.put(FileConstant.ALIYUN_OSS,"ossFileStorageHandler"); + fileStorageHandlers.put(FileConstant.QINIU_KODO,"kodoFileStorageHandler"); + } + + @Override + public String uploadFile(FileVO fileVO, InputStream inputStream) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(fileVO.getStoreFlag())? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(fileVO.getStoreFlag()); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.uploadFile(fileVO.getSuffix(), fileVO.getFileName(), fileVO.getBucketName(), fileVO.getAutoCatalog(), inputStream); + } + + @Override + public File initiateMultipartUpload(FileVO fileVO) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(fileVO.getStoreFlag())? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(fileVO.getStoreFlag()); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.initiateMultipartUpload(fileVO.getSuffix(),fileVO.getFileName(),fileVO.getBucketName(),fileVO.getAutoCatalog()); + } + + @Override + public String uploadPart(FilePartVO filePartVo, InputStream inputStream) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(filePartVo.getStoreFlag())? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(filePartVo.getStoreFlag()); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.uploadPart(filePartVo.getUploadId(),filePartVo.getFileName(),filePartVo.getPartNumber(),filePartVo.getPartSize(),filePartVo.getBucketName(),inputStream); + } + + @Override + public String completeMultipartUpload(FileVO fileVO) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(fileVO.getStoreFlag())? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(fileVO.getStoreFlag()); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.completeMultipartUpload(fileVO.getUploadId(),fileVO.getPartETags(),fileVO.getFileName(),fileVO.getBucketName()); + } + + @Override + public InputStream downloadFile(String storeFlag,String bucketName,String pathUrl) throws IOException { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(storeFlag)? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(storeFlag); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.downloadFile(bucketName,pathUrl); + } + + @Override + public void delete(String storeFlag,String bucketName,String pathUrl) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(storeFlag)? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(storeFlag); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + fileStorageHandler.delete(bucketName,pathUrl); + } + + @Override + public void deleteBatch(String storeFlag,String bucketName,List pathUrls) { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(storeFlag)? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(storeFlag); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + fileStorageHandler.deleteBatch(bucketName,pathUrls); + } + + @Override + public String getFileContent(String storeFlag,String bucketName,String pathUrl) throws IOException { + String fileStorageHandlerString = EmptyUtil.isNullOrEmpty(storeFlag)? + fileStorageHandlers.get(FileConstant.ALIYUN_OSS):fileStorageHandlers.get(storeFlag); + FileStorageHandler fileStorageHandler = registerBeanHandler.getBean(fileStorageHandlerString, FileStorageHandler.class); + return fileStorageHandler.getFileContent(bucketName,pathUrl); + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/binding/SourceBinding.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/binding/SourceBinding.java new file mode 100644 index 0000000..333fade --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/binding/SourceBinding.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.file.binding; + +import com.itheima.sfbx.framework.rabbitmq.source.FileSource; +import org.springframework.cloud.stream.annotation.EnableBinding; + +/** + * @ClassName Binding.java + * @Description 绑定文件发送者声明 + */ +@EnableBinding({FileSource.class}) +public class SourceBinding { +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileBusinessFeignController.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileBusinessFeignController.java new file mode 100644 index 0000000..4413eeb --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileBusinessFeignController.java @@ -0,0 +1,123 @@ +package com.itheima.sfbx.file.fegin; + +import com.itheima.sfbx.file.service.IFileService; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName FileController.java + * @Description 附件展示维护controller + */ +@RestController +@RequestMapping("file-feign") +@Api(tags = "附件feign-controller") +@Slf4j +public class FileBusinessFeignController { + + @Autowired + IFileService fileService; + + /** + * @Description 业务绑定单个附件 + * @param fileVO 附件对象 + * @return + */ + @PostMapping(value = "bind-file") + @ApiOperation(value = "业务绑定单文件",notes = "业务绑定单文件") + @ApiImplicitParam(name = "fileVO",value = "附件对象",required = true,dataType = "FileVO") + public FileVO bindFile(@RequestBody FileVO fileVO){ + return fileService.bindFile(fileVO); + } + + /** + * @Description 相同业务绑定多个附件 + * @param fileVOs 相同业务的多个附件对象 + * @return + */ + @PostMapping(value = "bind-batch-file") + @ApiOperation(value = "业务绑定多文件",notes = "业务绑定多文件") + @ApiImplicitParam(name = "fileVOs",value = "附件对象",required = true,dataType = "FileVO") + public List bindBatchFile(@RequestBody ArrayList fileVOs){ + return fileService.bindBatchFile(fileVOs); + } + + /** + * @Description 移除业务原图片,并绑定新的图片到业务上 + * @param fileVO 附件对象 + * @return + */ + @PostMapping(value = "replace-bind-file") + @ApiOperation(value = "移除业务原图片,并绑定新的图片到业务上",notes = "移除业务原图片,并绑定新的图片到业务上") + @ApiImplicitParam(name = "fileVO",value = "附件对象",required = true,dataType = "FileVO") + public Boolean replaceBindFile(@RequestBody FileVO fileVO){ + return fileService.replaceBindFile(fileVO); + } + + /** + * @Description 批量移除业务原图片,并批量绑定新的图片到业务上 + * @param fileVOs 附件对象 + * @return + */ + @PostMapping(value = "replace-bind-batch-file") + @ApiOperation(value = "移除业务原图片,并绑定新的图片到业务上",notes = "移除业务原图片,并绑定新的图片到业务上") + @ApiImplicitParam(name = "fileVOs",value = "附件对象",required = true,dataType = "FileVO") + public Boolean replaceBindBatchFile(@RequestBody ArrayList fileVOs){ + return fileService.replaceBindBatchFile(fileVOs); + } + + /** + * @description 按业务ID查询附件 + * @param businessIds 业务ids + * @return java.util.List + */ + @PostMapping("find-in-business-ids") + @ApiOperation(value = "查询业务对应附件",notes = "查询业务对应附件") + @ApiImplicitParam(name = "fileVO",value = "附件对象",required = true,dataType = "FileVO") + public List findInBusinessIds(@RequestBody ArrayList businessIds) { + return fileService.findInBusinessIds(businessIds); + } + + /** + * @Description 删除业务相关附件 + * @param businessIds 附件信息ids + * @return + */ + @DeleteMapping("delete-by-business-ids") + @ApiOperation(value = "删除业务对应附件",notes = "删除业务对应附件") + @ApiImplicitParam(name = "fileVO",value = "附件对象",required = true,dataType = "FileVO") + public Boolean deleteByBusinessIds(@RequestBody ArrayList businessIds) { + return fileService.deleteInBusinessIds(businessIds); + } + + + /** + * @Description 定时清理文件 + * @return Boolean + */ + @DeleteMapping("clear-file") + @ApiOperation(value = "删除业务对应附件",notes = "删除业务对应附件") + public Boolean clearFile(){ + return fileService.clearFile(); + } + + /** + * @Description 延迟清理文件 + * @return Boolean + */ + @DeleteMapping("clear-file-id/{id}") + @ApiOperation(value = "删除业务对应附件",notes = "删除业务对应附件") + @ApiImplicitParam(name = "id",value = "业务id",required = true,dataType = "String") + public Boolean clearFileById(@PathVariable("id")String id){ + return fileService.clearFileById(id); + } + +} + diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileDownLoadFeignController.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileDownLoadFeignController.java new file mode 100644 index 0000000..3faf82d --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/fegin/FileDownLoadFeignController.java @@ -0,0 +1,44 @@ +package com.itheima.sfbx.file.fegin; + +import com.itheima.sfbx.file.service.IFileService; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName FileUpLoadController.java + * @Description 文件下载接口 + */ +@RestController +@RequestMapping("file-feign") +@Api(tags = "附件controller") +@Slf4j +public class FileDownLoadFeignController { + + @Autowired + IFileService fileService; + + /*** + * @description 文件下载-简单下载-图片base64Image方式展示 + * @param fileId 上传对象 + * @return: com.itheima.travel.req.FileVo + */ + @PostMapping(value = "down-load/{fileId}") + @ApiOperation(value = "文件下载",notes = "文件下载") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path", name = "fileId",value = "附件Id",dataType = "Long") + }) + public FileVO downLoad(@PathVariable("fileId") Long fileId){ + FileVO fileVO = fileService.downLoad(fileId); + return fileVO; + } + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/AbsFileStorageHandler.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/AbsFileStorageHandler.java new file mode 100644 index 0000000..66351bf --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/AbsFileStorageHandler.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.file.handler; + +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName AbsFileStorageHandler.java + * @Description 文件存储处理抽象类 + */ +public abstract class AbsFileStorageHandler { + + public static Map metaMimeTypeMap = new HashMap<>(); + + static { + metaMimeTypeMap.put(".docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"); + metaMimeTypeMap.put(".doc","application/msword"); + metaMimeTypeMap.put(".ppt","application/x-ppt"); + metaMimeTypeMap.put(".xls","application/vnd.ms-excel"); + metaMimeTypeMap.put(".xhtml","text/html"); + metaMimeTypeMap.put(".htm","text/html"); + metaMimeTypeMap.put(".html","text/html"); + metaMimeTypeMap.put(".jpe","image/jpg"); + metaMimeTypeMap.put(".jpeg","image/jpg"); + metaMimeTypeMap.put(".jpg","image/jpg"); + metaMimeTypeMap.put(".png","image/jpg"); + metaMimeTypeMap.put(".mp4","video/mp4"); + metaMimeTypeMap.put(".wmv","video/x-ms-wmv"); + metaMimeTypeMap.put(".pdf","application/pdf"); + metaMimeTypeMap.put(".mp3","audio/mp3"); + } + + /*** + * @description 文件路径生成策略 + * + * @param filename + * @return + * @return: java.lang.String + */ + public String builderOssPath(String filename) { + String separator = "/"; + StringBuilder stringBuilder = new StringBuilder(50); + LocalDate localDate = LocalDate.now(); + String yeat = String.valueOf(localDate.getYear()); + stringBuilder.append(yeat).append(separator); + String moth = String.valueOf(localDate.getMonthValue()); + stringBuilder.append(moth).append(separator); + DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE; + String day = formatter.format(localDate); + stringBuilder.append(day).append(separator); + stringBuilder.append(filename); + return stringBuilder.toString(); + } + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/FileStorageHandler.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/FileStorageHandler.java new file mode 100644 index 0000000..adb3e6f --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/FileStorageHandler.java @@ -0,0 +1,93 @@ +package com.itheima.sfbx.file.handler; + +import com.itheima.sfbx.file.pojo.File; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +/** + * @ClassName FileStorageHandler.java + * @Description 文件存储处理接口类 + */ +public interface FileStorageHandler { + + /** + * @Description 文件上传 + * @param suffix 文件后缀 + * @param filename 文件名称-可以指定存储空间下的目录,例如:a/b/c/filename + * @param bucketName 存储空间的名称 + * @param autoCatalog 是否自动生成文件存储目录,如果在filename指定了目录,此值设置为false + * @param inputStream 文件流 + * @return pathUrl 全路径 + */ + String uploadFile(String suffix, String filename,String bucketName,boolean autoCatalog, InputStream inputStream); + + /*** + * @description 分片上传-初始化分片请求 + * @param suffix 文件后缀 + * @param filename 文件名称-可以指定存储空间下的目录,例如:a/b/c/filename + * @param bucketName 存储空间的名称 + * @param autoCatalog 是否自动生成文件存储目录,如果在filename指定了目录,此值设置为false + * @return uploadId 文件上传id + */ + File initiateMultipartUpload(String suffix, String filename, String bucketName, boolean autoCatalog); + + /*** + * @description 分片上传-上传每个分片文件 + * @param upLoadId 文件上传id + * @param filename 文件名称-可以指定存储空间下的目录,例如:a/b/c/filename + * @param partNumber 当前分片 + * @param partSize 分片数 + * @param bucketName 存储空间的名称 + * @param inputStream 当前分片文件流 + * @return PartETag json字符串 + */ + String uploadPart(String upLoadId,String filename,int partNumber,long partSize,String bucketName,InputStream inputStream); + + + /*** + * @description 分片上传-合并所有上传文件 + * + * @param upLoadId 文件上传id + * @param partETags json字符串 + * @param filename 文件名称-可以指定存储空间下的目录,例如:a/b/c/filename + * @param bucketName 存储空间的名称 + * @return 合并结果 + */ + String completeMultipartUpload(String upLoadId,List partETags,String filename,String bucketName); + + /** + * @Description 下载文件 + * @param bucketName 存储空间名称 + * @param pathUrl 全路径 + * @return + */ + InputStream downloadFile(String bucketName,String pathUrl) throws IOException; + + /** + * @Description 文件删除 + * @param bucketName 存储空间名称 + * @param pathUrl 全路径 + * @throws Exception + */ + void delete(String bucketName,String pathUrl); + + /** + * @Description 批量文件删除 + * @param bucketName 存储空间名称 + * @param pathUrls 全路径集合 + * @throws Exception + */ + void deleteBatch(String bucketName,List pathUrls); + + /** + * @Description 获取文件文本内容 + * @param bucketName 存储空间名称 + * @param pathUrl 全路径 + * @return + * @throws IOException + */ + String getFileContent(String bucketName,String pathUrl) throws IOException; + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/impl/OssFileStorageHandlerImpl.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/impl/OssFileStorageHandlerImpl.java new file mode 100644 index 0000000..4d965a2 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/impl/OssFileStorageHandlerImpl.java @@ -0,0 +1,179 @@ +package com.itheima.sfbx.file.handler.aliyun.impl; + +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.aliyun.oss.ClientException; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSException; +import com.aliyun.oss.internal.OSSConstants; +import com.aliyun.oss.internal.OSSHeaders; +import com.aliyun.oss.model.*; +import com.google.common.collect.Lists; +import com.google.common.io.ByteStreams; +import com.itheima.sfbx.framework.commons.enums.file.FileEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.file.handler.AbsFileStorageHandler; +import com.itheima.sfbx.file.handler.FileStorageHandler; +import com.itheima.sfbx.file.handler.aliyun.properties.OssAliyunConfigProperties; +import com.itheima.sfbx.file.pojo.File; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.stereotype.Service; +import org.springframework.util.StopWatch; + +import java.io.IOException; +import java.io.InputStream; +import java.util.List; + +/** + * @ClassName OssFileStorageHandlerImpl.java + * @Description 阿里云文件上传 + */ +@Slf4j +@Service("ossFileStorageHandler") +@EnableConfigurationProperties(OssAliyunConfigProperties.class) +public class OssFileStorageHandlerImpl extends AbsFileStorageHandler implements FileStorageHandler { + + @Autowired + OSS ossClient; + + @Autowired + OssAliyunConfigProperties ossAliyunConfigProperties; + /*** + * @description 文件元数据处理 + * @param prefix 文件后缀 + * @return + */ + public ObjectMetadata fileMetaHandler(String prefix){ + //元数据对象 + ObjectMetadata objectMeta = new ObjectMetadata(); + //文件字符集 + objectMeta.setContentEncoding("UTF-8"); + //文件类型匹配 + objectMeta.setContentType(metaMimeTypeMap.get(prefix.toLowerCase())); + return objectMeta; + } + + @Override + public String uploadFile(String suffix, String filename, String bucketName,boolean autoCatalog, InputStream inputStream) { + // 是否自动生成存储路径并设置文件路径和名称(Key) + String key = autoCatalog?builderOssPath(filename):filename; + log.info("OSS文件上传开始:{}" ,key); + try { + //上传文件元数据处理 + ObjectMetadata objectMeta = fileMetaHandler(suffix); + //文件上传请求对象 + PutObjectRequest request = new PutObjectRequest(bucketName, key, inputStream,objectMeta); + //上传限流 + if (ossAliyunConfigProperties.getIslimitSpeed()){ + request.setTrafficLimit(ossAliyunConfigProperties.getUplimitSpeed()); + } + //文件上传 + PutObjectResult result = ossClient.putObject(request); + // 设置权限(公开读) + ossClient.setBucketAcl(bucketName, CannedAccessControlList.PublicRead); + } catch (OSSException oe) { + log.error("OSS文件上传错误:{}", oe); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } catch (ClientException ce) { + log.error("OSS文件上传客户端错误:{}",ce); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } + return key; + } + + @Override + public File initiateMultipartUpload(String suffix, String filename, String bucketName, boolean autoCatalog) { + // 是否自动生成存储路径并设置文件路径和名称(Key) + String key = filename; + InitiateMultipartUploadRequest request = new InitiateMultipartUploadRequest(bucketName, key); + // 如果需要在初始化分片时设置请求头,请参考以下示例代码。 + ObjectMetadata metadata = fileMetaHandler(suffix); + metadata.setHeader(OSSHeaders.OSS_STORAGE_CLASS, StorageClass.Standard.toString()); + // 指定该Object的网页缓存行为。 + metadata.setCacheControl("no-cache"); + // 指定该Object被下载时的名称。 + metadata.setContentDisposition("inline;filename="+key); + // 指定该Object的内容编码格式。 + metadata.setContentEncoding(OSSConstants.DEFAULT_CHARSET_NAME); + //指定请求 + request.setObjectMetadata(metadata); + // 初始化分片。 + InitiateMultipartUploadResult upresult = ossClient.initiateMultipartUpload(request); + // 设置权限(公开读) + ossClient.setBucketAcl(bucketName, CannedAccessControlList.PublicRead); + // 返回uploadId,它是分片上传事件的唯一标识。您可以根据该uploadId发起相关的操作,例如取消分片上传、查询分片上传等。 + return File.builder().bucketName(bucketName).pathUrl(key).fileName(key).uploadId(upresult.getUploadId()).build(); + } + + @Override + public String uploadPart(String upLoadId, String filename, int partNumber, long partSize, String bucketName, InputStream inputStream) { + //封装分片上传请求 + UploadPartRequest uploadPartRequest = new UploadPartRequest(); + uploadPartRequest.setUploadId(upLoadId); + //part大小 1-10000 + uploadPartRequest.setPartNumber(partNumber); + uploadPartRequest.setPartSize(partSize); + //文件上传的bucketName + uploadPartRequest.setBucketName(bucketName); + //分片文件 + uploadPartRequest.setInputStream(inputStream); + uploadPartRequest.setKey(filename); + // 每个分片不需要按顺序上传,甚至可以在不同客户端上传,OSS会按照分片号排序组成完整的文件。 + UploadPartResult uploadPartResult = ossClient.uploadPart(uploadPartRequest); + log.info("{}文件第 {} 片上传成功,上传结果:{}", upLoadId, uploadPartRequest.getPartNumber(),JSON.toJSON(uploadPartResult)); + return JSONObject.toJSONString(uploadPartResult.getPartETag()); + + } + + @Override + public String completeMultipartUpload(String upLoadId, List partETags, String filename, String bucketName) { + StopWatch st = new StopWatch(); + st.start(); + //转换jsonarray为list + List partETagList =Lists.newArrayList(); + partETags.forEach(n->{ + partETagList.add(JSONObject.parseObject(n,PartETag.class)); + }); + CompleteMultipartUploadRequest completeMultipartUploadRequest = + new CompleteMultipartUploadRequest(bucketName, filename, upLoadId, partETagList); + log.info("{}文件上传完成,开始合并,partList:{}", upLoadId, partETags); + // 完成分片上传。 + CompleteMultipartUploadResult completeMultipartUploadResult = ossClient.completeMultipartUpload(completeMultipartUploadRequest); + st.stop(); + log.info("{}文件上传完成,上传结果:{},耗时:{}", upLoadId, JSON.toJSON(completeMultipartUploadResult), st.getTotalTimeMillis()); + return completeMultipartUploadResult.getETag(); + } + + + @Override + public InputStream downloadFile(String bucketName,String pathUrl) throws IOException { + GetObjectRequest request = new GetObjectRequest(bucketName, pathUrl); + //下载传限流 + if (ossAliyunConfigProperties.getIslimitSpeed()){ + request.setTrafficLimit(ossAliyunConfigProperties.getDownlimitSpeed()); + } + //ossObject包含文件所在的存储空间名称、文件名称、文件元信息以及一个输入流。 + InputStream inputStream = ossClient.getObject(request).getObjectContent(); + return inputStream; + } + + @Override + public void delete(String bucketName,String pathUrl) { + // 删除Objects + ossClient.deleteObject(bucketName,pathUrl); + } + + @Override + public void deleteBatch(String bucketName,List pathUrls) { + // 删除Objects + ossClient.deleteObjects(new DeleteObjectsRequest(bucketName).withKeys(pathUrls)); + } + + @Override + public String getFileContent(String bucketName,String pathUrl) throws IOException { + InputStream inputStream = downloadFile(bucketName,pathUrl); + return new String(ByteStreams.toByteArray(inputStream)); + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/properties/OssAliyunConfigProperties.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/properties/OssAliyunConfigProperties.java new file mode 100644 index 0000000..b11baa2 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/aliyun/properties/OssAliyunConfigProperties.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.file.handler.aliyun.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @Description 阿里云OSS上传配置类 + */ + +@Data +@NoArgsConstructor +@ConfigurationProperties("spring.cloud.alicloud.oss") +public class OssAliyunConfigProperties { + + //区域 + String region; + + //秘钥ID + String accessKeyId; + + //秘钥 + String accessKeySecret; + + //角色 + String roleArn; + + //桶名称 + private String bucketName ; + + //访问终端域名地址 + private String endpoint; + + //是否限流 + private Boolean islimitSpeed = true; + + //上传限流 + private int uplimitSpeed = 100 * 1024 * 1024 * 2; + + //下载限流 + private int downlimitSpeed = 100 * 1024 * 8; + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/config/QiniuConfig.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/config/QiniuConfig.java new file mode 100644 index 0000000..ce34bd1 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/config/QiniuConfig.java @@ -0,0 +1,106 @@ +package com.itheima.sfbx.file.handler.qiniu.config; + +import com.itheima.sfbx.file.handler.qiniu.properties.QiniuProperties; +import com.qiniu.storage.BucketManager; +import com.qiniu.storage.Region; +import com.qiniu.util.Auth; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * Qiniu服务配置类 + *

+ * 声明创建Qiniu核心配置对象 + */ +@Slf4j +@Configuration +@EnableConfigurationProperties(QiniuProperties.class) +public class QiniuConfig { + + @Autowired + private QiniuProperties qiniuConfigProperties; + + private static Map regions =new HashMap<>(); + + static { + regions.put(QiniuRegion.REGION_HUADONG,Region.huadong()); + regions.put(QiniuRegion.REGION_HUABEI,Region.huabei()); + regions.put(QiniuRegion.REGION_HUANAN,Region.huanan()); + regions.put(QiniuRegion.REGION_BEIMEI,Region.beimei()); + regions.put(QiniuRegion.REGION_DONGNANYA,Region.xinjiapo()); + } + + @Bean("qiniuConfiguration") + public com.qiniu.storage.Configuration qiniuConfiguration() { + + // 设置存储区域 + String regionString = qiniuConfigProperties.getKodo().getRegion(); + + Region region = regions.get(regionString); + + com.qiniu.storage.Configuration configuration = new com.qiniu.storage.Configuration(region); + // 使用http协议 + configuration.useHttpsDomains = false; + + //上传限流,超过后上传会自动转为分片上传 + configuration.resumableUploadAPIV2BlockSize = qiniuConfigProperties.getUplimitSpeed(); + + return configuration; + } + + @Bean("qiniuAuth") + public Auth qiniuAuth() { + Auth auth = Auth.create(qiniuConfigProperties.getAccessKey(), + qiniuConfigProperties.getSecretKey()); + return auth; + } + + @Bean("bucketManager") + public BucketManager bucketManager(@Qualifier("qiniuConfiguration") com.qiniu.storage.Configuration configuration, + @Qualifier("qiniuAuth") Auth auth + ) { + BucketManager bucketManager = new BucketManager(auth, configuration); + return bucketManager; + } + + + + /** + *

+ * 七牛服务区域标识 + *

+ * 此标识是由七牛的kodo对象存储中定义,参考 {@link Region} + */ + public interface QiniuRegion { + + /** + * z0 华东 + */ + String REGION_HUADONG = "z0"; + /** + * z1 华北 + */ + String REGION_HUABEI = "z1"; + /** + * z2 华南 + */ + String REGION_HUANAN = "z2"; + /** + * na0 北美 + */ + String REGION_BEIMEI = "na0"; + /** + * as0 东南亚 + */ + String REGION_DONGNANYA = "as0"; + } + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/impl/KodoFileStorageHandlerImpl.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/impl/KodoFileStorageHandlerImpl.java new file mode 100644 index 0000000..687c41a --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/impl/KodoFileStorageHandlerImpl.java @@ -0,0 +1,169 @@ +package com.itheima.sfbx.file.handler.qiniu.impl; + +import com.aliyun.oss.ClientException; +import com.google.common.io.ByteStreams; +import com.google.gson.Gson; +import com.itheima.sfbx.file.handler.qiniu.properties.QiniuProperties; +import com.itheima.sfbx.framework.commons.enums.file.FileEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.file.handler.AbsFileStorageHandler; +import com.itheima.sfbx.file.handler.FileStorageHandler; +import com.itheima.sfbx.file.pojo.File; +import com.qiniu.common.QiniuException; +import com.qiniu.http.Response; +import com.qiniu.storage.BucketManager; +import com.qiniu.storage.Configuration; +import com.qiniu.storage.DownloadUrl; +import com.qiniu.storage.UploadManager; +import com.qiniu.storage.model.BatchStatus; +import com.qiniu.storage.model.DefaultPutRet; +import com.qiniu.util.Auth; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.util.StringUtils; + +import java.io.IOException; +import java.io.InputStream; +import java.net.URL; +import java.util.List; + +/** + * @ClassName OssFileStorageHandlerImpl.java + * @Description 七牛云文件上传 + */ +@Slf4j +@Service("kodoFileStorageHandler") +public class KodoFileStorageHandlerImpl extends AbsFileStorageHandler implements FileStorageHandler { + + @Autowired + private Auth qiniuAuth; + + @Autowired + private Configuration qiniuConfiguration; + + @Autowired + private BucketManager bucketManager; + + @Autowired + QiniuProperties qiniuConfigProperties; + + @Override + public String uploadFile(String suffix, String filename, String bucketName, boolean autoCatalog, InputStream inputStream) { + if (EmptyUtil.isNullOrEmpty(bucketName)){ + bucketName=qiniuConfigProperties.getKodo().getBucketName(); + } + String pathUrl = null; + // 是否自动生成存储路径并设置文件路径和名称(Key) + String key = autoCatalog?builderOssPath(filename):filename; + log.info("七牛Kodo文件上传开始:{}", key); + try { + String upToken = qiniuAuth.uploadToken(bucketName); + String mimeType = metaMimeTypeMap.get(suffix); + UploadManager uploadManager = new UploadManager(qiniuConfiguration); + Response response = uploadManager.put(inputStream, key, upToken, null, mimeType); + //解析上传成功的结果 + DefaultPutRet putRet = new Gson().fromJson(response.bodyString(), DefaultPutRet.class); + if (!(StringUtils.isEmpty(putRet.key))) { + log.info("七牛Kodo文件上传成功:{}", putRet.key); + pathUrl = putRet.key; + } + } catch (QiniuException oe) { + log.error("七牛Kodo文件上传错误:{}", oe); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } catch (ClientException ce) { + log.error("七牛Kodo文件上传客户端错误:{}", ce); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } + return pathUrl; + } + + @Override + public File initiateMultipartUpload(String suffix, String filename, String bucketName, boolean autoCatalog) { + return null; + } + + @Override + public String uploadPart(String uploadId, String filename, int partNumber, long partSize, String bucketName, InputStream inputStream) { + return null; + } + + @Override + public String completeMultipartUpload(String uploadId, List partETags, String filename, String bucketName) { + return null; + } + + /* + * 七牛获得文件的inputStream + * 1.官方文档只有获得文件的URL路径地址的接口,没有直接获得Inputstream + * 2.URL地址需要获得bucket所属于域名 + * 3.通过域名来获得文件的URL + * 4.通过URL转为InputStream + * */ + @Override + public InputStream downloadFile(String bucketName, String pathUrl) throws IOException { + + InputStream inputStream = null; + try { + // 默认获得指定Bucket第一个域名 + String[] domainList = bucketManager.domainList(bucketName); + String domain = domainList[0]; + // 获得文件的路径并转为URL对象 + DownloadUrl downloadUrl = new DownloadUrl(domain, false, pathUrl); + String buildURL = downloadUrl.buildURL(); + URL url = new URL(buildURL); + // URL转为InputStream + inputStream = url.openStream(); + + } catch (IOException e) { + log.error("七牛Kodo获得文件输入流失败:{}", e); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } + + return inputStream; + } + + @Override + public void delete(String bucketName, String pathUrl) { + try { + bucketManager.delete(bucketName, pathUrl); + } catch (QiniuException e) { + //如果遇到异常,说明删除失败 + log.error("七牛Kodo获得文件输入流失败:{}", e); + throw new ProjectException(FileEnum.DELETE_FAIL); + } + + } + + @Override + public void deleteBatch(String bucketName, List pathUrls) { + + try { + BucketManager.BatchOperations batchOperations = new BucketManager.BatchOperations(); + batchOperations.addDeleteOp(bucketName, pathUrls.toArray(new String[0])); + Response response = bucketManager.batch(batchOperations); + BatchStatus[] batchStatusList = response.jsonToObject(BatchStatus[].class); + + for (int i = 0; i < pathUrls.size(); i++) { + BatchStatus status = batchStatusList[i]; + String key = pathUrls.get(i); + if (status.code != 200) { + log.error(status.data.error); + log.error("七牛Kodo批量删除文件失败:key 为 {}", key); + throw new ProjectException(FileEnum.DELETE_FAIL); + } + } + } catch (QiniuException e) { + //如果遇到异常,说明删除失败 + log.error("七牛Kodo批量删除文件失败:{}", e); + throw new ProjectException(FileEnum.DELETE_FAIL); + } + } + + @Override + public String getFileContent(String bucketName, String pathUrl) throws IOException { + InputStream inputStream = downloadFile(bucketName, pathUrl); + return new String(ByteStreams.toByteArray(inputStream)); + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/properties/QiniuProperties.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/properties/QiniuProperties.java new file mode 100644 index 0000000..a166436 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/handler/qiniu/properties/QiniuProperties.java @@ -0,0 +1,87 @@ +package com.itheima.sfbx.file.handler.qiniu.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @Description 阿里云OSS上传配置类 + */ + +@Data +@NoArgsConstructor +@ConfigurationProperties("spring.cloud.qiniu") +public class QiniuProperties { + + //访问key + private String accessKey ; + + //密钥key + private String secretKey ; + + //是否限流 + private Boolean islimitSpeed = true; + + //上传限流,超过后上传会自动转为分片上传 + private int uplimitSpeed = 1024 * 1024 * 8; + + + private KodoProperties kodo; + + + public static class KodoProperties { + + /** + * 存款空间区域标识,参考 {@link com.qiniu.storage.Region} 中的region属性值 + */ + private String region; + + /** + * 存储空间的名称 + */ + private String bucketName; + + /** + * 存款空间访问域名 + */ + private String endpoint; + + public KodoProperties() { + } + + public KodoProperties(String region, String bucketName) { + this.region = region; + this.bucketName = bucketName; + } + public KodoProperties(String region, String bucketName, String endpoint) { + this.region = region; + this.bucketName = bucketName; + this.endpoint = endpoint; + } + + public String getEndpoint() { + return endpoint; + } + + public void setEndpoint(String endpoint) { + this.endpoint = endpoint; + } + + public String getRegion() { + return region; + } + + public void setRegion(String region) { + this.region = region; + } + + public String getBucketName() { + return bucketName; + } + + public void setBucketName(String bucketName) { + this.bucketName = bucketName; + } + } + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FileMapper.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FileMapper.java new file mode 100644 index 0000000..f2636f6 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FileMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.file.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.itheima.sfbx.file.pojo.File; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:附件Mapper接口 + */ +@Mapper +public interface FileMapper extends BaseMapper { + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FilePartMapper.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FilePartMapper.java new file mode 100644 index 0000000..b788c35 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/mapper/FilePartMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.file.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.itheima.sfbx.file.pojo.FilePart; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:Mapper接口 + */ +@Mapper +public interface FilePartMapper extends BaseMapper { + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/File.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/File.java new file mode 100644 index 0000000..a0afc10 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/File.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.file.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:附件 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_file") +@ApiModel(value="File对象", description="附件") +public class File extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public File(Long id, String dataState, Long businessId, String businessType, String suffix, String fileName, String pathUrl, String storeFlag, String bucketName, String uploadId, String md5, String status, String companyNo) { + super(id, dataState); + this.businessId = businessId; + this.businessType = businessType; + this.suffix = suffix; + this.fileName = fileName; + this.pathUrl = pathUrl; + this.storeFlag = storeFlag; + this.bucketName = bucketName; + this.uploadId = uploadId; + this.md5 = md5; + this.status = status; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "业务ID") + private Long businessId; + + @ApiModelProperty(value = "业务类型") + private String businessType; + + @ApiModelProperty(value = "后缀名") + private String suffix; + + @ApiModelProperty(value = "文件名") + private String fileName; + + @ApiModelProperty(value = "访问路径") + private String pathUrl; + + @ApiModelProperty(value = "存储源标识,参考FileConstant") + private String storeFlag; + + @ApiModelProperty(value = "存储空间名称") + private String bucketName; + + @ApiModelProperty(value = "分片上传文件Id") + private String uploadId; + + @ApiModelProperty(value = "md5值") + private String md5; + + @ApiModelProperty(value = "状态:上传中【sending】,完成【succeed】,失败【failed】") + private String status; + + @ApiModelProperty(value = "企业号") + private String companyNo; + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/FilePart.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/FilePart.java new file mode 100644 index 0000000..9e28460 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/pojo/FilePart.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.file.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_file_part") +@ApiModel(value="FilePart对象", description="分片上传") +public class FilePart extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public FilePart(Long id, String dataState, String uploadId, Integer partNumber, String uploadResult, String md5, String bucketName, String fileName, String storeFlag, String companyNo) { + super(id, dataState); + this.uploadId = uploadId; + this.partNumber = partNumber; + this.uploadResult = uploadResult; + this.md5 = md5; + this.bucketName = bucketName; + this.fileName = fileName; + this.storeFlag = storeFlag; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "唯一上传id") + private String uploadId; + + @ApiModelProperty(value = "当前片数") + private Integer partNumber; + + @ApiModelProperty(value = "分片上传结果(json)") + private String uploadResult; + + @ApiModelProperty(value = "md5值") + private String md5; + + @ApiModelProperty(value = "存储空间名称") + private String bucketName; + + @ApiModelProperty(value = "文件名") + private String fileName; + + @ApiModelProperty(value = "存储源标识,参考FileConstant") + private String storeFlag; + + @ApiModelProperty(value = "企业号") + private String companyNo; + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFilePartService.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFilePartService.java new file mode 100644 index 0000000..f837003 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFilePartService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.file.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.file.pojo.FilePart; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; + +import java.util.List; + +/** + * @Description:服务类 + */ +public interface IFilePartService extends IService { + + /** + * @Description 多条件查询分页列表 + * @param filePartVo 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findFilePartPage(FilePartVO filePartVo, int pageNum, int pageSize); + + /** + * @Description 创建 + * @param filePartVo 对象信息 + * @return FilePart + */ + FilePart createFilePart(FilePartVO filePartVo); + + /** + * @Description 修改 + * @param filePartVo 对象信息 + * @return Boolean + */ + Boolean updateFilePart(FilePartVO filePartVo); + + /** + * @Description 删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean deleteFilePart(String[] checkedIds); + + /** + * @description 多条件查询列表 + * @param filePartVo 查询条件 + * @return: List + */ + List findFilePartList(FilePartVO filePartVo); + + /** + * @description 按upLoadId删除记录 + * @param upLoadId 上传ID + * @return: List + */ + Boolean deleteFilePartByUpLoadId(String upLoadId); +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFileService.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFileService.java new file mode 100644 index 0000000..515504b --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/IFileService.java @@ -0,0 +1,149 @@ +package com.itheima.sfbx.file.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.dto.file.UploadMultipartFile; +import com.itheima.sfbx.file.pojo.File; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; + +import java.util.List; +import java.util.Set; + +/** + * @Description:附件 服务类 + */ +public interface IFileService extends IService { + + /** + * @Description 按业务ID查询附件 + * @param businessId 附件对象业务Id + * @return + */ + List findFileVoByBusinessId(Long businessId) ; + + /** + * @Description 附件列表 + * @param fileVO 查询条件 + * @return + */ + Page findFileVOPage(FileVO fileVO, int pageNum, int pageSize); + + /*** + * @description 定时清理文件 + * @return + */ + List needClearFile(); + + /*** + * @description 延迟队列清理文件 + * @return + */ + FileVO needClearFileById(String id); + + /** + * @Description 业务绑定单个附件 + * @param fileVO 附件对象 + * @return + */ + FileVO bindFile(FileVO fileVO); + + /** + * @Description 相同业务绑定多个附件 + * @param fileVOs 相同业务的多个附件对象 + * @return + */ + List bindBatchFile(List fileVOs); + + /** + * @Description 移除业务原图片,并绑定新的图片到业务上 + * @param fileVO 附件对象 + * @return + */ + Boolean replaceBindFile(FileVO fileVO); + + /** + * @Description 移除业务原图片,并批量绑定新的图片到业务上 + * @param fileVOs 附件对象 + * @return + */ + Boolean replaceBindBatchFile(List fileVOs); + + /** + * @description 按业务ID查询附件 + * @param businessIds 业务ids + * @return java.util.List + */ + List findInBusinessIds(List businessIds); + + /** + * @Description 删除业务相关附件 + * @param businessIds 附件信息ids + * @return + */ + Boolean deleteInBusinessIds(List businessIds); + + /** + * @Description 删除业务相关附件 + * @param ids 附件信息ids + * @return + */ + Boolean deleteInIds(List ids); + + /** + * @Description 定时清理文件 + * @return Boolean + */ + Boolean clearFile(); + + /** + * @Description 定时清理文件 + * @return Boolean + */ + Boolean clearFileById(String fileId); + + /** + * @Description 查询所有业务对应附件 + * @return Set + */ + Set findBusinessIdAll(); + + /*** + * @description 文件简单上传 + * + * @param uploadMultipartFile + * @param fileVO + * @return FileVO + */ + FileVO upLoad(UploadMultipartFile uploadMultipartFile, FileVO fileVO); + + /*** + * @description 初始化分片上传 + * + * @param fileVO + * @return FileVO + */ + FileVO initiateMultipartUpload(FileVO fileVO); + + /*** + * @description 分片每个分片 + * @param uploadMultipartFile + * @param filePartVo + * @return String + */ + String uploadPart(UploadMultipartFile uploadMultipartFile, FilePartVO filePartVo); + + /*** + * @description 合并所有分片 + * @param fileVO + * @return String + */ + String completeMultipartUpload(FileVO fileVO); + + /*** + * @description 文件下载 + * @param fileId + * @return FileVO + */ + FileVO downLoad(Long fileId); +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FilePartServiceImpl.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FilePartServiceImpl.java new file mode 100644 index 0000000..bb446ff --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FilePartServiceImpl.java @@ -0,0 +1,115 @@ +package com.itheima.sfbx.file.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.file.mapper.FilePartMapper; +import com.itheima.sfbx.file.pojo.FilePart; +import com.itheima.sfbx.file.service.IFilePartService; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * @Description:服务实现类 + */ +@Service +public class FilePartServiceImpl extends ServiceImpl implements IFilePartService { + + @Override + public Page findFilePartPage(FilePartVO filePartVo, int pageNum, int pageSize) { + //构建分页对象 + Page page = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = new QueryWrapper<>(); + //构建多条件查询,代码生成后自己可自行调整 + //唯一上传id查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getUploadId())) { + queryWrapper.lambda().eq(FilePart::getUploadId,filePartVo.getUploadId()); + } + //当前片数查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getPartNumber())) { + queryWrapper.lambda().eq(FilePart::getPartNumber,filePartVo.getPartNumber()); + } + //分片上传结果(json)查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getUploadResult())) { + queryWrapper.lambda().eq(FilePart::getUploadResult,filePartVo.getUploadResult()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getDataState())) { + queryWrapper.lambda().eq(FilePart::getDataState,filePartVo.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(FilePart::getCreateTime); + //执行分页查询 + return page(page, queryWrapper); + } + + @Override + public FilePart createFilePart(FilePartVO filePartVo) { + //转换FilePartVO为FilePart + FilePart filePart = BeanConv.toBean(filePartVo, FilePart.class); + boolean flag = save(filePart); + if (flag){ + return filePart; + } + return null; + } + + @Override + public Boolean updateFilePart(FilePartVO filePartVo) { + //转换FilePartVO为FilePart + FilePart filePart = BeanConv.toBean(filePartVo, FilePart.class); + return updateById(filePart); + } + + @Override + public Boolean deleteFilePart(String[] checkedIds) { + //转换数组为集合 + List ids = Arrays.asList(checkedIds); + List idsLong = new ArrayList<>(); + ids.forEach(n->{ + idsLong.add(Long.valueOf(n)); + }); + return removeByIds(idsLong); + } + + @Override + public List findFilePartList(FilePartVO filePartVo) { + //构建查询条件 + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (!EmptyUtil.isNullOrEmpty(filePartVo.getId())) { + queryWrapper.lambda().eq(FilePart::getId,filePartVo.getId()); + } + //唯一上传id查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getUploadId())) { + queryWrapper.lambda().eq(FilePart::getUploadId,filePartVo.getUploadId()); + } + //当前片数查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getPartNumber())) { + queryWrapper.lambda().eq(FilePart::getPartNumber,filePartVo.getPartNumber()); + } + //当前片数查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getMd5())) { + queryWrapper.lambda().eq(FilePart::getMd5,filePartVo.getMd5()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(filePartVo.getDataState())) { + queryWrapper.lambda().eq(FilePart::getDataState,filePartVo.getDataState()); + } + return list(queryWrapper); + } + + @Override + public Boolean deleteFilePartByUpLoadId(String upLoadId) { + UpdateWrapper updateWrapperp = new UpdateWrapper<>(); + updateWrapperp.lambda().eq(FilePart::getUploadId,upLoadId); + return remove(updateWrapperp); + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FileServiceImpl.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FileServiceImpl.java new file mode 100644 index 0000000..8d91bf4 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/service/impl/FileServiceImpl.java @@ -0,0 +1,593 @@ +package com.itheima.sfbx.file.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.aliyun.oss.model.UploadPartResult; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.file.adapter.FileStorageAdapter; +import com.itheima.sfbx.file.mapper.FileMapper; +import com.itheima.sfbx.file.pojo.File; +import com.itheima.sfbx.file.pojo.FilePart; +import com.itheima.sfbx.file.service.IFilePartService; +import com.itheima.sfbx.file.service.IFileService; +import com.itheima.sfbx.file.utils.FileUrlContext; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.file.FileCacheConstant; +import com.itheima.sfbx.framework.commons.constant.file.FileConstant; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.dto.file.UploadMultipartFile; +import com.itheima.sfbx.framework.commons.enums.file.FileEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.EncodesUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.rabbitmq.pojo.MqMessage; +import com.itheima.sfbx.framework.rabbitmq.source.FileSource; +import lombok.Cleanup; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.messaging.Message; +import org.springframework.messaging.support.MessageBuilder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.io.ByteArrayInputStream; +import java.io.InputStream; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @Description:附件 服务实现类 + */ +@Slf4j +@Service +public class FileServiceImpl extends ServiceImpl implements IFileService { + + @Value("${file-delay-time}") + Integer fileDelayTime; + + @Autowired + private FileUrlContext fileUrlContext; + + @Autowired + FileStorageAdapter fileStorageAdapter; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Autowired + FileSource fileSource; + + @Autowired + RedissonClient redissonClient; + + @Autowired + IFilePartService filePartService; + + private QueryWrapper queryWrapper(FileVO fileVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + if (!EmptyUtil.isNullOrEmpty(fileVO.getBusinessType())) { + queryWrapper.lambda().eq(File::getBusinessType,fileVO.getBusinessType()); + } + if (!EmptyUtil.isNullOrEmpty(fileVO.getFileName())) { + queryWrapper.lambda().likeRight(File::getFileName,fileVO.getFileName()); + } + if (!EmptyUtil.isNullOrEmpty(fileVO.getPathUrl())) { + queryWrapper.lambda().likeRight(File::getPathUrl,fileVO.getPathUrl()); + } + if (!EmptyUtil.isNullOrEmpty(fileVO.getDataState())) { + queryWrapper.lambda().likeRight(File::getDataState,fileVO.getDataState()); + } + if (!EmptyUtil.isNullOrEmpty(fileVO.getStatus())) { + queryWrapper.lambda().likeRight(File::getStatus,fileVO.getStatus()); + } + queryWrapper.lambda().orderByDesc(File::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = FileCacheConstant.BUSINESS_KEY,key = "#businessId") + public List findFileVoByBusinessId(Long businessId) { + try { + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.lambda().eq(File::getBusinessId,businessId); + List files = list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(files)){ + files.forEach(n->{ + String fileUrl = fileUrlContext.getFileUrl(n.getStoreFlag(), n.getPathUrl()); + n.setPathUrl(fileUrl); + }); + } + return BeanConv.toBeanList(files,FileVO.class); + }catch (Exception e){ + log.error("查询业务对应附件:{}异常:{}", businessId,ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.SELECT_FILE_BUSINESSID_FAIL); + } + } + + @Override + @Cacheable(value = FileCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#fileVO.hashCode()") + public Page findFileVOPage(FileVO fileVO, int pageNum , int pageSize) { + try { + Page page = new Page<>(pageNum,pageSize); + QueryWrapper queryWrapper = queryWrapper(fileVO); + Page fileVOPage = BeanConv.toPage(page(page, queryWrapper), FileVO.class); + if (!EmptyUtil.isNullOrEmpty(fileVOPage)&&!EmptyUtil.isNullOrEmpty(fileVOPage.getRecords())){ + fileVOPage.getRecords().forEach(n->{ + n.setPathUrl(fileUrlContext.getFileUrl(n.getStoreFlag(), n.getPathUrl())); + }); + } + return fileVOPage; + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.PAGE_FAIL); + } + } + + @Override + public List needClearFile() { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + LocalDateTime localDateTime = LocalDateTime.now().minusSeconds(fileDelayTime/1000); + queryWrapper.lambda().isNull(File::getBusinessId).lt(File::getCreateTime,localDateTime); + return BeanConv.toBeanList(list(queryWrapper), FileVO.class); + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.SELECT_FILE_BUSINESSID_FAIL); + } + } + + @Override + public FileVO needClearFileById(String id) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + LocalDateTime localDateTime = LocalDateTime.now().minusSeconds(fileDelayTime/1000); + queryWrapper.lambda().isNull(File::getBusinessId).lt(File::getCreateTime,localDateTime).eq(File::getId,id); + return BeanConv.toBean(getOne(queryWrapper),FileVO.class); + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.SELECT_FILE_BUSINESSID_FAIL); + } + + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,key = "#fileVO.id"), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,key = "#fileVO.businessId")}) + public FileVO bindFile(FileVO fileVO) { + try { + //修改file表中的businessId + File file = BeanConv.toBean(fileVO, File.class); + boolean flag = updateById(file); + //构建完整返回对象 + if (flag){ + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.lambda().eq(File::getBusinessId,fileVO.getBusinessId()); + File fileResult = getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(file)){ + fileResult.setPathUrl(fileUrlContext.getFileUrl(fileResult.getStoreFlag(), fileResult.getPathUrl())); + } + return BeanConv.toBean(fileResult,FileVO.class); + } + return null; + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.SELECT_FILE_BUSINESSID_FAIL); + } + + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,key = "#fileVOs.get(0).getBusinessId()")}) + public List bindBatchFile(List fileVOs) { + Long businessId = fileVOs.get(0).getBusinessId(); + if (EmptyUtil.isNullOrEmpty(businessId)) { + throw new ProjectException(FileEnum.SELECT_BUSUBBESSID_FAIL); + } + try { + //修改file表中的businessId + updateBatchById(BeanConv.toBeanList(fileVOs, File.class)); + QueryWrapper queryWrapper = new QueryWrapper(); + queryWrapper.lambda().eq(File::getBusinessId,businessId); + List files = list(queryWrapper); + //构建完整返回对象 + if (!EmptyUtil.isNullOrEmpty(files)){ + files.forEach(n->{ + String fileUrl = fileUrlContext.getFileUrl(n.getStoreFlag(), n.getPathUrl()); + n.setPathUrl(fileUrl); + }); + } + return BeanConv.toBeanList(files,FileVO.class); + } catch (Exception e) { + log.error("绑定业务:{}异常:{}", fileVOs.toString(),ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.BIND_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true), + @CacheEvict(value = FileCacheConstant.LIST,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,key = "#fileVO.getBusinessId()")}) + public Boolean replaceBindFile(FileVO fileVO) { + try { + //删除老图片 + ArrayList ids = Lists.newArrayList(); + ids.add(fileVO.getId()); + deleteInIds(ids); + //绑定新图片 + FileVO fileVOResult = bindFile(fileVO); + return !EmptyUtil.isNullOrEmpty(fileVOResult); + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.BIND_FAIL); + } + + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true), + @CacheEvict(value = FileCacheConstant.LIST,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,key = "#fileVOs.get(0).getBusinessId()")}) + public Boolean replaceBindBatchFile(List fileVOs) { + try { + //查询当前业务图片 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(File::getBusinessId,fileVOs.get(0).getBusinessId()); + List oldList = list(queryWrapper); + List oldIds = oldList.stream().map(File::getId).collect(Collectors.toList()); + List newIds = fileVOs.stream().map(FileVO::getId).collect(Collectors.toList()); + //删除:老图片对新图片的差集 + List delIds = oldIds.stream().filter(n -> { + return !newIds.contains(n); + }).collect(Collectors.toList()); + if (!EmptyUtil.isNullOrEmpty(delIds)){ + deleteInIds(delIds); + } + //绑定新图片 + List newFiles = fileVOs.stream().filter(n -> { + return !oldIds.contains(n.getId()); + }).collect(Collectors.toList()); + if (!EmptyUtil.isNullOrEmpty(newFiles)){ + List fileVOsResult = bindBatchFile(newFiles); + return !EmptyUtil.isNullOrEmpty(fileVOsResult); + } + return true; + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.BIND_FAIL); + } + } + + @Override + @Cacheable(value = FileCacheConstant.LIST,key ="#businessIds.hashCode()") + public List findInBusinessIds(List businessIds) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(File::getBusinessId,businessIds); + List fileVOList = BeanConv.toBeanList(list(queryWrapper), FileVO.class); + for (FileVO fileVO : fileVOList) { + fileVO.setPathUrl(fileUrlContext.getFileUrl(fileVO.getStoreFlag(), fileVO.getPathUrl())); + } + return fileVOList; + }catch (Exception e){ + log.error("查询文件分页异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.BIND_FAIL); + } + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true), + @CacheEvict(value = FileCacheConstant.LIST,key ="#businessIds.hashCode()"), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true)}) + @Transactional + public Boolean deleteInBusinessIds(List businessIds) { + try { + //删除数据库 + List files = findInBusinessIds(businessIds); + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(File::getBusinessId,businessIds); + Boolean flag = remove(updateWrapper); + if (!flag){ + throw new ProjectException(FileEnum.DELETE_FAIL); + } + //删除OSS中的图片 + if (!EmptyUtil.isNullOrEmpty(files)){ + List getPathUrls = files.stream().map(FileVO::getPathUrl).collect(Collectors.toList()); + FileVO fileVO = files.get(0); + String bucketName = fileVO.getBucketName(); + String storeFlag = fileVO.getStoreFlag(); + fileStorageAdapter.deleteBatch(storeFlag,bucketName,getPathUrls); + } + return flag; + }catch (Exception e){ + log.error("删除业务对应附件:{}失败",businessIds); + throw new ProjectException(FileEnum.DELETE_FILE_BUSINESSID_FAIL); + } + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true), + @CacheEvict(value = FileCacheConstant.LIST,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true)}) + public Boolean deleteInIds(List ids) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(File::getId,ids); + List files = list(queryWrapper); + boolean flag = removeByIds(ids); + if (!flag){ + throw new ProjectException(FileEnum.DELETE_FAIL); + } + //移除对象存储数据 + for (File file : files) { + fileStorageAdapter.delete(file.getStoreFlag(),file.getBucketName(),file.getPathUrl()); + } + return flag; + }catch (Exception e){ + log.error("删除文件异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.DELETE_FAIL); + } + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,allEntries = true)}) + @Transactional + public Boolean clearFile() { + try { + //查询需要清理的文件 + List fileList = needClearFile(); + if (EmptyUtil.isNullOrEmpty(fileList)){ + return true; + } + List fileListIds = fileList.stream().map(FileVO::getId).collect(Collectors.toList()); + //移除数据库信息 + Boolean flag = removeByIds(fileListIds); + //移除对象存储数据 + for (FileVO fileVO : fileList) { + fileStorageAdapter.delete(fileVO.getStoreFlag(),fileVO.getBucketName(),fileVO.getPathUrl()); + } + return flag; + }catch (Exception e){ + log.error("定时清理文件异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.CLEAR_FILE_TASK_FAIL); + } + } + + @Override + @Caching(evict = {@CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BASIC,key = "#id"), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true)}) + @Transactional + public Boolean clearFileById(String id) { + try { + FileVO fileVO = needClearFileById(id); + if (EmptyUtil.isNullOrEmpty(fileVO)){ + return true; + } + Boolean flag = removeById(fileVO.getId()); + if (!flag){ + throw new ProjectException(FileEnum.DELETE_FAIL); + } + //删除OSS中的图片 + if (!EmptyUtil.isNullOrEmpty(fileVO)){ + fileStorageAdapter.delete(fileVO.getStoreFlag(),fileVO.getBucketName(),fileVO.getPathUrl()); + } + return flag; + }catch (Exception e){ + log.error("定时清理文件异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.CLEAR_FILE_TASK_FAIL); + } + } + + @Override + public Set findBusinessIdAll() { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(File::getDataState, SuperConstant.DATA_STATE_0).isNotNull(File::getBusinessId); + List list = list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(list)){ + return list.stream().map(File::getBusinessId).collect(Collectors.toSet()); + } + return null; + }catch (Exception e){ + log.error("查询附件列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.SELECT_BUSUBBESSID_FAIL); + } + } + + @Override + @Caching( + evict = { + @CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true)}, + put={@CachePut(value =FileCacheConstant.BASIC,key = "#result.id")}) + @Transactional + public FileVO upLoad(UploadMultipartFile multipartFile, FileVO fileVO) throws ProjectException { + //获得文件ByteArrayInputStream + ByteArrayInputStream byteArrayInputStream =new ByteArrayInputStream(multipartFile.getFileByte()); + try { + //文件重命名 + String filename = identifierGenerator.nextId(fileVO)+"-"+multipartFile.getOriginalFilename();; + fileVO.setFileName(filename); + //文件后缀名 + String suffix = fileVO.getFileName().substring(fileVO.getFileName().lastIndexOf(".")); + fileVO.setSuffix(suffix); + //调用简单上传 + String pathUrl = fileStorageAdapter.uploadFile(fileVO, byteArrayInputStream); + //保存数据库 + File file = BeanConv.toBean(fileVO, File.class); + file.setStatus(FileConstant.STATUS_SUCCEED); + file.setPathUrl(pathUrl); + boolean flag = save(file); + if (!flag){ + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } + //补全完整路径 + pathUrl = fileUrlContext.getFileUrl(fileVO.getStoreFlag(), pathUrl); + fileVO.setId(file.getId()); + fileVO.setPathUrl(pathUrl); + //发送延迟信息:上传如果超过10分钟不进行文件业务绑定则会被消息队列清空 + Long messageId = (Long) identifierGenerator.nextId(fileVO); + MqMessage mqMessage = MqMessage.builder() + .id(messageId) + .title("file-message") + .content(JSONObject.toJSONString(fileVO)) + .messageType("file-request") + .produceTime(Timestamp.valueOf(LocalDateTime.now())) + .sender("system") + .build(); + Message message = MessageBuilder.withPayload(mqMessage).setHeader("x-delay", fileDelayTime).build(); + fileSource.fileOutput().send(message); + return fileVO; + }catch (Exception e) { + log.error("文件上传异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.UPLOAD_FAIL); + }finally { + if (byteArrayInputStream != null) { + try { + byteArrayInputStream.close(); + } catch (Exception e) { + log.error("文件上传操作失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + } + } + } + } + + @Override + @Caching(evict = { + @CacheEvict(value = FileCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = FileCacheConstant.BUSINESS_KEY,allEntries = true)}, + put={@CachePut(value =FileCacheConstant.BASIC,key = "#result.id")}) + @Transactional + public FileVO initiateMultipartUpload(FileVO fileVO) { + try { + //文件重命名 + String filename = identifierGenerator.nextId(fileVO)+"-"+fileVO.getFileName(); + fileVO.setFileName(filename); + //文件后缀名 + String suffix = fileVO.getFileName().substring(fileVO.getFileName().lastIndexOf(".")); + fileVO.setSuffix(suffix); + //分片上传-初始化 + File file = fileStorageAdapter.initiateMultipartUpload(fileVO); + //保存数据库 + file.setBusinessType(fileVO.getBusinessType()); + file.setSuffix(suffix); + file.setStoreFlag(fileVO.getStoreFlag()); + file.setMd5(fileVO.getMd5()); + file.setCompanyNo(fileVO.getCompanyNo()); + file.setStatus(FileConstant.STATUS_SENDING); + boolean flag = save(file); + if (!flag){ + throw new ProjectException(FileEnum.UPLOAD_FAIL); + } + //补全完整路径 + FileVO fileVOResult = BeanConv.toBean(file, FileVO.class); + String pathUrl = fileUrlContext.getFileUrl(fileVOResult.getStoreFlag(), fileVOResult.getPathUrl()); + fileVOResult.setPathUrl(pathUrl); + //发送队列信息:上传如果超过10分钟不进行文件业务绑定则会被消息队列清空 + Long messageId = (Long) identifierGenerator.nextId(fileVOResult); + MqMessage mqMessage = MqMessage.builder() + .id(messageId) + .title("file-message") + .content(JSONObject.toJSONString(fileVOResult)) + .messageType("file-request") + .produceTime(Timestamp.valueOf(LocalDateTime.now())) + .sender("system") + .build(); + Message message = MessageBuilder.withPayload(mqMessage).setHeader("x-delay", fileDelayTime).build(); + fileSource.fileOutput().send(message); + return fileVOResult; + } catch (Exception e) { + log.error("文件上传初始化异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.INIT_UPLOAD_FAIL); + } + } + + @Override + @Transactional + public String uploadPart(UploadMultipartFile multipartFile, FilePartVO filePartVO) { + try { + //上传分片数据 + String partETagString = fileStorageAdapter.uploadPart(filePartVO, new ByteArrayInputStream(multipartFile.getFileByte())); + //保存分片信息 + FilePart filePart = BeanConv.toBean(filePartVO, FilePart.class); + filePart.setUploadResult(partETagString); + filePartService.save(filePart); + return partETagString; + }catch (Exception e) { + log.error("文件分片上传异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.UPLOAD_PART_FAIL); + } + } + + @Override + @Transactional + public String completeMultipartUpload(FileVO fileVO) { + try { + //移除分片记录 + Boolean flag = filePartService.deleteFilePartByUpLoadId(fileVO.getUploadId()); + if (!flag){ + throw new ProjectException(FileEnum.COMPLETE_PART_FAIL); + } + //修改文件记录状态 + fileVO.setStatus(FileConstant.STATUS_SUCCEED); + flag = updateById(BeanConv.toBean(fileVO,File.class)); + if (!flag){ + throw new ProjectException(FileEnum.COMPLETE_PART_FAIL); + } + //合并结果 + return fileStorageAdapter.completeMultipartUpload(fileVO); + } catch (Exception e) { + log.error("文件分片上传异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.COMPLETE_PART_FAIL); + } + } + + @Override + @Cacheable(value = FileCacheConstant.BASIC,key = "#fileId") + public FileVO downLoad(Long fileId) { + try { + File file = getById(fileId); + InputStream inputStream = fileStorageAdapter + .downloadFile(file.getStoreFlag(), file.getBucketName(), file.getPathUrl()); + byte[] bytes = IOUtils.toByteArray(inputStream); + String base64Image = EncodesUtil.encodeBase64(bytes); + FileVO fileVO = BeanConv.toBean(file, FileVO.class); + fileVO.setBase64Image(base64Image); + return fileVO; + } catch (Exception e) { + log.error("文件下载传异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(FileEnum.DOWNLOAD_FAIL); + } + } +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java new file mode 100644 index 0000000..0c55d89 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/utils/FileUrlContext.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.file.utils; + +import com.itheima.sfbx.file.handler.aliyun.properties.OssAliyunConfigProperties; +import com.itheima.sfbx.file.handler.qiniu.properties.QiniuProperties; +import com.itheima.sfbx.framework.commons.constant.file.FileConstant; +import com.itheima.sfbx.framework.commons.enums.file.FileEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; + +import javax.annotation.PostConstruct; +import java.util.HashMap; +import java.util.Map; + +/** + *

+ * 获得资源文件完整路径地址上下文对象 + * 如果添加了新的对象存储资源,需要在此类中对 initMap 方法添加新的路径前缀 + *

+ * + * @Description: + */ +@Component +public class FileUrlContext { + + @Autowired + private OssAliyunConfigProperties ossAliyunConfigProperties; + + @Autowired + private QiniuProperties qiniuProperties; + + private static Map fileStoreUrlHandler =new HashMap<>(); + + @PostConstruct + public void initMap() { + // 初始化各个对象存储的文件访问路径地址 + String ossPrefixUrl = "https://" + ossAliyunConfigProperties.getBucketName() + "." + + ossAliyunConfigProperties.getEndpoint() + "/"; + String kodoPrefixUrl = "http://" + qiniuProperties.getKodo().getEndpoint() + "/"; + + fileStoreUrlHandler.put(FileConstant.ALIYUN_OSS,ossPrefixUrl); + fileStoreUrlHandler.put(FileConstant.QINIU_KODO,kodoPrefixUrl); + } + + /** + * 获得资源文件的访问地址 + * @param storeFlag String 对象存储标识 + * @param pathUrl String 相对路径 + * @return String 资源文件对应的完整路径地址 + */ + public String getFileUrl(String storeFlag, String pathUrl) { + String prefix = fileStoreUrlHandler.get(storeFlag); + if (StringUtils.isEmpty(prefix)) { + throw new ProjectException(FileEnum.FILE_PREFIX_NOT_FOUND); + } + return prefix + pathUrl; + } + +} diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java new file mode 100644 index 0000000..18382f2 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileBusinessController.java @@ -0,0 +1,71 @@ +package com.itheima.sfbx.file.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.file.service.IFileService; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName FileController.java + * @Description 附件展示维护controller + */ +@RestController +@RequestMapping("file") +@Api(tags = "附件controller") +@Slf4j +public class FileBusinessController { + + @Autowired + IFileService fileService; + + /*** + * @description 附件分页列表 + * @param fileVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "查询附件分页",notes = "查询附件分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "fileVO",value = "附件查询对象",required = false,dataType = "FileVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters ={"fileVO.businessType","","fileVO.pathUrl", + "fileVO.dataState","fileVO.status"} ) + public ResponseResult> findFileVOPage( + @RequestBody FileVO fileVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + //查询附件分页信息 + Page fileVOPage = fileService.findFileVOPage(fileVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(fileVOPage); + } + + /** + * @Description 移除业务原图片,并批量绑定新的图片到业务上 + * @param fileVOs 附件对象 + * @return + */ + @PutMapping(value = "replace-bind-batch-file") + @ApiOperation(value = "移除业务原图片,并绑定新的图片到业务上",notes = "移除业务原图片,并绑定新的图片到业务上") + @ApiImplicitParam(name = "fileVOs",value = "附件对象",required = true,dataType = "FileVO") + public ResponseResult replaceBindBatchFile(@RequestBody List fileVOs){ + Boolean flag = fileService.replaceBindBatchFile(fileVOs); + return ResponseResultBuild.successBuild(flag); + } +} + diff --git a/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java new file mode 100644 index 0000000..2326053 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/java/com/itheima/sfbx/file/web/FileUpLoadController.java @@ -0,0 +1,104 @@ +package com.itheima.sfbx.file.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.file.service.IFileService; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.file.FilePartVO; +import com.itheima.sfbx.framework.commons.dto.file.UploadMultipartFile; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import java.io.IOException; + +/** + * @ClassName FileUpLoadController.java + * @Description 文件上传接口 + */ +@RestController +@RequestMapping("file") +@Api(tags = "附件controller") +@Slf4j +public class FileUpLoadController { + + @Autowired + IFileService fileService; + + /*** + * @description 文件上传-简单上传-前端直接调用 + * @param file 上传对象 + * @return: com.itheima.travel.req.FileVO + */ + @PostMapping(value = "up-load") + @ApiOperation(value = "文件上传-简单上传",notes = "文件上传-简单上传") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "form", name = "file", value = "文件对象", required = true, dataTypeClass = MultipartFile.class) + }) + @ApiOperationSupport(includeParameters = {"fileVO.businessType","fileVO.bucketName","fileVO.storeFlag","fileVO.autoCatalog"}) + public ResponseResult upLoad( + @RequestParam("file") MultipartFile file, + FileVO fileVO) throws IOException { + fileVO.setCompanyNo(SubjectContent.getCompanyNo()); + //构建文件上传对象 + UploadMultipartFile uploadMultipartFile = UploadMultipartFile + .builder() + .originalFilename(file.getOriginalFilename()) + .fileByte(IOUtils.toByteArray(file.getInputStream())) + .build(); + //执行文件上传 + FileVO fileVOResult = fileService.upLoad(uploadMultipartFile, fileVO); + return ResponseResultBuild.successBuild(fileVOResult); + + } + + @PostMapping(value = "initiate-multipart-up-load") + @ApiOperation(value = "文件分片上传-初始化",notes = "文件分片上传-初始化") + @ApiImplicitParam(name = "fileVO",value = "文件对象",required = true,dataType = "FileVO") + public ResponseResult initiateMultipartUpload( + @RequestBody FileVO fileVO){ + fileVO.setCompanyNo(SubjectContent.getCompanyNo()); + //初始化上传Id + FileVO fileVOResult = fileService.initiateMultipartUpload(fileVO); + return ResponseResultBuild.successBuild(fileVOResult); + } + + @PostMapping(value = "up-load-part") + @ApiOperation(value = "文件分片上传-上传分片",notes = "文件分片上传-上传分片") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "form", name = "file", value = "文件对象", required = true, dataTypeClass = MultipartFile.class) + }) + public ResponseResult uploadPart( + @RequestParam("file") MultipartFile file, + FilePartVO filePartVO)throws IOException { + filePartVO.setCompanyNo(SubjectContent.getCompanyNo()); + //构建文件上次对象 + UploadMultipartFile uploadMultipartFile = UploadMultipartFile + .builder() + .originalFilename(file.getOriginalFilename()) + .fileByte(IOUtils.toByteArray(file.getInputStream())) + .build(); + //上传分片返回partETagJson + String partETagJson = fileService.uploadPart(uploadMultipartFile,filePartVO); + return ResponseResultBuild.successBuild(partETagJson); + } + + @PostMapping(value = "complete-multipart-up-load") + @ApiOperation(value = "文件分片上传-合并分片",notes = "文件分片上传-合并分片") + @ApiImplicitParam(name = "fileVO",value = "文件对象",required = true,dataType = "FileVO") + public ResponseResult completeMultipartUpload( + @RequestBody FileVO fileVO)throws IOException { + //问上传分片返回partETagJson + String eTagJson = fileService.completeMultipartUpload(fileVO); + return ResponseResultBuild.successBuild(eTagJson); + } + +} diff --git a/day02/sfbx-file/file-web/src/main/resources/banner.txt b/day02/sfbx-file/file-web/src/main/resources/banner.txt new file mode 100644 index 0000000..065e5dd --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 献给可爱的传智人 :: diff --git a/day02/sfbx-file/file-web/src/main/resources/bootstrap-test.yml b/day02/sfbx-file/file-web/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..e64aca3 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/bootstrap-test.yml @@ -0,0 +1,54 @@ +#服务配置 +server: + #端口 + port: 7075 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + config: + activate: + on-profile: + - test + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: file-web + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-file.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-file/file-web/src/main/resources/bootstrap.yml b/day02/sfbx-file/file-web/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..c202534 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/bootstrap.yml @@ -0,0 +1,53 @@ +#服务配置 +server: + #端口 + port: 7075 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + servlet: + multipart: + enabled: true + max-file-size: 10MB + max-request-size: 20MB + profiles: + active: dev + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: file-web + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-file.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-file/file-web/src/main/resources/generrator.properties b/day02/sfbx-file/file-web/src/main/resources/generrator.properties new file mode 100644 index 0000000..db01d65 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/generrator.properties @@ -0,0 +1,47 @@ +#\u6570\u636E\u5E93\u5730\u5740 +url=jdbc:mysql://192.168.12.129:3306/restkeeper-file?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&tinyInt1isBit=false +#\u6570\u636E\u5E93\u8D26\u53F7 +userName=root +#\u6570\u636E\u5E93\u5BC6\u7801 +password=pass +#services\u7684src\u8DEF\u5F84 +serviceProjectPath=E:/itheima-project-parent/itheima-project-cloud/itheima-module-file/module-file-web +#VO\u7684src\u8DEF\u5F84 +voProjectPath=E:/itheima-project-parent/itheima-project-cloud/itheima-component/component-vo +#\u4F5C\u8005 +author=Admin +#\u5305\u540D\u79F0 +parent=com.itheima +#\u6A21\u5757\u540D\u79F0 +moduleName=project +#\u6570\u636E\u5E93\u8868\u524D\u7F00 +tablePrefix =tab_ +#\u9700\u8981\u751F\u6210\u7684\u8868\u540D\uFF0C\u4F7F\u7528\uFF0C\u5206\u5272 +tableName= tab_file_part +#\u9700\u8981\u751F\u6210\u9644\u4EF6\u76F8\u5173\u7684\u8868 +tablesFile= +#pojo\u7684\u7236\u7C7B +SuperEntityClass = com.itheima.easy.basic.BasicPojo +#pojo\u7684\u901A\u7528\u5B57\u6BB5 +superEntityColumns = id,created_time,updated_time,sharding_id,enable_flag +#\u751F\u6210\u89C4\u5219 +constant=true +constant.ftl.path=/templates/constant.java +enums=true +enums.ftl.path=/templates/enums.java +vo=true +vo.ftl.path=/templates/vo.java +entity=true +entity.ftl.path=/templates/entity.java +mapper=true +mapper.ftl.path=/templates/mapper.java +service=true +service.ftl.path=/templates/service.java +serviceImpl=true +serviceImpl.ftl.path=/templates/serviceImpl.java +face=false +face.ftl.path=/templates/face.java +faceImpl=false +faceImpl.ftl.path=/templates/faceImpl.java +controller=false +controller.ftl.path=/templates/controller.java diff --git a/day02/sfbx-file/file-web/src/main/resources/logback.xml b/day02/sfbx-file/file-web/src/main/resources/logback.xml new file mode 100644 index 0000000..304fe0e --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/file-web-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl new file mode 100644 index 0000000..1dbc906 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/constant.java.ftl @@ -0,0 +1,24 @@ +package com.itheima.easy.constant; + +/** +* @Description:${table.comment!}缓存常量 +*/ +public class ${entity}CacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "${controllerMappingHyphen}:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl new file mode 100644 index 0000000..2516f14 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/controller.java.ftl @@ -0,0 +1,128 @@ +package ${package.Controller}; + + +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.trade.${entity}Enum; +import com.itheima.easy.face.${entity}Face; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +<#if restControllerStyle> +import org.springframework.web.bind.annotation.RestController; +<#else> +import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> +import ${superControllerClassPackage}; + + +/** + * @Description:${table.comment!}前端控制器 + */ +@Slf4j +@Api(tags = "${table.comment!}controller") +<#if restControllerStyle> +@RestController +<#else> +@Controller + +@RequestMapping("<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> +class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> +<#if superControllerClass??> +public class ${table.controllerName} extends ${superControllerClass} { +<#else> +public class ${table.controllerName} { + + + @Autowired + ${entity}Face ${entity?uncap_first}Face; + + /*** + * @description 多条件查询${table.comment!}分页列表 + * @param ${entity?uncap_first}Vo ${table.comment!}Vo查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page<${entity}Vo> + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "${table.comment!}分页",notes = "${table.comment!}分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + public ResponseResult> find${entity}VoPage( + @RequestBody ${entity}Vo ${entity?uncap_first}Vo, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page<${entity}Vo> ${entity?uncap_first}VoPage = ${entity?uncap_first}Face.find${entity}VoPage(${entity?uncap_first}Vo, pageNum, pageSize); + return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoPage); + } + + /** + * @Description 保存${table.comment!} + * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象 + * @return ${entity}Vo + */ + @PutMapping + @ApiOperation(value = "添加${entity}",notes = "添加${entity}") + @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo") + public ResponseResult<${entity}Vo> create${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) { + ${entity}Vo ${entity?uncap_first}VoResult = ${entity?uncap_first}Face.create${entity}Vo(${entity?uncap_first}Vo); + return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoResult); + } + + /** + * @Description 修改${table.comment!} + * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改${table.comment!}",notes = "修改${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo") + public ResponseResult update${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) { + Boolean flag = ${entity?uncap_first}Face.update${entity}Vo(${entity?uncap_first}Vo); + return ResponseResultBuild.build(${entity}Enum.SUCCEED,flag); + } + + /** + * @Description 删除${table.comment!} + * @param ${entity?uncap_first}Vo 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除${table.comment!}",notes = "删除${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo") + public ResponseResult delete${entity}(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) { + Boolean flag = ${entity?uncap_first}Face.delete${entity}Vo(${entity?uncap_first}Vo.getCheckedIds()); + return ResponseResultBuild.build(${entity}Enum.SUCCEED,flag); + } + + /*** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}Vo ${table.comment!}Vo对象 + * @return List<${entity}Vo> + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询${table.comment!}列表",notes = "多条件查询${table.comment!}列表") + @ApiImplicitParam(name = "${entity?uncap_first}Vo",value = "${table.comment!}Vo对象",required = true,dataType = "${entity}Vo") + public ResponseResult> ${entity?uncap_first}List(@RequestBody ${entity}Vo ${entity?uncap_first}Vo) { + List<${entity}Vo> ${entity?uncap_first}VoList = ${entity?uncap_first}Face.find${entity}VoList(${entity?uncap_first}Vo); + return ResponseResultBuild.build(${entity}Enum.SUCCEED,${entity?uncap_first}VoList); + } + +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl new file mode 100644 index 0000000..3e63065 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> +import ${pkg}; + +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +<#if superEntityClass??> +@EqualsAndHashCode(callSuper = true) + <#else> +@EqualsAndHashCode(callSuper = false) + + +<#if table.convert> +@TableName("${table.name}") + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> +public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> +public class ${entity} extends Model<${entity}> { +<#else> +public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + + + @Builder + public ${entity}(Long id,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.name}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.name}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.name}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.name}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.name}") + + <#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + + <#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if entityBuilderModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if entityBuilderModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl new file mode 100644 index 0000000..53e4435 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/enums.java.ftl @@ -0,0 +1,38 @@ +package com.itheima.easy.enums; + +import com.itheima.easy.basic.IBasicEnum; + +/** +* @ClassName ${entity}Enum.java +* @Description ${table.comment!}枚举 +*/ + +public enum ${entity}Enum implements IBasicEnum { + + SUCCEED("200","操作成功"), + FAIL("1000","操作失败"), + PAGE_FAIL("53001", "查询${table.comment!}列表失败"), + SAVE_FAIL("53002", "保存${table.comment!}失败"), + UPDATE_FAIL("53003", "修改${table.comment!}失败"), + DEL_FAIL("53004", "删除${table.comment!}失败"), + LIST_FAIL("53005", "查询${table.comment!}失败") + ; + + private String code; + + private String msg; + + ${entity}Enum(String code, String msg) { + this.code = code; + this.msg = msg; + } + + public String getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/face.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/face.java.ftl new file mode 100644 index 0000000..b49f6a2 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/face.java.ftl @@ -0,0 +1,53 @@ +package com.itheima.easy.face; + +import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:${table.comment!}Face服务类 + */ +<#if kotlin> +interface ${entity}Face +<#else> +public interface ${entity}Face { + + /** + * @Description 多条件查询${table.comment!}分页列表 + * @param ${entity?uncap_first}Vo 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page<${entity}> + */ + Page<${entity}Vo> find${entity}VoPage(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize); + + /** + * @Description 创建${table.comment!} + * @param ${entity?uncap_first}Vo 对象信息 + * @return ${entity} + */ + ${entity}Vo create${entity}Vo(${entity}Vo ${entity?uncap_first}Vo); + + /** + * @Description 修改${table.comment!} + * @param ${entity?uncap_first}Vo 对象信息 + * @return Boolean + */ + Boolean update${entity}Vo(${entity}Vo ${entity?uncap_first}Vo); + + /** + * @Description 删除${table.comment!} + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete${entity}Vo(String[] checkedIds); + + /** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}Vo 查询条件 + * @return: List<${entity}> + */ + List<${entity}Vo> find${entity}VoList(${entity}Vo ${entity?uncap_first}Vo); +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl new file mode 100644 index 0000000..0562ef6 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/faceImpl.java.ftl @@ -0,0 +1,188 @@ +package com.itheima.easy.face.impl; + +import ${package.Entity}.${entity}; +import ${package.Service}.${table.serviceName}; +import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.easy.face.${entity}Face; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.constant.trade.${entity}CacheConstant; +import com.itheima.sfbx.framework.commons.enums.trade.${entity}Enum; +import org.springframework.transaction.annotation.Transactional; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import java.util.List; +import java.util.ArrayList; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.easy.feign.FileFeign; + + +import java.util.List; +/** + * @Description:${table.comment!}Face服务实现类 + */ +<#if kotlin> +open class ${entity}FaceImpl : ${entity}Face { + +} +<#else> +@Slf4j +@Component +public class ${entity}FaceImpl implements ${entity}Face { + + @Autowired + I${entity}Service ${entity?uncap_first}Service; + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @Autowired + FileFeign fileFeign; + + + + @Override + @Cacheable(value = ${entity}CacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#${entity?uncap_first}Vo.hashCode()") + public Page<${entity}Vo> find${entity}VoPage(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize) { + try { + Page<${entity}> page = ${entity?uncap_first}Service.find${entity}Page(${entity?uncap_first}Vo, pageNum, pageSize); + Page<${entity}Vo> pageVo =BeanConv.toPage(page,${entity}Vo.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //查询记录结果 + List<${entity}Vo> records = pageVo.getRecords(); + //处理图片 + if (!EmptyUtil.isNullOrEmpty(records)){ + records.forEach(n->{ + ResponseResult> responseWrap = fileFeign + .findFileVOByBusinessId(FileVO.builder().businessId(n.getId()).build()); + if (!EmptyUtil.isNullOrEmpty(responseWrap.getDatas())){ + n.setFileVOs(responseWrap.getDatas()); + }else { + n.setFileVOs(new ArrayList<>()); + } + }); + } + + + return pageVo; + }catch (Exception e){ + log.error("${table.comment!}列表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.PAGE_FAIL); + } + } + + @Transactional + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =${entity}CacheConstant.BASIC,key = "#result.id")}) + @Override + public ${entity}Vo create${entity}Vo(${entity}Vo ${entity?uncap_first}Vo) { + try { + ${entity}Vo ${entity?uncap_first}VoResult = BeanConv.toBean(${entity?uncap_first}Service.create${entity}(${entity?uncap_first}Vo), ${entity}Vo.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //绑定附件 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VoResult)&&!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getFileVOs())){ + ${entity?uncap_first}Vo.getFileVOs().forEach(n->{n.setBusinessId(${entity?uncap_first}VoResult.getId());}); + //绑定图片 + ResponseResult> listResponseResult = fileFeign.bindBatchBusinessId(${entity?uncap_first}Vo.getFileVOs()); + ${entity?uncap_first}VoResult.setFileVOs(listResponseResult.getDatas()); + } + + + return ${entity?uncap_first}VoResult; + } catch (Exception e) { + log.error("保存${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.SAVE_FAIL); + } + } + + @Transactional + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true), + @CacheEvict(value =${entity}CacheConstant.BASIC,key = "#${entity?uncap_first}Vo.id")}) + @Override + public Boolean update${entity}Vo(${entity}Vo ${entity?uncap_first}Vo) { + try { + Boolean flag = ${entity?uncap_first}Service.update${entity}(${entity?uncap_first}Vo); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + if (flag){ + //移除业务原图片,并绑定新的图片到业务上 + fileFeign.replaceBindBatchBusinessId(${entity?uncap_first}Vo.getFileVOs()); + } + + + return flag; + } catch (Exception e) { + log.error("修改${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.UPDATE_FAIL); + } + } + + @Transactional + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)}) + @Override + public Boolean delete${entity}Vo(String[] checkedIds) { + try { + Boolean flag = ${entity?uncap_first}Service.delete${entity}(checkedIds); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + if (flag){ + //删除图片 + for (String checkedId : checkedIds) { + fileFeign.deleteFileVOByBusinessId(FileVO.builder() + .businessId(Long.valueOf(checkedId)) + .build()); + } + } + + + return flag; + } catch (Exception e) { + log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = ${entity}CacheConstant.LIST,key ="#${entity?uncap_first}Vo.hashCode()") + public List<${entity}Vo> find${entity}VoList(${entity}Vo ${entity?uncap_first}Vo) { + try { + List<${entity}Vo> records = BeanConv.toBeanList(${entity?uncap_first}Service.find${entity}List(${entity?uncap_first}Vo),${entity}Vo.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //处理图片 + if (!EmptyUtil.isNullOrEmpty(records)){ + records.forEach(n->{ + ResponseResult> responseWrap = fileFeign + .findFileVOByBusinessId(FileVO.builder().businessId(n.getId()).build()); + if (!EmptyUtil.isNullOrEmpty(responseWrap.getDatas())){ + n.setFileVOs(responseWrap.getDatas()); + }else { + n.setFileVOs(new ArrayList<>()); + } + }); + } + + + return records; + } catch (Exception e) { + log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.LIST_FAIL); + } + } +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl new file mode 100644 index 0000000..b0fbe2d --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/mapper.java.ftl @@ -0,0 +1,15 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; + +/** + * @Description:${table.comment!}Mapper接口 + */ +<#if kotlin> +interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> +public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..d9ca71c --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + +<#if enableCache> + + + + +<#if baseResultMap> + + +<#list table.fields as field> +<#if field.keyFlag><#--生成主键排在第一位--> + + + +<#list table.commonFields as field><#--生成公共字段 --> + + +<#list table.fields as field> +<#if !field.keyFlag><#--生成普通字段 --> + + + + + + +<#if baseColumnList> + + +<#list table.commonFields as field> + ${field.name}, + + ${table.fieldNames} + + + + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/service.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/service.java.ftl new file mode 100644 index 0000000..a36b0fc --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/service.java.ftl @@ -0,0 +1,55 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; +import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:${table.comment!}服务类 + */ +<#if kotlin> +interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> +public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + + /** + * @Description 多条件查询${table.comment!}分页列表 + * @param ${entity?uncap_first}Vo 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page<${entity}> + */ + Page<${entity}> find${entity}Page(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize); + + /** + * @Description 创建${table.comment!} + * @param ${entity?uncap_first}Vo 对象信息 + * @return ${entity} + */ + ${entity} create${entity}(${entity}Vo ${entity?uncap_first}Vo); + + /** + * @Description 修改${table.comment!} + * @param ${entity?uncap_first}Vo 对象信息 + * @return Boolean + */ + Boolean update${entity}(${entity}Vo ${entity?uncap_first}Vo); + + /** + * @Description 删除${table.comment!} + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete${entity}(String[] checkedIds); + + /** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}Vo 查询条件 + * @return: List<${entity}> + */ + List<${entity}> find${entity}List(${entity}Vo ${entity?uncap_first}Vo); +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..95256cd --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/serviceImpl.java.ftl @@ -0,0 +1,100 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; +import com.itheima.sfbx.framework.commons.dto.trade.${entity}Vo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +/** + * @Description:${table.comment!}服务实现类 + */ +@Service +<#if kotlin> +open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + +} +<#else> +public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + + @Override + public Page<${entity}> find${entity}Page(${entity}Vo ${entity?uncap_first}Vo, int pageNum, int pageSize) { + //构建分页对象 + Page<${entity}> page = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>(); + //构建多条件查询,代码生成后自己可自行调整 + <#list table.fields as field> + //${field.comment}查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.get${field.propertyName?cap_first}())) { + queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}Vo.get${field.propertyName?cap_first}()); + } + + //状态查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getEnableFlag())) { + queryWrapper.lambda().eq(${entity}::getEnableFlag,${entity?uncap_first}Vo.getEnableFlag()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(${entity}::getCreatedTime); + //执行分页查询 + return page(page, queryWrapper); + } + + @Override + public ${entity} create${entity}(${entity}Vo ${entity?uncap_first}Vo) { + //转换${entity}Vo为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}Vo, ${entity}.class); + boolean flag = save(${entity?uncap_first}); + if (flag){ + return ${entity?uncap_first}; + } + return null; + } + + @Override + public Boolean update${entity}(${entity}Vo ${entity?uncap_first}Vo) { + //转换${entity}Vo为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}Vo, ${entity}.class); + return updateById(${entity?uncap_first}); + } + + @Override + public Boolean delete${entity}(String[] checkedIds) { + //转换数组为集合 + List ids = Arrays.asList(checkedIds); + List idsLong = new ArrayList<>(); + ids.forEach(n->{ + idsLong.add(Long.valueOf(n)); + }); + return removeByIds(idsLong); + } + + @Override + public List<${entity}> find${entity}List(${entity}Vo ${entity?uncap_first}Vo) { + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>(); + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getId())) { + queryWrapper.lambda().eq(${entity}::getId,${entity?uncap_first}Vo.getId()); + } + <#list table.fields as field> + //${field.comment}查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.get${field.propertyName?cap_first}())) { + queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}Vo.get${field.propertyName?cap_first}()); + } + + //状态查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}Vo.getEnableFlag())) { + queryWrapper.lambda().eq(${entity}::getEnableFlag,${entity?uncap_first}Vo.getEnableFlag()); + } + return list(queryWrapper); + } +} + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl new file mode 100644 index 0000000..2d9caf9 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/shopGoodsPage.ftl @@ -0,0 +1,54 @@ + + + + + + + 店铺商品详情 + + + +
+

商品信息json

+
+ ${shopGoods} +
+<#--
--> +<#--

--> +<#-- 封面图片列表--> +<#--

--> +<#--
    --> +<#--
  • 路径:
  • --> +<#--
--> +<#--
--> +<#--
--> +<#--

--> +<#-- 商品基本信息--> +<#--

--> +<#--

优惠价: 原价:

--> +<#-- --> +<#--

标题:

--> + +<#--

当前规格:

--> +<#-- --> +<#--

所有规格:

--> + +<#--

服务规则列表:

--> + +<#--
--> +<#--
--> +<#--

--> +<#-- 商品详情图片列表--> +<#--

--> +<#--
    --> +<#--
  • 路径:
  • --> +<#--
--> +<#--
--> + +

参数列表: 未提供

+

评价列表: 异步ajax查询

+

优惠券: 异步查询

+
+ + diff --git a/day02/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl b/day02/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl new file mode 100644 index 0000000..1701251 --- /dev/null +++ b/day02/sfbx-file/file-web/src/main/resources/templates/vo.java.ftl @@ -0,0 +1,75 @@ +package com.itheima.easy.vo; + +import com.itheima.easy.basic.BasicVo; +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import java.math.BigDecimal; +import java.util.Date; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor + +public class ${entity}Vo extends BasicVo { + + @Builder + public ${entity}Vo(Long id,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.propertyType=='Long'> + @JsonFormat(shape = JsonFormat.Shape.STRING) + + <#if field.propertyType=='Date'> + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + + @ApiModelProperty(value = "选中节点") + private String[] checkedIds; + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + <#if swagger2> + @ApiModelProperty(value = "文件Vo对象") + + private List fileVOs; + + +} diff --git a/day02/sfbx-file/pom.xml b/day02/sfbx-file/pom.xml new file mode 100644 index 0000000..71336e7 --- /dev/null +++ b/day02/sfbx-file/pom.xml @@ -0,0 +1,22 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-file + pom + sfbx-file + + file-interface + file-web + + + http://www.example.com + + diff --git a/day02/sfbx-framework/framework-commons/pom.xml b/day02/sfbx-framework/framework-commons/pom.xml new file mode 100644 index 0000000..748840f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/pom.xml @@ -0,0 +1,89 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-commons + framework-commons + + http://www.example.com + + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + org.springframework.boot + spring-boot-starter + + + cn.hutool + hutool-all + + + com.google.zxing + core + + + org.projectlombok + lombok + + + ma.glasnost.orika + orika-core + + + com.baomidou + mybatis-plus-extension + ${mybatis-plus-boot-starter.version} + + + com.github.xiaoymin + knife4j-spring-boot-starter + + + org.apache.commons + commons-lang3 + + + com.alibaba + fastjson + + + org.apache.commons + commons-pool2 + + + com.google.guava + guava + + + commons-codec + commons-codec + + + com.fasterxml.jackson.core + jackson-annotations + + + com.alibaba + transmittable-thread-local + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + + + diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java new file mode 100644 index 0000000..fdd154f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/basic/ResponseResult.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.framework.commons.basic; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @Description 返回结果 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ResponseResult implements Serializable { + + @ApiModelProperty(value = "状态码") + private Integer code; + + @ApiModelProperty(value = "状态信息") + private String msg; + + @ApiModelProperty(value = "返回结果") + private T data; + + @ApiModelProperty(value = "操作人Id") + private Long operatorId; + + @ApiModelProperty(value = "操作人名称") + private String operatorName; + + @ApiModelProperty(value = "操作人性别") + private String operatorSex; + + @ApiModelProperty(value = "VO类") + private String _class; + + @ApiModelProperty(value = "数据说明") + private String tip; + + @ApiModelProperty(value = "操作时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime operationTime; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java new file mode 100644 index 0000000..b6af882 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/CacheConstant.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.commons.constant.basic; + +/** + * @ClassName CacheConstant.java + * @Description 基础缓存父类 + */ +public class CacheConstant { + + //默认redis等待时间 + public static final int REDIS_WAIT_TIME = 5; + + //默认redis自动释放时间 + public static final int REDIS_LEASETIME = 4; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java new file mode 100644 index 0000000..d0707b4 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/basic/SuperConstant.java @@ -0,0 +1,54 @@ + +package com.itheima.sfbx.framework.commons.constant.basic; + + +/** + * @Description 静态变量 + */ +public class SuperConstant { + + //常量:数据有效 + public static final String DATA_STATE_0 = "0"; + + //常量:数据无效 + public static final String DATA_STATE_1 = "1"; + + //常量:数据伪删除 + public static final String DATA_STATE_2 = "2"; + + //树形根节点父Id + public static final String ROOT_PARENT_ID = "100000000000000"; + + //常量目录 + public static final String CATALOGUE = "c"; + + //常量菜单 + public static final String MENU = "m"; + + //常量平台 + public static final String SYSTEM = "s"; + + //前端显示布局 + public static final String COMPONENT_LAYOUT="Layout"; + + //登录短信验证码 + public static final String LOGIN_CODE = "login:code:"; + + //地域中国ID + public static final Long CHINA_CODE = 0L; + + //分割字符 + public static final String COMMA = ","; + + //否 + public static final String NO = "NO"; + + //是 + public static final String YES = "YES"; + + //男 + public static final String MAN = "0"; + + //女 + public static final String WOMAN = "1"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java new file mode 100644 index 0000000..66aed44 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/category/CategoryConstant.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.commons.constant.category; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; + +/** + * CategoryConstant + * + * @author: wgl + * @describe: 分类常量 + * @date: 2022/12/28 10:10 + */ +public class CategoryConstant extends SuperConstant { + + //常量:首页展示 + public static final String SHOW_INDEX_STATE_0 = "0"; + + //常量:首页不展示 + public static final String SHOW_INDEX_STATE_1 = "1"; + + + //分类类型:0推荐分类 + public static final String RECOMMEND_TYPE = "0"; + + //分类类型:1产品分类 + public static final String PRODUCT_TYPE = "1"; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java new file mode 100644 index 0000000..28f8768 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/click/ClickDTO.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.framework.commons.constant.click; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * ClickDTO + * + * @author: wgl + * @describe: 点击传入对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class ClickDTO { + + @ApiModelProperty(value = "请求id") + private String requestId; + + @ApiModelProperty(value = "域名") + private String host; + + @ApiModelProperty(value = "ip地址") + private String hostAddress; + + @ApiModelProperty(value = "请求路径") + private String requestUri; + + @ApiModelProperty(value = "请求方式") + private String requestMethod; + + @ApiModelProperty(value = "请求body") + private String requesBody; + + @ApiModelProperty(value = "应答body") + private String responseBody; + + @ApiModelProperty(value = "应答code") + private String responseCode; + + @ApiModelProperty(value = "应答msg") + private String responseMsg; + + @ApiModelProperty(value = "用户") + private Long userId; + + @ApiModelProperty(value = "用户名称") + private String userName; + + @ApiModelProperty(value = "业务类型") + private String businessType; + + @ApiModelProperty(value = "设备号") + private String deviceNumber; + + @ApiModelProperty(value = "企业编号") + private String companyNO; + + @ApiModelProperty(value = "性别") + private String sex; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java new file mode 100644 index 0000000..05000ec --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/DataDictCacheConstant.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.framework.commons.constant.dict; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName DataDictCacheConstant.java + * @Description 数字字典缓存常量 + */ +public class DataDictCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "data_dict:"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //所有父key + public static final String PARENT_KEY= PREFIX+"parent_key&ttl=-1"; + + //所有dataKey + public static final String DATA_KEY= PREFIX+"data_key&ttl=-1"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + + public static final String QUESTION = PREFIX+"question"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java new file mode 100644 index 0000000..9f80e6c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/dict/PlacesCacheConstant.java @@ -0,0 +1,20 @@ +package com.itheima.sfbx.framework.commons.constant.dict; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName PlacesCacheConstant.java + * @Description 区域缓存常量 + */ +public class PlacesCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "places:"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //获得所有不重复的ParentKey的集合 + public static final String LIST= PREFIX+"list&ttl=-1"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java new file mode 100644 index 0000000..15055eb --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileCacheConstant.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.commons.constant.file; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName DataDictCacheConstant.java + * @Description 附件缓存常量 + */ +public class FileCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "file:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //业务key前缀 + public static final String BUSINESS_KEY = PREFIX+"business_key&ttl=-1"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list分页 + public static final String LIST = PREFIX+"list";; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java new file mode 100644 index 0000000..7cb1c93 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FileConstant.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.framework.commons.constant.file; + +/** + * @ClassName FileConstant.java + * @Description 文件常量类 + */ +public class FileConstant { + + //阿里云OSS对象存储 + public static final String ALIYUN_OSS = "ALIYUN_OSS"; + + //七牛KODO对象存储 + public static final String QINIU_KODO = "QINIU_KODO"; + + //状态:成功 + public static final String STATUS_SUCCEED = "SUCCEED"; + + //状态:发送中 + public static final String STATUS_SENDING = "SENDING"; + + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java new file mode 100644 index 0000000..52d7bc2 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/file/FilePartCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.commons.constant.file; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:缓存常量 +*/ +public class FilePartCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "file-part:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java new file mode 100644 index 0000000..f320bf6 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/insure/InsureConstant.java @@ -0,0 +1,121 @@ +package com.itheima.sfbx.framework.commons.constant.insure; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.exception.ProjectException; + +import java.util.Arrays; +import java.util.List; + +/** + * BUY_MODE_1onstant + * + * @author: wgl + * @describe: 保险常量 + * @date: 2022/12/28 10:10 + */ +public class InsureConstant extends SuperConstant{ + + //常量:首页展示 + public static final String SHOW_INDEX_STATE_0 = "0"; + + //常量:首页不展示 + public static final String SHOW_INDEX_STATE_1 = "1"; + + //前端约定 金牌保险传值为0 + public static final String GOLD_INSURE_FRONT = "0"; + + //前端约定 安心赔保险传值为1 + public static final String RELIEVED_INSURE_FRONT = "1"; + + //金牌保险(是0 否1) + public static final String IS_GOLD_INSURE_SERVER = "0"; + + //安心赔(是0 否1) + public static final String IS_RELIEVED_INSURE_SERVER = "0"; + + //是否有问题(是0 否1) + public static final String IS_PROBLEM_0 = "0"; + + + //校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿 + public static final String CHECK_RULE_0 = "0"; + public static final String CHECK_RULE_1 = "1"; + public static final String CHECK_RULE_2 = "2"; + public static final String CHECK_RULE_3 = "3"; + public static final String CHECK_RULE_4 = "4"; + public static final String CHECK_RULE_5 = "5"; + public static final String CHECK_RULE_6 = "6"; + public static final String CHECK_RULE_7 = "7"; + + /** + * 根据保险分类id获取 分类名称 + * @param typeId + * @return + */ + public static String getRuleNameById(String typeId) { + switch (typeId){ + case CHECK_RULE_0: + return "医疗"; + case CHECK_RULE_1: + return "重疾"; + case CHECK_RULE_2: + return "意外"; + case CHECK_RULE_3: + return "养老"; + case CHECK_RULE_4: + return "储蓄"; + case CHECK_RULE_5: + return "旅游"; + case CHECK_RULE_6: + return "宠物"; + case CHECK_RULE_7: + return "定寿"; + default: + throw new ProjectException(); + } + } + + /** + * 获取所有的保险类型 + * @return + */ + public static List getAllCheckRule() { + return Arrays.asList(CHECK_RULE_0,CHECK_RULE_1,CHECK_RULE_2,CHECK_RULE_3,CHECK_RULE_4,CHECK_RULE_5,CHECK_RULE_6,CHECK_RULE_7); + } + + /** + * 热搜榜:人种榜类型为0 + */ + private final static String HOT_INSURANCE_TYPE_PERSON = "0"; + + /** + * 热搜榜:险种榜类型为1 + */ + private final static String HOT_INSURANCE_TYPE_INSURE = "1"; + + /** + * 判断是否人种榜,险种榜 + * @param type + * @return + */ + public static boolean checkIsInsureType(String type) { + return HOT_INSURANCE_TYPE_INSURE.equals(type); + } + + + /** + * 判断是否是理财险 + * @param checkRule + * @return + */ + public static boolean checkIsMoneyInsurance(String checkRule) { + switch (checkRule){ + case CHECK_RULE_3: + return true; + case CHECK_RULE_4: + return true; + default: + return false; + } + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java new file mode 100644 index 0000000..d6ada2c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/log/LogCacheConstant.java @@ -0,0 +1,20 @@ +package com.itheima.sfbx.framework.commons.constant.log; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName DataDictCacheConstant.java + * @Description 数字字典缓存常量 + */ +public class LogCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "log:"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java new file mode 100644 index 0000000..2d2c083 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/plan/InsurancePlanConstant.java @@ -0,0 +1,21 @@ +package com.itheima.sfbx.framework.commons.constant.plan; + +/** + * InsurancePlanConstant + * + * @author: wgl + * @describe: 保险计划常量 + * @date: 2022/12/28 10:10 + */ +public class InsurancePlanConstant { + + //按日 + public static final String Y_D = "y/d"; + + //按月 + public static final String Y_M = "y/m"; + + //按年 + public static final String Y_Y = "y/y"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java new file mode 100644 index 0000000..b2912c3 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/safeguard/SafeguardConstant.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.framework.commons.constant.safeguard; + +/** + * SafeguardConstant + * + * @author: wgl + * @describe: 保险保障项枚举类 + * @date: 2022/12/28 10:10 + */ +public class SafeguardConstant { + + //显示位置:0 列表页 + public final static String PAGE_LIST = "0"; + + //显示位置: 1 详情页 + public final static String DETAIL_INFO = "1"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java new file mode 100644 index 0000000..a48772d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelCacheConstant.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +/** + * @ClassName AuthChannelCacheConstant.java + * @Description + */ +public class AuthChannelCacheConstant { + + //缓存父包 + public static final String PREFIX= "auth-channel:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //站点 + public static final String WEBSITE = PREFIX+ "web_site:"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java new file mode 100644 index 0000000..32e2385 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/AuthChannelConstant.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +/** + * @ClassName AuthChannelCacheConstant.java + * @Description + */ +public class AuthChannelConstant { + + //投保渠道 + public static final String CHANNEL_LABEL_INSURE = "INSURE"; + + //公钥 + public static final String PUBLICKEY="publicKey"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java new file mode 100644 index 0000000..57b93d5 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyCacheConstant.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:岗位表缓存常量 +*/ +public class CompanyCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "company:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //站点 + public static final String WEBSITE = PREFIX+ "web-site:"; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java new file mode 100644 index 0000000..6f9ee29 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CompanyConstant.java @@ -0,0 +1,21 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:岗位表缓存常量 +*/ +public class CompanyConstant extends CacheConstant { + + //停用 + public static final String status_0 = "0"; + + //试用 + public static final String status_1 = "1"; + + //正式 + public static final String status_2 = "2"; + + //正式 + public static final String CHANNEL_LABEL_WECHAT = "wechat"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java new file mode 100644 index 0000000..9817ca8 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/CustomerCacheConstant.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:用户表缓存常量 +*/ +public class CustomerCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "customer:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //用户登录 + public static final String LOGIN= PREFIX+"login"; + + //建立用户与会话唯一标识之间的关系,用于判断剔除 + public static final String CUSTOMER_TOKEN = PREFIX+"cutomer-token:"; + + //建立会话唯一标识与jwtToken之间的关系,用于令牌续期 + public static final String JWT_TOKEN = PREFIX+"jwt-token:"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java new file mode 100644 index 0000000..eafd500 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptCacheConstant.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:部门表缓存常量 +*/ +public class DeptCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dept:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + public static final String TREE= PREFIX+"tree"; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java new file mode 100644 index 0000000..65fa7b7 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/DeptPostUserCacheConstant.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName DeptPostUserCacheConstant.java + * @Description 部门职位人员缓存常量 + */ +public class DeptPostUserCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dept-post-user:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //DeptPostUser-list + public static final String DEPT_POST_USER_VO= PREFIX+"vo"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java new file mode 100644 index 0000000..9df956f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthCacheConstant.java @@ -0,0 +1,22 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +/** + * @ClassName OauthCacheConstant.java + * @Description Oauth认证鉴权cache常量类 + */ +public class OauthCacheConstant { + + //缓存父包 + public static final String PREFIX= "oauth:"; + + public static final String ACCESS_TOKEN = PREFIX+"access-token:"; + + public static final String REFRESH_TOKEN = PREFIX+"refresh-token:"; + + public static final String USER_TOKEN = PREFIX+"user-token:"; + + public static final String USER_TOKEN_BIND = PREFIX+"user-token-bind:"; + + public static final String LOGIN_CODE = "login:code:"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java new file mode 100644 index 0000000..af69505 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/OauthConstant.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName OauthConstant.java + * @Description oauth2认证常量 + */ +public class OauthConstant { + //授权方式:刷新令牌 + public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token"; + + //CLIENTID + public static final String OPERATORS_PC = "operators-pc"; + public static final String OPERATORS_MOBILE = "operators-mobile"; + public static final String SERVICER_PC = "servicer-pc"; + public static final String SERVICER_MOBILE = "servicer-mobile"; + + //登录类型 + public static final String USER_USERNAME = "user-username"; + public static final String USER_MOBILE = "user-mobile"; + public static final String USER_WECHAT = "user-wechat"; + public static final String CUSTOMER_USERNAME = "customer-username"; + public static final String CUSTOMER_MOBILE = "customer-mobile"; + public static final String CUSTOMER_WECHAT = "customer-wechat"; + + //三方登录默认创建用户时默认角色 + public static final String DEFAULT_ROLE_USER = "DEFAULT_ROLE_USER"; + public static final String DEFAULT_ROLE_CUSTOMER = "DEFAULT_ROLE_CUSTOMER"; + + + public static final String CLIENT_DETAILS_FIELDS = "client_id, client_secret as client_secret, resource_ids, scope, " + + "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, " + + "refresh_token_validity, additional_information, autoapprove"; + public static final String BASE_CLIENT_DETAILS_SQL = "select " + CLIENT_DETAILS_FIELDS + " from tab_client_details"; + public static final String FIND_CLIENT_DETAILS_SQL = BASE_CLIENT_DETAILS_SQL + " order by client_id"; + public static final String SELECT_CLIENT_DETAILS_SQL = BASE_CLIENT_DETAILS_SQL + " where client_id = ?"; + + //登录参数KEY定义 + public static final String USER_ID_KEY = "user_id"; + public static final String REAL_NAME_KEY = "real_name"; + public static final String LOGIN_TYPE_KEY = "login_type"; + public static final String CLIENT_ID_KEY = "client_id"; + public static final String GRANT_TYPE_KEY = "grant_type"; + public static final String CLIENT_SECRET_KEY = "client_secret"; + public static final String USER_NAME_KEY = "username"; + public static final String SEX_KEY = "sex"; + public static final String MOBILE_KEY = "mobile"; + public static final String PASSWORD_KEY = "password"; + public static final String EXPIRES_IN_KEY = "expires_in"; + public static final String RESOURCS_KEY = "resources"; + public static final String AUTHORITIES_KEY = "authorities"; + + public static final String ROLES_KEY = "roles"; + public static final String JTI_KEY = "jti"; + public static final String CODE_KEY = "code"; + public static final String OPEN_ID_KEY ="open_id" ; + public static final String DEPT_NO_KEY = "dept_no"; + public static final String POST_NO_KEY = "post_no"; + public static final String DATA_SECURITY_KEY = "data_security"; + public static final String ONLY_AUTHENTICATE_KEY = "only_authenticate"; + public static final String COMPANY_NO_KEY = "company_no";; + + //登录处理集合 + public static Map loginBeanNames = new HashMap<>(); + static { + loginBeanNames.put("username","usernameLoginAuthHandler"); + loginBeanNames.put("mobile","mobileLoginAuthHandler"); + loginBeanNames.put("wechat","wechatLoginAuthHandler"); + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java new file mode 100644 index 0000000..8033050 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/PostCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:岗位表缓存常量 +*/ +public class PostCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "post:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java new file mode 100644 index 0000000..19c978f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/ResourceCacheConstant.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:权限表缓存常量 +*/ +public class ResourceCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "resource:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //tree树形 + public static final String TREE = PREFIX+"tree"; + + //菜单 + public static final String MENUS= PREFIX+"menus"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java new file mode 100644 index 0000000..82a91b1 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/RoleCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:角色表缓存常量 +*/ +public class RoleCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "role:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java new file mode 100644 index 0000000..88f88a1 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/SecurityConstant.java @@ -0,0 +1,20 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +/** + * @ClassName SecurityConstant.java + * @Description 权限常量 + */ +public class SecurityConstant { + + //用户前端token + public static final String USER_TOKEN = "user-token"; + + //本人 + public static final String DATA_SCOPE_0 = "0"; + + //自定义 + public static final String DATA_SCOPE_1 = "1"; + + //加密秘钥 + public static final String APP_SECRET = "app-secret"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java new file mode 100644 index 0000000..8a26e0f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/security/UserCacheConstant.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.commons.constant.security; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:用户表缓存常量 +*/ +public class UserCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "user:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //用户登录 + public static final String LOGIN= PREFIX+"login"; + + //用户数据 + public static final String DATA_SECURITY= PREFIX+"data:security"; + + //建立用户与会话唯一标识之间的关系,用于判断剔除 + public static final String USER_TOKEN = PREFIX+"user-token:"; + + //建立会话唯一标识与jwtToken之间的关系,用于令牌续期 + public static final String JWT_TOKEN = PREFIX+"jwt-token:"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java new file mode 100644 index 0000000..ad752a5 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sick/SickConstant.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.framework.commons.constant.sick; + +/** + * SickConstant + * + * @author: wgl + * @describe: 疾病常量类 + * @date: 2022/12/28 10:10 + */ +public class SickConstant { + + public final static String SICK_TYPE = "DISEASE"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java new file mode 100644 index 0000000..52b84b2 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsCacheConstant.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.framework.commons.constant.sms; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** + * @ClassName DataDictCacheConstant.java + * @Description 短信缓存常量 + */ +public class SmsCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "sms-"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //blacklist缓存父包 + public static final String PREFIX_BLACKLIST= PREFIX+"blacklist"; + + //Channel缓存父包 + public static final String PREFIX_CHANNEL= PREFIX+"channel"; + + //发送记录缓存父包 + public static final String PREFIX_SEND_RECORD= PREFIX+"send_record"; + + //签名缓存父包 + public static final String PREFIX_SIGN= PREFIX+"sign"; + + //模板缓存父包 + public static final String PREFIX_TEMPLATE= PREFIX+"template"; + + //黑名单page分页 + public static final String PAGE_BLACKLIST= PREFIX_BLACKLIST+"page"; + + //channel的page分页 + public static final String PAGE_CHANNEL= PREFIX_CHANNEL+"page"; + + //channel的page分页 + public static final String CHANNEL_LABEL= PREFIX_CHANNEL+"label&ttl=-1"; + + //sign的page分页 + public static final String PAGE_SIGN= PREFIX_SIGN+"page"; + + //channel的page分页 + public static final String PAGE_SEND_RECORD = PREFIX_SEND_RECORD+"page"; + + //template的page分页 + public static final String PAGE_TEMPLATE = PREFIX_TEMPLATE+"page"; + + //Channel缓存list + public static final String CHANNEL_LIST= PREFIX+"channel_list:"; + + //sign缓存list + public static final String SIGN_LIST =PREFIX+"sign_list" ; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java new file mode 100644 index 0000000..f4a8fac --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/sms/SmsConstant.java @@ -0,0 +1,44 @@ +package com.itheima.sfbx.framework.commons.constant.sms; + +/** + * @ClassName SmsConstant.java + * @Description 短信常量类 + */ +public class SmsConstant { + + //阿里云短信 + public static final String ALIYUN_SMS = "ALIYUN_SMS"; + //腾讯云短信 + public static final String TENCENT_SMS = "TENCENT_SMS"; + //百度云短信 + public static final String BAIDU_SMS = "BAIDU_SMS"; + + //邮件负载均衡 + public static final String HASH = "HASH"; + public static final String RANDOM = "RANDOM "; + public static final String ROUND_ROBIN ="ROUND_ROBIN" ; + public static final String WEIGHT_RANDOM = "WEIGHT_RANDOM"; + public static final String WEIGHT_ROUND_ROBIN = "WEIGHT_ROUND_ROBIN"; + + //发送状态:发送成功 + public static final String STATUS_SEND_0 ="0" ; + //发送状态:发送失败 + public static final String STATUS_SEND_1 ="1" ; + //发送状态:发送中 + public static final String STATUS_SEND_2 ="2" ; + + //受理状态:受理成功 + public static final String STATUS_ACCEPT_0 ="0" ; + //受理状态:受理失败 + public static final String STATUS_ACCEPT_1 ="1" ; + //受理状态:受理中 + public static final String STATUS_ACCEPT_2 ="2" ; + + //审核状态:审核成功 + public static final String STATUS_AUDIT_0 = "0"; + //审核状态:审核失败 + public static final String STATUS_AUDIT_1 = "1"; + //审核状态:审核中 + public static final String STATUS_AUDIT_2 = "2"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java new file mode 100644 index 0000000..a0fe8f7 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/SignContractConstant.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.framework.commons.constant.trade; + +/** + * @ClassName SignContractVonstant.java + * @Description 签约合同常量类 + */ +public class SignContractConstant { + + //1. TEMP:暂存,协议未生效过;2. NORMAL:正常;3. STOP:暂停 + public static final String SIGNSTATE_TEMP ="1"; + public static final String SIGNSTATE_NORMAL ="2"; + public static final String SIGNSTATE_STOP ="3"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java new file mode 100644 index 0000000..39e4ae9 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeCacheConstant.java @@ -0,0 +1,32 @@ +package com.itheima.sfbx.framework.commons.constant.trade; + +/** + * @ClassName TradeCacheConstant.java + * @Description 交易缓存维护 + */ +public class TradeCacheConstant { + + //默认redis等待时间 + public static final int REDIS_WAIT_TIME = 10; + + //默认redis自动释放时间 + public static final int REDIS_LEASETIME = 4; + + //安全组前缀 + public static final String PREFIX = "trade:"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //创建交易加锁 + public static final String CREATE_PAY = LOCK_PREFIX+ "create_pay"; + + //创建退款加锁 + public static final String REFUND_PAY = LOCK_PREFIX+ "refund_pay"; + + //创建退款加锁 + public static final String PAY_CHANNEL_VLID = PREFIX+"pay_channel_vlid&ttl=-1"; + + //page分页 + public static final String PAGE= PREFIX+"page"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java new file mode 100644 index 0000000..f4fd55f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/trade/TradeConstant.java @@ -0,0 +1,82 @@ +package com.itheima.sfbx.framework.commons.constant.trade; + +/** + * @ClassName TardingConstant.java + * @Description 交易常量类 + */ +public class TradeConstant { + + //【阿里云退款返回状态】 + //REFUND_SUCCESS:成功 + public static final String REFUND_SUCCESS= "REFUND_SUCCESS"; + + //【阿里云返回付款状态】 + //TRADE_CLOSED:未付款交易超时关闭,或支付完成后全额退款 + public static final String ALI_TRADE_CLOSED ="TRADE_CLOSED"; + //TRADE_SUCCESS:交易支付成功 + public static final String ALI_TRADE_SUCCESS="TRADE_SUCCESS"; + //TRADE_FINISHED:交易结束不可退款 + public static final String ALI_TRADE_FINISHED ="TRADE_FINISHED"; + + //【支付宝状态定义】 + public static final String ALI_SUCCESS_CODE= "10000"; + public static final String ALI_SUCCESS_MSG= "Success"; + + //【微信退款返回状态】 + //SUCCESS:退款成功 + public static final String WECHAT_REFUND_SUCCESS ="SUCCESS"; + //CLOSED:退款关闭 + public static final String WECHAT_REFUND_CLOSED="CLOSED"; + //PROCESSING:退款处理中 + public static final String WECHAT_REFUND_PROCESSING ="PROCESSING"; + //ABNORMAL:退款异常 + public static final String WECHAT_REFUND_ABNORMAL ="ABNORMAL"; + + //【微信返回付款状态】 + //SUCCESS:支付成功 + public static final String WECHAT_TRADE_SUCCESS ="SUCCESS"; + //REFUND:转入退款 + public static final String WECHAT_TRADE_REFUND ="REFUND"; + //NOTPAY:未支付 + public static final String WECHAT_TRADE_NOTPAY ="NOTPAY"; + //CLOSED:已关闭 + public static final String WECHAT_TRADE_CLOSED ="CLOSED"; + //REVOKED:已撤销(仅付款码支付会返回) + public static final String WECHAT_TRADE_REVOKED ="REVOKED"; + //USERPAYING:用户支付中(仅付款码支付会返回) + public static final String WECHAT_TRADE_USERPAYING ="USERPAYING"; + //PAYERROR:支付失败(仅付款码支付会返回) + public static final String WECHAT_TRADE_WAITERROR ="PAYERROR"; + + //【平台:交易渠道】 + //阿里 + public static final String TRADE_CHANNEL_ALI_PAY = "ALI_PAY"; + //微信 + public static final String TRADE_CHANNEL_WECHAT_PAY = "WECHAT_PAY"; + //现金 + public static final String TRADE_CHANNEL_CASH_PAY = "CASH_PAY"; + //免单 + public static final String TRADE_CHANNEL_CREDIT_PAY = "CREDIT_PAY"; + + + //【平台:交易状态】 + //WAIT:待支付(交易创建,等待买家付款) + public static final String TRADE_WAIT ="0"; + //SUCCESS:支付成功 + public static final String TRADE_SUCCESS ="1"; + //CLOSED:已关闭(未付款交易超时关闭,或支付失败) + public static final String TRADE_CLOSED ="2"; + //TO_BE_SIGNED:待签约 + public static final String TRADE_TO_BE_SIGNED ="3"; + + //【平台:退款状态】 + //失败 + public static final String REFUND_STATUS_FAIL= "FAIL"; + //成功 + public static final String REFUND_STATUS_SUCCESS = "SUCCESS"; + //请求中 + public static final String REFUND_STATUS_SENDING= "SENDING"; + //请求关闭 + public static final String REFUND_STATUS_CLOSED= "CLOSED"; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java new file mode 100644 index 0000000..efa2763 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyConstant.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.framework.commons.constant.warranty; + +/** + * WarrantyConstant + * + * @author: wgl + * @describe: 保险常量 + * @date: 2022/12/28 10:10 + */ +public class WarrantyConstant { + + //0待付款 + public final static String STATE_NOT_PAY = "0"; + //1待生效 + public final static String STATE_TO_BE_WORK = "1"; + //2保障中 + public final static String STATE_SAFEING= "2"; + //3 逾期中止 + public final static String STATE_OVERDUE_OVER = "3"; + //4 理赔终止 + public final static String STATE_SETTLEMENT_OVER = "4"; + //5 复效中止 + public final static String STATE_REINSTATE_ING_OVER = "5"; + //6 复效终止 + public final static String STATE_REINSTATE_OVER = "6"; + //7 满期终止 + public final static String STATE_EXPIRE_OVER = "7"; + //8 拒保 + public final static String STATE_DECLINATURE = "8"; + //9 犹豫期退保 + public final static String STATE_MISS_REFUND = "9"; + //10 协议退保 + public final static String STATE_ARGEE_REFUND = "10"; + + //核保状态(0发送失败 1核保中 2核保失败 3核保成功 ) + public final static String UNDERWRITING_STATE_0="0"; + public final static String UNDERWRITING_STATE_1="1"; + public final static String UNDERWRITING_STATE_2="2"; + public final static String UNDERWRITING_STATE_3="3"; + + //批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过) + public final static String APPROVE_STATE_UN_SEND="0"; + public final static String APPROVE_STATE_SEND_ERROR="1"; + public final static String APPROVE_STATE_APPROVEING="2"; + public final static String APPROVE_STATE_APPROVE="3"; + public final static String APPROVE_STATE_REFUSE="4"; + + public final static String APPROVE_TYPE_APPOVE="0"; + + public final static String APPROVE_TYPE_INSURERD="1"; + + /** + * 判断是否是被保人 + * @param type + * @return + */ + public static boolean isInsured(String type) { + return APPROVE_TYPE_INSURERD.equals(type); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java new file mode 100644 index 0000000..dd33ce8 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/warranty/WarrantyOrderConstant.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx.framework.commons.constant.warranty; + +/** + * WarrantyConstant + * + * @author: wgl + * @describe: 保险订单常量 + * @date: 2022/12/28 10:10 + */ +public class WarrantyOrderConstant { + + //状态(0待付款 1已付款 2逾期 3补缴 4付款失败 5付款中) + public final static String ORDER_STATE_0="0"; + public final static String ORDER_STATE_1="1"; + public final static String ORDER_STATE_2="2"; + public final static String ORDER_STATE_3="3"; + public final static String ORDER_STATE_4="4"; + public final static String ORDER_STATE_5="5"; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java new file mode 100644 index 0000000..6e672d5 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/ProductTypeDTO.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.commons.constant.worryfree; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * ProductType + * + * @author: wgl + * @describe: 省心配产品匹配DTO对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class ProductTypeDTO { + + //分类编号 + private String categoryNo; + + //分类键 + private String categoryKey; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java new file mode 100644 index 0000000..ab96e7f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/constant/worryfree/WorryFreeConstant.java @@ -0,0 +1,161 @@ +package com.itheima.sfbx.framework.commons.constant.worryfree; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.*; + +/** + * WorryFreeConstant + * + * @author: wgl + * @describe: 省心配常量 + * @date: 2022/12/28 10:10 + */ +public class WorryFreeConstant { + + //省心配风险redis中的key + public static final String WORRYFREE_PREFIX = "worryfree:"; + + public static final String FLOW_NAME_RISK_START = "风险分析开始"; + + public static final String FLOW_NAME_RISK_END = "风险分析结束"; + + public static final String FLOW_NAME_SAFEGUARD_ANALYSIS_START = "保障评估开始"; + public static final String FLOW_NAME_SAFEGUARD_ANALYSIS_END = "保障评估结束"; + + public static final String FLOW_NAME_PRODUCT_MATCH_START = "产品匹配开始"; + + public static final String FLOW_NAME_PRODUCT_MATCH_ING = "产品匹配"; + public static final String FLOW_NAME_PRODUCT_MATCH_END = "产品匹配结束"; + + /** + * 风险项医疗 + */ + public static final String RISK_TYPE_MEDICAL = "medical"; + + /** + * 风险项意外 + */ + public static final String RISK_TYPE_ACCIDENT = "accident"; + + /** + * 风险项身故 + */ + public static final String RISK_TYPE_DIE = "die"; + + /** + * 用户标签 + */ + public static final String USER_TAG = "userTag"; + + /** + * 风险项重疾 + */ + public static final String RISK_TYPE_SERIOUS = "serious"; + + + /** + * 风险项类型 + */ + public static final String VARIABLE_KEY_SAFEGUARD = "safeguardList"; + + /** + * 医疗变量键 + */ + public static final String VARIABLE_KEY_MEDICAL_AMOUNT = "medicalAmount"; + + /** + * 意外变量键 + */ + public static final String VARIABLE_KEY_ACCIDENT_AMOUNT = "accidentAmount"; + + /** + * 身故变量键 + */ + public static final String VARIABLE_KEY_DIE_AMOUNT = "dieAmount"; + + /** + * 重疾变量键 + */ + public static final String VARIABLE_KEY_SERIOUS_AMOUNT = "seriousAmount"; + + /** + * 医疗分类编号 + */ + public static final String CATEGORY_NO_MEDICAL = "100001001000000"; + + + /** + * 重疾分类编号 + */ + public static final String CATEGORY_NO_SERIOUS = "100001002000000"; + + /** + * 意外分类编号 + */ + public static final String CATEGORY_NO_ACCIDENT = "100001003000000"; + + + + /** + * 获取所有的风险项类型 + * @return + */ + public static List getAllRiskTypeList() { + List nodeNameList = Arrays.asList(RISK_TYPE_MEDICAL, RISK_TYPE_ACCIDENT, RISK_TYPE_DIE, RISK_TYPE_SERIOUS); + return nodeNameList; + } + + /** + * 风险分析流程 + * @return + */ + public static List getRiskFlowList() { + List nodeNameList = Arrays.asList("风险分析流程开始", "用户数据构建", "三方数据调用", "风险分析计算中", "准入分析", "反欺诈分析", "风险导入","风险打分"); + return nodeNameList; + } + + /** + * 保障配额流程节点 + * @return + */ + public static List getSafeguardFlowList() { + List nodeNameList = Arrays.asList("评估保障开始", "保障项数据获取", "三方数据调用", "评估保障计算中", "个人收入项验证", "收入反欺诈分析", "评估保障结束"); + return nodeNameList; + } + + /** + * 产品匹配节点列表 + * @return + */ + public static List getProductMatchFlowList() { + List nodeNameList = Arrays.asList("产品匹配开始","系统保险数据获取", "保险计算", "保额计算", "保额数据获取", "保额最大努力匹配", "保险匹配"); + return nodeNameList; + } + + /** + * 产品匹配节点列表 + * @return + */ + public static List getProductTypeCategoryList() { + List nodeNameList = Arrays.asList( + ProductTypeDTO.builder().categoryNo(CATEGORY_NO_MEDICAL).categoryKey(VARIABLE_KEY_MEDICAL_AMOUNT).build(), + ProductTypeDTO.builder().categoryNo(CATEGORY_NO_SERIOUS).categoryKey(VARIABLE_KEY_SERIOUS_AMOUNT).build(), + ProductTypeDTO.builder().categoryNo(CATEGORY_NO_ACCIDENT).categoryKey(VARIABLE_KEY_ACCIDENT_AMOUNT).build() + ); + return nodeNameList; + } + + /** + * 获取锁key + * @param id + * @return + */ + public static String getLockKey(String id) { + //省心配风险redis中的key + return WORRYFREE_PREFIX + "worryfree:key:"+id; + } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java new file mode 100644 index 0000000..433d745 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerInsuranceDTO.java @@ -0,0 +1,22 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * AnalysisCustomerInsuranceDTO + * + * @author: wgl + * @describe: 统计每日客户保险数量数据传输对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class AnalysisCustomerInsuranceDTO { + + @ApiModelProperty(value = "当日总保费") + private Long money; + + @ApiModelProperty(value = "当日保单数") + private Long insuranceNums; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java new file mode 100644 index 0000000..5d50adc --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisCustomerSexDTO.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; + +/** + * AnalysisCustomerSexDTO + * + * @author: wgl + * @describe: 统计分析客户性别统计 + * @date: 2022/12/28 10:10 + */ +@Data +public class AnalysisCustomerSexDTO { + + @ApiModelProperty(value = "保单男性数量") + private Integer sexManNums; + + @ApiModelProperty(value = "保单女性数量") + private Integer sexWomanNums; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java new file mode 100644 index 0000000..46c3c96 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/AnalysisInsuranceTypeDTO.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + + +/** + * AnalysisCustomerSexDTO + * + * @author: wgl + * @describe: 统计分析投保分类统计分析 + * @date: 2022/12/28 10:10 + */ +@Data +public class AnalysisInsuranceTypeDTO { + + @ApiModelProperty(value = "投保分类ID") + private Integer insuranceTypeId; + + @ApiModelProperty(value = "投保分类名") + private String insuranceTypeName; + + @ApiModelProperty(value = "对应分类的投保数量") + private Integer insuranceNums; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java new file mode 100644 index 0000000..dcac298 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/InsureCategoryDTO.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDate; +import java.util.Date; + +/** + * @ClassName InsureCategoryDTO.java + * @Description 投保分类报表DTO + */ +@Data +@NoArgsConstructor +@ApiModel(value="InsureCategoryDTO对象", description="投保分类报表DTO") +public class InsureCategoryDTO { + + @Builder + public InsureCategoryDTO(String categoryName, Long doInsureNums, LocalDate reportTime) { + this.categoryName = categoryName; + this.doInsureNums = doInsureNums; + this.reportTime = reportTime; + } + + @ApiModelProperty(value = "保险分类名称") + private String categoryName; + + @ApiModelProperty(value = "投保次数") + private Long doInsureNums; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java new file mode 100644 index 0000000..6e7b898 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/PageDTO.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import lombok.Data; + +import java.util.Map; + +/** + * PageDTO + * + * @author: wgl + * @describe: 分页对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class PageDTO { + + private Integer pageNum; + + private Integer pageSize = 5000; + + private Integer totalPageNum; + + private Integer totalCount; + + public PageDTO(Integer totalCount) { + this.totalCount = totalCount; + this.totalPageNum = (int) Math.ceil((double) totalCount / pageSize); + } + + /** + * 获取分页信息 + * + * @param totalData + * @return + */ + public static PageDTO getPageInfo(Map totalData) { + Integer count = Double.valueOf(totalData.get("count").toString()).intValue(); + PageDTO pageDTO = new PageDTO(count); + return pageDTO; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java new file mode 100644 index 0000000..9ffe75c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/SaleReportDTO.java @@ -0,0 +1,63 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDate; +import java.util.Date; + +/** + * @ClassName SaleReportDTO.java + * @Description 销售报表DTO + */ +@Data +@NoArgsConstructor +@ApiModel(value="SaleReportDTO对象", description="销售报表DTO") +public class SaleReportDTO implements Serializable { + + @Builder + public SaleReportDTO(BigDecimal totalAmountDay, BigDecimal avgPieceAmountDay, Long persons, + BigDecimal avgPersonAmountDay, Long totalWarrantyDay, LocalDate reportTime) { + this.totalAmountDay = totalAmountDay; + this.avgPieceAmountDay = avgPieceAmountDay; + this.avgPersonAmountDay = avgPersonAmountDay; + this.totalWarrantyDay = totalWarrantyDay; + this.persons = persons; + this.reportTime = reportTime; + } + + @ApiModelProperty(value = "日投保总额度") + private BigDecimal totalAmountDay; + + @ApiModelProperty(value = "日投保件均额度") + private BigDecimal avgPieceAmountDay; + + @ApiModelProperty(value = "日投保人均额度") + private BigDecimal avgPersonAmountDay; + + @ApiModelProperty(value = "日总合同数") + private Long totalWarrantyDay; + + @ApiModelProperty(value = "投保人数") + private Long persons; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java new file mode 100644 index 0000000..151ebc3 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/analysis/TimeDTO.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.framework.commons.dto.analysis; + +import lombok.Data; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; + +/** + * TimeDTO + * + * @author: wgl + * @describe: 日期对象类 + * @date: 2022/12/28 10:10 + */ +@Data +public class TimeDTO { + + + /** + * 目标日期:LocalDate + */ + private LocalDate targetDate; + + /** + * 目标日期:LocalDateTime + */ + private LocalDateTime targetDateTime; + + /** + * 目标日期开始 字符串 + */ + private String begin; + + /** + * 目标日期结束时间 字符串 + */ + private String end; + + /** + * 目标日期开始时间 + */ + private LocalDateTime beginTime; + + /** + * 目标日期结束时间 + */ + private LocalDateTime endTime; + + + /** + * 获取日志格式化 + * @return + */ + public DateTimeFormatter getTimeFormatter(){ + return DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java new file mode 100644 index 0000000..19008ab --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/BaseVO.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.framework.commons.dto.basic; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @ClassName BaseVo.java + * @Description 基础请求 + */ +@Data +@NoArgsConstructor +public class BaseVO implements Serializable { + + @ApiModelProperty(value = "主键") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long id; + + @ApiModelProperty(value = "创建时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + protected LocalDateTime createTime; + + @ApiModelProperty(value = "修改时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + protected LocalDateTime updateTime; + + @ApiModelProperty(value = "创建者:username") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long createBy; + + @ApiModelProperty(value = "更新者:username") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long updateBy; + + @ApiModelProperty(value = "是否有效") + protected String dataState; + + @ApiModelProperty(value = "创建人名称") + private String creator; + + public BaseVO(Long id, String dataState) { + this.id = id; + this.dataState = dataState; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java new file mode 100644 index 0000000..f3ee3dd --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/OtherConfigVO.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.dto.basic; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName OtherConfig.java + * @Description 扩展配置 + */ +@Data +@NoArgsConstructor +@ApiModel(value="OtherConfigVO对象", description="扩展配置") +public class OtherConfigVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Builder + public OtherConfigVO(String configKey, String configValue) { + this.configKey = configKey; + this.configValue = configValue; + } + + @ApiModelProperty(value = "配置键") + private String configKey; + + @ApiModelProperty(value = "配置值") + private String configValue; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java new file mode 100644 index 0000000..215d6e6 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeItemVO.java @@ -0,0 +1,44 @@ +package com.itheima.sfbx.framework.commons.dto.basic; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description:树结构体 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TreeItemVO implements Serializable { + + @ApiModelProperty(value = "节点ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + public String id; + + @ApiModelProperty(value = "节点父亲ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + public String parentId; + + @ApiModelProperty(value = "显示内容") + public String label; + + @ApiModelProperty(value = "是否选择") + public Boolean isChecked; + + @ApiModelProperty(value = "显示内容") + public String systemCode; + + @ApiModelProperty(value = "是否叶子节点") + public String isLeaf; + + @ApiModelProperty(value = "显示内容") + public List children; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java new file mode 100644 index 0000000..775796c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/basic/TreeVO.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.framework.commons.dto.basic; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @description: 树显示类 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class TreeVO implements Serializable { + + @ApiModelProperty(value = "tree数据") + private List items; + + @ApiModelProperty(value = "选择节点") + private List checkedIds; + + @ApiModelProperty(value = "展开项") + private List expandedIds; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java new file mode 100644 index 0000000..1e92df1 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/click/ClickDTO.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.framework.commons.dto.click; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * ClickDTO + * + * @author: wgl + * @describe: 点击对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class ClickDTO { + + @ApiModelProperty(value = "请求id") + private String requestId; + + @ApiModelProperty(value = "域名") + private String host; + + @ApiModelProperty(value = "ip地址") + private String hostAddress; + + @ApiModelProperty(value = "请求路径") + private String requestUri; + + @ApiModelProperty(value = "请求方式") + private String requestMethod; + + @ApiModelProperty(value = "请求body") + private String requesBody; + + @ApiModelProperty(value = "应答body") + private String responseBody; + + @ApiModelProperty(value = "应答code") + private String responseCode; + + @ApiModelProperty(value = "应答msg") + private String responseMsg; + + @ApiModelProperty(value = "用户") + private Long userId; + + @ApiModelProperty(value = "用户名称") + private String userName; + + @ApiModelProperty(value = "设备号") + private String deviceNumber; + + @ApiModelProperty(value = "企业编号") + private String companyNO; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java new file mode 100644 index 0000000..90b3998 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/DataDictVO.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.framework.commons.dto.dict; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:数据字典表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DataDictVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public DataDictVO(Long id, String dataState, String parentKey, + String dataKey, String dataValue, String discription) { + super(id, dataState); + this.parentKey = parentKey; + this.dataKey = dataKey; + this.dataValue = dataValue; + this.discription = discription; + } + + @ApiModelProperty(value = "父key") + private String parentKey; + + @ApiModelProperty(value = "数据字典KEY") + private String dataKey; + + @ApiModelProperty(value = "值") + private String dataValue; + + @ApiModelProperty(value = "描述") + private String discription; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java new file mode 100644 index 0000000..85b8df4 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/dict/PlacesVO.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.framework.commons.dto.dict; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:地方表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PlacesVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public PlacesVO(Long id, String dataState, Long parentId, String cityName) { + super(id, dataState); + this.parentId = parentId; + this.cityName = cityName; + } + + @ApiModelProperty(value = "父ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long parentId; + + @ApiModelProperty(value = "名称") + private String cityName; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java new file mode 100644 index 0000000..c3dfb1d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/external/TripartiteInsureDTO.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.framework.commons.dto.external; + +import lombok.Data; + +/** + * TripartiteInsureDTO + * + * @author: wgl + * @describe: 投保交互DTO + * @date: 2022/12/28 10:10 + */ +@Data +public class TripartiteInsureDTO { + + /** + * 图片浏览地址 + */ + private String url; + + /** + * 允许投保标志位 + */ + private Boolean flag; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java new file mode 100644 index 0000000..f8b9465 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FilePartVO.java @@ -0,0 +1,63 @@ +package com.itheima.sfbx.framework.commons.dto.file; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FilePartVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public FilePartVO(Long id, String dataState, String uploadId, Integer partNumber, Long partSize, String uploadResult, String md5, String bucketName, String fileName, String storeFlag, String companyNo) { + super(id, dataState); + this.uploadId = uploadId; + this.partNumber = partNumber; + this.partSize = partSize; + this.uploadResult = uploadResult; + this.md5 = md5; + this.bucketName = bucketName; + this.fileName = fileName; + this.storeFlag = storeFlag; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "唯一上传id") + private String uploadId; + + @ApiModelProperty(value = "当前片数") + private Integer partNumber; + + @ApiModelProperty(value = "分片大小") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long partSize; + + @ApiModelProperty(value = "分片上传结果(json)") + private String uploadResult; + + @ApiModelProperty(value = "md5值") + private String md5; + + @ApiModelProperty(value = "存储空间名称") + private String bucketName; + + @ApiModelProperty(value = "文件名") + private String fileName; + + @ApiModelProperty(value = "存储源标识,参考FileConstant") + private String storeFlag; + + @ApiModelProperty(value = "企业号") + private String companyNo; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java new file mode 100644 index 0000000..eb85a0a --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/FileVO.java @@ -0,0 +1,89 @@ +package com.itheima.sfbx.framework.commons.dto.file; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.constant.file.FileConstant; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description:附件表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class FileVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public FileVO(Long id, String dataState, Long businessId, String businessType, String suffix, String fileName, String pathUrl, String storeFlag, String bucketName, String base64Image, String uploadId, Boolean autoCatalog, String md5, List partETags, String status, String companyNo) { + super(id, dataState); + this.businessId = businessId; + this.businessType = businessType; + this.suffix = suffix; + this.fileName = fileName; + this.pathUrl = pathUrl; + this.storeFlag = storeFlag; + this.bucketName = bucketName; + this.base64Image = base64Image; + this.uploadId = uploadId; + this.autoCatalog = autoCatalog; + this.md5 = md5; + this.partETags = partETags; + this.status = status; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "业务ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long businessId; + + @ApiModelProperty(value = "业务类型") + private String businessType; + + @ApiModelProperty(value = "后缀名") + private String suffix; + + @ApiModelProperty(value = "文件名") + private String fileName; + + @ApiModelProperty(value = "访问路径") + private String pathUrl; + + @ApiModelProperty(value = "存储标识(不同的存储标识参考FileConstant),现支持 aliyunoss、qiniu ") + private String storeFlag; + + @ApiModelProperty(value = "存储空间名称") + private String bucketName; + + @ApiModelProperty(value = "base64图片") + private String base64Image; + + @ApiModelProperty(value = "分片上传文件Id") + private String uploadId; + + @ApiModelProperty(value = "是否自动生成文件存储目录,如果在storeFilename指定了目录,此值设置为false") + private Boolean autoCatalog; + + @ApiModelProperty(value = "md5值") + private String md5; + + @ApiModelProperty(value = "分片上传分片信息") + private List partETags; + + @ApiModelProperty(value = "上传状态") + private String status; + + @ApiModelProperty(value = "企业号") + private String companyNo; + + @ApiModelProperty(value = "历史上传:0 历史有此文件 1、历史无此文件") + private String isHistory; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java new file mode 100644 index 0000000..f3d10bc --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/file/UploadMultipartFile.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.commons.dto.file; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @Description: + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class UploadMultipartFile implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "文件名称") + public String originalFilename; + + @ApiModelProperty(value = "文件数组") + public byte[] fileByte; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java new file mode 100644 index 0000000..4cb786b --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/log/LogBusinessVO.java @@ -0,0 +1,105 @@ +package com.itheima.sfbx.framework.commons.dto.log; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description:日志模块 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class LogBusinessVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public LogBusinessVO(Long id, String dataState, String requestId, String host, String hostAddress, String requestUri, String requestMethod, String requestBody, String responseBody, int responseCode, String responseMsg, Long userId, String userName, String businessType, String deviceNumber, List createdTimeQuerty, String companyNO,String sex,String lastReadUrl,String province,String city) { + super(id, dataState); + this.requestId = requestId; + this.host = host; + this.hostAddress = hostAddress; + this.requestUri = requestUri; + this.requestMethod = requestMethod; + this.requestBody = requestBody; + this.responseBody = responseBody; + this.responseCode = responseCode; + this.responseMsg = responseMsg; + this.userId = userId; + this.userName = userName; + this.businessType = businessType; + this.deviceNumber = deviceNumber; + this.createdTimeQuerty = createdTimeQuerty; + this.companyNO = companyNO; + this.sex = sex; + this.lastReadUrl = lastReadUrl; + this.province = province; + this.city = city; + } + + @ApiModelProperty(value = "请求id") + private String requestId; + + @ApiModelProperty(value = "域名") + private String host; + + @ApiModelProperty(value = "ip地址") + private String hostAddress; + + @ApiModelProperty(value = "请求路径") + private String requestUri; + + @ApiModelProperty(value = "请求方式") + private String requestMethod; + + @ApiModelProperty(value = "请求body") + private String requestBody; + + @ApiModelProperty(value = "应答body") + private String responseBody; + + @ApiModelProperty(value = "应答code") + private int responseCode; + + @ApiModelProperty(value = "应答msg") + private String responseMsg; + + @ApiModelProperty(value = "用户") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long userId; + + @ApiModelProperty(value = "用户名称") + private String userName; + + @ApiModelProperty(value = "业务类型") + private String businessType; + + @ApiModelProperty(value = "设备号") + private String deviceNumber; + + @ApiModelProperty(value = "时间查询") + private List createdTimeQuerty; + + @ApiModelProperty(value = "企业编号") + private String companyNO; + + @ApiModelProperty(value = "性别") + private String sex; + + @ApiModelProperty(value = "上次浏览页面") + private String lastReadUrl; + + @ApiModelProperty(value = "省份") + private String province; + + @ApiModelProperty(value = "城市") + private String city; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java new file mode 100644 index 0000000..746aa85 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/CategoryReportVO.java @@ -0,0 +1,79 @@ +package com.itheima.sfbx.framework.commons.dto.report; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description:保险分类 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CategoryReportVO对象", description="保险分类报表对象") +public class CategoryReportVO extends BaseVO { + + + @Builder + public CategoryReportVO(Long id, String dataState, String parentCategoryNo, String categoryNo, String categoryName, String icon, String leafNode, String showIndex, String categoryType, Integer sortNo, String remake, String checkRule, String[] checkedIds, String[] checkedCategoryNos, List nodeFloors) { + super(id, dataState); + this.parentCategoryNo = parentCategoryNo; + this.categoryNo = categoryNo; + this.categoryName = categoryName; + this.icon = icon; + this.leafNode = leafNode; + this.showIndex = showIndex; + this.categoryType = categoryType; + this.sortNo = sortNo; + this.remake = remake; + this.checkRule = checkRule; + this.checkedIds = checkedIds; + this.checkedCategoryNos = checkedCategoryNos; + this.nodeFloors = nodeFloors; + } + + @ApiModelProperty(value = "父分类编号") + private String parentCategoryNo; + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "图标") + private String icon; + + @ApiModelProperty(value = "是否叶子节点(0是 否1)") + private String leafNode; + + @ApiModelProperty(value = "是否显示在首页(0是 否1)") + private String showIndex; + + @ApiModelProperty(value = "分类类型:0推荐分类 1产品分类 ") + private String categoryType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "分类补充说明") + private String remake; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "TREE结构:选中分类编号") + private String[] checkedCategoryNos; + + @ApiModelProperty(value = "节点层级:最多5层") + private List nodeFloors; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java new file mode 100644 index 0000000..5ca4414 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/report/InsuranceReportVO.java @@ -0,0 +1,181 @@ +package com.itheima.sfbx.framework.commons.dto.report; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.security.CompanyVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Description:保险产品 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "InsuranceReportVO对象", description = "保险产品报表VO") +public class InsuranceReportVO extends BaseVO { + + @Builder + public InsuranceReportVO(Long id, String dataState, String publishNumber, Long categoryNo,String categoryName, Long recommendCategoryNo, String insuranceName, String goldSelection, String carefree, String showIndex, String labelsJson, String remakeJson, Long timeStart, String timeStartUnit, Long timeEnd, String timeEndUnit, String relation, Integer sortNo, String multiple, Long continuousInsuranceAge, String checkRule, String companyNo, String insuranceState, Integer grace, String graceUnit, Integer revival, String revivalUnit, String comment, String remake, Integer hesitation, Integer waits, List fileVOs, String[] checkedIds, BigDecimal operatingRate, BigDecimal individualAgentRate, BigDecimal platformAgentRate, CompanyVO companyVO, List conditionVals) { + super(id, dataState); + this.publishNumber = publishNumber; + this.categoryNo = categoryNo; + this.categoryName = categoryName; + this.recommendCategoryNo = recommendCategoryNo; + this.insuranceName = insuranceName; + this.goldSelection = goldSelection; + this.carefree = carefree; + this.showIndex = showIndex; + this.labelsJson = labelsJson; + this.remakeJson = remakeJson; + this.timeStart = timeStart; + this.timeStartUnit = timeStartUnit; + this.timeEnd = timeEnd; + this.timeEndUnit = timeEndUnit; + this.relation = relation; + this.sortNo = sortNo; + this.multiple = multiple; + this.continuousInsuranceAge = continuousInsuranceAge; + this.checkRule = checkRule; + this.companyNo = companyNo; + this.insuranceState = insuranceState; + this.grace = grace; + this.graceUnit = graceUnit; + this.revival = revival; + this.revivalUnit = revivalUnit; + this.comment = comment; + this.remake = remake; + this.hesitation = hesitation; + this.waits = waits; + this.fileVOs = fileVOs; + this.checkedIds = checkedIds; + this.operatingRate = operatingRate; + this.individualAgentRate = individualAgentRate; + this.platformAgentRate = platformAgentRate; + this.companyVO = companyVO; + this.conditionVals = conditionVals; + } + + @ApiModelProperty(value = "银保监备案号") + private String publishNumber; + + @ApiModelProperty(value = "分类编号") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long categoryNo; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "推荐分类") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long recommendCategoryNo; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "金选:0是 1否") + private String goldSelection; + + @ApiModelProperty(value = "安心赔:0是 1否") + private String carefree; + + @ApiModelProperty(value = "首页热点显示(是0 否1)") + private String showIndex; + + @ApiModelProperty(value = "保险标签格式:[{key:200万医疗金,val:指定私立意义}]") + private String labelsJson; + + @ApiModelProperty(value = "补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]") + private String remakeJson; + + @ApiModelProperty(value = "可购买起始点") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long timeStart; + + @ApiModelProperty(value = "可购买起始点单位:天、年") + private String timeStartUnit; + + @ApiModelProperty(value = "可购买结束点") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long timeEnd; + + @ApiModelProperty(value = "可购买结束点单位:天、年") + private String timeEndUnit; + + @ApiModelProperty(value = "可投保关系:self,children:spouse,parents") + private String relation; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "团个险(0团 1个)") + private String multiple; + + @ApiModelProperty(value = "连续投保年龄") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long continuousInsuranceAge; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "保险状态(上架0 下架1)") + private String insuranceState; + + @ApiModelProperty(value = "保单宽限") + private Integer grace; + + @ApiModelProperty(value = "宽限单位") + private String graceUnit; + + @ApiModelProperty(value = "保单复效") + private Integer revival; + + @ApiModelProperty(value = "复效单位") + private String revivalUnit; + + @ApiModelProperty(value = "产品点评") + private String comment; + + @ApiModelProperty(value = "产品描述") + private String remake; + + @ApiModelProperty(value = "犹豫期") + private Integer hesitation; + + @ApiModelProperty(value = "等待期") + private Integer waits; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "运营费率") + private BigDecimal operatingRate; + + @ApiModelProperty(value = "个人代理费率") + private BigDecimal individualAgentRate; + + @ApiModelProperty(value = "平台代理费率") + private BigDecimal platformAgentRate; + + @ApiModelProperty(value = "公司信息") + private CompanyVO companyVO; + + @ApiModelProperty(value = "查询:保险筛选项值") + private List conditionVals; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java new file mode 100644 index 0000000..e78c617 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/AuthChannelVO.java @@ -0,0 +1,68 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @ClassName Channel.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="AuthChannel对象", description="三方渠道") +public class AuthChannelVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public AuthChannelVO(String domain,Long id, String dataState, String channelName, String channelLabel, String appId, String appSecret, String otherConfig, String companyNo, String notifyUrl) { + super(id, dataState); + this.channelName = channelName; + this.channelLabel = channelLabel; + this.appId = appId; + this.appSecret = appSecret; + this.otherConfig = otherConfig; + this.companyNo = companyNo; + this.notifyUrl = notifyUrl; + this.domain = domain; + } + + @ApiModelProperty(value = "通道名称") + private String channelName; + + @ApiModelProperty(value = "通道唯一标记") + private String channelLabel; + + @ApiModelProperty(value = "商户appid") + private String appId; + + @ApiModelProperty(value = "企业三方app秘钥") + private String appSecret; + + @ApiModelProperty(value = "其他配置") + private String otherConfig; + + @ApiModelProperty(value = "请求域名") + private String domain; + + @ApiModelProperty(value = "商户编号") + private String companyNo; + + @ApiModelProperty(value = "回调地址") + private String notifyUrl; + + @ApiModelProperty(value = "其他配置") + private List otherConfigVOs; + + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java new file mode 100644 index 0000000..e993a4c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CompanyVO.java @@ -0,0 +1,109 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** + * @Description:企业账号管理 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Company对象", description="企业账号管理") +public class CompanyVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public CompanyVO(Long id, String dataState, String companyNo, String companName, String registeredNo, String province, String area, String city, String address, String status, LocalDateTime expireTime, String webSite, String appSite, String email, String tel, String leaderMobile, String leaderName, List authChannelVOs,Long[] checkIds) { + super(id, dataState); + this.companyNo = companyNo; + this.companName = companName; + this.registeredNo = registeredNo; + this.province = province; + this.area = area; + this.city = city; + this.address = address; + this.status = status; + this.expireTime = expireTime; + this.webSite = webSite; + this.appSite = appSite; + this.email = email; + this.tel = tel; + this.leaderMobile = leaderMobile; + this.leaderName = leaderName; + this.authChannelVOs = authChannelVOs; + this.checkIds = checkIds; + } + + @ApiModelProperty(value = "商户编号") + private String companyNo; + + @ApiModelProperty(value = "企业名称") + private String companName; + + @ApiModelProperty(value = "统一社会信用代码") + private String registeredNo; + + @ApiModelProperty(value = "地址(省)") + private String province; + + @ApiModelProperty(value = "地址(区)") + private String area; + + @ApiModelProperty(value = "地址(市)") + private String city; + + @ApiModelProperty(value = "详细地址") + private String address; + + @ApiModelProperty(value = "状态(停用:0,试用:1,,正式:2)") + private String status; + + @ApiModelProperty(value = "到期时间 (试用下是默认七天后到期,状态改成停用)") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime expireTime; + + @ApiModelProperty(value = "商户门店web站点") + private String webSite; + + @ApiModelProperty(value = "商户app站点") + private String appSite; + + @ApiModelProperty(value = "联系邮箱") + private String email; + + @ApiModelProperty(value = "电话") + private String tel; + + @ApiModelProperty(value = "负责人手机") + private String leaderMobile; + + @ApiModelProperty(value = "负责人姓名") + private String leaderName; + + @ApiModelProperty(value = "三方授权渠道") + private List authChannelVOs; + + @ApiModelProperty(value = "批量操作id集合") + private Long[] checkIds; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java new file mode 100644 index 0000000..4d9e8ba --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/CustomerVO.java @@ -0,0 +1,85 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description:客户表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class CustomerVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public CustomerVO(Long id, String dataState, String username, String password, String nickName, String email, + String clientId, String realName, String mobile, String sex, String remark,String companyNo, + String[] checkedIds, String openId, String userToken, DataSecurityVO dataSecurityVO) { + super(id, dataState); + this.companyNo = companyNo; + this.username = username; + this.password = password; + this.nickName = nickName; + this.email = email; + this.clientId = clientId; + this.realName = realName; + this.mobile = mobile; + this.sex = sex; + this.remark = remark; + this.openId = openId; + this.userToken = userToken; + this.dataSecurityVO = dataSecurityVO; + } + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "客户账号") + private String username; + + @ApiModelProperty(value = "密码") + private String password; + + @ApiModelProperty(value = "客户昵称") + private String nickName; + + @ApiModelProperty(value = "客户邮箱") + private String email; + + @ApiModelProperty(value = "客户端") + private String clientId; + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "手机号码") + private String mobile; + + @ApiModelProperty(value = "客户性别(0男 1女 2未知)") + private String sex; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "三方openId") + private String openId; + + @ApiModelProperty(value = "客户令牌") + private String userToken; + + @ApiModelProperty(value = "客户数据权限") + private DataSecurityVO dataSecurityVO; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java new file mode 100644 index 0000000..92063ff --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DataSecurityVO.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName DataSecurity.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class DataSecurityVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "仅本人数据权限") + private Boolean youselfData; + + @ApiModelProperty(value = "数据权限对应部门编号集合") + private List deptNos; + + @Builder + public DataSecurityVO(Boolean youselfData, List deptNos) { + this.youselfData = youselfData; + this.deptNos = deptNos; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java new file mode 100644 index 0000000..147297f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptPostUserVO.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:部门岗位用户关联表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DeptPostUserVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public DeptPostUserVO(Long id, String dataState, Long userId, String deptNo, String postNo,String companyNo) { + super(id, dataState); + this.userId = userId; + this.deptNo = deptNo; + this.postNo = postNo; + this.companyNo=companyNo; + } + + @ApiModelProperty(value = "用户ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long userId; + + @ApiModelProperty(value = "部门编号") + private String deptNo; + + @ApiModelProperty(value = "岗位编码") + private String postNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java new file mode 100644 index 0000000..a77f56f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/DeptVO.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:部门表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class DeptVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public DeptVO(Long id, String dataState, String parentDeptNo, String deptNo, String deptName, Integer sortNo, Long leaderId, String[] checkedDeptNos, Long roleId, String companyNo) { + super(id, dataState); + this.parentDeptNo = parentDeptNo; + this.deptNo = deptNo; + this.deptName = deptName; + this.sortNo = sortNo; + this.leaderId = leaderId; + this.checkedDeptNos = checkedDeptNos; + this.roleId = roleId; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "父部门编号") + private String parentDeptNo; + + @ApiModelProperty(value = "部门编号") + private String deptNo; + + @ApiModelProperty(value = "部门名称") + private String deptName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "负责人Id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long leaderId; + + @ApiModelProperty(value = "TREE结构:选中部门No") + private String[] checkedDeptNos; + + @ApiModelProperty(value = "角色查询部门:部门对应角色id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long roleId; + + @ApiModelProperty(value = "部门No") + private String companyNo; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java new file mode 100644 index 0000000..be2acff --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuMetaVO.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @Description:菜单meta属性 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class MenuMetaVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "图标") + private String icon; + + @ApiModelProperty(value = "角色") + private List roles; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java new file mode 100644 index 0000000..d4f09cc --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/MenuVO.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @description: 动态菜单VO对象 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class MenuVO implements Serializable { + + private static final long serialVersionUID = 1L; + + // 设定路由的名字,一定要填写不然使用时会出现各种问题 + @ApiModelProperty(value = "路由名字") + private String name; + + @ApiModelProperty(value = "请求路径") + private String path; + + @ApiModelProperty(value = "高亮子菜单") + private String redirect; + + @ApiModelProperty(value = "模块跳转目标") + private String component; + + // 当设置 true 的时候该路由不会在侧边栏出现 如401,login等页面,或者如一些编辑页面/edit/1 + @ApiModelProperty(value = "是否显示") + private Boolean hidden; + + @ApiModelProperty(value = "子菜单") + private List children; + + @ApiModelProperty(value = "meta属性") + private MenuMetaVO meta; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java new file mode 100644 index 0000000..0c657cd --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/PostVO.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:岗位表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class PostVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public PostVO(Long id, String dataState, String deptNo, String postNo, String postName, Integer sortNo, String remark, String companyNo, DeptVO deptVO) { + super(id, dataState); + this.deptNo = deptNo; + this.postNo = postNo; + this.postName = postName; + this.sortNo = sortNo; + this.remark = remark; + this.companyNo = companyNo; + this.deptVO = deptVO; + } + + @ApiModelProperty(value = "部门编号") + private String deptNo; + + @ApiModelProperty(value = "岗位编码:父部门编号+001【3位】") + private String postNo; + + @ApiModelProperty(value = "岗位名称") + private String postName; + + @ApiModelProperty(value = "显示顺序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "职位对应部门") + private DeptVO deptVO; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java new file mode 100644 index 0000000..cd0d034 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/QueryDataSecurityVO.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName QueryDataSecurityVo.java + * @Description 查询数据权限对象 + */ +@Data +@NoArgsConstructor +public class QueryDataSecurityVO implements Serializable { + + public List roleVOs; + + public Long userId; + + @Builder + public QueryDataSecurityVO(List roleVOs, Long userId) { + this.roleVOs = roleVOs; + this.userId = userId; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java new file mode 100644 index 0000000..bee4704 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/ResourceVO.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:权限表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class ResourceVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public ResourceVO(Long id, String dataState, String resourceNo, String parentResourceNo, String resourceName, + String resourceType, String requestPath, String label, Integer sortNo, String icon, + String remark, String[] checkedResourceNos, Long roleId) { + super(id, dataState); + this.resourceNo = resourceNo; + this.parentResourceNo = parentResourceNo; + this.resourceName = resourceName; + this.resourceType = resourceType; + this.requestPath = requestPath; + this.label = label; + this.sortNo = sortNo; + this.icon = icon; + this.remark = remark; + this.checkedResourceNos = checkedResourceNos; + this.roleId = roleId; + } + + @ApiModelProperty(value = "资源编号") + private String resourceNo; + + @ApiModelProperty(value = "父资源编号") + private String parentResourceNo; + + @ApiModelProperty(value = "资源名称") + private String resourceName; + + @ApiModelProperty(value = "资源类型:s平台 c目录 m菜单 r按钮") + private String resourceType; + + @ApiModelProperty(value = "请求地址") + private String requestPath; + + @ApiModelProperty(value = "权限标识") + private String label; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "图标") + private String icon; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "TREE结构:选中资源编号") + private String[] checkedResourceNos; + + @ApiModelProperty(value = "角色查询资源:资源对应角色id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long roleId; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java new file mode 100644 index 0000000..bbf1f94 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/RoleVO.java @@ -0,0 +1,63 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:角色表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class RoleVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public RoleVO(Long id, String dataState, String roleName, String label, Integer sortNo, String remark, String[] checkedResourceNos, String[] checkedDeptNos, Long userId, String dataScope, String companyNo) { + super(id, dataState); + this.roleName = roleName; + this.label = label; + this.sortNo = sortNo; + this.remark = remark; + this.checkedResourceNos = checkedResourceNos; + this.checkedDeptNos = checkedDeptNos; + this.userId = userId; + this.dataScope = dataScope; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "角色名称") + private String roleName; + + @ApiModelProperty(value = "角色标识") + private String label; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "TREE结构:选中资源No") + private String[] checkedResourceNos; + + @ApiModelProperty(value = "TREE结构:选中部门No") + private String[] checkedDeptNos; + + @ApiModelProperty(value = "人员查询部门:当前人员Id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long userId; + + @ApiModelProperty(value = "数据范围(0本人 1自定义)") + private String dataScope; + + @ApiModelProperty(value = "企业No") + private String companyNo; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java new file mode 100644 index 0000000..2bb7684 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UserVO.java @@ -0,0 +1,117 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.validation.Create; +import com.itheima.sfbx.framework.commons.validation.Update; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.Max; +import javax.validation.constraints.NotNull; +import java.util.Set; + +/** + * @Description:用户表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class UserVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public UserVO(Long id, String dataState, String companyNo, String username, String password, String nickName, String email, String clientId, String realName, String mobile, String sex, String remark, String openId, Set roleVOIds, Set deptPostUserVOs, Set roleLabels, Set resourceRequestPaths, String userToken, DataSecurityVO dataSecurityVO, String deptNo, String postNo, Long roleId, Boolean onlyAuthenticate) { + super(id, dataState); + this.companyNo = companyNo; + this.username = username; + this.password = password; + this.nickName = nickName; + this.email = email; + this.clientId = clientId; + this.realName = realName; + this.mobile = mobile; + this.sex = sex; + this.remark = remark; + this.openId = openId; + this.roleVOIds = roleVOIds; + this.deptPostUserVOs = deptPostUserVOs; + this.roleLabels = roleLabels; + this.resourceRequestPaths = resourceRequestPaths; + this.userToken = userToken; + this.dataSecurityVO = dataSecurityVO; + this.deptNo = deptNo; + this.postNo = postNo; + this.roleId = roleId; + this.onlyAuthenticate = onlyAuthenticate; + } + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "用户账号") + private String username; + + @ApiModelProperty(value = "密码") + private String password; + + @ApiModelProperty(value = "用户昵称") + private String nickName; + + @ApiModelProperty(value = "用户邮箱") + private String email; + + @ApiModelProperty(value = "客户端") + private String clientId; + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "手机号码") + private String mobile; + + @ApiModelProperty(value = "用户性别(0男 1女 2未知)") + private String sex; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "三方openId") + private String openId; + + @ApiModelProperty(value = "查询用户:用户角色主键集合") + private Set roleVOIds; + + @ApiModelProperty(value = "查询用户:所属部门职位") + private Set deptPostUserVOs; + + @ApiModelProperty(value = "构建令牌:用户角色标识") + private Set roleLabels; + + @ApiModelProperty(value = "构建令牌:用户权限路径") + private Set resourceRequestPaths; + + @ApiModelProperty(value = "用户令牌") + private String userToken; + + @ApiModelProperty(value = "数据权限") + private DataSecurityVO dataSecurityVO; + + @ApiModelProperty(value = "部门编号【查询关联】") + private String deptNo; + + @ApiModelProperty(value = "职位编号【查询关联】") + private String postNo; + + @ApiModelProperty(value = "角色主键【查询关联】") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long roleId; + + @ApiModelProperty(value = "只做请求认证,客户只需请求认证,员工除请求认证,还需访问授权") + private Boolean onlyAuthenticate ; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java new file mode 100644 index 0000000..45caee8 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/security/UsernameVO.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.framework.commons.dto.security; + +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName LoginVo.java + * @Description 登录名称处理对象 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class UsernameVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Builder + public UsernameVO(String username, String clientId, String loginType, String loginBeanName,String companyNo) { + this.username = username; + this.clientId = clientId; + this.loginType = loginType; + this.loginBeanName = loginBeanName; + this.companyNo = companyNo; + } + + //登录名称 + private String username; + + //客户端 + private String clientId; + + //登录类型 + private String loginType; + + //登录处理类bean名称 + private String loginBeanName; + + //企业编号 + private String companyNo; + + /** + * 用户姓名 + */ + private String realName; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java new file mode 100644 index 0000000..feab12d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/ProofVO.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName Proof.java + * @Description 证明文件对象 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class ProofVO implements Serializable { + + private static final long serialVersionUID = 1L; + + @Builder + public ProofVO(String proofImage, String proofType) { + this.proofImage = proofImage; + this.proofType = proofType; + } + + @ApiModelProperty(value = "签名对应的资质证明图片需先进行 base64编码格式转换") + private String proofImage; + + @ApiModelProperty(value = "签名证明文件类型") + private String proofType; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java new file mode 100644 index 0000000..b3ff40f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SendMessageVO.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.LinkedHashMap; +import java.util.Set; + +/** + * @ClassName SendMessageVO.java + * @Description 短信发送Vo + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class SendMessageVO implements Serializable { + + @ApiModelProperty(value = "模板编号") + String templateNo; + + @ApiModelProperty(value = "签名编号") + String sginNo; + + @ApiModelProperty(value = "均衡算法") + String loadBalancerType; + + @ApiModelProperty(value = "手机号码组") + Set mobiles; + + @ApiModelProperty(value = "模板参数") + LinkedHashMap templateParam; + + @Builder + public SendMessageVO(String templateNo, String sginNo, String loadBalancerType, Set mobiles, LinkedHashMap templateParam) { + this.templateNo = templateNo; + this.sginNo = sginNo; + this.loadBalancerType = loadBalancerType; + this.mobiles = mobiles; + this.templateParam = templateParam; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java new file mode 100644 index 0000000..934313b --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsBlacklistVO.java @@ -0,0 +1,32 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:黑名单表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SmsBlacklistVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SmsBlacklistVO(Long id, String dataState, String mobile,String companyNo) { + super(id, dataState); + this.mobile = mobile; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "手机号码") + private String mobile; + + @ApiModelProperty(value = "企业编号") + private String companyNo; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java new file mode 100644 index 0000000..a96f13e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsChannelVO.java @@ -0,0 +1,76 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description 短信渠道 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SmsChannelVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SmsChannelVO(Long id, String dataState, String channelName, String channelLabel, String channelType, String domain, String accessKeyId, String accessKeySecret, String otherConfig, String level, String remark, String[] checkedIds, String companyNo, List otherConfigs) { + super(id, dataState); + this.channelName = channelName; + this.channelLabel = channelLabel; + this.channelType = channelType; + this.domain = domain; + this.accessKeyId = accessKeyId; + this.accessKeySecret = accessKeySecret; + this.otherConfig = otherConfig; + this.level = level; + this.remark = remark; + this.checkedIds = checkedIds; + this.companyNo = companyNo; + this.otherConfigs = otherConfigs; + } + + @ApiModelProperty(value = "通道名称") + private String channelName; + + @ApiModelProperty(value = "通道唯一标记") + private String channelLabel; + + @ApiModelProperty(value = "通道类型,1:文字,2:语音,3:推送") + private String channelType; + + @ApiModelProperty(value = "域名") + private String domain; + + @ApiModelProperty(value = "秘钥id") + private String accessKeyId; + + @ApiModelProperty(value = "秘钥值") + private String accessKeySecret; + + @ApiModelProperty(value = "其他配置") + private String otherConfig; + + @ApiModelProperty(value = "优先级") + private String level; + + @ApiModelProperty(value = "短信申请说明") + private String remark; + + @ApiModelProperty(value = "选中节点") + private String[] checkedIds; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "扩展配置",dataType = "OtherConfigVO") + private List otherConfigs; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java new file mode 100644 index 0000000..effef17 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSendRecordVO.java @@ -0,0 +1,95 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:发送记录表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SmsSendRecordVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SmsSendRecordVO(Long id, String dataState, String channelName, String channelLabel, Long templateId, String templateNo, String templateCode, String templateType, String signCode, String signName, String mobile, String sendContent, String sendStatus, String sendMsg, String acceptStatus, String acceptMsg, String serialNo, String templateParams, String companyNo) { + super(id, dataState); + this.channelName = channelName; + this.channelLabel = channelLabel; + this.templateId = templateId; + this.templateNo = templateNo; + this.templateCode = templateCode; + this.templateType = templateType; + this.signCode = signCode; + this.signName = signName; + this.mobile = mobile; + this.sendContent = sendContent; + this.sendStatus = sendStatus; + this.sendMsg = sendMsg; + this.acceptStatus = acceptStatus; + this.acceptMsg = acceptMsg; + this.serialNo = serialNo; + this.templateParams = templateParams; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "通道名称") + private String channelName; + + @ApiModelProperty(value = "通道唯一标识") + private String channelLabel; + + @ApiModelProperty(value = "模板表主键ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long templateId; + + @ApiModelProperty(value = "应用模板编号:多通道编号相同则认为是一个模板多个通道公用") + private String templateNo; + + @ApiModelProperty(value = "三方应用模板code") + private String templateCode; + + @ApiModelProperty(value = "短信类型: 0、通知 1、营销") + private String templateType; + + @ApiModelProperty(value = "三方签名code:发送短信可能用到") + private String signCode; + + @ApiModelProperty(value = "签名名称") + private String signName; + + @ApiModelProperty(value = "手机号码") + private String mobile; + + @ApiModelProperty(value = "发生内容") + private String sendContent; + + @ApiModelProperty(value = "发送状态") + private String sendStatus; + + @ApiModelProperty(value = "发送返回信息") + private String sendMsg; + + @ApiModelProperty(value = "是否受理成功") + private String acceptStatus; + + @ApiModelProperty(value = "受理返回信息") + private String acceptMsg; + + @ApiModelProperty(value = "发送流水") + private String serialNo; + + @ApiModelProperty(value = "模板参数") + private String templateParams; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java new file mode 100644 index 0000000..dbd309f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsSignVO.java @@ -0,0 +1,102 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.LinkedList; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SmsSignVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SmsSignVO(Long id, String dataState, String channelLabel, String signName, String signCode, String signType, + String documentType, String international, String signPurpose, String proofImage, + String proofType, String remark, String acceptStatus, String acceptMsg, String auditStatus, + String auditMsg, String signNo, LinkedList proofVos, LinkedList fileVOs,String companyNo) { + super(id, dataState); + this.channelLabel = channelLabel; + this.signName = signName; + this.signCode = signCode; + this.signType = signType; + this.documentType = documentType; + this.international = international; + this.signPurpose = signPurpose; + this.proofImage = proofImage; + this.proofType = proofType; + this.remark = remark; + this.acceptStatus = acceptStatus; + this.acceptMsg = acceptMsg; + this.auditStatus = auditStatus; + this.auditMsg = auditMsg; + this.signNo = signNo; + this.proofVos = proofVos; + this.fileVOs = fileVOs; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "通道唯一标识") + private String channelLabel; + + @ApiModelProperty(value = "签名名称") + private String signName; + + @ApiModelProperty(value = "三方签名code:发送短信需要用到") + private String signCode; + + @ApiModelProperty(value = "签名类型") + private String signType; + + @ApiModelProperty(value = "证明类型") + private String documentType; + + @ApiModelProperty(value = "是否国际/港澳台短信") + private String international; + + @ApiModelProperty(value = "签名用途: 0:自用。 1:他用。") + private String signPurpose; + + @ApiModelProperty(value = "签名对应的资质证明图片需先进行 base64 编码格式转换") + private String proofImage; + + @ApiModelProperty(value = "签名证明文件类型") + private String proofType; + + @ApiModelProperty(value = "短信申请说明") + private String remark; + + @ApiModelProperty(value = "是否受理成功") + private String acceptStatus; + + @ApiModelProperty(value = "受理返回信息") + private String acceptMsg; + + @ApiModelProperty(value = "审核状态") + private String auditStatus; + + @ApiModelProperty(value = "审核信息") + private String auditMsg; + + @ApiModelProperty(value = "应用签名编号:签名编号相同则认为是一个签名多个通道公用") + private String signNo; + + @ApiModelProperty(value = "证明文件组",dataType = "ProofVo") + private LinkedList proofVos; + + @ApiModelProperty(value = "附件信息",dataType = "AffixVo") + private LinkedList fileVOs; + + @ApiModelProperty(value = "企业编号") + private String companyNo; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java new file mode 100644 index 0000000..cda5d8d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/sms/SmsTemplateVO.java @@ -0,0 +1,90 @@ +package com.itheima.sfbx.framework.commons.dto.sms; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * @Description:模板表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class SmsTemplateVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SmsTemplateVO(Long id, String dataState, String channelLabel, String templateName, String smsType, + String templateNo, String templateCode, String content, String otherConfig, + String international, String remark, String acceptStatus, String acceptMsg, + String auditStatus, String auditMsg, List otherConfigs,String companyNo) { + super(id, dataState); + this.channelLabel = channelLabel; + this.templateName = templateName; + this.smsType = smsType; + this.templateNo = templateNo; + this.templateCode = templateCode; + this.content = content; + this.otherConfig = otherConfig; + this.international = international; + this.remark = remark; + this.acceptStatus = acceptStatus; + this.acceptMsg = acceptMsg; + this.auditStatus = auditStatus; + this.auditMsg = auditMsg; + this.otherConfigs = otherConfigs; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "通道唯一标识") + private String channelLabel; + + @ApiModelProperty(value = "魔板名称") + private String templateName; + + @ApiModelProperty(value = "短信类型") + private String smsType; + + @ApiModelProperty(value = "应用模板编号:多通道编号相同则认为是一个模板多个通道公用") + private String templateNo; + + @ApiModelProperty(value = "三方应用模板code") + private String templateCode; + + @ApiModelProperty(value = "模板内容") + private String content; + + @ApiModelProperty(value = "变量配置") + private String otherConfig; + + @ApiModelProperty(value = "是否国际/港澳台短信") + private String international; + + @ApiModelProperty(value = "短信申请说明") + private String remark; + + @ApiModelProperty(value = "是否受理成功") + private String acceptStatus; + + @ApiModelProperty(value = "受理返回信息") + private String acceptMsg; + + @ApiModelProperty(value = "审核状态") + private String auditStatus; + + @ApiModelProperty(value = "审核信息") + private String auditMsg; + + @ApiModelProperty(value = "变量配置",dataType = "OtherConfigVO") + private List otherConfigs; + + @ApiModelProperty(value = "企业编号") + private String companyNo; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java new file mode 100644 index 0000000..cab9d79 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/AliPeriodicVO.java @@ -0,0 +1,71 @@ +package com.itheima.sfbx.framework.commons.dto.trade; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName AliAppPeriodic.java + * @Description 阿里APP周期扣款参数对象 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +public class AliPeriodicVO implements Serializable { + + @Builder + public AliPeriodicVO(String agreementNo,String contractNo, String externalAgreementNo, String signScene, String signNotifyUrl, String rulePeriodType, String rulePeriod, String ruleExecuteTime, String ruleTotalAmount, String ruleSingleAmount, String ruleTotalPayments, String accessChannel) { + this.contractNo = contractNo; + this.externalAgreementNo = externalAgreementNo; + this.agreementNo = agreementNo; + this.signScene = signScene; + this.signNotifyUrl = signNotifyUrl; + this.rulePeriodType = rulePeriodType; + this.rulePeriod = rulePeriod; + this.ruleExecuteTime = ruleExecuteTime; + this.ruleTotalAmount = ruleTotalAmount; + this.ruleSingleAmount = ruleSingleAmount; + this.ruleTotalPayments = ruleTotalPayments; + this.accessChannel = accessChannel; + } + + @ApiModelProperty(value = "签约扣款:合同号") + private String contractNo; + + @ApiModelProperty(value = "签约扣款:商户签约号") + private String externalAgreementNo; + + @ApiModelProperty(value = "支付宝签约号:关联支付") + private String agreementNo; + + @ApiModelProperty(value = "签约扣款:扣款场景") + private String signScene; + + @ApiModelProperty(value = "签约扣款:签约成功异步通知地址") + private String signNotifyUrl; + + @ApiModelProperty(value = "签约扣款:周期类型") + private String rulePeriodType; + + @ApiModelProperty(value = "签约扣款:周期数") + private String rulePeriod; + + @ApiModelProperty(value = "签约扣款:下次扣款的时间") + private String ruleExecuteTime; + + @ApiModelProperty(value = "签约扣款:扣款总金额") + private String ruleTotalAmount; + + @ApiModelProperty(value = "签约扣款:单次扣款最大金额") + private String ruleSingleAmount; + + @ApiModelProperty(value = "签约扣款:总扣款次数") + private String ruleTotalPayments; + + @ApiModelProperty(value = "签约扣款:通道") + private String accessChannel; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java new file mode 100644 index 0000000..145cd4b --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/PayChannelVO.java @@ -0,0 +1,79 @@ +package com.itheima.sfbx.framework.commons.dto.trade; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Arrays; +import java.util.List; +import java.util.Objects; + +/** + * @ClassName PayChannelVO.java + * @Description 支付通道 + */ +@Data +@NoArgsConstructor +public class PayChannelVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public PayChannelVO(Long id, String dataState, String channelName, String channelLabel, String domain, String appId, String publicKey, String merchantPrivateKey, String otherConfig, String encryptKey, String remark, List otherConfigs, String companyNo, String notifyUrl) { + super(id, dataState); + this.channelName = channelName; + this.channelLabel = channelLabel; + this.domain = domain; + this.appId = appId; + this.publicKey = publicKey; + this.merchantPrivateKey = merchantPrivateKey; + this.otherConfig = otherConfig; + this.encryptKey = encryptKey; + this.remark = remark; + this.otherConfigs = otherConfigs; + this.companyNo = companyNo; + this.notifyUrl = notifyUrl; + } + + @ApiModelProperty(value = "通道名称") + private String channelName; + + @ApiModelProperty(value = "通道唯一标记") + private String channelLabel; + + @ApiModelProperty(value = "域名") + private String domain; + + @ApiModelProperty(value = "商户appid") + private String appId; + + @ApiModelProperty(value = "公钥") + private String publicKey; + + @ApiModelProperty(value = "商户私钥") + private String merchantPrivateKey; + + @ApiModelProperty(value = "其他配置") + private String otherConfig; + + @ApiModelProperty(value = "AES混淆密钥") + private String encryptKey; + + @ApiModelProperty(value = "说明") + private String remark; + + @ApiModelProperty(value = "扩展配置",dataType = "OtherConfigVO") + private List otherConfigs; + + + @ApiModelProperty(value = "商户ID【系统内部识别使用】") + private String companyNo; + + @ApiModelProperty(value = "回调地址") + private String notifyUrl; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java new file mode 100644 index 0000000..270fb3c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/RefundRecordVO.java @@ -0,0 +1,70 @@ +package com.itheima.sfbx.framework.commons.dto.trade; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.Objects; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class RefundRecordVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public RefundRecordVO(Long id, String dataState, Long tradeOrderNo, Long productOrderNo, String refundNo, String tradeChannel, String refundStatus, String refundCode, String refundMsg, String memo, BigDecimal refundAmount, String companyNo) { + super(id, dataState); + this.tradeOrderNo = tradeOrderNo; + this.productOrderNo = productOrderNo; + this.refundNo = refundNo; + this.tradeChannel = tradeChannel; + this.refundStatus = refundStatus; + this.refundCode = refundCode; + this.refundMsg = refundMsg; + this.memo = memo; + this.refundAmount = refundAmount; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "交易系统订单号【对于三方来说:商户订单】") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long tradeOrderNo; + + @ApiModelProperty(value = "业务系统订单号") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long productOrderNo; + + @ApiModelProperty(value = "本次退款订单号") + private String refundNo; + + @ApiModelProperty(value = "退款渠道【支付宝、微信、现金】") + private String tradeChannel; + + @ApiModelProperty(value = "退款状态【成功:SUCCESS,进行中:SENDING】") + private String refundStatus; + + @ApiModelProperty(value = "返回编码") + private String refundCode; + + @ApiModelProperty(value = "返回信息") + private String refundMsg; + + @ApiModelProperty(value = "备注【订单门店,桌台信息】") + private String memo; + + @ApiModelProperty(value = "本次退款金额") + private BigDecimal refundAmount; + + @ApiModelProperty(value = "商户号") + private String companyNo; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java new file mode 100644 index 0000000..81375de --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/SignContractVO.java @@ -0,0 +1,72 @@ +package com.itheima.sfbx.framework.commons.dto.trade; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * @ClassName SignContract.java + * @Description 签约合同 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="SignContract对象", description="签约合同") +public class SignContractVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public SignContractVO(String agreementNo, Long id, String dataState, String contractNo, String externalAgreementNo, String signState, String tradeChannel, String rulePeriodType, Long rulePeriod, BigDecimal ruleTotalAmount, BigDecimal ruleSingleAmount, Long ruleTotalPayments) { + super(id, dataState); + this.contractNo = contractNo; + this.externalAgreementNo = externalAgreementNo; + this.signState = signState; + this.tradeChannel = tradeChannel; + this.rulePeriodType = rulePeriodType; + this.rulePeriod = rulePeriod; + this.ruleTotalAmount = ruleTotalAmount; + this.ruleSingleAmount = ruleSingleAmount; + this.ruleTotalPayments = ruleTotalPayments; + this.agreementNo = agreementNo; + } + + @ApiModelProperty(value = "合同编号:关联业务") + private String contractNo; + + @ApiModelProperty(value = "商户签约号") + private String externalAgreementNo; + + @ApiModelProperty(value = "支付宝签约号:关联支付") + private String agreementNo; + + @ApiModelProperty(value = "签约状态:1. TEMP:暂存,协议未生效过;2. NORMAL:正常;3. STOP:暂停") + private String signState; + + @ApiModelProperty(value = "支付渠道【支付宝、微信】") + private String tradeChannel; + + @ApiModelProperty(value = "周期类型") + private String rulePeriodType; + + @ApiModelProperty(value = "周期数") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long rulePeriod; + + @ApiModelProperty(value = "总金额") + private BigDecimal ruleTotalAmount; + + @ApiModelProperty(value = "总金额") + private BigDecimal ruleSingleAmount; + + @ApiModelProperty(value = "扣款总次数") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long ruleTotalPayments; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java new file mode 100644 index 0000000..7e7ac57 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/dto/trade/TradeVO.java @@ -0,0 +1,168 @@ +package com.itheima.sfbx.framework.commons.dto.trade; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @ClassName TradeVO.java + * @Description 交易结果 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +public class TradeVO extends BaseVO { + + private static final long serialVersionUID = 1L; + + @Builder + public TradeVO(Long id,String notifyUrl, String dataState, String openId, Long productOrderNo, Long tradeOrderNo, String tradeChannel, + String tradeState, String payeeName, Long payeeId, String payerName, Long payerId, BigDecimal tradeAmount, + BigDecimal refund, String isRefund, String resultCode, String resultMsg, String resultJson, String placeOrderCode, + String placeOrderMsg, String placeOrderJson, String memo, String qrCodeImageBase64, String outRequestNo, + BigDecimal operTionRefund, String authCode, String quitUrl, String returnUrl, String billType, Date billDate, + String billDownloadUrl, String companyNo) { + super(id, dataState); + this.openId = openId; + this.productOrderNo = productOrderNo; + this.tradeOrderNo = tradeOrderNo; + this.tradeChannel = tradeChannel; + this.tradeState = tradeState; + this.payeeName = payeeName; + this.payeeId = payeeId; + this.payerName = payerName; + this.payerId = payerId; + this.tradeAmount = tradeAmount; + this.refund = refund; + this.isRefund = isRefund; + this.resultCode = resultCode; + this.resultMsg = resultMsg; + this.resultJson = resultJson; + this.placeOrderCode = placeOrderCode; + this.placeOrderMsg = placeOrderMsg; + this.placeOrderJson = placeOrderJson; + this.memo = memo; + this.qrCodeImageBase64 = qrCodeImageBase64; + this.outRequestNo = outRequestNo; + this.operTionRefund = operTionRefund; + this.authCode = authCode; + this.quitUrl = quitUrl; + this.returnUrl = returnUrl; + this.notifyUrl=notifyUrl; + this.billType = billType; + this.billDate = billDate; + this.billDownloadUrl = billDownloadUrl; + this.companyNo = companyNo; + + } + + @ApiModelProperty(value = "openId标识") + private String openId; + + @ApiModelProperty(value = "业务系统订单号") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long productOrderNo; + + @ApiModelProperty(value = "交易系统订单号【对于三方来说:商户订单】") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long tradeOrderNo; + + @ApiModelProperty(value = "支付渠道【支付宝、微信】") + private String tradeChannel; + + @ApiModelProperty(value = "交易单状态0待付款 1已支付 2已关闭)") + private String tradeState; + + @ApiModelProperty(value = "收款人姓名") + private String payeeName; + + @ApiModelProperty(value = "收款人账户ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long payeeId; + + @ApiModelProperty(value = "付款人姓名") + private String payerName; + + @ApiModelProperty(value = "付款人Id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long payerId; + + @ApiModelProperty(value = "交易金额") + private BigDecimal tradeAmount; + + @ApiModelProperty(value = "退款总金额") + private BigDecimal refund; + + @ApiModelProperty(value = "是否有退款:0,1") + private String isRefund; + + @ApiModelProperty(value = "第三方交易返回编码【最终确认交易结果】") + private String resultCode; + + @ApiModelProperty(value = "第三方交易返回提示消息【最终确认交易信息】") + private String resultMsg; + + @ApiModelProperty(value = "第三方交易返回信息json【分析交易最终信息】") + private String resultJson; + + @ApiModelProperty(value = "统一下单返回编码") + private String placeOrderCode; + + @ApiModelProperty(value = "统一下单返回信息") + private String placeOrderMsg; + + @ApiModelProperty(value = "统一下单返回信息json【用于生产二维码、Android ios唤醒支付等】") + private String placeOrderJson; + + @ApiModelProperty(value = "备注【订单门店,桌台信息】") + private String memo; + + @ApiModelProperty(value = "二维码base64") + private String qrCodeImageBase64; + + @ApiModelProperty(value = "退款请求号") + private String outRequestNo; + + @ApiModelProperty(value = "本次退款金额") + private BigDecimal operTionRefund; + + @ApiModelProperty(value = "支付授权码") + private String authCode; + + @ApiModelProperty(value = "支付宝:HTTP/HTTPS开头字符串") + private String quitUrl; + + @ApiModelProperty(value = "支付宝:用户付款中途退出返回商户网站的地址") + private String returnUrl; + + @ApiModelProperty(value = "支付宝:异步通知地址") + private String notifyUrl; + + @ApiModelProperty(value = "账单类型,商户通过接口或商户经开放平台授权后其所属服务商通过接口可以获取以下账单类型") + private String billType; + + @ApiModelProperty(value = "账单时间:日账单格式为yyyy-MM-dd,最早可下载2016年1月1日开始的日账单。不支持下载当日账单,只能下载前一日24点前的账单数据(T+1)") + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")//get + protected Date billDate; + + @ApiModelProperty(value = "账单地址") + private String billDownloadUrl; + + @ApiModelProperty(value = "商户ID【系统内部识别使用】") + private String companyNo; + + @ApiModelProperty(value = "退款记录") + private List refundRecordVOList; + + @ApiModelProperty(value = "阿里APP周期扣款签约参数对象") + private AliPeriodicVO aliPeriodicVO; + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/analysis/AnalysisEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/analysis/AnalysisEnum.java new file mode 100644 index 0000000..2e50328 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/analysis/AnalysisEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.commons.enums.analysis; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +public enum AnalysisEnum implements IBaseEnum { + + TIME_BUILD_FAIL(53001, "查询日期转换失败"), + ANALYSIS_CUSTOMER_CITY(53002,"统计分析:保单合同关联城市异常"), + + ANALYSIS_CUSTOMER_ACTIVE(53002,"统计分析:客户活跃度统计异常"), + + ANALYSIS_CUSTOMER_INSTANCE(53003,"统计分析:客户合同金额统计异常"), + ANALYSIS_CUSTOMER_SEX(53004, "统计分析:投保人性别统计异常"), + + ANALYSIS_CUSTOMER_INSURANCE_TYPE(53006, "统计分析:投保分类统计异常"), + + ANALYSIS_PV_UV(53007, "统计分析:PV_UV统计分析失败"), + ; + + private Integer code; + + private String msg; + + AnalysisEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/BaseEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/BaseEnum.java new file mode 100644 index 0000000..71bddfc --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/BaseEnum.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.framework.commons.enums.basic; + +/** + * @ClassName BasicEnum.java + * @Description 基础枚举 + */ +public enum BaseEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + SYSYTEM_FAIL(1503,"系统运行异常"), + REMOTE_FAIL(1504,"系统远程调用异常"), + VALID_EXCEPTION(1505,"参数校验异常"); + + public Integer code; + public String msg; + + BaseEnum(int code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/IBaseEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/IBaseEnum.java new file mode 100644 index 0000000..ebf59cb --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/basic/IBaseEnum.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.framework.commons.enums.basic; + +/** + * @Description:枚举接口 + */ +public interface IBaseEnum { + + //编码 + Integer getCode(); + + //信息 + String getMsg(); + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/DataDictEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/DataDictEnum.java new file mode 100644 index 0000000..855f61f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/DataDictEnum.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.framework.commons.enums.dict; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @Description:数字字典枚举 + */ +public enum DataDictEnum implements IBaseEnum { + PAGE_FAIL(25001, "查询数据字典列表失败"), + SAVE_FAIL(25002, "保存字典数据失败"), + UPDATE_FAIL(25003, "修改字典数据失败"), + FIND_DATADICTVO_DATAKEY(25004, "据dataKey获取DataDictVO失败"), + FIND_DATADICTVO_PARENTKEY(25005, "获取ParentKey下的数据失败"), + FIND_PARENTKEY_ALL(25006, "根据parentKey查询失败"), + FIND_DATAKEY_ALL(25007, "根据dataKey查询失败"), + CHECK_FALL(25008, "检查数字字典重复性异常"); + ; + + private Integer code; + private String msg; + + DataDictEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/PlacesEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/PlacesEnum.java new file mode 100644 index 0000000..1df815e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/dict/PlacesEnum.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.commons.enums.dict; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName PlacesEnum.java + * @Description 地区地域 + */ +public enum PlacesEnum implements IBaseEnum { + LIST_FAIL(34001, "查询省市区失败"); + + private Integer code; + private String msg; + + PlacesEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FileEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FileEnum.java new file mode 100644 index 0000000..6cb438a --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FileEnum.java @@ -0,0 +1,47 @@ +package com.itheima.sfbx.framework.commons.enums.file; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName FileEnum.java + * @Description 文件上传 + */ +public enum FileEnum implements IBaseEnum { + + DOWNLOAD_FAIL(21001, "下载文件失败"), + UPLOAD_FAIL(21002, "上传文件失败"), + SELECT_FILE_BUSINESSID_FAIL(21003, "查询业务对应附件失败"), + DELETE_FILE_BUSINESSID_FAIL(21004, "删除业务对应附件失败"), + PAGE_FAIL(21005, "查询附件列表失败"), + DELETE_FAIL(21006, "删除附件失败"), + SELECT_BUSUBBESSID_FAIL(21007, "查询附件所有业务ID失败"), + BIND_FAIL(21008, "业务绑定文件失败"), + FILE_NAME_NOTFOUND(21009, "上传文件名称为空"), + BUCKET_NAME_NULL(21010, "存储空间名称为空"), + STORE_FLAG_NULL(21011, "存储标识为空"), + FILE_PREFIX_NOT_FOUND(21012, "文件路径前缀标识没找到"), + FILE_OPERATE(21013, "操作文件数据失败"), + FILE_DATA_LOSE(21014, "文件操作关键数据异常"), + INIT_UPLOAD_FAIL(21015, "分片上传文件初始化失败"), + UPLOAD_PART_FAIL(21016, "分片上传文件失败"), + COMPLETE_PART_FAIL(21017, "分片上传合并文件失败"), + CLEAR_FILE_TASK_FAIL(21018, "定时清理失败"), + ; + + private Integer code; + private String msg; + + FileEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FilePartEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FilePartEnum.java new file mode 100644 index 0000000..1b3cbce --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/file/FilePartEnum.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.framework.commons.enums.file; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName FilePartEnum.java +* @Description 文件分片枚举 +*/ + +public enum FilePartEnum implements IBaseEnum { + + PAGE_FAIL(99001, "文件分片查询列表失败"), + SAVE_FAIL(99002, "文件分片保存失败"), + UPDATE_FAIL(99003, "文件分片修改失败"), + DEL_FAIL(99004, "文件分片删除失败"), + LIST_FAIL(99005, "文件分片查询失败"); + + private Integer code; + private String msg; + + FilePartEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/log/LogBusinessEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/log/LogBusinessEnum.java new file mode 100644 index 0000000..b83a4d2 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/log/LogBusinessEnum.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.framework.commons.enums.log; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName LogBusinessEnum.java + * @Description 数据埋点枚举 + */ +public enum LogBusinessEnum implements IBaseEnum { + + PAGE_FAIL(29001, "查询数据字典列表失败"), + SAVE_FAIL(29002,"日志保存失败"); + + private Integer code; + private String msg; + + LogBusinessEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/relations/RelationEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/relations/RelationEnum.java new file mode 100644 index 0000000..fe1ca67 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/relations/RelationEnum.java @@ -0,0 +1,25 @@ +package com.itheima.sfbx.framework.commons.enums.relations; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * RelationEnum + * + * @author: wgl + * @describe: 关系枚举类 + * @date: 2022/12/28 10:10 + */ +@AllArgsConstructor +@Getter +public enum RelationEnum{ + SELF("0","自己"), + SPAUSE("1","配偶"), + PARENTS("2","父母"), + CHILDREN("3","子女") + ; + private String relation; + + private String des; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthChannelEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthChannelEnum.java new file mode 100644 index 0000000..89c1962 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthChannelEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName AuthChannelEnum.java + * @Description 三方授权 + */ +public enum AuthChannelEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(74001, "查询公司表列表失败"), + SAVE_FAIL(74002, "保存公司表失败"), + UPDATE_FAIL(74003, "修改公司表失败"), + DEL_FAIL(74004, "删除公司表失败"), + LIST_FAIL(74005, "查询公司表失败"), + CREATE_POST_NO_FAIL(74006, "创建公司编号失败") + ; + + private Integer code; + + private String msg; + + AuthChannelEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthEnum.java new file mode 100644 index 0000000..2f324af --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/AuthEnum.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName AuthEnum.java + * @Description 认证枚举 + */ +public enum AuthEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + AUTH_FAIL(22001, "鉴权失败"), + HSOT_FAIL(22002, "host校验失败"), + NEED_LOGIN(22003, "请先登陆"), + LOGIN_FAIL(22004, "登陆失败"), + CODE_FAIL(22005, "验证码过期"); + + private Integer code; + private String msg; + + AuthEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CompanyEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CompanyEnum.java new file mode 100644 index 0000000..7afc26e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CompanyEnum.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName PostEnum.java +* @Description 公司表枚举 +*/ + +public enum CompanyEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(74001, "查询公司表列表失败"), + SAVE_FAIL(74002, "保存公司表失败"), + UPDATE_FAIL(74003, "修改公司表失败"), + DEL_FAIL(74004, "删除公司表失败"), + LIST_FAIL(74005, "查询公司表失败"), + CREATE_POST_NO_FAIL(74006, "创建公司编号失败") + ; + + private Integer code; + + private String msg; + + CompanyEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CustomerEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CustomerEnum.java new file mode 100644 index 0000000..af8fe1e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/CustomerEnum.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName UserEnum.java +* @Description 用客户枚举 +*/ + +public enum CustomerEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(58001, "分页查询用客户列表失败"), + FIND_FAIL(58002, "查询用客户失败"), + SAVE_FAIL(58003, "保存用客户失败"), + UPDATE_FAIL(58004, "修改用客户失败"), + DEL_FAIL(58005, "删除用客户失败"), + LIST_FAIL(58006, "查询用客户失败"), + RESET_PASSWORD_FAIL(58007,"充值密码失败") + ; + + private Integer code; + + private String msg; + + CustomerEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptEnum.java new file mode 100644 index 0000000..981928c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptEnum.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DeptEnum.java +* @Description 部门表枚举 +*/ + +public enum DeptEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(53001, "查询部门表列表失败"), + SAVE_FAIL(53002, "保存部门表失败"), + UPDATE_FAIL(53003, "修改部门表失败"), + DEL_FAIL(53004, "删除部门表失败"), + LIST_FAIL(53005, "查询部门表失败"), + TREE_FAIL(53006, "查询部门树失败"), + CREATE_DEPT_NO_FAIL(53007, "创建部门编号失败"), + ; + + private Integer code; + + private String msg; + + DeptEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptPostUserEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptPostUserEnum.java new file mode 100644 index 0000000..34f5a87 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/DeptPostUserEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName DeptPostUserEnum.java + * @Description 部门职位人员枚举 + */ +public enum DeptPostUserEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(63001, "查询部门职位人员表列表失败"), + SAVE_FAIL(63002, "保存部门职位人员表失败"), + UPDATE_FAIL(63003, "修改部门职位人员表失败"), + DEL_FAIL(63004, "删除部门职位人员表失败"), + LIST_FAIL(63005, "查询部门职位人员表失败"), + TREE_FAIL(63006, "查询部门职位人员树失败") + ; + + private Integer code; + + private String msg; + + DeptPostUserEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/PostEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/PostEnum.java new file mode 100644 index 0000000..9af2901 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/PostEnum.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName PostEnum.java +* @Description 岗位表枚举 +*/ + +public enum PostEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(73001, "查询岗位表列表失败"), + SAVE_FAIL(73002, "保存岗位表失败"), + UPDATE_FAIL(73003, "修改岗位表失败"), + DEL_FAIL(73004, "删除岗位表失败"), + LIST_FAIL(73005, "查询岗位表失败"), + CREATE_POST_NO_FAIL(73006, "创建岗位编号失败") + ; + + private Integer code; + + private String msg; + + PostEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/ResourceEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/ResourceEnum.java new file mode 100644 index 0000000..75c3238 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/ResourceEnum.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName ResourceEnum.java +* @Description 权限表枚举 +*/ + +public enum ResourceEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(83001, "分页查询权限表列表失败"), + FIND_FAIL(83002, "查询权限表失败"), + SAVE_FAIL(83003, "保存权限表失败"), + UPDATE_FAIL(83004, "修改权限表失败"), + DEL_FAIL(83005, "删除权限表失败"), + LIST_FAIL(83006, "查询权限表失败"), + TREE_FAIL(83007, "权限表tree失败"), + MENUS_FAIL(83008, "菜单加载失败") + ; + + private Integer code; + + private String msg; + + ResourceEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/RoleEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/RoleEnum.java new file mode 100644 index 0000000..10e952e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/RoleEnum.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName RoleEnum.java +* @Description 角色表枚举 +*/ + +public enum RoleEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(54001, "分页查询角色表列表失败"), + FIND_FAIL(54002, "查询角色表失败"), + SAVE_FAIL(54003, "保存角色表失败"), + UPDATE_FAIL(54004, "修改角色表失败"), + DEL_FAIL(54005, "删除角色表失败"), + LIST_FAIL(54006, "查询角色表失败") + ; + + private Integer code; + + private String msg; + + RoleEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/SalesEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/SalesEnum.java new file mode 100644 index 0000000..8083f5f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/SalesEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SalesEnum.java + * @Description TODO + */ +public enum SalesEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(55001, "分页查询销售表列表失败"), + FIND_FAIL(55002, "查询销售表失败"), + SAVE_FAIL(55003, "保存销售表失败"), + UPDATE_FAIL(55004, "修改销售表失败"), + DEL_FAIL(55005, "删除销售表失败"), + LIST_FAIL(55006, "查询销售表失败") + ; + + private Integer code; + + private String msg; + + SalesEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/UserEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/UserEnum.java new file mode 100644 index 0000000..ba6f75f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/security/UserEnum.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.framework.commons.enums.security; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName UserEnum.java +* @Description 用户表枚举 +*/ + +public enum UserEnum implements IBaseEnum { + + SUCCEED(200,"操作成功"), + FAIL(1000,"操作失败"), + PAGE_FAIL(56001, "分页查询用户表列表失败"), + FIND_FAIL(56002, "查询用户表失败"), + SAVE_FAIL(56003, "保存用户表失败"), + UPDATE_FAIL(56004, "修改用户表失败"), + DEL_FAIL(56005, "删除用户表失败"), + LIST_FAIL(56006, "查询用户表失败"), + + POST_NOT_BE_NULL(56007, "职位不能为空失败"), + + ROLE_NOT_BE_NULL(56008, "角色不能为空失败"), + ; + + private Integer code; + + private String msg; + + UserEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsBlacklistEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsBlacklistEnum.java new file mode 100644 index 0000000..e610ccc --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsBlacklistEnum.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsBlacklistEnum.java + * @Description 短信黑名单 + */ +public enum SmsBlacklistEnum implements IBaseEnum { + + PAGE_FAIL(48001, "查询黑名单列表失败"), + CREATE_FAIL(48002, "保存黑名单失败"), + UPDATE_FAIL(48003, "修改黑名单失败"), + DELETE_FAIL(48004, "修改黑名单失败"), + SELECT_FAIL(48005, "查询黑名单失败"); + + private Integer code; + private String msg; + + SmsBlacklistEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsChannelEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsChannelEnum.java new file mode 100644 index 0000000..bd4cd30 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsChannelEnum.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsChannelEnum.java + * @Description TODO + */ +public enum SmsChannelEnum implements IBaseEnum { + + PAGE_FAIL(47001, "查询通道列表失败"), + CREATE_FAIL(47002, "保存通道失败"), + UPDATE_FAIL(47003, "修改通道失败"), + DELETE_FAIL(47004, "修改通道失败"), + SELECT_FAIL(47005, "查询通道失败"); + + private Integer code; + private String msg; + + SmsChannelEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendEnum.java new file mode 100644 index 0000000..a7a150e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendEnum.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsSend.java + * @Description 短信发送枚举 + */ +public enum SmsSendEnum implements IBaseEnum { + + PEXCEED_THE_LIMIT (39001, "超过发送上限"), + SEND_FAIL(39002, "发送短信失败"), + SEND_SUCCEED(39004, "此短信已送达"), + QUERY_FAIL(39003, "查询短信发送情况失败"), + RETRY_FAIL(39004, "重新短信发送失败"), + + ; + + private Integer code; + private String msg; + + SmsSendEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendRecordEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendRecordEnum.java new file mode 100644 index 0000000..9ff852b --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSendRecordEnum.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsSendRecordEnum.java + * @Description 短信发送记录 + */ +public enum SmsSendRecordEnum implements IBaseEnum { + + PAGE_FAIL(49001, "查询发送记录列表失败"), + CREATE_FAIL(49002, "保存发送记录失败"), + UPDATE_FAIL(49003, "修改发送记录失败"), + DELETE_FAIL(49004, "修改发送记录失败"), + SELECT_FAIL(49005, "查询发送记录失败"), + SEND_RECORD_FAIL(49006, "重发失败"); + + private Integer code; + private String msg; + + SmsSendRecordEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSignEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSignEnum.java new file mode 100644 index 0000000..061a048 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsSignEnum.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsSignEnum.java + * @Description 签名枚举类 + */ +public enum SmsSignEnum implements IBaseEnum { + + PAGE_FAIL(46001, "查询签名列表失败"), + CREATE_FAIL(46002, "保存签名失败"), + UPDATE_FAIL(46003, "修改签名失败"), + DELETE_FAIL(46004, "删除签名失败"), + SELECT_FAIL(46005, "查询签名失败"); + + private Integer code; + private String msg; + + SmsSignEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsTemplateEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsTemplateEnum.java new file mode 100644 index 0000000..5021d2e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/sms/SmsTemplateEnum.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.enums.sms; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName SmsTemplateEnum.java + * @Description 签名模板枚举 + */ +public enum SmsTemplateEnum implements IBaseEnum { + + PAGE_FAIL(48001, "查询模板列表失败"), + CREATE_FAIL(48002, "保存模板失败"), + UPDATE_FAIL(48003, "修改模板失败"), + DELETE_FAIL(48004, "修改模板失败"), + SELECT_FAIL(48005, "查询模板失败"); + + private Integer code; + private String msg; + + SmsTemplateEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/PayChannelEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/PayChannelEnum.java new file mode 100644 index 0000000..cb5f96d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/PayChannelEnum.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.framework.commons.enums.trade; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + + +/** + * @ClassName PayChannelEnum.java + * @Description 支付枚举类 + */ +public enum PayChannelEnum implements IBaseEnum { + + PAGE_FAIL(51001, "查询支付通道列表失败"), + CREATE_FAIL(51002, "保存支付通道失败"), + UPDATE_FAIL(51003, "修改支付通道失败"), + DELETE_FAIL(51004, "修改支付通道失败"), + SELECT_FAIL(51005, "查询支付通道失败"), + CHANNEL_FAIL(51006, "交易渠道不存在"), + ; + + private Integer code; + private String msg; + + PayChannelEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/SignContractEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/SignContractEnum.java new file mode 100644 index 0000000..25aaa4e --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/SignContractEnum.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.commons.enums.trade; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName TradeEnum.java + * @Description 签约合同枚举 + */ +public enum SignContractEnum implements IBaseEnum { + + PAGE_FAIL(25001, "查询签约合同失败"), + SAVE_FAIL(25002, "保存签约合同失败"), + UPDATE_FAIL(25003, "修改签约合同失败"), + DELETE_FAIL(25004, "修改签约合同失败"), + LIST_FAIL(25004, "查询签约合同失败"); + + private Integer code; + private String msg; + + SignContractEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/TradeEnum.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/TradeEnum.java new file mode 100644 index 0000000..a58f548 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/enums/trade/TradeEnum.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.framework.commons.enums.trade; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * @ClassName TradeEnum.java + * @Description TODO + */ +public enum TradeEnum implements IBaseEnum { + + CONFIG_ERROR(43002, "微信支付配置错误!"), + CHECK_TRADE_FAIL(43003,"交易单校验失败"), + PAYING_TRADE_FAIL(43004, "交易单支付失败"), + TRADE_STATE_SUCCEED(43005, "交易单已完成,不可重复支付"), + TRADE_STATE_PAYING(43006, "交易单交易中,不可重复支付"), + TRYLOCK_TRADE_FAIL(43007, "交易加锁失败"), + CONFIG_EMPT(43008, "支付配置为空"), + TRAD_PAY_FAIL(43009, "统一下单交易失败"), + TRAD_DEDUCTION_FAIL(43009, "周期性扣款失败"), + TRAD_SIGN_CONTRACT_FAIL(43009, "周期性扣款签约失败"), + TRAD_QRCODE_FAIL(43010, "生成二维码失败"), + TRAD_QUERY_FAIL(43011, "查询统一下单交易失败"), + TRAD_REFUND_FAIL(43012, "统一下单退款交易失败"), + TRAD_QUERY_REFUND_FAIL(43013, "统一下单退款交易查询失败"), + TRAD_CLOSE_FAIL(43014, "统一下单退款交易失败"); + + private Integer code; + private String msg; + + TradeEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/exception/ProjectException.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/exception/ProjectException.java new file mode 100644 index 0000000..320092d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/exception/ProjectException.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.framework.commons.exception; + + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.ToString; + +/** + * @Description:自定义异常 + */ +@Data +@NoArgsConstructor +@ToString +public class ProjectException extends RuntimeException { + + //错误编码 + private int code; + + //提示信息 + private String message; + + //异常接口 + private IBaseEnum baseEnum; + + public ProjectException(IBaseEnum baseEnum) { + this.baseEnum = baseEnum; + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/properties/SecurityConfigProperties.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/properties/SecurityConfigProperties.java new file mode 100644 index 0000000..1be9330 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/properties/SecurityConfigProperties.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.framework.commons.properties; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName CoustomerSecurityProperties.java + * @Description 忽略配置及跨域 + */ +@Slf4j +@Data +@ConfigurationProperties(prefix = "itheima.framework.security") +@Configuration +public class SecurityConfigProperties { + + @Value("${itheima.framework.security:888itcast.CN764%...}") + String passworddDfaule; + + List ignoreUrl = new ArrayList<>(); + + List origins = new ArrayList<>(); + + String loginPage; + + //令牌有效时间 + Integer accessTokenValiditySeconds = 3*24*3600; + + //刷新令牌有效时间 + Integer refreshTokenValiditySeconds= 7*24*3600; +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/BeanConv.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/BeanConv.java new file mode 100644 index 0000000..6e3d925 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/BeanConv.java @@ -0,0 +1,143 @@ +package com.itheima.sfbx.framework.commons.utils; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import ma.glasnost.orika.MapperFacade; +import ma.glasnost.orika.MapperFactory; +import ma.glasnost.orika.MappingContext; +import ma.glasnost.orika.converter.BidirectionalConverter; +import ma.glasnost.orika.converter.ConverterFactory; +import ma.glasnost.orika.impl.DefaultMapperFactory; +import ma.glasnost.orika.metadata.ClassMapBuilder; +import ma.glasnost.orika.metadata.Type; +import org.springframework.beans.BeanUtils; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.ArrayList; +import java.util.List; + +/*** + * @description 对象转换工具,当对象成员变量属性:名称及类型相同时候会自动 + * 填充其值 + * + */ +@Slf4j +public class BeanConv { + + private static MapperFacade mapper; + + private static MapperFacade notNullMapper; + + static { + MapperFactory mapperFactory = new DefaultMapperFactory.Builder().build(); + ConverterFactory converterFactory = mapperFactory.getConverterFactory(); + converterFactory.registerConverter(new LocalDateTimeConverter()); + converterFactory.registerConverter(new LocalDateConverter()); + converterFactory.registerConverter(new LocalTimeConverter()); + mapper = mapperFactory.getMapperFacade(); + MapperFactory notNullMapperFactory = new DefaultMapperFactory.Builder().mapNulls(false).build(); + notNullMapper = notNullMapperFactory.getMapperFacade(); + } + + private static class LocalDateTimeConverter extends BidirectionalConverter { + + @Override + public LocalDateTime convertTo(LocalDateTime localDateTime, Type type, MappingContext mappingContext) { + return LocalDateTime.from(localDateTime); + } + + @Override + public LocalDateTime convertFrom(LocalDateTime localDateTime, Type type, MappingContext mappingContext) { + return LocalDateTime.from(localDateTime); + } + } + private static class LocalDateConverter extends BidirectionalConverter { + @Override + public LocalDate convertTo(LocalDate localDate, Type type, MappingContext mappingContext) { + return LocalDate.from(localDate); + } + + @Override + public LocalDate convertFrom(LocalDate localDate, Type type, MappingContext mappingContext) { + return LocalDate.from(localDate); + } + } + private static class LocalTimeConverter extends BidirectionalConverter { + + @Override + public LocalTime convertTo(LocalTime localTime, Type type, MappingContext mappingContext) { + return LocalTime.from(localTime); + } + + @Override + public LocalTime convertFrom(LocalTime localTime, Type type, MappingContext mappingContext) { + return LocalTime.from(localTime); + } + } + + + /** + * 分页对象复制 + * @param source 源对象 + * @param destinationClass 目标对象类型 + */ + public static Page toPage(Page source, Class destinationClass) { + if (EmptyUtil.isNullOrEmpty(source)){ + return null; + } + Class handlerClass = source.getClass(); + Page destination = mapper.map(source, handlerClass); + destination.setRecords(mapper.mapAsList(source.getRecords(),destinationClass)); + return destination; + } + + /*** + * @description 深度复制对象 + * + * @param source 源对象 + * @param destinationClass 目标类型 + * @return + */ + public static T toBean(Object source, Class destinationClass) { + if (EmptyUtil.isNullOrEmpty(source)){ + return null; + } + return mapper.map(source, destinationClass); + } + + /*** + * @description 深度复制对象 + * + * @param source 源对象 + * @param destinationClass 目标类型 + * @return + */ + public static T toBean(Object source, Class destinationClass, String... fieldsToIgnore) { + try { + T t = destinationClass.getDeclaredConstructor().newInstance(); + BeanUtils.copyProperties(source, t, fieldsToIgnore); + return t; + }catch (Exception e){ + ExceptionsUtil.getStackTraceAsString(e); + return null; + } + } + + + /*** + * @description 复制List + * + * @param sourceList 源list对象 + * @param destinationClass 目标类型 + * @return + */ + public static List toBeanList(List sourceList, Class destinationClass) { + if (EmptyUtil.isNullOrEmpty(sourceList)){ + return new ArrayList<>(); + } + return mapper.mapAsList(sourceList,destinationClass); + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CityUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CityUtil.java new file mode 100644 index 0000000..485cb0f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CityUtil.java @@ -0,0 +1,185 @@ +package com.itheima.sfbx.framework.commons.utils; + +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import lombok.Data; + +import java.io.BufferedReader; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLConnection; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Random; + +/** + * CityParamBuild + * + * @author: wgl + * @describe: 城市参数封装--请求百度地图 + * @date: 2022/12/28 10:10 + */ +public class CityUtil { + + // 中国省份 + private static final String[] provinces = {"北京市", "上海市", "天津市", "重庆市", "河北省", "山西省", "辽宁省", "吉林省", "黑龙江省", + "江苏省", "浙江省", "安徽省", "福建省", "江西省", "山东省", "河南省", "湖北省", "湖南省", "广东省", "海南省", "四川省", "贵州省", + "云南省", "陕西省", "甘肃省", "青海省", "台湾省", "内蒙古自治区", "广西壮族自治区", "西藏自治区", "宁夏回族自治区", "新疆维吾尔自治区", + "香港特别行政区", "澳门特别行政区"}; + + // 中国各省对应的城市 + private static final String[][] cities = { + {"北京市"}, + {"上海市"}, + {"天津市"}, + {"重庆市"}, + {"石家庄市", "唐山市", "秦皇岛市", "邯郸市", "邢台市", "保定市", "张家口市", "承德市", "沧州市", "廊坊市", "衡水市"}, + {"太原市", "大同市", "阳泉市", "长治市", "晋城市", "朔州市", "晋中市", "运城市", "忻州市", "临汾市", "吕梁市"}, + {"沈阳市", "大连市", "鞍山市", "抚顺市", "本溪市", "丹东市", "锦州市", "营口市", "阜新市", "辽阳市", "盘锦市", "铁岭市", "朝阳市", "葫芦岛市"}, + {"长春市", "吉林市", "四平市", "辽源市", "通化市", "白山市", "松原市", "白城市", "延边朝鲜族自治州"}, + {"哈尔滨市", "齐齐哈尔市", "鸡西市", "鹤岗市", "双鸭山市", "大庆市", "伊春市", "佳木斯市", "七台河市", "牡丹江市", "黑河市", "绥化市", "大兴安岭地区"}, + {"南京市", "无锡市", "徐州市", "常州市", "苏州市", "南通市", "连云港市", "淮安市", "盐城市", "扬州市", "镇江市", "泰州市", "宿迁市"}, + {"杭州市", "宁波市", "温州市", "嘉兴市", "湖州市", "绍兴市", "金华市", "衢州市", "舟山市", "台州市", "丽水市"}, + {"合肥市", "芜湖市", "蚌埠市", "淮南市", "马鞍山市", "淮北市", "铜陵市", "安庆市", "黄山市", "滁州市", "阜阳市", "宿州市", "六安市", "亳州市", "池州市", "宣城市"}, + {"福州市", "厦门市", "漳州市", "泉州市", "莆田市", "三明市", "南平市", "龙岩市", "宁德市"}, + {"南昌市", "景德镇市", "萍乡市", "九江市", "新余市", "鹰潭市", "赣州市", "吉安市", "宜春市", "抚州市", "上饶市"}, + {"济南市", "青岛市", "淄博市", "枣庄市", "东营市", "烟台市", "潍坊市", "济宁市", "泰安市", "威海市", "日照市", "莱芜市", "临沂市", "德州市", "聊城市", "滨州市", "菏泽市"}, + {"郑州市", "开封市", "洛阳市", "平顶山市", "安阳市", "鹤壁市", "新乡市", "焦作市", "濮阳市", "许昌市", "漯河市", "三门峡市", "南阳市", "商丘市", "信阳市", "周口市", "驻马店市"}, + {"武汉市", "黄石市", "十堰市", "宜昌市", "襄阳市", "鄂州市", "荆门市", "孝感市", "荆州市", "黄冈市", "咸宁市", "随州市", "恩施土家族苗族自治州"}, + {"长沙市", "株洲市", "湘潭市", "衡阳市", "邵阳市", "岳阳市", "常德市", "张家界市", "益阳市", "郴州市", "永州市", "怀化市", "娄底市", "湘西土家族苗族自治州"}, + {"广州市", "韶关市", "深圳市", "珠海市", "汕头市", "佛山市", "江门市", "湛江市", "茂名市", "肇庆市", "惠州市", "梅州市", "汕尾市", "河源市", "阳江市", "清远市", "东莞市", "中山市", "潮州市", "揭阳市", "云浮市"}, + {"海口市", "三亚市", "三沙市", "儋州市"}, + {"成都市", "自贡市", "攀枝花市", "泸州市", "德阳市", "绵阳市", "广元市", "遂宁市", "内江市", "乐山市", "南充市", "眉山市", "宜宾市", "广安市", "达州市", "雅安市", "巴中市", "资阳市", "阿坝藏族羌族自治州", "甘孜藏族自治州", "凉山彝族自治州"}, + {"贵阳市", "六盘水市", "遵义市", "安顺市", "毕节市", "铜仁市", "黔西南布依族苗族自治州", "黔东南苗族侗族自治州", "黔南布依族苗族自治州"}, + {"昆明市", "曲靖市", "玉溪市", "保山市", "昭通市", "丽江市", "普洱市", "临沧市", "楚雄彝族自治州", "红河哈尼族彝族自治州", "文山壮族苗族自治州", "西双版纳傣族自治州", "大理白族自治州", "德宏傣族景颇族自治州", "怒江傈僳族自治州", "迪庆藏族自治州"}, + {"西安市", "铜川市", "宝鸡市", "咸阳市", "渭南市", "延安市", "汉中市", "榆林市", "安康市", "商洛市"}, + {"兰州市", "嘉峪关市", "金昌市", "白银市", "天水市", "武威市", "张掖市", "平凉市", "酒泉市", "庆阳市", "定西市", "陇南市", "临夏回族自治州", "甘南藏族自治州"}, + {"西宁市", "海东市", "海北藏族自治州", "黄南藏族自治州", "海南藏族自治州", "果洛藏族自治州", "玉树藏族自治州", "海西蒙古族藏族自治州"}, + {"台北市", "新北市", "桃园市", "台中市", "台南市", "高雄市", "基隆市", "新竹市", "嘉义市"}, + {"呼和浩特市", "包头市", "乌海市", "赤峰市", "通辽市", "鄂尔多斯市", "呼伦贝尔市", "巴彦淖尔市", "乌兰察布市", "兴安盟", "锡林郭勒盟", "阿拉善盟"}, + {"南宁市", "柳州市", "桂林市", "梧州市", "北海市", "防城港市", "钦州市", "贵港市", "玉林市", "百色市", "贺州市", "河池市", "来宾市", "崇左市"}, + {"拉萨市", "昌都市", "山南市", "日喀则市", "那曲市", "阿里地区", "林芝市"}, + {"银川市", "石嘴山市", "吴忠市", "固原市", "中卫市"}, + {"乌鲁木齐市", "克拉玛依市", "吐鲁番市", "哈密市", "昌吉回族自治州", "博尔塔拉蒙古自治州", "巴音郭楞蒙古自治州", "阿克苏地区", "克孜勒苏柯尔克孜自治州", "喀什地区", "和田地区", "伊犁哈萨克自治州", "塔城地区", "阿勒泰地区"}, + {"香港特别行政区"}, + {"澳门特别行政区"} + }; + + private final static List firstTierCities = Arrays.asList("北京市", "上海市", "广州市", "深圳市","深圳市","武汉市","重庆市","成都市","南京市","长沙市","青岛市","天津市","杭州市","郑州市","西安市","宁波市","无锡市","苏州市","大连市"); + + private final static List secondTierCities = Arrays.asList("佛山市", "沈阳市", "无锡市", "济南市", "厦门市", "福州市", "温州市", "哈尔滨市", "石家庄市", "大连市", "南宁市", "泉州市", "金华市", "贵阳市", "常州市", "长春市", "南昌市", "南通市", "嘉兴市", "徐州市", "惠州市", "太原市", "台州市", "绍兴市", "保定市", "中山市", "潍坊市", "临沂市", "珠海市", "烟台市"); + + public static boolean isFirstTierCity(String city) { + return firstTierCities.contains(city); + } + + public static boolean isSecondTierCity(String city) { + return secondTierCities.contains(city); + } + + public static boolean isOtherCity(String city) { + return !secondTierCities.contains(city)&&!firstTierCities.contains(city); + } + + + public static void handlerCity(LogBusinessVO logBusinessVO) { + try { +// 生产中需要根据IP获得省份 +// Map params = new LinkedHashMap(); +// params.put("ip", logBusinessVO.getHostAddress()); +// params.put("coor", "gcj02"); +// params.put("ak", ak); +// this.requestGetAK(params); + CityDTO cityDTO = randomCity(); + logBusinessVO.setProvince(cityDTO.getProvince()); + logBusinessVO.setCity(cityDTO.getCity()); + } catch (Exception e) { + e.printStackTrace(); + } + } + +// public static String URL = "https://api.map.baidu.com/location/ip?"; + +// /** +// * 默认ak +// * 选择了ak,使用IP白名单校验: +// * 根据您选择的AK已为您生成调用代码 +// * 检测到您当前的ak设置了IP白名单校验 +// * 您的IP白名单中的IP非公网IP,请设置为公网IP,否则将请求失败 +// * 请在IP地址为xxxxxxx的计算发起请求,否则将请求失败 +// */ +// public CityDTO requestGetAK(Map param) throws Exception { +// try { +// StringBuffer queryString = new StringBuffer(); +// queryString.append(URL); +// for (Map.Entry pair : param.entrySet()) { +// queryString.append(pair.getKey() + "="); +// // 第一种方式使用的 jdk 自带的转码方式 第二种方式使用的 spring 的转码方法 两种均可 +// // queryString.append(URLEncoder.encode((String) pair.getValue(), "UTF-8").replace("+", "%20") + "&"); +// queryString.append(UriUtils.encode((String) pair.getValue(), "UTF-8") + "&"); +// } +// +// if (queryString.length() > 0) { +// queryString.deleteCharAt(queryString.length() - 1); +// } +// +// java.net.URL url = new URL(queryString.toString()); +// System.out.println(queryString.toString()); +// URLConnection httpConnection = (HttpURLConnection) url.openConnection(); +// httpConnection.connect(); +// +// InputStreamReader isr = new InputStreamReader(httpConnection.getInputStream()); +// BufferedReader reader = new BufferedReader(isr); +// StringBuffer buffer = new StringBuffer(); +// String line; +// while ((line = reader.readLine()) != null) { +// buffer.append(line); +// } +// reader.close(); +// isr.close(); +// System.out.println("AK: " + buffer.toString()); +// Map map = JSONUtil.toBean(buffer.toString(), Map.class); +// Map address_detail = (Map) (((Map) map.get("content")).get("address_detail")); +// CityDTO cityDTO = new CityDTO(); +// cityDTO.setCity(address_detail.get("city") + ""); +// cityDTO.setProvince(address_detail.get("province") + ""); +// return cityDTO; +// } catch (Exception e) { +// //由于内网ip导致无法正确获取ip +// CityDTO cityDTO = new CityDTO(); +// cityDTO.setCity("北京市"); +// cityDTO.setProvince("北京市"); +// return cityDTO; +// } +// } + + private static CityDTO randomCity(){ + // 随机选择一个省 + Random random = new Random(); + int provinceIndex = random.nextInt(provinces.length); + String selectedProvince = provinces[provinceIndex]; + + // 在选定的省中随机选择一个市 + int cityIndex = random.nextInt(cities[provinceIndex].length); + String selectedCity = cities[provinceIndex][cityIndex]; + + // 输出结果 + System.out.println("随机生成的省份:" + selectedProvince); + System.out.println("随机生成的城市:" + selectedCity); + CityDTO cityDTO = new CityDTO(); + cityDTO.setCity(selectedCity); + cityDTO.setProvince(selectedProvince); + return cityDTO; + } + + @Data + static class CityDTO { + //城市 + private String city; + //省份 + private String province; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CustomerInfoUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CustomerInfoUtil.java new file mode 100644 index 0000000..3d3125f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/CustomerInfoUtil.java @@ -0,0 +1,88 @@ +package com.itheima.sfbx.framework.commons.utils; + +import cn.hutool.core.util.StrUtil; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * CustomerInfoUtil + * + * @author: wgl + * @describe: 用户信息工具类 + * @date: 2022/12/28 10:10 + */ +public class CustomerInfoUtil { + + /** + * 根据身份证号获取年龄 + * @param idNumber 身份证号 + * @return 年龄 + */ + public static int getAgeByIdCard(String idNumber) { + int age = 0; + if (idNumber.length() == 18) { + String birthDateStr = idNumber.substring(6, 14); // 提取出生日期部分 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + try { + Date birthDate = sdf.parse(birthDateStr); + Calendar cal = Calendar.getInstance(); + cal.setTime(birthDate); + int birthYear = cal.get(Calendar.YEAR); + int currentYear = Calendar.getInstance().get(Calendar.YEAR); + age = currentYear - birthYear; + } catch (ParseException e) { + // 处理日期解析异常 + e.printStackTrace(); + } + } + return age; + } + + /** + * 根据身份证号获取出生日期 + * @param idNumber 身份证号 + * @return 出生日期字符串 + */ + public static String getBirthDateByIdCard(String idNumber) { + String birthDateStr = ""; + if (idNumber.length() == 18) { + birthDateStr = idNumber.substring(6, 14); // 提取出生日期部分 + } + return birthDateStr; + } + + /** + * 根据身份证号获取性别 + * @return + */ + public static String setSexByIdCard(String idNumber) { + if(StrUtil.isNotEmpty(idNumber)) { + if (idNumber.length() == 18) { + char genderChar = idNumber.charAt(16); // 18位身份证号的第17位 + int genderDigit = Character.getNumericValue(genderChar); + if (genderDigit % 2 == 0) { + return "女"; + } else { + return "男"; + } + } else if (idNumber.length() == 15) { + char genderChar = idNumber.charAt(14); // 15位身份证号的最后一位 + int genderDigit = Character.getNumericValue(genderChar); + if (genderDigit % 2 == 0) { + return "女"; + } else { + return "男"; + } + } else { + // 如果身份证号位数不是15位或18位,可以根据实际需求返回错误信息或其他处理方式 + return "无法确定性别"; + } + }else { + // 如果身份证号位数不是15位或18位,可以根据实际需求返回错误信息或其他处理方式 + return "无法确定性别"; + } + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/DateAvgUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/DateAvgUtil.java new file mode 100644 index 0000000..c02e619 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/DateAvgUtil.java @@ -0,0 +1,137 @@ +package com.itheima.sfbx.framework.commons.utils; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.regex.Pattern; + +/** + * DateAvgUtil + * + * @author: wgl + * @describe: 日期工具类 + * @date: 2022/12/28 10:10 + */ +public class DateAvgUtil { + + + /** + * 获取本月的第一天的00:00:00 + * 和本月最后一天的 23:59:59 + * @return List 包含时间节点的列表 + */ + public static List getThisMonthBetweenTime() { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + List res = new ArrayList(); + Calendar calendar = Calendar.getInstance(); + + // 获取本月第一天的日期和时间 + calendar.set(Calendar.DAY_OF_MONTH, 1); + calendar.set(Calendar.HOUR_OF_DAY, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.SECOND, 0); + Date firstDayOfMonth = calendar.getTime(); + + // 获取本月最后一天的日期和时间 + calendar.add(Calendar.MONTH, 1); + calendar.add(Calendar.DATE, -1); + calendar.set(Calendar.HOUR_OF_DAY, 23); + calendar.set(Calendar.MINUTE, 59); + calendar.set(Calendar.SECOND, 59); + Date lastDayOfMonth = calendar.getTime(); + + // 将时间节点放入 MonthDTO 对象并添加到结果列表 + res.add(sdf.format(firstDayOfMonth)); + res.add(sdf.format(lastDayOfMonth)); + return res; + + } + + /** + * 根据时间单位获取其中的每一个时间节点 + * @param beginTime 起始时间 + * @param endTime 结束时间 + * @param timeUnit 时间单位 + * @return List 包含时间节点的列表 + */ + public static List getGraduallys(String beginTime, String endTime, TimeUnit timeUnit) { + List timeNodes = new ArrayList<>(); + SimpleDateFormat dateFormat = getDateFormat(beginTime); + + try { + Date start = dateFormat.parse(beginTime); + Date end = dateFormat.parse(endTime); + + long duration = end.getTime() - start.getTime(); + + switch (timeUnit) { + case DAYS: + long days = TimeUnit.MILLISECONDS.toDays(duration); + for (long i = 0; i <= days; i++) { + Date node = new Date(start.getTime() + TimeUnit.DAYS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + + case HOURS: + long hours = TimeUnit.MILLISECONDS.toHours(duration); + for (long i = 0; i <= hours; i++) { + Date node = new Date(start.getTime() + TimeUnit.HOURS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + + case MINUTES: + long minutes = TimeUnit.MILLISECONDS.toMinutes(duration); + for (long i = 0; i <= minutes; i++) { + Date node = new Date(start.getTime() + TimeUnit.MINUTES.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + + case SECONDS: + long seconds = TimeUnit.MILLISECONDS.toSeconds(duration); + for (long i = 0; i <= seconds; i++) { + Date node = new Date(start.getTime() + TimeUnit.SECONDS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + + default: + throw new IllegalArgumentException("Unsupported time unit: " + timeUnit); + } + } catch (Exception e) { + e.printStackTrace(); + } + return timeNodes; + } + + /** + * 根据传入的字符串内容判断对应的时间格式化方式 + * @param inputDate + * @return + */ + private static SimpleDateFormat getDateFormat(String inputDate) { + // 正则表达式匹配日期格式 + String regex = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"; + Pattern pattern = Pattern.compile(regex); + if (pattern.matcher(inputDate).matches()) { + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + } else { + return new SimpleDateFormat("yyyy-MM-dd"); + } + } + +// public static void main(String[] args) { +// System.out.println(getGraduallys("2015-05-05 00:00:01","2016-05-05 00:05:02",TimeUnit.DAYS)); +// System.out.println(getThisMonthBetweenTime()); +// } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EmptyUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EmptyUtil.java new file mode 100644 index 0000000..31bc3f7 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EmptyUtil.java @@ -0,0 +1,124 @@ +package com.itheima.sfbx.framework.commons.utils; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * @Description 判断对象是否为空的工具类 + */ +public abstract class EmptyUtil { + + /*** + * @description 对string字符串是否为空判断 + * + * @param str 被判定字符串 + * @return + */ + public static boolean isNullOrEmpty(String str) { + if (str == null || "".equals(str.trim()) || "null".equalsIgnoreCase(str.trim()) || "undefined".equalsIgnoreCase(str.trim())) { + return true; + } else { + return false; + } + } + + /*** + * @description 对于StringBuffer类型的非空判断 + * + * @param str 被判定StringBuffer + * @return + */ + public static boolean isNullOrEmpty(StringBuffer str) { + return (str == null || str.length() == 0); + } + + /*** + * @description 对于string数组类型的非空判断 + * + * @param str 被判定字符串数组 + * @return + */ + public static boolean isNullOrEmpty(String[] str) { + if (str == null || str.length == 0) { + return true; + } else { + return false; + } + } + + /*** + * @description 对于Object类型的非空判断 + * + * @param obj 被判定对象 + * @return + */ + public static boolean isNullOrEmpty(Object obj) { + if (obj == null || "".equals(obj)) { + return true; + } else { + return false; + } + } + + /*** + * @description 对于Object数组类型的非空判断 + * + * @param obj 被判定对象数组 + * @return + */ + public static boolean isNullOrEmpty(Object[] obj) { + if (obj == null || obj.length == 0) { + return true; + } else { + return false; + } + } + + /*** + * @description 对于Collection类型的非空判断 + * + * @param collection 被判定Collection类型对象 + * @return + */ + public static boolean isNullOrEmpty(Collection collection) { + if (collection == null || collection.isEmpty()) { + return true; + } else { + return false; + } + } + + /** + * @方法名:对于Map类型的非空判断 + * @功能说明:对于Map类型的非空判断 + * @return boolean true-为空,false-不为空 + * @throws + */ + @SuppressWarnings("rawtypes") + public static boolean isNullOrEmpty( Map map) { + if (map == null || map.isEmpty()) { + return true; + } else { + return false; + } + } + + /** + * + * @方法名:removeNullUnit + * @功能说明: 删除集合中的空元素 + * @return + */ + public static List removeNullUnit(List xllxList) { + List need = new ArrayList(); + for (int i = 0; i < xllxList.size(); i++) { + if (!isNullOrEmpty(xllxList.get(i))) { + need.add(xllxList.get(i)); + } + } + return need; + } + +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EncodesUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EncodesUtil.java new file mode 100644 index 0000000..4504633 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/EncodesUtil.java @@ -0,0 +1,122 @@ + +package com.itheima.sfbx.framework.commons.utils; + +import org.apache.commons.codec.DecoderException; +import org.apache.commons.codec.binary.Base64; +import org.apache.commons.codec.binary.Hex; +import org.apache.commons.lang3.StringEscapeUtils; + +import java.io.UnsupportedEncodingException; +import java.net.URLDecoder; +import java.net.URLEncoder; + + +/** + * @Description 封装各种格式的编码解码工具类 + */ +public class EncodesUtil { + + private static final String DEFAULT_URL_ENCODING = "UTF-8"; + private static final char[] BASE62 = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".toCharArray(); + + /** + * Hex编码. + */ + public static String encodeHex(byte[] input) { + return Hex.encodeHexString(input); + } + + /** + * Hex解码. + */ + public static byte[] decodeHex(String input) { + try { + return Hex.decodeHex(input.toCharArray()); + } catch (DecoderException e) { + throw ExceptionsUtil.unchecked(e); + } + } + + /** + * Base64编码. + */ + public static String encodeBase64(byte[] input) { + return Base64.encodeBase64String(input); + } + + /** + * Base64编码, URL安全(将Base64中的URL非法字符'+'和'/'转为'-'和'_', 见RFC3548). + */ + public static String encodeUrlSafeBase64(byte[] input) { + return Base64.encodeBase64URLSafeString(input); + } + + /** + * Base64解码. + */ + public static byte[] decodeBase64(String input) { + return Base64.decodeBase64(input); + } + + /** + * Base62编码。 + */ + public static String encodeBase62(byte[] input) { + char[] chars = new char[input.length]; + for (int i = 0; i < input.length; i++) { + chars[i] = BASE62[((input[i] & 0xFF) % BASE62.length)]; + } + return new String(chars); + } + + /** + * Html 转码. + */ + public static String escapeHtml(String html) { + return StringEscapeUtils.escapeHtml4(html); + } + + /** + * Html 解码. + */ + public static String unescapeHtml(String htmlEscaped) { + return StringEscapeUtils.unescapeHtml4(htmlEscaped); + } + + /** + * Xml 转码. + */ + public static String escapeXml(String xml) { + return StringEscapeUtils.escapeXml(xml); + } + + /** + * Xml 解码. + */ + public static String unescapeXml(String xmlEscaped) { + return StringEscapeUtils.unescapeXml(xmlEscaped); + } + + /** + * URL 编码, Encode默认为UTF-8. + */ + public static String urlEncode(String part) { + try { + return URLEncoder.encode(part, DEFAULT_URL_ENCODING); + } catch (UnsupportedEncodingException e) { + throw ExceptionsUtil.unchecked(e); + } + } + + /** + * URL 解码, Encode默认为UTF-8. + */ + public static String urlDecode(String part) { + + try { + return URLDecoder.decode(part, DEFAULT_URL_ENCODING); + } catch (UnsupportedEncodingException e) { + throw ExceptionsUtil.unchecked(e); + } + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ExceptionsUtil.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ExceptionsUtil.java new file mode 100644 index 0000000..7ab7d8d --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ExceptionsUtil.java @@ -0,0 +1,82 @@ +package com.itheima.sfbx.framework.commons.utils; + +import java.io.PrintWriter; +import java.io.StringWriter; +import java.lang.reflect.InvocationTargetException; + +/** + * + * @Description 异常转换工具 + */ +public class ExceptionsUtil { + + /** + * + * 方法名::unchecked
+ * 功能说明::将CheckedException转换为UncheckedException.
+ */ + public static RuntimeException unchecked(Exception e) { + if (e instanceof RuntimeException) { + return (RuntimeException) e; + } else { + return new RuntimeException(e); + } + } + + /** + * + * 方法名::getStackTraceAsString
+ * 功能说明::将ErrorStack转化为String
+ */ + public static String getStackTraceAsString(Exception e) { + StringWriter stringWriter = new StringWriter(); + e.printStackTrace(new PrintWriter(stringWriter)); + return stringWriter.toString(); + } + + /** + * + * 方法名::getErrorMessageWithNestedException
+ * 功能说明::获取组合本异常信息与底层异常信息的异常描述, 适用于本异常为统一包装异常类,底层异常才是根本原因的情况
+ */ + public static String getErrorMessageWithNestedException(Exception e) { + Throwable nestedException = e.getCause(); + return new StringBuilder().append(e.getMessage()).append(" nested exception is ") + .append(nestedException.getClass().getName()).append(":").append(nestedException.getMessage()) + .toString(); + } + + /** + * + * 方法名::isCausedBy
+ * 功能说明::判断异常是否由某些底层的异常引起
+ */ + public static boolean isCausedBy(Exception ex, @SuppressWarnings("unchecked") Class... causeExceptionClasses) { + Throwable cause = ex; + while (cause != null) { + for (Class causeClass : causeExceptionClasses) { + if (causeClass.isInstance(cause)) { + return true; + } + } + cause = cause.getCause(); + } + return false; + } + + /** + * + * 方法名::convertReflectionExceptionToUnchecked
+ * 功能说明::将反射时的checked exception转换为unchecked exception.
+ */ + public static RuntimeException convertReflectionExceptionToUnchecked(Exception e) { + if (e instanceof IllegalAccessException || e instanceof IllegalArgumentException || e instanceof NoSuchMethodException) { + return new IllegalArgumentException("Reflection Exception.", e); + } else if (e instanceof InvocationTargetException) { + return new RuntimeException("Reflection Exception.", ((InvocationTargetException) e).getTargetException()); + } else if (e instanceof RuntimeException) { + return (RuntimeException) e; + } + return new RuntimeException("Unexpected Checked Exception.", e); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/NoProcessing.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/NoProcessing.java new file mode 100644 index 0000000..37f307c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/NoProcessing.java @@ -0,0 +1,90 @@ +package com.itheima.sfbx.framework.commons.utils; + +/** + * @ClassName NoProcessing.java + * @Description 编号创建类 + */ +public class NoProcessing { + + public static void main(String[] args) { +// String input = "100001009001001"; +// String processedString = createNo(input,true); +// System.out.println(processedString); + + String sonNo = "100001001001000"; + String parentNo = "100001001000000"; + + System.out.println(isParent(parentNo,sonNo)); + } + + /*** + * @description 处理补全编号,所有编号都是15位,共5层,每层关系如下: + * 第一层:100000000000000 + * 第二层:100001000000000 + * 第三层:100001001000000 + * 第四层:100001001001000 + * 第五层:100001001001001 + * 处理后100000000000000后结果为100 + * @param input + * @return: java.lang.String + */ + public static String processString(String input) { + int step = input.length() / 3; + for (int i =0;i void registerBean(String beanName, T bean) { + // 将bean对象注册到bean工厂 + configurableApplicationContext.getBeanFactory().registerSingleton(beanName, bean); + } + + /** + * 移除bean + * @param beanName bean的id + */ + public void unregisterBean(String beanName){ + ((DefaultListableBeanFactory) configurableApplicationContext.getBeanFactory()).removeBeanDefinition(beanName); + } + + /** + * 获得bean + * @param beanName bean的id + */ + public T getBean(String beanName, Class t) { + return configurableApplicationContext.getBean(beanName,t); + } + + /** + * bean是否存在 + * @param beanName bean的id + */ + public boolean containsBean(String beanName) { + return configurableApplicationContext.containsBean(beanName); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ResponseResultBuild.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ResponseResultBuild.java new file mode 100644 index 0000000..c4fe06a --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/ResponseResultBuild.java @@ -0,0 +1,94 @@ +package com.itheima.sfbx.framework.commons.utils; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +import java.time.LocalDateTime; +import java.util.List; + +/** + * @Description 构造ResponseResult工具 + */ +public class ResponseResultBuild { + + public static ResponseResult build(IBaseEnum basicEnumIntface, T t) { + //从当前线程获得用户对象 + UserVO userVO = SubjectContent.getUserVO(); + if (!EmptyUtil.isNullOrEmpty(userVO)) { + //构建对象 + return ResponseResult.builder() + .code(basicEnumIntface.getCode()) + .msg(basicEnumIntface.getMsg()) + .data(t) + .operatorId(userVO.getId()) + .operatorName(userVO.getUsername()) + .operationTime(LocalDateTime.now()) + .operatorSex(userVO.getSex()) + ._class(getClassName(t)) + .tip("本站点所有接口仅用于教学演示,所有数据均非真实数据,请勿用作其它用途!") + .build(); + } + //构建对象 + return ResponseResult.builder() + .code(basicEnumIntface.getCode()) + .msg(basicEnumIntface.getMsg()) + .data(t) + .operationTime(LocalDateTime.now()) + .build(); + } + + /** + * 公共成功响应方法 + * + * @param t + * @param + * @return + */ + public static ResponseResult successBuild(T t) { + return ResponseResultBuild.build(BaseEnum.SUCCEED, t); + } + + /** + * 公共失败响应方法 + * + * @param t + * @param + * @return + */ + public static ResponseResult failedBuild(T t) { + return ResponseResultBuild.build(BaseEnum.SYSYTEM_FAIL, t); + } + + /** + * 公共失败响应方法 + * + * @param t + * @param + * @return + */ + public static ResponseResult validateErrorBuild(T t) { + return ResponseResultBuild.build(BaseEnum.VALID_EXCEPTION, t); + } + + + private static String getClassName(Object obj) { + if (obj == null) { + return "null"; + } else { + Class clazz = obj.getClass(); + if (obj instanceof List) { + List list = (List) obj; + if (list.isEmpty()) { + return "List"; + } else { + Object firstElement = list.get(0); + return "List<" + firstElement.getClass().getName() + ">"; + } + } else { + return clazz.getName(); + } + } + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SnowflakeIdWorker.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SnowflakeIdWorker.java new file mode 100644 index 0000000..a2f6266 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SnowflakeIdWorker.java @@ -0,0 +1,126 @@ +package com.itheima.sfbx.framework.commons.utils; + +/** + * @Description: + */ +public class SnowflakeIdWorker { + // ==============================Fields=========================================== + /** 开始时间截 (2020-08-28) */ + private final long twepoch = 1598598185157L; + + /** 机器id所占的位数 */ + private final long workerIdBits = 5L; + + /** 数据标识id所占的位数 */ + private final long datacenterIdBits = 5L; + + /** 支持的最大机器id,结果是31 (这个移位算法可以很快的计算出几位二进制数所能表示的最大十进制数) */ + private final long maxWorkerId = -1L ^ (-1L << workerIdBits); + + /** 支持的最大数据标识id,结果是31 */ + private final long maxDatacenterId = -1L ^ (-1L << datacenterIdBits); + + /** 序列在id中占的位数 */ + private final long sequenceBits = 12L; + + /** 机器ID向左移12位 */ + private final long workerIdShift = sequenceBits; + + /** 数据标识id向左移17位(12+5) */ + private final long datacenterIdShift = sequenceBits + workerIdBits; + + /** 时间截向左移22位(5+5+12) */ + private final long timestampLeftShift = sequenceBits + workerIdBits + datacenterIdBits; + + /** 生成序列的掩码,这里为4095 (0b111111111111=0xfff=4095) */ + private final long sequenceMask = -1L ^ (-1L << sequenceBits); + + /** 工作机器ID(0~31) */ + private long workerId; + + /** 数据中心ID(0~31) */ + private long datacenterId; + + /** 毫秒内序列(0~4095) */ + private long sequence = 0L; + + /** 上次生成ID的时间截 */ + private long lastTimestamp = -1L; + + //==============================Constructors===================================== + /** + * 构造函数 + * @param workerId 工作ID (0~31) + * @param datacenterId 数据中心ID (0~31) + */ + public SnowflakeIdWorker(long workerId, long datacenterId) { + if (workerId > maxWorkerId || workerId < 0) { + throw new IllegalArgumentException(String.format("worker Id can't be greater than %d or less than 0", maxWorkerId)); + } + if (datacenterId > maxDatacenterId || datacenterId < 0) { + throw new IllegalArgumentException(String.format("datacenter Id can't be greater than %d or less than 0", maxDatacenterId)); + } + this.workerId = workerId; + this.datacenterId = datacenterId; + } + + // ==============================Methods========================================== + /** + * 获得下一个ID (该方法是线程安全的) + * @return SnowflakeId + */ + public synchronized long nextId() { + long timestamp = timeGen(); + + //如果当前时间小于上一次ID生成的时间戳,说明系统时钟回退过这个时候应当抛出异常 + if (timestamp < lastTimestamp) { + throw new RuntimeException( + String.format("Clock moved backwards. Refusing to generate id for %d milliseconds", lastTimestamp - timestamp)); + } + + //分表节点数 + sequence = (int)(Math.random()*3); + + //上次生成ID的时间截 + lastTimestamp = timestamp; + + //移位并通过或运算拼到一起组成64位的ID + long id = ((timestamp - twepoch) << timestampLeftShift) // + | (datacenterId << datacenterIdShift) // + | (workerId << workerIdShift) // + | sequence; + return id; + } + + /** + * 阻塞到下一个毫秒,直到获得新的时间戳 + * @param lastTimestamp 上次生成ID的时间截 + * @return 当前时间戳 + */ + protected long tilNextMillis(long lastTimestamp) { + long timestamp = timeGen(); + while (timestamp <= lastTimestamp) { + timestamp = timeGen(); + } + return timestamp; + } + + /** + * 返回以毫秒为单位的当前时间 + * @return 当前时间(毫秒) + */ + protected long timeGen() { + return System.currentTimeMillis(); + } + + //==============================Test============================================= + /** 测试 */ + public static void main(String[] args) throws InterruptedException { + SnowflakeIdWorker idWorker = new SnowflakeIdWorker(1, 1); + for (int i = 0; i < 1000; i++) { + long id = idWorker.nextId(); + Thread.sleep(1); + System.out.println(id); + } + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SubjectContent.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SubjectContent.java new file mode 100644 index 0000000..3bea845 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/SubjectContent.java @@ -0,0 +1,119 @@ +package com.itheima.sfbx.framework.commons.utils; + +import com.itheima.sfbx.framework.commons.dto.security.DataSecurityVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import lombok.extern.slf4j.Slf4j; + +/** + * @ClassName subjectContent.java + * @Description 用户主体对象 + */ +@Slf4j +public class SubjectContent { + + + /*** + * @description 创建线程局部userVO变量 + */ + public static ThreadLocal userVOThreadLocal = new ThreadLocal() { + @Override + protected UserVO initialValue() { + return null; + } + }; + + /*** + * @description 创建线程局部dataSecurityVO变量 + */ + public static ThreadLocal dataSecurityVOThreadLocal = new ThreadLocal() { + @Override + protected DataSecurityVO initialValue() { + return null; + } + }; + + /*** + * @description 创建线程局部companyNo变量 + */ + public static ThreadLocal companyNoThreadLocal = new ThreadLocal() { + @Override + protected String initialValue() { + return null; + } + }; + + /*** + * @description 创建线程局部userToken变量 + */ + public static ThreadLocal userTokenThreadLocal = new ThreadLocal() { + @Override + protected String initialValue() { + return null; + } + }; + + + + // 提供线程局部companyNo变量set方法 + public static void setCompanyNo(String companyNo) { + + companyNoThreadLocal.set(companyNo); + } + + // 提供线程局部dataSecurityVO变量set方法 + public static void setDataSecurityVO(DataSecurityVO dataSecurityVO) { + + dataSecurityVOThreadLocal.set(dataSecurityVO); + } + + // 提供线程局部userVO变量set方法 + public static void setUserVO(UserVO userVO) { + + userVOThreadLocal.set(userVO); + } + // 提供线程局部userToken变量set方法 + public static void setUserToken(String userToken) { + + userTokenThreadLocal.set(userToken); + } + // 提供线程局部companyNo变量get方法 + public static String getCompanyNo() { + + return companyNoThreadLocal.get(); + } + // 提供线程局部dataSecurityVO变量get方法 + public static DataSecurityVO getDataSecurityVO() { + + return dataSecurityVOThreadLocal.get(); + } + // 提供线程局部userVO变量get方法 + public static UserVO getUserVO() { + + return userVOThreadLocal.get(); + } + // 提供线程局部userToken变量get方法 + public static String getUserToken() { + + return userTokenThreadLocal.get(); + } + //清空当前线程companyNo,防止内存溢出 + public static void removeCompanyNo() { + + companyNoThreadLocal.remove(); + } + //清空当前线程dataSecurityVO,防止内存溢出 + public static void removeDataSecurityVO() { + + dataSecurityVOThreadLocal.remove(); + } + //清空当前线程userVO,防止内存溢出 + public static void removeUserVO() { + + userVOThreadLocal.remove(); + } + //清空当前线程userToken,防止内存溢出 + public static void removeUserToken() { + + userTokenThreadLocal.remove(); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/TimeHandlerUtils.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/TimeHandlerUtils.java new file mode 100644 index 0000000..7fdd96f --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/utils/TimeHandlerUtils.java @@ -0,0 +1,258 @@ +package com.itheima.sfbx.framework.commons.utils; + +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import lombok.extern.slf4j.Slf4j; + +import java.text.SimpleDateFormat; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.concurrent.TimeUnit; +import java.util.regex.Pattern; + +/** + * YestordayUtils + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Slf4j +public class TimeHandlerUtils { + + /** + * 获取昨日时间段 + * + * @return + */ + public static TimeDTO getYesterdayTime() { + try { + TimeDTO timeDTO = new TimeDTO(); + LocalDateTime now = LocalDateTime.now().plusDays(-1L); + LocalDateTime maxTime = LocalDateTime.of(now.toLocalDate(), LocalTime.MAX); + LocalDateTime minTime = LocalDateTime.of(now.toLocalDate(), LocalTime.MIN); + //设置开始时间 + timeDTO.setBeginTime(minTime); + //设置结束时间 + timeDTO.setEndTime(maxTime); + //封装开始时间字符串 + timeDTO.setBegin(timeDTO.getTimeFormatter().format(minTime)); + //封装结束时间字符串 + timeDTO.setEnd(timeDTO.getTimeFormatter().format(maxTime)); + timeDTO.setTargetDate(LocalDate.now()); + return timeDTO; + } catch (Exception e) { + log.error("日期计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new RuntimeException("昨日日期数据获取失败"); + } + } + + /** + * 获取昨日起始到结束时间段 + * + * @return + */ + public static TimeDTO getYesterdayTime(String reportTime) { + try { + reportTime = reportTime+"T00:00:00"; + TimeDTO timeDTO = new TimeDTO(); + LocalDateTime targetDateTime = LocalDateTime.parse(reportTime).plusDays(-1L); + LocalDateTime maxTime = LocalDateTime.of(targetDateTime.toLocalDate(), LocalTime.MAX); + LocalDateTime minTime = LocalDateTime.of(targetDateTime.toLocalDate(), LocalTime.MIN); + //设置开始时间 + timeDTO.setBeginTime(minTime); + //设置结束时间 + timeDTO.setEndTime(maxTime); + //封装开始时间字符串 + timeDTO.setBegin(timeDTO.getTimeFormatter().format(minTime)); + //封装结束时间字符串 + timeDTO.setEnd(timeDTO.getTimeFormatter().format(maxTime)); + timeDTO.setTargetDate(targetDateTime.toLocalDate()); + return timeDTO; + } catch (Exception e) { + log.error("日期计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new RuntimeException("昨日日期数据获取失败"); + } + } + + /** + * 获取今天起始到结束时间段 + * + * @return + */ + public static TimeDTO getTodayTime(String reportTime) { + try { + reportTime = reportTime+"T00:00:00"; + TimeDTO timeDTO = new TimeDTO(); + LocalDateTime targetDateTime = LocalDateTime.parse(reportTime); + LocalDateTime maxTime = LocalDateTime.of(targetDateTime.toLocalDate(), LocalTime.MAX); + LocalDateTime minTime = LocalDateTime.of(targetDateTime.toLocalDate(), LocalTime.MIN); + //设置开始时间 + timeDTO.setBeginTime(minTime); + //设置结束时间 + timeDTO.setEndTime(maxTime); + //封装开始时间字符串 + timeDTO.setBegin(timeDTO.getTimeFormatter().format(minTime)); + //封装结束时间字符串 + timeDTO.setEnd(timeDTO.getTimeFormatter().format(maxTime)); + timeDTO.setTargetDate(targetDateTime.toLocalDate()); + return timeDTO; + } catch (Exception e) { + log.error("日期计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new RuntimeException("昨日日期数据获取失败"); + } + } + + + /** + * 获取昨日起始到结束24个时间段 + * + * @return + */ + public static List getYesterday24Time(String reportTime) { + try { + reportTime = reportTime+"T00:00:00"; + List timeDTOs = Lists.newArrayList(); + for (int i = 0; i <= 23; i++) { + TimeDTO timeDTO = new TimeDTO(); + LocalDateTime targetDateTime = LocalDateTime.parse(reportTime).plusDays(-1).plusHours(i); + LocalDateTime minTime = targetDateTime.withMinute(0).withSecond(0).withNano(0); + LocalDateTime maxTime = minTime.plusHours(1).minusNanos(1); + //设置开始时间 + timeDTO.setBeginTime(minTime); + //设置结束时间 + timeDTO.setEndTime(maxTime); + //封装开始时间字符串 + timeDTO.setBegin(timeDTO.getTimeFormatter().format(minTime)); + //封装结束时间字符串 + timeDTO.setEnd(timeDTO.getTimeFormatter().format(maxTime)); + timeDTO.setTargetDateTime(targetDateTime); + timeDTOs.add(timeDTO); + } + + return timeDTOs; + } catch (Exception e) { + log.error("日期计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new RuntimeException("昨日日期数据获取失败"); + } + } + + /** + * 获取今天起始到结束24个时间段 + * + * @return + */ + public static List getToday24Time(String reportTime) { + try { + reportTime = reportTime+"T00:00:00"; + List timeDTOs = Lists.newArrayList(); + for (int i = 0; i <= 23; i++) { + TimeDTO timeDTO = new TimeDTO(); + LocalDateTime targetDateTime = LocalDateTime.parse(reportTime).plusHours(i); + LocalDateTime minTime = targetDateTime.withMinute(0).withSecond(0).withNano(0); + LocalDateTime maxTime = minTime.plusHours(1).minusNanos(1); + //设置开始时间 + timeDTO.setBeginTime(minTime); + //设置结束时间 + timeDTO.setEndTime(maxTime); + //封装开始时间字符串 + timeDTO.setBegin(timeDTO.getTimeFormatter().format(minTime)); + //封装结束时间字符串 + timeDTO.setEnd(timeDTO.getTimeFormatter().format(maxTime)); + timeDTO.setTargetDateTime(targetDateTime); + timeDTOs.add(timeDTO); + } + + return timeDTOs; + } catch (Exception e) { + log.error("日期计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new RuntimeException("昨日日期数据获取失败"); + } + } + + /** + * 根据时间单位获取其中的每一个时间节点 + * @param beginTime 起始时间 + * @param endTime 结束时间 + * @param timeUnit 时间单位 + * @return List 包含时间节点的列表 + */ + public static List getGraduallys(String beginTime, String endTime, TimeUnit timeUnit) { + List timeNodes = new ArrayList<>(); + SimpleDateFormat dateFormat = getDateFormat(beginTime); + try { + Date start = dateFormat.parse(beginTime); + Date end = dateFormat.parse(endTime); + long duration = end.getTime() - start.getTime(); + switch (timeUnit) { + case DAYS: + long days = TimeUnit.MILLISECONDS.toDays(duration); + for (long i = 0; i <= days; i++) { + Date node = new Date(start.getTime() + TimeUnit.DAYS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + case HOURS: + long hours = TimeUnit.MILLISECONDS.toHours(duration); + for (long i = 0; i <= hours; i++) { + Date node = new Date(start.getTime() + TimeUnit.HOURS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + case MINUTES: + long minutes = TimeUnit.MILLISECONDS.toMinutes(duration); + for (long i = 0; i <= minutes; i++) { + Date node = new Date(start.getTime() + TimeUnit.MINUTES.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + case SECONDS: + long seconds = TimeUnit.MILLISECONDS.toSeconds(duration); + for (long i = 0; i <= seconds; i++) { + Date node = new Date(start.getTime() + TimeUnit.SECONDS.toMillis(i)); + timeNodes.add(dateFormat.format(node)); + } + break; + default: + throw new IllegalArgumentException("Unsupported time unit: " + timeUnit); + } + } catch (Exception e) { + log.info("时间处理失败!"); + } + return timeNodes; + } + + /** + * 根据传入的字符串内容判断对应的时间格式化方式 + * @param inputDate + * @return + */ + private static SimpleDateFormat getDateFormat(String inputDate) { + // 正则表达式匹配日期格式 + String regex = "\\d{4}-\\d{2}-\\d{2} \\d{2}:\\d{2}:\\d{2}"; + Pattern pattern = Pattern.compile(regex); + if (pattern.matcher(inputDate).matches()) { + return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + } else { + return new SimpleDateFormat("yyyy-MM-dd"); + } + } + + /** + * 当前时间是否为早上00:00到06:00 + * @return + */ + public static boolean isTimeInRange() { + // 获取当前时间 + LocalTime currentTime = LocalTime.now(); + // 设置起始时间和结束时间 + LocalTime startTime = LocalTime.of(0, 0); // 00:00 + LocalTime endTime = LocalTime.of(6, 0); // 06:00 + return !currentTime.isBefore(startTime) && currentTime.isBefore(endTime); + } +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Create.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Create.java new file mode 100644 index 0000000..b24d252 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Create.java @@ -0,0 +1,8 @@ +package com.itheima.sfbx.framework.commons.validation; + +/** + * @ClassName create.java + * @Description validation的Create类型组 + */ +public interface Create { +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Delete.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Delete.java new file mode 100644 index 0000000..9cf5539 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Delete.java @@ -0,0 +1,8 @@ +package com.itheima.sfbx.framework.commons.validation; + +/** + * @ClassName Delete.java + * @Description validation的Update类型组 + */ +public interface Delete { +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Selete.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Selete.java new file mode 100644 index 0000000..4325379 --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Selete.java @@ -0,0 +1,8 @@ +package com.itheima.sfbx.framework.commons.validation; + +/** + * @ClassName Selete.java + * @Description validation的Selete类型组 + */ +public interface Selete { +} diff --git a/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Update.java b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Update.java new file mode 100644 index 0000000..50fcc8c --- /dev/null +++ b/day02/sfbx-framework/framework-commons/src/main/java/com/itheima/sfbx/framework/commons/validation/Update.java @@ -0,0 +1,8 @@ +package com.itheima.sfbx.framework.commons.validation; + +/** + * @ClassName Update.java + * @Description validation的Update类型组 + */ +public interface Update { +} diff --git a/day02/sfbx-framework/framework-feign/pom.xml b/day02/sfbx-framework/framework-feign/pom.xml new file mode 100644 index 0000000..aee9207 --- /dev/null +++ b/day02/sfbx-framework/framework-feign/pom.xml @@ -0,0 +1,27 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-feign + framework-feign + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + com.itheima.sfbx + framework-commons + + + diff --git a/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/config/FeignConfig.java b/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/config/FeignConfig.java new file mode 100644 index 0000000..264569f --- /dev/null +++ b/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/config/FeignConfig.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.framework.feign.config; + +import com.itheima.sfbx.framework.feign.interceptor.FeignAuthInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName FeignConfig.java + * @Description feign的拦截器配置 + */ +@Configuration +public class FeignConfig { + + /** + * @Description feign自定义拦截器 + * @return + */ + @Bean + public FeignAuthInterceptor feignAuthRequestInterceptor(){ + + return new FeignAuthInterceptor(); + } + +} diff --git a/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/interceptor/FeignAuthInterceptor.java b/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/interceptor/FeignAuthInterceptor.java new file mode 100644 index 0000000..8312256 --- /dev/null +++ b/day02/sfbx-framework/framework-feign/src/main/java/com/itheima/sfbx/framework/feign/interceptor/FeignAuthInterceptor.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.framework.feign.interceptor; + +import com.itheima.sfbx.framework.commons.constant.security.SecurityConstant; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import feign.RequestInterceptor; +import feign.RequestTemplate; + +/** + * @ClassName FeignAuthRequestInterceptor.java + * @Description feign请求授权拦截器 + */ +public class FeignAuthInterceptor implements RequestInterceptor { + + @Override + public void apply(RequestTemplate template) { + + if (!EmptyUtil.isNullOrEmpty(SubjectContent.getUserToken())){ + template.header(SecurityConstant.USER_TOKEN, SubjectContent.getUserToken()); + } + + } +} diff --git a/day02/sfbx-framework/framework-freemaker/pom.xml b/day02/sfbx-framework/framework-freemaker/pom.xml new file mode 100644 index 0000000..7ffe2a2 --- /dev/null +++ b/day02/sfbx-framework/framework-freemaker/pom.xml @@ -0,0 +1,23 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-freemaker + framework-freemaker + + http://www.example.com + + + + org.springframework.boot + spring-boot-starter-freemarker + + + diff --git a/day02/sfbx-framework/framework-freemaker/src/main/java/com/itheima/sfbx/framework/freemaker/FreemakerTemplate.java b/day02/sfbx-framework/framework-freemaker/src/main/java/com/itheima/sfbx/framework/freemaker/FreemakerTemplate.java new file mode 100644 index 0000000..b0b76db --- /dev/null +++ b/day02/sfbx-framework/framework-freemaker/src/main/java/com/itheima/sfbx/framework/freemaker/FreemakerTemplate.java @@ -0,0 +1,101 @@ +package com.itheima.sfbx.framework.freemaker; + +import freemarker.template.Configuration; +import freemarker.template.Template; +import freemarker.template.TemplateException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +import java.io.*; +import java.util.Map; + +/** + * 用于操作freemaker的模板对象 + */ +@Component +public class FreemakerTemplate { + + @Autowired + private Configuration configuration; + + @Value("${spring.freemarker.template-name:defaultTemplate}") + private String templateName; + + /** + * 基于freemarker替换模板内容 + * @param templateName 模板名称 + * @param dateModel 数据模型 + * @param writer 替换后内容输出流 + * @throws IOException 未发现模板异常 + * @throws TemplateException 模板解析替换异常 + */ + public void replaceAndWriter(String templateName, Map dateModel, Writer writer) throws IOException, TemplateException { + // 获取模板信息 + Template template = configuration.getTemplate(templateName); + // 替换数据 + template.process(dateModel,writer); + } + + /** + * 基于freemarker替换模板内容 + * templateName (spring.freemarker.template-name) 配置模板名称 + * @param dateModel 数据模型 + * @param writer 替换后内容输出流 + * @throws IOException 未发现模板异常 + * @throws TemplateException 模板解析替换异常 + */ + public void replaceAndWriter(Map dateModel, Writer writer) throws IOException, TemplateException { + replaceAndWriter(templateName,dateModel,writer); + } + + /** + * @param templateName + * @param dateModel + * @return String 模板替换后的内容 + * @throws IOException + * @throws TemplateException + */ + public String replaceAndGetStr(String templateName, Map dateModel) throws IOException, TemplateException { + // 定义用于存储替换后的输出数据 + StringWriter writer = new StringWriter(); + replaceAndWriter(templateName,dateModel,writer); + return writer.toString(); + } + /** + * @param dateModel + * @return String 模板替换后的内容 + * @throws IOException + * @throws TemplateException + */ + public String replaceAndGetStr(Map dateModel) throws IOException, TemplateException { + return replaceAndGetStr(templateName,dateModel); + } + /** + * @param dateModel + * @return InputStream 模板替换后的内容对应的输入流 可以直接上传其它存储结构 + * @throws IOException + * @throws TemplateException + */ + public InputStream replaceAndGetInput(String templateName, Map dateModel) throws IOException, TemplateException { + String content = replaceAndGetStr(templateName, dateModel); + return new ByteArrayInputStream(content.getBytes()); + } + /** + * @param dateModel + * @return InputStream 模板替换后的内容对应的输入流 可以直接上传其它存储结构 + * @throws IOException + * @throws TemplateException + */ + public InputStream replaceAndGetInput( Map dateModel) throws IOException, TemplateException { + return replaceAndGetInput(templateName,dateModel); + } + + public byte[] replaceAndGetBytes(String templateName, Map dateModel) throws IOException, TemplateException { + String content = replaceAndGetStr(templateName, dateModel); + return content.getBytes(); + } + public byte[] replaceAndGetBytes( Map dateModel) throws IOException, TemplateException { + return replaceAndGetBytes(templateName,dateModel); + } +} diff --git a/day02/sfbx-framework/framework-gateway/pom.xml b/day02/sfbx-framework/framework-gateway/pom.xml new file mode 100644 index 0000000..66c00d1 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/pom.xml @@ -0,0 +1,59 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-gateway + framework-gateway + + + + com.itheima.sfbx + framework-rabbitmq + + + org.springframework.security + spring-security-oauth2-resource-server + + + org.springframework.security + spring-security-oauth2-jose + + + org.springframework.security + spring-security-config + + + com.itheima.sfbx + framework-redis + + + org.springframework.boot + spring-boot-starter-web + + + + + org.springframework.cloud + spring-cloud-starter-gateway + + + org.springframework.cloud + spring-cloud-loadbalancer + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/authorization/JwtReactiveAuthorizationManager.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/authorization/JwtReactiveAuthorizationManager.java new file mode 100644 index 0000000..39449a3 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/authorization/JwtReactiveAuthorizationManager.java @@ -0,0 +1,102 @@ +package com.itheima.sfbx.framework.gateway.authorization; + +import com.itheima.sfbx.framework.commons.constant.security.OauthCacheConstant; +import com.itheima.sfbx.framework.commons.constant.security.OauthConstant; +import com.itheima.sfbx.framework.commons.constant.security.SecurityConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import lombok.extern.slf4j.Slf4j; +import org.redisson.api.RBucket; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.security.authorization.AuthorizationDecision; +import org.springframework.security.authorization.ReactiveAuthorizationManager; +import org.springframework.security.core.Authentication; +import org.springframework.security.oauth2.jwt.Jwt; +import org.springframework.security.oauth2.jwt.ReactiveJwtDecoder; +import org.springframework.security.web.server.authorization.AuthorizationContext; +import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * @ClassName AuthorizationManager.java + * @Description 鉴权管理器 + */ +@Slf4j +@Component +public class JwtReactiveAuthorizationManager implements ReactiveAuthorizationManager { + + private AntPathMatcher antPathMatcher = new AntPathMatcher(); + + @Autowired + RedissonClient redissonClient; + + @Autowired + ReactiveJwtDecoder reactiveJwtDecoder; + + @Override + public Mono check(Mono authentication, + AuthorizationContext authorizationContext) { + //目标路径:获得url路径 + ServerHttpRequest request = authorizationContext.getExchange().getRequest(); + String path = request.getURI().getPath(); + path = path.substring(path.indexOf("/",1)); + String methodValue = request.getMethodValue(); + String tagetResource = methodValue+path; + log.info("===============进入鉴权tagetResource路径:{}==========",tagetResource); + //校验userToken:如果当前的tooken获得为空,则认为鉴权失败 + String userToken = request.getHeaders().getFirst(SecurityConstant.USER_TOKEN); + if (EmptyUtil.isNullOrEmpty(userToken)){ + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + //兑换userVO:使用当前usertoken获得缓存中userVO信息 + RBucket userVOBucket = redissonClient.getBucket(OauthCacheConstant.USER_TOKEN + userToken); + UserVO userVO = userVOBucket.get(); + if (EmptyUtil.isNullOrEmpty(userVO)){ + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + //剔除处理:如果页面传入usetToken不等于缓存中的usetToken,则表示当前usetToken被剔除 + RBucket userTokenBindRBucket = redissonClient.getBucket(OauthCacheConstant.USER_TOKEN_BIND + userVO.getUsername()); + String userTokenBind = userTokenBindRBucket.get(); + if (!userToken.equals(userTokenBind)){ + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + //兑换accessToken:使用userToken兑换去缓存中兑换accessToken + RBucket accessTokenBucket = redissonClient.getBucket(OauthCacheConstant.ACCESS_TOKEN + userTokenBind); + String accessToken = accessTokenBucket.get(); + //校验accessToken:令牌过期获得为空,校验失败 + if (EmptyUtil.isNullOrEmpty(accessToken)){ + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + //解析accessToken:调用rsa接口进行验证签名 + Mono decode = reactiveJwtDecoder.decode(accessToken); + Jwt jwt = null; + try { + jwt = decode.toFuture().get(); + } catch (Exception e) { + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + if (EmptyUtil.isNullOrEmpty(jwt)){ + return Mono.justOrEmpty(new AuthorizationDecision(false)); + } + //权限校验:当前用户不为非只认证类型,我们会从jwt中获得载荷,然后判断载荷中的权限是否包含访问路径权限 + if (!userVO.getOnlyAuthenticate()){ + List authorities = (List)jwt.getClaims().get(OauthConstant.AUTHORITIES_KEY); + for (String authority : authorities) { + boolean isMatch = antPathMatcher.match(authority, tagetResource); + if (isMatch){ + log.info("用户:{}拥有tagetResource权限:{}==========",userVO.getUsername(),tagetResource); + return Mono.just(new AuthorizationDecision(true)); + } + } + log.info("用户:{}不拥有tagetResource权限:{}==========",userVO.getUsername(),tagetResource); + return Mono.just(new AuthorizationDecision(false)); + } + return Mono.just(new AuthorizationDecision(true)); + } + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/binding/SourceBinding.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/binding/SourceBinding.java new file mode 100644 index 0000000..79e8f72 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/binding/SourceBinding.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.framework.gateway.binding; + +import com.itheima.sfbx.framework.rabbitmq.source.LogSource; +import org.springframework.cloud.stream.annotation.EnableBinding; + +/** + * @ClassName Binding.java + * @Description 绑定声明 + */ +@EnableBinding({LogSource.class}) +public class SourceBinding { +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/ResourceServerConfig.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/ResourceServerConfig.java new file mode 100644 index 0000000..c171502 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/ResourceServerConfig.java @@ -0,0 +1,107 @@ +package com.itheima.sfbx.framework.gateway.config; + +import com.itheima.sfbx.framework.commons.enums.security.AuthEnum; +import com.itheima.sfbx.framework.commons.properties.SecurityConfigProperties; +import com.itheima.sfbx.framework.gateway.util.WebUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.security.authorization.ReactiveAuthorizationManager; +import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity; +import org.springframework.security.config.web.server.ServerHttpSecurity; +import org.springframework.security.web.server.SecurityWebFilterChain; +import org.springframework.security.web.server.ServerAuthenticationEntryPoint; +import org.springframework.security.web.server.authorization.ServerAccessDeniedHandler; +import org.springframework.web.cors.CorsConfiguration; +import org.springframework.web.cors.reactive.CorsConfigurationSource; +import reactor.core.publisher.Mono; + +/** + * @ClassName ResourceServerConfig.java + * @Description 资源服务器配置 + */ +@Configuration +@EnableWebFluxSecurity +@EnableConfigurationProperties(SecurityConfigProperties.class) +public class ResourceServerConfig { + + @Autowired + private ReactiveAuthorizationManager jwtReactiveAuthorizationManager; + + @Autowired + private SecurityConfigProperties securityConfigProperties; + + /*** + * @description 跨域处理 + */ + @Bean + public CorsConfigurationSource corsConfigurationSource(){ + return httpServletRequest -> { + //初始化跨域配置 + CorsConfiguration cfg = new CorsConfiguration(); + //请求头中可以包含任意的参数 + cfg.addAllowedHeader("*"); + //请求方式可以是任意方式:post get patch pu delete opertions + cfg.addAllowedMethod("*"); + //指定请求源的目标地址 + securityConfigProperties.getOrigins().forEach(origin->{ + cfg.addAllowedOrigin(origin); + }); + cfg.setAllowCredentials(true); + return cfg; + }; + } + + /*** + * @description 鉴权过滤器链 + * @param http 服务器鉴权请求 + * @return 过滤器链 + */ + @Bean + public SecurityWebFilterChain securityWebFilterChain(ServerHttpSecurity http) { + //jwt鉴权转换器 + http.oauth2ResourceServer().jwt(); + http.authorizeExchange() + //匿名资源放行 + .pathMatchers(securityConfigProperties.getIgnoreUrl() + .toArray(new String[securityConfigProperties.getIgnoreUrl().size()])).permitAll() + // 访问权限控制 + .anyExchange().access(jwtReactiveAuthorizationManager) + .and() + .exceptionHandling() + //处理未授权 + .accessDeniedHandler(accessDeniedHandler()) + //处理未认证 + .authenticationEntryPoint(authenticationEntryPoint()) + .and().csrf().disable(); + return http.build(); + } + + /*** + * @description 未授权处理 + * @return 过滤器链 + */ + @Bean + ServerAccessDeniedHandler accessDeniedHandler() { + return (exchange, denied) -> { + Mono mono = Mono.defer(() -> Mono.just(exchange.getResponse())) + .flatMap(response -> WebUtils.writeFailedToResponse(response, AuthEnum.AUTH_FAIL)); + return mono; + }; + } + + /** + * token无效或者已过期自定义响应 + */ + @Bean + ServerAuthenticationEntryPoint authenticationEntryPoint() { + return (exchange, e) -> { + Mono mono = Mono.defer(() -> Mono.just(exchange.getResponse())) + .flatMap(response -> WebUtils.writeFailedToResponse(response,AuthEnum.NEED_LOGIN)); + return mono; + }; + } + + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/SnowflakeIdWorkerConfig.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/SnowflakeIdWorkerConfig.java new file mode 100644 index 0000000..284dd24 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/config/SnowflakeIdWorkerConfig.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.gateway.config; + +import com.itheima.sfbx.framework.commons.utils.SnowflakeIdWorker; +import com.itheima.sfbx.framework.gateway.properties.SnowflakeIdWorkerProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName SnowflakeIdWorkerConfig.java + * @Description 唯一键 + */ +@Configuration +@EnableConfigurationProperties(SnowflakeIdWorkerProperties.class) +public class SnowflakeIdWorkerConfig { + + @Autowired + SnowflakeIdWorkerProperties snowflakeIdWorkerProperties; + + @Bean + public SnowflakeIdWorker snowflakeIdWorker(){ + return new SnowflakeIdWorker( + snowflakeIdWorkerProperties.getWorkerId(), + snowflakeIdWorkerProperties.getDatacenterId()); + } +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpRequestDecorator.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpRequestDecorator.java new file mode 100644 index 0000000..19e54c9 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpRequestDecorator.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.framework.gateway.decorator; + +import com.itheima.sfbx.framework.gateway.util.RequestHelper; +import io.netty.buffer.UnpooledByteBufAllocator; +import lombok.extern.slf4j.Slf4j; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.io.buffer.NettyDataBufferFactory; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.http.server.reactive.ServerHttpRequestDecorator; +import reactor.core.publisher.Flux; +import reactor.core.scheduler.Schedulers; + +/** + * @ClassName RecorderServerHttpRequestDecorator.java + * @Description 对ServerHttpRequest进行二次封装,解决requestBody只能读取一次的问题 + */ +@Slf4j +public class CacheServerHttpRequestDecorator extends ServerHttpRequestDecorator { + + byte[] bytes; + + public CacheServerHttpRequestDecorator(ServerHttpRequest delegate) { + super(delegate); + } + + /*** + * @description 改下body的获得方式,传递给下游业务系统使用 + * @return + * @return: reactor.core.publisher.Flux + */ + @Override + public Flux getBody() { + return super.getBody() //获得父类获得请求体信息 + .publishOn(Schedulers.single()) //切换单线程防止阻塞 + .map(this::cache) //重写body可多次读取 + .doOnComplete(() -> addHeaders(getDelegate(),bytes));//读取请求体放入当前请求头便于后续处理 + } + + + private DataBuffer cache(DataBuffer dataBuffer) { + //先构建一个与dataBuffer长度相同的byty数组 + bytes = new byte[dataBuffer.readableByteCount()]; + //从dataBuffer中读出数据存入当前bytes中 + dataBuffer.read(bytes); + //释放掉内存 + DataBufferUtils.release(dataBuffer); + //放回到当前的NettyDataBufferFactory,用于下游系统的使用 + NettyDataBufferFactory nettyDataBufferFactory = new NettyDataBufferFactory(new UnpooledByteBufAllocator(false)); + return nettyDataBufferFactory.wrap(bytes); + } + + private void addHeaders(ServerHttpRequest request,byte[] bytes) { + //请求体信息 + String requesBody = RequestHelper.readRequestBody(request,bytes); + String replaceString = requesBody.replaceAll("\t|\n|\r", "").replaceAll(" ",""); + request.mutate().header("requesBody", replaceString).build(); + } + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpResponseDecorator.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpResponseDecorator.java new file mode 100644 index 0000000..5bfc2d3 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/decorator/CacheServerHttpResponseDecorator.java @@ -0,0 +1,169 @@ +package com.itheima.sfbx.framework.gateway.decorator; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.utils.CityUtil; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.framework.rabbitmq.pojo.MqMessage; +import com.itheima.sfbx.framework.rabbitmq.source.LogSource; +import lombok.extern.slf4j.Slf4j; +import org.reactivestreams.Publisher; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferFactory; +import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.core.io.buffer.DefaultDataBufferFactory; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.http.server.reactive.ServerHttpResponseDecorator; +import org.springframework.messaging.Message; +import org.springframework.messaging.support.MessageBuilder; +import org.springframework.util.StringUtils; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.nio.charset.Charset; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.util.concurrent.atomic.AtomicReference; + +/** + * @ClassName CacheServerHttpResponseDecorator.java + * @Description 缓存应答装饰器 + */ +@Slf4j +public class CacheServerHttpResponseDecorator extends ServerHttpResponseDecorator { + + LogSource logSource; + + ServerWebExchange exchange; + + private Long messageId; + + private String sender; + + private byte[] bytes; + + public CacheServerHttpResponseDecorator(ServerWebExchange exchange, + LogSource logSource, + Long messageId, + String sender) { + super(exchange.getResponse()); + this.logSource = logSource; + this.exchange = exchange; + this.messageId = messageId; + this.sender =sender; + } + + @Override + public Mono writeWith(Publisher body) { + AtomicReference bodyRef = new AtomicReference<>(); + if (body instanceof Flux) { + Flux fluxBody = (Flux) body; + return super.writeWith(fluxBody.buffer().map(dataBuffer -> { + DataBufferFactory dataBufferFactory = new DefaultDataBufferFactory(); + DataBuffer join = dataBufferFactory.join(dataBuffer); + byte[] content = new byte[join.readableByteCount()]; + join.read(content); + // 释放掉内存 + DataBufferUtils.release(join); + String resultString = new String(content, Charset.forName("UTF-8")); + //返回结果处理 + ResponseResult responseResult = JSON.parseObject(resultString, ResponseResult.class); + // 服务访问记录-ResponseResult类型 + this.trace(exchange.getRequest(),responseResult); + // 返回响应数据 + byte[] uppedContent = resultString.getBytes(); + return getDelegate().bufferFactory().wrap(uppedContent); + })); + } + return super.writeWith(body); + } + + /*** + * @description 服务访问记录-ResponseResult类型 + */ + private void trace(ServerHttpRequest request, ResponseResult responseResult) { + //创建请求日志记录 + String logJsonString = createLogJsonString(request, responseResult); + //发送队列延迟信息 + sendLogJsonString(logJsonString); + } + + /** + * 发送日志报文到mq + * @param logBusinessVOJsonString + */ + private void sendLogJsonString(String logBusinessVOJsonString) { + //发送队列信息 + MqMessage mqMessage = MqMessage.builder() + .id(messageId) + .title("log-message") + .content(logBusinessVOJsonString) + .messageType("log-request") + .produceTime(Timestamp.valueOf(LocalDateTime.now())) + .sender(sender) + .build(); + Message message = MessageBuilder.withPayload(mqMessage).setHeader("type", "log-key").build(); + boolean flag = logSource.logOutput().send(message); + log.info("发送:{}结果:{}",mqMessage.toString(),flag); + } + + /** + * 构建日志记录 + * @param request ServerHttpRequest-请求对象 + * @param responseResult 返回的响应结果 + * @return + */ + private String createLogJsonString(ServerHttpRequest request,ResponseResult responseResult ) { + //请求IP + String hostAddress = request.getRemoteAddress().getAddress().getHostAddress(); + //请求host + String host = request.getURI().getHost(); + //请求路径 + String requestUri = request.getURI().getPath(); + //请求方式 + String method = request.getMethodValue().toUpperCase(); + //请求id + String requestId = request.getId(); + //请求体 + String requestBody = request.getHeaders().getFirst("requestBody"); + //业务类型 + String businessType = request.getHeaders().getFirst("businessType"); + //设备号 + String deviceNumber = request.getHeaders().getFirst("deviceNumber"); + //省份数据 + String province = request.getHeaders().getFirst("province"); + //市区数据 + String city = request.getHeaders().getFirst("city"); + //日志对象封装 + LogBusinessVO logBusinessVO = LogBusinessVO.builder() + .requestId(requestId) + .host(host) + .hostAddress(hostAddress) + .requestUri(requestUri) + .requestBody(requestBody) + .requestMethod(method) + .responseBody(JSONObject.toJSONString(responseResult.getData())) + .responseCode(responseResult.getCode()) + .responseMsg(responseResult.getMsg()) + .businessType(businessType) + .deviceNumber(deviceNumber) + .province(province) + .userId(responseResult.getOperatorId()) + .userName(responseResult.getOperatorName()) + .sex(responseResult.getOperatorSex()) + .city(city) + .build(); + CityUtil.handlerCity(logBusinessVO); + String logBusinessVOJsonString = JSONObject.toJSONString(logBusinessVO); + log.info("================logBusinessVOJsonString:{}",logBusinessVOJsonString); + return logBusinessVOJsonString; + } +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/RequestRecordFilter.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/RequestRecordFilter.java new file mode 100644 index 0000000..0591a73 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/RequestRecordFilter.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.framework.gateway.filter; + +import com.itheima.sfbx.framework.gateway.decorator.CacheServerHttpRequestDecorator; +import com.itheima.sfbx.framework.gateway.properties.LogProperties; +import com.itheima.sfbx.framework.gateway.util.RequestHelper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cloud.gateway.filter.GatewayFilterChain; +import org.springframework.cloud.gateway.filter.GlobalFilter; +import org.springframework.core.Ordered; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * @ClassName RequestRecordFilter.java + * @Description 请求日志拦截 + */ +@Component +@EnableConfigurationProperties(LogProperties.class) +public class RequestRecordFilter implements GlobalFilter,Ordered { + + @Autowired + LogProperties logProperties; + + private AntPathMatcher antPathMatcher = new AntPathMatcher(); + + @Override + public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { + //处理文件上传:如果是文件上传则不记录日志 + MediaType mediaType =exchange.getRequest().getHeaders().getContentType(); + boolean flag = RequestHelper.isUploadFile(mediaType); + //忽略路径处理:获得请求路径然后与logProperties的路进行匹配,匹配上则不记录日志 + String path = exchange.getRequest().getURI().getPath(); + List ignoreTestUrl = logProperties.getIgnoreUrl(); + for (String testUrl : ignoreTestUrl) { + if (antPathMatcher.match(testUrl, path)){ + flag = true; + break; + } + } + //无需记录日志:直接放过请求 + if (flag){ + return chain.filter(exchange); + } + //需记录日志:对ServerHttpRequest进行二次封装,解决requestBody只能读取一次的问题 + CacheServerHttpRequestDecorator decorator = new CacheServerHttpRequestDecorator(exchange.getRequest()); + //把当前的请求体进行改变,用于传递新放入的body + return chain.filter(exchange.mutate().request(decorator).build()); + } + + @Override + public int getOrder() { + return Ordered.HIGHEST_PRECEDENCE; + } + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/ResponseRecordFilter.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/ResponseRecordFilter.java new file mode 100644 index 0000000..144c251 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/ResponseRecordFilter.java @@ -0,0 +1,81 @@ +package com.itheima.sfbx.framework.gateway.filter; + +import com.itheima.sfbx.framework.commons.utils.SnowflakeIdWorker; +import com.itheima.sfbx.framework.gateway.decorator.CacheServerHttpResponseDecorator; +import com.itheima.sfbx.framework.gateway.properties.LogProperties; +import com.itheima.sfbx.framework.gateway.util.RequestHelper; +import com.itheima.sfbx.framework.rabbitmq.source.LogSource; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cloud.gateway.filter.GatewayFilterChain; +import org.springframework.cloud.gateway.filter.GlobalFilter; +import org.springframework.core.Ordered; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Component; +import org.springframework.util.AntPathMatcher; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; + +import java.util.List; + +/** + * @ClassName ResponseRecordFilter.java + * @Description Response记录过滤 + */ +@Slf4j +@Component +public class ResponseRecordFilter implements GlobalFilter, Ordered { + + @Autowired + private LogSource logSource; + + @Autowired + private SnowflakeIdWorker snowflakeIdWorker; + + @Autowired + LogProperties logProperties; + + private AntPathMatcher antPathMatcher = new AntPathMatcher(); + + @Value("${spring.application.name}") + private String applicationName; + + @Value("${server.port}") + private String port; + + @Override + public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { + //处理文件上传:如果是文件上传则不记录日志 + MediaType mediaType =exchange.getRequest().getHeaders().getContentType(); + boolean flag = RequestHelper.isUploadFile(mediaType); + //忽略路径处理:获得请求路径然后与logProperties的路进行匹配,匹配上则不记录日志 + String path = exchange.getRequest().getURI().getPath(); + List ignoreTestUrl = logProperties.getIgnoreUrl(); + for (String testUrl : ignoreTestUrl) { + if (antPathMatcher.match(testUrl, path)){ + flag = true; + break; + } + } + //无需记录日志:直接放过请求 + if (flag){ + return chain.filter(exchange); + + } + //需记录日志:对ServerHttpResponse进行二次封装 + CacheServerHttpResponseDecorator serverHttpResponseDecorator = + new CacheServerHttpResponseDecorator( + exchange, + logSource, + snowflakeIdWorker.nextId(), + applicationName+":"+port); + //把当前的应答体进行改变,用于传递新放入的response中 + return chain.filter(exchange.mutate().response(serverHttpResponseDecorator).build()); + } + + @Override + public int getOrder() { + return -2; + } +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/UserTokenGlobalFilter.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/UserTokenGlobalFilter.java new file mode 100644 index 0000000..65c8f10 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/filter/UserTokenGlobalFilter.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.gateway.filter; + +import com.itheima.sfbx.framework.commons.constant.security.SecurityConstant; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cloud.gateway.filter.GatewayFilterChain; +import org.springframework.cloud.gateway.filter.GlobalFilter; +import org.springframework.core.annotation.Order; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.stereotype.Component; +import org.springframework.web.server.ServerWebExchange; +import reactor.core.publisher.Mono; + +/** + * @ClassName TenantFilter.java + * @Description 多租户过滤器 + */ +@Slf4j +@Component +@Order(-99) +public class UserTokenGlobalFilter implements GlobalFilter { + + @Override + public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { + + //放入下游请求头中 + ServerHttpRequest serverHttpRequest = exchange.getRequest().mutate().build(); + + //获得请求头中的userToken信息 + String userToken = exchange.getRequest().getHeaders().getFirst(SecurityConstant.USER_TOKEN); + //已登录从头部中拿到userToken + if (!EmptyUtil.isNullOrEmpty(userToken)){ + serverHttpRequest = serverHttpRequest.mutate().header(SecurityConstant.USER_TOKEN, userToken).build(); + } + + //把新的exchange放回到过滤链 + return chain.filter(exchange.mutate().request(serverHttpRequest).build()); + } +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/LogProperties.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/LogProperties.java new file mode 100644 index 0000000..0a1730c --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/LogProperties.java @@ -0,0 +1,22 @@ +package com.itheima.sfbx.framework.gateway.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName TenantProperties.java + * @Description MyBaits-plus多租户属性 + */ +@Data +@NoArgsConstructor +@ConfigurationProperties(prefix = "itheima.framework.log") +public class LogProperties { + + public List ignoreUrl = new ArrayList<>(); + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/SnowflakeIdWorkerProperties.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/SnowflakeIdWorkerProperties.java new file mode 100644 index 0000000..4654d5d --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/properties/SnowflakeIdWorkerProperties.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.framework.gateway.properties; + +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @ClassName SnowflakeIdWorkerProperties.java + * @Description 雪花算法配置 + */ +@Setter +@Getter +@NoArgsConstructor +@ToString +@ConfigurationProperties(prefix = "itheima.framework.snowflake") +public class SnowflakeIdWorkerProperties { + + private Long workerId; + + private Long datacenterId; + +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/RequestHelper.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/RequestHelper.java new file mode 100644 index 0000000..10b9abe --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/RequestHelper.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.framework.gateway.util; + +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; +import org.springframework.http.MediaType; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.lang.Nullable; + +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.Objects; + +/** + * @ClassName LogHelper.java + * @Description 请求处理类 + */ +public class RequestHelper { + + /** + * @Description 根据MediaType获取字符集,如果获取不到,则默认返回UTF_8 + * @param mediaType MediaType + * @return Charset + */ + public static Charset getMediaTypeCharset(@Nullable MediaType mediaType) { + if (Objects.nonNull(mediaType) && mediaType.getCharset() != null) { + return mediaType.getCharset(); + } else { + return StandardCharsets.UTF_8; + } + } + + /** + * @Description 读取请求体内容 + * @param request ServerHttpRequest + * @return 请求体 + */ + public static String readRequestBody(ServerHttpRequest request,byte[] bytes) { + HttpHeaders headers = request.getHeaders(); + MediaType mediaType = headers.getContentType(); + String method = request.getMethodValue().toUpperCase(); + if (Objects.nonNull(mediaType) && mediaType.equals(MediaType.MULTIPART_FORM_DATA)) { + return "upload-file"; + }else if (method.equals(HttpMethod.GET)&&!request.getQueryParams().isEmpty()) { + return request.getQueryParams().toString(); + }else if (headers.getContentLength() > 0) { + return new String(bytes, getMediaTypeCharset(mediaType)); + }else { + return "no-have-body"; + } + } + + /** + * @Description 判断是否是上传文件 + * @param mediaType MediaType + * @return Boolean + */ + public static boolean isUploadFile(@Nullable MediaType mediaType) { + if (Objects.isNull(mediaType)) { + return false; + } + return mediaType.includes(MediaType.MULTIPART_FORM_DATA) + || mediaType.includes(MediaType.IMAGE_GIF) + || mediaType.includes(MediaType.IMAGE_JPEG) + || mediaType.includes(MediaType.IMAGE_PNG) + || mediaType.equals(MediaType.MULTIPART_FORM_DATA_VALUE); + } +} diff --git a/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/WebUtils.java b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/WebUtils.java new file mode 100644 index 0000000..8195137 --- /dev/null +++ b/day02/sfbx-framework/framework-gateway/src/main/java/com/itheima/sfbx/framework/gateway/util/WebUtils.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.framework.gateway.util; + +import com.alibaba.fastjson.JSONObject; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import io.netty.util.CharsetUtil; +import org.springframework.core.io.buffer.DataBuffer; +import org.springframework.core.io.buffer.DataBufferUtils; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; +import org.springframework.http.server.reactive.ServerHttpResponse; +import reactor.core.publisher.Mono; + +/*** + * @description web工具类 + */ +public class WebUtils { + + public static Mono writeFailedToResponse(ServerHttpResponse response, IBaseEnum basicEnum){ + //应答状态 + response.setStatusCode(HttpStatus.OK); + //响应格式 + response.getHeaders().set(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE); + response.getHeaders().set("Access-Control-Allow-Origin", "*"); + response.getHeaders().set("Cache-Control", "no-cache"); + //返回结果封装 + ResponseResult responseWrap = ResponseResultBuild.build(basicEnum, false); + String result = JSONObject.toJSONString(responseWrap); + DataBuffer buffer = response.bufferFactory().wrap(result.getBytes(CharsetUtil.UTF_8)); + //写入响应结果 + return response.writeWith(Mono.just(buffer)).doOnError(error -> DataBufferUtils.release(buffer)); + } + +} diff --git a/day02/sfbx-framework/framework-influxdb/pom.xml b/day02/sfbx-framework/framework-influxdb/pom.xml new file mode 100644 index 0000000..92f36c9 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/pom.xml @@ -0,0 +1,41 @@ + + + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + 4.0.0 + + framework-influxdb + + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-autoconfigure + + + com.itheima.sfbx + framework-commons + + + org.springframework.boot + spring-boot-configuration-processor + + + org.influxdb + influxdb-java + 2.18 + + + org.aspectj + aspectjweaver + + + diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/InfluxDBBaseMapper.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/InfluxDBBaseMapper.java new file mode 100644 index 0000000..2faf9b7 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/InfluxDBBaseMapper.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.framework.influxdb; + +import com.itheima.sfbx.framework.influxdb.anno.Insert; + +import java.util.List; + +public interface InfluxDBBaseMapper { + + @Insert + void insertOne(T entity); + + @Insert + void insertBatch(List entityList); +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Insert.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Insert.java new file mode 100644 index 0000000..7f49a85 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Insert.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.framework.influxdb.anno; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Insert { +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Param.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Param.java new file mode 100644 index 0000000..284064e --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Param.java @@ -0,0 +1,10 @@ +package com.itheima.sfbx.framework.influxdb.anno; + +import java.lang.annotation.*; + +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.PARAMETER}) +@Documented +public @interface Param { + String value(); +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Select.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Select.java new file mode 100644 index 0000000..f064bf3 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/anno/Select.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx.framework.influxdb.anno; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Select { + //执行的influxQL + String value(); + + //返回的类型 + Class resultType(); + + //执行的目标库 + String database(); +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/aspect/InfluxDBAspect.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/aspect/InfluxDBAspect.java new file mode 100644 index 0000000..8348dce --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/aspect/InfluxDBAspect.java @@ -0,0 +1,68 @@ +package com.itheima.sfbx.framework.influxdb.aspect; + +import com.itheima.sfbx.framework.influxdb.anno.Insert; +import com.itheima.sfbx.framework.influxdb.anno.Select; +import com.itheima.sfbx.framework.influxdb.core.Executor; +import com.itheima.sfbx.framework.influxdb.core.ParameterHandler; +import com.itheima.sfbx.framework.influxdb.core.ResultSetHandler; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.lang.reflect.Parameter; +import java.util.List; +import java.util.Map; + +/** + * @ClassName InfluxDBAspect.java + * @Description TODO + */ +@Aspect +@Component +public class InfluxDBAspect { + + private final Executor executor; + + private final ParameterHandler parameterHandler; + + private final ResultSetHandler resultSetHandler; + + @Autowired + public InfluxDBAspect(Executor executor,ParameterHandler parameterHandler,ResultSetHandler resultSetHandler) { + this.executor = executor; + this.parameterHandler = parameterHandler; + this.resultSetHandler = resultSetHandler; + } + + @Around("@annotation(select)") + public Object select(ProceedingJoinPoint joinPoint, Select select) { + MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); + Method method = methodSignature.getMethod(); + Select selectAnnotation = method.getAnnotation(Select.class); + //获得执行参数 + Parameter[] parameters = method.getParameters(); + //获得执行参数值 + Object[] args = joinPoint.getArgs(); + //获得执行sql + String sql = selectAnnotation.value(); + //替换参数 + sql = parameterHandler.handleParameter(parameters,args,sql); + //注解声明返回类型 + Class resultType = selectAnnotation.resultType(); + //查询结果 + List> reultList = executor.select(sql,selectAnnotation.database()); + //根据返回类型返回结果 + return resultSetHandler.handleResultSet(reultList, method,sql,resultType); + } + + @Around("@annotation(insert)") + public void insert(ProceedingJoinPoint joinPoint, Insert insert) { + //获得执行参数值 + Object[] args = joinPoint.getArgs(); + executor.insert(args); + } +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/config/InfluxDBConfig.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/config/InfluxDBConfig.java new file mode 100644 index 0000000..ed3c245 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/config/InfluxDBConfig.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.framework.influxdb.config; + + +import com.itheima.sfbx.framework.influxdb.core.Executor; +import com.itheima.sfbx.framework.influxdb.core.ParameterHandler; +import com.itheima.sfbx.framework.influxdb.core.ResultSetHandler; +import org.influxdb.InfluxDB; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * 时序数据库配置类 + */ +@Configuration +public class InfluxDBConfig { + + @Bean(name = "executor") + public Executor executor(InfluxDB influxDB) { + return new Executor(influxDB); + } + + @Bean(name = "parameterHandler") + public ParameterHandler parameterHandler(InfluxDB influxDB) { + return new ParameterHandler(); + } + + @Bean(name = "resultSetHandler") + public ResultSetHandler resultSetHandler(InfluxDB influxDB) { + return new ResultSetHandler(); + } +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/Executor.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/Executor.java new file mode 100644 index 0000000..dd20762 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/Executor.java @@ -0,0 +1,114 @@ +package com.itheima.sfbx.framework.influxdb.core; + +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import lombok.extern.slf4j.Slf4j; +import org.influxdb.InfluxDB; +import org.influxdb.annotation.Measurement; +import org.influxdb.dto.BatchPoints; +import org.influxdb.dto.Point; +import org.influxdb.dto.Query; +import org.influxdb.dto.QueryResult; +import org.influxdb.impl.InfluxDBMapper; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 执行器 + */ +@Slf4j +public class Executor { + + InfluxDB influxDB; + + public Executor() { + } + + public Executor(InfluxDB influxDB) { + this.influxDB = influxDB; + } + + public List> select(String sql,String database) { + QueryResult queryResult = influxDB.query(new Query(sql, database)); + List> resultList = new ArrayList<>(); + queryResult.getResults().forEach(result -> { + //查询出错抛出错误信息 + if (!EmptyUtil.isNullOrEmpty(result.getError())){ + throw new RuntimeException(result.getError()); + } + if (!EmptyUtil.isNullOrEmpty(result)&&!EmptyUtil.isNullOrEmpty(result.getSeries())){ + //获取所有列的集合,一个迭代是代表一组 + List series= result.getSeries(); + for (QueryResult.Series s : series) { + //列中含有多行数据,每行数据含有多列value,所以嵌套List + List> values = s.getValues(); + //每组的列是固定的 + List columns = s.getColumns(); + for (List v:values){ + //循环遍历结果集,获取每行对应的value,以map形式保存 + Map queryMap =new HashMap(); + for(int i=0;i list = Lists.newArrayList(); + if (obj instanceof List){ + list = (ArrayList) obj; + }else { + list.add(obj); + } + if (list.size() > 0) { + Object firstObj = list.get(0); + Class domainClass = firstObj.getClass(); + List pointList = new ArrayList<>(); + for (Object o : list) { + Point point = Point + .measurementByPOJO(domainClass) + .addFieldsFromPOJO(o) + .build(); + pointList.add(point); + } + //获取数据库名和rp + Measurement measurement = firstObj.getClass().getAnnotation(Measurement.class); + String database = measurement.database(); + String retentionPolicy = measurement.retentionPolicy(); + BatchPoints batchPoints = BatchPoints + .builder() + .points(pointList) + .retentionPolicy(retentionPolicy).build(); + influxDB.setDatabase(database); + influxDB.write(batchPoints); + } + } + + public void delete(String sql, String database) { + influxDB.query(new Query(sql, database)); + } + +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ParameterHandler.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ParameterHandler.java new file mode 100644 index 0000000..f33af9b --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ParameterHandler.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.framework.influxdb.core; + +import com.itheima.sfbx.framework.influxdb.anno.Param; + +import java.lang.reflect.Parameter; + +/** + * 参数处理器 + */ +public class ParameterHandler { + + /** + * 拼接sql + * + * @param parameters 参数名 + * @param args 参数实际值 + * @param sql 未拼接参数的sql语句 + * @return 拼接好的sql + */ + public String handleParameter(Parameter[] parameters, Object[] args, String sql) { + for (int i = 0; i < parameters.length; i++) { + Class parameterType = parameters[i].getType(); + String parameterName = parameters[i].getName(); + + Param param = parameters[i].getAnnotation(Param.class); + if (param != null) { + parameterName = param.value(); + } + + if (parameterType == String.class) { + sql = sql.replaceAll("\\#\\{" + parameterName + "\\}", "'" + args[i] + "'"); + sql = sql.replaceAll("\\$\\{" + parameterName + "\\}", args[i].toString()); + } else { + sql = sql.replaceAll("\\#\\{" + parameterName + "\\}", args[i].toString()); + sql = sql.replaceAll("\\$\\{" + parameterName + "\\}", args[i].toString()); + } + } + return sql; + } +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ResultSetHandler.java b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ResultSetHandler.java new file mode 100644 index 0000000..aafa160 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/java/com/itheima/sfbx/framework/influxdb/core/ResultSetHandler.java @@ -0,0 +1,183 @@ +package com.itheima.sfbx.framework.influxdb.core; + +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import lombok.SneakyThrows; + +import java.lang.reflect.Constructor; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * 结果集处理器 + */ +public class ResultSetHandler { + + /*** + * @description 结果处理 + * + * @param reultList influx返回结果 + * @param method 目标方法 + * @param sql 执行sql + * @param resultType 注解声明返回类型 + * @return + * @return: java.lang.Object + */ + @SneakyThrows + public Object handleResultSet(List> reultList, Method method, String sql, Class resultType) { + Class returnTypeTarget = method.getReturnType(); + //如果结果为空直接返回空构建 + if (EmptyUtil.isNullOrEmpty(reultList)){ + if (returnTypeTarget== List.class){ + return Lists.newArrayList(); + }else if (returnTypeTarget==Map.class){ + return Maps.newHashMap(); + }else if (returnTypeTarget==String.class){ + return null; + }else { + return convertStringToObject(resultType,"0"); + } + } + //当前method声明返回结果不为list,且resultType与method声明返回结果类型不匹配 + if (returnTypeTarget!= List.class&&resultType!=returnTypeTarget){ + throw new RuntimeException("返回类型与声明返回类型不匹配"); + } + //当前method声明返回结果不为list,且resultType与method声明返回结果类型匹配 + if (returnTypeTarget!= List.class&&resultType==returnTypeTarget){ + //结果不唯一则抛出异常 + if (reultList.size()!=1){ + throw new RuntimeException("返回结果不唯一"); + } + //驼峰处理 + Map mapHandler = convertKeysToCamelCase(reultList.get(0)); + //单个Map类型 + if (resultType==Map.class){ + return mapHandler; + //单个自定义类型 + } else if (!isTargetClass(resultType)){ + return BeanConv.toBean(mapHandler, resultType); + //单个JDK提供指定类型 + }else { + if (mapHandler.size()!=2){ + throw new RuntimeException("返回结果非单值"); + } + for (String key : mapHandler.keySet()) { + if (!key.equals("time")&&!EmptyUtil.isNullOrEmpty((mapHandler.get(key)))){ + String target = String.valueOf(mapHandler.get(key)).replace(".0",""); + return convertStringToObject(resultType,target); + } + } + } + } + //当前method声明返回结果为list + if (returnTypeTarget== List.class){ + //驼峰处理 + List> listHandler = convertKeysToCamelCase(reultList); + //list的内部为map结果 + if (resultType==Map.class){ + return listHandler; + //list的内部为自定义类型 + }else if (!isTargetClass(resultType)){ + return BeanConv.toBeanList(listHandler, resultType); + //list的内部为JDK提供指定类型 + }else { + List listResult = Lists.newArrayList(); + listHandler.forEach(mapHandler->{ + if (mapHandler.size()!=2){ + throw new RuntimeException("返回结果非单值"); + } + for (String key : mapHandler.keySet()) { + if (!key.equals("time")&&!EmptyUtil.isNullOrEmpty((mapHandler.get(key)))){ + String target = String.valueOf(mapHandler.get(key)).replace(".0",""); + listResult.add(convertStringToObject(resultType,target)); + } + } + }); + return listResult; + } + } + return null; + } + + // 检查类是否是目标类型 + public static boolean isTargetClass(Class clazz) { + return clazz == Integer.class || + clazz == int.class || + clazz == Long.class || + clazz == long.class || + clazz == Float.class || + clazz == float.class || + clazz == Double.class || + clazz == double.class || + clazz == Short.class || + clazz == short.class || + clazz == Byte.class || + clazz == byte.class || + clazz == Character.class || + clazz == char.class || + clazz == Boolean.class|| + clazz == boolean.class|| + clazz== BigDecimal.class || + clazz== String.class; + } + + public static Map convertKeysToCamelCase(Map map) { + Map camelCaseMap = new HashMap<>(); + + for (Map.Entry entry : map.entrySet()) { + String originalKey = entry.getKey(); + Object value = entry.getValue(); + String camelCaseKey = convertToCamelCase(originalKey); + + camelCaseMap.put(camelCaseKey, value); + } + + return camelCaseMap; + } + + public static List> convertKeysToCamelCase(List> mapList) { + List> listHandler = Lists.newArrayList(); + mapList.forEach(n->{ + listHandler.add(convertKeysToCamelCase(n)); + }); + return listHandler; + } + + public static String convertToCamelCase(String snakeCase) { + StringBuilder camelCase = new StringBuilder(); + boolean nextUpperCase = false; + for (int i = 0; i < snakeCase.length(); i++) { + char currentChar = snakeCase.charAt(i); + if (currentChar == '_') { + nextUpperCase = true; + } else { + if (nextUpperCase) { + camelCase.append(Character.toUpperCase(currentChar)); + nextUpperCase = false; + } else { + camelCase.append(Character.toLowerCase(currentChar)); + } + } + } + return camelCase.toString(); + } + + @SneakyThrows + public static T convertStringToObject(Class clazz, String str){ + if (clazz == String.class) { + return (T)str; // 如果目标类型是 String,则直接返回字符串 + } else if (isTargetClass(clazz)){ + // 获取目标类型的构造函数,参数为 String 类型的参数 + Constructor constructor = clazz.getConstructor(String.class); + return (T)constructor.newInstance(str); // 使用构造函数创建目标类型的对象 + }else { + return (T)clazz.newInstance(); + } + } +} diff --git a/day02/sfbx-framework/framework-influxdb/src/main/resources/META-INF/spring.factories b/day02/sfbx-framework/framework-influxdb/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..d388c17 --- /dev/null +++ b/day02/sfbx-framework/framework-influxdb/src/main/resources/META-INF/spring.factories @@ -0,0 +1 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.itheima.sfbx.framework.influxdb.config.InfluxDBConfig \ No newline at end of file diff --git a/day02/sfbx-framework/framework-knife4j-gateway/pom.xml b/day02/sfbx-framework/framework-knife4j-gateway/pom.xml new file mode 100644 index 0000000..a7566ff --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-gateway/pom.xml @@ -0,0 +1,33 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-knife4j-gateway + framework-knife4j-gateway + + http://www.example.com + + + + + com.github.xiaoymin + knife4j-spring-boot-starter + + + org.springframework.cloud + spring-cloud-starter-gateway + + + org.springframework + spring-webmvc + + + + diff --git a/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/filter/SwaggerHeaderFilter.java b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/filter/SwaggerHeaderFilter.java new file mode 100644 index 0000000..1868120 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/filter/SwaggerHeaderFilter.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.knife4j.filter; + +import org.springframework.cloud.gateway.filter.GatewayFilter; +import org.springframework.cloud.gateway.filter.factory.AbstractGatewayFilterFactory; +import org.springframework.http.server.reactive.ServerHttpRequest; +import org.springframework.stereotype.Component; +import org.springframework.util.StringUtils; +import org.springframework.web.server.ServerWebExchange; + +/** + * @ClassName SwaggerHeaderFilter.java + * @Description 解决basepath路径不正确filter + */ +@Component +public class SwaggerHeaderFilter extends AbstractGatewayFilterFactory { + private static final String HEADER_NAME = "X-Forwarded-Prefix"; + + private static final String URI = "/v2/api-docs"; + + @Override + public GatewayFilter apply(Object config) { + return (exchange, chain) -> { + ServerHttpRequest request = exchange.getRequest(); + String path = request.getURI().getPath(); + if (!StringUtils.endsWithIgnoreCase(path, URI)) { + return chain.filter(exchange); + } + ServerHttpRequest newRequest = request.mutate().header(HEADER_NAME, "").build(); + ServerWebExchange newExchange = exchange.mutate().request(newRequest).build(); + return chain.filter(newExchange); + }; + } +} diff --git a/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/provider/GatewaySwaggerResourcesProvider.java b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/provider/GatewaySwaggerResourcesProvider.java new file mode 100644 index 0000000..a628fc3 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/provider/GatewaySwaggerResourcesProvider.java @@ -0,0 +1,57 @@ +package com.itheima.sfbx.framework.knife4j.provider; + +import org.springframework.cloud.gateway.config.GatewayProperties; +import org.springframework.cloud.gateway.route.RouteLocator; +import org.springframework.cloud.gateway.support.NameUtils; +import org.springframework.context.annotation.Primary; +import org.springframework.stereotype.Component; +import springfox.documentation.swagger.web.SwaggerResource; +import springfox.documentation.swagger.web.SwaggerResourcesProvider; + +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName SwaggerProvider.java + * @Description 解析资源路径 + */ +@Component +@Primary +public class GatewaySwaggerResourcesProvider implements SwaggerResourcesProvider { + + public static final String API_URI = "v2/api-docs"; + + private final RouteLocator routeLocator; + + private final GatewayProperties gatewayProperties; + + public GatewaySwaggerResourcesProvider(RouteLocator routeLocator, GatewayProperties gatewayProperties) { + this.routeLocator = routeLocator; + this.gatewayProperties = gatewayProperties; + } + + @Override + public List get() { + List resources = new ArrayList<>(); + List routes = new ArrayList<>(); + routeLocator.getRoutes().subscribe(route -> routes.add(route.getId())); + gatewayProperties.getRoutes().stream().filter(routeDefinition -> routes.contains(routeDefinition.getId())).forEach(route -> { + route.getPredicates().stream().filter(predicateDefinition -> ("Path").equalsIgnoreCase(predicateDefinition.getName())) + .forEach(predicateDefinition -> { + String routeId = route.getId(); + if (routeId.endsWith("swagger")){ + resources.add(swaggerResource(routeId,predicateDefinition.getArgs().get(NameUtils.GENERATED_NAME_PREFIX + "0").replace("**", API_URI))); + } + }); + }); + return resources; + } + + private SwaggerResource swaggerResource(String name, String location) { + SwaggerResource swaggerResource = new SwaggerResource(); + swaggerResource.setName(name); + swaggerResource.setLocation(location); + swaggerResource.setSwaggerVersion("1.0"); + return swaggerResource; + } +} diff --git a/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/web/SwaggerHandlerController.java b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/web/SwaggerHandlerController.java new file mode 100644 index 0000000..02ce565 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-gateway/src/main/java/com/itheima/sfbx/framework/knife4j/web/SwaggerHandlerController.java @@ -0,0 +1,54 @@ +package com.itheima.sfbx.framework.knife4j.web; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import reactor.core.publisher.Mono; +import springfox.documentation.swagger.web.*; + +import java.util.Optional; + +/** + * @ClassName SwaggerHandlerController.java + * @Description 基于webflux的swagger的controller + */ +@RestController +@RequestMapping("/swagger-resources") +public class SwaggerHandlerController { + + @Autowired(required = false) + private SecurityConfiguration securityConfiguration; + + @Autowired(required = false) + private UiConfiguration uiConfiguration; + + private final SwaggerResourcesProvider swaggerResources; + + @Autowired + public SwaggerHandlerController(SwaggerResourcesProvider swaggerResources) { + this.swaggerResources = swaggerResources; + } + + @GetMapping("/configuration/security") + public Mono> securityConfiguration() { + return Mono.just(new ResponseEntity<>( + Optional.ofNullable(securityConfiguration).orElse(SecurityConfigurationBuilder.builder().build()), HttpStatus.OK)); + + } + + @GetMapping("/configuration/ui") + public Mono> uiConfiguration() { + return Mono.just(new ResponseEntity<>( + Optional.ofNullable(uiConfiguration).orElse(UiConfigurationBuilder.builder().build()), HttpStatus.OK)); + } + + @GetMapping("") + public Mono swaggerResources() { + Mono just = Mono.just((new ResponseEntity<>(swaggerResources.get(), HttpStatus.OK))); + return just; + } + +} diff --git a/day02/sfbx-framework/framework-knife4j-web/pom.xml b/day02/sfbx-framework/framework-knife4j-web/pom.xml new file mode 100644 index 0000000..08a35b5 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-web/pom.xml @@ -0,0 +1,47 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-knife4j-web + framework-knife4j-web + + http://www.example.com + + + + com.github.xiaoymin + knife4j-spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + com.google.guava + guava + + + org.projectlombok + lombok + + + org.springframework.boot + spring-boot-starter-actuator + + + diff --git a/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerConfig.java b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerConfig.java new file mode 100644 index 0000000..9f98705 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerConfig.java @@ -0,0 +1,95 @@ +package com.itheima.sfbx.framework.knife4j.config; + +import com.github.xiaoymin.knife4j.spring.annotations.EnableKnife4j; +import com.itheima.sfbx.framework.knife4j.properties.SwaggerConfigProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.actuate.autoconfigure.endpoint.web.CorsEndpointProperties; +import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointProperties; +import org.springframework.boot.actuate.autoconfigure.web.server.ManagementPortType; +import org.springframework.boot.actuate.endpoint.ExposableEndpoint; +import org.springframework.boot.actuate.endpoint.web.*; +import org.springframework.boot.actuate.endpoint.web.annotation.ControllerEndpointsSupplier; +import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier; +import org.springframework.boot.actuate.endpoint.web.servlet.WebMvcEndpointHandlerMapping; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Import; +import org.springframework.core.env.Environment; +import org.springframework.util.StringUtils; +import springfox.bean.validators.configuration.BeanValidatorPluginsConfiguration; +import springfox.documentation.builders.ApiInfoBuilder; +import springfox.documentation.builders.PathSelectors; +import springfox.documentation.builders.RequestHandlerSelectors; +import springfox.documentation.service.Contact; +import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spring.web.plugins.Docket; +import springfox.documentation.swagger2.annotations.EnableSwagger2; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +@Configuration +@EnableSwagger2 +@EnableConfigurationProperties(SwaggerConfigProperties.class) +@EnableKnife4j +@Import(BeanValidatorPluginsConfiguration.class) +public class SwaggerConfig { + + @Autowired + SwaggerConfigProperties swaggerConfigProperties; + + @Bean(value = "defaultApi2") + @ConditionalOnClass(SwaggerConfigProperties.class) + public Docket defaultApi2() { + // 构建API文档 文档类型为swagger2 + return new Docket(DocumentationType.SWAGGER_2) + .select() + // 配置 api扫描路径 + .apis(RequestHandlerSelectors.basePackage(swaggerConfigProperties.getSwaggerPath())) + // 指定路径的设置 any代表所有路径 + .paths(PathSelectors.any()) + // api的基本信息 + .build().apiInfo(new ApiInfoBuilder() + // api文档名称 + .title(swaggerConfigProperties.getTitle()) + // api文档描述 + .description(swaggerConfigProperties.getDescription()) + // api文档版本 + .version("1.0") // 版本 + // api作者信息 + .contact(new Contact( + swaggerConfigProperties.getContactName(), + swaggerConfigProperties.getContactUrl(), + swaggerConfigProperties.getContactEmail())) + .build()); + } + + /** + * 增加如下配置可解决Spring Boot 6.x 与Swagger 3.0.0 不兼容问题 + **/ + @Bean + public WebMvcEndpointHandlerMapping webEndpointServletHandlerMapping(WebEndpointsSupplier webEndpointsSupplier, + ServletEndpointsSupplier servletEndpointsSupplier, + ControllerEndpointsSupplier controllerEndpointsSupplier, + EndpointMediaTypes endpointMediaTypes, + CorsEndpointProperties corsProperties, + WebEndpointProperties webEndpointProperties, + Environment environment) { + List> allEndpoints = new ArrayList(); + Collection webEndpoints = webEndpointsSupplier.getEndpoints(); + allEndpoints.addAll(webEndpoints); + allEndpoints.addAll(servletEndpointsSupplier.getEndpoints()); + allEndpoints.addAll(controllerEndpointsSupplier.getEndpoints()); + String basePath = webEndpointProperties.getBasePath(); + EndpointMapping endpointMapping = new EndpointMapping(basePath); + boolean shouldRegisterLinksMapping = this.shouldRegisterLinksMapping(webEndpointProperties, environment, basePath); + return new WebMvcEndpointHandlerMapping(endpointMapping, webEndpoints, endpointMediaTypes, corsProperties.toCorsConfiguration(), + new EndpointLinksResolver(allEndpoints, basePath), shouldRegisterLinksMapping, null); + } + private boolean shouldRegisterLinksMapping(WebEndpointProperties webEndpointProperties, Environment environment, String basePath) { + return webEndpointProperties.getDiscovery().isEnabled() && (StringUtils.hasText(basePath) || ManagementPortType.get(environment).equals(ManagementPortType.DIFFERENT)); + } +} diff --git a/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerWebMvcConfig.java b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerWebMvcConfig.java new file mode 100644 index 0000000..3ad734a --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/config/SwaggerWebMvcConfig.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.framework.knife4j.config; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @ClassName UserWebMvcConfig.java + * @Description webMvc高级配置 + */ +@Configuration +@ComponentScan("springfox.documentation.swagger.web") +public class SwaggerWebMvcConfig implements WebMvcConfigurer { + + /** + * 资源路径 映射 + */ + @Override + public void addResourceHandlers(ResourceHandlerRegistry registry) { + //支持webjars + registry.addResourceHandler("/webjars/**") + .addResourceLocations("classpath:/META-INF/resources/webjars/"); + //支持swagger + registry.addResourceHandler("swagger-ui.html") + .addResourceLocations("classpath:/META-INF/resources/"); + //支持小刀 + registry.addResourceHandler("doc.html") + .addResourceLocations("classpath:/META-INF/resources/"); + } +} diff --git a/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/properties/SwaggerConfigProperties.java b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/properties/SwaggerConfigProperties.java new file mode 100644 index 0000000..cc22f48 --- /dev/null +++ b/day02/sfbx-framework/framework-knife4j-web/src/main/java/com/itheima/sfbx/framework/knife4j/properties/SwaggerConfigProperties.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.framework.knife4j.properties; + +import lombok.*; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.io.Serializable; + +/** + * @Description SwaggerConfigProperties配置类 + */ + +@Data +@NoArgsConstructor +@ConfigurationProperties(prefix = "itheima.framework.swagger") +public class SwaggerConfigProperties implements Serializable { + + public String swaggerPath; + + public String title; + + public String description; + + public String contactName; + + public String contactUrl; + + public String contactEmail; +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/pom.xml b/day02/sfbx-framework/framework-mybatis-plus/pom.xml new file mode 100644 index 0000000..f194221 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/pom.xml @@ -0,0 +1,54 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-mybatis-plus + framework-mybatis-plus + + http://www.example.com + + + com.itheima.sfbx + framework-commons + + + mysql + mysql-connector-java + + + com.alibaba + druid-spring-boot-starter + + + com.alibaba + druid + + + com.baomidou + mybatis-plus-boot-starter + + + com.baomidou + mybatis-plus-generator + + + org.springframework.boot + spring-boot-starter-freemarker + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/basic/BasePojo.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/basic/BasePojo.java new file mode 100644 index 0000000..5afa4a0 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/basic/BasePojo.java @@ -0,0 +1,62 @@ +package com.itheima.sfbx.framework.mybatisplus.basic; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @Description:实体基础类 + */ +@Data +@NoArgsConstructor +public class BasePojo implements Serializable { + + //主键 + @JsonFormat(shape = JsonFormat.Shape.STRING) + public Long id; + + //创建时间:INSERT代表只在插入时填充 + @TableField(fill = FieldFill.INSERT) + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + public LocalDateTime createTime; + + //修改时间:INSERT_UPDATE 首次插入、其次更新时填充(或修改) + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + public LocalDateTime updateTime; + + //创建人Id:INSERT_UPDATE 首次插入、其次更新时填充(或修改) + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long createBy; + + //修改人Id:INSERT_UPDATE 首次插入、其次更新时填充(或修改) + @TableField(fill = FieldFill.INSERT_UPDATE) + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long updateBy; + + //是否有效 + @TableField(fill = FieldFill.INSERT) + public String dataState; + + public BasePojo(Long id, String dataState) { + this.id = id; + this.dataState = dataState; + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/config/MyBatisPlusConfig.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/config/MyBatisPlusConfig.java new file mode 100644 index 0000000..c987007 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/config/MyBatisPlusConfig.java @@ -0,0 +1,228 @@ +package com.itheima.sfbx.framework.mybatisplus.config; + +import com.baomidou.mybatisplus.annotation.DbType; +import com.baomidou.mybatisplus.autoconfigure.ConfigurationCustomizer; +import com.baomidou.mybatisplus.autoconfigure.MybatisPlusProperties; +import com.baomidou.mybatisplus.core.incrementer.DefaultIdentifierGenerator; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.framework.mybatisplus.constant.MybatisPlusConstant; +import com.itheima.sfbx.framework.mybatisplus.handler.AutoMetaObjectHandler; +import com.itheima.sfbx.framework.mybatisplus.handler.DeptNoLineHandler; +import com.itheima.sfbx.framework.mybatisplus.handler.PersonLineHandler; +import com.itheima.sfbx.framework.mybatisplus.interceptor.DeptNoLineInnerInterceptor; +import com.itheima.sfbx.framework.mybatisplus.interceptor.PersonLineInnerInterceptor; +import com.itheima.sfbx.framework.mybatisplus.properties.DataSecurityProperties; +import com.itheima.sfbx.framework.mybatisplus.properties.TenantProperties; +import lombok.extern.slf4j.Slf4j; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.StringValue; +import net.sf.jsqlparser.expression.operators.relational.ExpressionList; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description:配置文件 + */ +@Slf4j +//申明此类为配置类 +@Configuration +//读取配置 +@EnableConfigurationProperties({MybatisPlusProperties.class, TenantProperties.class,DataSecurityProperties.class}) +public class MyBatisPlusConfig { + + @Autowired + MybatisPlusProperties mybatisPlusProperties; + + @Autowired + TenantProperties tenantProperties; + + @Autowired + DataSecurityProperties dataSecurityProperties; + + /** + * @Description mybatis提供的主键生成策略【制定雪花】 + */ + @Bean + public IdentifierGenerator identifierGenerator() { + + return new DefaultIdentifierGenerator(); + } + + /** + * 自动填充 + */ + @Bean + @ConditionalOnMissingBean + public AutoMetaObjectHandler myMetaObjectHandler() { + + return new AutoMetaObjectHandler(); + } + + /** + * 新的分页插件,一缓和二缓遵循mybatis的规则, + * 需要设置 MybatisConfiguration#useDeprecatedExecutor = false + * 避免缓存出现问题(该属性会在旧插件移除后一同移除) + */ + @Bean + public MybatisPlusInterceptor mybatisPlusInterceptor() { + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + // 如果用了分页插件注意 + // 先 add TenantLineInnerInterceptor + // 再 add PaginationInnerInterceptor + // 用了分页插件必须设置 MybatisConfiguration#useDeprecatedExecutor = false + //多租户租插件 + interceptor.addInnerInterceptor(companyNoInterceptor()); + //数据权限-部门插件 + interceptor.addInnerInterceptor(deptNoLineInnerInterceptor()); + //数据权限-本人插件 + interceptor.addInnerInterceptor(personLineInnerInterceptor()); + //分页的插件 + interceptor.addInnerInterceptor(paginationInnerInterceptor()); + return interceptor; + } + + @Bean + public TenantLineInnerInterceptor companyNoInterceptor() { + return new TenantLineInnerInterceptor(new TenantLineHandler() { + + @Override + public Expression getTenantId() { + //从当前的SubjectContent上下文中获取用户信息CompanyNo + String companyNo = SubjectContent.getCompanyNo(); + return companyNo==null ? null : new StringValue(companyNo); + } + + @Override + public String getTenantIdColumn() { + + return MybatisPlusConstant.COMPANY_NO; + } + + @Override + public boolean ignoreTable(String tableName) { + //如果当前为默认管理平台则忽略表 +// String companyNo = SubjectContent.getCompanyNo(); +// if (tenantProperties.getDefaultCompanyNo().equals(companyNo)){ +// log.info("默认企业查询,忽略表:{}", tableName); +// return true; +// } + //如果tableName出现在忽略配置中则不添加企业查询条件 + List tableNameList = tenantProperties.getIgnoreCompanyTables(); + if (!EmptyUtil.isNullOrEmpty(tableNameList)&&tableNameList.contains(tableName)) { + log.info("企业隐式传参为空,忽略表:{}", tableName); + return true; + } + //如果查询字段值为空则不添加企业查询条件 + Expression tenantId = this.getTenantId(); + if (EmptyUtil.isNullOrEmpty(tenantId)) { + log.info("企业隐式传参为空,忽略表:{}", tableName); + return true; + } + return false; + } + }); + } + + @Bean + public PersonLineInnerInterceptor personLineInnerInterceptor() { + return new PersonLineInnerInterceptor(new PersonLineHandler() { + @Override + public Expression getCreateBy() { + if (EmptyUtil.isNullOrEmpty(SubjectContent.getUserVO())){ + return null; + } + if (EmptyUtil.isNullOrEmpty(SubjectContent.getUserVO().getDataSecurityVO())){ + return null; + } + Boolean youselfData = SubjectContent.getUserVO().getDataSecurityVO().getYouselfData(); + Long userId = SubjectContent.getUserVO().getId(); + return youselfData ? new StringValue(String.valueOf(userId)) : null ; + } + @Override + public String getCreateByColumn() { + return PersonLineHandler.super.getCreateByColumn(); + } + @Override + public boolean ignoreTable(String tableName) { + //如果未指定创建人 + Expression expression = this.getCreateBy(); + if (EmptyUtil.isNullOrEmpty(expression)){ + log.info("数据权限-本人隐式传参为空,忽略表:{}", tableName); + return true; + } + //如果tableName出现在忽略配置中则不添加数据权限 + List tableNameList = dataSecurityProperties.getIgnoreDataSecurityTables(); + if (!EmptyUtil.isNullOrEmpty(tableNameList)&&tableNameList.contains(tableName)) { + log.info("忽略表:{}", tableName); + return true; + } + return false; + } + }); + } + + @Bean + public DeptNoLineInnerInterceptor deptNoLineInnerInterceptor() { + return new DeptNoLineInnerInterceptor(new DeptNoLineHandler() { + @Override + public ExpressionList getDeptNoList() { + if (EmptyUtil.isNullOrEmpty(SubjectContent.getUserVO())){ + return null; + } + if (EmptyUtil.isNullOrEmpty(SubjectContent.getUserVO().getDataSecurityVO())){ + return null; + } + List deptNos = SubjectContent.getUserVO().getDataSecurityVO().getDeptNos(); + return EmptyUtil.isNullOrEmpty(deptNos)?null:new ExpressionList(deptNos + .stream().map(StringValue::new).collect(Collectors.toList())); + } + @Override + public String getDeptNoColumn() { + + return DeptNoLineHandler.super.getDeptNoColumn(); + } + @Override + public boolean ignoreTable(String tableName) { + //如果未指定部门列表 + ExpressionList expressionList = this.getDeptNoList(); + if (EmptyUtil.isNullOrEmpty(expressionList)){ + log.info("数据权限-部门隐式传参为空,忽略表:{}", tableName); + return true; + } + //如果tableName出现在忽略配置中则不添加数据权限 + List tableNameList = dataSecurityProperties.getIgnoreDataSecurityTables(); + if (!EmptyUtil.isNullOrEmpty(tableNameList)&&tableNameList.contains(tableName)) { + log.info("忽略表:{}", tableName); + return true; + } + return false; + } + }); + } + + + //分页的插件配置 + @Bean + public PaginationInnerInterceptor paginationInnerInterceptor() { + return new PaginationInnerInterceptor(DbType.MYSQL); + } + + @Bean + public ConfigurationCustomizer configurationCustomizer() { + return configuration -> configuration.setUseDeprecatedExecutor(false); + } + +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/constant/MybatisPlusConstant.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/constant/MybatisPlusConstant.java new file mode 100644 index 0000000..94574a7 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/constant/MybatisPlusConstant.java @@ -0,0 +1,19 @@ + +package com.itheima.sfbx.framework.mybatisplus.constant; + + +/** + * @Description 静态变量 + */ +public class MybatisPlusConstant { + + //企业编号 + public static final String COMPANY_NO ="company_no"; + + //创建人 + public static final String CREATE_BY ="create_by"; + + //部门编号 + public static final String DATA_DEPT_NO ="data_dept_no"; + +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/generator/CodeGenerator.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/generator/CodeGenerator.java new file mode 100644 index 0000000..62e697d --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/generator/CodeGenerator.java @@ -0,0 +1,190 @@ +package com.itheima.sfbx.framework.mybatisplus.generator; + +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.generator.AutoGenerator; +import com.baomidou.mybatisplus.generator.InjectionConfig; +import com.baomidou.mybatisplus.generator.config.*; +import com.baomidou.mybatisplus.generator.config.po.TableInfo; +import com.baomidou.mybatisplus.generator.config.rules.DateType; +import com.baomidou.mybatisplus.generator.config.rules.NamingStrategy; +import com.baomidou.mybatisplus.generator.engine.FreemarkerTemplateEngine; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; + +import java.util.*; + +/** + * @Description:代码生成器 + */ +public class CodeGenerator { + + public static void autoGenerator(){ + + //用来获取generrator.properties文件的配置信息 + final ResourceBundle rb = ResourceBundle.getBundle("generrator"); + + // 代码生成器 + AutoGenerator mpg = new AutoGenerator(); + + // 全局配置 + GlobalConfig gc = new GlobalConfig(); + String serviceProjectPath =rb.getString("serviceProjectPath"); + gc.setOutputDir(serviceProjectPath + "/src/main/java"); + gc.setAuthor(rb.getString("author")); + gc.setOpen(false); + gc.setFileOverride(true); + //指定时间处理类型 + gc.setDateType(DateType.ONLY_DATE); + gc.setSwagger2(true); //实体属性 Swagger2 注解 + mpg.setGlobalConfig(gc); + + //数据源配置 + DataSourceConfig dsc = new DataSourceConfig(); + dsc.setUrl(rb.getString("url")); + // dsc.setSchemaName("public"); + dsc.setDriverName("com.mysql.cj.jdbc.Driver"); + dsc.setUsername(rb.getString("userName")); + dsc.setPassword(rb.getString("password")); + mpg.setDataSource(dsc); + + //包配置 + PackageConfig pc = new PackageConfig(); + pc.setModuleName(rb.getString("moduleName")); + pc.setParent(rb.getString("parent")); + pc.setController("web"); + pc.setService("service"); + pc.setServiceImpl("service.impl"); + pc.setEntity("pojo"); + pc.setMapper("mapper"); + mpg.setPackageInfo(pc); + + // 自定义配置 + InjectionConfig cfg = new InjectionConfig() { + @Override + public void initMap() { + //管理需要附件功能的代码生成 + List tablesFile = Arrays.asList(rb.getString("tablesFile").split(",")); + Map map = new HashMap<>(); + map.put("tablesFile",tablesFile); + this.setMap(map); + } + }; + + String dtoOProjectPath =rb.getString("dtoOProjectPath"); + + // 自定义输出配置 + List focList = new ArrayList<>(); + + if ("true".equals(rb.getString("constant"))){ + String constantTemplatePath = rb.getString("constant.ftl.path")+".ftl"; + // 自定义constant配置会被优先输出 + focList.add(new FileOutConfig(constantTemplatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + // 自定义输出文件名 + return dtoOProjectPath + "/src/main/java/" +pc.getParent().replace(".","/")+"/constant/" + + tableInfo.getEntityName() + "CacheConstant" + StringPool.DOT_JAVA; + } + }); + } + + if ("true".equals(rb.getString("enums"))){ + String enumsTemplatePath = rb.getString("enums.ftl.path")+".ftl"; + // 自定义enums配置会被优先输出 + focList.add(new FileOutConfig(enumsTemplatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + // 自定义输出文件名 + return dtoOProjectPath + "/src/main/java/" +pc.getParent().replace(".","/")+"/enums/" + + tableInfo.getEntityName() + "Enum" + StringPool.DOT_JAVA; + } + }); + } + + if ("true".equals(rb.getString("dto"))){ + String dtoTemplatePath = rb.getString("dto.ftl.path")+".ftl"; + // 自定义Vo配置会被优先输出 + focList.add(new FileOutConfig(dtoTemplatePath) { + @Override + public String outputFile(TableInfo tableInfo) { + // 自定义输出文件名 + return dtoOProjectPath + "/src/main/java/" +pc.getParent().replace(".","/")+"/dto/" + + tableInfo.getEntityName() + "VO" + StringPool.DOT_JAVA; + } + }); + } + + + cfg.setFileOutConfigList(focList); + mpg.setCfg(cfg); + + // 配置模板 + TemplateConfig templateConfig = new TemplateConfig(); + if ("true".equals(rb.getString("entity"))){ + String entityFtlPath = rb.getString("entity.ftl.path"); + if (!EmptyUtil.isNullOrEmpty(entityFtlPath)){ + templateConfig.setEntity(entityFtlPath); + } + }else { + templateConfig.setEntity(null); + } + + if ("true".equals(rb.getString("mapper"))){ + String mapperFtlPath = rb.getString("mapper.ftl.path"); + if (!EmptyUtil.isNullOrEmpty(mapperFtlPath)){ + templateConfig.setMapper(mapperFtlPath); + } + }else { + templateConfig.setMapper(null); + } + + if ("true".equals(rb.getString("service"))){ + String serviceFtlPath = rb.getString("service.ftl.path"); + if (!EmptyUtil.isNullOrEmpty(serviceFtlPath)){ + templateConfig.setService(serviceFtlPath); + } + }else { + templateConfig.setService(null); + } + + if ("true".equals(rb.getString("serviceImpl"))){ + String serviceImpFtlPath = rb.getString("serviceImpl.ftl.path"); + if (!EmptyUtil.isNullOrEmpty(serviceImpFtlPath)){ + templateConfig.setServiceImpl(serviceImpFtlPath); + } + }else { + templateConfig.setServiceImpl(null); + } + + if ("true".equals(rb.getString("controller"))){ + String controllerFtlPath = rb.getString("controller.ftl.path"); + if (!EmptyUtil.isNullOrEmpty(controllerFtlPath)){ + templateConfig.setController(controllerFtlPath); + } + }else { + templateConfig.setController(null); + } + templateConfig.setXml(null); + mpg.setTemplate(templateConfig); + + // 策略配置 + StrategyConfig strategy = new StrategyConfig(); + strategy.setNaming(NamingStrategy.underline_to_camel); + strategy.setColumnNaming(NamingStrategy.underline_to_camel); + strategy.setSuperEntityClass(rb.getString("SuperEntityClass")); + strategy.setEntityLombokModel(true); + strategy.setRestControllerStyle(true); + // 写于父类中的公共字段 + String[] SuperEntityColumns = rb.getString("superEntityColumns").split(","); + strategy.setSuperEntityColumns(SuperEntityColumns); + strategy.setInclude(rb.getString("tableName").split(",")); + strategy.setControllerMappingHyphenStyle(true); + String tablePrefix = rb.getString("tablePrefix"); + if (tablePrefix!=null){ + strategy.setTablePrefix(tablePrefix); + } + mpg.setStrategy(strategy); + mpg.setTemplateEngine(new FreemarkerTemplateEngine()); + mpg.execute(); + + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/AutoMetaObjectHandler.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/AutoMetaObjectHandler.java new file mode 100644 index 0000000..575658c --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/AutoMetaObjectHandler.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.framework.mybatisplus.handler; + +import com.baomidou.mybatisplus.core.handlers.MetaObjectHandler; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import lombok.extern.slf4j.Slf4j; +import org.apache.ibatis.reflection.MetaObject; +import org.springframework.stereotype.Component; + +import java.time.LocalDateTime; + +/** + * @Description:自动填充 + */ +@Slf4j +@Component +public class AutoMetaObjectHandler implements MetaObjectHandler { + + @Override + public void insertFill(MetaObject metaObject) { + log.info("开始插入填充....."); + UserVO userVO = SubjectContent.getUserVO(); + if (EmptyUtil.isNullOrEmpty(userVO)){ + userVO= new UserVO(); + } + Object dataState = getFieldValByName("dataState", metaObject); + Object companyNo = getFieldValByName("companyNo", metaObject); + if (metaObject.hasSetter("dataState")&&dataState==null) { + this.setFieldValByName("dataState", SuperConstant.DATA_STATE_0,metaObject); + } + if (metaObject.hasSetter("createTime")) { + this.setFieldValByName("createTime", LocalDateTime.now(),metaObject); + } + if (metaObject.hasSetter("updateTime")) { + this.setFieldValByName("updateTime",LocalDateTime.now(),metaObject); + } + if (metaObject.hasSetter("createBy")) { + this.setFieldValByName("createBy",userVO.getId(),metaObject); + } + if (metaObject.hasSetter("updateBy")) { + this.setFieldValByName("updateBy",userVO.getId(),metaObject); + } + if (metaObject.hasSetter("dataDeptNo")) { + this.setFieldValByName("dataDeptNo",userVO.getDeptNo(),metaObject); + } + if (metaObject.hasSetter("companyNo")&&companyNo==null) { + this.setFieldValByName("companyNo",userVO.getCompanyNo(),metaObject); + } + } + + @Override + public void updateFill(MetaObject metaObject) { + log.info("开始更新填充....."); + UserVO userVO = SubjectContent.getUserVO(); + if (EmptyUtil.isNullOrEmpty(userVO)){ + userVO= new UserVO(); + } + if (metaObject.hasSetter("updateTime")) { + this.setFieldValByName("updateTime",LocalDateTime.now(),metaObject); + } + if (metaObject.hasSetter("updateBy")) { + this.setFieldValByName("updateBy",userVO.getId(),metaObject); + } + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/DeptNoLineHandler.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/DeptNoLineHandler.java new file mode 100644 index 0000000..bcb7c5c --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/DeptNoLineHandler.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.framework.mybatisplus.handler; + +import com.itheima.sfbx.framework.mybatisplus.constant.MybatisPlusConstant; +import net.sf.jsqlparser.expression.operators.relational.ExpressionList; + +/** + * @ClassName DataSecurityLineHandler.java + * @Description 数据权限处理器( DeptNo 行级 ) + */ +public interface DeptNoLineHandler { + + /** + * 获取数据权限值表达式 + * @return 数据权限值表达式 + */ + ExpressionList getDeptNoList(); + + /** + * 获取数据权限字段名 + * 默认字段名叫: data_security_id + * @return 数据权限字段名 + */ + default String getDeptNoColumn() { + return MybatisPlusConstant.DATA_DEPT_NO; + } + + /** + * 根据表名判断是否忽略拼接数据权限条件 + * 默认都要进行解析并拼接数据权限条件 + * @param tableName 表名 + * @return 是否忽略, true:表示忽略,false:需要解析并拼接数据权限条件 + */ + default boolean ignoreTable(String tableName) { + return false; + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/PersonLineHandler.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/PersonLineHandler.java new file mode 100644 index 0000000..5ea5944 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/handler/PersonLineHandler.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.mybatisplus.handler; + +import com.itheima.sfbx.framework.mybatisplus.constant.MybatisPlusConstant; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.operators.relational.ExpressionList; + +/** + * @ClassName DataSecurityLineHandler.java + * @Description 数据权限处理器( createBy 行级 ) + */ +public interface PersonLineHandler { + + /** + * 获取数据权限值表达式 + * @return 数据权限值表达式 + */ + Expression getCreateBy(); + + /** + * 获取数据权限字段名 + * 默认字段名叫: data_security_id + * @return 数据权限字段名 + */ + default String getCreateByColumn() { + return MybatisPlusConstant.CREATE_BY; + } + + /** + * 根据表名判断是否忽略拼接数据权限条件 + * 默认都要进行解析并拼接数据权限条件 + * @param tableName 表名 + * @return 是否忽略, true:表示忽略,false:需要解析并拼接数据权限条件 + */ + default boolean ignoreTable(String tableName) { + return false; + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/DeptNoLineInnerInterceptor.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/DeptNoLineInnerInterceptor.java new file mode 100644 index 0000000..8dfa5f1 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/DeptNoLineInnerInterceptor.java @@ -0,0 +1,227 @@ +package com.itheima.sfbx.framework.mybatisplus.interceptor; + +import com.baomidou.mybatisplus.core.parser.SqlParserHelper; +import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; +import com.baomidou.mybatisplus.core.toolkit.ClassUtils; +import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.baomidou.mybatisplus.core.toolkit.PluginUtils; +import com.baomidou.mybatisplus.core.toolkit.StringPool; +import com.baomidou.mybatisplus.extension.parser.JsqlParserSupport; +import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; +import com.baomidou.mybatisplus.extension.toolkit.PropertyMapper; +import com.itheima.sfbx.framework.mybatisplus.handler.DeptNoLineHandler; +import lombok.*; +import net.sf.jsqlparser.expression.BinaryExpression; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.Parenthesis; +import net.sf.jsqlparser.expression.operators.conditional.AndExpression; +import net.sf.jsqlparser.expression.operators.conditional.OrExpression; +import net.sf.jsqlparser.expression.operators.relational.InExpression; +import net.sf.jsqlparser.expression.operators.relational.ItemsList; +import net.sf.jsqlparser.schema.Column; +import net.sf.jsqlparser.schema.Table; +import net.sf.jsqlparser.statement.select.*; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.executor.statement.StatementHandler; +import org.apache.ibatis.mapping.BoundSql; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.mapping.SqlCommandType; +import org.apache.ibatis.session.ResultHandler; +import org.apache.ibatis.session.RowBounds; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Properties; + +/** + * @ClassName DeptNoLineInnerInterceptor.java + * @Description 数据权限-部门拦截处理 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +@SuppressWarnings({"rawtypes"}) +public class DeptNoLineInnerInterceptor extends JsqlParserSupport implements InnerInterceptor { + + private DeptNoLineHandler deptNoLineHandler; + + @Override + public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException { + if (InterceptorIgnoreHelper.willIgnoreTenantLine(ms.getId())) return; + if (SqlParserHelper.getSqlParserInfo(ms)) return; + PluginUtils.MPBoundSql mpBs = PluginUtils.mpBoundSql(boundSql); + mpBs.sql(parserSingle(mpBs.sql(), null)); + } + + @Override + protected void processSelect(Select select, int index, Object obj) { + processSelectBody(select.getSelectBody()); + List withItemsList = select.getWithItemsList(); + if (!CollectionUtils.isEmpty(withItemsList)) { + withItemsList.forEach(this::processSelectBody); + } + } + + protected void processSelectBody(SelectBody selectBody) { + if (selectBody instanceof PlainSelect) { + processPlainSelect((PlainSelect) selectBody); + } else if (selectBody instanceof WithItem) { + WithItem withItem = (WithItem) selectBody; + if (withItem.getSelectBody() != null) { + processSelectBody(withItem.getSelectBody()); + } + } else { + SetOperationList operationList = (SetOperationList) selectBody; + if (operationList.getSelects() != null && operationList.getSelects().size() > 0) { + operationList.getSelects().forEach(this::processSelectBody); + } + } + } + + /** + * 追加 SelectItem + * + * @param selectItems SelectItem + */ + protected void appendSelectItem(List selectItems) { + if (CollectionUtils.isEmpty(selectItems)) return; + if (selectItems.size() == 1) { + SelectItem item = selectItems.get(0); + if (item instanceof AllColumns || item instanceof AllTableColumns) return; + } + selectItems.add(new SelectExpressionItem(new Column(deptNoLineHandler.getDeptNoColumn()))); + } + + /** + * 处理 PlainSelect + */ + protected void processPlainSelect(PlainSelect plainSelect) { + FromItem fromItem = plainSelect.getFromItem(); + if (fromItem instanceof Table) { + Table fromTable = (Table) fromItem; + if (!deptNoLineHandler.ignoreTable(fromTable.getName())) { + //#1186 github + plainSelect.setWhere(builderExpression(plainSelect.getWhere(), fromTable)); + } + } else { + processFromItem(fromItem); + } + List joins = plainSelect.getJoins(); + if (joins != null && joins.size() > 0) { + joins.forEach(j -> { + processJoin(j); + processFromItem(j.getRightItem()); + }); + } + } + + /** + * 处理子查询等 + */ + protected void processFromItem(FromItem fromItem) { + if (fromItem instanceof SubJoin) { + SubJoin subJoin = (SubJoin) fromItem; + if (subJoin.getJoinList() != null) { + subJoin.getJoinList().forEach(this::processJoin); + } + if (subJoin.getLeft() != null) { + processFromItem(subJoin.getLeft()); + } + } else if (fromItem instanceof SubSelect) { + SubSelect subSelect = (SubSelect) fromItem; + if (subSelect.getSelectBody() != null) { + processSelectBody(subSelect.getSelectBody()); + } + } else if (fromItem instanceof ValuesList) { + logger.debug("Perform a subquery, if you do not give us feedback"); + } else if (fromItem instanceof LateralSubSelect) { + LateralSubSelect lateralSubSelect = (LateralSubSelect) fromItem; + if (lateralSubSelect.getSubSelect() != null) { + SubSelect subSelect = lateralSubSelect.getSubSelect(); + if (subSelect.getSelectBody() != null) { + processSelectBody(subSelect.getSelectBody()); + } + } + } + } + + /** + * 处理联接语句 + */ + protected void processJoin(Join join) { + if (join.getRightItem() instanceof Table) { + Table fromTable = (Table) join.getRightItem(); + if (deptNoLineHandler.ignoreTable(fromTable.getName())) { + // 过滤退出执行 + return; + } + join.setOnExpression(builderExpression(join.getOnExpression(), fromTable)); + } + } + + /** + * 处理条件 + */ + protected Expression builderExpression(Expression currentExpression, Table table) { + InExpression inExpression = new InExpression(); + inExpression.setLeftExpression(this.getAliasColumn(table)); + inExpression.setRightItemsList(deptNoLineHandler.getDeptNoList()); + if (currentExpression == null) { + return inExpression; + } + if (currentExpression instanceof BinaryExpression) { + BinaryExpression binaryExpression = (BinaryExpression) currentExpression; + doExpression(binaryExpression.getLeftExpression()); + doExpression(binaryExpression.getRightExpression()); + } else if (currentExpression instanceof InExpression) { + InExpression inExp = (InExpression) currentExpression; + ItemsList rightItems = inExp.getRightItemsList(); + if (rightItems instanceof SubSelect) { + processSelectBody(((SubSelect) rightItems).getSelectBody()); + } + } + if (currentExpression instanceof OrExpression) { + return new AndExpression(new Parenthesis(currentExpression), inExpression); + } else { + return new AndExpression(currentExpression, inExpression); + } + } + + protected void doExpression(Expression expression) { + if (expression instanceof FromItem) { + processFromItem((FromItem) expression); + } else if (expression instanceof InExpression) { + InExpression inExp = (InExpression) expression; + ItemsList rightItems = inExp.getRightItemsList(); + if (rightItems instanceof SubSelect) { + processSelectBody(((SubSelect) rightItems).getSelectBody()); + } + } + } + + /** + * 数据权限-部门字段别名设置 + *

tenantId 或 tableAlias.tenantId

+ * + * @param table 表对象 + * @return 字段 + */ + protected Column getAliasColumn(Table table) { + StringBuilder column = new StringBuilder(); + if (table.getAlias() != null) { + column.append(table.getAlias().getName()).append(StringPool.DOT); + } + column.append(deptNoLineHandler.getDeptNoColumn()); + return new Column(column.toString()); + } + + @Override + public void setProperties(Properties properties) { + PropertyMapper.newInstance(properties) + .whenNotBlack("deptNoLineHandler", ClassUtils::newInstance, this::setDeptNoLineHandler); + } +} + diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/PersonLineInnerInterceptor.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/PersonLineInnerInterceptor.java new file mode 100644 index 0000000..d416799 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/interceptor/PersonLineInnerInterceptor.java @@ -0,0 +1,226 @@ +package com.itheima.sfbx.framework.mybatisplus.interceptor; + +import com.baomidou.mybatisplus.core.parser.SqlParserHelper; +import com.baomidou.mybatisplus.core.plugins.InterceptorIgnoreHelper; +import com.baomidou.mybatisplus.core.toolkit.*; +import com.baomidou.mybatisplus.extension.parser.JsqlParserSupport; +import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler; +import com.baomidou.mybatisplus.extension.plugins.inner.InnerInterceptor; +import com.baomidou.mybatisplus.extension.toolkit.PropertyMapper; +import com.itheima.sfbx.framework.mybatisplus.handler.PersonLineHandler; +import lombok.*; +import net.sf.jsqlparser.expression.BinaryExpression; +import net.sf.jsqlparser.expression.Expression; +import net.sf.jsqlparser.expression.Parenthesis; +import net.sf.jsqlparser.expression.operators.conditional.AndExpression; +import net.sf.jsqlparser.expression.operators.conditional.OrExpression; +import net.sf.jsqlparser.expression.operators.relational.*; +import net.sf.jsqlparser.schema.Column; +import net.sf.jsqlparser.schema.Table; +import net.sf.jsqlparser.statement.delete.Delete; +import net.sf.jsqlparser.statement.insert.Insert; +import net.sf.jsqlparser.statement.select.*; +import net.sf.jsqlparser.statement.update.Update; +import org.apache.ibatis.executor.Executor; +import org.apache.ibatis.executor.statement.StatementHandler; +import org.apache.ibatis.mapping.BoundSql; +import org.apache.ibatis.mapping.MappedStatement; +import org.apache.ibatis.mapping.SqlCommandType; +import org.apache.ibatis.session.ResultHandler; +import org.apache.ibatis.session.RowBounds; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.List; +import java.util.Properties; + +/** + * @ClassName PersonLineInnerInterceptor.java + * @Description 数据权限-个人拦截处理 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +@SuppressWarnings({"rawtypes"}) +public class PersonLineInnerInterceptor extends JsqlParserSupport implements InnerInterceptor { + + private PersonLineHandler personLineHandler; + + @Override + public void beforeQuery(Executor executor, MappedStatement ms, Object parameter, RowBounds rowBounds, ResultHandler resultHandler, BoundSql boundSql) throws SQLException { + if (InterceptorIgnoreHelper.willIgnoreTenantLine(ms.getId())) return; + if (SqlParserHelper.getSqlParserInfo(ms)) return; + PluginUtils.MPBoundSql mpBs = PluginUtils.mpBoundSql(boundSql); + mpBs.sql(parserSingle(mpBs.sql(), null)); + } + + @Override + protected void processSelect(Select select, int index, Object obj) { + processSelectBody(select.getSelectBody()); + List withItemsList = select.getWithItemsList(); + if (!CollectionUtils.isEmpty(withItemsList)) { + withItemsList.forEach(this::processSelectBody); + } + } + + protected void processSelectBody(SelectBody selectBody) { + if (selectBody instanceof PlainSelect) { + processPlainSelect((PlainSelect) selectBody); + } else if (selectBody instanceof WithItem) { + WithItem withItem = (WithItem) selectBody; + if (withItem.getSelectBody() != null) { + processSelectBody(withItem.getSelectBody()); + } + } else { + SetOperationList operationList = (SetOperationList) selectBody; + if (operationList.getSelects() != null && operationList.getSelects().size() > 0) { + operationList.getSelects().forEach(this::processSelectBody); + } + } + } + + /** + * 追加 SelectItem + * + * @param selectItems SelectItem + */ + protected void appendSelectItem(List selectItems) { + if (CollectionUtils.isEmpty(selectItems)) return; + if (selectItems.size() == 1) { + SelectItem item = selectItems.get(0); + if (item instanceof AllColumns || item instanceof AllTableColumns) return; + } + selectItems.add(new SelectExpressionItem(new Column(personLineHandler.getCreateByColumn()))); + } + + /** + * 处理 PlainSelect + */ + protected void processPlainSelect(PlainSelect plainSelect) { + FromItem fromItem = plainSelect.getFromItem(); + if (fromItem instanceof Table) { + Table fromTable = (Table) fromItem; + if (!personLineHandler.ignoreTable(fromTable.getName())) { + //#1186 github + plainSelect.setWhere(builderExpression(plainSelect.getWhere(), fromTable)); + } + } else { + processFromItem(fromItem); + } + List joins = plainSelect.getJoins(); + if (joins != null && joins.size() > 0) { + joins.forEach(j -> { + processJoin(j); + processFromItem(j.getRightItem()); + }); + } + } + + /** + * 处理子查询等 + */ + protected void processFromItem(FromItem fromItem) { + if (fromItem instanceof SubJoin) { + SubJoin subJoin = (SubJoin) fromItem; + if (subJoin.getJoinList() != null) { + subJoin.getJoinList().forEach(this::processJoin); + } + if (subJoin.getLeft() != null) { + processFromItem(subJoin.getLeft()); + } + } else if (fromItem instanceof SubSelect) { + SubSelect subSelect = (SubSelect) fromItem; + if (subSelect.getSelectBody() != null) { + processSelectBody(subSelect.getSelectBody()); + } + } else if (fromItem instanceof ValuesList) { + logger.debug("Perform a subquery, if you do not give us feedback"); + } else if (fromItem instanceof LateralSubSelect) { + LateralSubSelect lateralSubSelect = (LateralSubSelect) fromItem; + if (lateralSubSelect.getSubSelect() != null) { + SubSelect subSelect = lateralSubSelect.getSubSelect(); + if (subSelect.getSelectBody() != null) { + processSelectBody(subSelect.getSelectBody()); + } + } + } + } + + /** + * 处理联接语句 + */ + protected void processJoin(Join join) { + if (join.getRightItem() instanceof Table) { + Table fromTable = (Table) join.getRightItem(); + if (personLineHandler.ignoreTable(fromTable.getName())) { + // 过滤退出执行 + return; + } + join.setOnExpression(builderExpression(join.getOnExpression(), fromTable)); + } + } + + /** + * 处理条件 + */ + protected Expression builderExpression(Expression currentExpression, Table table) { + EqualsTo equalsTo = new EqualsTo(); + equalsTo.setLeftExpression(this.getAliasColumn(table)); + equalsTo.setRightExpression(personLineHandler.getCreateBy()); + if (currentExpression == null) { + return equalsTo; + } + if (currentExpression instanceof BinaryExpression) { + BinaryExpression binaryExpression = (BinaryExpression) currentExpression; + doExpression(binaryExpression.getLeftExpression()); + doExpression(binaryExpression.getRightExpression()); + } else if (currentExpression instanceof InExpression) { + InExpression inExp = (InExpression) currentExpression; + ItemsList rightItems = inExp.getRightItemsList(); + if (rightItems instanceof SubSelect) { + processSelectBody(((SubSelect) rightItems).getSelectBody()); + } + } + if (currentExpression instanceof OrExpression) { + return new AndExpression(new Parenthesis(currentExpression), equalsTo); + } else { + return new AndExpression(currentExpression, equalsTo); + } + } + + protected void doExpression(Expression expression) { + if (expression instanceof FromItem) { + processFromItem((FromItem) expression); + } else if (expression instanceof InExpression) { + InExpression inExp = (InExpression) expression; + ItemsList rightItems = inExp.getRightItemsList(); + if (rightItems instanceof SubSelect) { + processSelectBody(((SubSelect) rightItems).getSelectBody()); + } + } + } + + /** + * 租户字段别名设置 + *

tenantId 或 tableAlias.tenantId

+ * + * @param table 表对象 + * @return 字段 + */ + protected Column getAliasColumn(Table table) { + StringBuilder column = new StringBuilder(); + if (table.getAlias() != null) { + column.append(table.getAlias().getName()).append(StringPool.DOT); + } + column.append(personLineHandler.getCreateByColumn()); + return new Column(column.toString()); + } + + @Override + public void setProperties(Properties properties) { + PropertyMapper.newInstance(properties) + .whenNotBlack("personLineHandler", ClassUtils::newInstance, this::setPersonLineHandler); + } +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/DataSecurityProperties.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/DataSecurityProperties.java new file mode 100644 index 0000000..177e47e --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/DataSecurityProperties.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx.framework.mybatisplus.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.List; + +/** + * @ClassName DataSecurityProperties.java + * @Description 数据权限配置 + */ +@Data +@ConfigurationProperties(prefix = "mybatis-plus") +public class DataSecurityProperties { + + //需要忽略的企业表 + private List ignoreDataSecurityTables; + +} diff --git a/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/TenantProperties.java b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/TenantProperties.java new file mode 100644 index 0000000..e7e0139 --- /dev/null +++ b/day02/sfbx-framework/framework-mybatis-plus/src/main/java/com/itheima/sfbx/framework/mybatisplus/properties/TenantProperties.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.framework.mybatisplus.properties; + +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.List; + +/** + * @ClassName TenantProperties.java + * @Description MyBaits-plus多租户属性 + */ +@Slf4j +@Data +@ConfigurationProperties(prefix = "mybatis-plus") +public class TenantProperties { + + //需要忽略的企业表 + private List ignoreCompanyTables; + + //默认企业编号Id + private String defaultCompanyNo; + +} diff --git a/day02/sfbx-framework/framework-out-interface/pom.xml b/day02/sfbx-framework/framework-out-interface/pom.xml new file mode 100644 index 0000000..2c63d4c --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/pom.xml @@ -0,0 +1,48 @@ + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-out-interface + framework-out-interface + + http://www.example.com + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + org.projectlombok + lombok + + + cn.hutool + hutool-all + + + org.apache.commons + commons-lang3 + + + com.google.code.gson + gson + + + + com.squareup.okhttp3 + okhttp + 3.14.9 + + + diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/config/OutInterfaceSourceConfig.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/config/OutInterfaceSourceConfig.java new file mode 100644 index 0000000..1475c50 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/config/OutInterfaceSourceConfig.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.outinterface.config; + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + +/** + * BaiduConfig + * + * @author: wgl + * @describe: 外部数据接口配置中心 + * @date: 2022/12/28 10:10 + */ +@Data +@ConfigurationProperties(prefix = "baidu") +public class OutInterfaceSourceConfig { + + + /** + * 当前应用的ak + */ + @Value("${baidu.apikey}") + private String apiKey; + + + /** + * 当前应用的sk + */ + @Value("${baidu.secretKey}") + private String secretKey; + +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/constants/OutInterfaceConstants.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/constants/OutInterfaceConstants.java new file mode 100644 index 0000000..802947f --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/constants/OutInterfaceConstants.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.outinterface.constants; + +import com.itheima.sfbx.framework.outinterface.config.OutInterfaceSourceConfig; + + +/** + * OutInterfaceConstants + * + * @author: wgl + * @describe: 外部数据源常量类 + * @date: 2022/12/28 10:10 + */ +public class OutInterfaceConstants { + + public static class BAI_DU_CLOUD{ + + public final static String BANK_CARD_OCR_URL = "https://aip.baidubce.com/rest/2.0/ocr/v1/bankcard"; + + + public final static String TOKEN_URL = "https://aip.baidubce.com/oauth/2.0/token?client_id=%s&client_secret=%s&grant_type=client_credentials"; + + public static String getTokenUrl(String ak,String sk){ + return String.format(TOKEN_URL,ak,sk); + } + } + +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/dto/TokenDTO.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/dto/TokenDTO.java new file mode 100644 index 0000000..21b37ae --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/dto/TokenDTO.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.outinterface.dto; + +import lombok.Data; + +/** + * TokenDTO + * + * @author: wgl + * @describe: 请求百度云时的Token传输对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class TokenDTO { + + private String refresh_token; + + private String expires_in; + + private String session_key; + + private String access_token; + + private String scope; + + private String session_secret; +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/BankCardService.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/BankCardService.java new file mode 100644 index 0000000..ad6fb86 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/BankCardService.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.framework.outinterface.service; + +/** + * 银行卡业务层 + */ +public interface BankCardService { + + /** + * 银行卡照片Base64图片转换 + * @param base64Image + * @return + */ + String bankCardOcr(String base64Image) throws Exception ; +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/TokenService.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/TokenService.java new file mode 100644 index 0000000..d722938 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/TokenService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.framework.outinterface.service; + +import com.itheima.sfbx.framework.outinterface.dto.TokenDTO; +import okhttp3.*; + +import java.io.*; + +public interface TokenService { + + + TokenDTO getToken() throws IOException; +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/BankCardServiceImpl.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/BankCardServiceImpl.java new file mode 100644 index 0000000..a4c61f2 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/BankCardServiceImpl.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.outinterface.service.impl; + +import com.itheima.sfbx.framework.outinterface.config.OutInterfaceSourceConfig; +import com.itheima.sfbx.framework.outinterface.constants.OutInterfaceConstants; +import com.itheima.sfbx.framework.outinterface.service.BankCardService; +import com.itheima.sfbx.framework.outinterface.utils.HttpUtil; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.net.URLEncoder; + +/** + * BankCardServiceImpl + * + * @author: wgl + * @describe: 银行卡OCR业务层 + * @date: 2022/12/28 10:10 + */ +@Service +public class BankCardServiceImpl implements BankCardService { + + + @Autowired + OutInterfaceSourceConfig outInterfaceSourceConfig; + + @Override + public String bankCardOcr(String base64Image) throws Exception { + // 请求url + String url = OutInterfaceConstants.BAI_DU_CLOUD.BANK_CARD_OCR_URL; + // 本地文件路径 + String imgParam = URLEncoder.encode(base64Image, "UTF-8"); + String param = "image=" + imgParam; + // 注意这里仅为了简化编码每一次请求都去获取access_token,线上环境access_token有过期时间, 客户端可自行缓存,过期后重新获取。 +// String accessToken = outInterfaceSourceConfig.getAccessToken(); + String accessToken = "24.e43b196c823c865919eac7dd088a0215.2592000.1696557649.282335-38868704"; + String result = HttpUtil.post(url, accessToken, param); + return result; + } +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/TokenServiceImpl.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/TokenServiceImpl.java new file mode 100644 index 0000000..4fe3a23 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/service/impl/TokenServiceImpl.java @@ -0,0 +1,44 @@ +package com.itheima.sfbx.framework.outinterface.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.outinterface.config.OutInterfaceSourceConfig; +import com.itheima.sfbx.framework.outinterface.constants.OutInterfaceConstants; +import com.itheima.sfbx.framework.outinterface.dto.TokenDTO; +import com.itheima.sfbx.framework.outinterface.service.TokenService; +import okhttp3.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.io.IOException; + +/** + * TokenServiceImpl + * + * @author: wgl + * @describe: 获取Token的业务层 + * @date: 2022/12/28 10:10 + */ +@Service +public class TokenServiceImpl implements TokenService { + + @Autowired + private OutInterfaceSourceConfig outInterfaceSourceConfig; + + @Override + public TokenDTO getToken() throws IOException { + MediaType mediaType = MediaType.parse("application/json"); + RequestBody body = RequestBody.create(mediaType, ""); + Request request = new Request.Builder() + .url(OutInterfaceConstants.BAI_DU_CLOUD.getTokenUrl(outInterfaceSourceConfig.getApiKey(), outInterfaceSourceConfig.getSecretKey())) + .method("POST", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = new OkHttpClient().newBuilder().build(); + Response response = client.newCall(request).execute(); + TokenDTO tokenDTO = JSONUtil.toBean(response.body().string(), TokenDTO.class); + return tokenDTO; + } + +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/Base64Util.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/Base64Util.java new file mode 100644 index 0000000..aa9b3ed --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/Base64Util.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.framework.outinterface.utils; + +/** + * Base64 工具类 + */ +public class Base64Util { + private static final char last2byte = (char) Integer.parseInt("00000011", 2); + private static final char last4byte = (char) Integer.parseInt("00001111", 2); + private static final char last6byte = (char) Integer.parseInt("00111111", 2); + private static final char lead6byte = (char) Integer.parseInt("11111100", 2); + private static final char lead4byte = (char) Integer.parseInt("11110000", 2); + private static final char lead2byte = (char) Integer.parseInt("11000000", 2); + private static final char[] encodeTable = new char[]{'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/'}; + + public Base64Util() { + } + + public static String encode(byte[] from) { + StringBuilder to = new StringBuilder((int) ((double) from.length * 1.34D) + 3); + int num = 0; + char currentByte = 0; + + int i; + for (i = 0; i < from.length; ++i) { + for (num %= 8; num < 8; num += 6) { + switch (num) { + case 0: + currentByte = (char) (from[i] & lead6byte); + currentByte = (char) (currentByte >>> 2); + case 1: + case 3: + case 5: + default: + break; + case 2: + currentByte = (char) (from[i] & last6byte); + break; + case 4: + currentByte = (char) (from[i] & last4byte); + currentByte = (char) (currentByte << 2); + if (i + 1 < from.length) { + currentByte = (char) (currentByte | (from[i + 1] & lead2byte) >>> 6); + } + break; + case 6: + currentByte = (char) (from[i] & last2byte); + currentByte = (char) (currentByte << 4); + if (i + 1 < from.length) { + currentByte = (char) (currentByte | (from[i + 1] & lead4byte) >>> 4); + } + } + + to.append(encodeTable[currentByte]); + } + } + + if (to.length() % 4 != 0) { + for (i = 4 - to.length() % 4; i > 0; --i) { + to.append("="); + } + } + + return to.toString(); + } +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/FileUtil.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/FileUtil.java new file mode 100644 index 0000000..66e3357 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/FileUtil.java @@ -0,0 +1,72 @@ +package com.itheima.sfbx.framework.outinterface.utils; + +import java.io.*; + +/** + * 文件读取工具类 + */ +public class FileUtil { + + /** + * 读取文件内容,作为字符串返回 + */ + public static String readFileAsString(String filePath) throws IOException { + File file = new File(filePath); + if (!file.exists()) { + throw new FileNotFoundException(filePath); + } + + if (file.length() > 1024 * 1024 * 1024) { + throw new IOException("File is too large"); + } + + StringBuilder sb = new StringBuilder((int) (file.length())); + // 创建字节输入流 + FileInputStream fis = new FileInputStream(filePath); + // 创建一个长度为10240的Buffer + byte[] bbuf = new byte[10240]; + // 用于保存实际读取的字节数 + int hasRead = 0; + while ( (hasRead = fis.read(bbuf)) > 0 ) { + sb.append(new String(bbuf, 0, hasRead)); + } + fis.close(); + return sb.toString(); + } + + /** + * 根据文件路径读取byte[] 数组 + */ + public static byte[] readFileByBytes(String filePath) throws IOException { + File file = new File(filePath); + if (!file.exists()) { + throw new FileNotFoundException(filePath); + } else { + ByteArrayOutputStream bos = new ByteArrayOutputStream((int) file.length()); + BufferedInputStream in = null; + + try { + in = new BufferedInputStream(new FileInputStream(file)); + short bufSize = 1024; + byte[] buffer = new byte[bufSize]; + int len1; + while (-1 != (len1 = in.read(buffer, 0, bufSize))) { + bos.write(buffer, 0, len1); + } + + byte[] var7 = bos.toByteArray(); + return var7; + } finally { + try { + if (in != null) { + in.close(); + } + } catch (IOException var14) { + var14.printStackTrace(); + } + + bos.close(); + } + } + } +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/GsonUtils.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/GsonUtils.java new file mode 100644 index 0000000..769191a --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/GsonUtils.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2017 Baidu, Inc. All Rights Reserved. + */ +package com.itheima.sfbx.framework.outinterface.utils; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonParseException; + +import java.lang.reflect.Type; + +/** + * Json工具类. + */ +public class GsonUtils { + private static Gson gson = new GsonBuilder().create(); + + public static String toJson(Object value) { + return gson.toJson(value); + } + + public static T fromJson(String json, Class classOfT) throws JsonParseException { + return gson.fromJson(json, classOfT); + } + + public static T fromJson(String json, Type typeOfT) throws JsonParseException { + return (T) gson.fromJson(json, typeOfT); + } +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/HttpUtil.java b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/HttpUtil.java new file mode 100644 index 0000000..3bf162d --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/java/com/itheima/sfbx/framework/outinterface/utils/HttpUtil.java @@ -0,0 +1,77 @@ +package com.itheima.sfbx.framework.outinterface.utils; + +import java.io.BufferedReader; +import java.io.DataOutputStream; +import java.io.InputStreamReader; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.List; +import java.util.Map; + +/** + * http 工具类 + */ +public class HttpUtil { + + public static String post(String requestUrl, String accessToken, String params) + throws Exception { + String contentType = "application/x-www-form-urlencoded"; + return HttpUtil.post(requestUrl, accessToken, contentType, params); + } + + public static String post(String requestUrl, String accessToken, String contentType, String params) + throws Exception { + String encoding = "UTF-8"; + if (requestUrl.contains("nlp")) { + encoding = "GBK"; + } + return HttpUtil.post(requestUrl, accessToken, contentType, params, encoding); + } + + public static String post(String requestUrl, String accessToken, String contentType, String params, String encoding) + throws Exception { + String url = requestUrl + "?access_token=" + accessToken; + return HttpUtil.postGeneralUrl(url, contentType, params, encoding); + } + + public static String postGeneralUrl(String generalUrl, String contentType, String params, String encoding) + throws Exception { + URL url = new URL(generalUrl); + // 打开和URL之间的连接 + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection.setRequestMethod("POST"); + // 设置通用的请求属性 + connection.setRequestProperty("Content-Type", contentType); + connection.setRequestProperty("Connection", "Keep-Alive"); + connection.setUseCaches(false); + connection.setDoOutput(true); + connection.setDoInput(true); + + // 得到请求的输出流对象 + DataOutputStream out = new DataOutputStream(connection.getOutputStream()); + out.write(params.getBytes(encoding)); + out.flush(); + out.close(); + + // 建立实际的连接 + connection.connect(); + // 获取所有响应头字段 + Map> headers = connection.getHeaderFields(); + // 遍历所有的响应头字段 + for (String key : headers.keySet()) { + System.err.println(key + "--->" + headers.get(key)); + } + // 定义 BufferedReader输入流来读取URL的响应 + BufferedReader in = null; + in = new BufferedReader( + new InputStreamReader(connection.getInputStream(), encoding)); + String result = ""; + String getLine; + while ((getLine = in.readLine()) != null) { + result += getLine; + } + in.close(); + System.err.println("result:" + result); + return result; + } +} diff --git a/day02/sfbx-framework/framework-out-interface/src/main/resources/META-INF/spring.factories b/day02/sfbx-framework/framework-out-interface/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..5049709 --- /dev/null +++ b/day02/sfbx-framework/framework-out-interface/src/main/resources/META-INF/spring.factories @@ -0,0 +1,4 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itheima.sfbx.framework.outinterface.config.OutInterfaceSourceConfig,\ + com.itheima.sfbx.framework.outinterface.service.impl.BankCardServiceImpl,\ + com.itheima.sfbx.framework.outinterface.service.impl.TokenServiceImpl \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rabbitmq/pom.xml b/day02/sfbx-framework/framework-rabbitmq/pom.xml new file mode 100644 index 0000000..537a715 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-rabbitmq + framework-rabbitmq + + http://www.example.com + + + + com.itheima.sfbx + framework-commons + + + org.springframework.cloud + spring-cloud-starter-stream-rabbit + + + diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/pojo/MqMessage.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/pojo/MqMessage.java new file mode 100644 index 0000000..ca9099d --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/pojo/MqMessage.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.rabbitmq.pojo; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.sql.Timestamp; + +/** + * @Description:Rabbit消息封装 + */ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class MqMessage implements Serializable { + + /**消息id**/ + private Long id; + + /**标题**/ + private String title; + + /**消息内容**/ + private String content; + + /**业务类型**/ + private String messageType; + + /**产生时间**/ + private Timestamp produceTime; + + /**发送人**/ + private String sender; +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/FileSink.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/FileSink.java new file mode 100644 index 0000000..6f2656a --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/FileSink.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.framework.rabbitmq.sink; + +import org.springframework.cloud.stream.annotation.Input; +import org.springframework.messaging.SubscribableChannel; + +/** + * @ClassName LogSink.java + * @Description 日志接收 + */ +public interface FileSink { + + public static String FILE_INPUT="file-input"; + + @Input(FILE_INPUT) + SubscribableChannel fileInput(); + +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/LogSink.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/LogSink.java new file mode 100644 index 0000000..328029f --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/LogSink.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.framework.rabbitmq.sink; + +import org.springframework.cloud.stream.annotation.Input; +import org.springframework.messaging.SubscribableChannel; + +/** + * @ClassName LogSink.java + * @Description 日志接收 + */ +public interface LogSink { + + public static String LOG_INPUT="log-input"; + + @Input(LOG_INPUT) + SubscribableChannel logInput(); + +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/SmsSink.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/SmsSink.java new file mode 100644 index 0000000..9d236dd --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/SmsSink.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.sink; + +import org.springframework.cloud.stream.annotation.Input; +import org.springframework.messaging.SubscribableChannel; + +/** + * @ClassName SmsSink.java + * @Description 短信接受 + */ +public interface SmsSink { + + public static String SMS_INPUT="sms-input"; + + @Input(SMS_INPUT) + SubscribableChannel smsInput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/TradeSink.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/TradeSink.java new file mode 100644 index 0000000..5ae4ba9 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/TradeSink.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.sink; + +import org.springframework.cloud.stream.annotation.Input; +import org.springframework.messaging.SubscribableChannel; + +/** + * @ClassName SmsSink.java + * @Description 交易结果接受 + */ +public interface TradeSink { + + public static String TRADE_INPUT="trade-input"; + + @Input(TRADE_INPUT) + SubscribableChannel tradeInput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/WarrantySink.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/WarrantySink.java new file mode 100644 index 0000000..26885b7 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/sink/WarrantySink.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.sink; + +import org.springframework.cloud.stream.annotation.Input; +import org.springframework.messaging.SubscribableChannel; + +/** + * @ClassName WarrantySink.java + * @Description 合同延迟接受 + */ +public interface WarrantySink { + + public static String WARRANTY_INPUT="warranty-input"; + + @Input(WARRANTY_INPUT) + SubscribableChannel warrantyInput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/FileSource.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/FileSource.java new file mode 100644 index 0000000..1e7b16f --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/FileSource.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.source; + +import org.springframework.cloud.stream.annotation.Output; +import org.springframework.messaging.MessageChannel; + +/** + * @ClassName FileSource.java + * @Description 文件消息队列的发送者 + */ +public interface FileSource { + + public static String FILE_OUTPUT = "file-output"; + + @Output(FILE_OUTPUT) + MessageChannel fileOutput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/LogSource.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/LogSource.java new file mode 100644 index 0000000..0c771a6 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/LogSource.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.source; + +import org.springframework.cloud.stream.annotation.Output; +import org.springframework.messaging.MessageChannel; + +/** + * @ClassName LogSource.java + * @Description 日志发送 + */ +public interface LogSource { + + public static String LOG_OUTPUT = "log-output"; + + @Output(LOG_OUTPUT) + MessageChannel logOutput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/SmsSource.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/SmsSource.java new file mode 100644 index 0000000..35ff07b --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/SmsSource.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.source; + +import org.springframework.cloud.stream.annotation.Output; +import org.springframework.messaging.MessageChannel; + +/** + * @ClassName SmsSource.java + * @Description 短信发送 + */ +public interface SmsSource { + + public static String SMS_OUTPUT = "sms-output"; + + @Output(SMS_OUTPUT) + MessageChannel smsOutput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/TradeSource.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/TradeSource.java new file mode 100644 index 0000000..ff4bc70 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/TradeSource.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.source; + +import org.springframework.cloud.stream.annotation.Output; +import org.springframework.messaging.MessageChannel; + +/** + * @ClassName SmsSource.java + * @Description 交易结果发送 + */ +public interface TradeSource { + + public static String TRADE_OUTPUT = "trade-output"; + + @Output(TRADE_OUTPUT) + MessageChannel tradeOutput(); +} diff --git a/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/WarrantySource.java b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/WarrantySource.java new file mode 100644 index 0000000..c2226d4 --- /dev/null +++ b/day02/sfbx-framework/framework-rabbitmq/src/main/java/com/itheima/sfbx/framework/rabbitmq/source/WarrantySource.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.framework.rabbitmq.source; + +import org.springframework.cloud.stream.annotation.Output; +import org.springframework.messaging.MessageChannel; + +/** + * @ClassName WarrantySource.java + * @Description 合同延迟发送 + */ +public interface WarrantySource { + + public static String WARRANTY_OUTPUT = "warranty-output"; + + @Output(WARRANTY_OUTPUT) + MessageChannel warrantyOutput(); +} diff --git a/day02/sfbx-framework/framework-redis/pom.xml b/day02/sfbx-framework/framework-redis/pom.xml new file mode 100644 index 0000000..aefd47d --- /dev/null +++ b/day02/sfbx-framework/framework-redis/pom.xml @@ -0,0 +1,37 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-redis + framework-redis + + + com.itheima.sfbx + framework-commons + + + org.springframework.boot + spring-boot-starter-cache + + + org.redisson + redisson-spring-boot-starter + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + + diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/CustomRedissonConfig.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/CustomRedissonConfig.java new file mode 100644 index 0000000..eeb77d3 --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/CustomRedissonConfig.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.framework.redis.config; + +import lombok.RequiredArgsConstructor; +import org.redisson.Redisson; +import org.redisson.api.RedissonClient; +import org.redisson.codec.JsonJacksonCodec; +import org.redisson.config.Config; +import org.redisson.config.SingleServerConfig; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.boot.autoconfigure.data.redis.RedisProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; +import org.springframework.core.annotation.Order; + +@Configuration +@RequiredArgsConstructor +@ConditionalOnClass(RedissonClient.class) +public class CustomRedissonConfig { + private final RedisProperties redisProperties; + @Bean( + destroyMethod = "shutdown" + ) + @Primary + public RedissonClient redisson() { + Config config = new Config(); + String prefix = "redis://"; + ((SingleServerConfig)config.useSingleServer() + .setAddress(prefix + this.redisProperties.getHost() + ":" + this.redisProperties.getPort())) + .setDatabase(this.redisProperties.getDatabase()) + .setPassword(this.redisProperties.getPassword()); + config.setCodec(JsonJacksonCodec.INSTANCE); + return Redisson.create(config); + } +} diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/RedisCacheConfig.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/RedisCacheConfig.java new file mode 100644 index 0000000..a512df9 --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/config/RedisCacheConfig.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.framework.redis.config; + +import com.itheima.sfbx.framework.redis.properties.DataSecurityCacheProperties; +import com.itheima.sfbx.framework.redis.resolver.CustomRedisCacheManager; +import com.itheima.sfbx.framework.redis.properties.TenantCacheProperties; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.cache.CacheManager; +import org.springframework.cache.annotation.EnableCaching; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.cache.CacheKeyPrefix; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer; +import org.springframework.data.redis.serializer.RedisSerializationContext; +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; + +import java.time.Duration; + +@Configuration +@EnableCaching +@EnableConfigurationProperties({TenantCacheProperties.class,DataSecurityCacheProperties.class}) +public class RedisCacheConfig { + + @Autowired + TenantCacheProperties tenantCacheProperties; + + @Autowired + DataSecurityCacheProperties dataSecurityCacheProperties; + + /** + * 修改spring-cache默认前缀为: + */ + @Bean + public CacheKeyPrefix cacheKeyPrefix() { + return cacheName -> cacheName + ":"; + } + + /** + * 申明缓存管理器,会创建一个切面(aspect)并触发Spring缓存注解的切点(pointcut) + * 根据类或者方法所使用的注解以及缓存的状态,这个切面会从缓存中获取数据, + * 将数据添加到缓存之中或者从缓存中移除某个值 + */ + @Bean + public CacheManager cacheManager(RedisConnectionFactory redisConnectionFactory) { + //对key的序列化操作:String + RedisSerializer keySerializer = new StringRedisSerializer(); + //对value的序列化操作:json + GenericJackson2JsonRedisSerializer valuesSerializer = new GenericJackson2JsonRedisSerializer(); + //配置config,指定超时时间记得key val 序列化处理 + RedisCacheConfiguration config = RedisCacheConfiguration.defaultCacheConfig() + .computePrefixWith(cacheKeyPrefix()) + //指定全局默认超时时间【600S】 + .entryTtl(Duration.ofSeconds(1)) + //配置key的序列化方式 + .serializeKeysWith(RedisSerializationContext.SerializationPair.fromSerializer(keySerializer)) + //配置value的序列化方式 + .serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(valuesSerializer)); + //关闭空值的存储 + //.disableCachingNullValues(); + //使用CustomRedisCacheManager进行初始化 + return new CustomRedisCacheManager(redisConnectionFactory, config, tenantCacheProperties,dataSecurityCacheProperties); + } +} diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/DataSecurityCacheProperties.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/DataSecurityCacheProperties.java new file mode 100644 index 0000000..e9178c7 --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/DataSecurityCacheProperties.java @@ -0,0 +1,21 @@ +package com.itheima.sfbx.framework.redis.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.util.List; + +/** + * @ClassName TenantProperties.java + * @Description spring-cache多租户属性 + */ +@Data +@NoArgsConstructor +@ConfigurationProperties(prefix = "spring.cache") +public class DataSecurityCacheProperties { + + //需要忽略的数据权限的表 + public List ignoreDataSecurityTables; + +} diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/TenantCacheProperties.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/TenantCacheProperties.java new file mode 100644 index 0000000..20a6cd5 --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/properties/TenantCacheProperties.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.redis.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.boot.context.properties.ConstructorBinding; + +import java.util.List; + +/** + * @ClassName TenantProperties.java + * @Description spring-cache多租户属性 + */ +@Data +@NoArgsConstructor +@ConfigurationProperties(prefix = "spring.cache") +public class TenantCacheProperties { + + //需要忽略的企业ID的表 + public List ignoreCompanyTables; + + //默认企业编号Id + public String defaultCompanyNo; + +} diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCache.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCache.java new file mode 100644 index 0000000..10b131f --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCache.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.framework.redis.resolver; + +import org.springframework.core.convert.ConversionService; +import org.springframework.data.redis.cache.RedisCache; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.cache.RedisCacheWriter; + +/** + * @ClassName CustomRedisCache.java + * @Description redis缓存自定义处理 + */ +public class CustomRedisCache extends RedisCache { + private final String name; + private final RedisCacheWriter cacheWriter; + private final ConversionService conversionService; + + protected CustomRedisCache(String name, RedisCacheWriter cacheWriter, RedisCacheConfiguration cacheConfig) { + super(name, cacheWriter, cacheConfig); + this.name = name; + this.cacheWriter = cacheWriter; + this.conversionService = cacheConfig.getConversionService(); + } + + /** + * + * @Title: evict + * @Description: 重写删除的方法 + * @param @param key + * @throws + * + */ + @Override + public void evict(Object key) { + + if (key instanceof String) { + String keyString = key.toString(); + // 后缀删除 + if (keyString.endsWith("*")) { + evictLikeSuffix(keyString); + return; + } + } + // 删除指定的key + super.evict(key); + } + + /** + * 后缀匹配匹配 + * + * @param key + */ + private void evictLikeSuffix(String key) { + byte[] pattern = this.conversionService.convert(this.createCacheKey(key), byte[].class); + this.cacheWriter.clean(this.name, pattern); + } +} diff --git a/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCacheManager.java b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCacheManager.java new file mode 100644 index 0000000..027e767 --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/java/com/itheima/sfbx/framework/redis/resolver/CustomRedisCacheManager.java @@ -0,0 +1,152 @@ +package com.itheima.sfbx.framework.redis.resolver; + +import com.itheima.sfbx.framework.commons.dto.security.DataSecurityVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.framework.redis.properties.DataSecurityCacheProperties; +import com.itheima.sfbx.framework.redis.properties.TenantCacheProperties; +import org.springframework.cache.Cache; +import org.springframework.data.redis.cache.RedisCache; +import org.springframework.data.redis.cache.RedisCacheConfiguration; +import org.springframework.data.redis.cache.RedisCacheManager; +import org.springframework.data.redis.cache.RedisCacheWriter; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.lang.Nullable; + +import java.time.Duration; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName CustomCacheManager.java + * @Description 自定义缓存管理者 + */ +public class CustomRedisCacheManager extends RedisCacheManager { + + private final RedisCacheWriter cacheWriter; + private final RedisCacheConfiguration defaultCacheConfig; + private TenantCacheProperties tenantCacheProperties; + private DataSecurityCacheProperties dataSecurityCacheProperties; + + public CustomRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration) { + super(cacheWriter, defaultCacheConfiguration); + this.cacheWriter = cacheWriter; + this.defaultCacheConfig = defaultCacheConfiguration; + } + + public CustomRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration, String... initialCacheNames) { + super(cacheWriter, defaultCacheConfiguration, initialCacheNames); + this.cacheWriter = cacheWriter; + this.defaultCacheConfig = defaultCacheConfiguration; + } + + public CustomRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration, boolean allowInFlightCacheCreation, String... initialCacheNames) { + super(cacheWriter, defaultCacheConfiguration, allowInFlightCacheCreation, initialCacheNames); + this.cacheWriter = cacheWriter; + this.defaultCacheConfig = defaultCacheConfiguration; + } + + public CustomRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration, Map initialCacheConfigurations) { + super(cacheWriter, defaultCacheConfiguration, initialCacheConfigurations); + this.cacheWriter = cacheWriter; + this.defaultCacheConfig = defaultCacheConfiguration; + } + + public CustomRedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration, Map initialCacheConfigurations, boolean allowInFlightCacheCreation) { + super(cacheWriter, defaultCacheConfiguration, initialCacheConfigurations, allowInFlightCacheCreation); + this.cacheWriter = cacheWriter; + this.defaultCacheConfig = defaultCacheConfiguration; + } + + public CustomRedisCacheManager(RedisConnectionFactory redisConnectionFactory, RedisCacheConfiguration cacheConfiguration, TenantCacheProperties tenantCacheProperties, DataSecurityCacheProperties dataSecurityCacheProperties) { + this(RedisCacheWriter.nonLockingRedisCacheWriter(redisConnectionFactory),cacheConfiguration); + this.tenantCacheProperties =tenantCacheProperties; + this.dataSecurityCacheProperties=dataSecurityCacheProperties; + } + + /** + * 覆盖父类创建RedisCache,采用自定义的RedisCacheResolver + * @Title: createRedisCache + * @Description: TODO + * @param @param name + * @param @param cacheConfig + * @param @return + * @throws + * + */ + @Override + protected RedisCache createRedisCache(String name, @Nullable RedisCacheConfiguration cacheConfig) { + //自定义缓存时间例如 + //@Cacheable(value = DataDictCacheConstant.PARENT_KEY+"=-1",key = "#parentKey") + String[] split = name.split("&"); + if (split.length==1){ + name=split[0]; + }else if (split.length==2){ + name=split[0]; + long ttl = Long.valueOf(split[1].replaceAll("ttl=","")); + cacheConfig = cacheConfig.entryTtl(Duration.ofSeconds(ttl)); + }else { + throw new RuntimeException("自定义缓存失效时间异常"); + } + return new CustomRedisCache(name, cacheWriter, cacheConfig != null ? cacheConfig : defaultCacheConfig); + } + + /** + * 从上下文中获取租户ID,重写key值添加多租户模式 + * @param name + * @return + */ + @Override + public Cache getCache(String name) { + //多租户及数据权限缓存key处理 + String companyNo = SubjectContent.getCompanyNo(); + String dataSecurity = null; + DataSecurityVO dataSecurityVO = SubjectContent.getDataSecurityVO(); + //查看个人数据 + if (!EmptyUtil.isNullOrEmpty(dataSecurityVO)&&dataSecurityVO.getYouselfData()){ + dataSecurity = String.valueOf(SubjectContent.getUserVO().getId().hashCode()); + } + //查看授权数据 + if (!EmptyUtil.isNullOrEmpty(dataSecurityVO)&&!dataSecurityVO.getYouselfData()){ + dataSecurity = dataSecurity+":"+SubjectContent.getUserVO().getDataSecurityVO().hashCode(); + } + String[] nameTime = name.split("&"); + String targetTab = "tab_"+name.split(":")[0].replace("-","_"); + if (!EmptyUtil.isNullOrEmpty(companyNo)&& + !tenantCacheProperties.getDefaultCompanyNo().equals(companyNo)){ + boolean isIgnoreCompanyNo = false; + if (!EmptyUtil.isNullOrEmpty(tenantCacheProperties.getIgnoreCompanyTables())){ + isIgnoreCompanyNo = !tenantCacheProperties.getIgnoreCompanyTables().contains(targetTab); + } + if (isIgnoreCompanyNo){ + nameTime[0] = nameTime[0]+":"+companyNo; + } + } + boolean isIgnoreDataSecurity = false; + if (!EmptyUtil.isNullOrEmpty(dataSecurityCacheProperties.getIgnoreDataSecurityTables())){ + isIgnoreDataSecurity = !dataSecurityCacheProperties.getIgnoreDataSecurityTables().contains(targetTab); + } + if (isIgnoreDataSecurity){ + nameTime[0] = nameTime[0]+":"+dataSecurity; + } + if (nameTime.length==2){ + name = nameTime[0]+"&"+nameTime[1]; + }else{ + name = nameTime[0]; + } + //默认企业则不做缓存租户处理 + return super.getCache(name); + } + + @Override + public Map getCacheConfigurations() { + Map configurationMap = new HashMap<>(getCacheNames().size()); + getCacheNames().forEach(it -> { + RedisCache cache = CustomRedisCache.class.cast(lookupCache(it)); + configurationMap.put(it, cache != null ? cache.getCacheConfiguration() : null); + }); + return Collections.unmodifiableMap(configurationMap); + } +} + diff --git a/day02/sfbx-framework/framework-redis/src/main/resources/META-INF/spring.factories b/day02/sfbx-framework/framework-redis/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..4bf1d3e --- /dev/null +++ b/day02/sfbx-framework/framework-redis/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itheima.sfbx.framework.redis.config.CustomRedissonConfig \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/dsl/RuleLexer.g4 b/day02/sfbx-framework/framework-rule-base/dsl/RuleLexer.g4 new file mode 100644 index 0000000..bc6e159 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/dsl/RuleLexer.g4 @@ -0,0 +1,184 @@ +lexer grammar RuleLexer; + +COUNT : 'count'; + +AVG : 'avg'; + +SUM : 'sum'; + +MAX : 'max'; + +MIN : 'min'; + +AND : 'and'|'&&'|','|'\u5e76\u4e14'|'\u4e14'; +OR : 'or'|'||'|'\u6216\u8005'|'\u6216'; + +Datatype : 'String' + | 'int' + | 'Integer' + | 'double' + | 'Double' + | 'long' + | 'Long' + | 'float' + | 'Float' + | 'BigDecimal' + | 'boolean' + | 'Boolean' + | 'Date' + | 'List' + | 'Set' + | 'Map' + | 'Enum' + | 'Object' + ; + +GreaterThen : '>'|'\u5927\u4e8e'; + +GreaterThenOrEquals : '>='|'\u5927\u4e8e\u7b49\u4e8e'; + +LessThen : '<'|'\u5c0f\u4e8e'; + +LessThenOrEquals : '<='|'\u5c0f\u4e8e\u7b49\u4e8e'; + +Equals : '=='|'\u7b49\u4e8e'; + +NotEquals : '!='|'\u4e0d\u7b49\u4e8e'; + +EndWith : 'EndWith'|'\u7ed3\u675f\u4e8e'; + +NotEndWith : 'NotEndWith'|'\u4e0d\u7ed3\u675f\u4e8e' ; + +StartWith : 'StartWith'|'\u5f00\u59cb\u4e8e'; + +NotStartWith : 'NotStartWith'|'\u4e0d\u5f00\u59cb\u4e8e'; + +In : 'In'|'\u5728\u96c6\u5408\u4e2d'; + +NotIn : 'NotIn'|'\u4e0d\u5728\u96c6\u5408\u4e2d'; + +Match : 'Match'|'\u5339\u914d'; + +NotMatch : 'NotMatch'|'\u4e0d\u5339\u914d'; + +EqualsIgnoreCase : 'EqualsIgnoreCase'|'\u5ffd\u7565\u5927\u5c0f\u5199\u7b49\u4e8e'; + +NotEqualsIgnoreCase : 'NotEqualsIgnoreCase'|'\u5ffd\u7565\u5927\u5c0f\u5199\u4e0d\u7b49\u4e8e'; + +ARITH +: + '+' + | '-' + | '*' + | '/' + | '%' +; + +NUMBER +: + '-'? INT '.' INT EXP? // ('-'? INT '.' INT EXP?)1.35, 1.35E-9, 0.3, -4.5 + | '-'? INT EXP // 1e10 -3e4 + | '-'? INT // -3, 45 +; + +Boolean : 'true' + | 'false' + ; + +Identifier +: + StartChar Char* +; + +STRING : + '"' STRING_CONTENT '"' +; + + +fragment +STRING_CONTENT : + ( EscapeSequence | ~('"'))* +; + + +fragment +INT +: + DIGIT+ +; + +fragment +EXP +: + [Ee] [+\-]? INT +; // \- since - means "range" inside [...] + +fragment +EscapeSequence + : '\\' ('b'|'t'|'n'|'f'|'r'|'\"'|'\''|'\\') + | UnicodeEscape + | OctalEscape + ; + +fragment +OctalEscape + : '\\' ('0'..'3') ('0'..'7') ('0'..'7') + | '\\' ('0'..'7') ('0'..'7') + | '\\' ('0'..'7') + ; + +fragment +UnicodeEscape +: + '\\' 'u' HEX HEX HEX HEX +; + +fragment +Char : StartChar + | '-' | '_' | DIGIT + | '\u00B7' + | '\u0300'..'\u036F' + | '\u203F'..'\u2040' + ; + +fragment +StartChar + : [a-zA-Z] + | '\u2070'..'\u218F' + | '\u2C00'..'\u2FEF' + | '\u3001'..'\uD7FF' + | '\uF900'..'\uFDCF' + | '\uFDF0'..'\uFFFD' + ; + +fragment +DIGIT +: + [0-9] +; + +fragment +HEX +: + [0-9a-fA-F] +; + +WS +: + [ \t\r\n]+ -> channel(HIDDEN) +; + +NL +: + '\r'? '\n' ->channel(HIDDEN) +; + + +COMMENT + : '/*' .*? '*/' ->channel(HIDDEN); + +LINE_COMMENT + : '//' ~[\r\n]* '\r'? '\n' ->channel(HIDDEN) + ; + + diff --git a/day02/sfbx-framework/framework-rule-base/dsl/RuleParser.g4 b/day02/sfbx-framework/framework-rule-base/dsl/RuleParser.g4 new file mode 100644 index 0000000..265407f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/dsl/RuleParser.g4 @@ -0,0 +1,255 @@ +grammar RuleParser; + +import RuleLexer; + +ruleSet : ruleSetHeader + ruleSetBody + ; + +ruleSetHeader : resource* + | functionImport* + | resource* functionImport* + | functionImport* resource* + ; + +ruleSetBody : rules* ; + +rules : ruleDef | loopRuleDef ; + +functionImport : 'import' packageDef';'?; + +packageDef : Identifier + | Identifier('.'Identifier)+ + | packageDef'.*'; + +resource : importVariableLibrary + | importActionLibrary + | importConstantLibrary + | importParameterLibrary + ; + +importParameterLibrary : 'importParameterLibrary' STRING ';'?; + +importVariableLibrary : 'importVariableLibrary' STRING ';'?; + +importConstantLibrary : 'importConstantLibrary' STRING ';'?; + +importActionLibrary : 'importActionLibrary' STRING ';'?; + +functionDef : 'function' Identifier '(' functionParameters? ')' '{' expressionBody '}'';'?; + +functionParameters : functionParameter (','functionParameter)* ; + +functionParameter : Datatype Identifier ; + +ruleDef : ('rule'|'\u89c4\u5219') STRING + attribute* + left + right + other? + ('end'|'\u7ed3\u675f') ';'? + ; + +loopRuleDef : ('loopRule' | '\u5faa\u73af\u89c4\u5219') STRING + attribute* + loopTarget + loopStart? + left + right + other? + loopEnd? + ('end'|'\u7ed3\u675f') ';'? + ; + +loopTarget : ('loopTarget' | '\u5faa\u73af\u5bf9\u8c61') complexValue ; + +loopStart : ('loopStart' | '\u5f00\u59cb\u524d\u52a8\u4f5c') action* ; + +loopEnd : ('loopEnd' | '\u7ed3\u675f\u540e\u52a8\u4f5c') action*; + + +attribute :loopAttribute + | salienceAttribute + | effectiveDateAttribute + | expiresDateAttribute + | enabledAttribute + | debugAttribute + | activationGroupAttribute + | agendaGroupAttribute + | autoFocusAttribute + | ruleflowGroupAttribute + ; + +loopAttribute : ('loop' | '\u5141\u8bb8\u5faa\u73af\u89e6\u53d1') '=' Boolean ','?; +salienceAttribute : ('salience' | '\u4f18\u5148\u7ea7') '=' NUMBER ','?; +effectiveDateAttribute : ('effective-date' | '\u751f\u6548\u65f6\u95f4' | '\u751f\u6548\u65e5\u671f') '=' STRING ','?; +expiresDateAttribute : ('expires-date' | '\u5931\u6548\u65f6\u95f4' | '\u5931\u6548\u65e5\u671f') '=' STRING ','?; +enabledAttribute : ('enabled' | '\u6fc0\u6d3b' | '\u542f\u7528') '=' Boolean ','?; +debugAttribute : ('debug' | '\u8c03\u8bd5' | '\u5141\u8bb8\u8c03\u8bd5') '=' Boolean ','?; +activationGroupAttribute : ('activation-group' | '\u6fc0\u6d3b\u7ec4') '=' STRING ','? ; +agendaGroupAttribute : ('agenda-group' | '\u8bae\u7a0b\u7ec4') '=' STRING ','? ; +autoFocusAttribute : ('auto-focus' | '\u81ea\u52a8\u83b7\u53d6\u7126\u70b9') '=' Boolean ','?; +ruleflowGroupAttribute : ('ruleflow-group' | '\u89c4\u5219\u6d41\u7ec4') '=' STRING ','?; + +left : + ('if'|'\u5982\u679c') + condition? + ; + + +condition : leftParen condition rightParen #parenConditions + | condition (join condition)+ #multiConditions + | conditionLeft op (complexValue|nullValue) #singleCondition + | namedConditionSet #singleNamedConditionSet + ; + +namedConditionSet : (refName colon)? refObject leftParen namedCondition rightParen; + +namedCondition : leftParen namedCondition rightParen #parenNamedConditions + | namedCondition (join namedCondition)+ #multiNamedConditions + | property op (complexValue|nullValue) #singleNamedConditions + ; + + +decisionTableCellCondition : op (complexValue|nullValue) #singleCellCondition + | decisionTableCellCondition (join decisionTableCellCondition)+ #multiCellConditions + | leftParen decisionTableCellCondition rightParen #parenCellConditions + ; + +refName : Identifier ; + +refObject : variableCategory | parameterName ; + + +nullValue : 'null'; + +conditionLeft : (variable|parameter|functionInvoke|methodInvoke|expEval|expAll|expExists|expCollect|commonFunction) (ARITH value)* ; + +expEval : 'eval'leftParen expressionBody rightParen; + +expAll : 'all'leftParen + (variable|parameter) + ',' exprCondition + (',' (NUMBER|percent))? + rightParen; + +expExists : 'exist'leftParen + (variable|parameter) + ',' exprCondition + (',' (NUMBER|percent))? + rightParen; + +expCollect : 'collect'leftParen + (variable|parameter) + (',' exprCondition)? + rightParen + '.' + ( COUNT | property'.'(SUM|AVG|MAX|MIN)) + ; + +commonFunction : Identifier leftParen complexValue(','property)? rightParen ; + + +exprCondition : property op (complexValue|nullValue) + | exprCondition (join exprCondition)+ + ; + +expressionBody : .*? ; + +percent : NUMBER'%'; + +leftParen : '('; + +rightParen : ')'; + +colon : ':'; + + +join : + AND + | OR + ; + +right : ('then'|'\u90a3\u4e48') + action* + ; +other : ('else'|'\u5426\u5219') + action* + ; + +actions : action*; + +action : assignAction ';'? + | outAction ';'? + | methodInvoke ';'? + | functionInvoke ';'? + | commonFunction ';'? + ; + +assignAction : (variable|namedVariable|parameter) '=' complexValue; + +outAction : 'out''(' complexValue ')'; + +methodInvoke : beanMethod'('actionParameters?')'; + +functionInvoke : '@'Identifier'(' actionParameters? ')'; + +actionParameters : complexValue (',' complexValue)* ; + +beanMethod : Identifier'.'Identifier ; + +complexValue : value + | variable + | namedVariable + | constant + | variableCategory + | parameter + | methodInvoke + | functionInvoke + | commonFunction + | leftParen complexValue rightParen + | complexValue (ARITH complexValue)+ + ; + +parameter : parameterName'.'Identifier; + +parameterName : 'parameter'|'\u53c2\u6570' ; + +constant : constantCategory'.'property; + +variable : variableCategory'.'property; + +namedVariable : namedVariableCategory'.'property; + +property : Identifier('.'Identifier)*; + +variableCategory : Identifier; + +namedVariableCategory : '!'Identifier; + +constantCategory : '$'Identifier; + +value : + STRING + | NUMBER + | Boolean + ; +op +: + GreaterThen + | GreaterThenOrEquals + | LessThen + | LessThenOrEquals + | Equals + | NotEquals + | EndWith + | NotEndWith + | StartWith + | NotStartWith + | In + | NotIn + | Match + | NotMatch + | EqualsIgnoreCase + | NotEqualsIgnoreCase +; diff --git a/day02/sfbx-framework/framework-rule-base/pom.xml b/day02/sfbx-framework/framework-rule-base/pom.xml new file mode 100644 index 0000000..5dcd92f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/pom.xml @@ -0,0 +1,173 @@ + + + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + 4.0.0 + + framework-rule-base + + + + org.antlr + antlr4-runtime + 4.5 + + + commons-lang + commons-lang + 2.6 + + + dom4j + dom4j + 1.6.1 + + + commons-beanutils + commons-beanutils + 1.8.3 + + + commons-logging + commons-logging + + + + + org.codehaus.jackson + jackson-mapper-asl + 1.9.11 + + + commons-io + commons-io + 2.4 + + + javax.servlet + javax.servlet-api + provided + + + org.springframework.boot + spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-logging + + + + + org.springframework.boot + spring-boot-starter-log4j2 + + + com.alibaba + fastjson + 1.2.45 + + + cn.hutool + hutool-all + + + + + + + src/main/resources + + **/*.xml + **/*.xsd + **/*.schemas + **/*.handlers + **/*.properties + **/*.png + **/*.jpg + **/*.gif + **/*.css + **/*.map + **/*.js + **/*.swf + **/*.swz + **/*.html + **/*.jsp + **/*.txt + **/*.eot + **/*.svg + **/*.ttf + **/*.woff + **/*.woff2 + **/*.md + + + + src/main/java + + **/*.xml + **/*.xsd + **/*.schemas + **/*.handlers + **/*.properties + **/*.png + **/*.jpg + **/*.gif + **/*.css + **/*.map + **/*.js + **/*.html + **/*.jsp + **/*.txt + **/*.eot + **/*.svg + **/*.ttf + **/*.woff + **/*.woff2 + **/*.md + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + 11 + 11 + utf-8 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://oss.sonatype.org/ + true + + + + + + diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/ClassUtils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/ClassUtils.java new file mode 100644 index 0000000..5c600f7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/ClassUtils.java @@ -0,0 +1,184 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +import com.itheima.sfbx.framework.rule.model.Label; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.variable.Act; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import org.apache.commons.io.IOUtils; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.XMLWriter; + +import java.beans.BeanInfo; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2016年6月2日 + */ +public class ClassUtils { + public static void classToXml(Class cls,File file){ + if(!file.exists()){ + try { + file.createNewFile(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + OutputStream out=null; + try{ + out=new FileOutputStream(file); + List variables=classToVariables(cls); + StringBuffer sb=new StringBuffer(); + sb.append(""); + for(Variable var:variables){ + sb.append(""); + sb.append(""); + } + sb.append(""); + Document doc=DocumentHelper.parseText(sb.toString()); + OutputFormat format=OutputFormat.createPrettyPrint(); + format.setEncoding("utf-8"); + XMLWriter writer=new XMLWriter(out,format); + writer.write(doc); + writer.close(); + out.close(); + }catch(Exception ex){ + throw new RuntimeException(ex); + }finally{ + IOUtils.closeQuietly(out); + } + } + public static List classToVariables(Class cls){ + try { + List result = paserClass("",cls, new ArrayList>()); + return result; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private static List paserClass(String path,Class cls, Collection> parsed) throws Exception{ + List variables=new ArrayList(); + BeanInfo beanInfo=Introspector.getBeanInfo(cls,Object.class); + PropertyDescriptor[] pds= beanInfo.getPropertyDescriptors(); + + if(pds!=null && !parsed.contains(cls)){ + parsed.add(cls); + for(PropertyDescriptor pd:pds){ + Variable variable=new Variable(); + Class type=pd.getPropertyType(); + Datatype dataType=getDateType(type); + String propertyName=pd.getName(); + String label=getPropertyAnnotationLabel(cls, propertyName); + String name=path+pd.getName(); + variable.setName(name); + variable.setLabel(label==null?name:label); + variable.setType(dataType); + variable.setAct(Act.InOut); + if(Datatype.Object.equals(dataType)){ + variables.addAll(paserClass(path+pd.getName()+".",type, parsed)); + }else{ + variables.add(variable); + } + } + } + return variables; + } + + private static String getPropertyAnnotationLabel(Class cls,String fieldName) throws Exception{ + Field field = null; + while(field==null){ + try{ + field=cls.getDeclaredField(fieldName); + }catch(NoSuchFieldException ex){ + if(cls==Object.class){ + throw ex; + } + cls=cls.getSuperclass(); + } + } + Label pd=field.getAnnotation(Label.class); + if(pd!=null){ + return pd.value(); + } + return null; + } + + private static Datatype getDateType(Class type){ + if(String.class.isAssignableFrom(type)){ + return Datatype.String; + }else if(Boolean.class.isAssignableFrom(type) + ||boolean.class.isAssignableFrom(type)){ + return Datatype.Boolean; + }else if(Integer.class.isAssignableFrom(type) + ||int.class.isAssignableFrom(type)){ + return Datatype.Integer; + }else if(Float.class.isAssignableFrom(type) + ||float.class.isAssignableFrom(type)){ + return Datatype.Float; + }else if(Long.class.isAssignableFrom(type) + ||long.class.isAssignableFrom(type)){ + return Datatype.Long; + }else if(BigDecimal.class.isAssignableFrom(type)){ + return Datatype.BigDecimal; + }else if(Double.class.isAssignableFrom(type) + ||double.class.isAssignableFrom(type)){ + return Datatype.Double; + }else if(Date.class.isAssignableFrom(type)){ + return Datatype.Date; + }else if(Date.class.isAssignableFrom(type)){ + return Datatype.Date; + }else if(List.class.isAssignableFrom(type)){ + return Datatype.List; + }else if(Map.class.isAssignableFrom(type)){ + return Datatype.Map; + }else if(Set.class.isAssignableFrom(type)){ + return Datatype.Set; + }else if(Enum.class.isAssignableFrom(type)){ + return Datatype.Enum; + }else if(Character.class.isAssignableFrom(type) || char.class.isAssignableFrom(type)){ + return Datatype.Char; + }else{ + return Datatype.Object; + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Configure.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Configure.java new file mode 100644 index 0000000..1cf2b35 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Configure.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +import org.apache.commons.lang.StringUtils; + +/** + * @author Jacky.gao + * @since 2015年2月16日 + */ +public class Configure { + private static String dateFormat; + private static String tempStorePath; + public void setDateFormat(String dateFormat) { + if(StringUtils.isEmpty(dateFormat) || dateFormat.equals("${urule.dateFormat}")){ + Configure.dateFormat = "yyyy-MM-dd HH:mm:ss"; + }else{ + Configure.dateFormat = dateFormat; + } + } + public void setTempStorePath(String tempStorePath) { + if(!tempStorePath.equals("${urule.tempStorePath}")){ + Configure.tempStorePath = tempStorePath; + } + } + public static String getTempStorePath() { + return tempStorePath; + } + public static String getDateFormat() { + return dateFormat; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/KnowledgePackageReceiverServlet.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/KnowledgePackageReceiverServlet.java new file mode 100644 index 0000000..c7a94d8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/KnowledgePackageReceiverServlet.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.cache.CacheUtils; +import org.apache.commons.lang.StringUtils; +import org.codehaus.jackson.map.ObjectMapper; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.io.PrintWriter; +import java.net.URLDecoder; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2016年2月27日 + */ +public class KnowledgePackageReceiverServlet extends HttpServlet { + private static final long serialVersionUID = -4342175088856372588L; + public static final String URL="/knowledgepackagereceiver"; + + @Override + public void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String packageId=req.getParameter("packageId"); + if(StringUtils.isEmpty(packageId)){ + return; + } + packageId=URLDecoder.decode(packageId, "utf-8"); + if(packageId.startsWith("/")){ + packageId=packageId.substring(1,packageId.length()); + } + String content=req.getParameter("content"); + if(StringUtils.isEmpty(content)){ + return; + } + content=URLDecoder.decode(content, "utf-8"); + ObjectMapper mapper=new ObjectMapper(); + mapper.getDeserializationConfig().withDateFormat(new SimpleDateFormat(Configure.getDateFormat())); + KnowledgePackageWrapper wrapper=mapper.readValue(content, KnowledgePackageWrapper.class); + wrapper.buildDeserialize(); + KnowledgePackage knowledgePackage=wrapper.getKnowledgePackage(); + Map flowMap=knowledgePackage.getFlowMap(); + if(flowMap!=null && flowMap.size()>0){ + for(FlowDefinition fd:flowMap.values()){ + fd.buildConnectionToNode(); + } + } + CacheUtils.getKnowledgeCache().putKnowledge(packageId, knowledgePackage); + SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + System.out.println("["+sd.format(new Date())+"] "+"Successfully receive the server side to pushed package:"+packageId); + resp.setContentType("text/plain"); + PrintWriter pw=resp.getWriter(); + pw.write("ok"); + pw.flush(); + pw.close(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/RuleException.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/RuleException.java new file mode 100644 index 0000000..042e3dc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/RuleException.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +/** + * @author Jacky.gao + * @since 2014年11月29日 + */ +public class RuleException extends RuntimeException { + private static final long serialVersionUID = -8624533394127244753L; + public RuleException(){ + } + public RuleException(String msg){ + super(msg); + } + public RuleException(Exception ex){ + super(ex); + ex.printStackTrace(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Splash.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Splash.java new file mode 100644 index 0000000..8009776 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Splash.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +/** + * @author Jacky.gao + * @since 2017年8月28日 + */ +public class Splash { + public void print(){ + StringBuilder sb=new StringBuilder(); + sb.append("\n"); + sb.append(". 四方保险规则引擎启动\n"); + sb.append("....................................................................................................."); + sb.append("\n"); + System.out.println(sb.toString()); + } + public static void main(String[] args) { + Splash s=new Splash(); + s.print(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/URulePropertyPlaceholderConfigurer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/URulePropertyPlaceholderConfigurer.java new file mode 100644 index 0000000..7bb4bcc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/URulePropertyPlaceholderConfigurer.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; + +/** + * @author Jacky.gao + * @since 2016年5月25日 + */ +public class URulePropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer { + public URulePropertyPlaceholderConfigurer() { + setIgnoreUnresolvablePlaceholders(true); + setOrder(100); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Utils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Utils.java new file mode 100644 index 0000000..d5d9654 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/Utils.java @@ -0,0 +1,221 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule; + +import com.itheima.sfbx.framework.rule.debug.DebugWriter; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import org.apache.commons.beanutils.BeanUtils; +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.io.UnsupportedEncodingException; +import java.math.BigDecimal; +import java.net.URLDecoder; +import java.net.URLEncoder; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class Utils implements ApplicationContextAware{ + private static boolean debug; + private static boolean debugToFile; + private static ApplicationContext applicationContext; + private static Collection debugWriters; + private static Map functionDescriptorMap=new HashMap(); + private static Map functionDescriptorLabelMap=new HashMap(); + public static ApplicationContext getApplicationContext() { + return applicationContext; + } + + public static String decodeURL(String str){ + if(StringUtils.isBlank(str)){ + return str; + } + try { + return URLDecoder.decode(URLDecoder.decode(str,"utf-8"),"utf-8"); + } catch (UnsupportedEncodingException e) { + throw new RuleException(e); + } + } + + public static String encodeURL(String str){ + if(StringUtils.isBlank(str)){ + return str; + } + try { + return URLEncoder.encode(str,"utf-8"); + } catch (UnsupportedEncodingException e) { + throw new RuleException(e); + } + } + + public static String toUTF8(String text){ + try{ + if (text == null) { + return null; + } + byte[] fileBytes=text.getBytes("iso8859-1"); + boolean isiso=text.equals(new String(fileBytes, "iso8859-1")); + if(isiso){ + text=new String(fileBytes,"utf-8"); + } + isiso=text.equals(new String(text.getBytes("iso8859-1"), "iso8859-1")); + if(isiso){ + text=new String(fileBytes,"utf-8"); + } + return text; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public static Object getObjectProperty(Object object,String property){ + try { + return PropertyUtils.getProperty(object, property); + } catch (Exception e) { + throw new RuleException(e); + } + } + public static void setObjectProperty(Object object,String property,Object value){ + try { + BeanUtils.setProperty(object, property, value); + } catch (Exception e) { + throw new RuleException(e); + } + } + + public static Datatype getDatatype(Object obj){ + Datatype datatype=null; + if(obj==null){ + datatype=Datatype.Object; + }else{ + if(obj instanceof Integer){ + datatype=Datatype.Integer; + }else if(obj instanceof Long){ + datatype=Datatype.Long; + }else if(obj instanceof Double){ + datatype=Datatype.Double; + }else if(obj instanceof Float){ + datatype=Datatype.Float; + }else if(obj instanceof BigDecimal){ + datatype=Datatype.BigDecimal; + }else if(obj instanceof Boolean){ + datatype=Datatype.Boolean; + }else if(obj instanceof Date){ + datatype=Datatype.Date; + }else if(obj instanceof List){ + datatype=Datatype.List; + }else if(obj instanceof Set){ + datatype=Datatype.Set; + }else if(obj instanceof Enum){ + datatype=Datatype.Enum; + }else if(obj instanceof Map){ + datatype=Datatype.Map; + }else if(obj instanceof String){ + datatype=Datatype.String; + }else if(obj instanceof Character){ + datatype=Datatype.Char; + }else{ + datatype=Datatype.Object; + } + } + return datatype; + } + + public static BigDecimal toBigDecimal(Object val) { + try{ + if (val instanceof BigDecimal) { + return (BigDecimal) val; + } else if (val == null) { + throw new IllegalArgumentException("Null can not to BigDecimal."); + } else if (val instanceof String) { + String str = (String) val; + if ("".equals(str.trim())) { + return BigDecimal.valueOf(0); + } + str=str.trim(); + return new BigDecimal(str); + } else if (val instanceof Number) { + return new BigDecimal(val.toString()); + } else if (val instanceof Character) { + int i = ((Character) val).charValue(); + return new BigDecimal(i); + } + }catch(Exception ex){ + throw new NumberFormatException("Can not convert "+val+" to number."); + } + + throw new IllegalArgumentException(val.getClass().getName()+" can not to BigDecimal."); + } + + public static FunctionDescriptor findFunctionDescriptor(String functionName){ + if(!functionDescriptorMap.containsKey(functionName)){ + throw new RuleException("Function["+functionName+"] not exist."); + } + return functionDescriptorMap.get(functionName); + } + + public static Map getFunctionDescriptorLabelMap() { + return functionDescriptorLabelMap; + } + public static Map getFunctionDescriptorMap() { + return functionDescriptorMap; + } + + public void setDebug(boolean debug) { + Utils.debug = debug; + } + + public void setDebugToFile(boolean debugToFile) { + Utils.debugToFile = debugToFile; + } + + public static boolean isDebugToFile() { + return debugToFile; + } + + public static boolean isDebug() { + return debug; + } + + public static Collection getDebugWriters() { + return debugWriters; + } + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + functionDescriptorMap.clear(); + functionDescriptorLabelMap.clear(); + Collection functionDescriptors=applicationContext.getBeansOfType(FunctionDescriptor.class).values(); + for(FunctionDescriptor fun:functionDescriptors){ + if(fun.isDisabled()){ + continue; + } + if(functionDescriptorMap.containsKey(fun.getName())){ + throw new RuntimeException("Duplicate function ["+fun.getName()+"]"); + } + functionDescriptorMap.put(fun.getName(), fun); + functionDescriptorLabelMap.put(fun.getLabel(), fun); + } + debugWriters=applicationContext.getBeansOfType(DebugWriter.class).values(); + Utils.applicationContext=applicationContext; + new Splash().print(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/AbstractAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/AbstractAction.java new file mode 100644 index 0000000..d4992f3 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/AbstractAction.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + + +/** + * @author Jacky.gao + * @since 2015年4月8日 + */ +public abstract class AbstractAction implements Action { + private int priority; + protected boolean debug; + @Override + public int compareTo(Action o) { + return o.getPriority()-priority; + } + @Override + public int getPriority() { + return priority; + } + + @Override + public void setDebug(boolean debug) { + this.debug=debug; + } + public void setPriority(int priority) { + this.priority = priority; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/Action.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/Action.java new file mode 100644 index 0000000..962bda6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/Action.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.runtime.rete.Context; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public interface Action extends Comparable{ + ActionValue execute(Context context, Object matchedObject, List allMatchedObjects, Map variableMap); + ActionType getActionType(); + int getPriority(); + void setDebug(boolean debug); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionId.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionId.java new file mode 100644 index 0000000..4bcd6f3 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionId.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Jacky.gao + * @since 2015年3月27日 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ActionId { + public String value(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionType.java new file mode 100644 index 0000000..b3aa238 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public enum ActionType { + ConsolePrint,ExecuteMethod,VariableAssign,ExecuteCommonFunction,Scoring; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValue.java new file mode 100644 index 0000000..5669af5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValue.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public interface ActionValue { + String getActionId(); + Object getValue(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValueImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValueImpl.java new file mode 100644 index 0000000..bf13b8e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ActionValueImpl.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; +/** + * @author Jacky.gao + * @since 2015年3月27日 + */ +public class ActionValueImpl implements ActionValue { + private String actionId; + private Object value; + public ActionValueImpl(String actionId,Object value) { + this.actionId=actionId; + this.value=value; + } + @Override + public String getActionId() { + return actionId; + } + + @Override + public Object getValue() { + return value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableCollector.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableCollector.java new file mode 100644 index 0000000..1bae484 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableCollector.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.runtime.rete.Context; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年3月18日 + */ +public class BsfVariableCollector implements ApplicationContextAware{ + public static final String BEAN_ID="urule.bsfVariableCollector"; + private Collection providers; + private ApplicationContext applicationContext; + public Map getVariableMap(Context context){ + Map variableMap=new HashMap(); + variableMap.put("workingMemory", context.getWorkingMemory()); + variableMap.put("applicationContext", applicationContext); + for(BsfVariableProvider provider:providers){ + Map map=provider.provide(); + if(map==null){ + continue; + } + variableMap.putAll(map); + } + return variableMap; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + providers=applicationContext.getBeansOfType(BsfVariableProvider.class).values(); + this.applicationContext=applicationContext; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableProvider.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableProvider.java new file mode 100644 index 0000000..3614d3f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/BsfVariableProvider.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年3月18日 + */ +public interface BsfVariableProvider { + Map provide(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ConsolePrintAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ConsolePrintAction.java new file mode 100644 index 0000000..6fc93a5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ConsolePrintAction.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class ConsolePrintAction extends AbstractAction { + private Value value; + private ActionType actionType=ActionType.ConsolePrint; + public ActionValue execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap) { + if(!Utils.isDebug()){ + return null; + } + ValueCompute valueCompute=(ValueCompute)context.getApplicationContext().getBean(ValueCompute.BEAN_ID); + Object content=valueCompute.complexValueCompute(value, matchedObject, context,allMatchedObjects,variableMap); + if(content instanceof BigDecimal){ + BigDecimal b=(BigDecimal)content; + context.debugMsg("☢☢☢控制台输出:"+b.toPlainString(), MsgType.ConsoleOutput, true); + }else if(content instanceof Double){ + Double d=(Double)content; + context.debugMsg("☢☢☢控制台输出:"+d.toString(), MsgType.ConsoleOutput, true); + }else{ + String msg=(content==null ? "null" : content.toString()); + context.debugMsg("☢☢☢控制台输出:"+msg, MsgType.ConsoleOutput, true); + } + return null; + } + + public Value getValue() { + return value; + } + + public void setValue(Value value) { + this.value = value; + } + public ActionType getActionType() { + return actionType; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteCommonFunctionAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteCommonFunctionAction.java new file mode 100644 index 0000000..5d4f6c1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteCommonFunctionAction.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class ExecuteCommonFunctionAction extends AbstractAction{ + private String name; + private String label; + private CommonFunctionParameter parameter; + @Override + public ActionValue execute(Context context, Object matchedObject, List allMatchedObjects, Map variableMap) { + FunctionDescriptor function=null; + if(Utils.getFunctionDescriptorMap().containsKey(name)){ + function=Utils.findFunctionDescriptor(name); + }else if(Utils.getFunctionDescriptorLabelMap().containsKey(label)){ + function=Utils.getFunctionDescriptorLabelMap().get(label); + } + if(function==null){ + throw new RuleException("Function["+name+"] not exist."); + } + String info=(label==null)?name:label; + Value value=null; + Object object=null; + if(parameter!=null){ + value=parameter.getObjectParameter(); + object=context.getValueCompute().complexValueCompute(value, matchedObject, context, allMatchedObjects,variableMap); + } + String property=null; + if(function.getArgument()!=null && function.getArgument().isNeedProperty()){ + property=parameter.getProperty(); + } + Object result=function.doFunction(object, property,context.getWorkingMemory()); + if(debug && Utils.isDebug()){ + info=info+(object==null ? "" : object); + String msg="***执行函数:"+info; + context.debugMsg(msg, MsgType.ExecuteFunction, debug); + } + if(result!=null){ + return new ActionValueImpl(name,result); + }else{ + return null; + } + } + + @Override + public ActionType getActionType() { + return ActionType.ExecuteCommonFunction; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getLabel() { + return label; + } + + public void setLabel(String label) { + this.label = label; + } + + public CommonFunctionParameter getParameter() { + return parameter; + } + + public void setParameter(CommonFunctionParameter parameter) { + this.parameter = parameter; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteMethodAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteMethodAction.java new file mode 100644 index 0000000..37d0b46 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ExecuteMethodAction.java @@ -0,0 +1,311 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; + +import java.lang.reflect.Method; +import java.math.BigDecimal; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class ExecuteMethodAction extends AbstractAction { + private String beanId; + private String beanLabel; + private String methodLabel; + private String methodName; + private List parameters; + private ActionType actionType=ActionType.ExecuteMethod; + public ActionValue execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap) { + String info=(beanLabel==null ? beanId : beanLabel)+(methodLabel==null ? methodName : methodLabel); + info="$$$执行动作:"+info; + try{ + Object obj=context.getApplicationContext().getBean(beanId); + Method method=null; + if(parameters!=null && parameters.size()>0){ + ParametersWrap wrap=buildParameterClasses(context,matchedObject,allMatchedObjects,variableMap); + Method[] methods=obj.getClass().getMethods(); + Datatype[] targetDatatypes=wrap.getDatatypes(); + boolean match=false; + for(Method m:methods){ + method=m; + String name=m.getName(); + if(!name.equals(methodName)){ + continue; + } + Class parameterClasses[]=m.getParameterTypes(); + if(parameterClasses.length!=parameters.size()){ + continue; + } + for(int i=0;i clazz=parameterClasses[i]; + Datatype datatype=targetDatatypes[i]; + match = classMatch(clazz, datatype); + if(!match){ + break; + } + } + if(match){ + break; + } + } + if(!match){ + throw new RuleException("Bean ["+beanId+"."+methodName+"] with "+parameters.size()+" parameters not exist"); + } + String valueKey=methodName; + ActionId actionId=method.getAnnotation(ActionId.class); + if(actionId!=null){ + valueKey=actionId.value(); + } + Object value=method.invoke(obj, wrap.getValues()); + if(debug && Utils.isDebug()){ + String msg=info+"("+wrap.valuesToString()+")"; + context.debugMsg(msg, MsgType.ExecuteBeanMethod, debug); + } + if(value!=null){ + return new ActionValueImpl(valueKey,value); + }else{ + return null; + } + }else{ + method=obj.getClass().getMethod(methodName, new Class[]{}); + String valueKey=methodName; + ActionId actionId=method.getAnnotation(ActionId.class); + if(actionId!=null){ + valueKey=actionId.value(); + } + Object value=method.invoke(obj); + if(debug && Utils.isDebug()){ + String msg=info+"()"; + context.debugMsg(msg, MsgType.ExecuteBeanMethod, debug); + } + if(value!=null){ + return new ActionValueImpl(valueKey,value); + }else{ + return null; + } + } + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + private boolean classMatch(Class clazz, Datatype datatype) { + boolean match=false; + switch(datatype){ + case String: + if(clazz.equals(String.class)){ + match=true; + }else{ + match=false; + } + break; + case BigDecimal: + if(clazz.equals(BigDecimal.class)){ + match=true; + }else{ + match=false; + } + break; + case Boolean: + if(clazz.equals(Boolean.class) || clazz.equals(boolean.class)){ + match=true; + }else{ + match=false; + } + break; + case Date: + if(clazz.equals(Date.class)){ + match=true; + }else{ + match=false; + } + break; + case Double: + if(clazz.equals(Double.class) || clazz.equals(double.class)){ + match=true; + }else{ + match=false; + } + break; + case Enum: + if(Enum.class.isAssignableFrom(clazz)){ + match=true; + }else{ + match=false; + } + break; + case Float: + if(clazz.equals(Float.class) || clazz.equals(float.class)){ + match=true; + }else{ + match=false; + } + break; + case Integer: + if(clazz.equals(Integer.class) || clazz.equals(int.class)){ + match=true; + }else{ + match=false; + } + break; + case Char: + if(clazz.equals(Character.class) || clazz.equals(char.class)){ + match=true; + }else{ + match=false; + } + break; + case List: + if(List.class.isAssignableFrom(clazz)){ + match=true; + }else{ + match=false; + } + break; + case Long: + if(clazz.equals(Long.class) || clazz.equals(long.class)){ + match=true; + }else{ + match=false; + } + break; + case Map: + if(Map.class.isAssignableFrom(clazz)){ + match=true; + }else{ + match=false; + } + break; + case Set: + if(Set.class.isAssignableFrom(clazz)){ + match=true; + }else{ + match=false; + } + break; + case Object: + match=true; + break; + } + return match; + } + + private ParametersWrap buildParameterClasses(Context context,Object matchedObject,List allMatchedObjects,Map variableMap){ + List list=new ArrayList(); + List values=new ArrayList(); + ValueCompute valueCompute=context.getValueCompute(); + for(Parameter param:parameters){ + Datatype type=param.getType(); + list.add(type); + Object value=valueCompute.complexValueCompute(param.getValue(), matchedObject, context,allMatchedObjects,variableMap); + values.add(type.convert(value)); + } + Datatype[] datatypes=new Datatype[list.size()]; + list.toArray(datatypes); + Object[] objs=new Object[values.size()]; + values.toArray(objs); + ParametersWrap wrap=new ParametersWrap(); + wrap.setDatatypes(datatypes); + wrap.setValues(objs); + return wrap; + } + + public String getMethodLabel() { + return methodLabel; + } + public void setMethodLabel(String methodLabel) { + this.methodLabel = methodLabel; + } + public String getBeanId() { + return beanId; + } + public void setBeanId(String beanId) { + this.beanId = beanId; + } + + public String getMethodName() { + return methodName; + } + public void setMethodName(String methodName) { + this.methodName = methodName; + } + public String getBeanLabel() { + return beanLabel; + } + public void setBeanLabel(String beanLabel) { + this.beanLabel = beanLabel; + } + public List getParameters() { + return parameters; + } + public void setParameters(List parameters) { + this.parameters = parameters; + } + public void addParameter(Parameter parameter) { + if(parameters==null){ + parameters=new ArrayList(); + } + parameters.add(parameter); + } + public ActionType getActionType() { + return actionType; + } +} + +class ParametersWrap{ + private Datatype[] datatypes; + private Object[] values; + + public Datatype[] getDatatypes() { + return datatypes; + } + public void setDatatypes(Datatype[] datatypes) { + this.datatypes = datatypes; + } + public Object[] getValues() { + return values; + } + public void setValues(Object[] values) { + this.values = values; + } + public String valuesToString(){ + if(values==null){ + return ""; + } + StringBuffer sb=new StringBuffer(); + for(Object obj:values){ + if(sb.length()>0){ + sb.append(","); + } + if(obj==null){ + sb.append("null"); + }else{ + sb.append(obj); + } + } + return sb.toString(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ScoringAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ScoringAction.java new file mode 100644 index 0000000..c0c4c8e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/ScoringAction.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.scorecard.runtime.ScoreRuntimeValue; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class ScoringAction extends AbstractAction { + private Value value; + private int rowNumber; + private String name; + private String weight; + private ActionType actionType=ActionType.Scoring; + + public ScoringAction(int rowNumber,String name,String weight) { + this.rowNumber=rowNumber; + this.name=name; + this.weight=weight; + } + + @Override + public ActionValue execute(Context context, Object matchedObject,List allMatchedObjects, Map variableMap) { + ValueCompute valueCompute=(ValueCompute)context.getApplicationContext().getBean(ValueCompute.BEAN_ID); + Object content=valueCompute.complexValueCompute(value, matchedObject, context,allMatchedObjects,variableMap); + ScoreRuntimeValue scoreRuntimeValue=new ScoreRuntimeValue(this.rowNumber,this.name,this.weight,content); + return new ActionValueImpl(scoreRuntimeValue.getName(),scoreRuntimeValue); + } + + public Value getValue() { + return value; + } + + public void setValue(Value value) { + this.value = value; + } + + public String getName() { + return name; + } + public String getWeight() { + return weight; + } + @Override + public ActionType getActionType() { + return actionType; + } + public int getRowNumber() { + return rowNumber; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/SimpleAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/SimpleAction.java new file mode 100644 index 0000000..7e218f8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/SimpleAction.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.runtime.rete.Context; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class SimpleAction extends AbstractAction { + public SimpleAction(Object value) { + } + public ActionValue execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap) { + return null; + } + public ActionType getActionType() { + return ActionType.ConsolePrint; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/VariableAssignAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/VariableAssignAction.java new file mode 100644 index 0000000..962a451 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/action/VariableAssignAction.java @@ -0,0 +1,152 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.action; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.lhs.LeftType; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeanUtils; + +import java.beans.PropertyDescriptor; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class VariableAssignAction extends AbstractAction { + private String referenceName;//for script rule + private String variableName; + private String variableLabel; + private String variableCategory; + private Datatype datatype; + private Value value; + private LeftType type; + private ActionType actionType=ActionType.VariableAssign; + + @SuppressWarnings({ "unchecked", "rawtypes" }) + public ActionValue execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap) { + Object targetFact=null; + String propertyName=null; + ValueCompute valueCompute=context.getValueCompute(); + Object obj=valueCompute.complexValueCompute(value, matchedObject, context,allMatchedObjects,variableMap); + String label=null; + if(type!=null && type.equals(LeftType.NamedReference)){ + String refName=referenceName; + targetFact=variableMap.get(refName); + if(targetFact==null){ + refName=refName.substring(1,refName.length()); + targetFact=variableMap.get(refName); + } + if(targetFact==null){ + throw new RuleException("Reference ["+referenceName+"] not define."); + } + propertyName=variableName; + label=referenceName+"."+(variableLabel==null ? variableName : variableLabel); + }else{ + String className=context.getVariableCategoryClass(variableCategory); + if(className.equals(Map.class.getName())){ + targetFact=context.getWorkingMemory().getParameters(); + }else{ + targetFact=valueCompute.findObject(className, matchedObject, context); + } + if(targetFact==null){ + throw new RuleException("Class["+className+"] not found in workingmemory."); + } + if(datatype.equals(Datatype.Enum) && obj!=null && StringUtils.isNotBlank(obj.toString())){ + PropertyDescriptor pd=BeanUtils.getPropertyDescriptor(targetFact.getClass(), variableName); + Class targetClass=(Class)pd.getPropertyType(); + obj=Enum.valueOf(targetClass, obj.toString()); + }else if(obj!=null){ + obj=datatype.convert(obj); + } + propertyName=variableName; + label=variableCategory+"."+(variableLabel==null ? variableName : variableLabel); + } + Utils.setObjectProperty(targetFact, propertyName, obj); + if(debug && Utils.isDebug()){ + String msg="###变量赋值:"+label+"="+obj; + context.debugMsg(msg, MsgType.VarAssign, debug); + } + return null; + } + + public LeftType getType() { + return type; + } + + public void setType(LeftType type) { + this.type = type; + } + + public String getReferenceName() { + return referenceName; + } + + public void setReferenceName(String referenceName) { + this.referenceName = referenceName; + } + + public String getVariableName() { + return variableName; + } + + public void setVariableName(String variableName) { + this.variableName = variableName; + } + + public String getVariableLabel() { + return variableLabel; + } + + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } + + public Datatype getDatatype() { + return datatype; + } + + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + + public ActionType getActionType() { + return actionType; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/AbstractBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/AbstractBuilder.java new file mode 100644 index 0000000..9690120 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/AbstractBuilder.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceBuilder; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceProvider; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年2月16日 + */ +@SuppressWarnings("rawtypes") +public abstract class AbstractBuilder implements ApplicationContextAware{ + protected Collection providers; + protected ApplicationContext applicationContext; + protected Collection resourceBuilders; + public ResourceBase newResourceBase(){ + return new ResourceBase(providers); + } + protected Element parseResource(String content){ + try { + Document document = DocumentHelper.parseText(content); + Element root=document.getRootElement(); + return root; + } catch (DocumentException e) { + throw new RuleException(e); + } + } + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + resourceBuilders=applicationContext.getBeansOfType(ResourceBuilder.class).values(); + providers=applicationContext.getBeansOfType(ResourceProvider.class).values(); + this.applicationContext=applicationContext; + applicationContext.getBeansWithAnnotation(SuppressWarnings.class); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/DecisionTreeRulesBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/DecisionTreeRulesBuilder.java new file mode 100644 index 0000000..3cfdb51 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/DecisionTreeRulesBuilder.java @@ -0,0 +1,136 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.decisiontree.*; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import com.itheima.sfbx.framework.rule.model.rule.lhs.And; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Lhs; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class DecisionTreeRulesBuilder { + public RuleSet buildRules(DecisionTree tree) throws IOException{ + RuleSet rs=new RuleSet(); + + List libs=tree.getLibraries(); + if(libs!=null){ + for(Library lib:libs){ + rs.addLibrary(lib); + } + } + List nodes=new ArrayList(); + nodes.add(tree.getVariableTreeNode()); + List list=new ArrayList(); + fetchActionTreeNodes(nodes, list); + List rules=new ArrayList(); + for(ActionTreeNode actionNode:list){ + Rule rule=new Rule(); + rule.setDebug(tree.getDebug()); + rule.setEnabled(tree.getEnabled()); + rule.setEffectiveDate(tree.getEffectiveDate()); + rule.setExpiresDate(tree.getExpiresDate()); + rule.setSalience(tree.getSalience()); + rules.add(rule); + rule.setName("tree-rule"); + Rhs rhs=new Rhs(); + rhs.setActions(actionNode.getActions()); + rule.setRhs(rhs); + Lhs lhs=new Lhs(); + rule.setLhs(lhs); + And and=new And(); + lhs.setCriterion(and); + ConditionTreeNode treeNode=(ConditionTreeNode)actionNode.getParentNode(); + buildCriterion(and,treeNode); + } + rs.setRules(rules); + return rs; + } + + private void buildCriterion(And and,ConditionTreeNode node){ + if(node==null)return; + List nodes=new ArrayList(); + nodes.add(node); + VariableTreeNode varNode=null; + TreeNode parentNode=node.getParentNode(); + while(parentNode!=null){ + if(parentNode instanceof VariableTreeNode){ + varNode=(VariableTreeNode)parentNode; + buildCriterion(and,(ConditionTreeNode)parentNode.getParentNode()); + break; + }else if(parentNode instanceof ConditionTreeNode){ + ConditionTreeNode parentConditionTreeNode=(ConditionTreeNode)parentNode; + nodes.add(parentConditionTreeNode); + parentNode=parentConditionTreeNode.getParentNode(); + } + } + if(varNode==null){ + throw new RuleException("Decision tree is invalid."); + } + for(ConditionTreeNode cn:nodes){ + and.addCriterion(buildCriteria(cn,varNode)); + } + } + + private Criteria buildCriteria(ConditionTreeNode cn,VariableTreeNode varNode){ + Criteria c=new Criteria(); + c.setLeft(varNode.getLeft()); + c.setOp(cn.getOp()); + c.setValue(cn.getValue()); + return c; + } + + + public void fetchActionTreeNodes(List nodes,List list){ + for(TreeNode node:nodes){ + if(node instanceof ActionTreeNode){ + list.add((ActionTreeNode)node); + }else if(node instanceof VariableTreeNode){ + VariableTreeNode vn=(VariableTreeNode)node; + List conditionNodes=vn.getConditionTreeNodes(); + if(conditionNodes!=null){ + fetchActionTreeNodes(conditionNodes, list); + } + }else if(node instanceof ConditionTreeNode){ + ConditionTreeNode cn=(ConditionTreeNode)node; + List actionNodes=cn.getActionTreeNodes(); + if(actionNodes!=null){ + fetchActionTreeNodes(actionNodes, list); + } + List conditionNodes=cn.getConditionTreeNodes(); + if(conditionNodes!=null){ + fetchActionTreeNodes(conditionNodes, list); + } + List varNodes=cn.getVariableTreeNodes(); + if(varNodes!=null){ + fetchActionTreeNodes(varNodes, list); + } + } + + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBase.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBase.java new file mode 100644 index 0000000..c77455d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBase.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rete.Rete; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageImpl; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class KnowledgeBase { + private ResourceLibrary resourceLibrary; + private Map flowMap; + private Rete rete; + private KnowledgePackageImpl knowledgePackage; + private List noLhsRules; + public KnowledgeBase(Rete rete) { + this(rete, null, null); + } + protected KnowledgeBase(Rete rete,Map flowMap,List noLhsRules) { + this.rete=rete; + this.resourceLibrary=rete.getResourceLibrary(); + this.flowMap=flowMap; + this.noLhsRules=noLhsRules; + } + + public KnowledgePackage getKnowledgePackage(){ + if(knowledgePackage!=null){ + return knowledgePackage; + } + knowledgePackage=new KnowledgePackageImpl(); + knowledgePackage.setRete(rete); + knowledgePackage.setNoLhsRules(noLhsRules); + knowledgePackage.setFlowMap(flowMap); + knowledgePackage.buildWithElseRules(); + + Map variableCategoryMap=new HashMap(); + knowledgePackage.setVariableCategoryMap(variableCategoryMap); + List variableCategories=resourceLibrary.getVariableCategories(); + Map parameters=new HashMap(); + knowledgePackage.setParameters(parameters); + for(VariableCategory category:variableCategories){ + String name=category.getName(); + variableCategoryMap.put(name, category.getClazz()); + if(name.equals(VariableCategory.PARAM_CATEGORY)){ + List variables=category.getVariables(); + if(variables==null || variables.size()==0){ + continue; + } + for(Variable var:variables){ + parameters.put(var.getName(), var.getType().name()); + } + } + } + return knowledgePackage; + } + + + public List getNoLhsRules() { + return noLhsRules; + } + + public Rete getRete() { + return rete; + } + public ResourceLibrary getResourceLibrary() { + return resourceLibrary; + } + public Map getFlowMap() { + return flowMap; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBuilder.java new file mode 100644 index 0000000..e46b16c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/KnowledgeBuilder.java @@ -0,0 +1,216 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.builder.resource.Resource; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceBuilder; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceType; +import com.itheima.sfbx.framework.rule.builder.table.DecisionTableRulesBuilder; +import com.itheima.sfbx.framework.rule.builder.table.ScriptDecisionTableRulesBuilder; +import com.itheima.sfbx.framework.rule.dsl.DSLRuleSetBuilder; +import com.itheima.sfbx.framework.rule.model.decisiontree.DecisionTree; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.rete.Rete; +import com.itheima.sfbx.framework.rule.model.rete.builder.ReteBuilder; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Lhs; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import com.itheima.sfbx.framework.rule.model.scorecard.runtime.ScoreRule; +import com.itheima.sfbx.framework.rule.model.table.DecisionTable; +import com.itheima.sfbx.framework.rule.model.table.ScriptDecisionTable; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgePackageService; +import org.dom4j.Element; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class KnowledgeBuilder extends AbstractBuilder{ + private ResourceLibraryBuilder resourceLibraryBuilder; + private ReteBuilder reteBuilder; + private RulesRebuilder rulesRebuilder; + private DecisionTreeRulesBuilder decisionTreeRulesBuilder; + private DecisionTableRulesBuilder decisionTableRulesBuilder; + private ScriptDecisionTableRulesBuilder scriptDecisionTableRulesBuilder; + private DSLRuleSetBuilder dslRuleSetBuilder; + public static final String BEAN_ID="urule.knowledgeBuilder"; + public KnowledgeBase buildKnowledgeBase(ResourceBase resourceBase) throws IOException{ + KnowledgePackageService knowledgePackageService=(KnowledgePackageService)applicationContext.getBean(KnowledgePackageService.BEAN_ID); + List rules=new ArrayList(); + Map libMap=new HashMap(); + Map flowMap=new HashMap(); + for(Resource resource:resourceBase.getResources()){ + if(dslRuleSetBuilder.support(resource)){ + RuleSet ruleSet=dslRuleSetBuilder.build(resource.getContent()); + addToLibraryMap(libMap,ruleSet.getLibraries()); + if(ruleSet.getRules()!=null){ + rules.addAll(ruleSet.getRules()); + } + continue; + } + Element root=parseResource(resource.getContent()); + for(ResourceBuilder builder:resourceBuilders){ + if(!builder.support(root)){ + continue; + } + Object object=builder.build(root); + ResourceType type=builder.getType(); + if(type.equals(ResourceType.RuleSet)){ + RuleSet ruleSet=(RuleSet)object; + addToLibraryMap(libMap,ruleSet.getLibraries()); + if(ruleSet.getRules()!=null){ + List ruleList=ruleSet.getRules(); + rulesRebuilder.convertNamedJunctions(ruleList); + for(Rule rule:ruleList){ + if(rule.getEnabled()!=null && rule.getEnabled()==false){ + continue; + } + rules.add(rule); + } + } + }else if(type.equals(ResourceType.DecisionTree)){ + DecisionTree tree=(DecisionTree)object; + addToLibraryMap(libMap,tree.getLibraries()); + RuleSet ruleSet=decisionTreeRulesBuilder.buildRules(tree); + addToLibraryMap(libMap,ruleSet.getLibraries()); + if(ruleSet.getRules()!=null){ + rules.addAll(ruleSet.getRules()); + } + }else if(type.equals(ResourceType.DecisionTable)){ + DecisionTable table=(DecisionTable)object; + addToLibraryMap(libMap,table.getLibraries()); + List tableRules=decisionTableRulesBuilder.buildRules(table); + rules.addAll(tableRules); + }else if(type.equals(ResourceType.ScriptDecisionTable)){ + ScriptDecisionTable table=(ScriptDecisionTable)object; + RuleSet ruleSet=scriptDecisionTableRulesBuilder.buildRules(table); + addToLibraryMap(libMap,ruleSet.getLibraries()); + if(ruleSet.getRules()!=null){ + rules.addAll(ruleSet.getRules()); + } + }else if(type.equals(ResourceType.Flow)){ + FlowDefinition fd=(FlowDefinition)object; + fd.initNodeKnowledgePackage(this, knowledgePackageService, dslRuleSetBuilder); + addToLibraryMap(libMap,fd.getLibraries()); + flowMap.put(fd.getId(), fd); + }else if(type.equals(ResourceType.Scorecard)){ + ScoreRule rule=(ScoreRule)object; + rules.add(rule); + addToLibraryMap(libMap,rule.getLibraries()); + } + break; + } + } + ResourceLibrary resourceLibrary=resourceLibraryBuilder.buildResourceLibrary(libMap.values()); + buildLoopRules(rules, resourceLibrary); + Rete rete=reteBuilder.buildRete(rules, resourceLibrary); + return new KnowledgeBase(rete,flowMap,retriveNoLhsRules(rules)); + } + + private void buildLoopRules(List rules,ResourceLibrary resourceLibrary){ + for(Rule rule:rules){ + if(!(rule instanceof LoopRule)){ + continue; + } + LoopRule loopRule=(LoopRule)rule; + List ruleList=buildRules(loopRule); + Rete rete=reteBuilder.buildRete(ruleList, resourceLibrary); + KnowledgeBase base=new KnowledgeBase(rete); + KnowledgePackageWrapper knowledgeWrapper=new KnowledgePackageWrapper(base.getKnowledgePackage()); + loopRule.setKnowledgePackageWrapper(knowledgeWrapper); + } + } + + private List buildRules(LoopRule loopRule){ + Rule rule=new Rule(); + rule.setDebug(loopRule.getDebug()); + rule.setName("loop-rule"); + rule.setLhs(loopRule.getLhs()); + rule.setRhs(loopRule.getRhs()); + rule.setOther(loopRule.getOther()); + List rules=new ArrayList(); + rules.add(rule); + return rules; + } + public KnowledgeBase buildKnowledgeBase(RuleSet ruleSet){ + List rules=new ArrayList(); + Map libMap=new HashMap(); + addToLibraryMap(libMap,ruleSet.getLibraries()); + if(ruleSet.getRules()!=null){ + rules.addAll(ruleSet.getRules()); + } + ResourceLibrary resourceLibrary=resourceLibraryBuilder.buildResourceLibrary(libMap.values()); + Rete rete=reteBuilder.buildRete(rules, resourceLibrary); + return new KnowledgeBase(rete,null,retriveNoLhsRules(rules)); + } + + private List retriveNoLhsRules(List rules) { + List noLhsRules=new ArrayList(); + for(Rule rule:rules){ + Lhs lhs=rule.getLhs(); + if((rule instanceof LoopRule) || (lhs==null || lhs.getCriterion()==null)){ + noLhsRules.add(rule); + } + } + return noLhsRules; + } + + private void addToLibraryMap(Map map,List libraries){ + if(libraries==null){ + return; + } + for(Library lib:libraries){ + String path=lib.getPath(); + if(map.containsKey(path)){ + continue; + } + map.put(path, lib); + } + } + + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } + + public void setReteBuilder(ReteBuilder reteBuilder) { + this.reteBuilder = reteBuilder; + } + public void setDecisionTableRulesBuilder(DecisionTableRulesBuilder decisionTableRulesBuilder) { + this.decisionTableRulesBuilder = decisionTableRulesBuilder; + } + public void setScriptDecisionTableRulesBuilder(ScriptDecisionTableRulesBuilder scriptDecisionTableRulesBuilder) { + this.scriptDecisionTableRulesBuilder = scriptDecisionTableRulesBuilder; + } + public void setDslRuleSetBuilder(DSLRuleSetBuilder dslRuleSetBuilder) { + this.dslRuleSetBuilder = dslRuleSetBuilder; + } + public void setResourceLibraryBuilder(ResourceLibraryBuilder resourceLibraryBuilder) { + this.resourceLibraryBuilder = resourceLibraryBuilder; + } + public void setDecisionTreeRulesBuilder(DecisionTreeRulesBuilder decisionTreeRulesBuilder) { + this.decisionTreeRulesBuilder = decisionTreeRulesBuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceBase.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceBase.java new file mode 100644 index 0000000..7ed12da --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceBase.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.resource.Resource; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceProvider; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class ResourceBase { + private Collection providers; + private List resources=new ArrayList(); + protected ResourceBase(Collection providers) { + this.providers=providers; + } + public ResourceBase addResource(String path,String version){ + boolean support=false; + for(ResourceProvider provider:providers){ + if(provider.support(path)){ + support=true; + resources.add(provider.provide(path,version)); + break; + } + } + if(!support){ + throw new RuleException("Unsupport rule file source : "+path); + } + return this; + } + public List getResources() { + return resources; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceLibraryBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceLibraryBuilder.java new file mode 100644 index 0000000..0f0cc08 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/ResourceLibraryBuilder.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.builder.resource.Resource; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceBuilder; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceType; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableLibrary; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.runtime.BuiltInActionLibraryBuilder; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月16日 + */ +public class ResourceLibraryBuilder extends AbstractBuilder{ + private BuiltInActionLibraryBuilder builtInActionLibraryBuilder; + @SuppressWarnings("unchecked") + public ResourceLibrary buildResourceLibrary(Collection libraries){ + if(libraries==null){ + libraries=Collections.EMPTY_LIST; + } + List constantLibraryLibs=new ArrayList(); + List actionLibraryLibs=new ArrayList(); + List variableCategoryLibs=new ArrayList(); + List parameterVariableCategories=new ArrayList(); + ResourceBase resourceBase=newResourceBase(); + for(Library lib:libraries){ + resourceBase.addResource(lib.getPath(),lib.getVersion()); + } + for(Resource resource:resourceBase.getResources()){ + String content=resource.getContent(); + Element root=parseResource(content); + for(ResourceBuilder builder:resourceBuilders){ + if(!builder.support(root)){ + continue; + } + Object object=builder.build(root); + ResourceType type=builder.getType(); + if(type.equals(ResourceType.ActionLibrary)){ + ActionLibrary al=(ActionLibrary)object; + actionLibraryLibs.add(al); + }else if(type.equals(ResourceType.VariableLibrary)){ + VariableLibrary vl=(VariableLibrary)object; + variableCategoryLibs.add(vl); + }else if(type.equals(ResourceType.ConstantLibrary)){ + ConstantLibrary cl=(ConstantLibrary)object; + constantLibraryLibs.add(cl); + }else if(type.equals(ResourceType.ParameterLibrary)){ + VariableCategory category=(VariableCategory)object; + parameterVariableCategories.add(category); + } + break; + } + } + if(parameterVariableCategories.size()>0){ + VariableCategory category=parameterVariableCategories.get(0); + for(VariableCategory vc:parameterVariableCategories){ + if(vc.equals(category)){ + continue; + } + if(vc.getVariables()==null){ + continue; + } + for(Variable v:vc.getVariables()){ + category.addVariable(v); + } + } + VariableLibrary parameterLib=new VariableLibrary(); + parameterLib.addVariableCategory(category); + variableCategoryLibs.add(parameterLib); + } + List builtInActions=builtInActionLibraryBuilder.getBuiltInActions(); + if(builtInActions.size()>0){ + ActionLibrary al=new ActionLibrary(); + al.setSpringBeans(builtInActions); + actionLibraryLibs.add(al); + } + return new ResourceLibrary(variableCategoryLibs,actionLibraryLibs,constantLibraryLibs); + } + public void setBuiltInActionLibraryBuilder( + BuiltInActionLibraryBuilder builtInActionLibraryBuilder) { + this.builtInActionLibraryBuilder = builtInActionLibraryBuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/RulesRebuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/RulesRebuilder.java new file mode 100644 index 0000000..56fbf39 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/RulesRebuilder.java @@ -0,0 +1,711 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ConsolePrintAction; +import com.itheima.sfbx.framework.rule.action.ExecuteMethodAction; +import com.itheima.sfbx.framework.rule.action.VariableAssignAction; +import com.itheima.sfbx.framework.rule.model.flow.Connection; +import com.itheima.sfbx.framework.rule.model.flow.DecisionItem; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.Method; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantCategory; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopEnd; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopStart; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopTarget; +import org.apache.commons.lang.StringUtils; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年8月19日 + */ +public class RulesRebuilder { + private ResourceLibraryBuilder resourceLibraryBuilder; + public void rebuildRules(List libraries, List rules) { + if(libraries==null){ + return; + } + if(rules==null){ + return; + } + ResourceLibrary resLibraries=resourceLibraryBuilder.buildResourceLibrary(libraries); + for(Rule rule:rules){ + Map namedMap=new HashMap(); + if(rule.getLhs()!=null){ + Criterion criterion=rule.getLhs().getCriterion(); + rebuildCriterion(criterion, resLibraries,namedMap,false); + } + Rhs rhs=rule.getRhs(); + List actions=rhs.getActions(); + if(actions!=null){ + for(Action action:actions){ + rebuildAction(action,resLibraries,namedMap,false); + } + } + Other other=rule.getOther(); + if(other!=null){ + List otherActions=other.getActions(); + if(otherActions!=null){ + for(Action action:otherActions){ + rebuildAction(action,resLibraries,namedMap,false); + } + } + } + if(rule instanceof LoopRule){ + LoopRule loopRule=(LoopRule)rule; + LoopTarget target=loopRule.getLoopTarget(); + if(target!=null){ + Value value=target.getValue(); + rebuildValue(value, resLibraries,namedMap,false); + } + + LoopStart start=loopRule.getLoopStart(); + if(start!=null && start.getActions()!=null){ + for(Action action:start.getActions()){ + rebuildAction(action,resLibraries,namedMap,false); + } + } + LoopEnd end=loopRule.getLoopEnd(); + if(end!=null && end.getActions()!=null){ + for(Action action:end.getActions()){ + rebuildAction(action,resLibraries,namedMap,false); + } + } + } + } + } + public void rebuildRulesForDSL(List libraries, List rules) { + if(libraries==null){ + return; + } + if(rules==null){ + return; + } + ResourceLibrary resLibraries=resourceLibraryBuilder.buildResourceLibrary(libraries); + for(Rule rule:rules){ + Map namedMap=new HashMap(); + if(rule.getLhs()!=null){ + Criterion criterion=rule.getLhs().getCriterion(); + rebuildCriterion(criterion, resLibraries,namedMap,true); + } + Rhs rhs=rule.getRhs(); + List actions=rhs.getActions(); + if(actions!=null){ + for(Action action:actions){ + rebuildAction(action,resLibraries,namedMap,true); + } + } + Other other=rule.getOther(); + if(other!=null){ + List otherActions=other.getActions(); + if(otherActions!=null){ + for(Action action:otherActions){ + rebuildAction(action,resLibraries,namedMap,true); + } + } + } + if(rule instanceof LoopRule){ + LoopRule loopRule=(LoopRule)rule; + LoopTarget target=loopRule.getLoopTarget(); + if(target!=null){ + Value value=target.getValue(); + rebuildValue(value, resLibraries,namedMap,true); + } + + LoopStart start=loopRule.getLoopStart(); + if(start!=null && start.getActions()!=null){ + for(Action action:start.getActions()){ + rebuildAction(action,resLibraries,namedMap,true); + } + } + LoopEnd end=loopRule.getLoopEnd(); + if(end!=null && end.getActions()!=null){ + for(Action action:end.getActions()){ + rebuildAction(action,resLibraries,namedMap,true); + } + } + } + } + } + + public void convertNamedJunctions(List rules){ + for(Rule rule:rules){ + if(rule.getLhs()==null){ + continue; + } + Criterion criterion=rule.getLhs().getCriterion(); + Criterion newCriterion=buildCriterion(criterion); + rule.getLhs().setCriterion(newCriterion); + } + } + + private Criterion buildCriterion(Criterion criterion) { + if(!(criterion instanceof NamedJunction) && !(criterion instanceof Junction)){ + return criterion; + } + if(criterion instanceof NamedJunction){ + NamedJunction jun=(NamedJunction)criterion; + NamedCriteria criteria=buildNamedJunction(jun); + return criteria; + }else if(criterion instanceof Junction){ + buildJunction((Junction)criterion); + } + return criterion; + } + + private void buildJunction(Junction jun) { + List criterions=jun.getCriterions(); + List newCriterions=new ArrayList(); + for(Criterion c:criterions){ + NamedCriteria namedCriteria=buildNamedJunction(c); + if(namedCriteria!=null){ + newCriterions.add(namedCriteria); + }else if(c instanceof Junction){ + buildJunction((Junction)c); + } + newCriterions.add(c); + } + jun.setCriterions(newCriterions); + } + + private NamedCriteria buildNamedJunction(Criterion criterion) { + if(!(criterion instanceof NamedJunction)){ + return null; + } + NamedJunction jun=(NamedJunction)criterion; + NamedCriteria criteria=new NamedCriteria(); + criteria.setReferenceName(jun.getReferenceName()); + criteria.setParent(jun.getParent()); + criteria.setVariableCategory(jun.getVariableCategory()); + JunctionType junctionType=jun.getJunctionType(); + List items=jun.getItems(); + List nextUnits=null; + for(NamedItem item:items){ + CriteriaUnit unit=new CriteriaUnit(); + unit.setJunctionType(junctionType); + Criteria c=new Criteria(); + unit.setCriteria(c); + c.setOp(item.getOp()); + Left left=new Left(); + left.setType(LeftType.NamedReference); + VariableLeftPart leftPart=new VariableLeftPart(); + leftPart.setDatatype(item.getDatatype()); + leftPart.setVariableCategory(jun.getVariableCategory()); + leftPart.setVariableLabel(item.getVariableLabel()); + leftPart.setVariableName(item.getVariableName()); + left.setLeftPart(leftPart); + c.setLeft(left); + c.setValue(item.getValue()); + if(nextUnits==null){ + criteria.setUnit(unit); + nextUnits=new ArrayList(); + unit.setNextUnits(nextUnits); + }else{ + nextUnits.add(unit); + } + } + return criteria; + } + + public void rebuildAction(Action action,ResourceLibrary resLibraries,Map namedMap,boolean forDSL){ + if(action==null){ + return; + } + if(action instanceof VariableAssignAction){ + List variableCategories=resLibraries.getVariableCategories(); + if(variableCategories==null){ + return; + } + VariableAssignAction varAction=(VariableAssignAction)action; + LeftType type=varAction.getType(); + if(type==null || !type.equals(LeftType.NamedReference)){ + String variableCategory=varAction.getVariableCategory(); + String variableLabel=varAction.getVariableLabel(); + if(variableLabel.equals(Connection.RETURN_VALUE_KEY)){ + varAction.setVariableName(variableLabel); + varAction.setDatatype(Datatype.Boolean); + }else if(variableLabel.equals(DecisionItem.RETURN_VALUE_KEY)){ + varAction.setVariableName(variableLabel); + varAction.setDatatype(Datatype.String); + }else{ + String variableName=varAction.getVariableName(); + if(forDSL){ + Variable var=getVariableByLabel(variableCategories, variableCategory, variableLabel,namedMap); + varAction.setVariableName(var.getName()); + varAction.setDatatype(var.getType()); + }else{ + if(StringUtils.isNotBlank(variableName)){ + Variable var=getVariableByName(variableCategories, variableCategory, variableName,namedMap); + varAction.setVariableLabel(var.getLabel()); + varAction.setDatatype(var.getType()); + }else{ + Variable var=getVariableByLabel(variableCategories, variableCategory, variableLabel,namedMap); + varAction.setVariableName(var.getName()); + varAction.setDatatype(var.getType()); + } + } + } + } + if(type!=null && type.equals(LeftType.NamedReference)){ + String refName=varAction.getReferenceName(); + String variableCategory=namedMap.get(refName); + if(variableCategory==null){ + refName=refName.substring(1,refName.length()); + variableCategory=namedMap.get(refName); + } + if(variableCategory==null){ + throw new RuleException("Reference ["+refName+"] not define."); + } + if(forDSL){ + Variable var=getVariableByLabel(variableCategories, variableCategory, varAction.getVariableLabel(),namedMap); + varAction.setVariableName(var.getName()); + varAction.setVariableCategory(variableCategory); + varAction.setDatatype(var.getType()); + }else{ + String variableName=varAction.getVariableName(); + if(StringUtils.isNotBlank(variableName)){ + Variable var=getVariableByLabel(variableCategories, variableCategory, variableName,namedMap); + varAction.setVariableLabel(var.getLabel()); + varAction.setVariableCategory(variableCategory); + varAction.setDatatype(var.getType()); + }else{ + Variable var=getVariableByLabel(variableCategories, variableCategory, varAction.getVariableLabel(),namedMap); + varAction.setVariableName(var.getName()); + varAction.setVariableCategory(variableCategory); + varAction.setDatatype(var.getType()); + } + } + } + Value value=((VariableAssignAction) action).getValue(); + rebuildValue(value,resLibraries,namedMap,forDSL); + }else if(action instanceof ConsolePrintAction){ + ConsolePrintAction consoleAction=(ConsolePrintAction)action; + Value value=consoleAction.getValue(); + rebuildValue(value, resLibraries,namedMap,forDSL); + }else if(action instanceof ExecuteMethodAction){ + List actionLibraries=resLibraries.getActionLibraries(); + if(actionLibraries==null){ + return; + } + ExecuteMethodAction methodAction=(ExecuteMethodAction)action; + String beanLabel=methodAction.getBeanLabel(); + String methodLabel=methodAction.getMethodLabel(); + SpringBean targetBean=null; + for(ActionLibrary al:actionLibraries){ + List beans=al.getSpringBeans(); + if(beans==null){ + continue; + } + for(SpringBean bean:beans){ + if(beanLabel.equals(bean.getName())){ + targetBean=bean; + break; + } + } + if(targetBean!=null)break; + } + Method targetMethod=null; + if(targetBean!=null){ + methodAction.setBeanId(targetBean.getId()); + List methods=targetBean.getMethods(); + if(methods==null){ + throw new RuleException("Bean ["+beanLabel+"] not define methods."); + } + for(Method method:methods){ + if(method.getName().equals(methodLabel)){ + targetMethod=method; + break; + } + } + if(targetMethod==null){ + throw new RuleException("Bean ["+beanLabel+"] method["+methodLabel+"] not define."); + } + methodAction.setMethodName(targetMethod.getMethodName()); + } + List parameters=methodAction.getParameters(); + rebuildParameters(resLibraries, parameters,targetMethod.getParameters(),namedMap,forDSL); + } + } + + private void rebuildCommonFunctionParameter(CommonFunctionParameter parameter,ResourceLibrary resLibraries,Map namedMap,boolean forDSL){ + String property=parameter.getProperty(); + if(StringUtils.isEmpty(property)){ + return; + } + Value value=parameter.getObjectParameter(); + rebuildValue(value, resLibraries,namedMap,forDSL); + String category=null; + if(value instanceof VariableValue){ + VariableValue vv=(VariableValue)value; + category=vv.getVariableCategory(); + }else if(value instanceof VariableCategoryValue){ + VariableCategoryValue vc=(VariableCategoryValue)value; + category=vc.getVariableCategory(); + }else{ + throw new RuleException("Function parameter is invalid."); + } + List variableCategories=resLibraries.getVariableCategories(); + for(VariableCategory vc:variableCategories){ + if(!category.equals(vc.getName())){ + continue; + } + for(Variable v:vc.getVariables()){ + if(v.getName().equals(property) || v.getLabel().equals(property)){ + parameter.setProperty(v.getName()); + parameter.setPropertyLabel(v.getLabel()); + break; + } + } + } + } + + private void rebuildParameters(ResourceLibrary resLibraries,List parameters,List targetParameters,Map namedMap,boolean forDSL) { + if(parameters!=null && targetParameters!=null){ + for(int i=0;itargetParameters.size()-1){ + break; + } + Parameter parameter=parameters.get(i); + com.itheima.sfbx.framework.rule.model.library.action.Parameter p=targetParameters.get(i); + parameter.setType(p.getType()); + Value value=parameter.getValue(); + rebuildValue(value, resLibraries,namedMap,forDSL); + } + } + } + public void rebuildCriterion(Criterion criterion,ResourceLibrary resLibraries,Map namedMap,boolean forDSL){ + if(criterion==null){ + return; + } + if(criterion instanceof Criteria){ + Criteria criteria=(Criteria)criterion; + rebuildCriteria(resLibraries,criteria,namedMap,forDSL); + }else if(criterion instanceof Junction){ + Junction junction=(Junction)criterion; + Collection criterionList=junction.getCriterions(); + if(criterionList!=null){ + for(Criterion c:criterionList){ + rebuildCriterion(c, resLibraries,namedMap,forDSL); + } + } + }else if(criterion instanceof NamedCriteria){ + NamedCriteria namedCriteria=(NamedCriteria)criterion; + namedMap.put(namedCriteria.getReferenceName(), namedCriteria.getVariableCategory()); + CriteriaUnit unit=namedCriteria.getUnit(); + buildCriteriaUnit(unit,resLibraries,namedMap,forDSL); + }else if(criterion instanceof NamedJunction){ + NamedJunction jun=(NamedJunction)criterion; + namedMap.put(jun.getReferenceName(), jun.getVariableCategory()); + } + } + + private void buildCriteriaUnit(CriteriaUnit unit,ResourceLibrary resLibraries,Map namedMap,boolean forDSL){ + Criteria criteria=unit.getCriteria(); + if(criteria!=null){ + rebuildCriteria(resLibraries,criteria,namedMap,forDSL); + } + List units=unit.getNextUnits(); + if(units!=null){ + for(CriteriaUnit nextUnit:units){ + buildCriteriaUnit(nextUnit, resLibraries,namedMap,forDSL); + } + } + } + + private void rebuildCriteria(ResourceLibrary resLibraries,Criteria criteria,Map namedMap,boolean forDSL) { + List variableCategories=resLibraries.getVariableCategories(); + Left left=criteria.getLeft(); + LeftPart leftPart=left.getLeftPart(); + if(leftPart instanceof VariableLeftPart){ + VariableLeftPart part=(VariableLeftPart)leftPart; + String variableLabel=part.getVariableLabel(); + String variableName=part.getVariableName(); + if(StringUtils.isNotBlank(variableLabel)){ + String variableCategory=part.getVariableCategory(); + if(forDSL){ + Variable var=getVariableByLabel(variableCategories, variableCategory, variableLabel,namedMap); + part.setVariableName(var.getName()); + part.setDatatype(var.getType()); + }else{ + Variable var=getVariableByName(variableCategories, variableCategory, variableName,namedMap); + part.setVariableLabel(var.getLabel()); + part.setDatatype(var.getType()); + } + } + }else if(leftPart instanceof AbstractLeftPart){ + AbstractLeftPart part=(AbstractLeftPart)leftPart; + String variableCategory=part.getVariableCategory(); + String variableLabel=part.getVariableLabel(); + String variableName=part.getVariableName(); + if(forDSL){ + Variable var=getVariableByLabel(variableCategories, variableCategory, variableLabel,namedMap); + part.setVariableName(var.getName()); + }else{ + Variable var=getVariableByName(variableCategories, variableCategory, variableName,namedMap); + part.setVariableLabel(var.getLabel()); + } + }else if(leftPart instanceof CommonFunctionLeftPart){ + CommonFunctionLeftPart p=(CommonFunctionLeftPart)leftPart; + CommonFunctionParameter parameter=p.getParameter(); + rebuildCommonFunctionParameter(parameter,resLibraries,namedMap,forDSL); + }else if(leftPart instanceof MethodLeftPart){ + MethodLeftPart part=(MethodLeftPart)leftPart; + String beanLabel=part.getBeanLabel(); + String methodLabel=part.getMethodLabel(); + List actionLibraries=resLibraries.getActionLibraries(); + SpringBean targetBean=null; + for(ActionLibrary al:actionLibraries){ + List beans=al.getSpringBeans(); + for(SpringBean bean:beans){ + if(beanLabel.equals(bean.getName())){ + part.setBeanId(bean.getId()); + targetBean=bean; + break; + } + } + if(targetBean!=null){ + break; + } + } + if(targetBean==null){ + throw new RuleException("Bean["+beanLabel+"] not exist."); + } + Method targetMethod=null; + for(Method method:targetBean.getMethods()){ + if(methodLabel.equals(method.getName())){ + targetMethod=method; + part.setMethodName(method.getMethodName()); + break; + } + } + if(targetMethod==null){ + throw new RuleException("Bean["+beanLabel+"] method["+targetMethod+"] not exist."); + } + List parameters=part.getParameters(); + rebuildParameters(resLibraries, parameters,targetMethod.getParameters(),namedMap,forDSL); + }else if(leftPart instanceof FunctionLeftPart){ + FunctionLeftPart part=(FunctionLeftPart)leftPart; + List parameters=part.getParameters(); + if(parameters!=null && parameters.size()>0){ + for(Parameter param:parameters){ + Value pv=param.getValue(); + if(pv==null){ + continue; + } + rebuildValue(pv,resLibraries,namedMap,forDSL); + } + } + } + Value value=criteria.getValue(); + rebuildValue(value, resLibraries,namedMap,forDSL); + } + + public void rebuildValue(Value value,ResourceLibrary resLibraries,Map namedMap,boolean forDSL){ + if(value==null){ + return; + } + if(value instanceof ParenValue){ + ParenValue pv=(ParenValue)value; + Value v=pv.getValue(); + rebuildValue(v,resLibraries,namedMap,forDSL); + }else if(value instanceof ConstantValue){ + ConstantValue cv=(ConstantValue)value; + String category=cv.getConstantCategory(); + if(forDSL){ + String label=cv.getConstantLabel(); + com.itheima.sfbx.framework.rule.model.library.constant.Constant constant=getConstantByLabel(resLibraries.getConstantCategories(), category, label); + cv.setConstantName(constant.getName()); + }else{ + String name=cv.getConstantName(); + com.itheima.sfbx.framework.rule.model.library.constant.Constant constant=getConstantByName(resLibraries.getConstantCategories(), category, name); + cv.setConstantLabel(constant.getLabel()); + } + }else if(value instanceof VariableValue){ + VariableValue variableValue=(VariableValue)value; + if(forDSL){ + if(StringUtils.isNotBlank(variableValue.getVariableLabel())){ + Variable var=getVariableByLabel(resLibraries.getVariableCategories(), variableValue.getVariableCategory(), variableValue.getVariableLabel(),namedMap); + variableValue.setVariableName(var.getName()); + variableValue.setDatatype(var.getType()); + } + }else{ + if(StringUtils.isNotBlank(variableValue.getVariableName())){ + Variable var=getVariableByName(resLibraries.getVariableCategories(), variableValue.getVariableCategory(), variableValue.getVariableName(),namedMap); + variableValue.setVariableLabel(var.getLabel()); + variableValue.setDatatype(var.getType()); + } + } + }else if(value instanceof ParameterValue){ + ParameterValue parameterValue=(ParameterValue)value; + if(forDSL){ + String variableLabel=parameterValue.getVariableLabel(); + Variable var=getVariableByLabel(resLibraries.getVariableCategories(), VariableCategory.PARAM_CATEGORY, variableLabel,namedMap); + parameterValue.setVariableName(var.getName()); + }else{ + String variableName=parameterValue.getVariableName(); + Variable var=getVariableByName(resLibraries.getVariableCategories(), VariableCategory.PARAM_CATEGORY, variableName,namedMap); + parameterValue.setVariableLabel(var.getLabel()); + } + }else if(value instanceof NamedReferenceValue){ + NamedReferenceValue refValue=(NamedReferenceValue)value; + String propertyLabel=refValue.getPropertyLabel(); + String propertyName=refValue.getPropertyName(); + String refName=refValue.getReferenceName(); + String variableCategory=namedMap.get(refName); + if(variableCategory==null){ + refName=refName.substring(1,refName.length()); + variableCategory=namedMap.get(refName); + } + if(variableCategory==null){ + throw new RuleException("Reference ["+refName+"] not define."); + } + if(forDSL){ + Variable var=getVariableByLabel(resLibraries.getVariableCategories(), variableCategory, propertyLabel,namedMap); + refValue.setPropertyName(var.getName()); + refValue.setDatatype(var.getType()); + }else{ + Variable var=getVariableByName(resLibraries.getVariableCategories(), variableCategory, propertyName,namedMap); + refValue.setPropertyLabel(var.getLabel()); + refValue.setDatatype(var.getType()); + } + }else if(value instanceof CommonFunctionValue){ + CommonFunctionValue cfv=(CommonFunctionValue)value; + CommonFunctionParameter parameter=cfv.getParameter(); + rebuildCommonFunctionParameter(parameter,resLibraries,namedMap,forDSL); + }else if(value instanceof MethodValue){ + MethodValue methodValue=(MethodValue)value; + String beanLabel=methodValue.getBeanLabel(); + String methodLabel=methodValue.getMethodLabel(); + List actionLibraries=resLibraries.getActionLibraries(); + SpringBean targetBean=null; + for(ActionLibrary al:actionLibraries){ + List beans=al.getSpringBeans(); + for(SpringBean bean:beans){ + if(beanLabel.equals(bean.getName())){ + methodValue.setBeanId(bean.getId()); + targetBean=bean; + break; + } + } + if(targetBean!=null)break; + } + if(targetBean==null){ + throw new RuleException("Bean["+beanLabel+"] not exist."); + } + Method targetMethod=null; + for(Method method:targetBean.getMethods()){ + if(methodLabel.equals(method.getName())){ + targetMethod=method; + methodValue.setMethodName(method.getMethodName()); + break; + } + } + if(targetMethod==null){ + throw new RuleException("Bean["+beanLabel+"] method["+targetMethod+"] not exist."); + } + List parameters=methodValue.getParameters(); + rebuildParameters(resLibraries, parameters,targetMethod.getParameters(),namedMap,forDSL); + } + ComplexArithmetic complexArithmetic=value.getArithmetic(); + if(complexArithmetic==null){ + return; + } + Value subValue=complexArithmetic.getValue(); + rebuildValue(subValue, resLibraries,namedMap,forDSL); + } + + private com.itheima.sfbx.framework.rule.model.library.constant.Constant getConstantByName(List constantCategories,String category,String name){ + for(ConstantCategory c:constantCategories){ + if(!c.getLabel().equals(category)){ + continue; + } + for(com.itheima.sfbx.framework.rule.model.library.constant.Constant constant:c.getConstants()){ + if(constant.getName().equals(name)){ + return constant; + } + } + } + throw new RuleException("Constant ["+category+"."+name+"] was not found."); + } + private com.itheima.sfbx.framework.rule.model.library.constant.Constant getConstantByLabel(List constantCategories,String category,String label){ + for(ConstantCategory c:constantCategories){ + if(!c.getLabel().equals(category)){ + continue; + } + for(com.itheima.sfbx.framework.rule.model.library.constant.Constant constant:c.getConstants()){ + if(constant.getLabel().equals(label)){ + return constant; + } + } + } + throw new RuleException("Constant ["+category+"."+label+"] was not found."); + } + + public Variable getVariableByName(List variableCategories,String category,String name,Map namedMap){ + if(namedMap!=null){ + if(namedMap.containsKey(category)){ + category=namedMap.get(category); + } + } + for(VariableCategory c:variableCategories){ + if(!c.getName().equals(category)){ + continue; + } + for(Variable var:c.getVariables()){ + if(var.getName().equals(name)){ + return var; + } + } + } + throw new RuleException("Variable ["+category+"."+name+"] was not found."); + } + public Variable getVariableByLabel(List variableCategories,String category,String label,Map namedMap){ + if(namedMap!=null){ + if(namedMap.containsKey(category)){ + category=namedMap.get(category); + } + } + for(VariableCategory c:variableCategories){ + if(!c.getName().equals(category)){ + continue; + } + for(Variable var:c.getVariables()){ + if(var.getLabel().equals(label)){ + return var; + } + } + } + throw new RuleException("Variable ["+category+"."+label+"] was not found."); + } + public void setResourceLibraryBuilder(ResourceLibraryBuilder resourceLibraryBuilder) { + this.resourceLibraryBuilder = resourceLibraryBuilder; + } + public ResourceLibraryBuilder getResourceLibraryBuilder() { + return resourceLibraryBuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ActionLibraryResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ActionLibraryResourceBuilder.java new file mode 100644 index 0000000..9cd73e6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ActionLibraryResourceBuilder.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.parse.deserializer.ActionLibraryDeserializer; +import org.dom4j.Element; + + +/** + * @author Jacky.gao + * @since 2014年11月22日 + */ +public class ActionLibraryResourceBuilder implements ResourceBuilder { + private ActionLibraryDeserializer actionLibraryDeserializer; + public ActionLibrary build(Element root) { + return actionLibraryDeserializer.deserialize(root); + } + + public void setActionLibraryDeserializer(ActionLibraryDeserializer actionLibraryDeserializer) { + this.actionLibraryDeserializer = actionLibraryDeserializer; + } + public boolean support(Element root) { + return actionLibraryDeserializer.support(root); + } + public ResourceType getType() { + return ResourceType.ActionLibrary; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ConstantLibraryResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ConstantLibraryResourceBuilder.java new file mode 100644 index 0000000..c678f80 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ConstantLibraryResourceBuilder.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantLibrary; +import com.itheima.sfbx.framework.rule.parse.deserializer.ConstantLibraryDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月15日 + */ +public class ConstantLibraryResourceBuilder implements ResourceBuilder { + private ConstantLibraryDeserializer constantLibraryDeserializer; + public ConstantLibrary build(Element root) { + return constantLibraryDeserializer.deserialize(root); + } + public boolean support(Element root) { + return constantLibraryDeserializer.support(root); + } + public ResourceType getType() { + return ResourceType.ConstantLibrary; + }; + public void setConstantLibraryDeserializer( + ConstantLibraryDeserializer constantLibraryDeserializer) { + this.constantLibraryDeserializer = constantLibraryDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTableResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTableResourceBuilder.java new file mode 100644 index 0000000..6b31379 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTableResourceBuilder.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.table.DecisionTable; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTableDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年2月9日 + */ +public class DecisionTableResourceBuilder implements ResourceBuilder { + private DecisionTableDeserializer decisionTableDeserializer; + public DecisionTable build(Element root) { + return decisionTableDeserializer.deserialize(root); + } + public ResourceType getType() { + return ResourceType.DecisionTable; + } + public boolean support(Element root) { + return decisionTableDeserializer.support(root); + } + public void setDecisionTableDeserializer( + DecisionTableDeserializer decisionTableDeserializer) { + this.decisionTableDeserializer = decisionTableDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTreeResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTreeResourceBuilder.java new file mode 100644 index 0000000..3fa29f4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/DecisionTreeResourceBuilder.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.decisiontree.DecisionTree; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTreeDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年2月29日 + */ +public class DecisionTreeResourceBuilder implements ResourceBuilder { + private DecisionTreeDeserializer decisionTreeDeserializer; + @Override + public DecisionTree build(Element root) { + return decisionTreeDeserializer.deserialize(root); + } + @Override + public ResourceType getType() { + return ResourceType.DecisionTree; + } + @Override + public boolean support(Element root) { + return decisionTreeDeserializer.support(root); + } + public void setDecisionTreeDeserializer( + DecisionTreeDeserializer decisionTreeDeserializer) { + this.decisionTreeDeserializer = decisionTreeDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FileResourceProvider.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FileResourceProvider.java new file mode 100644 index 0000000..50bdb0c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FileResourceProvider.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.RuleException; +import org.apache.commons.io.IOUtils; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.io.IOException; +import java.io.InputStream; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class FileResourceProvider implements ResourceProvider,ApplicationContextAware { + private ApplicationContext applicationContext; + + @Override + public Resource provide(String path,String version) { + try { + InputStream inputStream=applicationContext.getResource(path).getInputStream(); + String content=IOUtils.toString(inputStream,"utf-8"); + IOUtils.closeQuietly(inputStream); + return new Resource(content,path); + } catch (IOException e) { + throw new RuleException(e); + } + } + + public boolean support(String path) { + return path.startsWith("classpath:") || path.startsWith("file:") || path.startsWith("WEB-INF/"); + } + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext=applicationContext; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FlowResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FlowResourceBuilder.java new file mode 100644 index 0000000..71f8dde --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/FlowResourceBuilder.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.parse.deserializer.FlowDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class FlowResourceBuilder implements ResourceBuilder { + private FlowDeserializer flowDeserializer; + public FlowDefinition build(Element root) { + return flowDeserializer.deserialize(root); + } + public ResourceType getType() { + return ResourceType.Flow; + } + public boolean support(Element root) { + return flowDeserializer.support(root); + } + public void setFlowDeserializer(FlowDeserializer flowDeserializer) { + this.flowDeserializer = flowDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ParameterLibraryResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ParameterLibraryResourceBuilder.java new file mode 100644 index 0000000..2a93287 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ParameterLibraryResourceBuilder.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.library.variable.CategoryType; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.parse.deserializer.ParameterLibraryDeserializer; +import org.dom4j.Element; + +import java.util.HashMap; + +/** + * @author Jacky.gao + * @since 2015年3月11日 + */ +public class ParameterLibraryResourceBuilder implements ResourceBuilder { + private ParameterLibraryDeserializer parameterLibraryDeserializer; + @Override + public VariableCategory build(Element root) { + VariableCategory category=new VariableCategory(); + category.setName(VariableCategory.PARAM_CATEGORY); + category.setClazz(HashMap.class.getName()); + category.setType(CategoryType.Clazz); + category.setVariables(parameterLibraryDeserializer.deserialize(root)); + return category; + } + @Override + public ResourceType getType() { + return ResourceType.ParameterLibrary; + } + @Override + public boolean support(Element root) { + return parameterLibraryDeserializer.support(root); + } + public void setParameterLibraryDeserializer( + ParameterLibraryDeserializer parameterLibraryDeserializer) { + this.parameterLibraryDeserializer = parameterLibraryDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/Resource.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/Resource.java new file mode 100644 index 0000000..5ed0fdd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/Resource.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class Resource { + private String path; + private String content; + public Resource(String content,String path) { + this.content = content; + this.path=path; + } + public String getPath() { + return path; + } + public String getContent() { + return content; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceBuilder.java new file mode 100644 index 0000000..6f704c4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceBuilder.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import org.dom4j.Element; + + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public interface ResourceBuilder{ + T build(Element root); + boolean support(Element root); + ResourceType getType(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceProvider.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceProvider.java new file mode 100644 index 0000000..38b5568 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceProvider.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public interface ResourceProvider { + Resource provide(String path,String version); + boolean support(String path); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceType.java new file mode 100644 index 0000000..f1b9aa4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ResourceType.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public enum ResourceType { + RuleSet,DecisionTable,ScriptDecisionTable,CrossDecisionTable,Flow,VariableLibrary,ActionLibrary,ConstantLibrary,ParameterLibrary,DecisionTree,Scorecard; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleResource.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleResource.java new file mode 100644 index 0000000..2f24785 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleResource.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class RuleResource extends Resource { + public RuleResource(String content,String path) { + super(content,path); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleSetResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleSetResourceBuilder.java new file mode 100644 index 0000000..c400c09 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/RuleSetResourceBuilder.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import com.itheima.sfbx.framework.rule.parse.deserializer.RuleSetDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class RuleSetResourceBuilder implements ResourceBuilder { + private RuleSetDeserializer ruleSetDeserializer; + public RuleSet build(Element root) { + return ruleSetDeserializer.deserialize(root); + } + public boolean support(Element root) { + return ruleSetDeserializer.support(root); + } + public ResourceType getType() { + return ResourceType.RuleSet; + } + public void setRuleSetDeserializer(RuleSetDeserializer ruleSetDeserializer) { + this.ruleSetDeserializer = ruleSetDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScorecardResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScorecardResourceBuilder.java new file mode 100644 index 0000000..51d35d0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScorecardResourceBuilder.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ScoringAction; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBase; +import com.itheima.sfbx.framework.rule.builder.ResourceLibraryBuilder; +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.rete.Rete; +import com.itheima.sfbx.framework.rule.model.rete.builder.ReteBuilder; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import com.itheima.sfbx.framework.rule.model.scorecard.*; +import com.itheima.sfbx.framework.rule.model.scorecard.runtime.ScoreRule; +import com.itheima.sfbx.framework.rule.model.scorecard.runtime.ScoreRuntimeValue; +import com.itheima.sfbx.framework.rule.model.table.Condition; +import com.itheima.sfbx.framework.rule.parse.deserializer.ScorecardDeserializer; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class ScorecardResourceBuilder implements ResourceBuilder { + private ReteBuilder reteBuilder; + private ResourceLibraryBuilder resourceLibraryBuilder; + private ScorecardDeserializer scorecardDeserializer; + private RulesRebuilder rulesRebuilder; + @Override + public ScoreRule build(Element root) { + ScorecardDefinition scorecard = scorecardDeserializer.deserialize(root); + ScoreRule scoreRule=new ScoreRule(); + scoreRule.setName(scorecard.getName()); + scoreRule.setEffectiveDate(scorecard.getEffectiveDate()); + scoreRule.setExpiresDate(scorecard.getExpiresDate()); + scoreRule.setEnabled(scorecard.getEnabled()); + scoreRule.setSalience(scorecard.getSalience()); + scoreRule.setDebug(scorecard.getDebug()); + + scoreRule.setScoringBean(scorecard.getScoringBean()); + scoreRule.setScoringType(scorecard.getScoringType()); + + scoreRule.setAssignTargetType(scorecard.getAssignTargetType()); + + scoreRule.setDatatype(scorecard.getDatatype()); + scoreRule.setVariableCategory(scorecard.getVariableCategory()); + scoreRule.setVariableName(scorecard.getVariableName()); + scoreRule.setVariableLabel(scorecard.getVariableLabel()); + scoreRule.setLibraries(scorecard.getLibraries()); + List rows=scorecard.getRows(); + List cells=scorecard.getCells(); + List customCols=scorecard.getCustomCols(); + String attributeVariableCategory=scorecard.getAttributeColVariableCategory(); + List rules=new ArrayList(); + for(AttributeRow row:rows){ + List conditionRows=row.getConditionRows(); + int attributeRowNumber=row.getRowNumber(); + Rule rule = buildRule(cells, customCols,attributeVariableCategory, attributeRowNumber,attributeRowNumber); + rules.add(rule); + rule.setDebug(scorecard.getDebug()); + for(ConditionRow conditionRow:conditionRows){ + int conditionRowNumber=conditionRow.getRowNumber(); + Rule r = buildRule(cells,customCols,attributeVariableCategory,attributeRowNumber,conditionRowNumber); + r.setDebug(scorecard.getDebug()); + rules.add(r); + } + } + rulesRebuilder.rebuildRules(scorecard.getLibraries(), rules); + ResourceLibrary resourceLibrary=resourceLibraryBuilder.buildResourceLibrary(scorecard.getLibraries()); + Rete rete=reteBuilder.buildRete(rules, resourceLibrary); + KnowledgeBase base=new KnowledgeBase(rete); + KnowledgePackageWrapper knowledgePackageWrapper=new KnowledgePackageWrapper(base.getKnowledgePackage()); + scoreRule.setKnowledgePackageWrapper(knowledgePackageWrapper); + return scoreRule; + } + + + private Rule buildRule(List cells, List customCols,String attributeVariableCategory, int attributeRowNumber,int rowNumber) { + Rule scoreRule=buildScoreRule(cells, attributeVariableCategory,attributeRowNumber,rowNumber); + scoreRule.getRhs().getActions().addAll(buildCustomColActions(cells, customCols, attributeRowNumber)); + return scoreRule; + } + + + private List buildCustomColActions(List cells,List customCols,int rowNumber){ + List actions=new ArrayList(); + for(CustomCol col:customCols){ + ScoringAction action=new ScoringAction(rowNumber,col.getName(),null); + CardCell cardCell=fetchCell(cells, rowNumber, col.getColNumber()); + action.setValue(cardCell.getValue()); + actions.add(action); + } + return actions; + } + + private Rule buildScoreRule(List cells,String attributeVariableCategory,int attributeRowNumber,int rowNumber) { + CardCell attributeCell=fetchCell(cells, attributeRowNumber, 1); + CardCell conditionCell=fetchCell(cells, rowNumber, 2); + CardCell scoreCell=fetchCell(cells, rowNumber, 3); + Rule rule = buildRule(attributeVariableCategory,attributeCell,conditionCell,scoreCell); + rule.setName("sc"+rowNumber); + return rule; + } + + + private Rule buildRule(String variableCategory,CardCell attributeCell,CardCell conditionCell,CardCell scoreCell){ + Rule rule=new Rule(); + Lhs lhs=new Lhs(); + rule.setLhs(lhs); + Junction jun=conditionCell.getJoint().getJunction(); + lhs.setCriterion(jun); + for(Condition condition:conditionCell.getJoint().getConditions()){ + Criteria criteria=new Criteria(); + criteria.setOp(condition.getOp()); + Left left=new Left(); + VariableLeftPart leftPart=new VariableLeftPart(); + leftPart.setVariableCategory(variableCategory); + leftPart.setDatatype(attributeCell.getDatatype()); + leftPart.setVariableName(attributeCell.getVariableName()); + leftPart.setVariableLabel(attributeCell.getVariableLabel()); + left.setLeftPart(leftPart); + criteria.setLeft(left); + left.setType(LeftType.variable); + criteria.setValue(condition.getValue()); + jun.addCriterion(criteria); + } + Rhs rhs=new Rhs(); + rule.setRhs(rhs); + ScoringAction action=new ScoringAction(attributeCell.getRow(),ScoreRuntimeValue.SCORE_VALUE,attributeCell.getWeight()); + action.setValue(scoreCell.getValue()); + rhs.addAction(action); + return rule; + } + + private CardCell fetchCell(List cells,int row,int col){ + for(CardCell cell:cells){ + if(cell.getRow()==row && cell.getCol()==col){ + return cell; + } + } + throw new RuleException("CardCell ["+row+","+col+"] not exist."); + } + + @Override + public ResourceType getType() { + return ResourceType.Scorecard; + } + @Override + public boolean support(Element root) { + return scorecardDeserializer.support(root); + } + + public void setScorecardDeserializer(ScorecardDeserializer scorecardDeserializer) { + this.scorecardDeserializer = scorecardDeserializer; + } + public void setResourceLibraryBuilder(ResourceLibraryBuilder resourceLibraryBuilder) { + this.resourceLibraryBuilder = resourceLibraryBuilder; + } + public void setReteBuilder(ReteBuilder reteBuilder) { + this.reteBuilder = reteBuilder; + } + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScriptDecisionTableResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScriptDecisionTableResourceBuilder.java new file mode 100644 index 0000000..8a4dd36 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/ScriptDecisionTableResourceBuilder.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.table.ScriptDecisionTable; +import com.itheima.sfbx.framework.rule.parse.deserializer.ScriptDecisionTableDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年2月9日 + */ +public class ScriptDecisionTableResourceBuilder implements ResourceBuilder { + private ScriptDecisionTableDeserializer scriptDecisionTableDeserializer; + public ScriptDecisionTable build(Element root) { + return scriptDecisionTableDeserializer.deserialize(root); + } + public ResourceType getType() { + return ResourceType.ScriptDecisionTable; + } + public boolean support(Element root) { + return scriptDecisionTableDeserializer.support(root); + } + public void setScriptDecisionTableDeserializer( + ScriptDecisionTableDeserializer scriptDecisionTableDeserializer) { + this.scriptDecisionTableDeserializer = scriptDecisionTableDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResource.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResource.java new file mode 100644 index 0000000..944af3d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResource.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + + + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class VariableLibraryResource extends Resource { + public VariableLibraryResource(String content,String path) { + super(content,path); + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResourceBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResourceBuilder.java new file mode 100644 index 0000000..90f5a75 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/resource/VariableLibraryResourceBuilder.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.resource; + +import com.itheima.sfbx.framework.rule.model.library.variable.VariableLibrary; +import com.itheima.sfbx.framework.rule.parse.deserializer.VariableLibraryDeserializer; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月22日 + */ +public class VariableLibraryResourceBuilder implements ResourceBuilder { + private VariableLibraryDeserializer variableLibraryDeserializer; + public VariableLibrary build(Element root) { + VariableLibrary lib=new VariableLibrary(); + lib.setVariableCategories(variableLibraryDeserializer.deserialize(root)); + return lib; + } + + public boolean support(Element root) { + return variableLibraryDeserializer.support(root); + } + public ResourceType getType() { + return ResourceType.VariableLibrary; + } + public void setVariableLibraryDeserializer(VariableLibraryDeserializer variableLibraryDeserializer) { + this.variableLibraryDeserializer = variableLibraryDeserializer; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellContentBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellContentBuilder.java new file mode 100644 index 0000000..138757a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellContentBuilder.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.table; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import com.itheima.sfbx.framework.rule.model.table.*; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class CellContentBuilder { + public Criterion buildCriterion(Cell cell,Column col){ + Joint joint=cell.getJoint(); + if(joint==null){ + return null; + } + List conditions=joint.getConditions(); + List joints=joint.getJoints(); + if((conditions==null || conditions.size()==0) && (joints==null || joints.size()==0)){ + return null; + } + Junction topJunction=null; + if(conditions.size()==1){ + return newCriteria(col, conditions.get(0)); + }else{ + if(joint.getType().equals(JointType.and)){ + topJunction=new And(); + }else{ + topJunction=new Or(); + } + buildConditionsCriterion(conditions, topJunction, col); + buildJointsCriterion(joints, col, topJunction); + return topJunction; + } + } + private void buildJointsCriterion(List joints,Column col,Junction parentJunction){ + if(joints==null || joints.size()==0){ + return; + } + for(Joint joint:joints){ + Junction junction=joint.getJunction(); + List conditions=joint.getConditions(); + buildConditionsCriterion(conditions,junction,col); + List children=joint.getJoints(); + buildJointsCriterion(children,col,junction); + parentJunction.addCriterion(junction); + } + } + private void buildConditionsCriterion(List conditions,Junction junction,Column col){ + if(conditions==null || conditions.size()==0){ + return; + } + for(Condition condition:conditions){ + Criteria criteria = newCriteria(col, condition); + junction.addCriterion(criteria); + } + } + private Criteria newCriteria(Column col, Condition condition) { + Criteria criteria=new Criteria(); + Left left=new Left(); + VariableLeftPart part=new VariableLeftPart(); + part.setVariableCategory(col.getVariableCategory()); + part.setVariableName(col.getVariableName()); + part.setVariableLabel(col.getVariableLabel()); + part.setDatatype(col.getDatatype()); + left.setLeftPart(part); + left.setType(LeftType.variable); + criteria.setLeft(left); + criteria.setOp(condition.getOp()); + criteria.setValue(condition.getValue()); + return criteria; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellScriptDSLBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellScriptDSLBuilder.java new file mode 100644 index 0000000..fb522be --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/CellScriptDSLBuilder.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.table; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.CellScriptRuleParserBaseVisitor; +import com.itheima.sfbx.framework.rule.dsl.RuleParserLexer; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser; +import com.itheima.sfbx.framework.rule.dsl.ScriptDecisionTableErrorListener; +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; + +/** + * @author Jacky.gao + * @since 2015年5月6日 + */ +public class CellScriptDSLBuilder { + public String buildCriteriaScript(String script,String propertyName){ + ANTLRInputStream antlrInputStream=new ANTLRInputStream(script); + RuleParserLexer lexer=new RuleParserLexer(antlrInputStream); + CommonTokenStream tokenStream=new CommonTokenStream(lexer); + RuleParserParser parser=new RuleParserParser(tokenStream); + ScriptDecisionTableErrorListener errorListener=new ScriptDecisionTableErrorListener(); + parser.addErrorListener(errorListener); + CellScriptRuleParserBaseVisitor visitor=new CellScriptRuleParserBaseVisitor(propertyName); + String resultScript=visitor.visit(parser.decisionTableCellCondition()); + String error=errorListener.getErrorMessage(); + if(error!=null){ + throw new RuleException("Script Parse error:"+error); + } + return resultScript; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/DecisionTableRulesBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/DecisionTableRulesBuilder.java new file mode 100644 index 0000000..1bec97f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/DecisionTableRulesBuilder.java @@ -0,0 +1,124 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.table; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.AbstractAction; +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ConsolePrintAction; +import com.itheima.sfbx.framework.rule.action.VariableAssignAction; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.lhs.And; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Lhs; +import com.itheima.sfbx.framework.rule.model.table.*; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class DecisionTableRulesBuilder { + private CellContentBuilder cellContentBuilder; + public List buildRules(DecisionTable table){ + List rules=new ArrayList(); + List rows=table.getRows(); + List columns=table.getColumns(); + for(Row row:rows){ + Rule rule=new Rule(); + rule.setDebug(table.getDebug()); + rule.setSalience(table.getSalience()); + rule.setExpiresDate(table.getExpiresDate()); + rule.setEffectiveDate(table.getEffectiveDate()); + rule.setEnabled(table.getEnabled()); + rule.setName("r"+row.getNum()); + Lhs lhs=new Lhs(); + And and=new And(); + lhs.setCriterion(and); + rule.setLhs(lhs); + Rhs rhs=new Rhs(); + rule.setRhs(rhs); + rules.add(rule); + Value value=null; + for(Column col:columns){ + Cell cell=getCell(table,row.getNum(),col.getNum()); + ColumnType type=col.getType(); + switch(type){ + case Criteria: + Criterion criterion=cellContentBuilder.buildCriterion(cell,col); + if(criterion!=null){ + and.addCriterion(criterion); + } + break; + case ConsolePrint: + value=cell.getValue(); + if(value!=null){ + ConsolePrintAction consolePrintAction=new ConsolePrintAction(); + consolePrintAction.setPriority(1000-col.getNum()); + consolePrintAction.setValue(value); + rhs.addAction(consolePrintAction); + } + break; + case Assignment: + value=cell.getValue(); + if(value!=null){ + VariableAssignAction variableAssignAction=new VariableAssignAction(); + variableAssignAction.setPriority(1000-col.getNum()); + variableAssignAction.setValue(value); + variableAssignAction.setDatatype(col.getDatatype()); + variableAssignAction.setVariableName(col.getVariableName()); + variableAssignAction.setVariableLabel(col.getVariableLabel()); + variableAssignAction.setVariableCategory(col.getVariableCategory()); + rhs.addAction(variableAssignAction); + } + break; + case ExecuteMethod: + Action action=cell.getAction(); + if(action!=null){ + AbstractAction aa=(AbstractAction)action; + aa.setPriority(1000-col.getNum()); + rhs.addAction(aa); + } + break; + } + } + } + return rules; + } + private Cell getCell(DecisionTable table,int row,int column){ + Map cellMap=table.getCellMap(); + Cell cell=null; + for(int i=row;i>-1;i--){ + String key=table.buildCellKey(i,column); + if(cellMap.containsKey(key)){ + cell=cellMap.get(key); + break; + } + } + if(cell==null){ + throw new RuleException("Decision table cell["+row+","+column+"] not exist."); + } + return cell; + } + public void setCellContentBuilder(CellContentBuilder cellContentBuilder) { + this.cellContentBuilder = cellContentBuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/ScriptDecisionTableRulesBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/ScriptDecisionTableRulesBuilder.java new file mode 100644 index 0000000..88c7947 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/builder/table/ScriptDecisionTableRulesBuilder.java @@ -0,0 +1,139 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.builder.table; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.DSLRuleSetBuilder; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import com.itheima.sfbx.framework.rule.model.table.*; +import org.apache.commons.lang.StringUtils; + +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class ScriptDecisionTableRulesBuilder { + private CellScriptDSLBuilder cellScriptDSLBuilder; + private DSLRuleSetBuilder dslRuleSetBuilder; + public RuleSet buildRules(ScriptDecisionTable table) throws IOException{ + List rows=table.getRows(); + List columns=table.getColumns(); + List libraries=table.getLibraries(); + StringBuffer sb = buildLibraryScript(libraries); + for(Row row:rows){ + sb.append("rule \"r"+row.getNum()+"\""); + sb.append("\r\n"); + sb.append("if"); + sb.append("\r\n"); + StringBuffer criteriasSb=new StringBuffer(); + StringBuffer actionsSb=new StringBuffer(); + for(Column col:columns){ + ScriptCell cell=getCell(table,row.getNum(),col.getNum()); + String script=cell.getScript(); + if(StringUtils.isBlank(script)){ + continue; + } + ColumnType type=col.getType(); + switch(type){ + case Criteria: + String propertyName=col.getVariableCategory()+"."+col.getVariableLabel(); + String newScript=cellScriptDSLBuilder.buildCriteriaScript(script, propertyName); + if(StringUtils.isBlank(newScript)){ + continue; + } + newScript=newScript.trim(); + if(criteriasSb.length()>1){ + criteriasSb.append(" and "); + } + if(!newScript.startsWith("(")){ + newScript="("+newScript+")"; + } + criteriasSb.append(newScript); + break; + case ConsolePrint: + actionsSb.append("out("+script+");\r\n"); + break; + case Assignment: + propertyName=col.getVariableCategory()+"."+col.getVariableLabel(); + actionsSb.append(propertyName+" = "+script+";\r\n"); + break; + case ExecuteMethod: + actionsSb.append(script+";\r\n"); + break; + } + } + sb.append(criteriasSb); + sb.append("\r\n"); + sb.append("then"); + sb.append("\r\n"); + sb.append(actionsSb); + sb.append("\r\n"); + sb.append("end;"); + sb.append("\r\n"); + } + RuleSet ruleSet=dslRuleSetBuilder.build(sb.toString()); + return ruleSet; + } + private StringBuffer buildLibraryScript(List libraries) { + StringBuffer sb=new StringBuffer(); + for(Library lib:libraries){ + LibraryType type=lib.getType(); + switch(type){ + case Action: + sb.append("importActionLibrary \""+lib.getPath()+"\";\r\n"); + break; + case Constant: + sb.append("importConstantLibrary \""+lib.getPath()+"\";\r\n"); + break; + case Parameter: + sb.append("importParameterLibrary \""+lib.getPath()+"\";\r\n"); + break; + case Variable: + sb.append("importVariableLibrary \""+lib.getPath()+"\";\r\n"); + break; + } + } + return sb; + } + private ScriptCell getCell(ScriptDecisionTable table,int row,int column){ + Map cellMap=table.getCellMap(); + ScriptCell cell=null; + for(int i=row;i>-1;i--){ + String key=table.buildCellKey(i,column); + if(cellMap.containsKey(key)){ + cell=cellMap.get(key); + break; + } + } + if(cell==null){ + throw new RuleException("Decision table cell["+row+","+column+"] not exist."); + } + return cell; + } + + public void setCellScriptDSLBuilder(CellScriptDSLBuilder cellScriptDSLBuilder) { + this.cellScriptDSLBuilder = cellScriptDSLBuilder; + } + public void setDslRuleSetBuilder(DSLRuleSetBuilder dslRuleSetBuilder) { + this.dslRuleSetBuilder = dslRuleSetBuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DebugWriter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DebugWriter.java new file mode 100644 index 0000000..37c5d83 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DebugWriter.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.debug; + +import java.io.IOException; +import java.util.List; + + +/** + * @author Jacky.gao + * @since 2017年11月27日 + */ +public interface DebugWriter { + void write(List items) throws IOException; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DefaultHtmlFileDebugWriter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DefaultHtmlFileDebugWriter.java new file mode 100644 index 0000000..d1a8e9a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/DefaultHtmlFileDebugWriter.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.framework.rule.debug; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2017年11月27日 + */ +public class DefaultHtmlFileDebugWriter implements DebugWriter{ + private String path; + @Override + public void write(List items) throws IOException{ + if(StringUtils.isBlank(path)){ + return; + } + StringBuilder msg=new StringBuilder(); + for(MessageItem item:items){ + msg.append(item.toHtml()); + } + String fullPath=path+"/urule-debug.html"; + StringBuilder sb=new StringBuilder(); + sb.append("URule调试日志信息"); + sb.append(msg.toString()); + sb.append(""); + FileOutputStream out=new FileOutputStream(new File(fullPath)); + IOUtils.write(sb.toString(), out); + out.flush(); + out.close(); + } + public void setPath(String path) { + this.path = path; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MessageItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MessageItem.java new file mode 100644 index 0000000..062111b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MessageItem.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.debug; + +/** + * @author Jacky.gao + * @since 2017年11月27日 + */ +public class MessageItem { + private String msg; + private MsgType type; + public MessageItem(String msg,MsgType type) { + this.msg=msg; + this.type=type; + } + public String toHtml(){ + String color="#000"; + switch(type){ + case Condition: + color="#6495ED"; + break; + case ConsoleOutput: + color="#000"; + break; + case ExecuteBeanMethod: + color="#8A2BE2"; + break; + case ExecuteFunction: + color="#008B8B"; + break; + case RuleFlow: + color="#9932CC"; + break; + case VarAssign: + color="#FF7F50"; + break; + case ScoreCard: + color="#40E0D0"; + break; + case RuleMatch: + color="#666600"; + break; + } + return "
"+msg+"
"; + } + public String getMsg() { + return msg; + } + public MsgType getType() { + return type; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MsgType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MsgType.java new file mode 100644 index 0000000..a0632ac --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/debug/MsgType.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.debug; + +/** + * @author Jacky.gao + * @since 2017年11月27日 + */ +public enum MsgType { + Condition,VarAssign,ExecuteBeanMethod,ExecuteFunction,ConsoleOutput,RuleFlow,ScoreCard,RuleMatch +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/BuildRulesVisitor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/BuildRulesVisitor.java new file mode 100644 index 0000000..210e816 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/BuildRulesVisitor.java @@ -0,0 +1,414 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.*; +import com.itheima.sfbx.framework.rule.dsl.builder.BuildUtils; +import com.itheima.sfbx.framework.rule.dsl.builder.ContextBuilder; +import com.itheima.sfbx.framework.rule.dsl.builder.NamedConditionBuilder; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopEnd; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopStart; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopTarget; +import org.antlr.v4.runtime.CommonTokenStream; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.misc.Interval; +import org.antlr.v4.runtime.tree.ParseTree; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年2月14日 + */ +public class BuildRulesVisitor extends RuleParserBaseVisitor { + private Map map=new HashMap(); + private Collection builders; + private NamedConditionBuilder namedConditionBuilder=new NamedConditionBuilder(); + private CommonTokenStream tokenStream; + public BuildRulesVisitor(Collection builders,CommonTokenStream tokenStream) { + this.builders=builders; + this.tokenStream=tokenStream; + } + + @Override + public RuleSet visitRuleSet(RuleSetContext ctx) { + RuleSet ruleSet=new RuleSet(); + RuleSetHeaderContext ruleSetHeaderContext=ctx.ruleSetHeader(); + List resourcesContext=ruleSetHeaderContext.resource(); + if(resourcesContext!=null){ + for(ResourceContext context:resourcesContext){ + ruleSet.addLibrary(visitResource(context)); + } + } + StringBuffer sb=null; + List functionImportContextList=ruleSetHeaderContext.functionImport(); + if(functionImportContextList!=null){ + sb=new StringBuffer(); + for(FunctionImportContext importContext:functionImportContextList){ + sb.append("import "); + sb.append(importContext.packageDef().getText()); + sb.append(";"); + } + } + RuleSetBodyContext ruleSetBodyContext=ctx.ruleSetBody(); + List rulesContextList=ruleSetBodyContext.rules(); + if(rulesContextList!=null){ + List rules=new ArrayList(); + ruleSet.setRules(rules); + for(RulesContext ruleContext:rulesContextList){ + RuleDefContext ruleDefContext=ruleContext.ruleDef(); + if(ruleDefContext!=null){ + Rule rule=visitRuleDef(ruleDefContext); + rules.add(rule); + } + LoopRuleDefContext loopRuleDefContext=ruleContext.loopRuleDef(); + if(loopRuleDefContext!=null){ + LoopRule rule=visitLoopRuleDef(loopRuleDefContext); + rules.add(rule); + } + } + } + return ruleSet; + } + + @SuppressWarnings("unused") + private String buildFunctionBody(ExpressionBodyContext expressionBodyContext){ + StringBuffer sb=new StringBuffer(); + for(ParseTree node:expressionBodyContext.children){ + Interval interval=node.getSourceInterval(); + int index=interval.a; + List leftTokens=tokenStream.getHiddenTokensToLeft(index); + if(leftTokens!=null){ + Token token=leftTokens.get(0); + String text=token.getText(); + sb.append(text); + } + sb.append(node.getText()); + List rightTokens=tokenStream.getHiddenTokensToRight(index); + if(rightTokens!=null){ + Token token=rightTokens.get(0); + String text=token.getText(); + sb.append(text); + } + } + return sb.toString(); + } + + @Override + public Library visitResource(ResourceContext ctx) { + return (Library)doBuilder(ctx); + } + + @Override + public LoopRule visitLoopRuleDef(LoopRuleDefContext ctx) { + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + LoopRule rule=new LoopRule(); + String name=ctx.STRING().getText(); + name=name.substring(1,name.length()-1); + rule.setName(name); + + LoopTargetContext target=ctx.loopTarget(); + ComplexValueContext valueContext=target.complexValue(); + LoopTarget loopTarget=new LoopTarget(); + loopTarget.setValue(BuildUtils.buildValue(valueContext)); + rule.setLoopTarget(loopTarget); + + LoopStartContext startContext=ctx.loopStart(); + if(startContext!=null){ + List actionContextList=startContext.action(); + if(actionContextList!=null){ + LoopStart loopStart=new LoopStart(); + loopStart.setActions(buildActions(actionContextList)); + rule.setLoopStart(loopStart); + } + } + + LoopEndContext endContext=ctx.loopEnd(); + if(endContext!=null){ + List actionContextList=endContext.action(); + if(actionContextList!=null){ + LoopEnd loopEnd=new LoopEnd(); + loopEnd.setActions(buildActions(actionContextList)); + rule.setLoopEnd(loopEnd); + } + } + + + List attributesContext=ctx.attribute(); + if(attributesContext!=null){ + for(AttributeContext context:attributesContext){ + if(context.salienceAttribute()!=null){ + rule.setSalience(Integer.valueOf(context.salienceAttribute().NUMBER().getText())); + }else if(context.loopAttribute()!=null){ + rule.setLoop(Boolean.valueOf(context.loopAttribute().Boolean().getText())); + }else if(context.effectiveDateAttribute()!=null){ + try { + String dateValue=context.effectiveDateAttribute().STRING().getText(); + dateValue=dateValue.substring(1,dateValue.length()-1); + rule.setEffectiveDate(sd.parse(dateValue)); + } catch (ParseException e) { + throw new RuleException(e); + } + }else if(context.expiresDateAttribute()!=null){ + try { + String dateValue=context.expiresDateAttribute().STRING().getText(); + dateValue=dateValue.substring(1,dateValue.length()-1); + rule.setExpiresDate(sd.parse(dateValue)); + } catch (ParseException e) { + throw new RuleException(e); + } + }else if(context.enabledAttribute()!=null){ + rule.setEnabled(Boolean.valueOf(context.enabledAttribute().Boolean().getText())); + }else if(context.debugAttribute()!=null){ + rule.setDebug(Boolean.valueOf(context.debugAttribute().Boolean().getText())); + }else if(context.activationGroupAttribute()!=null){ + String value=context.activationGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setActivationGroup(value); + }else if(context.agendaGroupAttribute()!=null){ + String value=context.agendaGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setAgendaGroup(value); + }else if(context.autoFocusAttribute()!=null){ + rule.setAutoFocus(Boolean.valueOf(context.autoFocusAttribute().Boolean().getText())); + }else if(context.ruleflowGroupAttribute()!=null){ + String value=context.ruleflowGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setRuleflowGroup(value); + } + } + } + LeftContext leftContext=ctx.left(); + ParseTree parseTree=leftContext.getChild(1); + Lhs lhs=new Lhs(); + rule.setLhs(lhs); + Criterion criterion = buildCriterion(parseTree); + lhs.setCriterion(criterion); + Rhs rhs=new Rhs(); + rhs.setActions(visitRight(ctx.right())); + rule.setRhs(rhs); + + Other other=new Other(); + other.setActions(visitOther(ctx.other())); + rule.setOther(other); + return rule; + } + + @Override + public Rule visitRuleDef(RuleDefContext ctx) { + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + Rule rule=new Rule(); + String name=ctx.STRING().getText(); + name=name.substring(1,name.length()-1); + rule.setName(name); + List attributesContext=ctx.attribute(); + if(attributesContext!=null){ + for(AttributeContext context:attributesContext){ + if(context.salienceAttribute()!=null){ + rule.setSalience(Integer.valueOf(context.salienceAttribute().NUMBER().getText())); + }else if(context.loopAttribute()!=null){ + rule.setLoop(Boolean.valueOf(context.loopAttribute().Boolean().getText())); + }else if(context.effectiveDateAttribute()!=null){ + try { + String dateValue=context.effectiveDateAttribute().STRING().getText(); + dateValue=dateValue.substring(1,dateValue.length()-1); + rule.setEffectiveDate(sd.parse(dateValue)); + } catch (ParseException e) { + throw new RuleException(e); + } + }else if(context.expiresDateAttribute()!=null){ + try { + String dateValue=context.expiresDateAttribute().STRING().getText(); + dateValue=dateValue.substring(1,dateValue.length()-1); + rule.setExpiresDate(sd.parse(dateValue)); + } catch (ParseException e) { + throw new RuleException(e); + } + }else if(context.enabledAttribute()!=null){ + rule.setEnabled(Boolean.valueOf(context.enabledAttribute().Boolean().getText())); + }else if(context.debugAttribute()!=null){ + rule.setDebug(Boolean.valueOf(context.debugAttribute().Boolean().getText())); + }else if(context.activationGroupAttribute()!=null){ + String value=context.activationGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setActivationGroup(value); + }else if(context.agendaGroupAttribute()!=null){ + String value=context.agendaGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setAgendaGroup(value); + }else if(context.autoFocusAttribute()!=null){ + rule.setAutoFocus(Boolean.valueOf(context.autoFocusAttribute().Boolean().getText())); + }else if(context.ruleflowGroupAttribute()!=null){ + String value=context.ruleflowGroupAttribute().STRING().getText(); + value=value.substring(1,value.length()-1); + rule.setRuleflowGroup(value); + } + } + } + LeftContext leftContext=ctx.left(); + ParseTree parseTree=leftContext.getChild(1); + Lhs lhs=new Lhs(); + rule.setLhs(lhs); + Criterion criterion = buildCriterion(parseTree); + lhs.setCriterion(criterion); + Rhs rhs=new Rhs(); + rhs.setActions(visitRight(ctx.right())); + rule.setRhs(rhs); + + Other other=new Other(); + other.setActions(visitOther(ctx.other())); + rule.setOther(other); + return rule; + } + + @Override + public Criteria visitSingleCondition(SingleConditionContext ctx) { + return (Criteria)doBuilder(ctx); + } + @Override + public Criterion visitParenConditions(ParenConditionsContext ctx) { + ParseTree parseTree=ctx.getChild(1); + return buildCriterion(parseTree); + } + + @Override + public Criterion visitSingleNamedConditionSet(SingleNamedConditionSetContext ctx) { + NamedCriteria criteria=new NamedCriteria(); + NamedConditionSetContext conditionSet=ctx.namedConditionSet(); + if(conditionSet.refName()!=null){ + criteria.setReferenceName(conditionSet.refName().getText()); + } + criteria.setVariableCategory(conditionSet.refObject().getText()); + NamedConditionContext namedConditionContext=conditionSet.namedCondition(); + CriteriaUnit unit=namedConditionBuilder.buildNamedCriteria(namedConditionContext, criteria.getVariableCategory()); + criteria.setUnit(unit); + return criteria; + } + + @Override + public Criterion visitMultiConditions(MultiConditionsContext ctx) { + Junction topJunction=null; + Criterion criterion=null; + Junction junction=map.get(ctx); + int childCount=ctx.getChildCount(); + for(int i=0;i visitRight(RightContext ctx) { + if(ctx==null ||ctx.action()==null){ + return null; + } + List actionContexts=ctx.action(); + + return buildActions(actionContexts); + } + + private List buildActions(List actionContexts) { + List actions=new ArrayList(); + for(ActionContext actionContext:actionContexts){ + Action action=(Action)doBuilder(actionContext); + actions.add(action); + } + return actions; + } + + @Override + public List visitOther(OtherContext ctx) { + if(ctx==null ||ctx.action()==null){ + return null; + } + List actions=new ArrayList(); + for(ActionContext actionContext:ctx.action()){ + Action action=(Action)doBuilder(actionContext); + actions.add(action); + } + return actions; + } + + private Criterion buildCriterion(ParseTree parseTree) { + Criterion criterion=null; + if(parseTree instanceof ParenConditionsContext){ + criterion=visitParenConditions((ParenConditionsContext)parseTree); + }else if(parseTree instanceof SingleConditionContext){ + criterion=visitSingleCondition((SingleConditionContext)parseTree); + }else if(parseTree instanceof MultiConditionsContext){ + criterion=visitMultiConditions((MultiConditionsContext)parseTree); + }else if(parseTree instanceof SingleNamedConditionSetContext){ + criterion=visitSingleNamedConditionSet((SingleNamedConditionSetContext)parseTree); + } + return criterion; + } + private Object doBuilder(ParserRuleContext context){ + for(ContextBuilder builder:builders){ + if(builder.support(context)){ + return builder.build(context); + } + } + return null; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/CellScriptRuleParserBaseVisitor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/CellScriptRuleParserBaseVisitor.java new file mode 100644 index 0000000..70d5abb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/CellScriptRuleParserBaseVisitor.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.DecisionTableCellConditionContext; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.MultiCellConditionsContext; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.ParenCellConditionsContext; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.SingleCellConditionContext; +import org.antlr.v4.runtime.tree.ParseTree; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年5月6日 + */ +public class CellScriptRuleParserBaseVisitor extends RuleParserBaseVisitor { + private String propertyName; + public CellScriptRuleParserBaseVisitor(String propertyName) { + this.propertyName=propertyName; + } + + @Override + public String visitSingleCellCondition(SingleCellConditionContext ctx) { + StringBuffer sb=new StringBuffer(); + sb.append(propertyName); + sb.append(" "); + String op=ctx.op().getText(); + sb.append(op); + sb.append(" "); + if(ctx.complexValue()!=null){ + sb.append(ctx.complexValue().getText()); + }else{ + sb.append(ctx.nullValue().getText()); + } + sb.append(" "); + return sb.toString(); + } + + @Override + public String visitMultiCellConditions(MultiCellConditionsContext ctx) { + StringBuffer sb=new StringBuffer(); + List children=ctx.children; + for(ParseTree child:children){ + sb.append(" "); + buildChildren(sb, child); + } + return sb.toString(); + } + + @Override + public String visitParenCellConditions(ParenCellConditionsContext ctx) { + StringBuffer sb=new StringBuffer(); + sb.append(" "); + sb.append(ctx.leftParen().getText()); + DecisionTableCellConditionContext context=ctx.decisionTableCellCondition(); + buildChildren(sb,context); + sb.append(ctx.rightParen().getText()); + return sb.toString(); + } + + private void buildChildren(StringBuffer sb, ParseTree child) { + if(child instanceof SingleCellConditionContext){ + SingleCellConditionContext singleCellConditionContext=(SingleCellConditionContext)child; + sb.append(visitSingleCellCondition(singleCellConditionContext)); + }else if(child instanceof ParenCellConditionsContext){ + ParenCellConditionsContext parenCellConditionsContext=(ParenCellConditionsContext)child; + sb.append(visitParenCellConditions(parenCellConditionsContext)); + }else if(child instanceof MultiCellConditionsContext){ + MultiCellConditionsContext multiCellConditionsContext=(MultiCellConditionsContext)child; + sb.append(visitMultiCellConditions(multiCellConditionsContext)); + }else{ + sb.append(child.getText()); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/Constant.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/Constant.java new file mode 100644 index 0000000..0e6f3cc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/Constant.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; +/** + * @author Jacky.gao + * @since 2015年2月16日 + */ +public interface Constant { + public static final String UL_SUFFIX=".ul"; + public static final String XML_SUFFIX=".xml"; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLRuleSetBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLRuleSetBuilder.java new file mode 100644 index 0000000..601b0ba --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLRuleSetBuilder.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.builder.resource.Resource; +import com.itheima.sfbx.framework.rule.dsl.builder.ContextBuilder; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.io.IOException; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月16日 + */ +public class DSLRuleSetBuilder implements ApplicationContextAware{ + public static final String BEAN_ID="urule.dslRuleSetBuilder"; + private Collection contextBuilders; + private RulesRebuilder rulesRebuilder; + public RuleSet build(String script) throws IOException{ + ANTLRInputStream antlrInputStream=new ANTLRInputStream(script); + RuleParserLexer lexer=new RuleParserLexer(antlrInputStream); + CommonTokenStream tokenStream=new CommonTokenStream(lexer); + RuleParserParser parser=new RuleParserParser(tokenStream); + ScriptDecisionTableErrorListener errorListener=new ScriptDecisionTableErrorListener(); + parser.addErrorListener(errorListener); + BuildRulesVisitor visitor=new BuildRulesVisitor(contextBuilders,tokenStream); + RuleSet ruleSet=visitor.visitRuleSet(parser.ruleSet()); + rebuildRuleSet(ruleSet); + String error=errorListener.getErrorMessage(); + if(error!=null){ + throw new RuleException("Script parse error:"+error); + } + return ruleSet; + } + + private void rebuildRuleSet(RuleSet ruleSet){ + List libraries=ruleSet.getLibraries(); + List rules=ruleSet.getRules(); + rulesRebuilder.rebuildRulesForDSL(libraries, rules); + } + + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } + + + public boolean support(Resource resource){ + String path=resource.getPath(); + return path.toLowerCase().endsWith(Constant.UL_SUFFIX); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + contextBuilders=applicationContext.getBeansOfType(ContextBuilder.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLUtils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLUtils.java new file mode 100644 index 0000000..21ce22f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/DSLUtils.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.OpContext; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年5月6日 + */ +public class DSLUtils { + public static Op parseOp(OpContext ctx){ + if(ctx.GreaterThen()!=null){ + return Op.GreaterThen; + }else if(ctx.GreaterThenOrEquals()!=null){ + return Op.GreaterThenEquals; + }else if(ctx.LessThen()!=null){ + return Op.LessThen; + }else if(ctx.LessThenOrEquals()!=null){ + return Op.LessThenEquals; + }else if(ctx.Equals()!=null){ + return Op.Equals; + }else if(ctx.NotEquals()!=null){ + return Op.NotEquals; + }else if(ctx.EndWith()!=null){ + return Op.EndWith; + }else if(ctx.NotEndWith()!=null){ + return Op.NotEndWith; + }else if(ctx.StartWith()!=null){ + return Op.StartWith; + }else if(ctx.NotStartWith()!=null){ + return Op.NotStartWith; + }else if(ctx.In()!=null){ + return Op.In; + }else if(ctx.NotIn()!=null){ + return Op.NotIn; + }else if(ctx.Match()!=null){ + return Op.Match; + }else if(ctx.NotMatch()!=null){ + return Op.NotMatch; + }else if(ctx.EqualsIgnoreCase()!=null){ + return Op.EqualsIgnoreCase; + }else if(ctx.NotEqualsIgnoreCase()!=null) { + return Op.NotEqualsIgnoreCase; + } +// }else if(ctx.Contain()!=null){ +// return Op.Contain; +// }else if(ctx.NotContain()!=null){ +// return Op.NotContain; +// } + throw new RuleException("Operator ["+ctx+"] is invalid."); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.java new file mode 100644 index 0000000..19a15b4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.java @@ -0,0 +1,333 @@ +// Generated from RuleLexer.g4 by ANTLR 4.5.3 +package com.itheima.sfbx.framework.rule.dsl; + +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.ATN; +import org.antlr.v4.runtime.atn.ATNDeserializer; +import org.antlr.v4.runtime.atn.LexerATNSimulator; +import org.antlr.v4.runtime.atn.PredictionContextCache; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class RuleLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + COUNT=1, AVG=2, SUM=3, MAX=4, MIN=5, AND=6, OR=7, Datatype=8, GreaterThen=9, + GreaterThenOrEquals=10, LessThen=11, LessThenOrEquals=12, Equals=13, NotEquals=14, + EndWith=15, NotEndWith=16, StartWith=17, NotStartWith=18, In=19, NotIn=20, + Match=21, NotMatch=22, Contain=23, NotContain=24, EqualsIgnoreCase=25, + NotEqualsIgnoreCase=26, ARITH=27, NUMBER=28, Boolean=29, Identifier=30, + STRING=31, WS=32, NL=33, COMMENT=34, LINE_COMMENT=35; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "COUNT", "AVG", "SUM", "MAX", "MIN", "AND", "OR", "Datatype", "GreaterThen", + "GreaterThenOrEquals", "LessThen", "LessThenOrEquals", "Equals", "NotEquals", + "EndWith", "NotEndWith", "StartWith", "NotStartWith", "In", "NotIn", "Match", + "NotMatch", "Contain", "NotContain", "EqualsIgnoreCase", "NotEqualsIgnoreCase", + "ARITH", "NUMBER", "Boolean", "Identifier", "STRING", "STRING_CONTENT", + "INT", "EXP", "EscapeSequence", "OctalEscape", "UnicodeEscape", "Char", + "StartChar", "DIGIT", "HEX", "WS", "NL", "COMMENT", "LINE_COMMENT" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'count'", "'avg'", "'sum'", "'max'", "'min'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, "COUNT", "AVG", "SUM", "MAX", "MIN", "AND", "OR", "Datatype", "GreaterThen", + "GreaterThenOrEquals", "LessThen", "LessThenOrEquals", "Equals", "NotEquals", + "EndWith", "NotEndWith", "StartWith", "NotStartWith", "In", "NotIn", "Match", + "NotMatch", "Contain", "NotContain", "EqualsIgnoreCase", "NotEqualsIgnoreCase", + "ARITH", "NUMBER", "Boolean", "Identifier", "STRING", "WS", "NL", "COMMENT", + "LINE_COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public RuleLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "RuleLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2%\u0254\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\3\2\3\2\3\2\3\2\3\2\3\2\3\3\3\3\3\3\3\3\3\4\3\4\3\4\3"+ + "\4\3\5\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7"+ + "\5\7}\n\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\5\b\u0086\n\b\3\t\3\t\3\t\3\t\3"+ + "\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+ + "\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3"+ + "\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+ + "\3\t\3\t\5\t\u00e6\n\t\3\n\3\n\3\n\5\n\u00eb\n\n\3\13\3\13\3\13\3\13\3"+ + "\13\3\13\5\13\u00f3\n\13\3\f\3\f\3\f\5\f\u00f8\n\f\3\r\3\r\3\r\3\r\3\r"+ + "\3\r\5\r\u0100\n\r\3\16\3\16\3\16\3\16\5\16\u0106\n\16\3\17\3\17\3\17"+ + "\3\17\3\17\5\17\u010d\n\17\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20\3\20"+ + "\3\20\5\20\u0119\n\20\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21\3\21"+ + "\3\21\3\21\3\21\3\21\5\21\u0129\n\21\3\22\3\22\3\22\3\22\3\22\3\22\3\22"+ + "\3\22\3\22\3\22\3\22\3\22\5\22\u0137\n\22\3\23\3\23\3\23\3\23\3\23\3\23"+ + "\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\3\23\5\23\u0149\n\23\3\24"+ + "\3\24\3\24\3\24\3\24\3\24\5\24\u0151\n\24\3\25\3\25\3\25\3\25\3\25\3\25"+ + "\3\25\3\25\3\25\3\25\5\25\u015d\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26"+ + "\5\26\u0166\n\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27"+ + "\5\27\u0173\n\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\5\30\u017e"+ + "\n\30\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31"+ + "\5\31\u018d\n\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32"+ + "\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\5\32\u01a6"+ + "\n\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+ + "\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33"+ + "\5\33\u01c3\n\33\3\34\3\34\3\35\5\35\u01c8\n\35\3\35\3\35\3\35\3\35\5"+ + "\35\u01ce\n\35\3\35\5\35\u01d1\n\35\3\35\3\35\3\35\3\35\5\35\u01d7\n\35"+ + "\3\35\5\35\u01da\n\35\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\3\36\5\36"+ + "\u01e5\n\36\3\37\3\37\7\37\u01e9\n\37\f\37\16\37\u01ec\13\37\3 \3 \3 "+ + "\3 \3!\3!\7!\u01f4\n!\f!\16!\u01f7\13!\3\"\6\"\u01fa\n\"\r\"\16\"\u01fb"+ + "\3#\3#\5#\u0200\n#\3#\3#\3$\3$\3$\3$\5$\u0208\n$\3%\3%\3%\3%\3%\3%\3%"+ + "\3%\3%\5%\u0213\n%\3&\3&\3&\3&\3&\3&\3&\3\'\3\'\3\'\3\'\5\'\u0220\n\'"+ + "\3(\5(\u0223\n(\3)\3)\3*\3*\3+\6+\u022a\n+\r+\16+\u022b\3+\3+\3,\5,\u0231"+ + "\n,\3,\3,\3,\3,\3-\3-\3-\3-\7-\u023b\n-\f-\16-\u023e\13-\3-\3-\3-\3-\3"+ + "-\3.\3.\3.\3.\7.\u0249\n.\f.\16.\u024c\13.\3.\5.\u024f\n.\3.\3.\3.\3."+ + "\3\u023c\2/\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33"+ + "\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67"+ + "\359\36;\37= ?!A\2C\2E\2G\2I\2K\2M\2O\2Q\2S\2U\"W#Y$[%\3\2\16\6\2\'\'"+ + ",-//\61\61\3\2$$\4\2GGgg\4\2--//\n\2$$))^^ddhhppttvv\4\2//aa\5\2\u00b9"+ + "\u00b9\u0302\u0371\u2041\u2042\t\2C\\c|\u2072\u2191\u2c02\u2ff1\u3003"+ + "\ud801\uf902\ufdd1\ufdf2\uffff\3\2\62;\5\2\62;CHch\5\2\13\f\17\17\"\""+ + "\4\2\f\f\17\17\u028b\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2"+ + "\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3"+ + "\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2"+ + "\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2"+ + "\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2"+ + "\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2"+ + "\2Y\3\2\2\2\2[\3\2\2\2\3]\3\2\2\2\5c\3\2\2\2\7g\3\2\2\2\tk\3\2\2\2\13"+ + "o\3\2\2\2\r|\3\2\2\2\17\u0085\3\2\2\2\21\u00e5\3\2\2\2\23\u00ea\3\2\2"+ + "\2\25\u00f2\3\2\2\2\27\u00f7\3\2\2\2\31\u00ff\3\2\2\2\33\u0105\3\2\2\2"+ + "\35\u010c\3\2\2\2\37\u0118\3\2\2\2!\u0128\3\2\2\2#\u0136\3\2\2\2%\u0148"+ + "\3\2\2\2\'\u0150\3\2\2\2)\u015c\3\2\2\2+\u0165\3\2\2\2-\u0172\3\2\2\2"+ + "/\u017d\3\2\2\2\61\u018c\3\2\2\2\63\u01a5\3\2\2\2\65\u01c2\3\2\2\2\67"+ + "\u01c4\3\2\2\29\u01d9\3\2\2\2;\u01e4\3\2\2\2=\u01e6\3\2\2\2?\u01ed\3\2"+ + "\2\2A\u01f5\3\2\2\2C\u01f9\3\2\2\2E\u01fd\3\2\2\2G\u0207\3\2\2\2I\u0212"+ + "\3\2\2\2K\u0214\3\2\2\2M\u021f\3\2\2\2O\u0222\3\2\2\2Q\u0224\3\2\2\2S"+ + "\u0226\3\2\2\2U\u0229\3\2\2\2W\u0230\3\2\2\2Y\u0236\3\2\2\2[\u0244\3\2"+ + "\2\2]^\7e\2\2^_\7q\2\2_`\7w\2\2`a\7p\2\2ab\7v\2\2b\4\3\2\2\2cd\7c\2\2"+ + "de\7x\2\2ef\7i\2\2f\6\3\2\2\2gh\7u\2\2hi\7w\2\2ij\7o\2\2j\b\3\2\2\2kl"+ + "\7o\2\2lm\7c\2\2mn\7z\2\2n\n\3\2\2\2op\7o\2\2pq\7k\2\2qr\7p\2\2r\f\3\2"+ + "\2\2st\7c\2\2tu\7p\2\2u}\7f\2\2vw\7(\2\2w}\7(\2\2x}\7.\2\2yz\7\u5e78\2"+ + "\2z}\7\u4e16\2\2{}\7\u4e16\2\2|s\3\2\2\2|v\3\2\2\2|x\3\2\2\2|y\3\2\2\2"+ + "|{\3\2\2\2}\16\3\2\2\2~\177\7q\2\2\177\u0086\7t\2\2\u0080\u0081\7~\2\2"+ + "\u0081\u0086\7~\2\2\u0082\u0083\7\u6218\2\2\u0083\u0086\7\u8007\2\2\u0084"+ + "\u0086\7\u6218\2\2\u0085~\3\2\2\2\u0085\u0080\3\2\2\2\u0085\u0082\3\2"+ + "\2\2\u0085\u0084\3\2\2\2\u0086\20\3\2\2\2\u0087\u0088\7U\2\2\u0088\u0089"+ + "\7v\2\2\u0089\u008a\7t\2\2\u008a\u008b\7k\2\2\u008b\u008c\7p\2\2\u008c"+ + "\u00e6\7i\2\2\u008d\u008e\7k\2\2\u008e\u008f\7p\2\2\u008f\u00e6\7v\2\2"+ + "\u0090\u0091\7K\2\2\u0091\u0092\7p\2\2\u0092\u0093\7v\2\2\u0093\u0094"+ + "\7g\2\2\u0094\u0095\7i\2\2\u0095\u0096\7g\2\2\u0096\u00e6\7t\2\2\u0097"+ + "\u0098\7f\2\2\u0098\u0099\7q\2\2\u0099\u009a\7w\2\2\u009a\u009b\7d\2\2"+ + "\u009b\u009c\7n\2\2\u009c\u00e6\7g\2\2\u009d\u009e\7F\2\2\u009e\u009f"+ + "\7q\2\2\u009f\u00a0\7w\2\2\u00a0\u00a1\7d\2\2\u00a1\u00a2\7n\2\2\u00a2"+ + "\u00e6\7g\2\2\u00a3\u00a4\7n\2\2\u00a4\u00a5\7q\2\2\u00a5\u00a6\7p\2\2"+ + "\u00a6\u00e6\7i\2\2\u00a7\u00a8\7N\2\2\u00a8\u00a9\7q\2\2\u00a9\u00aa"+ + "\7p\2\2\u00aa\u00e6\7i\2\2\u00ab\u00ac\7h\2\2\u00ac\u00ad\7n\2\2\u00ad"+ + "\u00ae\7q\2\2\u00ae\u00af\7c\2\2\u00af\u00e6\7v\2\2\u00b0\u00b1\7H\2\2"+ + "\u00b1\u00b2\7n\2\2\u00b2\u00b3\7q\2\2\u00b3\u00b4\7c\2\2\u00b4\u00e6"+ + "\7v\2\2\u00b5\u00b6\7D\2\2\u00b6\u00b7\7k\2\2\u00b7\u00b8\7i\2\2\u00b8"+ + "\u00b9\7F\2\2\u00b9\u00ba\7g\2\2\u00ba\u00bb\7e\2\2\u00bb\u00bc\7k\2\2"+ + "\u00bc\u00bd\7o\2\2\u00bd\u00be\7c\2\2\u00be\u00e6\7n\2\2\u00bf\u00c0"+ + "\7d\2\2\u00c0\u00c1\7q\2\2\u00c1\u00c2\7q\2\2\u00c2\u00c3\7n\2\2\u00c3"+ + "\u00c4\7g\2\2\u00c4\u00c5\7c\2\2\u00c5\u00e6\7p\2\2\u00c6\u00c7\7D\2\2"+ + "\u00c7\u00c8\7q\2\2\u00c8\u00c9\7q\2\2\u00c9\u00ca\7n\2\2\u00ca\u00cb"+ + "\7g\2\2\u00cb\u00cc\7c\2\2\u00cc\u00e6\7p\2\2\u00cd\u00ce\7F\2\2\u00ce"+ + "\u00cf\7c\2\2\u00cf\u00d0\7v\2\2\u00d0\u00e6\7g\2\2\u00d1\u00d2\7N\2\2"+ + "\u00d2\u00d3\7k\2\2\u00d3\u00d4\7u\2\2\u00d4\u00e6\7v\2\2\u00d5\u00d6"+ + "\7U\2\2\u00d6\u00d7\7g\2\2\u00d7\u00e6\7v\2\2\u00d8\u00d9\7O\2\2\u00d9"+ + "\u00da\7c\2\2\u00da\u00e6\7r\2\2\u00db\u00dc\7G\2\2\u00dc\u00dd\7p\2\2"+ + "\u00dd\u00de\7w\2\2\u00de\u00e6\7o\2\2\u00df\u00e0\7Q\2\2\u00e0\u00e1"+ + "\7d\2\2\u00e1\u00e2\7l\2\2\u00e2\u00e3\7g\2\2\u00e3\u00e4\7e\2\2\u00e4"+ + "\u00e6\7v\2\2\u00e5\u0087\3\2\2\2\u00e5\u008d\3\2\2\2\u00e5\u0090\3\2"+ + "\2\2\u00e5\u0097\3\2\2\2\u00e5\u009d\3\2\2\2\u00e5\u00a3\3\2\2\2\u00e5"+ + "\u00a7\3\2\2\2\u00e5\u00ab\3\2\2\2\u00e5\u00b0\3\2\2\2\u00e5\u00b5\3\2"+ + "\2\2\u00e5\u00bf\3\2\2\2\u00e5\u00c6\3\2\2\2\u00e5\u00cd\3\2\2\2\u00e5"+ + "\u00d1\3\2\2\2\u00e5\u00d5\3\2\2\2\u00e5\u00d8\3\2\2\2\u00e5\u00db\3\2"+ + "\2\2\u00e5\u00df\3\2\2\2\u00e6\22\3\2\2\2\u00e7\u00eb\7@\2\2\u00e8\u00e9"+ + "\7\u5929\2\2\u00e9\u00eb\7\u4e90\2\2\u00ea\u00e7\3\2\2\2\u00ea\u00e8\3"+ + "\2\2\2\u00eb\24\3\2\2\2\u00ec\u00ed\7@\2\2\u00ed\u00f3\7?\2\2\u00ee\u00ef"+ + "\7\u5929\2\2\u00ef\u00f0\7\u4e90\2\2\u00f0\u00f1\7\u7b4b\2\2\u00f1\u00f3"+ + "\7\u4e90\2\2\u00f2\u00ec\3\2\2\2\u00f2\u00ee\3\2\2\2\u00f3\26\3\2\2\2"+ + "\u00f4\u00f8\7>\2\2\u00f5\u00f6\7\u5c11\2\2\u00f6\u00f8\7\u4e90\2\2\u00f7"+ + "\u00f4\3\2\2\2\u00f7\u00f5\3\2\2\2\u00f8\30\3\2\2\2\u00f9\u00fa\7>\2\2"+ + "\u00fa\u0100\7?\2\2\u00fb\u00fc\7\u5c11\2\2\u00fc\u00fd\7\u4e90\2\2\u00fd"+ + "\u00fe\7\u7b4b\2\2\u00fe\u0100\7\u4e90\2\2\u00ff\u00f9\3\2\2\2\u00ff\u00fb"+ + "\3\2\2\2\u0100\32\3\2\2\2\u0101\u0102\7?\2\2\u0102\u0106\7?\2\2\u0103"+ + "\u0104\7\u7b4b\2\2\u0104\u0106\7\u4e90\2\2\u0105\u0101\3\2\2\2\u0105\u0103"+ + "\3\2\2\2\u0106\34\3\2\2\2\u0107\u0108\7#\2\2\u0108\u010d\7?\2\2\u0109"+ + "\u010a\7\u4e0f\2\2\u010a\u010b\7\u7b4b\2\2\u010b\u010d\7\u4e90\2\2\u010c"+ + "\u0107\3\2\2\2\u010c\u0109\3\2\2\2\u010d\36\3\2\2\2\u010e\u010f\7G\2\2"+ + "\u010f\u0110\7p\2\2\u0110\u0111\7f\2\2\u0111\u0112\7Y\2\2\u0112\u0113"+ + "\7k\2\2\u0113\u0114\7v\2\2\u0114\u0119\7j\2\2\u0115\u0116\7\u7ed5\2\2"+ + "\u0116\u0117\7\u6761\2\2\u0117\u0119\7\u4e90\2\2\u0118\u010e\3\2\2\2\u0118"+ + "\u0115\3\2\2\2\u0119 \3\2\2\2\u011a\u011b\7P\2\2\u011b\u011c\7q\2\2\u011c"+ + "\u011d\7v\2\2\u011d\u011e\7G\2\2\u011e\u011f\7p\2\2\u011f\u0120\7f\2\2"+ + "\u0120\u0121\7Y\2\2\u0121\u0122\7k\2\2\u0122\u0123\7v\2\2\u0123\u0129"+ + "\7j\2\2\u0124\u0125\7\u4e0f\2\2\u0125\u0126\7\u7ed5\2\2\u0126\u0127\7"+ + "\u6761\2\2\u0127\u0129\7\u4e90\2\2\u0128\u011a\3\2\2\2\u0128\u0124\3\2"+ + "\2\2\u0129\"\3\2\2\2\u012a\u012b\7U\2\2\u012b\u012c\7v\2\2\u012c\u012d"+ + "\7c\2\2\u012d\u012e\7t\2\2\u012e\u012f\7v\2\2\u012f\u0130\7Y\2\2\u0130"+ + "\u0131\7k\2\2\u0131\u0132\7v\2\2\u0132\u0137\7j\2\2\u0133\u0134\7\u5f02"+ + "\2\2\u0134\u0135\7\u59cd\2\2\u0135\u0137\7\u4e90\2\2\u0136\u012a\3\2\2"+ + "\2\u0136\u0133\3\2\2\2\u0137$\3\2\2\2\u0138\u0139\7P\2\2\u0139\u013a\7"+ + "q\2\2\u013a\u013b\7v\2\2\u013b\u013c\7U\2\2\u013c\u013d\7v\2\2\u013d\u013e"+ + "\7c\2\2\u013e\u013f\7t\2\2\u013f\u0140\7v\2\2\u0140\u0141\7Y\2\2\u0141"+ + "\u0142\7k\2\2\u0142\u0143\7v\2\2\u0143\u0149\7j\2\2\u0144\u0145\7\u4e0f"+ + "\2\2\u0145\u0146\7\u5f02\2\2\u0146\u0147\7\u59cd\2\2\u0147\u0149\7\u4e90"+ + "\2\2\u0148\u0138\3\2\2\2\u0148\u0144\3\2\2\2\u0149&\3\2\2\2\u014a\u014b"+ + "\7K\2\2\u014b\u0151\7p\2\2\u014c\u014d\7\u572a\2\2\u014d\u014e\7\u96c8"+ + "\2\2\u014e\u014f\7\u540a\2\2\u014f\u0151\7\u4e2f\2\2\u0150\u014a\3\2\2"+ + "\2\u0150\u014c\3\2\2\2\u0151(\3\2\2\2\u0152\u0153\7P\2\2\u0153\u0154\7"+ + "q\2\2\u0154\u0155\7v\2\2\u0155\u0156\7K\2\2\u0156\u015d\7p\2\2\u0157\u0158"+ + "\7\u4e0f\2\2\u0158\u0159\7\u572a\2\2\u0159\u015a\7\u96c8\2\2\u015a\u015b"+ + "\7\u540a\2\2\u015b\u015d\7\u4e2f\2\2\u015c\u0152\3\2\2\2\u015c\u0157\3"+ + "\2\2\2\u015d*\3\2\2\2\u015e\u015f\7O\2\2\u015f\u0160\7c\2\2\u0160\u0161"+ + "\7v\2\2\u0161\u0162\7e\2\2\u0162\u0166\7j\2\2\u0163\u0164\7\u533b\2\2"+ + "\u0164\u0166\7\u914f\2\2\u0165\u015e\3\2\2\2\u0165\u0163\3\2\2\2\u0166"+ + ",\3\2\2\2\u0167\u0168\7P\2\2\u0168\u0169\7q\2\2\u0169\u016a\7v\2\2\u016a"+ + "\u016b\7O\2\2\u016b\u016c\7c\2\2\u016c\u016d\7v\2\2\u016d\u016e\7e\2\2"+ + "\u016e\u0173\7j\2\2\u016f\u0170\7\u4e0f\2\2\u0170\u0171\7\u533b\2\2\u0171"+ + "\u0173\7\u914f\2\2\u0172\u0167\3\2\2\2\u0172\u016f\3\2\2\2\u0173.\3\2"+ + "\2\2\u0174\u0175\7E\2\2\u0175\u0176\7q\2\2\u0176\u0177\7p\2\2\u0177\u0178"+ + "\7v\2\2\u0178\u0179\7c\2\2\u0179\u017a\7k\2\2\u017a\u017e\7p\2\2\u017b"+ + "\u017c\7\u5307\2\2\u017c\u017e\7\u542d\2\2\u017d\u0174\3\2\2\2\u017d\u017b"+ + "\3\2\2\2\u017e\60\3\2\2\2\u017f\u0180\7P\2\2\u0180\u0181\7q\2\2\u0181"+ + "\u0182\7v\2\2\u0182\u0183\7E\2\2\u0183\u0184\7q\2\2\u0184\u0185\7p\2\2"+ + "\u0185\u0186\7v\2\2\u0186\u0187\7c\2\2\u0187\u0188\7k\2\2\u0188\u018d"+ + "\7p\2\2\u0189\u018a\7\u4e0f\2\2\u018a\u018b\7\u5307\2\2\u018b\u018d\7"+ + "\u542d\2\2\u018c\u017f\3\2\2\2\u018c\u0189\3\2\2\2\u018d\62\3\2\2\2\u018e"+ + "\u018f\7G\2\2\u018f\u0190\7s\2\2\u0190\u0191\7w\2\2\u0191\u0192\7c\2\2"+ + "\u0192\u0193\7n\2\2\u0193\u0194\7u\2\2\u0194\u0195\7K\2\2\u0195\u0196"+ + "\7i\2\2\u0196\u0197\7p\2\2\u0197\u0198\7q\2\2\u0198\u0199\7t\2\2\u0199"+ + "\u019a\7g\2\2\u019a\u019b\7E\2\2\u019b\u019c\7c\2\2\u019c\u019d\7u\2\2"+ + "\u019d\u01a6\7g\2\2\u019e\u019f\7\u5fff\2\2\u019f\u01a0\7\u7567\2\2\u01a0"+ + "\u01a1\7\u5929\2\2\u01a1\u01a2\7\u5c11\2\2\u01a2\u01a3\7\u519b\2\2\u01a3"+ + "\u01a4\7\u7b4b\2\2\u01a4\u01a6\7\u4e90\2\2\u01a5\u018e\3\2\2\2\u01a5\u019e"+ + "\3\2\2\2\u01a6\64\3\2\2\2\u01a7\u01a8\7P\2\2\u01a8\u01a9\7q\2\2\u01a9"+ + "\u01aa\7v\2\2\u01aa\u01ab\7G\2\2\u01ab\u01ac\7s\2\2\u01ac\u01ad\7w\2\2"+ + "\u01ad\u01ae\7c\2\2\u01ae\u01af\7n\2\2\u01af\u01b0\7u\2\2\u01b0\u01b1"+ + "\7K\2\2\u01b1\u01b2\7i\2\2\u01b2\u01b3\7p\2\2\u01b3\u01b4\7q\2\2\u01b4"+ + "\u01b5\7t\2\2\u01b5\u01b6\7g\2\2\u01b6\u01b7\7E\2\2\u01b7\u01b8\7c\2\2"+ + "\u01b8\u01b9\7u\2\2\u01b9\u01c3\7g\2\2\u01ba\u01bb\7\u5fff\2\2\u01bb\u01bc"+ + "\7\u7567\2\2\u01bc\u01bd\7\u5929\2\2\u01bd\u01be\7\u5c11\2\2\u01be\u01bf"+ + "\7\u519b\2\2\u01bf\u01c0\7\u4e0f\2\2\u01c0\u01c1\7\u7b4b\2\2\u01c1\u01c3"+ + "\7\u4e90\2\2\u01c2\u01a7\3\2\2\2\u01c2\u01ba\3\2\2\2\u01c3\66\3\2\2\2"+ + "\u01c4\u01c5\t\2\2\2\u01c58\3\2\2\2\u01c6\u01c8\7/\2\2\u01c7\u01c6\3\2"+ + "\2\2\u01c7\u01c8\3\2\2\2\u01c8\u01c9\3\2\2\2\u01c9\u01ca\5C\"\2\u01ca"+ + "\u01cb\7\60\2\2\u01cb\u01cd\5C\"\2\u01cc\u01ce\5E#\2\u01cd\u01cc\3\2\2"+ + "\2\u01cd\u01ce\3\2\2\2\u01ce\u01da\3\2\2\2\u01cf\u01d1\7/\2\2\u01d0\u01cf"+ + "\3\2\2\2\u01d0\u01d1\3\2\2\2\u01d1\u01d2\3\2\2\2\u01d2\u01d3\5C\"\2\u01d3"+ + "\u01d4\5E#\2\u01d4\u01da\3\2\2\2\u01d5\u01d7\7/\2\2\u01d6\u01d5\3\2\2"+ + "\2\u01d6\u01d7\3\2\2\2\u01d7\u01d8\3\2\2\2\u01d8\u01da\5C\"\2\u01d9\u01c7"+ + "\3\2\2\2\u01d9\u01d0\3\2\2\2\u01d9\u01d6\3\2\2\2\u01da:\3\2\2\2\u01db"+ + "\u01dc\7v\2\2\u01dc\u01dd\7t\2\2\u01dd\u01de\7w\2\2\u01de\u01e5\7g\2\2"+ + "\u01df\u01e0\7h\2\2\u01e0\u01e1\7c\2\2\u01e1\u01e2\7n\2\2\u01e2\u01e3"+ + "\7u\2\2\u01e3\u01e5\7g\2\2\u01e4\u01db\3\2\2\2\u01e4\u01df\3\2\2\2\u01e5"+ + "<\3\2\2\2\u01e6\u01ea\5O(\2\u01e7\u01e9\5M\'\2\u01e8\u01e7\3\2\2\2\u01e9"+ + "\u01ec\3\2\2\2\u01ea\u01e8\3\2\2\2\u01ea\u01eb\3\2\2\2\u01eb>\3\2\2\2"+ + "\u01ec\u01ea\3\2\2\2\u01ed\u01ee\7$\2\2\u01ee\u01ef\5A!\2\u01ef\u01f0"+ + "\7$\2\2\u01f0@\3\2\2\2\u01f1\u01f4\5G$\2\u01f2\u01f4\n\3\2\2\u01f3\u01f1"+ + "\3\2\2\2\u01f3\u01f2\3\2\2\2\u01f4\u01f7\3\2\2\2\u01f5\u01f3\3\2\2\2\u01f5"+ + "\u01f6\3\2\2\2\u01f6B\3\2\2\2\u01f7\u01f5\3\2\2\2\u01f8\u01fa\5Q)\2\u01f9"+ + "\u01f8\3\2\2\2\u01fa\u01fb\3\2\2\2\u01fb\u01f9\3\2\2\2\u01fb\u01fc\3\2"+ + "\2\2\u01fcD\3\2\2\2\u01fd\u01ff\t\4\2\2\u01fe\u0200\t\5\2\2\u01ff\u01fe"+ + "\3\2\2\2\u01ff\u0200\3\2\2\2\u0200\u0201\3\2\2\2\u0201\u0202\5C\"\2\u0202"+ + "F\3\2\2\2\u0203\u0204\7^\2\2\u0204\u0208\t\6\2\2\u0205\u0208\5K&\2\u0206"+ + "\u0208\5I%\2\u0207\u0203\3\2\2\2\u0207\u0205\3\2\2\2\u0207\u0206\3\2\2"+ + "\2\u0208H\3\2\2\2\u0209\u020a\7^\2\2\u020a\u020b\4\62\65\2\u020b\u020c"+ + "\4\629\2\u020c\u0213\4\629\2\u020d\u020e\7^\2\2\u020e\u020f\4\629\2\u020f"+ + "\u0213\4\629\2\u0210\u0211\7^\2\2\u0211\u0213\4\629\2\u0212\u0209\3\2"+ + "\2\2\u0212\u020d\3\2\2\2\u0212\u0210\3\2\2\2\u0213J\3\2\2\2\u0214\u0215"+ + "\7^\2\2\u0215\u0216\7w\2\2\u0216\u0217\5S*\2\u0217\u0218\5S*\2\u0218\u0219"+ + "\5S*\2\u0219\u021a\5S*\2\u021aL\3\2\2\2\u021b\u0220\5O(\2\u021c\u0220"+ + "\t\7\2\2\u021d\u0220\5Q)\2\u021e\u0220\t\b\2\2\u021f\u021b\3\2\2\2\u021f"+ + "\u021c\3\2\2\2\u021f\u021d\3\2\2\2\u021f\u021e\3\2\2\2\u0220N\3\2\2\2"+ + "\u0221\u0223\t\t\2\2\u0222\u0221\3\2\2\2\u0223P\3\2\2\2\u0224\u0225\t"+ + "\n\2\2\u0225R\3\2\2\2\u0226\u0227\t\13\2\2\u0227T\3\2\2\2\u0228\u022a"+ + "\t\f\2\2\u0229\u0228\3\2\2\2\u022a\u022b\3\2\2\2\u022b\u0229\3\2\2\2\u022b"+ + "\u022c\3\2\2\2\u022c\u022d\3\2\2\2\u022d\u022e\b+\2\2\u022eV\3\2\2\2\u022f"+ + "\u0231\7\17\2\2\u0230\u022f\3\2\2\2\u0230\u0231\3\2\2\2\u0231\u0232\3"+ + "\2\2\2\u0232\u0233\7\f\2\2\u0233\u0234\3\2\2\2\u0234\u0235\b,\2\2\u0235"+ + "X\3\2\2\2\u0236\u0237\7\61\2\2\u0237\u0238\7,\2\2\u0238\u023c\3\2\2\2"+ + "\u0239\u023b\13\2\2\2\u023a\u0239\3\2\2\2\u023b\u023e\3\2\2\2\u023c\u023d"+ + "\3\2\2\2\u023c\u023a\3\2\2\2\u023d\u023f\3\2\2\2\u023e\u023c\3\2\2\2\u023f"+ + "\u0240\7,\2\2\u0240\u0241\7\61\2\2\u0241\u0242\3\2\2\2\u0242\u0243\b-"+ + "\2\2\u0243Z\3\2\2\2\u0244\u0245\7\61\2\2\u0245\u0246\7\61\2\2\u0246\u024a"+ + "\3\2\2\2\u0247\u0249\n\r\2\2\u0248\u0247\3\2\2\2\u0249\u024c\3\2\2\2\u024a"+ + "\u0248\3\2\2\2\u024a\u024b\3\2\2\2\u024b\u024e\3\2\2\2\u024c\u024a\3\2"+ + "\2\2\u024d\u024f\7\17\2\2\u024e\u024d\3\2\2\2\u024e\u024f\3\2\2\2\u024f"+ + "\u0250\3\2\2\2\u0250\u0251\7\f\2\2\u0251\u0252\3\2\2\2\u0252\u0253\b."+ + "\2\2\u0253\\\3\2\2\2,\2|\u0085\u00e5\u00ea\u00f2\u00f7\u00ff\u0105\u010c"+ + "\u0118\u0128\u0136\u0148\u0150\u015c\u0165\u0172\u017d\u018c\u01a5\u01c2"+ + "\u01c7\u01cd\u01d0\u01d6\u01d9\u01e4\u01ea\u01f3\u01f5\u01fb\u01ff\u0207"+ + "\u0212\u021f\u0222\u022b\u0230\u023c\u024a\u024e\3\2\3\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.tokens b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.tokens new file mode 100644 index 0000000..038a52b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleLexer.tokens @@ -0,0 +1,40 @@ +COUNT=1 +AVG=2 +SUM=3 +MAX=4 +MIN=5 +AND=6 +OR=7 +Datatype=8 +GreaterThen=9 +GreaterThenOrEquals=10 +LessThen=11 +LessThenOrEquals=12 +Equals=13 +NotEquals=14 +EndWith=15 +NotEndWith=16 +StartWith=17 +NotStartWith=18 +In=19 +NotIn=20 +Match=21 +NotMatch=22 +Contain=23 +NotContain=24 +EqualsIgnoreCase=25 +NotEqualsIgnoreCase=26 +ARITH=27 +NUMBER=28 +Boolean=29 +Identifier=30 +STRING=31 +WS=32 +NL=33 +COMMENT=34 +LINE_COMMENT=35 +'count'=1 +'avg'=2 +'sum'=3 +'max'=4 +'min'=5 diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParser.tokens b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParser.tokens new file mode 100644 index 0000000..185b1ab --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParser.tokens @@ -0,0 +1,180 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +T__54=55 +T__55=56 +T__56=57 +T__57=58 +T__58=59 +T__59=60 +T__60=61 +T__61=62 +T__62=63 +T__63=64 +T__64=65 +T__65=66 +T__66=67 +T__67=68 +T__68=69 +T__69=70 +COUNT=71 +AVG=72 +SUM=73 +MAX=74 +MIN=75 +AND=76 +OR=77 +Datatype=78 +GreaterThen=79 +GreaterThenOrEquals=80 +LessThen=81 +LessThenOrEquals=82 +Equals=83 +NotEquals=84 +EndWith=85 +NotEndWith=86 +StartWith=87 +NotStartWith=88 +In=89 +NotIn=90 +Match=91 +NotMatch=92 +Contain=93 +NotContain=94 +EqualsIgnoreCase=95 +NotEqualsIgnoreCase=96 +ARITH=97 +NUMBER=98 +Boolean=99 +Identifier=100 +STRING=101 +WS=102 +NL=103 +COMMENT=104 +LINE_COMMENT=105 +'import'=1 +';'=2 +'.'=3 +'.*'=4 +'importParameterLibrary'=5 +'importVariableLibrary'=6 +'importConstantLibrary'=7 +'importActionLibrary'=8 +'function'=9 +'('=10 +')'=11 +'{'=12 +'}'=13 +','=14 +'rule'=15 +'\u89c4\u5219'=16 +'end'=17 +'\u7ed3\u675f'=18 +'loopRule'=19 +'\u5faa\u73af\u89c4\u5219'=20 +'loopTarget'=21 +'\u5faa\u73af\u5bf9\u8c61'=22 +'loopStart'=23 +'\u5f00\u59cb\u524d\u52a8\u4f5c'=24 +'loopEnd'=25 +'\u7ed3\u675f\u540e\u52a8\u4f5c'=26 +'loop'=27 +'\u5141\u8bb8\u5faa\u73af\u89e6\u53d1'=28 +'='=29 +'salience'=30 +'\u4f18\u5148\u7ea7'=31 +'effective-date'=32 +'\u751f\u6548\u65f6\u95f4'=33 +'\u751f\u6548\u65e5\u671f'=34 +'expires-date'=35 +'\u5931\u6548\u65f6\u95f4'=36 +'\u5931\u6548\u65e5\u671f'=37 +'enabled'=38 +'\u6fc0\u6d3b'=39 +'\u542f\u7528'=40 +'debug'=41 +'\u8c03\u8bd5'=42 +'\u5141\u8bb8\u8c03\u8bd5'=43 +'activation-group'=44 +'\u6fc0\u6d3b\u7ec4'=45 +'agenda-group'=46 +'\u8bae\u7a0b\u7ec4'=47 +'auto-focus'=48 +'\u81ea\u52a8\u83b7\u53d6\u7126\u70b9'=49 +'ruleflow-group'=50 +'\u89c4\u5219\u6d41\u7ec4'=51 +'if'=52 +'\u5982\u679c'=53 +'null'=54 +'eval'=55 +'all'=56 +'exist'=57 +'collect'=58 +'%'=59 +':'=60 +'then'=61 +'\u90a3\u4e48'=62 +'else'=63 +'\u5426\u5219'=64 +'out'=65 +'@'=66 +'parameter'=67 +'\u53c2\u6570'=68 +'!'=69 +'$'=70 +'count'=71 +'avg'=72 +'sum'=73 +'max'=74 +'min'=75 diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserBaseVisitor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserBaseVisitor.java new file mode 100644 index 0000000..ad38e83 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserBaseVisitor.java @@ -0,0 +1,574 @@ +// Generated from RuleParser.g4 by ANTLR 4.5.3 +package com.itheima.sfbx.framework.rule.dsl; +import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor; + +/** + * This class provides an empty implementation of {@link RuleParserVisitor}, + * which can be extended to create a visitor which only needs to handle a subset + * of the available methods. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public class RuleParserBaseVisitor extends AbstractParseTreeVisitor implements RuleParserVisitor { + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRuleSet(RuleParserParser.RuleSetContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRuleSetHeader(RuleParserParser.RuleSetHeaderContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRuleSetBody(RuleParserParser.RuleSetBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRules(RuleParserParser.RulesContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionImport(RuleParserParser.FunctionImportContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPackageDef(RuleParserParser.PackageDefContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitResource(RuleParserParser.ResourceContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImportParameterLibrary(RuleParserParser.ImportParameterLibraryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImportVariableLibrary(RuleParserParser.ImportVariableLibraryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImportConstantLibrary(RuleParserParser.ImportConstantLibraryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitImportActionLibrary(RuleParserParser.ImportActionLibraryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionDef(RuleParserParser.FunctionDefContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionParameters(RuleParserParser.FunctionParametersContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionParameter(RuleParserParser.FunctionParameterContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRuleDef(RuleParserParser.RuleDefContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopRuleDef(RuleParserParser.LoopRuleDefContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopTarget(RuleParserParser.LoopTargetContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopStart(RuleParserParser.LoopStartContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopEnd(RuleParserParser.LoopEndContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAttribute(RuleParserParser.AttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLoopAttribute(RuleParserParser.LoopAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSalienceAttribute(RuleParserParser.SalienceAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEffectiveDateAttribute(RuleParserParser.EffectiveDateAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpiresDateAttribute(RuleParserParser.ExpiresDateAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitEnabledAttribute(RuleParserParser.EnabledAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitDebugAttribute(RuleParserParser.DebugAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitActivationGroupAttribute(RuleParserParser.ActivationGroupAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAgendaGroupAttribute(RuleParserParser.AgendaGroupAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAutoFocusAttribute(RuleParserParser.AutoFocusAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRuleflowGroupAttribute(RuleParserParser.RuleflowGroupAttributeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLeft(RuleParserParser.LeftContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParenConditions(RuleParserParser.ParenConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiConditions(RuleParserParser.MultiConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSingleCondition(RuleParserParser.SingleConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSingleNamedConditionSet(RuleParserParser.SingleNamedConditionSetContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNamedConditionSet(RuleParserParser.NamedConditionSetContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParenNamedConditions(RuleParserParser.ParenNamedConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiNamedConditions(RuleParserParser.MultiNamedConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSingleNamedConditions(RuleParserParser.SingleNamedConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitSingleCellCondition(RuleParserParser.SingleCellConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMultiCellConditions(RuleParserParser.MultiCellConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParenCellConditions(RuleParserParser.ParenCellConditionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRefName(RuleParserParser.RefNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRefObject(RuleParserParser.RefObjectContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNullValue(RuleParserParser.NullValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConditionLeft(RuleParserParser.ConditionLeftContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpEval(RuleParserParser.ExpEvalContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpAll(RuleParserParser.ExpAllContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpExists(RuleParserParser.ExpExistsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpCollect(RuleParserParser.ExpCollectContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitCommonFunction(RuleParserParser.CommonFunctionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExprCondition(RuleParserParser.ExprConditionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitExpressionBody(RuleParserParser.ExpressionBodyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitPercent(RuleParserParser.PercentContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitLeftParen(RuleParserParser.LeftParenContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRightParen(RuleParserParser.RightParenContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitColon(RuleParserParser.ColonContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitJoin(RuleParserParser.JoinContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitRight(RuleParserParser.RightContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOther(RuleParserParser.OtherContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitActions(RuleParserParser.ActionsContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAction(RuleParserParser.ActionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitAssignAction(RuleParserParser.AssignActionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOutAction(RuleParserParser.OutActionContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitMethodInvoke(RuleParserParser.MethodInvokeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitFunctionInvoke(RuleParserParser.FunctionInvokeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitActionParameters(RuleParserParser.ActionParametersContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitBeanMethod(RuleParserParser.BeanMethodContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitComplexValue(RuleParserParser.ComplexValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParameter(RuleParserParser.ParameterContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitParameterName(RuleParserParser.ParameterNameContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstant(RuleParserParser.ConstantContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariable(RuleParserParser.VariableContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNamedVariable(RuleParserParser.NamedVariableContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitProperty(RuleParserParser.PropertyContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitVariableCategory(RuleParserParser.VariableCategoryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitNamedVariableCategory(RuleParserParser.NamedVariableCategoryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitConstantCategory(RuleParserParser.ConstantCategoryContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitValue(RuleParserParser.ValueContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *

The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.

+ */ + @Override public T visitOp(RuleParserParser.OpContext ctx) { return visitChildren(ctx); } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.java new file mode 100644 index 0000000..e0b0ea1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.java @@ -0,0 +1,568 @@ +// Generated from RuleParser.g4 by ANTLR 4.5.3 +package com.itheima.sfbx.framework.rule.dsl; + +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.ATN; +import org.antlr.v4.runtime.atn.ATNDeserializer; +import org.antlr.v4.runtime.atn.LexerATNSimulator; +import org.antlr.v4.runtime.atn.PredictionContextCache; +import org.antlr.v4.runtime.dfa.DFA; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class RuleParserLexer extends Lexer { + static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, + T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, + T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, + T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, + T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, + T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52, + T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, + T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66, + T__66=67, T__67=68, T__68=69, T__69=70, COUNT=71, AVG=72, SUM=73, MAX=74, + MIN=75, AND=76, OR=77, Datatype=78, GreaterThen=79, GreaterThenOrEquals=80, + LessThen=81, LessThenOrEquals=82, Equals=83, NotEquals=84, EndWith=85, + NotEndWith=86, StartWith=87, NotStartWith=88, In=89, NotIn=90, Match=91, + NotMatch=92, Contain=93, NotContain=94, EqualsIgnoreCase=95, NotEqualsIgnoreCase=96, + ARITH=97, NUMBER=98, Boolean=99, Identifier=100, STRING=101, WS=102, NL=103, + COMMENT=104, LINE_COMMENT=105; + public static String[] modeNames = { + "DEFAULT_MODE" + }; + + public static final String[] ruleNames = { + "T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8", + "T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16", + "T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "T__23", "T__24", + "T__25", "T__26", "T__27", "T__28", "T__29", "T__30", "T__31", "T__32", + "T__33", "T__34", "T__35", "T__36", "T__37", "T__38", "T__39", "T__40", + "T__41", "T__42", "T__43", "T__44", "T__45", "T__46", "T__47", "T__48", + "T__49", "T__50", "T__51", "T__52", "T__53", "T__54", "T__55", "T__56", + "T__57", "T__58", "T__59", "T__60", "T__61", "T__62", "T__63", "T__64", + "T__65", "T__66", "T__67", "T__68", "T__69", "COUNT", "AVG", "SUM", "MAX", + "MIN", "AND", "OR", "Datatype", "GreaterThen", "GreaterThenOrEquals", + "LessThen", "LessThenOrEquals", "Equals", "NotEquals", "EndWith", "NotEndWith", + "StartWith", "NotStartWith", "In", "NotIn", "Match", "NotMatch", "Contain", + "NotContain", "EqualsIgnoreCase", "NotEqualsIgnoreCase", "ARITH", "NUMBER", + "Boolean", "Identifier", "STRING", "STRING_CONTENT", "INT", "EXP", "EscapeSequence", + "OctalEscape", "UnicodeEscape", "Char", "StartChar", "DIGIT", "HEX", "WS", + "NL", "COMMENT", "LINE_COMMENT" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'import'", "';'", "'.'", "'.*'", "'importParameterLibrary'", "'importVariableLibrary'", + "'importConstantLibrary'", "'importActionLibrary'", "'function'", "'('", + "')'", "'{'", "'}'", "','", "'rule'", "'\\u89c4\\u5219'", "'end'", "'\\u7ed3\\u675f'", + "'loopRule'", "'\\u5faa\\u73af\\u89c4\\u5219'", "'loopTarget'", "'\\u5faa\\u73af\\u5bf9\\u8c61'", + "'loopStart'", "'\\u5f00\\u59cb\\u524d\\u52a8\\u4f5c'", "'loopEnd'", "'\\u7ed3\\u675f\\u540e\\u52a8\\u4f5c'", + "'loop'", "'\\u5141\\u8bb8\\u5faa\\u73af\\u89e6\\u53d1'", "'='", "'salience'", + "'\\u4f18\\u5148\\u7ea7'", "'effective-date'", "'\\u751f\\u6548\\u65f6\\u95f4'", + "'\\u751f\\u6548\\u65e5\\u671f'", "'expires-date'", "'\\u5931\\u6548\\u65f6\\u95f4'", + "'\\u5931\\u6548\\u65e5\\u671f'", "'enabled'", "'\\u6fc0\\u6d3b'", "'\\u542f\\u7528'", + "'debug'", "'\\u8c03\\u8bd5'", "'\\u5141\\u8bb8\\u8c03\\u8bd5'", "'activation-group'", + "'\\u6fc0\\u6d3b\\u7ec4'", "'agenda-group'", "'\\u8bae\\u7a0b\\u7ec4'", + "'auto-focus'", "'\\u81ea\\u52a8\\u83b7\\u53d6\\u7126\\u70b9'", "'ruleflow-group'", + "'\\u89c4\\u5219\\u6d41\\u7ec4'", "'if'", "'\\u5982\\u679c'", "'null'", + "'eval'", "'all'", "'exist'", "'collect'", "'%'", "':'", "'then'", "'\\u90a3\\u4e48'", + "'else'", "'\\u5426\\u5219'", "'out'", "'@'", "'parameter'", "'\\u53c2\\u6570'", + "'!'", "'$'", "'count'", "'avg'", "'sum'", "'max'", "'min'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, "COUNT", + "AVG", "SUM", "MAX", "MIN", "AND", "OR", "Datatype", "GreaterThen", "GreaterThenOrEquals", + "LessThen", "LessThenOrEquals", "Equals", "NotEquals", "EndWith", "NotEndWith", + "StartWith", "NotStartWith", "In", "NotIn", "Match", "NotMatch", "Contain", + "NotContain", "EqualsIgnoreCase", "NotEqualsIgnoreCase", "ARITH", "NUMBER", + "Boolean", "Identifier", "STRING", "WS", "NL", "COMMENT", "LINE_COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public RuleParserLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "RuleParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2k\u04a3\b\1\4\2\t"+ + "\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+ + "\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\tT"+ + "\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_\4"+ + "`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k\t"+ + "k\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\3\2\3\2\3\2\3"+ + "\2\3\2\3\2\3\2\3\3\3\3\3\4\3\4\3\5\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6"+ + "\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3"+ + "\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7\3\7"+ + "\3\7\3\7\3\7\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3"+ + "\b\3\b\3\b\3\b\3\b\3\b\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t"+ + "\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\n\3\n\3\n\3\n\3\n\3"+ + "\n\3\n\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\17\3\17\3\20\3\20\3\20\3"+ + "\20\3\20\3\21\3\21\3\21\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\24\3\24\3"+ + "\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\26\3\26\3"+ + "\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3\27\3"+ + "\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3\31\3\31\3"+ + "\31\3\31\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3"+ + "\33\3\33\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3"+ + "\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3!\3"+ + "!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3#\3#\3#"+ + "\3#\3#\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3&\3&\3&"+ + "\3&\3&\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3)\3)\3)\3*\3*\3*\3*\3"+ + "*\3*\3+\3+\3+\3,\3,\3,\3,\3,\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3-\3"+ + "-\3-\3-\3-\3.\3.\3.\3.\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3/\3\60\3\60"+ + "\3\60\3\60\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\61\3\62"+ + "\3\62\3\62\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\63"+ + "\3\63\3\63\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\65\3\65"+ + "\3\65\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\38\38\38\38\38\39\39\39"+ + "\39\3:\3:\3:\3:\3:\3:\3;\3;\3;\3;\3;\3;\3;\3;\3<\3<\3=\3=\3>\3>\3>\3>"+ + "\3>\3?\3?\3?\3@\3@\3@\3@\3@\3A\3A\3A\3B\3B\3B\3B\3C\3C\3D\3D\3D\3D\3D"+ + "\3D\3D\3D\3D\3D\3E\3E\3E\3F\3F\3G\3G\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3J"+ + "\3J\3J\3J\3K\3K\3K\3K\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3M\3M\3M\5M\u02cc"+ + "\nM\3N\3N\3N\3N\3N\3N\3N\5N\u02d5\nN\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O"+ + "\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O"+ + "\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O"+ + "\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O"+ + "\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\3O\5O\u0335\nO\3P\3P\3P\5P\u033a"+ + "\nP\3Q\3Q\3Q\3Q\3Q\3Q\5Q\u0342\nQ\3R\3R\3R\5R\u0347\nR\3S\3S\3S\3S\3S"+ + "\3S\5S\u034f\nS\3T\3T\3T\3T\5T\u0355\nT\3U\3U\3U\3U\3U\5U\u035c\nU\3V"+ + "\3V\3V\3V\3V\3V\3V\3V\3V\3V\5V\u0368\nV\3W\3W\3W\3W\3W\3W\3W\3W\3W\3W"+ + "\3W\3W\3W\3W\5W\u0378\nW\3X\3X\3X\3X\3X\3X\3X\3X\3X\3X\3X\3X\5X\u0386"+ + "\nX\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\3Y\5Y\u0398\nY\3Z\3Z"+ + "\3Z\3Z\3Z\3Z\5Z\u03a0\nZ\3[\3[\3[\3[\3[\3[\3[\3[\3[\3[\5[\u03ac\n[\3\\"+ + "\3\\\3\\\3\\\3\\\3\\\3\\\5\\\u03b5\n\\\3]\3]\3]\3]\3]\3]\3]\3]\3]\3]\3"+ + "]\5]\u03c2\n]\3^\3^\3^\3^\3^\3^\3^\3^\3^\5^\u03cd\n^\3_\3_\3_\3_\3_\3"+ + "_\3_\3_\3_\3_\3_\3_\3_\5_\u03dc\n_\3`\3`\3`\3`\3`\3`\3`\3`\3`\3`\3`\3"+ + "`\3`\3`\3`\3`\3`\3`\3`\3`\3`\3`\3`\5`\u03f5\n`\3a\3a\3a\3a\3a\3a\3a\3"+ + "a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\3a\5a\u0412\n"+ + "a\3b\3b\3c\5c\u0417\nc\3c\3c\3c\3c\5c\u041d\nc\3c\5c\u0420\nc\3c\3c\3"+ + "c\3c\5c\u0426\nc\3c\5c\u0429\nc\3d\3d\3d\3d\3d\3d\3d\3d\3d\5d\u0434\n"+ + "d\3e\3e\7e\u0438\ne\fe\16e\u043b\13e\3f\3f\3f\3f\3g\3g\7g\u0443\ng\fg"+ + "\16g\u0446\13g\3h\6h\u0449\nh\rh\16h\u044a\3i\3i\5i\u044f\ni\3i\3i\3j"+ + "\3j\3j\3j\5j\u0457\nj\3k\3k\3k\3k\3k\3k\3k\3k\3k\5k\u0462\nk\3l\3l\3l"+ + "\3l\3l\3l\3l\3m\3m\3m\3m\5m\u046f\nm\3n\5n\u0472\nn\3o\3o\3p\3p\3q\6q"+ + "\u0479\nq\rq\16q\u047a\3q\3q\3r\5r\u0480\nr\3r\3r\3r\3r\3s\3s\3s\3s\7"+ + "s\u048a\ns\fs\16s\u048d\13s\3s\3s\3s\3s\3s\3t\3t\3t\3t\7t\u0498\nt\ft"+ + "\16t\u049b\13t\3t\5t\u049e\nt\3t\3t\3t\3t\3\u048b\2u\3\3\5\4\7\5\t\6\13"+ + "\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33\17\35\20\37\21!\22#\23%\24\'"+ + "\25)\26+\27-\30/\31\61\32\63\33\65\34\67\359\36;\37= ?!A\"C#E$G%I&K\'"+ + "M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g\65i\66k\67m8o9q:s;u{?}@\177"+ + "A\u0081B\u0083C\u0085D\u0087E\u0089F\u008bG\u008dH\u008fI\u0091J\u0093"+ + "K\u0095L\u0097M\u0099N\u009bO\u009dP\u009fQ\u00a1R\u00a3S\u00a5T\u00a7"+ + "U\u00a9V\u00abW\u00adX\u00afY\u00b1Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb"+ + "_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5d\u00c7e\u00c9f\u00cbg\u00cd\2\u00cf"+ + "\2\u00d1\2\u00d3\2\u00d5\2\u00d7\2\u00d9\2\u00db\2\u00dd\2\u00df\2\u00e1"+ + "h\u00e3i\u00e5j\u00e7k\3\2\16\6\2\'\',-//\61\61\3\2$$\4\2GGgg\4\2--//"+ + "\n\2$$))^^ddhhppttvv\4\2//aa\5\2\u00b9\u00b9\u0302\u0371\u2041\u2042\t"+ + "\2C\\c|\u2072\u2191\u2c02\u2ff1\u3003\ud801\uf902\ufdd1\ufdf2\uffff\3"+ + "\2\62;\5\2\62;CHch\5\2\13\f\17\17\"\"\4\2\f\f\17\17\u04da\2\3\3\2\2\2"+ + "\2\5\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2"+ + "\2\2\2\21\3\2\2\2\2\23\3\2\2\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2"+ + "\2\33\3\2\2\2\2\35\3\2\2\2\2\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2"+ + "\2\2\'\3\2\2\2\2)\3\2\2\2\2+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2"+ + "\2\2\63\3\2\2\2\2\65\3\2\2\2\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2"+ + "\2\2\2?\3\2\2\2\2A\3\2\2\2\2C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2"+ + "\2K\3\2\2\2\2M\3\2\2\2\2O\3\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W"+ + "\3\2\2\2\2Y\3\2\2\2\2[\3\2\2\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2"+ + "\2\2\2e\3\2\2\2\2g\3\2\2\2\2i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2"+ + "\2q\3\2\2\2\2s\3\2\2\2\2u\3\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}"+ + "\3\2\2\2\2\177\3\2\2\2\2\u0081\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2"+ + "\2\u0087\3\2\2\2\2\u0089\3\2\2\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f"+ + "\3\2\2\2\2\u0091\3\2\2\2\2\u0093\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2"+ + "\2\2\u0099\3\2\2\2\2\u009b\3\2\2\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1"+ + "\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2"+ + "\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3"+ + "\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2"+ + "\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5"+ + "\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9\3\2\2\2\2\u00cb\3\2\2\2\2\u00e1\3\2\2"+ + "\2\2\u00e3\3\2\2\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\3\u00e9\3\2\2\2\5\u00f0"+ + "\3\2\2\2\7\u00f2\3\2\2\2\t\u00f4\3\2\2\2\13\u00f7\3\2\2\2\r\u010e\3\2"+ + "\2\2\17\u0124\3\2\2\2\21\u013a\3\2\2\2\23\u014e\3\2\2\2\25\u0157\3\2\2"+ + "\2\27\u0159\3\2\2\2\31\u015b\3\2\2\2\33\u015d\3\2\2\2\35\u015f\3\2\2\2"+ + "\37\u0161\3\2\2\2!\u0166\3\2\2\2#\u0169\3\2\2\2%\u016d\3\2\2\2\'\u0170"+ + "\3\2\2\2)\u0179\3\2\2\2+\u017e\3\2\2\2-\u0189\3\2\2\2/\u018e\3\2\2\2\61"+ + "\u0198\3\2\2\2\63\u019e\3\2\2\2\65\u01a6\3\2\2\2\67\u01ac\3\2\2\29\u01b1"+ + "\3\2\2\2;\u01b8\3\2\2\2=\u01ba\3\2\2\2?\u01c3\3\2\2\2A\u01c7\3\2\2\2C"+ + "\u01d6\3\2\2\2E\u01db\3\2\2\2G\u01e0\3\2\2\2I\u01ed\3\2\2\2K\u01f2\3\2"+ + "\2\2M\u01f7\3\2\2\2O\u01ff\3\2\2\2Q\u0202\3\2\2\2S\u0205\3\2\2\2U\u020b"+ + "\3\2\2\2W\u020e\3\2\2\2Y\u0213\3\2\2\2[\u0224\3\2\2\2]\u0228\3\2\2\2_"+ + "\u0235\3\2\2\2a\u0239\3\2\2\2c\u0244\3\2\2\2e\u024b\3\2\2\2g\u025a\3\2"+ + "\2\2i\u025f\3\2\2\2k\u0262\3\2\2\2m\u0265\3\2\2\2o\u026a\3\2\2\2q\u026f"+ + "\3\2\2\2s\u0273\3\2\2\2u\u0279\3\2\2\2w\u0281\3\2\2\2y\u0283\3\2\2\2{"+ + "\u0285\3\2\2\2}\u028a\3\2\2\2\177\u028d\3\2\2\2\u0081\u0292\3\2\2\2\u0083"+ + "\u0295\3\2\2\2\u0085\u0299\3\2\2\2\u0087\u029b\3\2\2\2\u0089\u02a5\3\2"+ + "\2\2\u008b\u02a8\3\2\2\2\u008d\u02aa\3\2\2\2\u008f\u02ac\3\2\2\2\u0091"+ + "\u02b2\3\2\2\2\u0093\u02b6\3\2\2\2\u0095\u02ba\3\2\2\2\u0097\u02be\3\2"+ + "\2\2\u0099\u02cb\3\2\2\2\u009b\u02d4\3\2\2\2\u009d\u0334\3\2\2\2\u009f"+ + "\u0339\3\2\2\2\u00a1\u0341\3\2\2\2\u00a3\u0346\3\2\2\2\u00a5\u034e\3\2"+ + "\2\2\u00a7\u0354\3\2\2\2\u00a9\u035b\3\2\2\2\u00ab\u0367\3\2\2\2\u00ad"+ + "\u0377\3\2\2\2\u00af\u0385\3\2\2\2\u00b1\u0397\3\2\2\2\u00b3\u039f\3\2"+ + "\2\2\u00b5\u03ab\3\2\2\2\u00b7\u03b4\3\2\2\2\u00b9\u03c1\3\2\2\2\u00bb"+ + "\u03cc\3\2\2\2\u00bd\u03db\3\2\2\2\u00bf\u03f4\3\2\2\2\u00c1\u0411\3\2"+ + "\2\2\u00c3\u0413\3\2\2\2\u00c5\u0428\3\2\2\2\u00c7\u0433\3\2\2\2\u00c9"+ + "\u0435\3\2\2\2\u00cb\u043c\3\2\2\2\u00cd\u0444\3\2\2\2\u00cf\u0448\3\2"+ + "\2\2\u00d1\u044c\3\2\2\2\u00d3\u0456\3\2\2\2\u00d5\u0461\3\2\2\2\u00d7"+ + "\u0463\3\2\2\2\u00d9\u046e\3\2\2\2\u00db\u0471\3\2\2\2\u00dd\u0473\3\2"+ + "\2\2\u00df\u0475\3\2\2\2\u00e1\u0478\3\2\2\2\u00e3\u047f\3\2\2\2\u00e5"+ + "\u0485\3\2\2\2\u00e7\u0493\3\2\2\2\u00e9\u00ea\7k\2\2\u00ea\u00eb\7o\2"+ + "\2\u00eb\u00ec\7r\2\2\u00ec\u00ed\7q\2\2\u00ed\u00ee\7t\2\2\u00ee\u00ef"+ + "\7v\2\2\u00ef\4\3\2\2\2\u00f0\u00f1\7=\2\2\u00f1\6\3\2\2\2\u00f2\u00f3"+ + "\7\60\2\2\u00f3\b\3\2\2\2\u00f4\u00f5\7\60\2\2\u00f5\u00f6\7,\2\2\u00f6"+ + "\n\3\2\2\2\u00f7\u00f8\7k\2\2\u00f8\u00f9\7o\2\2\u00f9\u00fa\7r\2\2\u00fa"+ + "\u00fb\7q\2\2\u00fb\u00fc\7t\2\2\u00fc\u00fd\7v\2\2\u00fd\u00fe\7R\2\2"+ + "\u00fe\u00ff\7c\2\2\u00ff\u0100\7t\2\2\u0100\u0101\7c\2\2\u0101\u0102"+ + "\7o\2\2\u0102\u0103\7g\2\2\u0103\u0104\7v\2\2\u0104\u0105\7g\2\2\u0105"+ + "\u0106\7t\2\2\u0106\u0107\7N\2\2\u0107\u0108\7k\2\2\u0108\u0109\7d\2\2"+ + "\u0109\u010a\7t\2\2\u010a\u010b\7c\2\2\u010b\u010c\7t\2\2\u010c\u010d"+ + "\7{\2\2\u010d\f\3\2\2\2\u010e\u010f\7k\2\2\u010f\u0110\7o\2\2\u0110\u0111"+ + "\7r\2\2\u0111\u0112\7q\2\2\u0112\u0113\7t\2\2\u0113\u0114\7v\2\2\u0114"+ + "\u0115\7X\2\2\u0115\u0116\7c\2\2\u0116\u0117\7t\2\2\u0117\u0118\7k\2\2"+ + "\u0118\u0119\7c\2\2\u0119\u011a\7d\2\2\u011a\u011b\7n\2\2\u011b\u011c"+ + "\7g\2\2\u011c\u011d\7N\2\2\u011d\u011e\7k\2\2\u011e\u011f\7d\2\2\u011f"+ + "\u0120\7t\2\2\u0120\u0121\7c\2\2\u0121\u0122\7t\2\2\u0122\u0123\7{\2\2"+ + "\u0123\16\3\2\2\2\u0124\u0125\7k\2\2\u0125\u0126\7o\2\2\u0126\u0127\7"+ + "r\2\2\u0127\u0128\7q\2\2\u0128\u0129\7t\2\2\u0129\u012a\7v\2\2\u012a\u012b"+ + "\7E\2\2\u012b\u012c\7q\2\2\u012c\u012d\7p\2\2\u012d\u012e\7u\2\2\u012e"+ + "\u012f\7v\2\2\u012f\u0130\7c\2\2\u0130\u0131\7p\2\2\u0131\u0132\7v\2\2"+ + "\u0132\u0133\7N\2\2\u0133\u0134\7k\2\2\u0134\u0135\7d\2\2\u0135\u0136"+ + "\7t\2\2\u0136\u0137\7c\2\2\u0137\u0138\7t\2\2\u0138\u0139\7{\2\2\u0139"+ + "\20\3\2\2\2\u013a\u013b\7k\2\2\u013b\u013c\7o\2\2\u013c\u013d\7r\2\2\u013d"+ + "\u013e\7q\2\2\u013e\u013f\7t\2\2\u013f\u0140\7v\2\2\u0140\u0141\7C\2\2"+ + "\u0141\u0142\7e\2\2\u0142\u0143\7v\2\2\u0143\u0144\7k\2\2\u0144\u0145"+ + "\7q\2\2\u0145\u0146\7p\2\2\u0146\u0147\7N\2\2\u0147\u0148\7k\2\2\u0148"+ + "\u0149\7d\2\2\u0149\u014a\7t\2\2\u014a\u014b\7c\2\2\u014b\u014c\7t\2\2"+ + "\u014c\u014d\7{\2\2\u014d\22\3\2\2\2\u014e\u014f\7h\2\2\u014f\u0150\7"+ + "w\2\2\u0150\u0151\7p\2\2\u0151\u0152\7e\2\2\u0152\u0153\7v\2\2\u0153\u0154"+ + "\7k\2\2\u0154\u0155\7q\2\2\u0155\u0156\7p\2\2\u0156\24\3\2\2\2\u0157\u0158"+ + "\7*\2\2\u0158\26\3\2\2\2\u0159\u015a\7+\2\2\u015a\30\3\2\2\2\u015b\u015c"+ + "\7}\2\2\u015c\32\3\2\2\2\u015d\u015e\7\177\2\2\u015e\34\3\2\2\2\u015f"+ + "\u0160\7.\2\2\u0160\36\3\2\2\2\u0161\u0162\7t\2\2\u0162\u0163\7w\2\2\u0163"+ + "\u0164\7n\2\2\u0164\u0165\7g\2\2\u0165 \3\2\2\2\u0166\u0167\7\u89c6\2"+ + "\2\u0167\u0168\7\u521b\2\2\u0168\"\3\2\2\2\u0169\u016a\7g\2\2\u016a\u016b"+ + "\7p\2\2\u016b\u016c\7f\2\2\u016c$\3\2\2\2\u016d\u016e\7\u7ed5\2\2\u016e"+ + "\u016f\7\u6761\2\2\u016f&\3\2\2\2\u0170\u0171\7n\2\2\u0171\u0172\7q\2"+ + "\2\u0172\u0173\7q\2\2\u0173\u0174\7r\2\2\u0174\u0175\7T\2\2\u0175\u0176"+ + "\7w\2\2\u0176\u0177\7n\2\2\u0177\u0178\7g\2\2\u0178(\3\2\2\2\u0179\u017a"+ + "\7\u5fac\2\2\u017a\u017b\7\u73b1\2\2\u017b\u017c\7\u89c6\2\2\u017c\u017d"+ + "\7\u521b\2\2\u017d*\3\2\2\2\u017e\u017f\7n\2\2\u017f\u0180\7q\2\2\u0180"+ + "\u0181\7q\2\2\u0181\u0182\7r\2\2\u0182\u0183\7V\2\2\u0183\u0184\7c\2\2"+ + "\u0184\u0185\7t\2\2\u0185\u0186\7i\2\2\u0186\u0187\7g\2\2\u0187\u0188"+ + "\7v\2\2\u0188,\3\2\2\2\u0189\u018a\7\u5fac\2\2\u018a\u018b\7\u73b1\2\2"+ + "\u018b\u018c\7\u5bfb\2\2\u018c\u018d\7\u8c63\2\2\u018d.\3\2\2\2\u018e"+ + "\u018f\7n\2\2\u018f\u0190\7q\2\2\u0190\u0191\7q\2\2\u0191\u0192\7r\2\2"+ + "\u0192\u0193\7U\2\2\u0193\u0194\7v\2\2\u0194\u0195\7c\2\2\u0195\u0196"+ + "\7t\2\2\u0196\u0197\7v\2\2\u0197\60\3\2\2\2\u0198\u0199\7\u5f02\2\2\u0199"+ + "\u019a\7\u59cd\2\2\u019a\u019b\7\u524f\2\2\u019b\u019c\7\u52aa\2\2\u019c"+ + "\u019d\7\u4f5e\2\2\u019d\62\3\2\2\2\u019e\u019f\7n\2\2\u019f\u01a0\7q"+ + "\2\2\u01a0\u01a1\7q\2\2\u01a1\u01a2\7r\2\2\u01a2\u01a3\7G\2\2\u01a3\u01a4"+ + "\7p\2\2\u01a4\u01a5\7f\2\2\u01a5\64\3\2\2\2\u01a6\u01a7\7\u7ed5\2\2\u01a7"+ + "\u01a8\7\u6761\2\2\u01a8\u01a9\7\u5410\2\2\u01a9\u01aa\7\u52aa\2\2\u01aa"+ + "\u01ab\7\u4f5e\2\2\u01ab\66\3\2\2\2\u01ac\u01ad\7n\2\2\u01ad\u01ae\7q"+ + "\2\2\u01ae\u01af\7q\2\2\u01af\u01b0\7r\2\2\u01b08\3\2\2\2\u01b1\u01b2"+ + "\7\u5143\2\2\u01b2\u01b3\7\u8bba\2\2\u01b3\u01b4\7\u5fac\2\2\u01b4\u01b5"+ + "\7\u73b1\2\2\u01b5\u01b6\7\u89e8\2\2\u01b6\u01b7\7\u53d3\2\2\u01b7:\3"+ + "\2\2\2\u01b8\u01b9\7?\2\2\u01b9<\3\2\2\2\u01ba\u01bb\7u\2\2\u01bb\u01bc"+ + "\7c\2\2\u01bc\u01bd\7n\2\2\u01bd\u01be\7k\2\2\u01be\u01bf\7g\2\2\u01bf"+ + "\u01c0\7p\2\2\u01c0\u01c1\7e\2\2\u01c1\u01c2\7g\2\2\u01c2>\3\2\2\2\u01c3"+ + "\u01c4\7\u4f1a\2\2\u01c4\u01c5\7\u514a\2\2\u01c5\u01c6\7\u7ea9\2\2\u01c6"+ + "@\3\2\2\2\u01c7\u01c8\7g\2\2\u01c8\u01c9\7h\2\2\u01c9\u01ca\7h\2\2\u01ca"+ + "\u01cb\7g\2\2\u01cb\u01cc\7e\2\2\u01cc\u01cd\7v\2\2\u01cd\u01ce\7k\2\2"+ + "\u01ce\u01cf\7x\2\2\u01cf\u01d0\7g\2\2\u01d0\u01d1\7/\2\2\u01d1\u01d2"+ + "\7f\2\2\u01d2\u01d3\7c\2\2\u01d3\u01d4\7v\2\2\u01d4\u01d5\7g\2\2\u01d5"+ + "B\3\2\2\2\u01d6\u01d7\7\u7521\2\2\u01d7\u01d8\7\u654a\2\2\u01d8\u01d9"+ + "\7\u65f8\2\2\u01d9\u01da\7\u95f6\2\2\u01daD\3\2\2\2\u01db\u01dc\7\u7521"+ + "\2\2\u01dc\u01dd\7\u654a\2\2\u01dd\u01de\7\u65e7\2\2\u01de\u01df\7\u6721"+ + "\2\2\u01dfF\3\2\2\2\u01e0\u01e1\7g\2\2\u01e1\u01e2\7z\2\2\u01e2\u01e3"+ + "\7r\2\2\u01e3\u01e4\7k\2\2\u01e4\u01e5\7t\2\2\u01e5\u01e6\7g\2\2\u01e6"+ + "\u01e7\7u\2\2\u01e7\u01e8\7/\2\2\u01e8\u01e9\7f\2\2\u01e9\u01ea\7c\2\2"+ + "\u01ea\u01eb\7v\2\2\u01eb\u01ec\7g\2\2\u01ecH\3\2\2\2\u01ed\u01ee\7\u5933"+ + "\2\2\u01ee\u01ef\7\u654a\2\2\u01ef\u01f0\7\u65f8\2\2\u01f0\u01f1\7\u95f6"+ + "\2\2\u01f1J\3\2\2\2\u01f2\u01f3\7\u5933\2\2\u01f3\u01f4\7\u654a\2\2\u01f4"+ + "\u01f5\7\u65e7\2\2\u01f5\u01f6\7\u6721\2\2\u01f6L\3\2\2\2\u01f7\u01f8"+ + "\7g\2\2\u01f8\u01f9\7p\2\2\u01f9\u01fa\7c\2\2\u01fa\u01fb\7d\2\2\u01fb"+ + "\u01fc\7n\2\2\u01fc\u01fd\7g\2\2\u01fd\u01fe\7f\2\2\u01feN\3\2\2\2\u01ff"+ + "\u0200\7\u6fc2\2\2\u0200\u0201\7\u6d3d\2\2\u0201P\3\2\2\2\u0202\u0203"+ + "\7\u5431\2\2\u0203\u0204\7\u752a\2\2\u0204R\3\2\2\2\u0205\u0206\7f\2\2"+ + "\u0206\u0207\7g\2\2\u0207\u0208\7d\2\2\u0208\u0209\7w\2\2\u0209\u020a"+ + "\7i\2\2\u020aT\3\2\2\2\u020b\u020c\7\u8c05\2\2\u020c\u020d\7\u8bd7\2\2"+ + "\u020dV\3\2\2\2\u020e\u020f\7\u5143\2\2\u020f\u0210\7\u8bba\2\2\u0210"+ + "\u0211\7\u8c05\2\2\u0211\u0212\7\u8bd7\2\2\u0212X\3\2\2\2\u0213\u0214"+ + "\7c\2\2\u0214\u0215\7e\2\2\u0215\u0216\7v\2\2\u0216\u0217\7k\2\2\u0217"+ + "\u0218\7x\2\2\u0218\u0219\7c\2\2\u0219\u021a\7v\2\2\u021a\u021b\7k\2\2"+ + "\u021b\u021c\7q\2\2\u021c\u021d\7p\2\2\u021d\u021e\7/\2\2\u021e\u021f"+ + "\7i\2\2\u021f\u0220\7t\2\2\u0220\u0221\7q\2\2\u0221\u0222\7w\2\2\u0222"+ + "\u0223\7r\2\2\u0223Z\3\2\2\2\u0224\u0225\7\u6fc2\2\2\u0225\u0226\7\u6d3d"+ + "\2\2\u0226\u0227\7\u7ec6\2\2\u0227\\\3\2\2\2\u0228\u0229\7c\2\2\u0229"+ + "\u022a\7i\2\2\u022a\u022b\7g\2\2\u022b\u022c\7p\2\2\u022c\u022d\7f\2\2"+ + "\u022d\u022e\7c\2\2\u022e\u022f\7/\2\2\u022f\u0230\7i\2\2\u0230\u0231"+ + "\7t\2\2\u0231\u0232\7q\2\2\u0232\u0233\7w\2\2\u0233\u0234\7r\2\2\u0234"+ + "^\3\2\2\2\u0235\u0236\7\u8bb0\2\2\u0236\u0237\7\u7a0d\2\2\u0237\u0238"+ + "\7\u7ec6\2\2\u0238`\3\2\2\2\u0239\u023a\7c\2\2\u023a\u023b\7w\2\2\u023b"+ + "\u023c\7v\2\2\u023c\u023d\7q\2\2\u023d\u023e\7/\2\2\u023e\u023f\7h\2\2"+ + "\u023f\u0240\7q\2\2\u0240\u0241\7e\2\2\u0241\u0242\7w\2\2\u0242\u0243"+ + "\7u\2\2\u0243b\3\2\2\2\u0244\u0245\7\u81ec\2\2\u0245\u0246\7\u52aa\2\2"+ + "\u0246\u0247\7\u83b9\2\2\u0247\u0248\7\u53d8\2\2\u0248\u0249\7\u7128\2"+ + "\2\u0249\u024a\7\u70bb\2\2\u024ad\3\2\2\2\u024b\u024c\7t\2\2\u024c\u024d"+ + "\7w\2\2\u024d\u024e\7n\2\2\u024e\u024f\7g\2\2\u024f\u0250\7h\2\2\u0250"+ + "\u0251\7n\2\2\u0251\u0252\7q\2\2\u0252\u0253\7y\2\2\u0253\u0254\7/\2\2"+ + "\u0254\u0255\7i\2\2\u0255\u0256\7t\2\2\u0256\u0257\7q\2\2\u0257\u0258"+ + "\7w\2\2\u0258\u0259\7r\2\2\u0259f\3\2\2\2\u025a\u025b\7\u89c6\2\2\u025b"+ + "\u025c\7\u521b\2\2\u025c\u025d\7\u6d43\2\2\u025d\u025e\7\u7ec6\2\2\u025e"+ + "h\3\2\2\2\u025f\u0260\7k\2\2\u0260\u0261\7h\2\2\u0261j\3\2\2\2\u0262\u0263"+ + "\7\u5984\2\2\u0263\u0264\7\u679e\2\2\u0264l\3\2\2\2\u0265\u0266\7p\2\2"+ + "\u0266\u0267\7w\2\2\u0267\u0268\7n\2\2\u0268\u0269\7n\2\2\u0269n\3\2\2"+ + "\2\u026a\u026b\7g\2\2\u026b\u026c\7x\2\2\u026c\u026d\7c\2\2\u026d\u026e"+ + "\7n\2\2\u026ep\3\2\2\2\u026f\u0270\7c\2\2\u0270\u0271\7n\2\2\u0271\u0272"+ + "\7n\2\2\u0272r\3\2\2\2\u0273\u0274\7g\2\2\u0274\u0275\7z\2\2\u0275\u0276"+ + "\7k\2\2\u0276\u0277\7u\2\2\u0277\u0278\7v\2\2\u0278t\3\2\2\2\u0279\u027a"+ + "\7e\2\2\u027a\u027b\7q\2\2\u027b\u027c\7n\2\2\u027c\u027d\7n\2\2\u027d"+ + "\u027e\7g\2\2\u027e\u027f\7e\2\2\u027f\u0280\7v\2\2\u0280v\3\2\2\2\u0281"+ + "\u0282\7\'\2\2\u0282x\3\2\2\2\u0283\u0284\7<\2\2\u0284z\3\2\2\2\u0285"+ + "\u0286\7v\2\2\u0286\u0287\7j\2\2\u0287\u0288\7g\2\2\u0288\u0289\7p\2\2"+ + "\u0289|\3\2\2\2\u028a\u028b\7\u90a5\2\2\u028b\u028c\7\u4e4a\2\2\u028c"+ + "~\3\2\2\2\u028d\u028e\7g\2\2\u028e\u028f\7n\2\2\u028f\u0290\7u\2\2\u0290"+ + "\u0291\7g\2\2\u0291\u0080\3\2\2\2\u0292\u0293\7\u5428\2\2\u0293\u0294"+ + "\7\u521b\2\2\u0294\u0082\3\2\2\2\u0295\u0296\7q\2\2\u0296\u0297\7w\2\2"+ + "\u0297\u0298\7v\2\2\u0298\u0084\3\2\2\2\u0299\u029a\7B\2\2\u029a\u0086"+ + "\3\2\2\2\u029b\u029c\7r\2\2\u029c\u029d\7c\2\2\u029d\u029e\7t\2\2\u029e"+ + "\u029f\7c\2\2\u029f\u02a0\7o\2\2\u02a0\u02a1\7g\2\2\u02a1\u02a2\7v\2\2"+ + "\u02a2\u02a3\7g\2\2\u02a3\u02a4\7t\2\2\u02a4\u0088\3\2\2\2\u02a5\u02a6"+ + "\7\u53c4\2\2\u02a6\u02a7\7\u6572\2\2\u02a7\u008a\3\2\2\2\u02a8\u02a9\7"+ + "#\2\2\u02a9\u008c\3\2\2\2\u02aa\u02ab\7&\2\2\u02ab\u008e\3\2\2\2\u02ac"+ + "\u02ad\7e\2\2\u02ad\u02ae\7q\2\2\u02ae\u02af\7w\2\2\u02af\u02b0\7p\2\2"+ + "\u02b0\u02b1\7v\2\2\u02b1\u0090\3\2\2\2\u02b2\u02b3\7c\2\2\u02b3\u02b4"+ + "\7x\2\2\u02b4\u02b5\7i\2\2\u02b5\u0092\3\2\2\2\u02b6\u02b7\7u\2\2\u02b7"+ + "\u02b8\7w\2\2\u02b8\u02b9\7o\2\2\u02b9\u0094\3\2\2\2\u02ba\u02bb\7o\2"+ + "\2\u02bb\u02bc\7c\2\2\u02bc\u02bd\7z\2\2\u02bd\u0096\3\2\2\2\u02be\u02bf"+ + "\7o\2\2\u02bf\u02c0\7k\2\2\u02c0\u02c1\7p\2\2\u02c1\u0098\3\2\2\2\u02c2"+ + "\u02c3\7c\2\2\u02c3\u02c4\7p\2\2\u02c4\u02cc\7f\2\2\u02c5\u02c6\7(\2\2"+ + "\u02c6\u02cc\7(\2\2\u02c7\u02cc\7.\2\2\u02c8\u02c9\7\u5e78\2\2\u02c9\u02cc"+ + "\7\u4e16\2\2\u02ca\u02cc\7\u4e16\2\2\u02cb\u02c2\3\2\2\2\u02cb\u02c5\3"+ + "\2\2\2\u02cb\u02c7\3\2\2\2\u02cb\u02c8\3\2\2\2\u02cb\u02ca\3\2\2\2\u02cc"+ + "\u009a\3\2\2\2\u02cd\u02ce\7q\2\2\u02ce\u02d5\7t\2\2\u02cf\u02d0\7~\2"+ + "\2\u02d0\u02d5\7~\2\2\u02d1\u02d2\7\u6218\2\2\u02d2\u02d5\7\u8007\2\2"+ + "\u02d3\u02d5\7\u6218\2\2\u02d4\u02cd\3\2\2\2\u02d4\u02cf\3\2\2\2\u02d4"+ + "\u02d1\3\2\2\2\u02d4\u02d3\3\2\2\2\u02d5\u009c\3\2\2\2\u02d6\u02d7\7U"+ + "\2\2\u02d7\u02d8\7v\2\2\u02d8\u02d9\7t\2\2\u02d9\u02da\7k\2\2\u02da\u02db"+ + "\7p\2\2\u02db\u0335\7i\2\2\u02dc\u02dd\7k\2\2\u02dd\u02de\7p\2\2\u02de"+ + "\u0335\7v\2\2\u02df\u02e0\7K\2\2\u02e0\u02e1\7p\2\2\u02e1\u02e2\7v\2\2"+ + "\u02e2\u02e3\7g\2\2\u02e3\u02e4\7i\2\2\u02e4\u02e5\7g\2\2\u02e5\u0335"+ + "\7t\2\2\u02e6\u02e7\7f\2\2\u02e7\u02e8\7q\2\2\u02e8\u02e9\7w\2\2\u02e9"+ + "\u02ea\7d\2\2\u02ea\u02eb\7n\2\2\u02eb\u0335\7g\2\2\u02ec\u02ed\7F\2\2"+ + "\u02ed\u02ee\7q\2\2\u02ee\u02ef\7w\2\2\u02ef\u02f0\7d\2\2\u02f0\u02f1"+ + "\7n\2\2\u02f1\u0335\7g\2\2\u02f2\u02f3\7n\2\2\u02f3\u02f4\7q\2\2\u02f4"+ + "\u02f5\7p\2\2\u02f5\u0335\7i\2\2\u02f6\u02f7\7N\2\2\u02f7\u02f8\7q\2\2"+ + "\u02f8\u02f9\7p\2\2\u02f9\u0335\7i\2\2\u02fa\u02fb\7h\2\2\u02fb\u02fc"+ + "\7n\2\2\u02fc\u02fd\7q\2\2\u02fd\u02fe\7c\2\2\u02fe\u0335\7v\2\2\u02ff"+ + "\u0300\7H\2\2\u0300\u0301\7n\2\2\u0301\u0302\7q\2\2\u0302\u0303\7c\2\2"+ + "\u0303\u0335\7v\2\2\u0304\u0305\7D\2\2\u0305\u0306\7k\2\2\u0306\u0307"+ + "\7i\2\2\u0307\u0308\7F\2\2\u0308\u0309\7g\2\2\u0309\u030a\7e\2\2\u030a"+ + "\u030b\7k\2\2\u030b\u030c\7o\2\2\u030c\u030d\7c\2\2\u030d\u0335\7n\2\2"+ + "\u030e\u030f\7d\2\2\u030f\u0310\7q\2\2\u0310\u0311\7q\2\2\u0311\u0312"+ + "\7n\2\2\u0312\u0313\7g\2\2\u0313\u0314\7c\2\2\u0314\u0335\7p\2\2\u0315"+ + "\u0316\7D\2\2\u0316\u0317\7q\2\2\u0317\u0318\7q\2\2\u0318\u0319\7n\2\2"+ + "\u0319\u031a\7g\2\2\u031a\u031b\7c\2\2\u031b\u0335\7p\2\2\u031c\u031d"+ + "\7F\2\2\u031d\u031e\7c\2\2\u031e\u031f\7v\2\2\u031f\u0335\7g\2\2\u0320"+ + "\u0321\7N\2\2\u0321\u0322\7k\2\2\u0322\u0323\7u\2\2\u0323\u0335\7v\2\2"+ + "\u0324\u0325\7U\2\2\u0325\u0326\7g\2\2\u0326\u0335\7v\2\2\u0327\u0328"+ + "\7O\2\2\u0328\u0329\7c\2\2\u0329\u0335\7r\2\2\u032a\u032b\7G\2\2\u032b"+ + "\u032c\7p\2\2\u032c\u032d\7w\2\2\u032d\u0335\7o\2\2\u032e\u032f\7Q\2\2"+ + "\u032f\u0330\7d\2\2\u0330\u0331\7l\2\2\u0331\u0332\7g\2\2\u0332\u0333"+ + "\7e\2\2\u0333\u0335\7v\2\2\u0334\u02d6\3\2\2\2\u0334\u02dc\3\2\2\2\u0334"+ + "\u02df\3\2\2\2\u0334\u02e6\3\2\2\2\u0334\u02ec\3\2\2\2\u0334\u02f2\3\2"+ + "\2\2\u0334\u02f6\3\2\2\2\u0334\u02fa\3\2\2\2\u0334\u02ff\3\2\2\2\u0334"+ + "\u0304\3\2\2\2\u0334\u030e\3\2\2\2\u0334\u0315\3\2\2\2\u0334\u031c\3\2"+ + "\2\2\u0334\u0320\3\2\2\2\u0334\u0324\3\2\2\2\u0334\u0327\3\2\2\2\u0334"+ + "\u032a\3\2\2\2\u0334\u032e\3\2\2\2\u0335\u009e\3\2\2\2\u0336\u033a\7@"+ + "\2\2\u0337\u0338\7\u5929\2\2\u0338\u033a\7\u4e90\2\2\u0339\u0336\3\2\2"+ + "\2\u0339\u0337\3\2\2\2\u033a\u00a0\3\2\2\2\u033b\u033c\7@\2\2\u033c\u0342"+ + "\7?\2\2\u033d\u033e\7\u5929\2\2\u033e\u033f\7\u4e90\2\2\u033f\u0340\7"+ + "\u7b4b\2\2\u0340\u0342\7\u4e90\2\2\u0341\u033b\3\2\2\2\u0341\u033d\3\2"+ + "\2\2\u0342\u00a2\3\2\2\2\u0343\u0347\7>\2\2\u0344\u0345\7\u5c11\2\2\u0345"+ + "\u0347\7\u4e90\2\2\u0346\u0343\3\2\2\2\u0346\u0344\3\2\2\2\u0347\u00a4"+ + "\3\2\2\2\u0348\u0349\7>\2\2\u0349\u034f\7?\2\2\u034a\u034b\7\u5c11\2\2"+ + "\u034b\u034c\7\u4e90\2\2\u034c\u034d\7\u7b4b\2\2\u034d\u034f\7\u4e90\2"+ + "\2\u034e\u0348\3\2\2\2\u034e\u034a\3\2\2\2\u034f\u00a6\3\2\2\2\u0350\u0351"+ + "\7?\2\2\u0351\u0355\7?\2\2\u0352\u0353\7\u7b4b\2\2\u0353\u0355\7\u4e90"+ + "\2\2\u0354\u0350\3\2\2\2\u0354\u0352\3\2\2\2\u0355\u00a8\3\2\2\2\u0356"+ + "\u0357\7#\2\2\u0357\u035c\7?\2\2\u0358\u0359\7\u4e0f\2\2\u0359\u035a\7"+ + "\u7b4b\2\2\u035a\u035c\7\u4e90\2\2\u035b\u0356\3\2\2\2\u035b\u0358\3\2"+ + "\2\2\u035c\u00aa\3\2\2\2\u035d\u035e\7G\2\2\u035e\u035f\7p\2\2\u035f\u0360"+ + "\7f\2\2\u0360\u0361\7Y\2\2\u0361\u0362\7k\2\2\u0362\u0363\7v\2\2\u0363"+ + "\u0368\7j\2\2\u0364\u0365\7\u7ed5\2\2\u0365\u0366\7\u6761\2\2\u0366\u0368"+ + "\7\u4e90\2\2\u0367\u035d\3\2\2\2\u0367\u0364\3\2\2\2\u0368\u00ac\3\2\2"+ + "\2\u0369\u036a\7P\2\2\u036a\u036b\7q\2\2\u036b\u036c\7v\2\2\u036c\u036d"+ + "\7G\2\2\u036d\u036e\7p\2\2\u036e\u036f\7f\2\2\u036f\u0370\7Y\2\2\u0370"+ + "\u0371\7k\2\2\u0371\u0372\7v\2\2\u0372\u0378\7j\2\2\u0373\u0374\7\u4e0f"+ + "\2\2\u0374\u0375\7\u7ed5\2\2\u0375\u0376\7\u6761\2\2\u0376\u0378\7\u4e90"+ + "\2\2\u0377\u0369\3\2\2\2\u0377\u0373\3\2\2\2\u0378\u00ae\3\2\2\2\u0379"+ + "\u037a\7U\2\2\u037a\u037b\7v\2\2\u037b\u037c\7c\2\2\u037c\u037d\7t\2\2"+ + "\u037d\u037e\7v\2\2\u037e\u037f\7Y\2\2\u037f\u0380\7k\2\2\u0380\u0381"+ + "\7v\2\2\u0381\u0386\7j\2\2\u0382\u0383\7\u5f02\2\2\u0383\u0384\7\u59cd"+ + "\2\2\u0384\u0386\7\u4e90\2\2\u0385\u0379\3\2\2\2\u0385\u0382\3\2\2\2\u0386"+ + "\u00b0\3\2\2\2\u0387\u0388\7P\2\2\u0388\u0389\7q\2\2\u0389\u038a\7v\2"+ + "\2\u038a\u038b\7U\2\2\u038b\u038c\7v\2\2\u038c\u038d\7c\2\2\u038d\u038e"+ + "\7t\2\2\u038e\u038f\7v\2\2\u038f\u0390\7Y\2\2\u0390\u0391\7k\2\2\u0391"+ + "\u0392\7v\2\2\u0392\u0398\7j\2\2\u0393\u0394\7\u4e0f\2\2\u0394\u0395\7"+ + "\u5f02\2\2\u0395\u0396\7\u59cd\2\2\u0396\u0398\7\u4e90\2\2\u0397\u0387"+ + "\3\2\2\2\u0397\u0393\3\2\2\2\u0398\u00b2\3\2\2\2\u0399\u039a\7K\2\2\u039a"+ + "\u03a0\7p\2\2\u039b\u039c\7\u572a\2\2\u039c\u039d\7\u96c8\2\2\u039d\u039e"+ + "\7\u540a\2\2\u039e\u03a0\7\u4e2f\2\2\u039f\u0399\3\2\2\2\u039f\u039b\3"+ + "\2\2\2\u03a0\u00b4\3\2\2\2\u03a1\u03a2\7P\2\2\u03a2\u03a3\7q\2\2\u03a3"+ + "\u03a4\7v\2\2\u03a4\u03a5\7K\2\2\u03a5\u03ac\7p\2\2\u03a6\u03a7\7\u4e0f"+ + "\2\2\u03a7\u03a8\7\u572a\2\2\u03a8\u03a9\7\u96c8\2\2\u03a9\u03aa\7\u540a"+ + "\2\2\u03aa\u03ac\7\u4e2f\2\2\u03ab\u03a1\3\2\2\2\u03ab\u03a6\3\2\2\2\u03ac"+ + "\u00b6\3\2\2\2\u03ad\u03ae\7O\2\2\u03ae\u03af\7c\2\2\u03af\u03b0\7v\2"+ + "\2\u03b0\u03b1\7e\2\2\u03b1\u03b5\7j\2\2\u03b2\u03b3\7\u533b\2\2\u03b3"+ + "\u03b5\7\u914f\2\2\u03b4\u03ad\3\2\2\2\u03b4\u03b2\3\2\2\2\u03b5\u00b8"+ + "\3\2\2\2\u03b6\u03b7\7P\2\2\u03b7\u03b8\7q\2\2\u03b8\u03b9\7v\2\2\u03b9"+ + "\u03ba\7O\2\2\u03ba\u03bb\7c\2\2\u03bb\u03bc\7v\2\2\u03bc\u03bd\7e\2\2"+ + "\u03bd\u03c2\7j\2\2\u03be\u03bf\7\u4e0f\2\2\u03bf\u03c0\7\u533b\2\2\u03c0"+ + "\u03c2\7\u914f\2\2\u03c1\u03b6\3\2\2\2\u03c1\u03be\3\2\2\2\u03c2\u00ba"+ + "\3\2\2\2\u03c3\u03c4\7E\2\2\u03c4\u03c5\7q\2\2\u03c5\u03c6\7p\2\2\u03c6"+ + "\u03c7\7v\2\2\u03c7\u03c8\7c\2\2\u03c8\u03c9\7k\2\2\u03c9\u03cd\7p\2\2"+ + "\u03ca\u03cb\7\u5307\2\2\u03cb\u03cd\7\u542d\2\2\u03cc\u03c3\3\2\2\2\u03cc"+ + "\u03ca\3\2\2\2\u03cd\u00bc\3\2\2\2\u03ce\u03cf\7P\2\2\u03cf\u03d0\7q\2"+ + "\2\u03d0\u03d1\7v\2\2\u03d1\u03d2\7E\2\2\u03d2\u03d3\7q\2\2\u03d3\u03d4"+ + "\7p\2\2\u03d4\u03d5\7v\2\2\u03d5\u03d6\7c\2\2\u03d6\u03d7\7k\2\2\u03d7"+ + "\u03dc\7p\2\2\u03d8\u03d9\7\u4e0f\2\2\u03d9\u03da\7\u5307\2\2\u03da\u03dc"+ + "\7\u542d\2\2\u03db\u03ce\3\2\2\2\u03db\u03d8\3\2\2\2\u03dc\u00be\3\2\2"+ + "\2\u03dd\u03de\7G\2\2\u03de\u03df\7s\2\2\u03df\u03e0\7w\2\2\u03e0\u03e1"+ + "\7c\2\2\u03e1\u03e2\7n\2\2\u03e2\u03e3\7u\2\2\u03e3\u03e4\7K\2\2\u03e4"+ + "\u03e5\7i\2\2\u03e5\u03e6\7p\2\2\u03e6\u03e7\7q\2\2\u03e7\u03e8\7t\2\2"+ + "\u03e8\u03e9\7g\2\2\u03e9\u03ea\7E\2\2\u03ea\u03eb\7c\2\2\u03eb\u03ec"+ + "\7u\2\2\u03ec\u03f5\7g\2\2\u03ed\u03ee\7\u5fff\2\2\u03ee\u03ef\7\u7567"+ + "\2\2\u03ef\u03f0\7\u5929\2\2\u03f0\u03f1\7\u5c11\2\2\u03f1\u03f2\7\u519b"+ + "\2\2\u03f2\u03f3\7\u7b4b\2\2\u03f3\u03f5\7\u4e90\2\2\u03f4\u03dd\3\2\2"+ + "\2\u03f4\u03ed\3\2\2\2\u03f5\u00c0\3\2\2\2\u03f6\u03f7\7P\2\2\u03f7\u03f8"+ + "\7q\2\2\u03f8\u03f9\7v\2\2\u03f9\u03fa\7G\2\2\u03fa\u03fb\7s\2\2\u03fb"+ + "\u03fc\7w\2\2\u03fc\u03fd\7c\2\2\u03fd\u03fe\7n\2\2\u03fe\u03ff\7u\2\2"+ + "\u03ff\u0400\7K\2\2\u0400\u0401\7i\2\2\u0401\u0402\7p\2\2\u0402\u0403"+ + "\7q\2\2\u0403\u0404\7t\2\2\u0404\u0405\7g\2\2\u0405\u0406\7E\2\2\u0406"+ + "\u0407\7c\2\2\u0407\u0408\7u\2\2\u0408\u0412\7g\2\2\u0409\u040a\7\u5fff"+ + "\2\2\u040a\u040b\7\u7567\2\2\u040b\u040c\7\u5929\2\2\u040c\u040d\7\u5c11"+ + "\2\2\u040d\u040e\7\u519b\2\2\u040e\u040f\7\u4e0f\2\2\u040f\u0410\7\u7b4b"+ + "\2\2\u0410\u0412\7\u4e90\2\2\u0411\u03f6\3\2\2\2\u0411\u0409\3\2\2\2\u0412"+ + "\u00c2\3\2\2\2\u0413\u0414\t\2\2\2\u0414\u00c4\3\2\2\2\u0415\u0417\7/"+ + "\2\2\u0416\u0415\3\2\2\2\u0416\u0417\3\2\2\2\u0417\u0418\3\2\2\2\u0418"+ + "\u0419\5\u00cfh\2\u0419\u041a\7\60\2\2\u041a\u041c\5\u00cfh\2\u041b\u041d"+ + "\5\u00d1i\2\u041c\u041b\3\2\2\2\u041c\u041d\3\2\2\2\u041d\u0429\3\2\2"+ + "\2\u041e\u0420\7/\2\2\u041f\u041e\3\2\2\2\u041f\u0420\3\2\2\2\u0420\u0421"+ + "\3\2\2\2\u0421\u0422\5\u00cfh\2\u0422\u0423\5\u00d1i\2\u0423\u0429\3\2"+ + "\2\2\u0424\u0426\7/\2\2\u0425\u0424\3\2\2\2\u0425\u0426\3\2\2\2\u0426"+ + "\u0427\3\2\2\2\u0427\u0429\5\u00cfh\2\u0428\u0416\3\2\2\2\u0428\u041f"+ + "\3\2\2\2\u0428\u0425\3\2\2\2\u0429\u00c6\3\2\2\2\u042a\u042b\7v\2\2\u042b"+ + "\u042c\7t\2\2\u042c\u042d\7w\2\2\u042d\u0434\7g\2\2\u042e\u042f\7h\2\2"+ + "\u042f\u0430\7c\2\2\u0430\u0431\7n\2\2\u0431\u0432\7u\2\2\u0432\u0434"+ + "\7g\2\2\u0433\u042a\3\2\2\2\u0433\u042e\3\2\2\2\u0434\u00c8\3\2\2\2\u0435"+ + "\u0439\5\u00dbn\2\u0436\u0438\5\u00d9m\2\u0437\u0436\3\2\2\2\u0438\u043b"+ + "\3\2\2\2\u0439\u0437\3\2\2\2\u0439\u043a\3\2\2\2\u043a\u00ca\3\2\2\2\u043b"+ + "\u0439\3\2\2\2\u043c\u043d\7$\2\2\u043d\u043e\5\u00cdg\2\u043e\u043f\7"+ + "$\2\2\u043f\u00cc\3\2\2\2\u0440\u0443\5\u00d3j\2\u0441\u0443\n\3\2\2\u0442"+ + "\u0440\3\2\2\2\u0442\u0441\3\2\2\2\u0443\u0446\3\2\2\2\u0444\u0442\3\2"+ + "\2\2\u0444\u0445\3\2\2\2\u0445\u00ce\3\2\2\2\u0446\u0444\3\2\2\2\u0447"+ + "\u0449\5\u00ddo\2\u0448\u0447\3\2\2\2\u0449\u044a\3\2\2\2\u044a\u0448"+ + "\3\2\2\2\u044a\u044b\3\2\2\2\u044b\u00d0\3\2\2\2\u044c\u044e\t\4\2\2\u044d"+ + "\u044f\t\5\2\2\u044e\u044d\3\2\2\2\u044e\u044f\3\2\2\2\u044f\u0450\3\2"+ + "\2\2\u0450\u0451\5\u00cfh\2\u0451\u00d2\3\2\2\2\u0452\u0453\7^\2\2\u0453"+ + "\u0457\t\6\2\2\u0454\u0457\5\u00d7l\2\u0455\u0457\5\u00d5k\2\u0456\u0452"+ + "\3\2\2\2\u0456\u0454\3\2\2\2\u0456\u0455\3\2\2\2\u0457\u00d4\3\2\2\2\u0458"+ + "\u0459\7^\2\2\u0459\u045a\4\62\65\2\u045a\u045b\4\629\2\u045b\u0462\4"+ + "\629\2\u045c\u045d\7^\2\2\u045d\u045e\4\629\2\u045e\u0462\4\629\2\u045f"+ + "\u0460\7^\2\2\u0460\u0462\4\629\2\u0461\u0458\3\2\2\2\u0461\u045c\3\2"+ + "\2\2\u0461\u045f\3\2\2\2\u0462\u00d6\3\2\2\2\u0463\u0464\7^\2\2\u0464"+ + "\u0465\7w\2\2\u0465\u0466\5\u00dfp\2\u0466\u0467\5\u00dfp\2\u0467\u0468"+ + "\5\u00dfp\2\u0468\u0469\5\u00dfp\2\u0469\u00d8\3\2\2\2\u046a\u046f\5\u00db"+ + "n\2\u046b\u046f\t\7\2\2\u046c\u046f\5\u00ddo\2\u046d\u046f\t\b\2\2\u046e"+ + "\u046a\3\2\2\2\u046e\u046b\3\2\2\2\u046e\u046c\3\2\2\2\u046e\u046d\3\2"+ + "\2\2\u046f\u00da\3\2\2\2\u0470\u0472\t\t\2\2\u0471\u0470\3\2\2\2\u0472"+ + "\u00dc\3\2\2\2\u0473\u0474\t\n\2\2\u0474\u00de\3\2\2\2\u0475\u0476\t\13"+ + "\2\2\u0476\u00e0\3\2\2\2\u0477\u0479\t\f\2\2\u0478\u0477\3\2\2\2\u0479"+ + "\u047a\3\2\2\2\u047a\u0478\3\2\2\2\u047a\u047b\3\2\2\2\u047b\u047c\3\2"+ + "\2\2\u047c\u047d\bq\2\2\u047d\u00e2\3\2\2\2\u047e\u0480\7\17\2\2\u047f"+ + "\u047e\3\2\2\2\u047f\u0480\3\2\2\2\u0480\u0481\3\2\2\2\u0481\u0482\7\f"+ + "\2\2\u0482\u0483\3\2\2\2\u0483\u0484\br\2\2\u0484\u00e4\3\2\2\2\u0485"+ + "\u0486\7\61\2\2\u0486\u0487\7,\2\2\u0487\u048b\3\2\2\2\u0488\u048a\13"+ + "\2\2\2\u0489\u0488\3\2\2\2\u048a\u048d\3\2\2\2\u048b\u048c\3\2\2\2\u048b"+ + "\u0489\3\2\2\2\u048c\u048e\3\2\2\2\u048d\u048b\3\2\2\2\u048e\u048f\7,"+ + "\2\2\u048f\u0490\7\61\2\2\u0490\u0491\3\2\2\2\u0491\u0492\bs\2\2\u0492"+ + "\u00e6\3\2\2\2\u0493\u0494\7\61\2\2\u0494\u0495\7\61\2\2\u0495\u0499\3"+ + "\2\2\2\u0496\u0498\n\r\2\2\u0497\u0496\3\2\2\2\u0498\u049b\3\2\2\2\u0499"+ + "\u0497\3\2\2\2\u0499\u049a\3\2\2\2\u049a\u049d\3\2\2\2\u049b\u0499\3\2"+ + "\2\2\u049c\u049e\7\17\2\2\u049d\u049c\3\2\2\2\u049d\u049e\3\2\2\2\u049e"+ + "\u049f\3\2\2\2\u049f\u04a0\7\f\2\2\u04a0\u04a1\3\2\2\2\u04a1\u04a2\bt"+ + "\2\2\u04a2\u00e8\3\2\2\2,\2\u02cb\u02d4\u0334\u0339\u0341\u0346\u034e"+ + "\u0354\u035b\u0367\u0377\u0385\u0397\u039f\u03ab\u03b4\u03c1\u03cc\u03db"+ + "\u03f4\u0411\u0416\u041c\u041f\u0425\u0428\u0433\u0439\u0442\u0444\u044a"+ + "\u044e\u0456\u0461\u046e\u0471\u047a\u047f\u048b\u0499\u049d\3\2\3\2"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.tokens b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.tokens new file mode 100644 index 0000000..185b1ab --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserLexer.tokens @@ -0,0 +1,180 @@ +T__0=1 +T__1=2 +T__2=3 +T__3=4 +T__4=5 +T__5=6 +T__6=7 +T__7=8 +T__8=9 +T__9=10 +T__10=11 +T__11=12 +T__12=13 +T__13=14 +T__14=15 +T__15=16 +T__16=17 +T__17=18 +T__18=19 +T__19=20 +T__20=21 +T__21=22 +T__22=23 +T__23=24 +T__24=25 +T__25=26 +T__26=27 +T__27=28 +T__28=29 +T__29=30 +T__30=31 +T__31=32 +T__32=33 +T__33=34 +T__34=35 +T__35=36 +T__36=37 +T__37=38 +T__38=39 +T__39=40 +T__40=41 +T__41=42 +T__42=43 +T__43=44 +T__44=45 +T__45=46 +T__46=47 +T__47=48 +T__48=49 +T__49=50 +T__50=51 +T__51=52 +T__52=53 +T__53=54 +T__54=55 +T__55=56 +T__56=57 +T__57=58 +T__58=59 +T__59=60 +T__60=61 +T__61=62 +T__62=63 +T__63=64 +T__64=65 +T__65=66 +T__66=67 +T__67=68 +T__68=69 +T__69=70 +COUNT=71 +AVG=72 +SUM=73 +MAX=74 +MIN=75 +AND=76 +OR=77 +Datatype=78 +GreaterThen=79 +GreaterThenOrEquals=80 +LessThen=81 +LessThenOrEquals=82 +Equals=83 +NotEquals=84 +EndWith=85 +NotEndWith=86 +StartWith=87 +NotStartWith=88 +In=89 +NotIn=90 +Match=91 +NotMatch=92 +Contain=93 +NotContain=94 +EqualsIgnoreCase=95 +NotEqualsIgnoreCase=96 +ARITH=97 +NUMBER=98 +Boolean=99 +Identifier=100 +STRING=101 +WS=102 +NL=103 +COMMENT=104 +LINE_COMMENT=105 +'import'=1 +';'=2 +'.'=3 +'.*'=4 +'importParameterLibrary'=5 +'importVariableLibrary'=6 +'importConstantLibrary'=7 +'importActionLibrary'=8 +'function'=9 +'('=10 +')'=11 +'{'=12 +'}'=13 +','=14 +'rule'=15 +'\u89c4\u5219'=16 +'end'=17 +'\u7ed3\u675f'=18 +'loopRule'=19 +'\u5faa\u73af\u89c4\u5219'=20 +'loopTarget'=21 +'\u5faa\u73af\u5bf9\u8c61'=22 +'loopStart'=23 +'\u5f00\u59cb\u524d\u52a8\u4f5c'=24 +'loopEnd'=25 +'\u7ed3\u675f\u540e\u52a8\u4f5c'=26 +'loop'=27 +'\u5141\u8bb8\u5faa\u73af\u89e6\u53d1'=28 +'='=29 +'salience'=30 +'\u4f18\u5148\u7ea7'=31 +'effective-date'=32 +'\u751f\u6548\u65f6\u95f4'=33 +'\u751f\u6548\u65e5\u671f'=34 +'expires-date'=35 +'\u5931\u6548\u65f6\u95f4'=36 +'\u5931\u6548\u65e5\u671f'=37 +'enabled'=38 +'\u6fc0\u6d3b'=39 +'\u542f\u7528'=40 +'debug'=41 +'\u8c03\u8bd5'=42 +'\u5141\u8bb8\u8c03\u8bd5'=43 +'activation-group'=44 +'\u6fc0\u6d3b\u7ec4'=45 +'agenda-group'=46 +'\u8bae\u7a0b\u7ec4'=47 +'auto-focus'=48 +'\u81ea\u52a8\u83b7\u53d6\u7126\u70b9'=49 +'ruleflow-group'=50 +'\u89c4\u5219\u6d41\u7ec4'=51 +'if'=52 +'\u5982\u679c'=53 +'null'=54 +'eval'=55 +'all'=56 +'exist'=57 +'collect'=58 +'%'=59 +':'=60 +'then'=61 +'\u90a3\u4e48'=62 +'else'=63 +'\u5426\u5219'=64 +'out'=65 +'@'=66 +'parameter'=67 +'\u53c2\u6570'=68 +'!'=69 +'$'=70 +'count'=71 +'avg'=72 +'sum'=73 +'max'=74 +'min'=75 diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserParser.java new file mode 100644 index 0000000..6e4ccb5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserParser.java @@ -0,0 +1,5541 @@ +// Generated from RuleParser.g4 by ANTLR 4.5.3 +package com.itheima.sfbx.framework.rule.dsl; + +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.ATN; +import org.antlr.v4.runtime.atn.ATNDeserializer; +import org.antlr.v4.runtime.atn.ParserATNSimulator; +import org.antlr.v4.runtime.atn.PredictionContextCache; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; +import org.antlr.v4.runtime.tree.TerminalNode; + +import java.util.List; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast"}) +public class RuleParserParser extends Parser { + static { RuntimeMetaData.checkVersion("4.5.3", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9, + T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17, + T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, T__23=24, + T__24=25, T__25=26, T__26=27, T__27=28, T__28=29, T__29=30, T__30=31, + T__31=32, T__32=33, T__33=34, T__34=35, T__35=36, T__36=37, T__37=38, + T__38=39, T__39=40, T__40=41, T__41=42, T__42=43, T__43=44, T__44=45, + T__45=46, T__46=47, T__47=48, T__48=49, T__49=50, T__50=51, T__51=52, + T__52=53, T__53=54, T__54=55, T__55=56, T__56=57, T__57=58, T__58=59, + T__59=60, T__60=61, T__61=62, T__62=63, T__63=64, T__64=65, T__65=66, + T__66=67, T__67=68, T__68=69, T__69=70, COUNT=71, AVG=72, SUM=73, MAX=74, + MIN=75, AND=76, OR=77, Datatype=78, GreaterThen=79, GreaterThenOrEquals=80, + LessThen=81, LessThenOrEquals=82, Equals=83, NotEquals=84, EndWith=85, + NotEndWith=86, StartWith=87, NotStartWith=88, In=89, NotIn=90, Match=91, + NotMatch=92, Contain=93, NotContain=94, EqualsIgnoreCase=95, NotEqualsIgnoreCase=96, + ARITH=97, NUMBER=98, Boolean=99, Identifier=100, STRING=101, WS=102, NL=103, + COMMENT=104, LINE_COMMENT=105; + public static final int + RULE_ruleSet = 0, RULE_ruleSetHeader = 1, RULE_ruleSetBody = 2, RULE_rules = 3, + RULE_functionImport = 4, RULE_packageDef = 5, RULE_resource = 6, RULE_importParameterLibrary = 7, + RULE_importVariableLibrary = 8, RULE_importConstantLibrary = 9, RULE_importActionLibrary = 10, + RULE_functionDef = 11, RULE_functionParameters = 12, RULE_functionParameter = 13, + RULE_ruleDef = 14, RULE_loopRuleDef = 15, RULE_loopTarget = 16, RULE_loopStart = 17, + RULE_loopEnd = 18, RULE_attribute = 19, RULE_loopAttribute = 20, RULE_salienceAttribute = 21, + RULE_effectiveDateAttribute = 22, RULE_expiresDateAttribute = 23, RULE_enabledAttribute = 24, + RULE_debugAttribute = 25, RULE_activationGroupAttribute = 26, RULE_agendaGroupAttribute = 27, + RULE_autoFocusAttribute = 28, RULE_ruleflowGroupAttribute = 29, RULE_left = 30, + RULE_condition = 31, RULE_namedConditionSet = 32, RULE_namedCondition = 33, + RULE_decisionTableCellCondition = 34, RULE_refName = 35, RULE_refObject = 36, + RULE_nullValue = 37, RULE_conditionLeft = 38, RULE_expEval = 39, RULE_expAll = 40, + RULE_expExists = 41, RULE_expCollect = 42, RULE_commonFunction = 43, RULE_exprCondition = 44, + RULE_expressionBody = 45, RULE_percent = 46, RULE_leftParen = 47, RULE_rightParen = 48, + RULE_colon = 49, RULE_join = 50, RULE_right = 51, RULE_other = 52, RULE_actions = 53, + RULE_action = 54, RULE_assignAction = 55, RULE_outAction = 56, RULE_methodInvoke = 57, + RULE_functionInvoke = 58, RULE_actionParameters = 59, RULE_beanMethod = 60, + RULE_complexValue = 61, RULE_parameter = 62, RULE_parameterName = 63, + RULE_constant = 64, RULE_variable = 65, RULE_namedVariable = 66, RULE_property = 67, + RULE_variableCategory = 68, RULE_namedVariableCategory = 69, RULE_constantCategory = 70, + RULE_value = 71, RULE_op = 72; + public static final String[] ruleNames = { + "ruleSet", "ruleSetHeader", "ruleSetBody", "rules", "functionImport", + "packageDef", "resource", "importParameterLibrary", "importVariableLibrary", + "importConstantLibrary", "importActionLibrary", "functionDef", "functionParameters", + "functionParameter", "ruleDef", "loopRuleDef", "loopTarget", "loopStart", + "loopEnd", "attribute", "loopAttribute", "salienceAttribute", "effectiveDateAttribute", + "expiresDateAttribute", "enabledAttribute", "debugAttribute", "activationGroupAttribute", + "agendaGroupAttribute", "autoFocusAttribute", "ruleflowGroupAttribute", + "left", "condition", "namedConditionSet", "namedCondition", "decisionTableCellCondition", + "refName", "refObject", "nullValue", "conditionLeft", "expEval", "expAll", + "expExists", "expCollect", "commonFunction", "exprCondition", "expressionBody", + "percent", "leftParen", "rightParen", "colon", "join", "right", "other", + "actions", "action", "assignAction", "outAction", "methodInvoke", "functionInvoke", + "actionParameters", "beanMethod", "complexValue", "parameter", "parameterName", + "constant", "variable", "namedVariable", "property", "variableCategory", + "namedVariableCategory", "constantCategory", "value", "op" + }; + + private static final String[] _LITERAL_NAMES = { + null, "'import'", "';'", "'.'", "'.*'", "'importParameterLibrary'", "'importVariableLibrary'", + "'importConstantLibrary'", "'importActionLibrary'", "'function'", "'('", + "')'", "'{'", "'}'", "','", "'rule'", "'\\u89c4\\u5219'", "'end'", "'\\u7ed3\\u675f'", + "'loopRule'", "'\\u5faa\\u73af\\u89c4\\u5219'", "'loopTarget'", "'\\u5faa\\u73af\\u5bf9\\u8c61'", + "'loopStart'", "'\\u5f00\\u59cb\\u524d\\u52a8\\u4f5c'", "'loopEnd'", "'\\u7ed3\\u675f\\u540e\\u52a8\\u4f5c'", + "'loop'", "'\\u5141\\u8bb8\\u5faa\\u73af\\u89e6\\u53d1'", "'='", "'salience'", + "'\\u4f18\\u5148\\u7ea7'", "'effective-date'", "'\\u751f\\u6548\\u65f6\\u95f4'", + "'\\u751f\\u6548\\u65e5\\u671f'", "'expires-date'", "'\\u5931\\u6548\\u65f6\\u95f4'", + "'\\u5931\\u6548\\u65e5\\u671f'", "'enabled'", "'\\u6fc0\\u6d3b'", "'\\u542f\\u7528'", + "'debug'", "'\\u8c03\\u8bd5'", "'\\u5141\\u8bb8\\u8c03\\u8bd5'", "'activation-group'", + "'\\u6fc0\\u6d3b\\u7ec4'", "'agenda-group'", "'\\u8bae\\u7a0b\\u7ec4'", + "'auto-focus'", "'\\u81ea\\u52a8\\u83b7\\u53d6\\u7126\\u70b9'", "'ruleflow-group'", + "'\\u89c4\\u5219\\u6d41\\u7ec4'", "'if'", "'\\u5982\\u679c'", "'null'", + "'eval'", "'all'", "'exist'", "'collect'", "'%'", "':'", "'then'", "'\\u90a3\\u4e48'", + "'else'", "'\\u5426\\u5219'", "'out'", "'@'", "'parameter'", "'\\u53c2\\u6570'", + "'!'", "'$'", "'count'", "'avg'", "'sum'", "'max'", "'min'" + }; + private static final String[] _SYMBOLIC_NAMES = { + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, "COUNT", + "AVG", "SUM", "MAX", "MIN", "AND", "OR", "Datatype", "GreaterThen", "GreaterThenOrEquals", + "LessThen", "LessThenOrEquals", "Equals", "NotEquals", "EndWith", "NotEndWith", + "StartWith", "NotStartWith", "In", "NotIn", "Match", "NotMatch", "Contain", + "NotContain", "EqualsIgnoreCase", "NotEqualsIgnoreCase", "ARITH", "NUMBER", + "Boolean", "Identifier", "STRING", "WS", "NL", "COMMENT", "LINE_COMMENT" + }; + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = ""; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + @Override + public String getGrammarFileName() { return "RuleParser.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public ATN getATN() { return _ATN; } + + public RuleParserParser(TokenStream input) { + super(input); + _interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + public static class RuleSetContext extends ParserRuleContext { + public RuleSetHeaderContext ruleSetHeader() { + return getRuleContext(RuleSetHeaderContext.class,0); + } + public RuleSetBodyContext ruleSetBody() { + return getRuleContext(RuleSetBodyContext.class,0); + } + public RuleSetContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ruleSet; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRuleSet(this); + else return visitor.visitChildren(this); + } + } + + public final RuleSetContext ruleSet() throws RecognitionException { + RuleSetContext _localctx = new RuleSetContext(_ctx, getState()); + enterRule(_localctx, 0, RULE_ruleSet); + try { + enterOuterAlt(_localctx, 1); + { + setState(146); + ruleSetHeader(); + setState(147); + ruleSetBody(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RuleSetHeaderContext extends ParserRuleContext { + public List resource() { + return getRuleContexts(ResourceContext.class); + } + public ResourceContext resource(int i) { + return getRuleContext(ResourceContext.class,i); + } + public List functionImport() { + return getRuleContexts(FunctionImportContext.class); + } + public FunctionImportContext functionImport(int i) { + return getRuleContext(FunctionImportContext.class,i); + } + public RuleSetHeaderContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ruleSetHeader; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRuleSetHeader(this); + else return visitor.visitChildren(this); + } + } + + public final RuleSetHeaderContext ruleSetHeader() throws RecognitionException { + RuleSetHeaderContext _localctx = new RuleSetHeaderContext(_ctx, getState()); + enterRule(_localctx, 2, RULE_ruleSetHeader); + int _la; + try { + setState(185); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,6,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(152); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7))) != 0)) { + { + { + setState(149); + resource(); + } + } + setState(154); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(158); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__0) { + { + { + setState(155); + functionImport(); + } + } + setState(160); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(164); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7))) != 0)) { + { + { + setState(161); + resource(); + } + } + setState(166); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(170); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__0) { + { + { + setState(167); + functionImport(); + } + } + setState(172); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(176); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__0) { + { + { + setState(173); + functionImport(); + } + } + setState(178); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(182); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__4) | (1L << T__5) | (1L << T__6) | (1L << T__7))) != 0)) { + { + { + setState(179); + resource(); + } + } + setState(184); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RuleSetBodyContext extends ParserRuleContext { + public List rules() { + return getRuleContexts(RulesContext.class); + } + public RulesContext rules(int i) { + return getRuleContext(RulesContext.class,i); + } + public RuleSetBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ruleSetBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRuleSetBody(this); + else return visitor.visitChildren(this); + } + } + + public final RuleSetBodyContext ruleSetBody() throws RecognitionException { + RuleSetBodyContext _localctx = new RuleSetBodyContext(_ctx, getState()); + enterRule(_localctx, 4, RULE_ruleSetBody); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(190); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__14) | (1L << T__15) | (1L << T__18) | (1L << T__19))) != 0)) { + { + { + setState(187); + rules(); + } + } + setState(192); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RulesContext extends ParserRuleContext { + public RuleDefContext ruleDef() { + return getRuleContext(RuleDefContext.class,0); + } + public LoopRuleDefContext loopRuleDef() { + return getRuleContext(LoopRuleDefContext.class,0); + } + public RulesContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_rules; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRules(this); + else return visitor.visitChildren(this); + } + } + + public final RulesContext rules() throws RecognitionException { + RulesContext _localctx = new RulesContext(_ctx, getState()); + enterRule(_localctx, 6, RULE_rules); + try { + setState(195); + switch (_input.LA(1)) { + case T__14: + case T__15: + enterOuterAlt(_localctx, 1); + { + setState(193); + ruleDef(); + } + break; + case T__18: + case T__19: + enterOuterAlt(_localctx, 2); + { + setState(194); + loopRuleDef(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionImportContext extends ParserRuleContext { + public PackageDefContext packageDef() { + return getRuleContext(PackageDefContext.class,0); + } + public FunctionImportContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionImport; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitFunctionImport(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionImportContext functionImport() throws RecognitionException { + FunctionImportContext _localctx = new FunctionImportContext(_ctx, getState()); + enterRule(_localctx, 8, RULE_functionImport); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(197); + match(T__0); + setState(198); + packageDef(0); + setState(200); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(199); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PackageDefContext extends ParserRuleContext { + public List Identifier() { return getTokens(RuleParserParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(RuleParserParser.Identifier, i); + } + public PackageDefContext packageDef() { + return getRuleContext(PackageDefContext.class,0); + } + public PackageDefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_packageDef; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitPackageDef(this); + else return visitor.visitChildren(this); + } + } + + public final PackageDefContext packageDef() throws RecognitionException { + return packageDef(0); + } + + private PackageDefContext packageDef(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + PackageDefContext _localctx = new PackageDefContext(_ctx, _parentState); + PackageDefContext _prevctx = _localctx; + int _startState = 10; + enterRecursionRule(_localctx, 10, RULE_packageDef, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(211); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,11,_ctx) ) { + case 1: + { + setState(203); + match(Identifier); + } + break; + case 2: + { + setState(204); + match(Identifier); + setState(207); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(205); + match(T__2); + setState(206); + match(Identifier); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(209); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,10,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(217); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new PackageDefContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_packageDef); + setState(213); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(214); + match(T__3); + } + } + } + setState(219); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,12,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ResourceContext extends ParserRuleContext { + public ImportVariableLibraryContext importVariableLibrary() { + return getRuleContext(ImportVariableLibraryContext.class,0); + } + public ImportActionLibraryContext importActionLibrary() { + return getRuleContext(ImportActionLibraryContext.class,0); + } + public ImportConstantLibraryContext importConstantLibrary() { + return getRuleContext(ImportConstantLibraryContext.class,0); + } + public ImportParameterLibraryContext importParameterLibrary() { + return getRuleContext(ImportParameterLibraryContext.class,0); + } + public ResourceContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_resource; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitResource(this); + else return visitor.visitChildren(this); + } + } + + public final ResourceContext resource() throws RecognitionException { + ResourceContext _localctx = new ResourceContext(_ctx, getState()); + enterRule(_localctx, 12, RULE_resource); + try { + setState(224); + switch (_input.LA(1)) { + case T__5: + enterOuterAlt(_localctx, 1); + { + setState(220); + importVariableLibrary(); + } + break; + case T__7: + enterOuterAlt(_localctx, 2); + { + setState(221); + importActionLibrary(); + } + break; + case T__6: + enterOuterAlt(_localctx, 3); + { + setState(222); + importConstantLibrary(); + } + break; + case T__4: + enterOuterAlt(_localctx, 4); + { + setState(223); + importParameterLibrary(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportParameterLibraryContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ImportParameterLibraryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importParameterLibrary; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitImportParameterLibrary(this); + else return visitor.visitChildren(this); + } + } + + public final ImportParameterLibraryContext importParameterLibrary() throws RecognitionException { + ImportParameterLibraryContext _localctx = new ImportParameterLibraryContext(_ctx, getState()); + enterRule(_localctx, 14, RULE_importParameterLibrary); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(226); + match(T__4); + setState(227); + match(STRING); + setState(229); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(228); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportVariableLibraryContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ImportVariableLibraryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importVariableLibrary; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitImportVariableLibrary(this); + else return visitor.visitChildren(this); + } + } + + public final ImportVariableLibraryContext importVariableLibrary() throws RecognitionException { + ImportVariableLibraryContext _localctx = new ImportVariableLibraryContext(_ctx, getState()); + enterRule(_localctx, 16, RULE_importVariableLibrary); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(231); + match(T__5); + setState(232); + match(STRING); + setState(234); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(233); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportConstantLibraryContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ImportConstantLibraryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importConstantLibrary; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitImportConstantLibrary(this); + else return visitor.visitChildren(this); + } + } + + public final ImportConstantLibraryContext importConstantLibrary() throws RecognitionException { + ImportConstantLibraryContext _localctx = new ImportConstantLibraryContext(_ctx, getState()); + enterRule(_localctx, 18, RULE_importConstantLibrary); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(236); + match(T__6); + setState(237); + match(STRING); + setState(239); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(238); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ImportActionLibraryContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ImportActionLibraryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_importActionLibrary; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitImportActionLibrary(this); + else return visitor.visitChildren(this); + } + } + + public final ImportActionLibraryContext importActionLibrary() throws RecognitionException { + ImportActionLibraryContext _localctx = new ImportActionLibraryContext(_ctx, getState()); + enterRule(_localctx, 20, RULE_importActionLibrary); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(241); + match(T__7); + setState(242); + match(STRING); + setState(244); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(243); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionDefContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public ExpressionBodyContext expressionBody() { + return getRuleContext(ExpressionBodyContext.class,0); + } + public FunctionParametersContext functionParameters() { + return getRuleContext(FunctionParametersContext.class,0); + } + public FunctionDefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionDef; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitFunctionDef(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionDefContext functionDef() throws RecognitionException { + FunctionDefContext _localctx = new FunctionDefContext(_ctx, getState()); + enterRule(_localctx, 22, RULE_functionDef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(246); + match(T__8); + setState(247); + match(Identifier); + setState(248); + match(T__9); + setState(250); + _la = _input.LA(1); + if (_la==Datatype) { + { + setState(249); + functionParameters(); + } + } + + setState(252); + match(T__10); + setState(253); + match(T__11); + setState(254); + expressionBody(); + setState(255); + match(T__12); + setState(257); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(256); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionParametersContext extends ParserRuleContext { + public List functionParameter() { + return getRuleContexts(FunctionParameterContext.class); + } + public FunctionParameterContext functionParameter(int i) { + return getRuleContext(FunctionParameterContext.class,i); + } + public FunctionParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionParameters; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitFunctionParameters(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionParametersContext functionParameters() throws RecognitionException { + FunctionParametersContext _localctx = new FunctionParametersContext(_ctx, getState()); + enterRule(_localctx, 24, RULE_functionParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(259); + functionParameter(); + setState(264); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(260); + match(T__13); + setState(261); + functionParameter(); + } + } + setState(266); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionParameterContext extends ParserRuleContext { + public TerminalNode Datatype() { return getToken(RuleParserParser.Datatype, 0); } + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public FunctionParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionParameter; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitFunctionParameter(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionParameterContext functionParameter() throws RecognitionException { + FunctionParameterContext _localctx = new FunctionParameterContext(_ctx, getState()); + enterRule(_localctx, 26, RULE_functionParameter); + try { + enterOuterAlt(_localctx, 1); + { + setState(267); + match(Datatype); + setState(268); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RuleDefContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public LeftContext left() { + return getRuleContext(LeftContext.class,0); + } + public RightContext right() { + return getRuleContext(RightContext.class,0); + } + public List attribute() { + return getRuleContexts(AttributeContext.class); + } + public AttributeContext attribute(int i) { + return getRuleContext(AttributeContext.class,i); + } + public OtherContext other() { + return getRuleContext(OtherContext.class,0); + } + public RuleDefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ruleDef; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRuleDef(this); + else return visitor.visitChildren(this); + } + } + + public final RuleDefContext ruleDef() throws RecognitionException { + RuleDefContext _localctx = new RuleDefContext(_ctx, getState()); + enterRule(_localctx, 28, RULE_ruleDef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(270); + _la = _input.LA(1); + if ( !(_la==T__14 || _la==T__15) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(271); + match(STRING); + setState(275); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__26) | (1L << T__27) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) { + { + { + setState(272); + attribute(); + } + } + setState(277); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(278); + left(); + setState(279); + right(); + setState(281); + _la = _input.LA(1); + if (_la==T__62 || _la==T__63) { + { + setState(280); + other(); + } + } + + setState(283); + _la = _input.LA(1); + if ( !(_la==T__16 || _la==T__17) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(285); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(284); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopRuleDefContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public LoopTargetContext loopTarget() { + return getRuleContext(LoopTargetContext.class,0); + } + public LeftContext left() { + return getRuleContext(LeftContext.class,0); + } + public RightContext right() { + return getRuleContext(RightContext.class,0); + } + public List attribute() { + return getRuleContexts(AttributeContext.class); + } + public AttributeContext attribute(int i) { + return getRuleContext(AttributeContext.class,i); + } + public LoopStartContext loopStart() { + return getRuleContext(LoopStartContext.class,0); + } + public OtherContext other() { + return getRuleContext(OtherContext.class,0); + } + public LoopEndContext loopEnd() { + return getRuleContext(LoopEndContext.class,0); + } + public LoopRuleDefContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopRuleDef; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLoopRuleDef(this); + else return visitor.visitChildren(this); + } + } + + public final LoopRuleDefContext loopRuleDef() throws RecognitionException { + LoopRuleDefContext _localctx = new LoopRuleDefContext(_ctx, getState()); + enterRule(_localctx, 30, RULE_loopRuleDef); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(287); + _la = _input.LA(1); + if ( !(_la==T__18 || _la==T__19) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(288); + match(STRING); + setState(292); + _errHandler.sync(this); + _la = _input.LA(1); + while ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__26) | (1L << T__27) | (1L << T__29) | (1L << T__30) | (1L << T__31) | (1L << T__32) | (1L << T__33) | (1L << T__34) | (1L << T__35) | (1L << T__36) | (1L << T__37) | (1L << T__38) | (1L << T__39) | (1L << T__40) | (1L << T__41) | (1L << T__42) | (1L << T__43) | (1L << T__44) | (1L << T__45) | (1L << T__46) | (1L << T__47) | (1L << T__48) | (1L << T__49) | (1L << T__50))) != 0)) { + { + { + setState(289); + attribute(); + } + } + setState(294); + _errHandler.sync(this); + _la = _input.LA(1); + } + setState(295); + loopTarget(); + setState(297); + _la = _input.LA(1); + if (_la==T__22 || _la==T__23) { + { + setState(296); + loopStart(); + } + } + + setState(299); + left(); + setState(300); + right(); + setState(302); + _la = _input.LA(1); + if (_la==T__62 || _la==T__63) { + { + setState(301); + other(); + } + } + + setState(305); + _la = _input.LA(1); + if (_la==T__24 || _la==T__25) { + { + setState(304); + loopEnd(); + } + } + + setState(307); + _la = _input.LA(1); + if ( !(_la==T__16 || _la==T__17) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(309); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(308); + match(T__1); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopTargetContext extends ParserRuleContext { + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public LoopTargetContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopTarget; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLoopTarget(this); + else return visitor.visitChildren(this); + } + } + + public final LoopTargetContext loopTarget() throws RecognitionException { + LoopTargetContext _localctx = new LoopTargetContext(_ctx, getState()); + enterRule(_localctx, 32, RULE_loopTarget); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(311); + _la = _input.LA(1); + if ( !(_la==T__20 || _la==T__21) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(312); + complexValue(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopStartContext extends ParserRuleContext { + public List action() { + return getRuleContexts(ActionContext.class); + } + public ActionContext action(int i) { + return getRuleContext(ActionContext.class,i); + } + public LoopStartContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopStart; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLoopStart(this); + else return visitor.visitChildren(this); + } + } + + public final LoopStartContext loopStart() throws RecognitionException { + LoopStartContext _localctx = new LoopStartContext(_ctx, getState()); + enterRule(_localctx, 34, RULE_loopStart); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(314); + _la = _input.LA(1); + if ( !(_la==T__22 || _la==T__23) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(318); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (Identifier - 65)))) != 0)) { + { + { + setState(315); + action(); + } + } + setState(320); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopEndContext extends ParserRuleContext { + public List action() { + return getRuleContexts(ActionContext.class); + } + public ActionContext action(int i) { + return getRuleContext(ActionContext.class,i); + } + public LoopEndContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopEnd; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLoopEnd(this); + else return visitor.visitChildren(this); + } + } + + public final LoopEndContext loopEnd() throws RecognitionException { + LoopEndContext _localctx = new LoopEndContext(_ctx, getState()); + enterRule(_localctx, 36, RULE_loopEnd); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(321); + _la = _input.LA(1); + if ( !(_la==T__24 || _la==T__25) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(325); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (Identifier - 65)))) != 0)) { + { + { + setState(322); + action(); + } + } + setState(327); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AttributeContext extends ParserRuleContext { + public LoopAttributeContext loopAttribute() { + return getRuleContext(LoopAttributeContext.class,0); + } + public SalienceAttributeContext salienceAttribute() { + return getRuleContext(SalienceAttributeContext.class,0); + } + public EffectiveDateAttributeContext effectiveDateAttribute() { + return getRuleContext(EffectiveDateAttributeContext.class,0); + } + public ExpiresDateAttributeContext expiresDateAttribute() { + return getRuleContext(ExpiresDateAttributeContext.class,0); + } + public EnabledAttributeContext enabledAttribute() { + return getRuleContext(EnabledAttributeContext.class,0); + } + public DebugAttributeContext debugAttribute() { + return getRuleContext(DebugAttributeContext.class,0); + } + public ActivationGroupAttributeContext activationGroupAttribute() { + return getRuleContext(ActivationGroupAttributeContext.class,0); + } + public AgendaGroupAttributeContext agendaGroupAttribute() { + return getRuleContext(AgendaGroupAttributeContext.class,0); + } + public AutoFocusAttributeContext autoFocusAttribute() { + return getRuleContext(AutoFocusAttributeContext.class,0); + } + public RuleflowGroupAttributeContext ruleflowGroupAttribute() { + return getRuleContext(RuleflowGroupAttributeContext.class,0); + } + public AttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_attribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final AttributeContext attribute() throws RecognitionException { + AttributeContext _localctx = new AttributeContext(_ctx, getState()); + enterRule(_localctx, 38, RULE_attribute); + try { + setState(338); + switch (_input.LA(1)) { + case T__26: + case T__27: + enterOuterAlt(_localctx, 1); + { + setState(328); + loopAttribute(); + } + break; + case T__29: + case T__30: + enterOuterAlt(_localctx, 2); + { + setState(329); + salienceAttribute(); + } + break; + case T__31: + case T__32: + case T__33: + enterOuterAlt(_localctx, 3); + { + setState(330); + effectiveDateAttribute(); + } + break; + case T__34: + case T__35: + case T__36: + enterOuterAlt(_localctx, 4); + { + setState(331); + expiresDateAttribute(); + } + break; + case T__37: + case T__38: + case T__39: + enterOuterAlt(_localctx, 5); + { + setState(332); + enabledAttribute(); + } + break; + case T__40: + case T__41: + case T__42: + enterOuterAlt(_localctx, 6); + { + setState(333); + debugAttribute(); + } + break; + case T__43: + case T__44: + enterOuterAlt(_localctx, 7); + { + setState(334); + activationGroupAttribute(); + } + break; + case T__45: + case T__46: + enterOuterAlt(_localctx, 8); + { + setState(335); + agendaGroupAttribute(); + } + break; + case T__47: + case T__48: + enterOuterAlt(_localctx, 9); + { + setState(336); + autoFocusAttribute(); + } + break; + case T__49: + case T__50: + enterOuterAlt(_localctx, 10); + { + setState(337); + ruleflowGroupAttribute(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LoopAttributeContext extends ParserRuleContext { + public TerminalNode Boolean() { return getToken(RuleParserParser.Boolean, 0); } + public LoopAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_loopAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLoopAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final LoopAttributeContext loopAttribute() throws RecognitionException { + LoopAttributeContext _localctx = new LoopAttributeContext(_ctx, getState()); + enterRule(_localctx, 40, RULE_loopAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(340); + _la = _input.LA(1); + if ( !(_la==T__26 || _la==T__27) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(341); + match(T__28); + setState(342); + match(Boolean); + setState(344); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(343); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class SalienceAttributeContext extends ParserRuleContext { + public TerminalNode NUMBER() { return getToken(RuleParserParser.NUMBER, 0); } + public SalienceAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_salienceAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitSalienceAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final SalienceAttributeContext salienceAttribute() throws RecognitionException { + SalienceAttributeContext _localctx = new SalienceAttributeContext(_ctx, getState()); + enterRule(_localctx, 42, RULE_salienceAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(346); + _la = _input.LA(1); + if ( !(_la==T__29 || _la==T__30) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(347); + match(T__28); + setState(348); + match(NUMBER); + setState(350); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(349); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EffectiveDateAttributeContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public EffectiveDateAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_effectiveDateAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitEffectiveDateAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final EffectiveDateAttributeContext effectiveDateAttribute() throws RecognitionException { + EffectiveDateAttributeContext _localctx = new EffectiveDateAttributeContext(_ctx, getState()); + enterRule(_localctx, 44, RULE_effectiveDateAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(352); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__31) | (1L << T__32) | (1L << T__33))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(353); + match(T__28); + setState(354); + match(STRING); + setState(356); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(355); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpiresDateAttributeContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ExpiresDateAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expiresDateAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpiresDateAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final ExpiresDateAttributeContext expiresDateAttribute() throws RecognitionException { + ExpiresDateAttributeContext _localctx = new ExpiresDateAttributeContext(_ctx, getState()); + enterRule(_localctx, 46, RULE_expiresDateAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(358); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__34) | (1L << T__35) | (1L << T__36))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(359); + match(T__28); + setState(360); + match(STRING); + setState(362); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(361); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class EnabledAttributeContext extends ParserRuleContext { + public TerminalNode Boolean() { return getToken(RuleParserParser.Boolean, 0); } + public EnabledAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_enabledAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitEnabledAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final EnabledAttributeContext enabledAttribute() throws RecognitionException { + EnabledAttributeContext _localctx = new EnabledAttributeContext(_ctx, getState()); + enterRule(_localctx, 48, RULE_enabledAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(364); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__37) | (1L << T__38) | (1L << T__39))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(365); + match(T__28); + setState(366); + match(Boolean); + setState(368); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(367); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class DebugAttributeContext extends ParserRuleContext { + public TerminalNode Boolean() { return getToken(RuleParserParser.Boolean, 0); } + public DebugAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_debugAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitDebugAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final DebugAttributeContext debugAttribute() throws RecognitionException { + DebugAttributeContext _localctx = new DebugAttributeContext(_ctx, getState()); + enterRule(_localctx, 50, RULE_debugAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(370); + _la = _input.LA(1); + if ( !((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__40) | (1L << T__41) | (1L << T__42))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(371); + match(T__28); + setState(372); + match(Boolean); + setState(374); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(373); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ActivationGroupAttributeContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public ActivationGroupAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_activationGroupAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitActivationGroupAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final ActivationGroupAttributeContext activationGroupAttribute() throws RecognitionException { + ActivationGroupAttributeContext _localctx = new ActivationGroupAttributeContext(_ctx, getState()); + enterRule(_localctx, 52, RULE_activationGroupAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(376); + _la = _input.LA(1); + if ( !(_la==T__43 || _la==T__44) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(377); + match(T__28); + setState(378); + match(STRING); + setState(380); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(379); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AgendaGroupAttributeContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public AgendaGroupAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_agendaGroupAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitAgendaGroupAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final AgendaGroupAttributeContext agendaGroupAttribute() throws RecognitionException { + AgendaGroupAttributeContext _localctx = new AgendaGroupAttributeContext(_ctx, getState()); + enterRule(_localctx, 54, RULE_agendaGroupAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(382); + _la = _input.LA(1); + if ( !(_la==T__45 || _la==T__46) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(383); + match(T__28); + setState(384); + match(STRING); + setState(386); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(385); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AutoFocusAttributeContext extends ParserRuleContext { + public TerminalNode Boolean() { return getToken(RuleParserParser.Boolean, 0); } + public AutoFocusAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_autoFocusAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitAutoFocusAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final AutoFocusAttributeContext autoFocusAttribute() throws RecognitionException { + AutoFocusAttributeContext _localctx = new AutoFocusAttributeContext(_ctx, getState()); + enterRule(_localctx, 56, RULE_autoFocusAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(388); + _la = _input.LA(1); + if ( !(_la==T__47 || _la==T__48) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(389); + match(T__28); + setState(390); + match(Boolean); + setState(392); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(391); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RuleflowGroupAttributeContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public RuleflowGroupAttributeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_ruleflowGroupAttribute; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRuleflowGroupAttribute(this); + else return visitor.visitChildren(this); + } + } + + public final RuleflowGroupAttributeContext ruleflowGroupAttribute() throws RecognitionException { + RuleflowGroupAttributeContext _localctx = new RuleflowGroupAttributeContext(_ctx, getState()); + enterRule(_localctx, 58, RULE_ruleflowGroupAttribute); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(394); + _la = _input.LA(1); + if ( !(_la==T__49 || _la==T__50) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(395); + match(T__28); + setState(396); + match(STRING); + setState(398); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(397); + match(T__13); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LeftContext extends ParserRuleContext { + public ConditionContext condition() { + return getRuleContext(ConditionContext.class,0); + } + public LeftContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_left; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLeft(this); + else return visitor.visitChildren(this); + } + } + + public final LeftContext left() throws RecognitionException { + LeftContext _localctx = new LeftContext(_ctx, getState()); + enterRule(_localctx, 60, RULE_left); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(400); + _la = _input.LA(1); + if ( !(_la==T__51 || _la==T__52) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(402); + _la = _input.LA(1); + if ((((_la) & ~0x3f) == 0 && ((1L << _la) & ((1L << T__9) | (1L << T__54) | (1L << T__55) | (1L << T__56) | (1L << T__57))) != 0) || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (Identifier - 66)))) != 0)) { + { + setState(401); + condition(0); + } + } + + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConditionContext extends ParserRuleContext { + public ConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_condition; } + + public ConditionContext() { } + public void copyFrom(ConditionContext ctx) { + super.copyFrom(ctx); + } + } + public static class ParenConditionsContext extends ConditionContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public ConditionContext condition() { + return getRuleContext(ConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public ParenConditionsContext(ConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitParenConditions(this); + else return visitor.visitChildren(this); + } + } + public static class MultiConditionsContext extends ConditionContext { + public List condition() { + return getRuleContexts(ConditionContext.class); + } + public ConditionContext condition(int i) { + return getRuleContext(ConditionContext.class,i); + } + public List join() { + return getRuleContexts(JoinContext.class); + } + public JoinContext join(int i) { + return getRuleContext(JoinContext.class,i); + } + public MultiConditionsContext(ConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitMultiConditions(this); + else return visitor.visitChildren(this); + } + } + public static class SingleConditionContext extends ConditionContext { + public ConditionLeftContext conditionLeft() { + return getRuleContext(ConditionLeftContext.class,0); + } + public OpContext op() { + return getRuleContext(OpContext.class,0); + } + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public NullValueContext nullValue() { + return getRuleContext(NullValueContext.class,0); + } + public SingleConditionContext(ConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitSingleCondition(this); + else return visitor.visitChildren(this); + } + } + public static class SingleNamedConditionSetContext extends ConditionContext { + public NamedConditionSetContext namedConditionSet() { + return getRuleContext(NamedConditionSetContext.class,0); + } + public SingleNamedConditionSetContext(ConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitSingleNamedConditionSet(this); + else return visitor.visitChildren(this); + } + } + + public final ConditionContext condition() throws RecognitionException { + return condition(0); + } + + private ConditionContext condition(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ConditionContext _localctx = new ConditionContext(_ctx, _parentState); + ConditionContext _prevctx = _localctx; + int _startState = 62; + enterRecursionRule(_localctx, 62, RULE_condition, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(416); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,44,_ctx) ) { + case 1: + { + _localctx = new ParenConditionsContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(405); + leftParen(); + setState(406); + condition(0); + setState(407); + rightParen(); + } + break; + case 2: + { + _localctx = new SingleConditionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(409); + conditionLeft(); + setState(410); + op(); + setState(413); + switch (_input.LA(1)) { + case T__9: + case T__65: + case T__66: + case T__67: + case T__68: + case T__69: + case NUMBER: + case Boolean: + case Identifier: + case STRING: + { + setState(411); + complexValue(0); + } + break; + case T__53: + { + setState(412); + nullValue(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case 3: + { + _localctx = new SingleNamedConditionSetContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(415); + namedConditionSet(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(428); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiConditionsContext(new ConditionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_condition); + setState(418); + if (!(precpred(_ctx, 3))) throw new FailedPredicateException(this, "precpred(_ctx, 3)"); + setState(422); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(419); + join(); + setState(420); + condition(0); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(424); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,45,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + } + } + setState(430); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,46,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class NamedConditionSetContext extends ParserRuleContext { + public RefObjectContext refObject() { + return getRuleContext(RefObjectContext.class,0); + } + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public NamedConditionContext namedCondition() { + return getRuleContext(NamedConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public RefNameContext refName() { + return getRuleContext(RefNameContext.class,0); + } + public ColonContext colon() { + return getRuleContext(ColonContext.class,0); + } + public NamedConditionSetContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namedConditionSet; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitNamedConditionSet(this); + else return visitor.visitChildren(this); + } + } + + public final NamedConditionSetContext namedConditionSet() throws RecognitionException { + NamedConditionSetContext _localctx = new NamedConditionSetContext(_ctx, getState()); + enterRule(_localctx, 64, RULE_namedConditionSet); + try { + enterOuterAlt(_localctx, 1); + { + setState(434); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,47,_ctx) ) { + case 1: + { + setState(431); + refName(); + setState(432); + colon(); + } + break; + } + setState(436); + refObject(); + setState(437); + leftParen(); + setState(438); + namedCondition(0); + setState(439); + rightParen(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamedConditionContext extends ParserRuleContext { + public NamedConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namedCondition; } + + public NamedConditionContext() { } + public void copyFrom(NamedConditionContext ctx) { + super.copyFrom(ctx); + } + } + public static class ParenNamedConditionsContext extends NamedConditionContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public NamedConditionContext namedCondition() { + return getRuleContext(NamedConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public ParenNamedConditionsContext(NamedConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitParenNamedConditions(this); + else return visitor.visitChildren(this); + } + } + public static class MultiNamedConditionsContext extends NamedConditionContext { + public List namedCondition() { + return getRuleContexts(NamedConditionContext.class); + } + public NamedConditionContext namedCondition(int i) { + return getRuleContext(NamedConditionContext.class,i); + } + public List join() { + return getRuleContexts(JoinContext.class); + } + public JoinContext join(int i) { + return getRuleContext(JoinContext.class,i); + } + public MultiNamedConditionsContext(NamedConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitMultiNamedConditions(this); + else return visitor.visitChildren(this); + } + } + public static class SingleNamedConditionsContext extends NamedConditionContext { + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public OpContext op() { + return getRuleContext(OpContext.class,0); + } + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public NullValueContext nullValue() { + return getRuleContext(NullValueContext.class,0); + } + public SingleNamedConditionsContext(NamedConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitSingleNamedConditions(this); + else return visitor.visitChildren(this); + } + } + + public final NamedConditionContext namedCondition() throws RecognitionException { + return namedCondition(0); + } + + private NamedConditionContext namedCondition(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + NamedConditionContext _localctx = new NamedConditionContext(_ctx, _parentState); + NamedConditionContext _prevctx = _localctx; + int _startState = 66; + enterRecursionRule(_localctx, 66, RULE_namedCondition, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(452); + switch (_input.LA(1)) { + case T__9: + { + _localctx = new ParenNamedConditionsContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(442); + leftParen(); + setState(443); + namedCondition(0); + setState(444); + rightParen(); + } + break; + case Identifier: + { + _localctx = new SingleNamedConditionsContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(446); + property(); + setState(447); + op(); + setState(450); + switch (_input.LA(1)) { + case T__9: + case T__65: + case T__66: + case T__67: + case T__68: + case T__69: + case NUMBER: + case Boolean: + case Identifier: + case STRING: + { + setState(448); + complexValue(0); + } + break; + case T__53: + { + setState(449); + nullValue(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(464); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,51,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiNamedConditionsContext(new NamedConditionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_namedCondition); + setState(454); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(458); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(455); + join(); + setState(456); + namedCondition(0); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(460); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,50,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + } + } + setState(466); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,51,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class DecisionTableCellConditionContext extends ParserRuleContext { + public DecisionTableCellConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_decisionTableCellCondition; } + + public DecisionTableCellConditionContext() { } + public void copyFrom(DecisionTableCellConditionContext ctx) { + super.copyFrom(ctx); + } + } + public static class SingleCellConditionContext extends DecisionTableCellConditionContext { + public OpContext op() { + return getRuleContext(OpContext.class,0); + } + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public NullValueContext nullValue() { + return getRuleContext(NullValueContext.class,0); + } + public SingleCellConditionContext(DecisionTableCellConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitSingleCellCondition(this); + else return visitor.visitChildren(this); + } + } + public static class MultiCellConditionsContext extends DecisionTableCellConditionContext { + public List decisionTableCellCondition() { + return getRuleContexts(DecisionTableCellConditionContext.class); + } + public DecisionTableCellConditionContext decisionTableCellCondition(int i) { + return getRuleContext(DecisionTableCellConditionContext.class,i); + } + public List join() { + return getRuleContexts(JoinContext.class); + } + public JoinContext join(int i) { + return getRuleContext(JoinContext.class,i); + } + public MultiCellConditionsContext(DecisionTableCellConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitMultiCellConditions(this); + else return visitor.visitChildren(this); + } + } + public static class ParenCellConditionsContext extends DecisionTableCellConditionContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public DecisionTableCellConditionContext decisionTableCellCondition() { + return getRuleContext(DecisionTableCellConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public ParenCellConditionsContext(DecisionTableCellConditionContext ctx) { copyFrom(ctx); } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitParenCellConditions(this); + else return visitor.visitChildren(this); + } + } + + public final DecisionTableCellConditionContext decisionTableCellCondition() throws RecognitionException { + return decisionTableCellCondition(0); + } + + private DecisionTableCellConditionContext decisionTableCellCondition(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + DecisionTableCellConditionContext _localctx = new DecisionTableCellConditionContext(_ctx, _parentState); + DecisionTableCellConditionContext _prevctx = _localctx; + int _startState = 68; + enterRecursionRule(_localctx, 68, RULE_decisionTableCellCondition, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(477); + switch (_input.LA(1)) { + case GreaterThen: + case GreaterThenOrEquals: + case LessThen: + case LessThenOrEquals: + case Equals: + case NotEquals: + case EndWith: + case NotEndWith: + case StartWith: + case NotStartWith: + case In: + case NotIn: + case Match: + case NotMatch: + case Contain: + case NotContain: + case EqualsIgnoreCase: + case NotEqualsIgnoreCase: + { + _localctx = new SingleCellConditionContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + + setState(468); + op(); + setState(471); + switch (_input.LA(1)) { + case T__9: + case T__65: + case T__66: + case T__67: + case T__68: + case T__69: + case NUMBER: + case Boolean: + case Identifier: + case STRING: + { + setState(469); + complexValue(0); + } + break; + case T__53: + { + setState(470); + nullValue(); + } + break; + default: + throw new NoViableAltException(this); + } + } + break; + case T__9: + { + _localctx = new ParenCellConditionsContext(_localctx); + _ctx = _localctx; + _prevctx = _localctx; + setState(473); + leftParen(); + setState(474); + decisionTableCellCondition(0); + setState(475); + rightParen(); + } + break; + default: + throw new NoViableAltException(this); + } + _ctx.stop = _input.LT(-1); + setState(489); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new MultiCellConditionsContext(new DecisionTableCellConditionContext(_parentctx, _parentState)); + pushNewRecursionContext(_localctx, _startState, RULE_decisionTableCellCondition); + setState(479); + if (!(precpred(_ctx, 2))) throw new FailedPredicateException(this, "precpred(_ctx, 2)"); + setState(483); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(480); + join(); + setState(481); + decisionTableCellCondition(0); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(485); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,54,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + } + } + setState(491); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,55,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class RefNameContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public RefNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_refName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRefName(this); + else return visitor.visitChildren(this); + } + } + + public final RefNameContext refName() throws RecognitionException { + RefNameContext _localctx = new RefNameContext(_ctx, getState()); + enterRule(_localctx, 70, RULE_refName); + try { + enterOuterAlt(_localctx, 1); + { + setState(492); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RefObjectContext extends ParserRuleContext { + public VariableCategoryContext variableCategory() { + return getRuleContext(VariableCategoryContext.class,0); + } + public ParameterNameContext parameterName() { + return getRuleContext(ParameterNameContext.class,0); + } + public RefObjectContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_refObject; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRefObject(this); + else return visitor.visitChildren(this); + } + } + + public final RefObjectContext refObject() throws RecognitionException { + RefObjectContext _localctx = new RefObjectContext(_ctx, getState()); + enterRule(_localctx, 72, RULE_refObject); + try { + setState(496); + switch (_input.LA(1)) { + case Identifier: + enterOuterAlt(_localctx, 1); + { + setState(494); + variableCategory(); + } + break; + case T__66: + case T__67: + enterOuterAlt(_localctx, 2); + { + setState(495); + parameterName(); + } + break; + default: + throw new NoViableAltException(this); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NullValueContext extends ParserRuleContext { + public NullValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_nullValue; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitNullValue(this); + else return visitor.visitChildren(this); + } + } + + public final NullValueContext nullValue() throws RecognitionException { + NullValueContext _localctx = new NullValueContext(_ctx, getState()); + enterRule(_localctx, 74, RULE_nullValue); + try { + enterOuterAlt(_localctx, 1); + { + setState(498); + match(T__53); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConditionLeftContext extends ParserRuleContext { + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public FunctionInvokeContext functionInvoke() { + return getRuleContext(FunctionInvokeContext.class,0); + } + public MethodInvokeContext methodInvoke() { + return getRuleContext(MethodInvokeContext.class,0); + } + public ExpEvalContext expEval() { + return getRuleContext(ExpEvalContext.class,0); + } + public ExpAllContext expAll() { + return getRuleContext(ExpAllContext.class,0); + } + public ExpExistsContext expExists() { + return getRuleContext(ExpExistsContext.class,0); + } + public ExpCollectContext expCollect() { + return getRuleContext(ExpCollectContext.class,0); + } + public CommonFunctionContext commonFunction() { + return getRuleContext(CommonFunctionContext.class,0); + } + public List ARITH() { return getTokens(RuleParserParser.ARITH); } + public TerminalNode ARITH(int i) { + return getToken(RuleParserParser.ARITH, i); + } + public List value() { + return getRuleContexts(ValueContext.class); + } + public ValueContext value(int i) { + return getRuleContext(ValueContext.class,i); + } + public ConditionLeftContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_conditionLeft; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitConditionLeft(this); + else return visitor.visitChildren(this); + } + } + + public final ConditionLeftContext conditionLeft() throws RecognitionException { + ConditionLeftContext _localctx = new ConditionLeftContext(_ctx, getState()); + enterRule(_localctx, 76, RULE_conditionLeft); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(509); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,57,_ctx) ) { + case 1: + { + setState(500); + variable(); + } + break; + case 2: + { + setState(501); + parameter(); + } + break; + case 3: + { + setState(502); + functionInvoke(); + } + break; + case 4: + { + setState(503); + methodInvoke(); + } + break; + case 5: + { + setState(504); + expEval(); + } + break; + case 6: + { + setState(505); + expAll(); + } + break; + case 7: + { + setState(506); + expExists(); + } + break; + case 8: + { + setState(507); + expCollect(); + } + break; + case 9: + { + setState(508); + commonFunction(); + } + break; + } + setState(515); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==ARITH) { + { + { + setState(511); + match(ARITH); + setState(512); + value(); + } + } + setState(517); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpEvalContext extends ParserRuleContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public ExpressionBodyContext expressionBody() { + return getRuleContext(ExpressionBodyContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public ExpEvalContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expEval; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpEval(this); + else return visitor.visitChildren(this); + } + } + + public final ExpEvalContext expEval() throws RecognitionException { + ExpEvalContext _localctx = new ExpEvalContext(_ctx, getState()); + enterRule(_localctx, 78, RULE_expEval); + try { + enterOuterAlt(_localctx, 1); + { + setState(518); + match(T__54); + setState(519); + leftParen(); + setState(520); + expressionBody(); + setState(521); + rightParen(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpAllContext extends ParserRuleContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public ExprConditionContext exprCondition() { + return getRuleContext(ExprConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public TerminalNode NUMBER() { return getToken(RuleParserParser.NUMBER, 0); } + public PercentContext percent() { + return getRuleContext(PercentContext.class,0); + } + public ExpAllContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expAll; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpAll(this); + else return visitor.visitChildren(this); + } + } + + public final ExpAllContext expAll() throws RecognitionException { + ExpAllContext _localctx = new ExpAllContext(_ctx, getState()); + enterRule(_localctx, 80, RULE_expAll); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(523); + match(T__55); + setState(524); + leftParen(); + setState(527); + switch (_input.LA(1)) { + case Identifier: + { + setState(525); + variable(); + } + break; + case T__66: + case T__67: + { + setState(526); + parameter(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(529); + match(T__13); + setState(530); + exprCondition(0); + setState(536); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(531); + match(T__13); + setState(534); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,60,_ctx) ) { + case 1: + { + setState(532); + match(NUMBER); + } + break; + case 2: + { + setState(533); + percent(); + } + break; + } + } + } + + setState(538); + rightParen(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpExistsContext extends ParserRuleContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public ExprConditionContext exprCondition() { + return getRuleContext(ExprConditionContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public TerminalNode NUMBER() { return getToken(RuleParserParser.NUMBER, 0); } + public PercentContext percent() { + return getRuleContext(PercentContext.class,0); + } + public ExpExistsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expExists; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpExists(this); + else return visitor.visitChildren(this); + } + } + + public final ExpExistsContext expExists() throws RecognitionException { + ExpExistsContext _localctx = new ExpExistsContext(_ctx, getState()); + enterRule(_localctx, 82, RULE_expExists); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(540); + match(T__56); + setState(541); + leftParen(); + setState(544); + switch (_input.LA(1)) { + case Identifier: + { + setState(542); + variable(); + } + break; + case T__66: + case T__67: + { + setState(543); + parameter(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(546); + match(T__13); + setState(547); + exprCondition(0); + setState(553); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(548); + match(T__13); + setState(551); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,63,_ctx) ) { + case 1: + { + setState(549); + match(NUMBER); + } + break; + case 2: + { + setState(550); + percent(); + } + break; + } + } + } + + setState(555); + rightParen(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExpCollectContext extends ParserRuleContext { + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public TerminalNode COUNT() { return getToken(RuleParserParser.COUNT, 0); } + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public ExprConditionContext exprCondition() { + return getRuleContext(ExprConditionContext.class,0); + } + public TerminalNode SUM() { return getToken(RuleParserParser.SUM, 0); } + public TerminalNode AVG() { return getToken(RuleParserParser.AVG, 0); } + public TerminalNode MAX() { return getToken(RuleParserParser.MAX, 0); } + public TerminalNode MIN() { return getToken(RuleParserParser.MIN, 0); } + public ExpCollectContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expCollect; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpCollect(this); + else return visitor.visitChildren(this); + } + } + + public final ExpCollectContext expCollect() throws RecognitionException { + ExpCollectContext _localctx = new ExpCollectContext(_ctx, getState()); + enterRule(_localctx, 84, RULE_expCollect); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(557); + match(T__57); + setState(558); + leftParen(); + setState(561); + switch (_input.LA(1)) { + case Identifier: + { + setState(559); + variable(); + } + break; + case T__66: + case T__67: + { + setState(560); + parameter(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(565); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(563); + match(T__13); + setState(564); + exprCondition(0); + } + } + + setState(567); + rightParen(); + setState(568); + match(T__2); + setState(574); + switch (_input.LA(1)) { + case COUNT: + { + setState(569); + match(COUNT); + } + break; + case Identifier: + { + setState(570); + property(); + setState(571); + match(T__2); + setState(572); + _la = _input.LA(1); + if ( !(((((_la - 72)) & ~0x3f) == 0 && ((1L << (_la - 72)) & ((1L << (AVG - 72)) | (1L << (SUM - 72)) | (1L << (MAX - 72)) | (1L << (MIN - 72)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + break; + default: + throw new NoViableAltException(this); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class CommonFunctionContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public CommonFunctionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_commonFunction; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitCommonFunction(this); + else return visitor.visitChildren(this); + } + } + + public final CommonFunctionContext commonFunction() throws RecognitionException { + CommonFunctionContext _localctx = new CommonFunctionContext(_ctx, getState()); + enterRule(_localctx, 86, RULE_commonFunction); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(576); + match(Identifier); + setState(577); + leftParen(); + setState(578); + complexValue(0); + setState(581); + _la = _input.LA(1); + if (_la==T__13) { + { + setState(579); + match(T__13); + setState(580); + property(); + } + } + + setState(583); + rightParen(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ExprConditionContext extends ParserRuleContext { + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public OpContext op() { + return getRuleContext(OpContext.class,0); + } + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public NullValueContext nullValue() { + return getRuleContext(NullValueContext.class,0); + } + public List exprCondition() { + return getRuleContexts(ExprConditionContext.class); + } + public ExprConditionContext exprCondition(int i) { + return getRuleContext(ExprConditionContext.class,i); + } + public List join() { + return getRuleContexts(JoinContext.class); + } + public JoinContext join(int i) { + return getRuleContext(JoinContext.class,i); + } + public ExprConditionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_exprCondition; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExprCondition(this); + else return visitor.visitChildren(this); + } + } + + public final ExprConditionContext exprCondition() throws RecognitionException { + return exprCondition(0); + } + + private ExprConditionContext exprCondition(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ExprConditionContext _localctx = new ExprConditionContext(_ctx, _parentState); + ExprConditionContext _prevctx = _localctx; + int _startState = 88; + enterRecursionRule(_localctx, 88, RULE_exprCondition, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + { + setState(586); + property(); + setState(587); + op(); + setState(590); + switch (_input.LA(1)) { + case T__9: + case T__65: + case T__66: + case T__67: + case T__68: + case T__69: + case NUMBER: + case Boolean: + case Identifier: + case STRING: + { + setState(588); + complexValue(0); + } + break; + case T__53: + { + setState(589); + nullValue(); + } + break; + default: + throw new NoViableAltException(this); + } + } + _ctx.stop = _input.LT(-1); + setState(602); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,71,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ExprConditionContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_exprCondition); + setState(592); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(596); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(593); + join(); + setState(594); + exprCondition(0); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(598); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,70,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + } + } + setState(604); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,71,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ExpressionBodyContext extends ParserRuleContext { + public ExpressionBodyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_expressionBody; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitExpressionBody(this); + else return visitor.visitChildren(this); + } + } + + public final ExpressionBodyContext expressionBody() throws RecognitionException { + ExpressionBodyContext _localctx = new ExpressionBodyContext(_ctx, getState()); + enterRule(_localctx, 90, RULE_expressionBody); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(608); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + while ( _alt!=1 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1+1 ) { + { + { + setState(605); + matchWildcard(); + } + } + } + setState(610); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,72,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PercentContext extends ParserRuleContext { + public TerminalNode NUMBER() { return getToken(RuleParserParser.NUMBER, 0); } + public PercentContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_percent; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitPercent(this); + else return visitor.visitChildren(this); + } + } + + public final PercentContext percent() throws RecognitionException { + PercentContext _localctx = new PercentContext(_ctx, getState()); + enterRule(_localctx, 92, RULE_percent); + try { + enterOuterAlt(_localctx, 1); + { + setState(611); + match(NUMBER); + setState(612); + match(T__58); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class LeftParenContext extends ParserRuleContext { + public LeftParenContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_leftParen; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitLeftParen(this); + else return visitor.visitChildren(this); + } + } + + public final LeftParenContext leftParen() throws RecognitionException { + LeftParenContext _localctx = new LeftParenContext(_ctx, getState()); + enterRule(_localctx, 94, RULE_leftParen); + try { + enterOuterAlt(_localctx, 1); + { + setState(614); + match(T__9); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RightParenContext extends ParserRuleContext { + public RightParenContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_rightParen; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRightParen(this); + else return visitor.visitChildren(this); + } + } + + public final RightParenContext rightParen() throws RecognitionException { + RightParenContext _localctx = new RightParenContext(_ctx, getState()); + enterRule(_localctx, 96, RULE_rightParen); + try { + enterOuterAlt(_localctx, 1); + { + setState(616); + match(T__10); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ColonContext extends ParserRuleContext { + public ColonContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_colon; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitColon(this); + else return visitor.visitChildren(this); + } + } + + public final ColonContext colon() throws RecognitionException { + ColonContext _localctx = new ColonContext(_ctx, getState()); + enterRule(_localctx, 98, RULE_colon); + try { + enterOuterAlt(_localctx, 1); + { + setState(618); + match(T__59); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class JoinContext extends ParserRuleContext { + public TerminalNode AND() { return getToken(RuleParserParser.AND, 0); } + public TerminalNode OR() { return getToken(RuleParserParser.OR, 0); } + public JoinContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_join; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitJoin(this); + else return visitor.visitChildren(this); + } + } + + public final JoinContext join() throws RecognitionException { + JoinContext _localctx = new JoinContext(_ctx, getState()); + enterRule(_localctx, 100, RULE_join); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(620); + _la = _input.LA(1); + if ( !(_la==AND || _la==OR) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class RightContext extends ParserRuleContext { + public List action() { + return getRuleContexts(ActionContext.class); + } + public ActionContext action(int i) { + return getRuleContext(ActionContext.class,i); + } + public RightContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_right; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitRight(this); + else return visitor.visitChildren(this); + } + } + + public final RightContext right() throws RecognitionException { + RightContext _localctx = new RightContext(_ctx, getState()); + enterRule(_localctx, 102, RULE_right); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(622); + _la = _input.LA(1); + if ( !(_la==T__60 || _la==T__61) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(626); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (Identifier - 65)))) != 0)) { + { + { + setState(623); + action(); + } + } + setState(628); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OtherContext extends ParserRuleContext { + public List action() { + return getRuleContexts(ActionContext.class); + } + public ActionContext action(int i) { + return getRuleContext(ActionContext.class,i); + } + public OtherContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_other; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitOther(this); + else return visitor.visitChildren(this); + } + } + + public final OtherContext other() throws RecognitionException { + OtherContext _localctx = new OtherContext(_ctx, getState()); + enterRule(_localctx, 104, RULE_other); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(629); + _la = _input.LA(1); + if ( !(_la==T__62 || _la==T__63) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + setState(633); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (Identifier - 65)))) != 0)) { + { + { + setState(630); + action(); + } + } + setState(635); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ActionsContext extends ParserRuleContext { + public List action() { + return getRuleContexts(ActionContext.class); + } + public ActionContext action(int i) { + return getRuleContext(ActionContext.class,i); + } + public ActionsContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_actions; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitActions(this); + else return visitor.visitChildren(this); + } + } + + public final ActionsContext actions() throws RecognitionException { + ActionsContext _localctx = new ActionsContext(_ctx, getState()); + enterRule(_localctx, 106, RULE_actions); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(639); + _errHandler.sync(this); + _la = _input.LA(1); + while (((((_la - 65)) & ~0x3f) == 0 && ((1L << (_la - 65)) & ((1L << (T__64 - 65)) | (1L << (T__65 - 65)) | (1L << (T__66 - 65)) | (1L << (T__67 - 65)) | (1L << (T__68 - 65)) | (1L << (Identifier - 65)))) != 0)) { + { + { + setState(636); + action(); + } + } + setState(641); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ActionContext extends ParserRuleContext { + public AssignActionContext assignAction() { + return getRuleContext(AssignActionContext.class,0); + } + public OutActionContext outAction() { + return getRuleContext(OutActionContext.class,0); + } + public MethodInvokeContext methodInvoke() { + return getRuleContext(MethodInvokeContext.class,0); + } + public FunctionInvokeContext functionInvoke() { + return getRuleContext(FunctionInvokeContext.class,0); + } + public CommonFunctionContext commonFunction() { + return getRuleContext(CommonFunctionContext.class,0); + } + public ActionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_action; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitAction(this); + else return visitor.visitChildren(this); + } + } + + public final ActionContext action() throws RecognitionException { + ActionContext _localctx = new ActionContext(_ctx, getState()); + enterRule(_localctx, 108, RULE_action); + int _la; + try { + setState(662); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,81,_ctx) ) { + case 1: + enterOuterAlt(_localctx, 1); + { + setState(642); + assignAction(); + setState(644); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(643); + match(T__1); + } + } + + } + break; + case 2: + enterOuterAlt(_localctx, 2); + { + setState(646); + outAction(); + setState(648); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(647); + match(T__1); + } + } + + } + break; + case 3: + enterOuterAlt(_localctx, 3); + { + setState(650); + methodInvoke(); + setState(652); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(651); + match(T__1); + } + } + + } + break; + case 4: + enterOuterAlt(_localctx, 4); + { + setState(654); + functionInvoke(); + setState(656); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(655); + match(T__1); + } + } + + } + break; + case 5: + enterOuterAlt(_localctx, 5); + { + setState(658); + commonFunction(); + setState(660); + _la = _input.LA(1); + if (_la==T__1) { + { + setState(659); + match(T__1); + } + } + + } + break; + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class AssignActionContext extends ParserRuleContext { + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public NamedVariableContext namedVariable() { + return getRuleContext(NamedVariableContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public AssignActionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_assignAction; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitAssignAction(this); + else return visitor.visitChildren(this); + } + } + + public final AssignActionContext assignAction() throws RecognitionException { + AssignActionContext _localctx = new AssignActionContext(_ctx, getState()); + enterRule(_localctx, 110, RULE_assignAction); + try { + enterOuterAlt(_localctx, 1); + { + setState(667); + switch (_input.LA(1)) { + case Identifier: + { + setState(664); + variable(); + } + break; + case T__68: + { + setState(665); + namedVariable(); + } + break; + case T__66: + case T__67: + { + setState(666); + parameter(); + } + break; + default: + throw new NoViableAltException(this); + } + setState(669); + match(T__28); + setState(670); + complexValue(0); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OutActionContext extends ParserRuleContext { + public ComplexValueContext complexValue() { + return getRuleContext(ComplexValueContext.class,0); + } + public OutActionContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_outAction; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitOutAction(this); + else return visitor.visitChildren(this); + } + } + + public final OutActionContext outAction() throws RecognitionException { + OutActionContext _localctx = new OutActionContext(_ctx, getState()); + enterRule(_localctx, 112, RULE_outAction); + try { + enterOuterAlt(_localctx, 1); + { + setState(672); + match(T__64); + setState(673); + match(T__9); + setState(674); + complexValue(0); + setState(675); + match(T__10); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class MethodInvokeContext extends ParserRuleContext { + public BeanMethodContext beanMethod() { + return getRuleContext(BeanMethodContext.class,0); + } + public ActionParametersContext actionParameters() { + return getRuleContext(ActionParametersContext.class,0); + } + public MethodInvokeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_methodInvoke; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitMethodInvoke(this); + else return visitor.visitChildren(this); + } + } + + public final MethodInvokeContext methodInvoke() throws RecognitionException { + MethodInvokeContext _localctx = new MethodInvokeContext(_ctx, getState()); + enterRule(_localctx, 114, RULE_methodInvoke); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(677); + beanMethod(); + setState(678); + match(T__9); + setState(680); + _la = _input.LA(1); + if (_la==T__9 || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (NUMBER - 66)) | (1L << (Boolean - 66)) | (1L << (Identifier - 66)) | (1L << (STRING - 66)))) != 0)) { + { + setState(679); + actionParameters(); + } + } + + setState(682); + match(T__10); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class FunctionInvokeContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public ActionParametersContext actionParameters() { + return getRuleContext(ActionParametersContext.class,0); + } + public FunctionInvokeContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_functionInvoke; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitFunctionInvoke(this); + else return visitor.visitChildren(this); + } + } + + public final FunctionInvokeContext functionInvoke() throws RecognitionException { + FunctionInvokeContext _localctx = new FunctionInvokeContext(_ctx, getState()); + enterRule(_localctx, 116, RULE_functionInvoke); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(684); + match(T__65); + setState(685); + match(Identifier); + setState(686); + match(T__9); + setState(688); + _la = _input.LA(1); + if (_la==T__9 || ((((_la - 66)) & ~0x3f) == 0 && ((1L << (_la - 66)) & ((1L << (T__65 - 66)) | (1L << (T__66 - 66)) | (1L << (T__67 - 66)) | (1L << (T__68 - 66)) | (1L << (T__69 - 66)) | (1L << (NUMBER - 66)) | (1L << (Boolean - 66)) | (1L << (Identifier - 66)) | (1L << (STRING - 66)))) != 0)) { + { + setState(687); + actionParameters(); + } + } + + setState(690); + match(T__10); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ActionParametersContext extends ParserRuleContext { + public List complexValue() { + return getRuleContexts(ComplexValueContext.class); + } + public ComplexValueContext complexValue(int i) { + return getRuleContext(ComplexValueContext.class,i); + } + public ActionParametersContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_actionParameters; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitActionParameters(this); + else return visitor.visitChildren(this); + } + } + + public final ActionParametersContext actionParameters() throws RecognitionException { + ActionParametersContext _localctx = new ActionParametersContext(_ctx, getState()); + enterRule(_localctx, 118, RULE_actionParameters); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(692); + complexValue(0); + setState(697); + _errHandler.sync(this); + _la = _input.LA(1); + while (_la==T__13) { + { + { + setState(693); + match(T__13); + setState(694); + complexValue(0); + } + } + setState(699); + _errHandler.sync(this); + _la = _input.LA(1); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class BeanMethodContext extends ParserRuleContext { + public List Identifier() { return getTokens(RuleParserParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(RuleParserParser.Identifier, i); + } + public BeanMethodContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_beanMethod; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitBeanMethod(this); + else return visitor.visitChildren(this); + } + } + + public final BeanMethodContext beanMethod() throws RecognitionException { + BeanMethodContext _localctx = new BeanMethodContext(_ctx, getState()); + enterRule(_localctx, 120, RULE_beanMethod); + try { + enterOuterAlt(_localctx, 1); + { + setState(700); + match(Identifier); + setState(701); + match(T__2); + setState(702); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ComplexValueContext extends ParserRuleContext { + public ValueContext value() { + return getRuleContext(ValueContext.class,0); + } + public VariableContext variable() { + return getRuleContext(VariableContext.class,0); + } + public NamedVariableContext namedVariable() { + return getRuleContext(NamedVariableContext.class,0); + } + public ConstantContext constant() { + return getRuleContext(ConstantContext.class,0); + } + public VariableCategoryContext variableCategory() { + return getRuleContext(VariableCategoryContext.class,0); + } + public ParameterContext parameter() { + return getRuleContext(ParameterContext.class,0); + } + public MethodInvokeContext methodInvoke() { + return getRuleContext(MethodInvokeContext.class,0); + } + public FunctionInvokeContext functionInvoke() { + return getRuleContext(FunctionInvokeContext.class,0); + } + public CommonFunctionContext commonFunction() { + return getRuleContext(CommonFunctionContext.class,0); + } + public LeftParenContext leftParen() { + return getRuleContext(LeftParenContext.class,0); + } + public List complexValue() { + return getRuleContexts(ComplexValueContext.class); + } + public ComplexValueContext complexValue(int i) { + return getRuleContext(ComplexValueContext.class,i); + } + public RightParenContext rightParen() { + return getRuleContext(RightParenContext.class,0); + } + public List ARITH() { return getTokens(RuleParserParser.ARITH); } + public TerminalNode ARITH(int i) { + return getToken(RuleParserParser.ARITH, i); + } + public ComplexValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_complexValue; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitComplexValue(this); + else return visitor.visitChildren(this); + } + } + + public final ComplexValueContext complexValue() throws RecognitionException { + return complexValue(0); + } + + private ComplexValueContext complexValue(int _p) throws RecognitionException { + ParserRuleContext _parentctx = _ctx; + int _parentState = getState(); + ComplexValueContext _localctx = new ComplexValueContext(_ctx, _parentState); + ComplexValueContext _prevctx = _localctx; + int _startState = 122; + enterRecursionRule(_localctx, 122, RULE_complexValue, _p); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(718); + _errHandler.sync(this); + switch ( getInterpreter().adaptivePredict(_input,86,_ctx) ) { + case 1: + { + setState(705); + value(); + } + break; + case 2: + { + setState(706); + variable(); + } + break; + case 3: + { + setState(707); + namedVariable(); + } + break; + case 4: + { + setState(708); + constant(); + } + break; + case 5: + { + setState(709); + variableCategory(); + } + break; + case 6: + { + setState(710); + parameter(); + } + break; + case 7: + { + setState(711); + methodInvoke(); + } + break; + case 8: + { + setState(712); + functionInvoke(); + } + break; + case 9: + { + setState(713); + commonFunction(); + } + break; + case 10: + { + setState(714); + leftParen(); + setState(715); + complexValue(0); + setState(716); + rightParen(); + } + break; + } + _ctx.stop = _input.LT(-1); + setState(729); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,88,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + if ( _parseListeners!=null ) triggerExitRuleEvent(); + _prevctx = _localctx; + { + { + _localctx = new ComplexValueContext(_parentctx, _parentState); + pushNewRecursionContext(_localctx, _startState, RULE_complexValue); + setState(720); + if (!(precpred(_ctx, 1))) throw new FailedPredicateException(this, "precpred(_ctx, 1)"); + setState(723); + _errHandler.sync(this); + _alt = 1; + do { + switch (_alt) { + case 1: + { + { + setState(721); + match(ARITH); + setState(722); + complexValue(0); + } + } + break; + default: + throw new NoViableAltException(this); + } + setState(725); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,87,_ctx); + } while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ); + } + } + } + setState(731); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,88,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + unrollRecursionContexts(_parentctx); + } + return _localctx; + } + + public static class ParameterContext extends ParserRuleContext { + public ParameterNameContext parameterName() { + return getRuleContext(ParameterNameContext.class,0); + } + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public ParameterContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameter; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitParameter(this); + else return visitor.visitChildren(this); + } + } + + public final ParameterContext parameter() throws RecognitionException { + ParameterContext _localctx = new ParameterContext(_ctx, getState()); + enterRule(_localctx, 124, RULE_parameter); + try { + enterOuterAlt(_localctx, 1); + { + setState(732); + parameterName(); + setState(733); + match(T__2); + setState(734); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ParameterNameContext extends ParserRuleContext { + public ParameterNameContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_parameterName; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitParameterName(this); + else return visitor.visitChildren(this); + } + } + + public final ParameterNameContext parameterName() throws RecognitionException { + ParameterNameContext _localctx = new ParameterNameContext(_ctx, getState()); + enterRule(_localctx, 126, RULE_parameterName); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(736); + _la = _input.LA(1); + if ( !(_la==T__66 || _la==T__67) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantContext extends ParserRuleContext { + public ConstantCategoryContext constantCategory() { + return getRuleContext(ConstantCategoryContext.class,0); + } + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public ConstantContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constant; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitConstant(this); + else return visitor.visitChildren(this); + } + } + + public final ConstantContext constant() throws RecognitionException { + ConstantContext _localctx = new ConstantContext(_ctx, getState()); + enterRule(_localctx, 128, RULE_constant); + try { + enterOuterAlt(_localctx, 1); + { + setState(738); + constantCategory(); + setState(739); + match(T__2); + setState(740); + property(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableContext extends ParserRuleContext { + public VariableCategoryContext variableCategory() { + return getRuleContext(VariableCategoryContext.class,0); + } + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public VariableContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variable; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitVariable(this); + else return visitor.visitChildren(this); + } + } + + public final VariableContext variable() throws RecognitionException { + VariableContext _localctx = new VariableContext(_ctx, getState()); + enterRule(_localctx, 130, RULE_variable); + try { + enterOuterAlt(_localctx, 1); + { + setState(742); + variableCategory(); + setState(743); + match(T__2); + setState(744); + property(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamedVariableContext extends ParserRuleContext { + public NamedVariableCategoryContext namedVariableCategory() { + return getRuleContext(NamedVariableCategoryContext.class,0); + } + public PropertyContext property() { + return getRuleContext(PropertyContext.class,0); + } + public NamedVariableContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namedVariable; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitNamedVariable(this); + else return visitor.visitChildren(this); + } + } + + public final NamedVariableContext namedVariable() throws RecognitionException { + NamedVariableContext _localctx = new NamedVariableContext(_ctx, getState()); + enterRule(_localctx, 132, RULE_namedVariable); + try { + enterOuterAlt(_localctx, 1); + { + setState(746); + namedVariableCategory(); + setState(747); + match(T__2); + setState(748); + property(); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class PropertyContext extends ParserRuleContext { + public List Identifier() { return getTokens(RuleParserParser.Identifier); } + public TerminalNode Identifier(int i) { + return getToken(RuleParserParser.Identifier, i); + } + public PropertyContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_property; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitProperty(this); + else return visitor.visitChildren(this); + } + } + + public final PropertyContext property() throws RecognitionException { + PropertyContext _localctx = new PropertyContext(_ctx, getState()); + enterRule(_localctx, 134, RULE_property); + try { + int _alt; + enterOuterAlt(_localctx, 1); + { + setState(750); + match(Identifier); + setState(755); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,89,_ctx); + while ( _alt!=2 && _alt!= ATN.INVALID_ALT_NUMBER ) { + if ( _alt==1 ) { + { + { + setState(751); + match(T__2); + setState(752); + match(Identifier); + } + } + } + setState(757); + _errHandler.sync(this); + _alt = getInterpreter().adaptivePredict(_input,89,_ctx); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class VariableCategoryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public VariableCategoryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_variableCategory; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitVariableCategory(this); + else return visitor.visitChildren(this); + } + } + + public final VariableCategoryContext variableCategory() throws RecognitionException { + VariableCategoryContext _localctx = new VariableCategoryContext(_ctx, getState()); + enterRule(_localctx, 136, RULE_variableCategory); + try { + enterOuterAlt(_localctx, 1); + { + setState(758); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class NamedVariableCategoryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public NamedVariableCategoryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_namedVariableCategory; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitNamedVariableCategory(this); + else return visitor.visitChildren(this); + } + } + + public final NamedVariableCategoryContext namedVariableCategory() throws RecognitionException { + NamedVariableCategoryContext _localctx = new NamedVariableCategoryContext(_ctx, getState()); + enterRule(_localctx, 138, RULE_namedVariableCategory); + try { + enterOuterAlt(_localctx, 1); + { + setState(760); + match(T__68); + setState(761); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ConstantCategoryContext extends ParserRuleContext { + public TerminalNode Identifier() { return getToken(RuleParserParser.Identifier, 0); } + public ConstantCategoryContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_constantCategory; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitConstantCategory(this); + else return visitor.visitChildren(this); + } + } + + public final ConstantCategoryContext constantCategory() throws RecognitionException { + ConstantCategoryContext _localctx = new ConstantCategoryContext(_ctx, getState()); + enterRule(_localctx, 140, RULE_constantCategory); + try { + enterOuterAlt(_localctx, 1); + { + setState(763); + match(T__69); + setState(764); + match(Identifier); + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class ValueContext extends ParserRuleContext { + public TerminalNode STRING() { return getToken(RuleParserParser.STRING, 0); } + public TerminalNode NUMBER() { return getToken(RuleParserParser.NUMBER, 0); } + public TerminalNode Boolean() { return getToken(RuleParserParser.Boolean, 0); } + public ValueContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_value; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitValue(this); + else return visitor.visitChildren(this); + } + } + + public final ValueContext value() throws RecognitionException { + ValueContext _localctx = new ValueContext(_ctx, getState()); + enterRule(_localctx, 142, RULE_value); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(766); + _la = _input.LA(1); + if ( !(((((_la - 98)) & ~0x3f) == 0 && ((1L << (_la - 98)) & ((1L << (NUMBER - 98)) | (1L << (Boolean - 98)) | (1L << (STRING - 98)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public static class OpContext extends ParserRuleContext { + public TerminalNode GreaterThen() { return getToken(RuleParserParser.GreaterThen, 0); } + public TerminalNode GreaterThenOrEquals() { return getToken(RuleParserParser.GreaterThenOrEquals, 0); } + public TerminalNode LessThen() { return getToken(RuleParserParser.LessThen, 0); } + public TerminalNode LessThenOrEquals() { return getToken(RuleParserParser.LessThenOrEquals, 0); } + public TerminalNode Equals() { return getToken(RuleParserParser.Equals, 0); } + public TerminalNode NotEquals() { return getToken(RuleParserParser.NotEquals, 0); } + public TerminalNode EndWith() { return getToken(RuleParserParser.EndWith, 0); } + public TerminalNode NotEndWith() { return getToken(RuleParserParser.NotEndWith, 0); } + public TerminalNode StartWith() { return getToken(RuleParserParser.StartWith, 0); } + public TerminalNode NotStartWith() { return getToken(RuleParserParser.NotStartWith, 0); } + public TerminalNode In() { return getToken(RuleParserParser.In, 0); } + public TerminalNode NotIn() { return getToken(RuleParserParser.NotIn, 0); } + public TerminalNode Match() { return getToken(RuleParserParser.Match, 0); } + public TerminalNode NotMatch() { return getToken(RuleParserParser.NotMatch, 0); } + public TerminalNode EqualsIgnoreCase() { return getToken(RuleParserParser.EqualsIgnoreCase, 0); } + public TerminalNode NotEqualsIgnoreCase() { return getToken(RuleParserParser.NotEqualsIgnoreCase, 0); } + public TerminalNode Contain() { return getToken(RuleParserParser.Contain, 0); } + public TerminalNode NotContain() { return getToken(RuleParserParser.NotContain, 0); } + public OpContext(ParserRuleContext parent, int invokingState) { + super(parent, invokingState); + } + @Override public int getRuleIndex() { return RULE_op; } + @Override + public T accept(ParseTreeVisitor visitor) { + if ( visitor instanceof RuleParserVisitor) return ((RuleParserVisitor)visitor).visitOp(this); + else return visitor.visitChildren(this); + } + } + + public final OpContext op() throws RecognitionException { + OpContext _localctx = new OpContext(_ctx, getState()); + enterRule(_localctx, 144, RULE_op); + int _la; + try { + enterOuterAlt(_localctx, 1); + { + setState(768); + _la = _input.LA(1); + if ( !(((((_la - 79)) & ~0x3f) == 0 && ((1L << (_la - 79)) & ((1L << (GreaterThen - 79)) | (1L << (GreaterThenOrEquals - 79)) | (1L << (LessThen - 79)) | (1L << (LessThenOrEquals - 79)) | (1L << (Equals - 79)) | (1L << (NotEquals - 79)) | (1L << (EndWith - 79)) | (1L << (NotEndWith - 79)) | (1L << (StartWith - 79)) | (1L << (NotStartWith - 79)) | (1L << (In - 79)) | (1L << (NotIn - 79)) | (1L << (Match - 79)) | (1L << (NotMatch - 79)) | (1L << (Contain - 79)) | (1L << (NotContain - 79)) | (1L << (EqualsIgnoreCase - 79)) | (1L << (NotEqualsIgnoreCase - 79)))) != 0)) ) { + _errHandler.recoverInline(this); + } else { + consume(); + } + } + } + catch (RecognitionException re) { + _localctx.exception = re; + _errHandler.reportError(this, re); + _errHandler.recover(this, re); + } + finally { + exitRule(); + } + return _localctx; + } + + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 5: + return packageDef_sempred((PackageDefContext)_localctx, predIndex); + case 31: + return condition_sempred((ConditionContext)_localctx, predIndex); + case 33: + return namedCondition_sempred((NamedConditionContext)_localctx, predIndex); + case 34: + return decisionTableCellCondition_sempred((DecisionTableCellConditionContext)_localctx, predIndex); + case 44: + return exprCondition_sempred((ExprConditionContext)_localctx, predIndex); + case 61: + return complexValue_sempred((ComplexValueContext)_localctx, predIndex); + } + return true; + } + private boolean packageDef_sempred(PackageDefContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return precpred(_ctx, 1); + } + return true; + } + private boolean condition_sempred(ConditionContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return precpred(_ctx, 3); + } + return true; + } + private boolean namedCondition_sempred(NamedConditionContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return precpred(_ctx, 2); + } + return true; + } + private boolean decisionTableCellCondition_sempred(DecisionTableCellConditionContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return precpred(_ctx, 2); + } + return true; + } + private boolean exprCondition_sempred(ExprConditionContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return precpred(_ctx, 1); + } + return true; + } + private boolean complexValue_sempred(ComplexValueContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return precpred(_ctx, 1); + } + return true; + } + + public static final String _serializedATN = + "\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\3k\u0305\4\2\t\2\4"+ + "\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13\t"+ + "\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+ + "\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+ + "\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+ + "\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+ + ",\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64\t"+ + "\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t="+ + "\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4I"+ + "\tI\4J\tJ\3\2\3\2\3\2\3\3\7\3\u0099\n\3\f\3\16\3\u009c\13\3\3\3\7\3\u009f"+ + "\n\3\f\3\16\3\u00a2\13\3\3\3\7\3\u00a5\n\3\f\3\16\3\u00a8\13\3\3\3\7\3"+ + "\u00ab\n\3\f\3\16\3\u00ae\13\3\3\3\7\3\u00b1\n\3\f\3\16\3\u00b4\13\3\3"+ + "\3\7\3\u00b7\n\3\f\3\16\3\u00ba\13\3\5\3\u00bc\n\3\3\4\7\4\u00bf\n\4\f"+ + "\4\16\4\u00c2\13\4\3\5\3\5\5\5\u00c6\n\5\3\6\3\6\3\6\5\6\u00cb\n\6\3\7"+ + "\3\7\3\7\3\7\3\7\6\7\u00d2\n\7\r\7\16\7\u00d3\5\7\u00d6\n\7\3\7\3\7\7"+ + "\7\u00da\n\7\f\7\16\7\u00dd\13\7\3\b\3\b\3\b\3\b\5\b\u00e3\n\b\3\t\3\t"+ + "\3\t\5\t\u00e8\n\t\3\n\3\n\3\n\5\n\u00ed\n\n\3\13\3\13\3\13\5\13\u00f2"+ + "\n\13\3\f\3\f\3\f\5\f\u00f7\n\f\3\r\3\r\3\r\3\r\5\r\u00fd\n\r\3\r\3\r"+ + "\3\r\3\r\3\r\5\r\u0104\n\r\3\16\3\16\3\16\7\16\u0109\n\16\f\16\16\16\u010c"+ + "\13\16\3\17\3\17\3\17\3\20\3\20\3\20\7\20\u0114\n\20\f\20\16\20\u0117"+ + "\13\20\3\20\3\20\3\20\5\20\u011c\n\20\3\20\3\20\5\20\u0120\n\20\3\21\3"+ + "\21\3\21\7\21\u0125\n\21\f\21\16\21\u0128\13\21\3\21\3\21\5\21\u012c\n"+ + "\21\3\21\3\21\3\21\5\21\u0131\n\21\3\21\5\21\u0134\n\21\3\21\3\21\5\21"+ + "\u0138\n\21\3\22\3\22\3\22\3\23\3\23\7\23\u013f\n\23\f\23\16\23\u0142"+ + "\13\23\3\24\3\24\7\24\u0146\n\24\f\24\16\24\u0149\13\24\3\25\3\25\3\25"+ + "\3\25\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u0155\n\25\3\26\3\26\3\26\3\26"+ + "\5\26\u015b\n\26\3\27\3\27\3\27\3\27\5\27\u0161\n\27\3\30\3\30\3\30\3"+ + "\30\5\30\u0167\n\30\3\31\3\31\3\31\3\31\5\31\u016d\n\31\3\32\3\32\3\32"+ + "\3\32\5\32\u0173\n\32\3\33\3\33\3\33\3\33\5\33\u0179\n\33\3\34\3\34\3"+ + "\34\3\34\5\34\u017f\n\34\3\35\3\35\3\35\3\35\5\35\u0185\n\35\3\36\3\36"+ + "\3\36\3\36\5\36\u018b\n\36\3\37\3\37\3\37\3\37\5\37\u0191\n\37\3 \3 \5"+ + " \u0195\n \3!\3!\3!\3!\3!\3!\3!\3!\3!\5!\u01a0\n!\3!\5!\u01a3\n!\3!\3"+ + "!\3!\3!\6!\u01a9\n!\r!\16!\u01aa\7!\u01ad\n!\f!\16!\u01b0\13!\3\"\3\""+ + "\3\"\5\"\u01b5\n\"\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3#\3#\3#\3#\5#\u01c5"+ + "\n#\5#\u01c7\n#\3#\3#\3#\3#\6#\u01cd\n#\r#\16#\u01ce\7#\u01d1\n#\f#\16"+ + "#\u01d4\13#\3$\3$\3$\3$\5$\u01da\n$\3$\3$\3$\3$\5$\u01e0\n$\3$\3$\3$\3"+ + "$\6$\u01e6\n$\r$\16$\u01e7\7$\u01ea\n$\f$\16$\u01ed\13$\3%\3%\3&\3&\5"+ + "&\u01f3\n&\3\'\3\'\3(\3(\3(\3(\3(\3(\3(\3(\3(\5(\u0200\n(\3(\3(\7(\u0204"+ + "\n(\f(\16(\u0207\13(\3)\3)\3)\3)\3)\3*\3*\3*\3*\5*\u0212\n*\3*\3*\3*\3"+ + "*\3*\5*\u0219\n*\5*\u021b\n*\3*\3*\3+\3+\3+\3+\5+\u0223\n+\3+\3+\3+\3"+ + "+\3+\5+\u022a\n+\5+\u022c\n+\3+\3+\3,\3,\3,\3,\5,\u0234\n,\3,\3,\5,\u0238"+ + "\n,\3,\3,\3,\3,\3,\3,\3,\5,\u0241\n,\3-\3-\3-\3-\3-\5-\u0248\n-\3-\3-"+ + "\3.\3.\3.\3.\3.\5.\u0251\n.\3.\3.\3.\3.\6.\u0257\n.\r.\16.\u0258\7.\u025b"+ + "\n.\f.\16.\u025e\13.\3/\7/\u0261\n/\f/\16/\u0264\13/\3\60\3\60\3\60\3"+ + "\61\3\61\3\62\3\62\3\63\3\63\3\64\3\64\3\65\3\65\7\65\u0273\n\65\f\65"+ + "\16\65\u0276\13\65\3\66\3\66\7\66\u027a\n\66\f\66\16\66\u027d\13\66\3"+ + "\67\7\67\u0280\n\67\f\67\16\67\u0283\13\67\38\38\58\u0287\n8\38\38\58"+ + "\u028b\n8\38\38\58\u028f\n8\38\38\58\u0293\n8\38\38\58\u0297\n8\58\u0299"+ + "\n8\39\39\39\59\u029e\n9\39\39\39\3:\3:\3:\3:\3:\3;\3;\3;\5;\u02ab\n;"+ + "\3;\3;\3<\3<\3<\3<\5<\u02b3\n<\3<\3<\3=\3=\3=\7=\u02ba\n=\f=\16=\u02bd"+ + "\13=\3>\3>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\3?\5?\u02d1\n"+ + "?\3?\3?\3?\6?\u02d6\n?\r?\16?\u02d7\7?\u02da\n?\f?\16?\u02dd\13?\3@\3"+ + "@\3@\3@\3A\3A\3B\3B\3B\3B\3C\3C\3C\3C\3D\3D\3D\3D\3E\3E\3E\7E\u02f4\n"+ + "E\fE\16E\u02f7\13E\3F\3F\3G\3G\3G\3H\3H\3H\3I\3I\3J\3J\3J\3\u0262\b\f"+ + "@DFZ|K\2\4\6\b\n\f\16\20\22\24\26\30\32\34\36 \"$&(*,.\60\62\64\668:<"+ + ">@BDFHJLNPRTVXZ\\^`bdfhjlnprtvxz|~\u0080\u0082\u0084\u0086\u0088\u008a"+ + "\u008c\u008e\u0090\u0092\2\32\3\2\21\22\3\2\23\24\3\2\25\26\3\2\27\30"+ + "\3\2\31\32\3\2\33\34\3\2\35\36\3\2 !\3\2\"$\3\2%\'\3\2(*\3\2+-\3\2./\3"+ + "\2\60\61\3\2\62\63\3\2\64\65\3\2\66\67\3\2JM\3\2NO\3\2?@\3\2AB\3\2EF\4"+ + "\2degg\3\2Qb\u0335\2\u0094\3\2\2\2\4\u00bb\3\2\2\2\6\u00c0\3\2\2\2\b\u00c5"+ + "\3\2\2\2\n\u00c7\3\2\2\2\f\u00d5\3\2\2\2\16\u00e2\3\2\2\2\20\u00e4\3\2"+ + "\2\2\22\u00e9\3\2\2\2\24\u00ee\3\2\2\2\26\u00f3\3\2\2\2\30\u00f8\3\2\2"+ + "\2\32\u0105\3\2\2\2\34\u010d\3\2\2\2\36\u0110\3\2\2\2 \u0121\3\2\2\2\""+ + "\u0139\3\2\2\2$\u013c\3\2\2\2&\u0143\3\2\2\2(\u0154\3\2\2\2*\u0156\3\2"+ + "\2\2,\u015c\3\2\2\2.\u0162\3\2\2\2\60\u0168\3\2\2\2\62\u016e\3\2\2\2\64"+ + "\u0174\3\2\2\2\66\u017a\3\2\2\28\u0180\3\2\2\2:\u0186\3\2\2\2<\u018c\3"+ + "\2\2\2>\u0192\3\2\2\2@\u01a2\3\2\2\2B\u01b4\3\2\2\2D\u01c6\3\2\2\2F\u01df"+ + "\3\2\2\2H\u01ee\3\2\2\2J\u01f2\3\2\2\2L\u01f4\3\2\2\2N\u01ff\3\2\2\2P"+ + "\u0208\3\2\2\2R\u020d\3\2\2\2T\u021e\3\2\2\2V\u022f\3\2\2\2X\u0242\3\2"+ + "\2\2Z\u024b\3\2\2\2\\\u0262\3\2\2\2^\u0265\3\2\2\2`\u0268\3\2\2\2b\u026a"+ + "\3\2\2\2d\u026c\3\2\2\2f\u026e\3\2\2\2h\u0270\3\2\2\2j\u0277\3\2\2\2l"+ + "\u0281\3\2\2\2n\u0298\3\2\2\2p\u029d\3\2\2\2r\u02a2\3\2\2\2t\u02a7\3\2"+ + "\2\2v\u02ae\3\2\2\2x\u02b6\3\2\2\2z\u02be\3\2\2\2|\u02d0\3\2\2\2~\u02de"+ + "\3\2\2\2\u0080\u02e2\3\2\2\2\u0082\u02e4\3\2\2\2\u0084\u02e8\3\2\2\2\u0086"+ + "\u02ec\3\2\2\2\u0088\u02f0\3\2\2\2\u008a\u02f8\3\2\2\2\u008c\u02fa\3\2"+ + "\2\2\u008e\u02fd\3\2\2\2\u0090\u0300\3\2\2\2\u0092\u0302\3\2\2\2\u0094"+ + "\u0095\5\4\3\2\u0095\u0096\5\6\4\2\u0096\3\3\2\2\2\u0097\u0099\5\16\b"+ + "\2\u0098\u0097\3\2\2\2\u0099\u009c\3\2\2\2\u009a\u0098\3\2\2\2\u009a\u009b"+ + "\3\2\2\2\u009b\u00bc\3\2\2\2\u009c\u009a\3\2\2\2\u009d\u009f\5\n\6\2\u009e"+ + "\u009d\3\2\2\2\u009f\u00a2\3\2\2\2\u00a0\u009e\3\2\2\2\u00a0\u00a1\3\2"+ + "\2\2\u00a1\u00bc\3\2\2\2\u00a2\u00a0\3\2\2\2\u00a3\u00a5\5\16\b\2\u00a4"+ + "\u00a3\3\2\2\2\u00a5\u00a8\3\2\2\2\u00a6\u00a4\3\2\2\2\u00a6\u00a7\3\2"+ + "\2\2\u00a7\u00ac\3\2\2\2\u00a8\u00a6\3\2\2\2\u00a9\u00ab\5\n\6\2\u00aa"+ + "\u00a9\3\2\2\2\u00ab\u00ae\3\2\2\2\u00ac\u00aa\3\2\2\2\u00ac\u00ad\3\2"+ + "\2\2\u00ad\u00bc\3\2\2\2\u00ae\u00ac\3\2\2\2\u00af\u00b1\5\n\6\2\u00b0"+ + "\u00af\3\2\2\2\u00b1\u00b4\3\2\2\2\u00b2\u00b0\3\2\2\2\u00b2\u00b3\3\2"+ + "\2\2\u00b3\u00b8\3\2\2\2\u00b4\u00b2\3\2\2\2\u00b5\u00b7\5\16\b\2\u00b6"+ + "\u00b5\3\2\2\2\u00b7\u00ba\3\2\2\2\u00b8\u00b6\3\2\2\2\u00b8\u00b9\3\2"+ + "\2\2\u00b9\u00bc\3\2\2\2\u00ba\u00b8\3\2\2\2\u00bb\u009a\3\2\2\2\u00bb"+ + "\u00a0\3\2\2\2\u00bb\u00a6\3\2\2\2\u00bb\u00b2\3\2\2\2\u00bc\5\3\2\2\2"+ + "\u00bd\u00bf\5\b\5\2\u00be\u00bd\3\2\2\2\u00bf\u00c2\3\2\2\2\u00c0\u00be"+ + "\3\2\2\2\u00c0\u00c1\3\2\2\2\u00c1\7\3\2\2\2\u00c2\u00c0\3\2\2\2\u00c3"+ + "\u00c6\5\36\20\2\u00c4\u00c6\5 \21\2\u00c5\u00c3\3\2\2\2\u00c5\u00c4\3"+ + "\2\2\2\u00c6\t\3\2\2\2\u00c7\u00c8\7\3\2\2\u00c8\u00ca\5\f\7\2\u00c9\u00cb"+ + "\7\4\2\2\u00ca\u00c9\3\2\2\2\u00ca\u00cb\3\2\2\2\u00cb\13\3\2\2\2\u00cc"+ + "\u00cd\b\7\1\2\u00cd\u00d6\7f\2\2\u00ce\u00d1\7f\2\2\u00cf\u00d0\7\5\2"+ + "\2\u00d0\u00d2\7f\2\2\u00d1\u00cf\3\2\2\2\u00d2\u00d3\3\2\2\2\u00d3\u00d1"+ + "\3\2\2\2\u00d3\u00d4\3\2\2\2\u00d4\u00d6\3\2\2\2\u00d5\u00cc\3\2\2\2\u00d5"+ + "\u00ce\3\2\2\2\u00d6\u00db\3\2\2\2\u00d7\u00d8\f\3\2\2\u00d8\u00da\7\6"+ + "\2\2\u00d9\u00d7\3\2\2\2\u00da\u00dd\3\2\2\2\u00db\u00d9\3\2\2\2\u00db"+ + "\u00dc\3\2\2\2\u00dc\r\3\2\2\2\u00dd\u00db\3\2\2\2\u00de\u00e3\5\22\n"+ + "\2\u00df\u00e3\5\26\f\2\u00e0\u00e3\5\24\13\2\u00e1\u00e3\5\20\t\2\u00e2"+ + "\u00de\3\2\2\2\u00e2\u00df\3\2\2\2\u00e2\u00e0\3\2\2\2\u00e2\u00e1\3\2"+ + "\2\2\u00e3\17\3\2\2\2\u00e4\u00e5\7\7\2\2\u00e5\u00e7\7g\2\2\u00e6\u00e8"+ + "\7\4\2\2\u00e7\u00e6\3\2\2\2\u00e7\u00e8\3\2\2\2\u00e8\21\3\2\2\2\u00e9"+ + "\u00ea\7\b\2\2\u00ea\u00ec\7g\2\2\u00eb\u00ed\7\4\2\2\u00ec\u00eb\3\2"+ + "\2\2\u00ec\u00ed\3\2\2\2\u00ed\23\3\2\2\2\u00ee\u00ef\7\t\2\2\u00ef\u00f1"+ + "\7g\2\2\u00f0\u00f2\7\4\2\2\u00f1\u00f0\3\2\2\2\u00f1\u00f2\3\2\2\2\u00f2"+ + "\25\3\2\2\2\u00f3\u00f4\7\n\2\2\u00f4\u00f6\7g\2\2\u00f5\u00f7\7\4\2\2"+ + "\u00f6\u00f5\3\2\2\2\u00f6\u00f7\3\2\2\2\u00f7\27\3\2\2\2\u00f8\u00f9"+ + "\7\13\2\2\u00f9\u00fa\7f\2\2\u00fa\u00fc\7\f\2\2\u00fb\u00fd\5\32\16\2"+ + "\u00fc\u00fb\3\2\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00fe\3\2\2\2\u00fe\u00ff"+ + "\7\r\2\2\u00ff\u0100\7\16\2\2\u0100\u0101\5\\/\2\u0101\u0103\7\17\2\2"+ + "\u0102\u0104\7\4\2\2\u0103\u0102\3\2\2\2\u0103\u0104\3\2\2\2\u0104\31"+ + "\3\2\2\2\u0105\u010a\5\34\17\2\u0106\u0107\7\20\2\2\u0107\u0109\5\34\17"+ + "\2\u0108\u0106\3\2\2\2\u0109\u010c\3\2\2\2\u010a\u0108\3\2\2\2\u010a\u010b"+ + "\3\2\2\2\u010b\33\3\2\2\2\u010c\u010a\3\2\2\2\u010d\u010e\7P\2\2\u010e"+ + "\u010f\7f\2\2\u010f\35\3\2\2\2\u0110\u0111\t\2\2\2\u0111\u0115\7g\2\2"+ + "\u0112\u0114\5(\25\2\u0113\u0112\3\2\2\2\u0114\u0117\3\2\2\2\u0115\u0113"+ + "\3\2\2\2\u0115\u0116\3\2\2\2\u0116\u0118\3\2\2\2\u0117\u0115\3\2\2\2\u0118"+ + "\u0119\5> \2\u0119\u011b\5h\65\2\u011a\u011c\5j\66\2\u011b\u011a\3\2\2"+ + "\2\u011b\u011c\3\2\2\2\u011c\u011d\3\2\2\2\u011d\u011f\t\3\2\2\u011e\u0120"+ + "\7\4\2\2\u011f\u011e\3\2\2\2\u011f\u0120\3\2\2\2\u0120\37\3\2\2\2\u0121"+ + "\u0122\t\4\2\2\u0122\u0126\7g\2\2\u0123\u0125\5(\25\2\u0124\u0123\3\2"+ + "\2\2\u0125\u0128\3\2\2\2\u0126\u0124\3\2\2\2\u0126\u0127\3\2\2\2\u0127"+ + "\u0129\3\2\2\2\u0128\u0126\3\2\2\2\u0129\u012b\5\"\22\2\u012a\u012c\5"+ + "$\23\2\u012b\u012a\3\2\2\2\u012b\u012c\3\2\2\2\u012c\u012d\3\2\2\2\u012d"+ + "\u012e\5> \2\u012e\u0130\5h\65\2\u012f\u0131\5j\66\2\u0130\u012f\3\2\2"+ + "\2\u0130\u0131\3\2\2\2\u0131\u0133\3\2\2\2\u0132\u0134\5&\24\2\u0133\u0132"+ + "\3\2\2\2\u0133\u0134\3\2\2\2\u0134\u0135\3\2\2\2\u0135\u0137\t\3\2\2\u0136"+ + "\u0138\7\4\2\2\u0137\u0136\3\2\2\2\u0137\u0138\3\2\2\2\u0138!\3\2\2\2"+ + "\u0139\u013a\t\5\2\2\u013a\u013b\5|?\2\u013b#\3\2\2\2\u013c\u0140\t\6"+ + "\2\2\u013d\u013f\5n8\2\u013e\u013d\3\2\2\2\u013f\u0142\3\2\2\2\u0140\u013e"+ + "\3\2\2\2\u0140\u0141\3\2\2\2\u0141%\3\2\2\2\u0142\u0140\3\2\2\2\u0143"+ + "\u0147\t\7\2\2\u0144\u0146\5n8\2\u0145\u0144\3\2\2\2\u0146\u0149\3\2\2"+ + "\2\u0147\u0145\3\2\2\2\u0147\u0148\3\2\2\2\u0148\'\3\2\2\2\u0149\u0147"+ + "\3\2\2\2\u014a\u0155\5*\26\2\u014b\u0155\5,\27\2\u014c\u0155\5.\30\2\u014d"+ + "\u0155\5\60\31\2\u014e\u0155\5\62\32\2\u014f\u0155\5\64\33\2\u0150\u0155"+ + "\5\66\34\2\u0151\u0155\58\35\2\u0152\u0155\5:\36\2\u0153\u0155\5<\37\2"+ + "\u0154\u014a\3\2\2\2\u0154\u014b\3\2\2\2\u0154\u014c\3\2\2\2\u0154\u014d"+ + "\3\2\2\2\u0154\u014e\3\2\2\2\u0154\u014f\3\2\2\2\u0154\u0150\3\2\2\2\u0154"+ + "\u0151\3\2\2\2\u0154\u0152\3\2\2\2\u0154\u0153\3\2\2\2\u0155)\3\2\2\2"+ + "\u0156\u0157\t\b\2\2\u0157\u0158\7\37\2\2\u0158\u015a\7e\2\2\u0159\u015b"+ + "\7\20\2\2\u015a\u0159\3\2\2\2\u015a\u015b\3\2\2\2\u015b+\3\2\2\2\u015c"+ + "\u015d\t\t\2\2\u015d\u015e\7\37\2\2\u015e\u0160\7d\2\2\u015f\u0161\7\20"+ + "\2\2\u0160\u015f\3\2\2\2\u0160\u0161\3\2\2\2\u0161-\3\2\2\2\u0162\u0163"+ + "\t\n\2\2\u0163\u0164\7\37\2\2\u0164\u0166\7g\2\2\u0165\u0167\7\20\2\2"+ + "\u0166\u0165\3\2\2\2\u0166\u0167\3\2\2\2\u0167/\3\2\2\2\u0168\u0169\t"+ + "\13\2\2\u0169\u016a\7\37\2\2\u016a\u016c\7g\2\2\u016b\u016d\7\20\2\2\u016c"+ + "\u016b\3\2\2\2\u016c\u016d\3\2\2\2\u016d\61\3\2\2\2\u016e\u016f\t\f\2"+ + "\2\u016f\u0170\7\37\2\2\u0170\u0172\7e\2\2\u0171\u0173\7\20\2\2\u0172"+ + "\u0171\3\2\2\2\u0172\u0173\3\2\2\2\u0173\63\3\2\2\2\u0174\u0175\t\r\2"+ + "\2\u0175\u0176\7\37\2\2\u0176\u0178\7e\2\2\u0177\u0179\7\20\2\2\u0178"+ + "\u0177\3\2\2\2\u0178\u0179\3\2\2\2\u0179\65\3\2\2\2\u017a\u017b\t\16\2"+ + "\2\u017b\u017c\7\37\2\2\u017c\u017e\7g\2\2\u017d\u017f\7\20\2\2\u017e"+ + "\u017d\3\2\2\2\u017e\u017f\3\2\2\2\u017f\67\3\2\2\2\u0180\u0181\t\17\2"+ + "\2\u0181\u0182\7\37\2\2\u0182\u0184\7g\2\2\u0183\u0185\7\20\2\2\u0184"+ + "\u0183\3\2\2\2\u0184\u0185\3\2\2\2\u01859\3\2\2\2\u0186\u0187\t\20\2\2"+ + "\u0187\u0188\7\37\2\2\u0188\u018a\7e\2\2\u0189\u018b\7\20\2\2\u018a\u0189"+ + "\3\2\2\2\u018a\u018b\3\2\2\2\u018b;\3\2\2\2\u018c\u018d\t\21\2\2\u018d"+ + "\u018e\7\37\2\2\u018e\u0190\7g\2\2\u018f\u0191\7\20\2\2\u0190\u018f\3"+ + "\2\2\2\u0190\u0191\3\2\2\2\u0191=\3\2\2\2\u0192\u0194\t\22\2\2\u0193\u0195"+ + "\5@!\2\u0194\u0193\3\2\2\2\u0194\u0195\3\2\2\2\u0195?\3\2\2\2\u0196\u0197"+ + "\b!\1\2\u0197\u0198\5`\61\2\u0198\u0199\5@!\2\u0199\u019a\5b\62\2\u019a"+ + "\u01a3\3\2\2\2\u019b\u019c\5N(\2\u019c\u019f\5\u0092J\2\u019d\u01a0\5"+ + "|?\2\u019e\u01a0\5L\'\2\u019f\u019d\3\2\2\2\u019f\u019e\3\2\2\2\u01a0"+ + "\u01a3\3\2\2\2\u01a1\u01a3\5B\"\2\u01a2\u0196\3\2\2\2\u01a2\u019b\3\2"+ + "\2\2\u01a2\u01a1\3\2\2\2\u01a3\u01ae\3\2\2\2\u01a4\u01a8\f\5\2\2\u01a5"+ + "\u01a6\5f\64\2\u01a6\u01a7\5@!\2\u01a7\u01a9\3\2\2\2\u01a8\u01a5\3\2\2"+ + "\2\u01a9\u01aa\3\2\2\2\u01aa\u01a8\3\2\2\2\u01aa\u01ab\3\2\2\2\u01ab\u01ad"+ + "\3\2\2\2\u01ac\u01a4\3\2\2\2\u01ad\u01b0\3\2\2\2\u01ae\u01ac\3\2\2\2\u01ae"+ + "\u01af\3\2\2\2\u01afA\3\2\2\2\u01b0\u01ae\3\2\2\2\u01b1\u01b2\5H%\2\u01b2"+ + "\u01b3\5d\63\2\u01b3\u01b5\3\2\2\2\u01b4\u01b1\3\2\2\2\u01b4\u01b5\3\2"+ + "\2\2\u01b5\u01b6\3\2\2\2\u01b6\u01b7\5J&\2\u01b7\u01b8\5`\61\2\u01b8\u01b9"+ + "\5D#\2\u01b9\u01ba\5b\62\2\u01baC\3\2\2\2\u01bb\u01bc\b#\1\2\u01bc\u01bd"+ + "\5`\61\2\u01bd\u01be\5D#\2\u01be\u01bf\5b\62\2\u01bf\u01c7\3\2\2\2\u01c0"+ + "\u01c1\5\u0088E\2\u01c1\u01c4\5\u0092J\2\u01c2\u01c5\5|?\2\u01c3\u01c5"+ + "\5L\'\2\u01c4\u01c2\3\2\2\2\u01c4\u01c3\3\2\2\2\u01c5\u01c7\3\2\2\2\u01c6"+ + "\u01bb\3\2\2\2\u01c6\u01c0\3\2\2\2\u01c7\u01d2\3\2\2\2\u01c8\u01cc\f\4"+ + "\2\2\u01c9\u01ca\5f\64\2\u01ca\u01cb\5D#\2\u01cb\u01cd\3\2\2\2\u01cc\u01c9"+ + "\3\2\2\2\u01cd\u01ce\3\2\2\2\u01ce\u01cc\3\2\2\2\u01ce\u01cf\3\2\2\2\u01cf"+ + "\u01d1\3\2\2\2\u01d0\u01c8\3\2\2\2\u01d1\u01d4\3\2\2\2\u01d2\u01d0\3\2"+ + "\2\2\u01d2\u01d3\3\2\2\2\u01d3E\3\2\2\2\u01d4\u01d2\3\2\2\2\u01d5\u01d6"+ + "\b$\1\2\u01d6\u01d9\5\u0092J\2\u01d7\u01da\5|?\2\u01d8\u01da\5L\'\2\u01d9"+ + "\u01d7\3\2\2\2\u01d9\u01d8\3\2\2\2\u01da\u01e0\3\2\2\2\u01db\u01dc\5`"+ + "\61\2\u01dc\u01dd\5F$\2\u01dd\u01de\5b\62\2\u01de\u01e0\3\2\2\2\u01df"+ + "\u01d5\3\2\2\2\u01df\u01db\3\2\2\2\u01e0\u01eb\3\2\2\2\u01e1\u01e5\f\4"+ + "\2\2\u01e2\u01e3\5f\64\2\u01e3\u01e4\5F$\2\u01e4\u01e6\3\2\2\2\u01e5\u01e2"+ + "\3\2\2\2\u01e6\u01e7\3\2\2\2\u01e7\u01e5\3\2\2\2\u01e7\u01e8\3\2\2\2\u01e8"+ + "\u01ea\3\2\2\2\u01e9\u01e1\3\2\2\2\u01ea\u01ed\3\2\2\2\u01eb\u01e9\3\2"+ + "\2\2\u01eb\u01ec\3\2\2\2\u01ecG\3\2\2\2\u01ed\u01eb\3\2\2\2\u01ee\u01ef"+ + "\7f\2\2\u01efI\3\2\2\2\u01f0\u01f3\5\u008aF\2\u01f1\u01f3\5\u0080A\2\u01f2"+ + "\u01f0\3\2\2\2\u01f2\u01f1\3\2\2\2\u01f3K\3\2\2\2\u01f4\u01f5\78\2\2\u01f5"+ + "M\3\2\2\2\u01f6\u0200\5\u0084C\2\u01f7\u0200\5~@\2\u01f8\u0200\5v<\2\u01f9"+ + "\u0200\5t;\2\u01fa\u0200\5P)\2\u01fb\u0200\5R*\2\u01fc\u0200\5T+\2\u01fd"+ + "\u0200\5V,\2\u01fe\u0200\5X-\2\u01ff\u01f6\3\2\2\2\u01ff\u01f7\3\2\2\2"+ + "\u01ff\u01f8\3\2\2\2\u01ff\u01f9\3\2\2\2\u01ff\u01fa\3\2\2\2\u01ff\u01fb"+ + "\3\2\2\2\u01ff\u01fc\3\2\2\2\u01ff\u01fd\3\2\2\2\u01ff\u01fe\3\2\2\2\u0200"+ + "\u0205\3\2\2\2\u0201\u0202\7c\2\2\u0202\u0204\5\u0090I\2\u0203\u0201\3"+ + "\2\2\2\u0204\u0207\3\2\2\2\u0205\u0203\3\2\2\2\u0205\u0206\3\2\2\2\u0206"+ + "O\3\2\2\2\u0207\u0205\3\2\2\2\u0208\u0209\79\2\2\u0209\u020a\5`\61\2\u020a"+ + "\u020b\5\\/\2\u020b\u020c\5b\62\2\u020cQ\3\2\2\2\u020d\u020e\7:\2\2\u020e"+ + "\u0211\5`\61\2\u020f\u0212\5\u0084C\2\u0210\u0212\5~@\2\u0211\u020f\3"+ + "\2\2\2\u0211\u0210\3\2\2\2\u0212\u0213\3\2\2\2\u0213\u0214\7\20\2\2\u0214"+ + "\u021a\5Z.\2\u0215\u0218\7\20\2\2\u0216\u0219\7d\2\2\u0217\u0219\5^\60"+ + "\2\u0218\u0216\3\2\2\2\u0218\u0217\3\2\2\2\u0219\u021b\3\2\2\2\u021a\u0215"+ + "\3\2\2\2\u021a\u021b\3\2\2\2\u021b\u021c\3\2\2\2\u021c\u021d\5b\62\2\u021d"+ + "S\3\2\2\2\u021e\u021f\7;\2\2\u021f\u0222\5`\61\2\u0220\u0223\5\u0084C"+ + "\2\u0221\u0223\5~@\2\u0222\u0220\3\2\2\2\u0222\u0221\3\2\2\2\u0223\u0224"+ + "\3\2\2\2\u0224\u0225\7\20\2\2\u0225\u022b\5Z.\2\u0226\u0229\7\20\2\2\u0227"+ + "\u022a\7d\2\2\u0228\u022a\5^\60\2\u0229\u0227\3\2\2\2\u0229\u0228\3\2"+ + "\2\2\u022a\u022c\3\2\2\2\u022b\u0226\3\2\2\2\u022b\u022c\3\2\2\2\u022c"+ + "\u022d\3\2\2\2\u022d\u022e\5b\62\2\u022eU\3\2\2\2\u022f\u0230\7<\2\2\u0230"+ + "\u0233\5`\61\2\u0231\u0234\5\u0084C\2\u0232\u0234\5~@\2\u0233\u0231\3"+ + "\2\2\2\u0233\u0232\3\2\2\2\u0234\u0237\3\2\2\2\u0235\u0236\7\20\2\2\u0236"+ + "\u0238\5Z.\2\u0237\u0235\3\2\2\2\u0237\u0238\3\2\2\2\u0238\u0239\3\2\2"+ + "\2\u0239\u023a\5b\62\2\u023a\u0240\7\5\2\2\u023b\u0241\7I\2\2\u023c\u023d"+ + "\5\u0088E\2\u023d\u023e\7\5\2\2\u023e\u023f\t\23\2\2\u023f\u0241\3\2\2"+ + "\2\u0240\u023b\3\2\2\2\u0240\u023c\3\2\2\2\u0241W\3\2\2\2\u0242\u0243"+ + "\7f\2\2\u0243\u0244\5`\61\2\u0244\u0247\5|?\2\u0245\u0246\7\20\2\2\u0246"+ + "\u0248\5\u0088E\2\u0247\u0245\3\2\2\2\u0247\u0248\3\2\2\2\u0248\u0249"+ + "\3\2\2\2\u0249\u024a\5b\62\2\u024aY\3\2\2\2\u024b\u024c\b.\1\2\u024c\u024d"+ + "\5\u0088E\2\u024d\u0250\5\u0092J\2\u024e\u0251\5|?\2\u024f\u0251\5L\'"+ + "\2\u0250\u024e\3\2\2\2\u0250\u024f\3\2\2\2\u0251\u025c\3\2\2\2\u0252\u0256"+ + "\f\3\2\2\u0253\u0254\5f\64\2\u0254\u0255\5Z.\2\u0255\u0257\3\2\2\2\u0256"+ + "\u0253\3\2\2\2\u0257\u0258\3\2\2\2\u0258\u0256\3\2\2\2\u0258\u0259\3\2"+ + "\2\2\u0259\u025b\3\2\2\2\u025a\u0252\3\2\2\2\u025b\u025e\3\2\2\2\u025c"+ + "\u025a\3\2\2\2\u025c\u025d\3\2\2\2\u025d[\3\2\2\2\u025e\u025c\3\2\2\2"+ + "\u025f\u0261\13\2\2\2\u0260\u025f\3\2\2\2\u0261\u0264\3\2\2\2\u0262\u0263"+ + "\3\2\2\2\u0262\u0260\3\2\2\2\u0263]\3\2\2\2\u0264\u0262\3\2\2\2\u0265"+ + "\u0266\7d\2\2\u0266\u0267\7=\2\2\u0267_\3\2\2\2\u0268\u0269\7\f\2\2\u0269"+ + "a\3\2\2\2\u026a\u026b\7\r\2\2\u026bc\3\2\2\2\u026c\u026d\7>\2\2\u026d"+ + "e\3\2\2\2\u026e\u026f\t\24\2\2\u026fg\3\2\2\2\u0270\u0274\t\25\2\2\u0271"+ + "\u0273\5n8\2\u0272\u0271\3\2\2\2\u0273\u0276\3\2\2\2\u0274\u0272\3\2\2"+ + "\2\u0274\u0275\3\2\2\2\u0275i\3\2\2\2\u0276\u0274\3\2\2\2\u0277\u027b"+ + "\t\26\2\2\u0278\u027a\5n8\2\u0279\u0278\3\2\2\2\u027a\u027d\3\2\2\2\u027b"+ + "\u0279\3\2\2\2\u027b\u027c\3\2\2\2\u027ck\3\2\2\2\u027d\u027b\3\2\2\2"+ + "\u027e\u0280\5n8\2\u027f\u027e\3\2\2\2\u0280\u0283\3\2\2\2\u0281\u027f"+ + "\3\2\2\2\u0281\u0282\3\2\2\2\u0282m\3\2\2\2\u0283\u0281\3\2\2\2\u0284"+ + "\u0286\5p9\2\u0285\u0287\7\4\2\2\u0286\u0285\3\2\2\2\u0286\u0287\3\2\2"+ + "\2\u0287\u0299\3\2\2\2\u0288\u028a\5r:\2\u0289\u028b\7\4\2\2\u028a\u0289"+ + "\3\2\2\2\u028a\u028b\3\2\2\2\u028b\u0299\3\2\2\2\u028c\u028e\5t;\2\u028d"+ + "\u028f\7\4\2\2\u028e\u028d\3\2\2\2\u028e\u028f\3\2\2\2\u028f\u0299\3\2"+ + "\2\2\u0290\u0292\5v<\2\u0291\u0293\7\4\2\2\u0292\u0291\3\2\2\2\u0292\u0293"+ + "\3\2\2\2\u0293\u0299\3\2\2\2\u0294\u0296\5X-\2\u0295\u0297\7\4\2\2\u0296"+ + "\u0295\3\2\2\2\u0296\u0297\3\2\2\2\u0297\u0299\3\2\2\2\u0298\u0284\3\2"+ + "\2\2\u0298\u0288\3\2\2\2\u0298\u028c\3\2\2\2\u0298\u0290\3\2\2\2\u0298"+ + "\u0294\3\2\2\2\u0299o\3\2\2\2\u029a\u029e\5\u0084C\2\u029b\u029e\5\u0086"+ + "D\2\u029c\u029e\5~@\2\u029d\u029a\3\2\2\2\u029d\u029b\3\2\2\2\u029d\u029c"+ + "\3\2\2\2\u029e\u029f\3\2\2\2\u029f\u02a0\7\37\2\2\u02a0\u02a1\5|?\2\u02a1"+ + "q\3\2\2\2\u02a2\u02a3\7C\2\2\u02a3\u02a4\7\f\2\2\u02a4\u02a5\5|?\2\u02a5"+ + "\u02a6\7\r\2\2\u02a6s\3\2\2\2\u02a7\u02a8\5z>\2\u02a8\u02aa\7\f\2\2\u02a9"+ + "\u02ab\5x=\2\u02aa\u02a9\3\2\2\2\u02aa\u02ab\3\2\2\2\u02ab\u02ac\3\2\2"+ + "\2\u02ac\u02ad\7\r\2\2\u02adu\3\2\2\2\u02ae\u02af\7D\2\2\u02af\u02b0\7"+ + "f\2\2\u02b0\u02b2\7\f\2\2\u02b1\u02b3\5x=\2\u02b2\u02b1\3\2\2\2\u02b2"+ + "\u02b3\3\2\2\2\u02b3\u02b4\3\2\2\2\u02b4\u02b5\7\r\2\2\u02b5w\3\2\2\2"+ + "\u02b6\u02bb\5|?\2\u02b7\u02b8\7\20\2\2\u02b8\u02ba\5|?\2\u02b9\u02b7"+ + "\3\2\2\2\u02ba\u02bd\3\2\2\2\u02bb\u02b9\3\2\2\2\u02bb\u02bc\3\2\2\2\u02bc"+ + "y\3\2\2\2\u02bd\u02bb\3\2\2\2\u02be\u02bf\7f\2\2\u02bf\u02c0\7\5\2\2\u02c0"+ + "\u02c1\7f\2\2\u02c1{\3\2\2\2\u02c2\u02c3\b?\1\2\u02c3\u02d1\5\u0090I\2"+ + "\u02c4\u02d1\5\u0084C\2\u02c5\u02d1\5\u0086D\2\u02c6\u02d1\5\u0082B\2"+ + "\u02c7\u02d1\5\u008aF\2\u02c8\u02d1\5~@\2\u02c9\u02d1\5t;\2\u02ca\u02d1"+ + "\5v<\2\u02cb\u02d1\5X-\2\u02cc\u02cd\5`\61\2\u02cd\u02ce\5|?\2\u02ce\u02cf"+ + "\5b\62\2\u02cf\u02d1\3\2\2\2\u02d0\u02c2\3\2\2\2\u02d0\u02c4\3\2\2\2\u02d0"+ + "\u02c5\3\2\2\2\u02d0\u02c6\3\2\2\2\u02d0\u02c7\3\2\2\2\u02d0\u02c8\3\2"+ + "\2\2\u02d0\u02c9\3\2\2\2\u02d0\u02ca\3\2\2\2\u02d0\u02cb\3\2\2\2\u02d0"+ + "\u02cc\3\2\2\2\u02d1\u02db\3\2\2\2\u02d2\u02d5\f\3\2\2\u02d3\u02d4\7c"+ + "\2\2\u02d4\u02d6\5|?\2\u02d5\u02d3\3\2\2\2\u02d6\u02d7\3\2\2\2\u02d7\u02d5"+ + "\3\2\2\2\u02d7\u02d8\3\2\2\2\u02d8\u02da\3\2\2\2\u02d9\u02d2\3\2\2\2\u02da"+ + "\u02dd\3\2\2\2\u02db\u02d9\3\2\2\2\u02db\u02dc\3\2\2\2\u02dc}\3\2\2\2"+ + "\u02dd\u02db\3\2\2\2\u02de\u02df\5\u0080A\2\u02df\u02e0\7\5\2\2\u02e0"+ + "\u02e1\7f\2\2\u02e1\177\3\2\2\2\u02e2\u02e3\t\27\2\2\u02e3\u0081\3\2\2"+ + "\2\u02e4\u02e5\5\u008eH\2\u02e5\u02e6\7\5\2\2\u02e6\u02e7\5\u0088E\2\u02e7"+ + "\u0083\3\2\2\2\u02e8\u02e9\5\u008aF\2\u02e9\u02ea\7\5\2\2\u02ea\u02eb"+ + "\5\u0088E\2\u02eb\u0085\3\2\2\2\u02ec\u02ed\5\u008cG\2\u02ed\u02ee\7\5"+ + "\2\2\u02ee\u02ef\5\u0088E\2\u02ef\u0087\3\2\2\2\u02f0\u02f5\7f\2\2\u02f1"+ + "\u02f2\7\5\2\2\u02f2\u02f4\7f\2\2\u02f3\u02f1\3\2\2\2\u02f4\u02f7\3\2"+ + "\2\2\u02f5\u02f3\3\2\2\2\u02f5\u02f6\3\2\2\2\u02f6\u0089\3\2\2\2\u02f7"+ + "\u02f5\3\2\2\2\u02f8\u02f9\7f\2\2\u02f9\u008b\3\2\2\2\u02fa\u02fb\7G\2"+ + "\2\u02fb\u02fc\7f\2\2\u02fc\u008d\3\2\2\2\u02fd\u02fe\7H\2\2\u02fe\u02ff"+ + "\7f\2\2\u02ff\u008f\3\2\2\2\u0300\u0301\t\30\2\2\u0301\u0091\3\2\2\2\u0302"+ + "\u0303\t\31\2\2\u0303\u0093\3\2\2\2\\\u009a\u00a0\u00a6\u00ac\u00b2\u00b8"+ + "\u00bb\u00c0\u00c5\u00ca\u00d3\u00d5\u00db\u00e2\u00e7\u00ec\u00f1\u00f6"+ + "\u00fc\u0103\u010a\u0115\u011b\u011f\u0126\u012b\u0130\u0133\u0137\u0140"+ + "\u0147\u0154\u015a\u0160\u0166\u016c\u0172\u0178\u017e\u0184\u018a\u0190"+ + "\u0194\u019f\u01a2\u01aa\u01ae\u01b4\u01c4\u01c6\u01ce\u01d2\u01d9\u01df"+ + "\u01e7\u01eb\u01f2\u01ff\u0205\u0211\u0218\u021a\u0222\u0229\u022b\u0233"+ + "\u0237\u0240\u0247\u0250\u0258\u025c\u0262\u0274\u027b\u0281\u0286\u028a"+ + "\u028e\u0292\u0296\u0298\u029d\u02aa\u02b2\u02bb\u02d0\u02d7\u02db\u02f5"; + public static final ATN _ATN = + new ATNDeserializer().deserialize(_serializedATN.toCharArray()); + static { + _decisionToDFA = new DFA[_ATN.getNumberOfDecisions()]; + for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) { + _decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserVisitor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserVisitor.java new file mode 100644 index 0000000..4a2cc5b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/RuleParserVisitor.java @@ -0,0 +1,503 @@ +// Generated from RuleParser.g4 by ANTLR 4.5.3 +package com.itheima.sfbx.framework.rule.dsl; +import org.antlr.v4.runtime.tree.ParseTreeVisitor; + +/** + * This interface defines a complete generic visitor for a parse tree produced + * by {@link RuleParserParser}. + * + * @param The return type of the visit operation. Use {@link Void} for + * operations with no return type. + */ +public interface RuleParserVisitor extends ParseTreeVisitor { + /** + * Visit a parse tree produced by {@link RuleParserParser#ruleSet}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRuleSet(RuleParserParser.RuleSetContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#ruleSetHeader}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRuleSetHeader(RuleParserParser.RuleSetHeaderContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#ruleSetBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRuleSetBody(RuleParserParser.RuleSetBodyContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#rules}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRules(RuleParserParser.RulesContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#functionImport}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionImport(RuleParserParser.FunctionImportContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#packageDef}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPackageDef(RuleParserParser.PackageDefContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#resource}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitResource(RuleParserParser.ResourceContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#importParameterLibrary}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImportParameterLibrary(RuleParserParser.ImportParameterLibraryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#importVariableLibrary}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImportVariableLibrary(RuleParserParser.ImportVariableLibraryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#importConstantLibrary}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImportConstantLibrary(RuleParserParser.ImportConstantLibraryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#importActionLibrary}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitImportActionLibrary(RuleParserParser.ImportActionLibraryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#functionDef}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionDef(RuleParserParser.FunctionDefContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#functionParameters}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionParameters(RuleParserParser.FunctionParametersContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#functionParameter}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionParameter(RuleParserParser.FunctionParameterContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#ruleDef}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRuleDef(RuleParserParser.RuleDefContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#loopRuleDef}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopRuleDef(RuleParserParser.LoopRuleDefContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#loopTarget}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopTarget(RuleParserParser.LoopTargetContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#loopStart}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopStart(RuleParserParser.LoopStartContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#loopEnd}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopEnd(RuleParserParser.LoopEndContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#attribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAttribute(RuleParserParser.AttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#loopAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLoopAttribute(RuleParserParser.LoopAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#salienceAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSalienceAttribute(RuleParserParser.SalienceAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#effectiveDateAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEffectiveDateAttribute(RuleParserParser.EffectiveDateAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expiresDateAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpiresDateAttribute(RuleParserParser.ExpiresDateAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#enabledAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitEnabledAttribute(RuleParserParser.EnabledAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#debugAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitDebugAttribute(RuleParserParser.DebugAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#activationGroupAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitActivationGroupAttribute(RuleParserParser.ActivationGroupAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#agendaGroupAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAgendaGroupAttribute(RuleParserParser.AgendaGroupAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#autoFocusAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAutoFocusAttribute(RuleParserParser.AutoFocusAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#ruleflowGroupAttribute}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRuleflowGroupAttribute(RuleParserParser.RuleflowGroupAttributeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#left}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLeft(RuleParserParser.LeftContext ctx); + /** + * Visit a parse tree produced by the {@code parenConditions} + * labeled alternative in {@link RuleParserParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParenConditions(RuleParserParser.ParenConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code multiConditions} + * labeled alternative in {@link RuleParserParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiConditions(RuleParserParser.MultiConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code singleCondition} + * labeled alternative in {@link RuleParserParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSingleCondition(RuleParserParser.SingleConditionContext ctx); + /** + * Visit a parse tree produced by the {@code singleNamedConditionSet} + * labeled alternative in {@link RuleParserParser#condition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSingleNamedConditionSet(RuleParserParser.SingleNamedConditionSetContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#namedConditionSet}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNamedConditionSet(RuleParserParser.NamedConditionSetContext ctx); + /** + * Visit a parse tree produced by the {@code parenNamedConditions} + * labeled alternative in {@link RuleParserParser#namedCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParenNamedConditions(RuleParserParser.ParenNamedConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code multiNamedConditions} + * labeled alternative in {@link RuleParserParser#namedCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiNamedConditions(RuleParserParser.MultiNamedConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code singleNamedConditions} + * labeled alternative in {@link RuleParserParser#namedCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSingleNamedConditions(RuleParserParser.SingleNamedConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code singleCellCondition} + * labeled alternative in {@link RuleParserParser#decisionTableCellCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitSingleCellCondition(RuleParserParser.SingleCellConditionContext ctx); + /** + * Visit a parse tree produced by the {@code multiCellConditions} + * labeled alternative in {@link RuleParserParser#decisionTableCellCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMultiCellConditions(RuleParserParser.MultiCellConditionsContext ctx); + /** + * Visit a parse tree produced by the {@code parenCellConditions} + * labeled alternative in {@link RuleParserParser#decisionTableCellCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParenCellConditions(RuleParserParser.ParenCellConditionsContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#refName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRefName(RuleParserParser.RefNameContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#refObject}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRefObject(RuleParserParser.RefObjectContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#nullValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNullValue(RuleParserParser.NullValueContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#conditionLeft}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConditionLeft(RuleParserParser.ConditionLeftContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expEval}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpEval(RuleParserParser.ExpEvalContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expAll}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpAll(RuleParserParser.ExpAllContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expExists}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpExists(RuleParserParser.ExpExistsContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expCollect}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpCollect(RuleParserParser.ExpCollectContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#commonFunction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitCommonFunction(RuleParserParser.CommonFunctionContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#exprCondition}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExprCondition(RuleParserParser.ExprConditionContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#expressionBody}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitExpressionBody(RuleParserParser.ExpressionBodyContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#percent}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitPercent(RuleParserParser.PercentContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#leftParen}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitLeftParen(RuleParserParser.LeftParenContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#rightParen}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRightParen(RuleParserParser.RightParenContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#colon}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitColon(RuleParserParser.ColonContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#join}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitJoin(RuleParserParser.JoinContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#right}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitRight(RuleParserParser.RightContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#other}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOther(RuleParserParser.OtherContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#actions}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitActions(RuleParserParser.ActionsContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#action}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAction(RuleParserParser.ActionContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#assignAction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitAssignAction(RuleParserParser.AssignActionContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#outAction}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOutAction(RuleParserParser.OutActionContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#methodInvoke}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitMethodInvoke(RuleParserParser.MethodInvokeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#functionInvoke}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitFunctionInvoke(RuleParserParser.FunctionInvokeContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#actionParameters}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitActionParameters(RuleParserParser.ActionParametersContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#beanMethod}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitBeanMethod(RuleParserParser.BeanMethodContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#complexValue}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitComplexValue(RuleParserParser.ComplexValueContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#parameter}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParameter(RuleParserParser.ParameterContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#parameterName}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitParameterName(RuleParserParser.ParameterNameContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#constant}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstant(RuleParserParser.ConstantContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#variable}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariable(RuleParserParser.VariableContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#namedVariable}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNamedVariable(RuleParserParser.NamedVariableContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#property}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitProperty(RuleParserParser.PropertyContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#variableCategory}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitVariableCategory(RuleParserParser.VariableCategoryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#namedVariableCategory}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitNamedVariableCategory(RuleParserParser.NamedVariableCategoryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#constantCategory}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitConstantCategory(RuleParserParser.ConstantCategoryContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#value}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitValue(RuleParserParser.ValueContext ctx); + /** + * Visit a parse tree produced by {@link RuleParserParser#op}. + * @param ctx the parse tree + * @return the visitor result + */ + T visitOp(RuleParserParser.OpContext ctx); +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/ScriptDecisionTableErrorListener.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/ScriptDecisionTableErrorListener.java new file mode 100644 index 0000000..8980cca --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/ScriptDecisionTableErrorListener.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import org.antlr.v4.runtime.BaseErrorListener; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Recognizer; + +/** + * @author Jacky.gao + * @since 2015年5月11日 + */ +public class ScriptDecisionTableErrorListener extends BaseErrorListener { + private StringBuffer sb; + @Override + public void syntaxError(Recognizer recognizer,Object offendingSymbol, + int line, int charPositionInLine, + String msg, RecognitionException e) { + if(sb==null){ + sb=new StringBuffer(); + } + sb.append("["+offendingSymbol+"] is invalid:"+msg); + sb.append("\r\n"); + } + public String getErrorMessage(){ + if(sb==null){ + return null; + } + return sb.toString(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorListener.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorListener.java new file mode 100644 index 0000000..5295c19 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorListener.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import org.antlr.v4.runtime.BaseErrorListener; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Recognizer; + +/** + * @author Jacky.gao + * @since 2015年2月27日 + */ +public class SyntaxErrorListener extends BaseErrorListener { + private SyntaxErrorReportor reportor; + public SyntaxErrorListener(SyntaxErrorReportor reportor) { + this.reportor=reportor; + } + @Override + public void syntaxError(Recognizer recognizer, + Object offendingSymbol, int line, int charPositionInLine, + String msg, RecognitionException e) { + this.reportor.addError(line, charPositionInLine, offendingSymbol, msg); + //super.syntaxError(recognizer, offendingSymbol, line, charPositionInLine, msg, e); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorReportor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorReportor.java new file mode 100644 index 0000000..e748698 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/SyntaxErrorReportor.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月27日 + */ +public class SyntaxErrorReportor { + private List errorList=new ArrayList(); + public void addError(int line,int charPositionInLine,Object offendingSymbol,String msg){ + errorList.add(line+"行,"+charPositionInLine+"列,"+offendingSymbol+"字符处,存在语法错误:"+msg); + } + public String getSyntaxErrorMessage(){ + StringBuffer sb=new StringBuffer(); + for(String msg:errorList){ + sb.append(msg); + sb.append("\n"); + } + return sb.toString(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/AbstractContextBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/AbstractContextBuilder.java new file mode 100644 index 0000000..306c3a0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/AbstractContextBuilder.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + + + +/** + * @author Jacky.gao + * @since 2015年2月15日 + */ +public abstract class AbstractContextBuilder implements ContextBuilder { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ActionContextBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ActionContextBuilder.java new file mode 100644 index 0000000..2cb2dd3 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ActionContextBuilder.java @@ -0,0 +1,133 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.*; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.*; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import com.itheima.sfbx.framework.rule.model.rule.lhs.LeftType; +import org.antlr.v4.runtime.ParserRuleContext; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年2月15日 + */ +public class ActionContextBuilder extends AbstractContextBuilder implements ApplicationContextAware{ + private Collection functionDescriptors; + @Override + public Action build(ParserRuleContext context) { + ActionContext ctx=(ActionContext)context; + if(ctx.outAction()!=null){ + return buildConsolePrintAction(ctx.outAction()); + }else if(ctx.assignAction()!=null){ + return buildVariableAssignAction(ctx.assignAction()); + }else if(ctx.methodInvoke()!=null){ + return buildExecuteMethodAction(ctx.methodInvoke()); + }else if(ctx.commonFunction()!=null){ + return buildExecuteCommonFunctionAction(ctx.commonFunction()); + } + return null; + } + + private ExecuteCommonFunctionAction buildExecuteCommonFunctionAction(CommonFunctionContext context){ + ExecuteCommonFunctionAction action=new ExecuteCommonFunctionAction(); + String nameorlabel=context.Identifier().getText(); + for(FunctionDescriptor fun:functionDescriptors){ + if(nameorlabel.equals(fun.getName())){ + action.setName(fun.getName()); + action.setLabel(fun.getLabel()); + break; + }else if(nameorlabel.equals(fun.getLabel())){ + action.setName(fun.getName()); + action.setLabel(fun.getLabel()); + break; + } + } + if(action.getName()==null){ + throw new RuleException("Function["+nameorlabel+"] not exist."); + } + ComplexValueContext value=context.complexValue(); + CommonFunctionParameter param=new CommonFunctionParameter(); + param.setObjectParameter(BuildUtils.buildValue(value)); + PropertyContext propertyContext=context.property(); + if(propertyContext!=null){ + param.setProperty(propertyContext.getText()); + } + action.setParameter(param); + return action; + } + + private ExecuteMethodAction buildExecuteMethodAction(MethodInvokeContext context){ + ExecuteMethodAction action=new ExecuteMethodAction(); + BeanMethodContext methodContext=context.beanMethod(); + action.setBeanLabel(methodContext.getChild(0).getText()); + action.setMethodLabel(methodContext.getChild(2).getText()); + ActionParametersContext parametersContext=context.actionParameters(); + if(parametersContext!=null){ + for(ComplexValueContext ctx:parametersContext.complexValue()){ + Parameter parameter=new Parameter(); + parameter.setValue(BuildUtils.buildValue(ctx)); + action.addParameter(parameter); + } + } + return action; + } + + private VariableAssignAction buildVariableAssignAction(AssignActionContext context){ + VariableAssignAction action=new VariableAssignAction(); + ParameterContext parameterContext=context.parameter(); + NamedVariableContext namedVariableContext=context.namedVariable(); + if(namedVariableContext!=null){ + action.setReferenceName(namedVariableContext.namedVariableCategory().getText()); + action.setVariableLabel(namedVariableContext.property().getText()); + action.setType(LeftType.NamedReference); + }else if(parameterContext==null){ + action.setVariableCategory(context.variable().variableCategory().getText()); + action.setVariableLabel(context.variable().property().getText()); + }else{ + action.setVariableCategory(VariableCategory.PARAM_CATEGORY); + action.setVariableLabel(parameterContext.Identifier().getText()); + } + action.setValue(BuildUtils.buildValue(context.complexValue())); + return action; + } + + private ConsolePrintAction buildConsolePrintAction(OutActionContext context){ + ConsolePrintAction action=new ConsolePrintAction(); + Value value=BuildUtils.buildValue(context.complexValue()); + action.setValue(value); + return action; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + functionDescriptors=applicationContext.getBeansOfType(FunctionDescriptor.class).values(); + } + @Override + public boolean support(ParserRuleContext context) { + return context instanceof ActionContext; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/BuildUtils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/BuildUtils.java new file mode 100644 index 0000000..a615621 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/BuildUtils.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.*; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNode; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年6月1日 + */ +public class BuildUtils { + public static AbstractValue buildValue(ComplexValueContext context){ + AbstractValue value=null; + if(context.leftParen()!=null){ + ParenValue pv=new ParenValue(); + List values=context.complexValue(); + Value v=buildValue(values.get(0)); + pv.setValue(v); + value=pv; + }else if(context.value()!=null){ + value=buildSimpleValue(context.value()); + }else if(context.variable()!=null){ + value=buildVariableValue(context.variable()); + }else if(context.constant()!=null){ + value=buildConstantValue(context.constant()); + }else if(context.variableCategory()!=null){ + VariableCategoryContext vcc=context.variableCategory(); + String name=vcc.Identifier().getText(); + value=new VariableCategoryValue(name); + }else if(context.parameter()!=null){ + ParameterContext parameterContext=context.parameter(); + ParameterValue parameterValue=new ParameterValue(); + parameterValue.setVariableLabel(parameterContext.Identifier().getText()); + value=parameterValue; + }else if(context.namedVariable()!=null){ + NamedVariableContext namedVariableContext=context.namedVariable(); + String refName=namedVariableContext.namedVariableCategory().getText(); + String property=namedVariableContext.property().getText(); + NamedReferenceValue refValue=new NamedReferenceValue(); + refValue.setReferenceName(refName); + refValue.setPropertyLabel(property); + value=refValue; + }else if(context.methodInvoke()!=null){ + MethodInvokeContext actionContext=(MethodInvokeContext)context.methodInvoke(); + MethodValue mv=new MethodValue(); + BeanMethodContext beanMethodContext=actionContext.beanMethod(); + String beanLabel=beanMethodContext.Identifier(0).getText(); + String methodLabel=beanMethodContext.Identifier(1).getText(); + mv.setBeanLabel(beanLabel); + mv.setMethodLabel(methodLabel); + ActionParametersContext actionParametersContext=actionContext.actionParameters(); + if(actionParametersContext!=null && actionParametersContext.complexValue()!=null){ + List values=actionParametersContext.complexValue(); + List parameters=new ArrayList(); + for(ComplexValueContext cvx:values){ + Parameter parameter=new Parameter(); + parameter.setValue(buildValue(cvx)); + parameters.add(parameter); + } + mv.setParameters(parameters); + } + value=mv; + }else if(context.commonFunction()!=null){ + CommonFunctionContext commonFunctionContext=context.commonFunction(); + Collection functionDescriptors=Utils.getApplicationContext().getBeansOfType(FunctionDescriptor.class).values(); + CommonFunctionValue functionValue=new CommonFunctionValue(); + String nameorlabel=commonFunctionContext.Identifier().getText(); + for(FunctionDescriptor fun:functionDescriptors){ + if(nameorlabel.equals(fun.getName())){ + functionValue.setName(fun.getName()); + functionValue.setLabel(fun.getLabel()); + break; + }else if(nameorlabel.equals(fun.getLabel())){ + functionValue.setName(fun.getName());; + functionValue.setLabel(fun.getLabel()); + break; + } + } + if(functionValue.getName()==null){ + throw new RuleException("Function["+nameorlabel+"] not exist."); + } + ComplexValueContext complexValue=commonFunctionContext.complexValue(); + CommonFunctionParameter param=new CommonFunctionParameter(); + param.setObjectParameter(buildValue(complexValue)); + PropertyContext propertyContext=commonFunctionContext.property(); + if(propertyContext!=null){ + param.setProperty(propertyContext.getText()); + } + functionValue.setParameter(param); + value=functionValue; + }else if(context.complexValue()!=null){ + List values=context.complexValue(); + value=buildValue(values.get(0)); + } + List arithList=context.ARITH(); + if(arithList!=null && arithList.size()>0){ + TerminalNode arithNode=arithList.get(0); + ComplexArithmetic arith=new ComplexArithmetic(); + arith.setType(ArithmeticType.parse(arithNode.getText())); + ParseTree nextContext=context.getChild(2); + arith.setValue(buildValue((ComplexValueContext)nextContext)); + value.setArithmetic(arith); + } + return value; + } + private static ConstantValue buildConstantValue(ConstantContext context){ + ConstantValue value=new ConstantValue(); + value.setConstantCategory(context.constantCategory().Identifier().getText()); + value.setConstantLabel(context.property().getText()); + return value; + } + private static VariableValue buildVariableValue(VariableContext context){ + VariableValue value=new VariableValue(); + value.setVariableCategory(context.variableCategory().getText()); + value.setVariableLabel(context.property().getText()); + return value; + } + private static SimpleValue buildSimpleValue(ValueContext context){ + SimpleValue value=new SimpleValue(); + if(context.STRING()!=null){ + value.setContent(getSTRINGContent(context.STRING())); + }else if(context.Boolean()!=null){ + value.setContent(context.Boolean().getText()); + }else if(context.NUMBER()!=null){ + value.setContent(context.NUMBER().getText()); + } + return value; + } + + public static String getSTRINGContent(TerminalNode node){ + String text=node.getText(); + return text.substring(1,text.length()-1); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ContextBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ContextBuilder.java new file mode 100644 index 0000000..9c1c8c3 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/ContextBuilder.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import org.antlr.v4.runtime.ParserRuleContext; + +/** + * @author Jacky.gao + * @since 2015年2月15日 + */ +public interface ContextBuilder { + Object build(ParserRuleContext context); + boolean support(ParserRuleContext context); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/CriteriaContextBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/CriteriaContextBuilder.java new file mode 100644 index 0000000..9557f5c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/CriteriaContextBuilder.java @@ -0,0 +1,308 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.DSLUtils; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.*; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import org.antlr.v4.runtime.ParserRuleContext; +import org.antlr.v4.runtime.tree.ParseTree; +import org.antlr.v4.runtime.tree.TerminalNode; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月15日 + */ +public class CriteriaContextBuilder extends AbstractContextBuilder implements ApplicationContextAware{ + private Collection functionDescriptors; + @Override + public Criteria build(ParserRuleContext context) { + SingleConditionContext ctx=(SingleConditionContext)context; + ConditionLeftContext conditionLeftContext=ctx.conditionLeft(); + VariableContext variableContext=conditionLeftContext.variable(); + ParameterContext parameterContext=conditionLeftContext.parameter(); + FunctionInvokeContext functionInvokeContext=conditionLeftContext.functionInvoke(); + CommonFunctionContext commonFunctionContext=conditionLeftContext.commonFunction(); + MethodInvokeContext methodInvokeContext=conditionLeftContext.methodInvoke(); + ExpEvalContext expEvalContext=conditionLeftContext.expEval(); + ExpAllContext expAllContext=conditionLeftContext.expAll(); + ExpExistsContext expExistsContext=conditionLeftContext.expExists(); + ExpCollectContext expCollectContext=conditionLeftContext.expCollect(); + + Criteria criteria=new Criteria(); + Left left=new Left(); + LeftPart leftPart=null; + String variableCategory=null; + String variableLabel=null; + if(variableContext!=null){ + variableCategory=variableContext.variableCategory().Identifier().getText(); + variableLabel=variableContext.property().getText(); + VariableLeftPart part = new VariableLeftPart(); + part.setVariableCategory(variableCategory); + part.setVariableLabel(variableLabel); + left.setType(LeftType.variable); + leftPart=part; + }else if(parameterContext!=null){ + variableCategory=VariableCategory.PARAM_CATEGORY; + variableLabel=parameterContext.Identifier().getText(); + VariableLeftPart part = new VariableLeftPart(); + part.setVariableCategory(variableCategory); + part.setVariableLabel(variableLabel); + left.setType(LeftType.variable); + leftPart=part; + }else if(functionInvokeContext!=null){ + FunctionLeftPart part=new FunctionLeftPart(); + String name=functionInvokeContext.Identifier().getText(); + ActionParametersContext parametersContext = functionInvokeContext.actionParameters(); + if(parametersContext!=null){ + List parameters=new ArrayList(); + for(ComplexValueContext complexValueContext:parametersContext.complexValue()){ + Parameter parameter=new Parameter(); + parameter.setValue(BuildUtils.buildValue(complexValueContext)); + parameters.add(parameter); + } + part.setParameters(parameters); + } + part.setName(name); + left.setType(LeftType.function); + leftPart=part; + }else if(commonFunctionContext!=null){ + CommonFunctionLeftPart part=new CommonFunctionLeftPart(); + String nameorlabel=commonFunctionContext.Identifier().getText(); + for(FunctionDescriptor fun:functionDescriptors){ + if(nameorlabel.equals(fun.getName())){ + part.setName(fun.getName()); + part.setLabel(fun.getLabel()); + break; + }else if(nameorlabel.equals(fun.getLabel())){ + part.setName(fun.getName()); + part.setLabel(fun.getLabel()); + break; + } + } + if(part.getName()==null){ + throw new RuleException("Function["+nameorlabel+"] not exist."); + } + ComplexValueContext value=commonFunctionContext.complexValue(); + CommonFunctionParameter param=new CommonFunctionParameter(); + param.setObjectParameter(BuildUtils.buildValue(value)); + PropertyContext propertyContext=commonFunctionContext.property(); + if(propertyContext!=null){ + param.setProperty(propertyContext.getText()); + } + part.setParameter(param); + left.setType(LeftType.commonfunction); + leftPart=part; + }else if(methodInvokeContext!=null){ + MethodLeftPart part=new MethodLeftPart(); + BeanMethodContext beanMethodContext=methodInvokeContext.beanMethod(); + String beanLabel=beanMethodContext.Identifier(0).getText(); + String methodLabel=beanMethodContext.Identifier(1).getText(); + part.setBeanLabel(beanLabel); + part.setMethodLabel(methodLabel); + ActionParametersContext parametersContext=methodInvokeContext.actionParameters(); + if(parametersContext!=null){ + List parameters=new ArrayList(); + for(ComplexValueContext complexValueContext:parametersContext.complexValue()){ + Parameter parameter=new Parameter(); + parameter.setValue(BuildUtils.buildValue(complexValueContext)); + parameters.add(parameter); + } + part.setParameters(parameters); + } + left.setType(LeftType.method); + leftPart=part; + }else if(expEvalContext!=null){ + EvalLeftPart part=new EvalLeftPart(); + ExpressionBodyContext bodyContext=expEvalContext.expressionBody(); + part.setExpression(bodyContext.getText()); + left.setType(LeftType.eval); + leftPart=part; + }else if(expAllContext!=null){ + AllLeftPart part=new AllLeftPart(); + VariableContext vc=expAllContext.variable(); + ParameterContext pc=expAllContext.parameter(); + if(vc!=null){ + part.setVariableCategory(vc.variableCategory().getText()); + part.setVariableLabel(vc.property().getText()); + }else if(pc!=null){ + part.setVariableCategory(VariableCategory.PARAM_CATEGORY); + part.setVariableLabel(pc.Identifier().getText()); + } + TerminalNode numberNode=expAllContext.NUMBER(); + PercentContext percentContext=expAllContext.percent(); + if(numberNode!=null){ + part.setAmount(Integer.valueOf(numberNode.getText())); + part.setStatisticType(StatisticType.amount); + }else if(percentContext!=null){ + part.setPercent(Integer.valueOf(percentContext.NUMBER().getText())); + part.setStatisticType(StatisticType.percent); + }else{ + part.setStatisticType(StatisticType.none); + } + ExprConditionContext conditionContext=expAllContext.exprCondition(); + MultiCondition condition=buildMultiCondition(conditionContext); + part.setMultiCondition(condition); + left.setType(LeftType.all); + leftPart=part; + }else if(expExistsContext!=null){ + ExistLeftPart part=new ExistLeftPart(); + VariableContext vc=expExistsContext.variable(); + ParameterContext pc=expExistsContext.parameter(); + if(vc!=null){ + part.setVariableCategory(vc.variableCategory().getText()); + part.setVariableLabel(vc.property().getText()); + }else if(pc!=null){ + part.setVariableCategory(VariableCategory.PARAM_CATEGORY); + part.setVariableLabel(pc.Identifier().getText()); + } + TerminalNode numberNode=expExistsContext.NUMBER(); + PercentContext percentContext=expExistsContext.percent(); + if(numberNode!=null){ + part.setAmount(Integer.valueOf(numberNode.getText())); + part.setStatisticType(StatisticType.amount); + }else if(percentContext!=null){ + part.setPercent(Integer.valueOf(percentContext.NUMBER().getText())); + part.setStatisticType(StatisticType.percent); + }else{ + part.setStatisticType(StatisticType.none); + } + ExprConditionContext conditionContext=expExistsContext.exprCondition(); + MultiCondition condition=buildMultiCondition(conditionContext); + part.setMultiCondition(condition); + left.setType(LeftType.exist); + leftPart=part; + }else if(expCollectContext!=null){ + CollectLeftPart part=new CollectLeftPart(); + VariableContext vc=expCollectContext.variable(); + ParameterContext pc=expCollectContext.parameter(); + if(vc!=null){ + part.setVariableCategory(vc.variableCategory().getText()); + part.setVariableLabel(vc.property().getText()); + }else if(pc!=null){ + part.setVariableCategory(VariableCategory.PARAM_CATEGORY); + part.setVariableLabel(pc.Identifier().getText()); + } + ExprConditionContext conditionContext=expCollectContext.exprCondition(); + if(conditionContext!=null){ + MultiCondition condition=buildMultiCondition(conditionContext); + part.setMultiCondition(condition); + } + if(expCollectContext.property()!=null){ + part.setProperty(expCollectContext.property().getText()); + if(expCollectContext.SUM()!=null){ + part.setPurpose(CollectPurpose.sum); + }else if(expCollectContext.MAX()!=null){ + part.setPurpose(CollectPurpose.max); + }else if(expCollectContext.MIN()!=null){ + part.setPurpose(CollectPurpose.min); + }else if(expCollectContext.AVG()!=null){ + part.setPurpose(CollectPurpose.avg); + } + }else{ + part.setPurpose(CollectPurpose.count); + } + left.setType(LeftType.collect); + leftPart=part; + } + left.setLeftPart(leftPart); + criteria.setLeft(left); + Op op=DSLUtils.parseOp(ctx.op()); + criteria.setOp(op); + NullValueContext nullValueContext=ctx.nullValue(); + if(nullValueContext!=null){ + if(op.equals(Op.Equals)){ + criteria.setOp(Op.Null); + }else if(op.equals(Op.NotEquals)){ + criteria.setOp(Op.NotNull); + }else{ + throw new RuleException("'null' value only support '==' or '!=' operator."); + } + }else{ + criteria.setValue(BuildUtils.buildValue(ctx.complexValue())); + } + return criteria; + } + + private MultiCondition buildMultiCondition(ExprConditionContext conditionContext){ + MultiCondition multiCondition=new MultiCondition(); + buildPropertyCriteria(conditionContext,multiCondition); + return multiCondition; + } + + private void buildPropertyCriteria(ExprConditionContext conditionContext,MultiCondition multiCondition) { + List joins=conditionContext.join(); + if(joins==null || joins.size()==0){ + multiCondition.addCondition(newPropertyCriteria(conditionContext)); + }else{ + JoinContext joinContext=joins.get(0); + if(joinContext.AND()!=null){ + multiCondition.setType(JunctionType.and); + }else{ + multiCondition.setType(JunctionType.or); + } + List children=conditionContext.children; + for(ParseTree parseTree:children){ + if(parseTree instanceof ExprConditionContext){ + ExprConditionContext ecc=(ExprConditionContext)parseTree; + if(ecc.property()==null){ + buildPropertyCriteria(ecc,multiCondition); + }else{ + multiCondition.addCondition(newPropertyCriteria(ecc)); + } + } + } + } + } + + private PropertyCriteria newPropertyCriteria(ExprConditionContext conditionContext) { + String property=conditionContext.property().getText(); + PropertyCriteria pc=new PropertyCriteria(); + pc.setProperty(property); + Op op=DSLUtils.parseOp(conditionContext.op()); + pc.setOp(op); + ComplexValueContext complexValueContext=conditionContext.complexValue(); + NullValueContext nullValueContext=conditionContext.nullValue(); + if(nullValueContext!=null && !op.equals(Op.Equals) && !op.equals(Op.NotEquals)){ + throw new RuleException("'$null' value only support '==' or '!=' operator."); + }else{ + pc.setValue(BuildUtils.buildValue(complexValueContext)); + } + return pc; + } + + @Override + public boolean support(ParserRuleContext context) { + return context instanceof SingleConditionContext; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + functionDescriptors=applicationContext.getBeansOfType(FunctionDescriptor.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/LibraryContextBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/LibraryContextBuilder.java new file mode 100644 index 0000000..73ee92b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/LibraryContextBuilder.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.ResourceContext; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import org.antlr.v4.runtime.ParserRuleContext; + +/** + * @author Jacky.gao + * @since 2015年2月15日 + */ +public class LibraryContextBuilder extends AbstractContextBuilder { + + @Override + public Library build(ParserRuleContext context) { + ResourceContext ctx=(ResourceContext)context; + if(ctx.importActionLibrary()!=null){ + String path=BuildUtils.getSTRINGContent(ctx.importActionLibrary().STRING()); + return new Library(path,null,LibraryType.Action); + }else if(ctx.importConstantLibrary()!=null){ + String path=BuildUtils.getSTRINGContent(ctx.importConstantLibrary().STRING()); + return new Library(path,null,LibraryType.Constant); + }else if(ctx.importVariableLibrary()!=null){ + String path=BuildUtils.getSTRINGContent(ctx.importVariableLibrary().STRING()); + return new Library(path,null,LibraryType.Variable); + }else if(ctx.importParameterLibrary()!=null){ + String path=BuildUtils.getSTRINGContent(ctx.importParameterLibrary().STRING()); + return new Library(path,null,LibraryType.Parameter); + } + throw new RuleException("Unsupport context "+ctx.getClass().getName()+""); + } + + @Override + public boolean support(ParserRuleContext context) { + return context instanceof ResourceContext; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/NamedConditionBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/NamedConditionBuilder.java new file mode 100644 index 0000000..c6b813f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/dsl/builder/NamedConditionBuilder.java @@ -0,0 +1,101 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.dsl.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.DSLUtils; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser.*; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月15日 + */ +public class NamedConditionBuilder { + public CriteriaUnit buildNamedCriteria(NamedConditionContext namedConditionContext,String variableCategory){ + CriteriaUnit unit=null; + if(namedConditionContext instanceof MultiNamedConditionsContext){ + unit=visitMultiNamedConditions((MultiNamedConditionsContext)namedConditionContext, variableCategory); + }else if(namedConditionContext instanceof SingleNamedConditionsContext){ + unit=visitSingleNamedConditions((SingleNamedConditionsContext)namedConditionContext, variableCategory); + }else if(namedConditionContext instanceof ParenNamedConditionsContext){ + unit=visitParenNamedConditions((ParenNamedConditionsContext)namedConditionContext, variableCategory); + }else{ + throw new RuleException("Unsupport context : +namedConditionContext+"); + } + return unit; + } + + private CriteriaUnit visitSingleNamedConditions(SingleNamedConditionsContext ctx,String variableCategory) { + Criteria criteria=new Criteria(); + VariableLeftPart leftPart=new VariableLeftPart(); + Left left=new Left(); + left.setLeftPart(leftPart); + left.setType(LeftType.NamedReference); + criteria.setLeft(left); + String variableName=ctx.property().getText(); + leftPart.setVariableLabel(variableName); + leftPart.setVariableCategory(variableCategory); + Op op=DSLUtils.parseOp(ctx.op()); + criteria.setOp(op); + if(ctx.complexValue()==null){ + if(op.equals(Op.Equals)){ + criteria.setOp(Op.Null); + }else if(op.equals(Op.NotEquals)){ + criteria.setOp(Op.NotNull); + }else{ + throw new RuleException("'null' value only support '==' or '!=' operator."); + } + }else{ + criteria.setValue(BuildUtils.buildValue(ctx.complexValue())); + } + CriteriaUnit unit=new CriteriaUnit(); + unit.setCriteria(criteria); + return unit; + } + private CriteriaUnit visitMultiNamedConditions(MultiNamedConditionsContext ctx,String variableCategory) { + List nextUnits=new ArrayList(); + List namedConditions=ctx.namedCondition(); + if(namedConditions!=null){ + for(int i=0;i extends JsonDeserializer { + protected Rule parseRule(JsonParser jsonParser,JsonNode node){ + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + try { + JsonNode ruleNode=node.get("rule"); + if(ruleNode==null){ + ruleNode=node; + } + Rule rule=null; + String scoringTypeStr=JsonUtils.getJsonValue(ruleNode, "scoringType"); + if(StringUtils.isNotBlank(scoringTypeStr)){ + ScoringType scoringType=ScoringType.valueOf(scoringTypeStr); + ScoreRule scoreRule=new ScoreRule(); + scoreRule.setScoringType(scoringType); + buildScoreRule(jsonParser,ruleNode,scoreRule); + rule=scoreRule; + }else{ + String loopRuleStr=JsonUtils.getJsonValue(ruleNode, "loopRule"); + if(loopRuleStr!=null){ + boolean isLoopRule=Boolean.valueOf(loopRuleStr); + if(isLoopRule){ + LoopRule loopRule=new LoopRule(); + buildLoopRule(ruleNode, loopRule); + rule=loopRule; + }else{ + rule=new Rule(); + } + }else{ + rule=new Rule(); + } + } + rule.setActivationGroup(JsonUtils.getJsonValue(ruleNode, "activationGroup")); + rule.setAgendaGroup(JsonUtils.getJsonValue(ruleNode, "agendaGroup")); + String autoFocus=JsonUtils.getJsonValue(ruleNode, "autoFocus"); + if(autoFocus!=null){ + rule.setAutoFocus(Boolean.valueOf(autoFocus)); + } + String loop=JsonUtils.getJsonValue(ruleNode, "loop"); + if(loop!=null){ + rule.setLoop(Boolean.valueOf(loop)); + } + String effectiveDateText=JsonUtils.getJsonValue(ruleNode, "effectiveDate"); + if(effectiveDateText!=null){ + rule.setEffectiveDate(sd.parse(effectiveDateText)); + } + String enabled=JsonUtils.getJsonValue(ruleNode, "enabled"); + if(enabled!=null){ + rule.setEnabled(Boolean.valueOf(enabled)); + } + String expiresDateText=JsonUtils.getJsonValue(ruleNode, "expiresDate"); + if(expiresDateText!=null){ + rule.setExpiresDate(sd.parse(expiresDateText)); + } + rule.setName(JsonUtils.getJsonValue(ruleNode, "name")); + rule.setRuleflowGroup(JsonUtils.getJsonValue(ruleNode, "ruleflowGroup")); + String salienceText=JsonUtils.getJsonValue(ruleNode, "salience"); + if(salienceText!=null){ + rule.setSalience(Integer.valueOf(salienceText)); + } + Rhs rhs=new Rhs(); + rule.setRhs(rhs); + JsonNode rhsNode=ruleNode.get("rhs"); + if(rhsNode!=null){ + rhs.setActions(parseActions(rhsNode)); + } + + JsonNode otherNode=ruleNode.get("other"); + if(otherNode!=null){ + Other other=new Other(); + rule.setOther(other); + other.setActions(parseActions(otherNode)); + } + return rule; + } catch (ParseException e) { + throw new RuleException(e); + } + } + + private void buildScoreRule(JsonParser jsonParser,JsonNode ruleNode,ScoreRule rule){ + rule.setScoringBean(JsonUtils.getJsonValue(ruleNode, "scoringBean")); + AssignTargetType assignTargetType=AssignTargetType.valueOf(JsonUtils.getJsonValue(ruleNode, "assignTargetType")); + rule.setAssignTargetType(assignTargetType); + rule.setVariableCategory(JsonUtils.getJsonValue(ruleNode, "variableCategory")); + rule.setVariableName(JsonUtils.getJsonValue(ruleNode, "variableName")); + rule.setVariableLabel(JsonUtils.getJsonValue(ruleNode, "variableLabel")); + String datatypeStr=JsonUtils.getJsonValue(ruleNode, "datatype"); + if(StringUtils.isNotBlank(datatypeStr)){ + rule.setDatatype(Datatype.valueOf(datatypeStr)); + } + try{ + JsonNode knowledgePackageWrapperNode=ruleNode.get("knowledgePackageWrapper"); + ObjectMapper mapper = (ObjectMapper)jsonParser.getCodec(); + KnowledgePackageWrapper wrapper=mapper.readValue(knowledgePackageWrapperNode, KnowledgePackageWrapper.class); + wrapper.buildDeserialize(); + rule.setKnowledgePackageWrapper(wrapper); + }catch(Exception ex){ + throw new RuleException(ex); + } + + } + + private void buildLoopRule(JsonNode ruleNode,LoopRule rule){ + JsonNode targetNode=ruleNode.get("loopTarget"); + if(targetNode!=null){ + LoopTarget target=new LoopTarget(); + Value value=JsonUtils.parseValue(targetNode); + target.setValue(value); + rule.setLoopTarget(target); + } + JsonNode loopStartNode=ruleNode.get("loopStart"); + if(loopStartNode!=null){ + List actions=parseActions(loopStartNode); + LoopStart start=new LoopStart(); + start.setActions(actions); + rule.setLoopStart(start); + } + JsonNode loopEndNode=ruleNode.get("loopEnd"); + if(loopEndNode!=null){ + List actions=parseActions(loopEndNode); + LoopEnd end=new LoopEnd(); + end.setActions(actions); + rule.setLoopEnd(end); + } + JsonNode knowledgeWrapper=ruleNode.get("knowledgePackageWrapper"); + if(knowledgeWrapper!=null){ + KnowledgePackageWrapper wrapper=JsonUtils.parseKnowledgePackageWrapper(knowledgeWrapper.toString()); + rule.setKnowledgePackageWrapper(wrapper); + } + } + + private List parseActions(JsonNode node){ + List actions=new ArrayList(); + JsonNode nodes=node.get("actions"); + if(nodes==null)return actions; + Iterator iter=nodes.iterator(); + while(iter.hasNext()){ + JsonNode jsonNode=iter.next(); + ActionType actionType=ActionType.valueOf(JsonUtils.getJsonValue(jsonNode, "actionType")); + switch(actionType){ + case ConsolePrint: + ConsolePrintAction console=new ConsolePrintAction(); + console.setValue(JsonUtils.parseValue(jsonNode)); + console.setPriority(Integer.valueOf(JsonUtils.getJsonValue(jsonNode, "priority"))); + actions.add(console); + break; + case ExecuteMethod: + ExecuteMethodAction method=new ExecuteMethodAction(); + method.setBeanId(JsonUtils.getJsonValue(jsonNode, "beanId")); + method.setBeanLabel(JsonUtils.getJsonValue(jsonNode, "beanLabel")); + method.setMethodLabel(JsonUtils.getJsonValue(jsonNode, "methodLabel")); + method.setPriority(Integer.valueOf(JsonUtils.getJsonValue(jsonNode, "priority"))); + method.setMethodName(JsonUtils.getJsonValue(jsonNode, "methodName")); + method.setParameters(JsonUtils.parseParameters(jsonNode)); + actions.add(method); + break; + case VariableAssign: + VariableAssignAction assign=new VariableAssignAction(); + String type=JsonUtils.getJsonValue(jsonNode, "type"); + if(type!=null){ + assign.setType(LeftType.valueOf(type)); + } + assign.setReferenceName(JsonUtils.getJsonValue(jsonNode, "referenceName")); + assign.setDatatype(Datatype.valueOf(JsonUtils.getJsonValue(jsonNode, "datatype"))); + assign.setVariableCategory(JsonUtils.getJsonValue(jsonNode, "variableCategory")); + assign.setVariableLabel(JsonUtils.getJsonValue(jsonNode, "variableLabel")); + assign.setVariableName(JsonUtils.getJsonValue(jsonNode, "variableName")); + assign.setPriority(Integer.valueOf(JsonUtils.getJsonValue(jsonNode, "priority"))); + assign.setValue(JsonUtils.parseValue(jsonNode)); + actions.add(assign); + break; + case ExecuteCommonFunction: + ExecuteCommonFunctionAction ca=new ExecuteCommonFunctionAction(); + ca.setLabel(JsonUtils.getJsonValue(jsonNode, "label")); + ca.setName(JsonUtils.getJsonValue(jsonNode, "name")); + ca.setParameter(JsonUtils.parseCommonFunctionParameter(jsonNode)); + ca.setPriority(Integer.valueOf(JsonUtils.getJsonValue(jsonNode, "priority"))); + actions.add(ca); + break; + case Scoring: + int rowNumber=Integer.valueOf(JsonUtils.getJsonValue(jsonNode, "rowNumber")); + String name=JsonUtils.getJsonValue(jsonNode, "name"); + String weight=JsonUtils.getJsonValue(jsonNode, "weight"); + ScoringAction sa=new ScoringAction(rowNumber, name, weight); + sa.setValue(JsonUtils.parseValue(jsonNode)); + actions.add(sa); + break; + } + } + return actions; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/ExposeAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/ExposeAction.java new file mode 100644 index 0000000..28a1a03 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/ExposeAction.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Jacky.gao + * @since 2015年10月20日 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ExposeAction { + public String value(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/GeneralEntity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/GeneralEntity.java new file mode 100644 index 0000000..c2a922d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/GeneralEntity.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model; + +import com.itheima.sfbx.framework.rule.RuleException; +import org.apache.commons.lang.StringUtils; + +import java.util.HashMap; + +/** + * @author Jacky.gao + * @since 2016年6月2日 + */ +public class GeneralEntity extends HashMap{ + private static final long serialVersionUID = 2778576006420277518L; + private String targetClass; + + public GeneralEntity(String targetClass) { + if(StringUtils.isBlank(targetClass)){ + throw new RuleException("Target class cannot be null."); + } + this.targetClass = targetClass; + } + + public String getTargetClass() { + return targetClass; + } + + @Override + public boolean equals(Object other) { + boolean classEquals=false; + if(other instanceof GeneralEntity){ + GeneralEntity entity=(GeneralEntity)other; + if(targetClass.equals(entity.getTargetClass())){ + classEquals=true; + } + } + if(classEquals){ + return super.equals(other); + } + return false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Label.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Label.java new file mode 100644 index 0000000..f45e4ec --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Label.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Jacky.gao + * @since 2016年6月2日 + */ +@Target(ElementType.FIELD) +@Retention(RetentionPolicy.RUNTIME) +public @interface Label { + String value(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Node.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Node.java new file mode 100644 index 0000000..1317f7a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/Node.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model; + + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public interface Node { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/RuleJsonDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/RuleJsonDeserializer.java new file mode 100644 index 0000000..6ba7bad --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/RuleJsonDeserializer.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model; + +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.JsonParser; +import org.codehaus.jackson.JsonProcessingException; +import org.codehaus.jackson.ObjectCodec; +import org.codehaus.jackson.map.DeserializationContext; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年10月21日 + */ +public class RuleJsonDeserializer extends AbstractJsonDeserializer>{ + @Override + public List deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { + ObjectCodec oc = jp.getCodec(); + JsonNode jsonNode = oc.readTree(jp); + Iterator childrenNodesIter=jsonNode.getElements(); + List rules=new ArrayList(); + while(childrenNodesIter.hasNext()){ + JsonNode childNode=childrenNodesIter.next(); + rules.add(parseRule(jp,childNode)); + } + return rules; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ActionTreeNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ActionTreeNode.java new file mode 100644 index 0000000..c589f74 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ActionTreeNode.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; + +import com.itheima.sfbx.framework.rule.action.Action; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class ActionTreeNode extends TreeNode{ + private List actions; + + public List getActions() { + return actions; + } + + public void setActions(List actions) { + this.actions = actions; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ConditionTreeNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ConditionTreeNode.java new file mode 100644 index 0000000..518ca92 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/ConditionTreeNode.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; + +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.Value; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class ConditionTreeNode extends TreeNode{ + private Value value; + private Op op; + private List conditionTreeNodes; + private List variableTreeNodes; + private List actionTreeNodes; + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } + public Op getOp() { + return op; + } + public void setOp(Op op) { + this.op = op; + } + public List getConditionTreeNodes() { + return conditionTreeNodes; + } + public void setConditionTreeNodes(List conditionTreeNodes) { + this.conditionTreeNodes = conditionTreeNodes; + } + public List getVariableTreeNodes() { + return variableTreeNodes; + } + public void setVariableTreeNodes(List variableTreeNodes) { + this.variableTreeNodes = variableTreeNodes; + } + public List getActionTreeNodes() { + return actionTreeNodes; + } + public void setActionTreeNodes(List actionTreeNodes) { + this.actionTreeNodes = actionTreeNodes; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/DecisionTree.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/DecisionTree.java new file mode 100644 index 0000000..0e5fd23 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/DecisionTree.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; + +import com.itheima.sfbx.framework.rule.model.rule.Library; + +import java.util.Date; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class DecisionTree { + private Integer salience; + private Date effectiveDate; + private Date expiresDate; + private Boolean enabled; + private Boolean debug; + private String remark; + private List libraries; + private VariableTreeNode variableTreeNode; + + public Integer getSalience() { + return salience; + } + public void setSalience(Integer salience) { + this.salience = salience; + } + public Date getEffectiveDate() { + return effectiveDate; + } + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + public Date getExpiresDate() { + return expiresDate; + } + public void setExpiresDate(Date expiresDate) { + this.expiresDate = expiresDate; + } + public Boolean getEnabled() { + return enabled; + } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + public Boolean getDebug() { + return debug; + } + public void setDebug(Boolean debug) { + this.debug = debug; + } + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + public VariableTreeNode getVariableTreeNode() { + return variableTreeNode; + } + public void setVariableTreeNode(VariableTreeNode variableTreeNode) { + this.variableTreeNode = variableTreeNode; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNode.java new file mode 100644 index 0000000..0540738 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNode.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; + +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public abstract class TreeNode { + @JsonIgnore + private TreeNode parentNode; + private TreeNodeType nodeType; + public void setParentNode(TreeNode parentNode) { + this.parentNode = parentNode; + } + public TreeNode getParentNode() { + return parentNode; + } + public TreeNodeType getNodeType() { + return nodeType; + } + public void setNodeType(TreeNodeType nodeType) { + this.nodeType = nodeType; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNodeType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNodeType.java new file mode 100644 index 0000000..637eca6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/TreeNodeType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; +/** + * @author Jacky.gao + * @since 2016年3月2日 + */ +public enum TreeNodeType { + condition,action,variable; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/VariableTreeNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/VariableTreeNode.java new file mode 100644 index 0000000..5f30d76 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/decisiontree/VariableTreeNode.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.decisiontree; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Left; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class VariableTreeNode extends TreeNode{ + private Left left; + private List conditionTreeNodes; + public Left getLeft() { + return left; + } + public void setLeft(Left left) { + this.left = left; + } + public List getConditionTreeNodes() { + return conditionTreeNodes; + } + public void setConditionTreeNodes(List conditionTreeNodes) { + this.conditionTreeNodes = conditionTreeNodes; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ActionNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ActionNode.java new file mode 100644 index 0000000..96eca1d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ActionNode.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; + + +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public class ActionNode extends FlowNode { + private String actionBean; + private FlowNodeType type=FlowNodeType.Action; + public ActionNode() { + } + public ActionNode(String name) { + super(name); + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter,context,instance); + FlowAction action=(FlowAction)context.getApplicationContext().getBean(actionBean); + action.execute(this,context,instance); + executeNodeEvent(EventType.leave,context,instance); + leave(null, context, instance); + } + @Override + public FlowNodeType getType() { + return type; + } + public String getActionBean() { + return actionBean; + } + public void setActionBean(String actionBean) { + this.actionBean = actionBean; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/BindingNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/BindingNode.java new file mode 100644 index 0000000..21bfc08 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/BindingNode.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public abstract class BindingNode extends FlowNode { + private KnowledgePackageWrapper knowledgePackageWrapper; + public BindingNode() { + } + public BindingNode(String name) { + super(name); + } + + protected KnowledgeSession executeKnowledgePackage(FlowContext context,ProcessInstance instance){ + KnowledgeSession parentSession=(KnowledgeSession)context.getWorkingMemory(); + List facts=parentSession.getAllFacts(); + KnowledgePackage knowledgePackage=knowledgePackageWrapper.getKnowledgePackage(); + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage,context.getDebugMessageItems()); + for(Object fact:facts){ + session.insert(fact); + } + if(knowledgePackage.getFlowMap()==null || knowledgePackage.getFlowMap().size()==0){ + RuleExecutionResponse ruleExecutionResponse=session.fireRules(context.getVariables()); + ((ExecutionResponseImpl)context.getResponse()).addRuleExecutionResponse(ruleExecutionResponse); + }else{ + String processId=knowledgePackage.getFlowMap().values().iterator().next().getId(); + FlowExecutionResponse flowExecutionResponse=session.startProcess(processId,context.getVariables()); + ((ExecutionResponseImpl)context.getResponse()).addFlowExecutionResponse(flowExecutionResponse); + } + Map parameters=session.getParameters(); + Map variables=context.getVariables(); + for(String key:parameters.keySet()){ + if(key.equals(DecisionItem.RETURN_VALUE_KEY)){ + continue; + } + variables.put(key, parameters.get(key)); + } + return session; + } + public KnowledgePackageWrapper getKnowledgePackageWrapper() { + return knowledgePackageWrapper; + } + public void setKnowledgePackageWrapper(KnowledgePackageWrapper knowledgePackageWrapper) { + this.knowledgePackageWrapper = knowledgePackageWrapper; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/Connection.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/Connection.java new file mode 100644 index 0000000..c3dae3b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/Connection.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public class Connection { + public static final String RETURN_VALUE_KEY="return_value__"; + private String name; + private String toName; + private String script; + private String g; + private KnowledgePackageWrapper knowledgePackageWrapper; + @JsonIgnore + private FlowNode to; + public boolean evaluate(FlowContext context){ + if(knowledgePackageWrapper==null){ + return true; + } + KnowledgeSession parentSession=(KnowledgeSession)context.getWorkingMemory(); + List facts=parentSession.getAllFacts(); + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackageWrapper.getKnowledgePackage(),context.getDebugMessageItems()); + for(Object fact:facts){ + session.insert(fact); + } + session.fireRules(context.getVariables()); + Object result=session.getParameter(Connection.RETURN_VALUE_KEY); + if(result==null){ + return false; + } + return Boolean.valueOf(result.toString()); + } + + public void buildDeserialize(){ + if(knowledgePackageWrapper!=null){ + knowledgePackageWrapper.buildDeserialize(); + } + } + + public void execute(FlowContext context,FlowInstance instance){ + to.enter(context, instance); + } + + public String buildDSLScript(List libraries){ + StringBuffer sb=new StringBuffer(); + if(libraries!=null){ + for(Library lib:libraries){ + String path=lib.getPath(); + if(lib.getVersion()!=null){ + path+=":"+lib.getVersion(); + } + LibraryType type=lib.getType(); + switch(type){ + case Action: + sb.append("importActionLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Constant: + sb.append("importConstantLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Parameter: + sb.append("importParameterLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Variable: + sb.append("importVariableLibrary \""+path+"\""); + sb.append("\r\n"); + break; + } + } + } + sb.append("rule \"conn\""); + sb.append("\r\n"); + sb.append("if"); + sb.append("\r\n"); + sb.append(script); + sb.append("\r\n"); + sb.append("then"); + sb.append("\r\n"); + sb.append("parameter."+RETURN_VALUE_KEY+"=true"); + sb.append("\r\n"); + sb.append("end"); + return sb.toString(); + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public String getToName() { + return toName; + } + + public void setToName(String toName) { + this.toName = toName; + } + + public FlowNode getTo() { + return to; + } + + public void setTo(FlowNode to) { + this.to = to; + } + + public String getScript() { + return script; + } + + public void setScript(String script) { + this.script = script; + } + + public KnowledgePackageWrapper getKnowledgePackageWrapper() { + return knowledgePackageWrapper; + } + public void setKnowledgePackageWrapper(KnowledgePackageWrapper knowledgePackageWrapper) { + this.knowledgePackageWrapper = knowledgePackageWrapper; + } + + public String getG() { + return g; + } + + public void setG(String g) { + this.g = g; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionItem.java new file mode 100644 index 0000000..a39491d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionItem.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class DecisionItem { + public static final String RETURN_VALUE_KEY="return_to__"; + private String script; + private int percent;//值为1-99 + private String to; + public String getScript() { + return script; + } + public void setScript(String script) { + this.script = script; + } + public String getTo() { + return to; + } + public void setTo(String to) { + this.to = to; + } + public int getPercent() { + return percent; + } + public void setPercent(int percent) { + this.percent = percent; + } + public String buildDSLScript(int index){ + StringBuffer sb=new StringBuffer(); + sb.append("rule \"r"+index+"\""); + sb.append(" "); + sb.append("if"); + sb.append(" "); + sb.append(script); + sb.append(" "); + sb.append("then"); + sb.append(" "); + sb.append("parameter."+RETURN_VALUE_KEY+"=\""+to+"\""); + sb.append(" "); + sb.append("end"); + return sb.toString(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionNode.java new file mode 100644 index 0000000..d5e1180 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/DecisionNode.java @@ -0,0 +1,164 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.logging.Logger; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class DecisionNode extends BindingNode { + private final Logger log=Logger.getLogger(DecisionNode.class.getName()); + private List items; + private FlowNodeType type=FlowNodeType.Decision; + private DecisionType decisionType=DecisionType.Criteria; + public DecisionNode() { + } + public DecisionNode(String name) { + super(name); + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + instance.setCurrentNode(this); + if(decisionType.equals(DecisionType.Criteria)){ + doCriteria(context, instance); + }else{ + doPercent(context, instance); + } + executeNodeEvent(EventType.enter, context, instance); + } + private void doPercent(FlowContext context,FlowInstance instance){ + String nodeKey=instance.getProcessDefinition().getId()+"_"+getName(); + long total=getAmount(nodeKey, context)+1; + List percentItems=new ArrayList(); + for(DecisionItem item:items){ + PercentItem percent=new PercentItem(); + percent.setName(item.getTo()); + percent.setPercent(item.getPercent()); + String itemKey=nodeKey+"."+item.getTo(); + long itemTotal=getAmount(itemKey, context); + percent.setTotal(itemTotal); + percentItems.add(percent); + } + PercentItem percentItem=computePercent(percentItems, total); + setAmount(nodeKey, total, context); + setAmount(nodeKey+"."+percentItem.getName(), percentItem.getTotal()+1, context); + executeNodeEvent(EventType.leave, context, instance); + leave(percentItem.getName(), context, instance); + } + + private long getAmount(String key,FlowContext context){ + Object value=context.getSessionValue(key); + if(value==null){ + return 0; + } + return (Long)value; + } + + private void setAmount(String key,long value,FlowContext context){ + context.setSessionValue(key, value); + } + + private void doCriteria(FlowContext context,FlowInstance instance){ + KnowledgeSession session=executeKnowledgePackage(context, instance); + executeNodeEvent(EventType.leave, context, instance); + Object to=session.getParameter(DecisionItem.RETURN_VALUE_KEY); + if(to==null){ + log.info("Decision node ["+getName()+"] no matching conditions."); + return; + } + session.getParameters().remove(DecisionItem.RETURN_VALUE_KEY); + leave(to.toString(), context, instance); + } + private PercentItem computePercent(List items,long total){ + BigDecimal totalValue=new BigDecimal(total); + for(PercentItem item:items){ + long itemTotal=item.getTotal(); + BigDecimal left=new BigDecimal(itemTotal); + BigDecimal newPercent=left.divide(totalValue,20,BigDecimal.ROUND_HALF_EVEN); + BigDecimal defaultPercent=new BigDecimal(item.getPercent()); + defaultPercent=defaultPercent.divide(new BigDecimal(100),2,BigDecimal.ROUND_HALF_EVEN); + int result=newPercent.compareTo(defaultPercent); + if(result==-1){ + return item; + } + } + return items.get(0); + } + + @Override + public FlowNodeType getType() { + return type; + } + public List getItems() { + return items; + } + public void setItems(List items) { + this.items = items; + } + public String buildDSLScript(List libraries){ + StringBuffer sb=new StringBuffer(); + if(libraries!=null){ + for(Library lib:libraries){ + String path=lib.getPath(); + if(lib.getVersion()!=null){ + path+=":"+lib.getVersion(); + } + LibraryType type=lib.getType(); + switch(type){ + case Action: + sb.append("importActionLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Constant: + sb.append("importConstantLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Parameter: + sb.append("importParameterLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Variable: + sb.append("importVariableLibrary \""+path+"\""); + sb.append("\r\n"); + break; + } + } + } + for(int i=0;i libraries; + @JsonDeserialize(using=com.itheima.sfbx.framework.rule.model.flow.FlowNodeJsonDeserializer.class) + private List nodes; + public ProcessInstance newInstance(FlowContext context){ + ExecutionResponseImpl response=(ExecutionResponseImpl)context.getResponse(); + response.setFlowId(id); + StartNode startNode=null; + for(FlowNode node:nodes){ + if(node instanceof StartNode){ + startNode=(StartNode)node; + break; + } + } + if(startNode==null){ + throw new RuleException("StartNode must be define."); + } + response.addNodeName(startNode.getName()); + FlowInstance instance=new FlowInstance(this,debug); + KnowledgeSession session=(KnowledgeSession)context.getWorkingMemory(); + session.fireEvent(new ProcessBeforeStartedEventImpl(instance,session)); + startNode.enter(context, instance); + session.fireEvent(new ProcessBeforeCompletedEventImpl(instance,session)); + return instance; + } + + public void buildConnectionToNode(){ + for(FlowNode node:nodes){ + List connections=node.getConnections(); + if(connections==null || connections.size()==0){ + continue; + } + for(Connection conn:connections){ + String nodeName=conn.getToName(); + conn.setTo(getFlowNode(nodeName)); + } + } + } + + private FlowNode getFlowNode(String nodeName){ + for(FlowNode node:nodes){ + if(node.getName().equals(nodeName)){ + return node; + } + } + throw new RuleException("Flow node ["+nodeName+"] not found."); + } + + public void initNodeKnowledgePackage(KnowledgeBuilder knowledgeBuilder,KnowledgePackageService knowledgePackageService,DSLRuleSetBuilder dslRuleSetBuilder) throws IOException{ + for(FlowNode node:nodes){ + if(node instanceof RuleNode){ + ResourceBase resourceBase=knowledgeBuilder.newResourceBase(); + RuleNode ruleNode=(RuleNode)node; + resourceBase.addResource(ruleNode.getFile(), ruleNode.getVersion()); + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(resourceBase); + KnowledgePackage knowledgePackage=knowledgeBase.getKnowledgePackage(); + ruleNode.setKnowledgePackageWrapper(new KnowledgePackageWrapper(knowledgePackage)); + }else if(node instanceof RulePackageNode){ + RulePackageNode rulePackageNode=(RulePackageNode)node; + String packageId=rulePackageNode.getProject()+"/"+rulePackageNode.getPackageId(); + KnowledgePackage knowledgePackage=knowledgePackageService.buildKnowledgePackage(packageId); + rulePackageNode.setKnowledgePackageWrapper(new KnowledgePackageWrapper(knowledgePackage)); + }else if(node instanceof DecisionNode){ + DecisionNode decisionNode=(DecisionNode)node; + if(decisionNode.getDecisionType().equals(DecisionType.Criteria)){ + String script=decisionNode.buildDSLScript(libraries); + RuleSet ruleSet=dslRuleSetBuilder.build(script); + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(ruleSet); + decisionNode.setKnowledgePackageWrapper(new KnowledgePackageWrapper(knowledgeBase.getKnowledgePackage())); + } + }else if(node instanceof ScriptNode){ + ScriptNode scriptNode=(ScriptNode)node; + String script=scriptNode.buildDSLScript(libraries); + RuleSet ruleSet=dslRuleSetBuilder.build(script); + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(ruleSet); + scriptNode.setKnowledgePackageWrapper(new KnowledgePackageWrapper(knowledgeBase.getKnowledgePackage())); + }else if(node instanceof ForkNode){ + List connections=node.getConnections(); + for(Connection conn:connections){ + String script=conn.getScript(); + if(script==null){ + continue; + } + script=conn.buildDSLScript(libraries); + RuleSet ruleSet=dslRuleSetBuilder.build(script); + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(ruleSet); + conn.setKnowledgePackageWrapper(new KnowledgePackageWrapper(knowledgeBase.getKnowledgePackage())); + } + } + } + } + + public void addLibrary(Library lib){ + if(libraries==null){ + libraries=new ArrayList(); + } + libraries.add(lib); + } + @Override + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + + @Override + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + @Override + public boolean isDebug() { + return debug; + } + + public void setDebug(boolean debug) { + this.debug = debug; + } + + @Override + public List getNodes() { + return nodes; + } + public void setNodes(List nodes) { + this.nodes = nodes; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNode.java new file mode 100644 index 0000000..efdfe47 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNode.java @@ -0,0 +1,139 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ProcessAfterNodeTriggeredEventImpl; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ProcessBeforeNodeTriggeredEventImpl; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; +import org.apache.commons.lang.StringUtils; +import org.springframework.context.ApplicationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public abstract class FlowNode implements Node{ + protected String name; + protected String eventBean; + protected String x; + protected String y; + protected String width; + protected String height; + + protected List connections; + public FlowNode() { + } + public FlowNode(String name) { + this.name=name; + } + public final void enter(FlowContext context,FlowInstance instance){ + String msg=">>>进入决策流节点:"+name; + context.debugMsg(msg, MsgType.RuleFlow, instance.isDebug()); + ((ExecutionResponseImpl)context.getResponse()).addNodeName(name); + KnowledgeSession session=(KnowledgeSession)context.getWorkingMemory(); + session.fireEvent(new ProcessBeforeNodeTriggeredEventImpl(this,instance,session)); + enterNode(context, instance); + session.fireEvent(new ProcessAfterNodeTriggeredEventImpl(this,instance,session)); + } + + public abstract void enterNode(FlowContext context,FlowInstance instance); + + protected void leave(String connectionName,FlowContext context, FlowInstance instance) { + for(Connection connection:connections){ + if(connectionName!=null){ + String cName=connection.getName(); + cName= cName==null ? cName : cName.trim(); + if(connectionName.trim().equals(cName)){ + connection.execute(context, instance); + break; + } + }else if(connection.evaluate(context)){ + connection.execute(context, instance); + break; + } + } + } + + protected void executeNodeEvent(EventType type,FlowContext context,ProcessInstance instance){ + if(StringUtils.isEmpty(eventBean)){ + return; + } + ApplicationContext applicationContext=context.getApplicationContext(); + NodeEvent event=(NodeEvent)applicationContext.getBean(eventBean); + if(type.equals(EventType.enter)){ + event.enter(this, instance, context); + }else{ + event.leave(this, instance, context); + } + } + + public abstract FlowNodeType getType(); + + public List getConnections() { + return connections; + } + public void setConnections(List connections) { + this.connections = connections; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getEventBean() { + return eventBean; + } + public void setEventBean(String eventBean) { + this.eventBean = eventBean; + } + public String getX() { + return x; + } + public void setX(String x) { + this.x = x; + } + public String getY() { + return y; + } + public void setY(String y) { + this.y = y; + } + public String getWidth() { + return width; + } + public void setWidth(String width) { + this.width = width; + } + public String getHeight() { + return height; + } + public void setHeight(String height) { + this.height = height; + } + +} +enum EventType{ + enter,leave; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeJsonDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeJsonDeserializer.java new file mode 100644 index 0000000..c4aa3bc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeJsonDeserializer.java @@ -0,0 +1,149 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.JsonParser; +import org.codehaus.jackson.JsonProcessingException; +import org.codehaus.jackson.map.DeserializationContext; +import org.codehaus.jackson.map.JsonDeserializer; +import org.codehaus.jackson.map.ObjectMapper; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年4月21日 + */ +public class FlowNodeJsonDeserializer extends JsonDeserializer> { + @Override + public List deserialize(JsonParser jsonParser, DeserializationContext context) throws IOException, JsonProcessingException { + ObjectMapper mapper = (ObjectMapper)jsonParser.getCodec(); + JsonNode jsonNode = mapper.readTree(jsonParser); + List flowNodes=new ArrayList(); + Iterator childrenNodesIter=jsonNode.getElements(); + while(childrenNodesIter.hasNext()){ + JsonNode childNode=childrenNodesIter.next(); + JsonNode type=childNode.get("type"); + if(type==null){ + continue; + } + FlowNode node=null; + FlowNodeType nodeType=FlowNodeType.valueOf(type.getTextValue()); + switch(nodeType){ + case Action: + ActionNode actionNode=new ActionNode(); + JsonNode actionBeanNode=childNode.get("actionBean"); + if(actionBeanNode!=null){ + actionNode.setActionBean(actionBeanNode.getTextValue()); + } + node=actionNode; + break; + case Script: + ScriptNode scriptNode=new ScriptNode(); + JsonNode sn=childNode.get("script"); + if(sn!=null){ + scriptNode.setScript(sn.getTextValue()); + } + node=scriptNode; + break; + case Decision: + DecisionNode decisionNode=new DecisionNode(); + DecisionType decisionType=DecisionType.valueOf(childNode.get("decisionType").getTextValue()); + decisionNode.setDecisionType(decisionType); + JsonNode itemsNode=childNode.get("items"); + Iterator iter=itemsNode.getElements(); + List items=new ArrayList(); + while(iter.hasNext()){ + JsonNode itemNode=iter.next(); + DecisionItem item=new DecisionItem(); + item.setTo(itemNode.get("to").getTextValue()); + if(decisionType.equals(DecisionType.Criteria)){ + item.setScript(itemNode.get("script").getTextValue()); + }else{ + item.setPercent(itemNode.get("percent").getIntValue()); + } + items.add(item); + } + decisionNode.setItems(items); + node=decisionNode; + break; + case End: + node=new EndNode(); + break; + case Fork: + node=new ForkNode(); + break; + case Join: + node=new JoinNode(); + break; + case Rule: + RuleNode ruleNode=new RuleNode(); + ruleNode.setFile(childNode.get("file").getTextValue()); + JsonNode versionNode=childNode.get("version"); + if(versionNode!=null){ + ruleNode.setVersion(versionNode.getTextValue()); + } + node=ruleNode; + break; + case RulePackage: + RulePackageNode packageNode=new RulePackageNode(); + packageNode.setPackageId(childNode.get("packageId").getTextValue()); + if(childNode.get("project")!=null){ + packageNode.setPackageId(childNode.get("project").getTextValue()); + } + node=packageNode; + break; + case Start: + node=new StartNode(); + break; + } + String name=childNode.get("name").getTextValue(); + node.setName(name); + JsonNode eventNode=childNode.get("eventBean"); + if(eventNode!=null){ + node.setEventBean(eventNode.getTextValue()); + } + JsonNode connectionsNode=childNode.get("connections"); + if(connectionsNode!=null){ + List connections=new ArrayList(); + Iterator iter=connectionsNode.getElements(); + while(iter.hasNext()){ + JsonNode connNode=iter.next(); + Connection conn=mapper.readValue(connNode,Connection.class); + connections.add(conn); + } + for(Connection conn:connections){ + conn.buildDeserialize(); + } + node.setConnections(connections); + } + JsonNode knowledgePackageWrapperNode=childNode.get("knowledgePackageWrapper"); + if(knowledgePackageWrapperNode!=null){ + KnowledgePackageWrapper wrapper=mapper.readValue(knowledgePackageWrapperNode, KnowledgePackageWrapper.class); + wrapper.buildDeserialize(); + BindingNode bindingNode=(BindingNode)node; + bindingNode.setKnowledgePackageWrapper(wrapper); + } + flowNodes.add(node); + } + return flowNodes; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeType.java new file mode 100644 index 0000000..35290c2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/FlowNodeType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; +/** + * @author Jacky.gao + * @since 2015年4月21日 + */ +public enum FlowNodeType { + Action,Script,Decision,End,Start,Rule,RulePackage,Fork,Join; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ForkNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ForkNode.java new file mode 100644 index 0000000..56a773b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ForkNode.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class ForkNode extends FlowNode { + private FlowNodeType type=FlowNodeType.Fork; + public ForkNode() { + } + public ForkNode(String name) { + super(name); + } + @Override + public FlowNodeType getType() { + return type; + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter, context, instance); + List forkConnections=new ArrayList(); + for(Connection connection:connections){ + if(connection.evaluate(context)){ + forkConnections.add(connection); + } + } + executeNodeEvent(EventType.leave, context, instance); + int childCount=forkConnections.size(); + for(Connection connection:forkConnections){ + FlowInstance newChildInstance=instance.newChildInstance(childCount); + connection.execute(context, newChildInstance); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/JoinNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/JoinNode.java new file mode 100644 index 0000000..ae40694 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/JoinNode.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class JoinNode extends FlowNode { + private FlowNodeType type=FlowNodeType.Join; + public JoinNode() { + } + public JoinNode(String name) { + super(name); + } + @Override + public FlowNodeType getType() { + return type; + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter, context, instance); + FlowInstance parentInstance=instance.getParent(); + if(parentInstance==null){ + throw new RuleException("Invalid flow instance."); + } + String id=parentInstance.getId(); + int arrivedChild=1; + if(context.getVariable(id)==null){ + context.addVariable(id, arrivedChild); + }else{ + arrivedChild=(Integer)context.getVariable(id); + arrivedChild++; + context.addVariable(id, arrivedChild); + } + executeNodeEvent(EventType.leave, context, instance); + int childCount=instance.getParallelInstanceCount(); + if(arrivedChild>=childCount){ + context.removeVariable(id); + leave(null,context,parentInstance); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/NodeEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/NodeEvent.java new file mode 100644 index 0000000..3bdfe81 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/NodeEvent.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public interface NodeEvent { + /** + * 规则流流入当前节点触发的方法 + * @param node 当前节点对象 + * @param instance 当前规则流实例对象 + * @param context 规则流上下文件对象 + */ + void enter(FlowNode node,ProcessInstance instance,FlowContext context); + /** + * 规则流流出当前节点触发的方法 + * @param node 当前节点对象 + * @param instance 当前规则流实例对象 + * @param context 规则流上下文件对象 + */ + void leave(FlowNode node,ProcessInstance instance,FlowContext context); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/PercentItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/PercentItem.java new file mode 100644 index 0000000..7790c04 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/PercentItem.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; +/** + * @author Jacky.gao + * @since 2015年5月27日 + */ +public class PercentItem { + private String name; + private long percent; + private long total; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public long getPercent() { + return percent; + } + public void setPercent(long percent) { + this.percent = percent; + } + public long getTotal() { + return total; + } + public void setTotal(long total) { + this.total = total; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ProcessDefinition.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ProcessDefinition.java new file mode 100644 index 0000000..0ce2d3b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ProcessDefinition.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.rule.Library; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ProcessDefinition { + List getLibraries(); + String getId(); + boolean isDebug(); + List getNodes(); + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RuleNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RuleNode.java new file mode 100644 index 0000000..0610a03 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RuleNode.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class RuleNode extends BindingNode { + private FlowNodeType type=FlowNodeType.Rule; + private String file;//规则文件或决策表文件的路径 + private String version; + public RuleNode() { + } + public RuleNode(String name) { + super(name); + } + @Override + public FlowNodeType getType() { + return type; + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter, context, instance); + executeKnowledgePackage(context, instance); + executeNodeEvent(EventType.leave, context, instance); + leave(null, context, instance); + } + public String getFile() { + return file; + } + public void setFile(String file) { + this.file = file; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RulePackageNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RulePackageNode.java new file mode 100644 index 0000000..1918f51 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/RulePackageNode.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class RulePackageNode extends BindingNode { + private FlowNodeType type=FlowNodeType.RulePackage; + private String packageId; + private String project; + public RulePackageNode() { + } + public RulePackageNode(String name) { + super(name); + } + + @Override + public FlowNodeType getType() { + return type; + } + @Override + public void enterNode(FlowContext context, FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter, context, instance); + executeKnowledgePackage(context, instance); + executeNodeEvent(EventType.leave, context, instance); + leave(null, context, instance); + } + + public String getProject() { + return project; + } + public void setProject(String project) { + this.project = project; + } + public String getPackageId() { + return packageId; + } + + public void setPackageId(String packageId) { + this.packageId = packageId; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ScriptNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ScriptNode.java new file mode 100644 index 0000000..7263c25 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ScriptNode.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年4月22日 + */ +public class ScriptNode extends BindingNode { + private String script; + private FlowNodeType type=FlowNodeType.Script; + @Override + public void enterNode(FlowContext context, FlowInstance instance) { + instance.setCurrentNode(this); + executeNodeEvent(EventType.enter, context, instance); + executeKnowledgePackage(context, instance); + executeNodeEvent(EventType.leave, context, instance); + leave(null, context, instance); + } + + @Override + public FlowNodeType getType() { + return type; + } + + public String buildDSLScript(List libraries){ + StringBuffer sb=new StringBuffer(); + if(libraries!=null){ + for(Library lib:libraries){ + String path=lib.getPath(); + if(lib.getVersion()!=null){ + path+=":"+lib.getVersion(); + } + LibraryType type=lib.getType(); + switch(type){ + case Action: + sb.append("importActionLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Constant: + sb.append("importConstantLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Parameter: + sb.append("importParameterLibrary \""+path+"\""); + sb.append("\r\n"); + break; + case Variable: + sb.append("importVariableLibrary \""+path+"\""); + sb.append("\r\n"); + break; + } + } + } + sb.append("rule \"sr\" "); + sb.append(" "); + sb.append("if"); + sb.append(" "); + sb.append("then"); + sb.append(" "); + if(script!=null){ + sb.append(script); + } + sb.append(" "); + sb.append("end"); + sb.append(" "); + return sb.toString(); + } + + public String getScript() { + return script; + } + + public void setScript(String script) { + this.script = script; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/StartNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/StartNode.java new file mode 100644 index 0000000..781d843 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/StartNode.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ProcessAfterStartedEventImpl; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class StartNode extends FlowNode { + private FlowNodeType type=FlowNodeType.Start; + public StartNode() { + } + public StartNode(String name) { + super(name); + } + @Override + public FlowNodeType getType() { + return type; + } + @Override + public void enterNode(FlowContext context,FlowInstance instance) { + KnowledgeSession session=(KnowledgeSession)context.getWorkingMemory(); + session.fireEvent(new ProcessAfterStartedEventImpl(instance,session)); + executeNodeEvent(EventType.enter,context,instance); + executeNodeEvent(EventType.leave,context,instance); + leave(null,context, instance); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContext.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContext.java new file mode 100644 index 0000000..29962e6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContext.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow.ins; + +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.rete.Context; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public interface FlowContext extends Context { + Object getVariable(String key); + Map getVariables(); + void addVariable(String key,Object object); + void removeVariable(String key); + List getFlowInstances(); + void addFlowInstance(FlowInstance instance); + void setSessionValue(String key,Object value); + Object getSessionValue(String key); + FlowExecutionResponse getResponse(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContextImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContextImpl.java new file mode 100644 index 0000000..5ca98c8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowContextImpl.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow.ins; + +import com.itheima.sfbx.framework.rule.debug.MessageItem; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.rete.ContextImpl; +import org.springframework.context.ApplicationContext; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class FlowContextImpl extends ContextImpl implements FlowContext { + private Map variableMap; + private Map sessionValueMap; + private List flowInstances=new ArrayList(); + private ExecutionResponseImpl response; + public FlowContextImpl(WorkingMemory workingMemory,Map variableCategoryMap,ApplicationContext applicationContext,List debugMessageItems) { + super(workingMemory,applicationContext,variableCategoryMap,debugMessageItems); + sessionValueMap=new HashMap(); + } + + public void setResponse(ExecutionResponseImpl response) { + this.response = response; + } + + @Override + public FlowExecutionResponse getResponse() { + return response; + } + + @Override + public Map getVariables() { + return variableMap; + } + public Object getVariable(String key) { + return variableMap.get(key); + } + public void removeVariable(String key) { + variableMap.remove(key); + } + public void addVariable(String key, Object object) { + variableMap.put(key, object); + } + public void setVariableMap(Map variableMap) { + this.variableMap=variableMap; + } + public void addFlowInstance(FlowInstance instance) { + flowInstances.add(instance); + } + public List getFlowInstances() { + return flowInstances; + } + @Override + public Object getSessionValue(String key) { + return sessionValueMap.get(key); + } + @Override + public void setSessionValue(String key,Object value) { + sessionValueMap.put(key, value); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowInstance.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowInstance.java new file mode 100644 index 0000000..0fd0bc6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/FlowInstance.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow.ins; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.flow.ProcessDefinition; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +/** + * @author Jacky.gao + * @since 2015年4月20日 + */ +public class FlowInstance implements ProcessInstance{ + private String id; + private int parallelInstanceCount; + private ProcessDefinition flowDefinition; + private FlowInstance parent; + private List children=new ArrayList(); + private FlowNode currentNode; + private boolean debug; + public FlowInstance(ProcessDefinition flowDefinition,boolean debug) { + this.flowDefinition=flowDefinition; + id=UUID.randomUUID().toString(); + this.debug=debug; + } + + public boolean isDebug() { + return debug; + } + + @Override + public ProcessDefinition getProcessDefinition() { + return flowDefinition; + } + + @Override + public List getChildren() { + return children; + } + + public void addChild(FlowInstance child){ + children.add(child); + } + @Override + public int getParallelInstanceCount() { + return parallelInstanceCount; + } + + public void setParallelInstanceCount(int parallelInstanceCount) { + this.parallelInstanceCount = parallelInstanceCount; + } + @Override + public String getId() { + return id; + } + @Override + public FlowNode getCurrentNode() { + return currentNode; + } + public void setCurrentNode(FlowNode currentNode) { + this.currentNode = currentNode; + } + public void setParent(FlowInstance parent) { + this.parent = parent; + } + @Override + public FlowInstance getParent() { + return parent; + } + public FlowInstance newChildInstance(int childCount){ + FlowInstance instance=new FlowInstance(flowDefinition,debug); + instance.setParallelInstanceCount(childCount); + instance.setParent(this); + addChild(instance); + return instance; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/ProcessInstance.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/ProcessInstance.java new file mode 100644 index 0000000..6a156ba --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/flow/ins/ProcessInstance.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.flow.ins; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.flow.ProcessDefinition; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ProcessInstance { + ProcessDefinition getProcessDefinition(); + List getChildren(); + int getParallelInstanceCount(); + String getId(); + FlowNode getCurrentNode(); + ProcessInstance getParent(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/Argument.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/Argument.java new file mode 100644 index 0000000..f92c65e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/Argument.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function; +/** + * @author Jacky.gao + * @since 2015年7月26日 + */ +public class Argument { + /** + * 函数第一个参数提示名称 + */ + private String name; + /** + * 当前函数是否需要第二个参数,也就是说是否需要选择属性名 + */ + private boolean needProperty; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public boolean isNeedProperty() { + return needProperty; + } + public void setNeedProperty(boolean needProperty) { + this.needProperty = needProperty; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/FunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/FunctionDescriptor.java new file mode 100644 index 0000000..5cef0b0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/FunctionDescriptor.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function; + +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public interface FunctionDescriptor { + /** + * 通过定义一个Argument实例来定义函数所采用的参数,该方法必须要返回一个Argument对象,不能返回null。 + * @return 返回参数对象 + */ + Argument getArgument(); + /** + * 函数运行时要执行的方法 + * @param object 第一个参数运行时的具体值对象 + * @param property 当Argument对象中needProperty属性为true时,在使用该函数时定义的具体的属性名,注意这里是属性name而非Label + * @param workingMemory 当前运行时的WorkingMemory对象 + * @return 函数运行后的返回值,如没有返回值则返回null + */ + Object doFunction(Object object,String property,WorkingMemory workingMemory); + /** + * 返回函数名,建议返回一个首字母大写的英文名,该名称不能与既有函数同名 + * @return 函数名称 + */ + String getName(); + /** + * 返回函数显示名称,该名称不能与既有函数Label同名 + * @return 返回函数的Label,既显示名称 + */ + String getLabel(); + /** + * @return 返回当前函数是否禁用 + */ + boolean isDisabled(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AbsFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AbsFunctionDescriptor.java new file mode 100644 index 0000000..c6c7aa2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AbsFunctionDescriptor.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class AbsFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "求绝对值"; + } + @Override + public String getName() { + return "Abs"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object value=Utils.getObjectProperty(object, property); + BigDecimal bigvalue=Utils.toBigDecimal(value); + return Math.abs(bigvalue.doubleValue()); + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("对象"); + p.setNeedProperty(true); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AvgFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AvgFunctionDescriptor.java new file mode 100644 index 0000000..0ea3634 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/AvgFunctionDescriptor.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; +import java.util.Collection; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class AvgFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getName() { + return "Avg"; + } + @Override + public String getLabel() { + return "求平均值"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Collection list=null; + if(object instanceof Collection){ + list=(Collection)object; + }else{ + throw new RuleException("Function[avg] parameter must be java.util.Collection type."); + } + BigDecimal total=null; + for(Object obj:list){ + Object pvalue=Utils.getObjectProperty(obj, property); + BigDecimal a=Utils.toBigDecimal(pvalue); + if(total==null){ + total=a; + }else{ + total=total.add(a); + } + } + BigDecimal avgvalue=total.divide(new BigDecimal(list.size()),12,BigDecimal.ROUND_HALF_UP); + return avgvalue.doubleValue(); + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("集合对象"); + p.setNeedProperty(true); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CosFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CosFunctionDescriptor.java new file mode 100644 index 0000000..6412441 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CosFunctionDescriptor.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class CosFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + BigDecimal bigobj=Utils.toBigDecimal(obj); + return Math.cos(bigobj.doubleValue()); + } + + @Override + public String getName() { + return "Cos"; + } + + @Override + public String getLabel() { + return "求余弦"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CountFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CountFunctionDescriptor.java new file mode 100644 index 0000000..0c34b57 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/CountFunctionDescriptor.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class CountFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "统计数量"; + } + @Override + public String getName() { + return "Count"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Collection list=null; + if(object instanceof Collection){ + list=(Collection)object; + }else{ + throw new RuleException("Function[count] parameter must be java.util.Collection type."); + } + return list.size(); + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("集合对象"); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/ExpFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/ExpFunctionDescriptor.java new file mode 100644 index 0000000..d39a9a8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/ExpFunctionDescriptor.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class ExpFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + BigDecimal bigobj=Utils.toBigDecimal(obj); + return Math.exp(bigobj.doubleValue()); + } + + @Override + public String getName() { + return "Exp"; + } + + @Override + public String getLabel() { + return "求指数"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/LnFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/LnFunctionDescriptor.java new file mode 100644 index 0000000..651feb5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/LnFunctionDescriptor.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class LnFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + BigDecimal bigobj=Utils.toBigDecimal(obj); + return Math.log(bigobj.doubleValue()); + } + + @Override + public String getName() { + return "Ln"; + } + + @Override + public String getLabel() { + return "求自然对数"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MaxFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MaxFunctionDescriptor.java new file mode 100644 index 0000000..75b295b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MaxFunctionDescriptor.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; +import java.util.Collection; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class MaxFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "求最大值"; + } + @Override + public String getName() { + return "Max"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Collection list=null; + if(object instanceof Collection){ + list=(Collection)object; + }else{ + throw new RuleException("Function[max] parameter must be java.util.Collection type."); + } + BigDecimal max=null; + Object maxObj=null; + for(Object obj:list){ + Object pvalue=Utils.getObjectProperty(obj, property); + BigDecimal a=Utils.toBigDecimal(pvalue); + if(max==null){ + max=a; + maxObj=obj; + }else{ + int result=a.compareTo(max); + if(result==1){ + max=a; + maxObj=obj; + } + } + } + return maxObj; + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("集合对象"); + p.setNeedProperty(true); + return p; + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MinFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MinFunctionDescriptor.java new file mode 100644 index 0000000..0218214 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/MinFunctionDescriptor.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; +import java.util.Collection; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class MinFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "求最小值"; + } + @Override + public String getName() { + return "Min"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Collection list=null; + if(object instanceof Collection){ + list=(Collection)object; + }else{ + throw new RuleException("Function[min] parameter must be java.util.Collection type."); + } + BigDecimal max=null; + Object maxObj=null; + for(Object obj:list){ + Object pvalue=Utils.getObjectProperty(obj, property); + BigDecimal a=Utils.toBigDecimal(pvalue); + if(max==null){ + max=a; + maxObj=obj; + }else{ + int result=a.compareTo(max); + if(result==-1){ + max=a; + maxObj=obj; + } + } + } + return maxObj; + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("集合对象"); + p.setNeedProperty(true); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SinFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SinFunctionDescriptor.java new file mode 100644 index 0000000..eca8ee9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SinFunctionDescriptor.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class SinFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + BigDecimal bigobj=Utils.toBigDecimal(obj); + return Math.sin(bigobj.doubleValue()); + } + + @Override + public String getName() { + return "Sin"; + } + + @Override + public String getLabel() { + return "求正弦"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/StringLengthFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/StringLengthFunctionDescriptor.java new file mode 100644 index 0000000..4ac9037 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/StringLengthFunctionDescriptor.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +/** + * @author Jacky.gao + * @since 2015年7月30日 + */ +public class StringLengthFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + if(obj==null){ + return 0; + }else if(!(obj instanceof String)){ + throw new RuleException("Function[StringLength] parameter value must be String."); + } + return obj.toString().length(); + } + + @Override + public String getName() { + return "StringLength"; + } + + @Override + public String getLabel() { + return "计算字符长度"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SumFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SumFunctionDescriptor.java new file mode 100644 index 0000000..1cac75b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/SumFunctionDescriptor.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; +import java.util.Collection; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class SumFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "求和"; + } + @Override + public String getName() { + return "Sum"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Collection list=null; + if(object instanceof Collection){ + list=(Collection)object; + }else{ + throw new RuleException("Function[sum] parameter must be java.util.Collection type."); + } + BigDecimal total=null; + for(Object obj:list){ + Object pvalue=Utils.getObjectProperty(obj, property); + BigDecimal a=Utils.toBigDecimal(pvalue); + if(total==null){ + total=a; + }else{ + total=total.add(a); + } + } + return total.doubleValue(); + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("集合对象"); + p.setNeedProperty(true); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TanFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TanFunctionDescriptor.java new file mode 100644 index 0000000..ba774d0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TanFunctionDescriptor.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +import java.math.BigDecimal; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class TanFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("对象"); + arg.setNeedProperty(true); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object obj=Utils.getObjectProperty(object, property); + BigDecimal bigobj=Utils.toBigDecimal(obj); + return Math.tan(bigobj.doubleValue()); + } + + @Override + public String getName() { + return "Tan"; + } + + @Override + public String getLabel() { + return "求正切"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TrimFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TrimFunctionDescriptor.java new file mode 100644 index 0000000..9870a13 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/TrimFunctionDescriptor.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + + +/** + * @author Jacky.gao + * @since 2015年7月22日 + */ +public class TrimFunctionDescriptor implements FunctionDescriptor{ + private boolean disabled=false; + + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + @Override + public String getLabel() { + return "字符去空格"; + } + @Override + public String getName() { + return "Trim"; + } + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + Object value=Utils.getObjectProperty(object, property); + if(value==null){ + return "null"; + } + return value.toString().trim(); + } + @Override + public Argument getArgument() { + Argument p=new Argument(); + p.setName("对象"); + p.setNeedProperty(true); + return p; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateFactFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateFactFunctionDescriptor.java new file mode 100644 index 0000000..d471151 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateFactFunctionDescriptor.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class UpdateFactFunctionDescriptor implements FunctionDescriptor { + private boolean disabled=false; + @Override + public Argument getArgument() { + Argument arg=new Argument(); + arg.setName("要更新的对象"); + return arg; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + if(object instanceof String){ + String text=(String)object; + if(text.equals("参数") || text.equals("parameter")){ + return workingMemory.update(workingMemory.getParameters()); + }else{ + throw new RuleException("Unsupport parameter["+text+"]."); + } + }else{ + return workingMemory.update(object); + } + } + + @Override + public String getName() { + return "UpdateFact"; + } + + @Override + public String getLabel() { + return "更新工作区对象"; + } + + @Override + public boolean isDisabled() { + return disabled; + } + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateParameterFunctionDescriptor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateParameterFunctionDescriptor.java new file mode 100644 index 0000000..6860502 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/function/impl/UpdateParameterFunctionDescriptor.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.function.impl; + +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class UpdateParameterFunctionDescriptor implements FunctionDescriptor { + @Override + public Argument getArgument() { + return null; + } + + @Override + public Object doFunction(Object object, String property,WorkingMemory workingMemory) { + return workingMemory.update(workingMemory.getParameters()); + } + + @Override + public String getName() { + return "UpdateParameter"; + } + + @Override + public String getLabel() { + return "更新参数"; + } + + @Override + public boolean isDisabled() { + return false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/Datatype.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/Datatype.java new file mode 100644 index 0000000..b23a045 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/Datatype.java @@ -0,0 +1,202 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.type.TypeReference; + +import java.math.BigDecimal; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public enum Datatype { + String,Integer,Char,Double,Long,Float,BigDecimal,Boolean,Date,List,Set,Map,Enum,Object; + public String convertObjectToString(Object value){ + if(value==null){ + return ""; + } + if(value instanceof String){ + return value.toString(); + } + switch(this){ + case Object: + return value.toString(); + case Date: + SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return sd.format((Date)value); + case List: + List list=(List)value; + String a=""; + for(int i=0;i0){ + a+=","; + } + a+=obj; + } + return a; + case Set: + Set set=(Set)value; + String b=""; + int i=0; + for(Object obj:set){ + if(i>0){ + b+=","; + } + b+=obj; + i++; + } + return b; + case BigDecimal: + BigDecimal bb=Utils.toBigDecimal(value); + return bb.floatValue()+""; + case Double: + Double d=Utils.toBigDecimal(value).doubleValue(); + return d.floatValue()+""; + default: + return value.toString(); + } + } + @SuppressWarnings("rawtypes") + public Object convert(Object value){ + switch(this){ + case Object: + return value; + case String: + if(value==null)return value; + return value.toString(); + case Integer: + if(value==null || value.toString().equals("")){ + value="0"; + } + return Utils.toBigDecimal(value).intValue(); + case Char: + if(value==null){ + return '\u0000'; + } + if(value instanceof Character){ + return (Character)value; + } + String str=value.toString(); + if(str.length()==1){ + return str.toCharArray()[0]; + }else{ + int intValue=Utils.toBigDecimal(value).intValue(); + return (char)intValue; + } + case Double: + if(value==null){ + value="0"; + } + return Utils.toBigDecimal(value).doubleValue(); + case Long: + if(value==null){ + value="0"; + } + return Utils.toBigDecimal(value).longValue(); + case Float: + if(value==null){ + value="0"; + } + return Utils.toBigDecimal(value).floatValue(); + case BigDecimal: + if(value==null){ + value="0"; + } + return Utils.toBigDecimal(value); + case Boolean: + if(value==null){ + value="false"; + } + return java.lang.Boolean.valueOf(value.toString()); + case Date: + if(value==null){ + return null; + } + try { + if(value instanceof Date){ + return (Date)value; + } + if(value.toString().equals("")){ + return null; + } + try{ + SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + return sd.parse(value.toString()); + }catch(Exception ex){ + SimpleDateFormat sd=new SimpleDateFormat("yyyy-MM-dd"); + return sd.parse(value.toString()); + } + + } catch (ParseException e) { + throw new RuleException(e); + } + case List: + if(value==null){ + return null; + } + if(value instanceof List){ + return (List)value; + } + List list=new ArrayList(); + String[] values=value.toString().split(","); + for(String v:values){ + list.add(v); + } + return list; + case Set: + if(value==null){ + return null; + } + if(value instanceof Set){ + return (Set)value; + } + Set set=new TreeSet(); + for(String v:value.toString().split(",")){ + set.add(v); + } + return set; + case Map: + if(value==null){ + return null; + } + if(value instanceof Map){ + return (Map)value; + } + ObjectMapper mapper = new ObjectMapper(); + try { + Map map=mapper.readValue(value.toString(), new HashMapTypeReference()); + return map; + } catch (Exception e) { + throw new RuleException(e); + } + case Enum: + return value; + } + return null; + }; + +} + +class HashMapTypeReference extends TypeReference>{ +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/ResourceLibrary.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/ResourceLibrary.java new file mode 100644 index 0000000..e9c6f90 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/ResourceLibrary.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantCategory; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableLibrary; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class ResourceLibrary { + private List constantCategories; + private List actionLibraries; + private List variableCategories; + public ResourceLibrary() { + } + public ResourceLibrary(List variableLibraries,List actionLibraries,List constantLibraries){ + this.variableCategories=new ArrayList(); + this.actionLibraries=new ArrayList(); + this.constantCategories=new ArrayList(); + for(VariableLibrary vl:variableLibraries){ + for(VariableCategory category:vl.getVariableCategories()){ + variableCategories.add(category); + } + } + this.actionLibraries.addAll(actionLibraries); + for(ConstantLibrary cl:constantLibraries){ + for(ConstantCategory cc:cl.getCategories()){ + this.constantCategories.add(cc); + } + } + } + public VariableCategory getVariableCategory(String categoryName) { + for(VariableCategory category:variableCategories){ + if(category.getName().equals(categoryName)){ + return category; + } + } + throw new RuleException("Variable category ["+categoryName+"] not exist"); + } + public List getActionLibraries() { + return actionLibraries; + } + public List getVariableCategories() { + return variableCategories; + } + public List getConstantCategories() { + return constantCategories; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/ActionLibrary.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/ActionLibrary.java new file mode 100644 index 0000000..f70293a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/ActionLibrary.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class ActionLibrary { + private List springBeans; + public List getSpringBeans() { + return springBeans; + } + + public void setSpringBeans(List springBeans) { + this.springBeans = springBeans; + } + + public void addSpringBean(SpringBean springBean) { + if(this.springBeans==null){ + this.springBeans=new ArrayList(); + } + this.springBeans.add(springBean); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Method.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Method.java new file mode 100644 index 0000000..5dce432 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Method.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Method { + private String name; + private String methodName; + private List parameters; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public List getParameters() { + return parameters; + } + public String getMethodName() { + return methodName; + } + public void setMethodName(String methodName) { + this.methodName = methodName; + } + public void addParameter(Parameter parameter) { + if(parameters==null){ + parameters=new ArrayList(); + } + parameters.add(parameter); + } + public void setParameters(List parameters) { + this.parameters = parameters; + } + + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Parameter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Parameter.java new file mode 100644 index 0000000..3ce62e9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/Parameter.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Parameter { + private String name; + private Datatype type; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Datatype getType() { + return type; + } + + public void setType(Datatype type) { + this.type = type; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/SpringBean.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/SpringBean.java new file mode 100644 index 0000000..8566bee --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/SpringBean.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class SpringBean { + private String id; + private String name; + private List methods; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public List getMethods() { + return methods; + } + public void addMethod(Method method) { + if(methods==null){ + methods=new ArrayList(); + } + this.methods.add(method); + } + public void setMethods(List methods) { + this.methods = methods; + } + + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionBean.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionBean.java new file mode 100644 index 0000000..7c0d573 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionBean.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Jacky.gao + * @since 2015年11月26日 + */ +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.RUNTIME) +public @interface ActionBean { + public String name(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethod.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethod.java new file mode 100644 index 0000000..fedb472 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethod.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * @author Jacky.gao + * @since 2015年11月26日 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ActionMethod { + public String name(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethodParameter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethodParameter.java new file mode 100644 index 0000000..0362999 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/action/annotation/ActionMethodParameter.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.action.annotation; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + + +/** + * @author Jacky.gao + * @since 2015年11月26日 + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface ActionMethodParameter { + public String[] names(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/Constant.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/Constant.java new file mode 100644 index 0000000..8916528 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/Constant.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.constant; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class Constant { + private String name; + private String label; + private Datatype type; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public Datatype getType() { + return type; + } + public void setType(Datatype type) { + this.type = type; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantCategory.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantCategory.java new file mode 100644 index 0000000..8a880ae --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantCategory.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.constant; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ConstantCategory { + private String name; + private String label; + private List constants; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public List getConstants() { + return constants; + } + public void setConstants(List constants) { + this.constants = constants; + } + public void addConstant(Constant constant) { + if(this.constants==null){ + this.constants=new ArrayList(); + } + this.constants.add(constant); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantLibrary.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantLibrary.java new file mode 100644 index 0000000..91b596f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/constant/ConstantLibrary.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.constant; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ConstantLibrary { + private List categories; + + public List getCategories() { + return categories; + } + + public void setCategories(List categories) { + this.categories = categories; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Act.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Act.java new file mode 100644 index 0000000..0bb0239 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Act.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.variable; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public enum Act { + In,Out,InOut,Internal; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/CategoryType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/CategoryType.java new file mode 100644 index 0000000..a484712 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/CategoryType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.variable; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public enum CategoryType { + Custom,Clazz; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Variable.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Variable.java new file mode 100644 index 0000000..b81a8c0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/Variable.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.variable; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class Variable { + private String name; + private String label; + private Datatype type; + private String defaultValue; + private Act act; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public Datatype getType() { + return type; + } + public void setType(Datatype type) { + this.type = type; + } + public String getDefaultValue() { + return defaultValue; + } + public void setDefaultValue(String defaultValue) { + this.defaultValue = defaultValue; + } + public Act getAct() { + return act; + } + public void setAct(Act act) { + this.act = act; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableCategory.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableCategory.java new file mode 100644 index 0000000..84e3839 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableCategory.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.variable; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableCategory { + public static final String PARAM_CATEGORY="参数"; + private String name; + private CategoryType type; + private String clazz; + private List variables; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public CategoryType getType() { + return type; + } + public void setType(CategoryType type) { + this.type = type; + } + public String getClazz() { + return clazz; + } + public void setClazz(String clazz) { + this.clazz = clazz; + } + public List getVariables() { + return variables; + } + public void setVariables(List variables) { + this.variables = variables; + } + public void addVariable(Variable variable) { + if(variables==null){ + variables=new ArrayList(); + } + variables.add(variable); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableLibrary.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableLibrary.java new file mode 100644 index 0000000..bbf56cd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/library/variable/VariableLibrary.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.library.variable; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableLibrary { + private List variableCategories; + public List getVariableCategories() { + return variableCategories; + } + public void setVariableCategories(List variableCategories) { + this.variableCategories = variableCategories; + } + public void addVariableCategory(VariableCategory category){ + if(variableCategories==null){ + variableCategories=new ArrayList(); + } + variableCategories.add(category); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/AndNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/AndNode.java new file mode 100644 index 0000000..dc3012a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/AndNode.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.AndActivity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class AndNode extends JunctionNode { + private NodeType nodeType=NodeType.and; + public AndNode() { + super(0); + } + public AndNode(int id) { + super(id); + } + @Override + public NodeType getNodeType() { + return nodeType; + } + public void setToLineCount(int toLineCount){ + this.toLineCount=toLineCount; + } + @Override + public Activity newActivity(Map context) { + if(context.containsKey(this)){ + return (AndActivity)context.get(this); + } + AndActivity and=new AndActivity(); + for(Line line:lines){ + and.addPath(line.newPath(context)); + } + context.put(this, and); + return and; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/BaseReteNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/BaseReteNode.java new file mode 100644 index 0000000..4fada32 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/BaseReteNode.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import org.apache.commons.beanutils.BeanUtils; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public abstract class BaseReteNode extends ReteNode { + @JsonIgnore + private List childrenNodes=new ArrayList(); + protected List lines; + public BaseReteNode(int id) { + super(id); + } + + public List getChildrenNodes() { + return childrenNodes; + } + public void setChildrenNodes(List childrenNodes) { + this.childrenNodes = childrenNodes; + } + protected boolean buildVariables(Context context,Value value,Map variableMap){ + + return true; + } + + protected Object fetchData(Object object,String property){ + try { + return BeanUtils.getProperty(object, property); + } catch (Exception e) { + throw new RuleException(e); + } + } + + public Line addLine(ReteNode toNode){ + if(childrenNodes==null){ + childrenNodes=new ArrayList(); + } + childrenNodes.add(toNode); + Line line=new Line(this,toNode); + if(lines==null){ + lines=new ArrayList(); + } + lines.add(line); + if(toNode instanceof JunctionNode){ + JunctionNode junctionNode=(JunctionNode)toNode; + junctionNode.addToConnection(line); + } + return line; + } + + public List getLines() { + return lines; + } + public void setLines(List lines) { + this.lines = lines; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ConditionNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ConditionNode.java new file mode 100644 index 0000000..c7ce211 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ConditionNode.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriteria; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月17日 + */ +public interface ConditionNode { + String getCriteriaInfo(); + BaseCriteria getCriteria(); + List getChildrenNodes(); + Line addLine(ReteNode toNode); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/CriteriaNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/CriteriaNode.java new file mode 100644 index 0000000..f82b3bc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/CriteriaNode.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.CriteriaActivity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class CriteriaNode extends BaseReteNode implements ConditionNode{ + private String criteriaInfo; + private Criteria criteria; + private boolean debug; + private NodeType nodeType=NodeType.criteria; + public CriteriaNode() { + super(0); + } + public CriteriaNode(Criteria criteria,int id,boolean debug) { + super(id); + this.criteria = criteria; + setCriteriaInfo(criteria.getId()); + this.debug=debug; + } + @Override + public NodeType getNodeType() { + return nodeType; + } + + @Override + public Criteria getCriteria() { + return criteria; + } + public void setCriteria(Criteria criteria) { + this.criteria = criteria; + } + + @Override + public String getCriteriaInfo() { + return criteriaInfo; + } + public void setCriteriaInfo(String criteriaInfo) { + this.criteriaInfo = criteriaInfo; + } + @Override + public Activity newActivity(Map context) { + if(context.containsKey(this)){ + return (CriteriaActivity)context.get(this); + } + CriteriaActivity activity=new CriteriaActivity(criteria,debug); + for(Line line:lines){ + activity.addPath(line.newPath(context)); + } + context.put(this, activity); + return activity; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JsonUtils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JsonUtils.java new file mode 100644 index 0000000..f5d7834 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JsonUtils.java @@ -0,0 +1,138 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rete.jsondeserializer.*; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.map.ObjectMapper; + +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class JsonUtils { + private static List valueDeserializers; + static{ + valueDeserializers=new ArrayList(); + valueDeserializers.add(new ConstantValueDeserializer()); + valueDeserializers.add(new InputValueDeserializer()); + valueDeserializers.add(new ParameterValueDeserializer()); + valueDeserializers.add(new MethodValueDeserializer()); + valueDeserializers.add(new VariableCategoryValueDeserializer()); + valueDeserializers.add(new VariableValueDeserializer()); + valueDeserializers.add(new CommonFunctionValueDeserializer()); + valueDeserializers.add(new ParenValueDeserializer()); + valueDeserializers.add(new NameReferenceValueDeserializer()); + } + public static String getJsonValue(JsonNode node,String propName){ + if(node.get(propName)!=null){ + return node.get(propName).asText(); + } + return null; + } + public static ComplexArithmetic parseComplexArithmetic(JsonNode node){ + JsonNode arithmeticNode=node.get("arithmetic"); + if(arithmeticNode==null){ + return null; + } + ComplexArithmetic arith=new ComplexArithmetic(); + arith.setType(ArithmeticType.valueOf(getJsonValue(arithmeticNode, "type"))); + arith.setValue(parseValue(arithmeticNode)); + return arith; + } + public static List parseParameters(JsonNode node){ + JsonNode parametersNode=node.get("parameters"); + if(parametersNode==null){ + return null; + } + Iterator iter=parametersNode.iterator(); + List parameters=new ArrayList(); + while(iter.hasNext()){ + JsonNode parameterNode=iter.next(); + Parameter param=new Parameter(); + param.setName(getJsonValue(parameterNode, "name")); + String type=getJsonValue(parameterNode, "type"); + if(type!=null){ + param.setType(Datatype.valueOf(type)); + } + String valueTypeText=getJsonValue(parameterNode, "valueType"); + if(valueTypeText!=null){ + param.setValue(parseValue(parameterNode)); + } + param.setValue(parseValue(parameterNode)); + parameters.add(param); + } + return parameters; + } + public static Value parseValueNode(JsonNode valueNode){ + Value value=null; + ValueType valueType=ValueType.valueOf(getJsonValue(valueNode, "valueType")); + for(ValueDeserializer des:valueDeserializers){ + if(des.support(valueType)){ + value = des.deserialize(valueNode); + break; + } + } + return value; + } + + public static KnowledgePackageWrapper parseKnowledgePackageWrapper(String content){ + try{ + ObjectMapper mapper=new ObjectMapper(); + mapper.getDeserializationConfig().withDateFormat(new SimpleDateFormat(Configure.getDateFormat())); + KnowledgePackageWrapper wrapper=mapper.readValue(content, KnowledgePackageWrapper.class); + wrapper.buildDeserialize(); + return wrapper; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public static CommonFunctionParameter parseCommonFunctionParameter(JsonNode node){ + JsonNode parameterNode=node.get("parameter"); + if(parameterNode==null){ + return null; + } + CommonFunctionParameter parameter=new CommonFunctionParameter(); + parameter.setName(JsonUtils.getJsonValue(parameterNode, "name")); + parameter.setProperty(JsonUtils.getJsonValue(parameterNode, "property")); + parameter.setPropertyLabel(JsonUtils.getJsonValue(parameterNode, "propertyLabel")); + parameter.setObjectParameter(JsonUtils.parseValueNode(parameterNode.get("objectParameter"))); + return parameter; + } + + public static Value parseValue(JsonNode node){ + JsonNode valueNode=node.get("value"); + if(valueNode==null){ + return null; + } + return parseValueNode(valueNode); + } + public static List getValueDeserializers() { + return valueDeserializers; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JunctionNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JunctionNode.java new file mode 100644 index 0000000..59d81dd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/JunctionNode.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public abstract class JunctionNode extends BaseReteNode{ + protected int toLineCount; + @JsonIgnore + protected List toConnections=new ArrayList(); + public JunctionNode(int id) { + super(id); + } + public List getToConnections() { + return toConnections; + } + public void addToConnection(Line connection){ + this.toConnections.add(connection); + toLineCount=this.toConnections.size(); + } + public int getToLineCount() { + return toLineCount; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Line.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Line.java new file mode 100644 index 0000000..411ead6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Line.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.runtime.rete.Path; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class Line { + private int fromNodeId; + private int toNodeId; + @JsonIgnore + private ReteNode from; + @JsonIgnore + private ReteNode to; + public Line() { + } + public Line(ReteNode from, ReteNode to) { + this.from = from; + this.to = to; + this.fromNodeId=from.getId(); + this.toNodeId=to.getId(); + } + public void setTo(ReteNode to) { + this.to = to; + } + public Node getFrom() { + return from; + } + public void setFrom(ReteNode from) { + this.from = from; + } + public Node getTo() { + return to; + } + public Path newPath(Map context){ + return new Path(to.newActivity(context)); + } + public int getFromNodeId() { + return fromNodeId; + } + public void setFromNodeId(int fromNodeId) { + this.fromNodeId = fromNodeId; + } + public int getToNodeId() { + return toNodeId; + } + public void setToNodeId(int toNodeId) { + this.toNodeId = toNodeId; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NamedCriteriaNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NamedCriteriaNode.java new file mode 100644 index 0000000..0edae34 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NamedCriteriaNode.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedCriteria; +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.CriteriaActivity; +import com.itheima.sfbx.framework.rule.runtime.rete.NamedCriteriaActivity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2016年8月15日 + */ +public class NamedCriteriaNode extends BaseReteNode implements ConditionNode{ + private String criteriaInfo; + private NamedCriteria criteria; + private NodeType nodeType=NodeType.namedCriteria; + private boolean debug; + public NamedCriteriaNode() { + super(0); + } + public NamedCriteriaNode(NamedCriteria criteria,int id,boolean debug) { + super(id); + this.criteria = criteria; + setCriteriaInfo(criteria.getId()); + this.debug=debug; + } + @Override + public NodeType getNodeType() { + return nodeType; + } + @Override + public NamedCriteria getCriteria() { + return criteria; + } + public void setCriteria(NamedCriteria criteria) { + this.criteria = criteria; + } + @Override + public String getCriteriaInfo() { + return criteriaInfo; + } + public void setCriteriaInfo(String criteriaInfo) { + this.criteriaInfo = criteriaInfo; + } + @Override + public Activity newActivity(Map context) { + if(context.containsKey(this)){ + return (CriteriaActivity)context.get(this); + } + NamedCriteriaActivity activity=new NamedCriteriaActivity(criteria,debug); + for(Line line:lines){ + activity.addPath(line.newPath(context)); + } + context.put(this, activity); + return activity; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NodeType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NodeType.java new file mode 100644 index 0000000..d11d923 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/NodeType.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public enum NodeType { + and,or,criteria,namedCriteria,objectType,terminal; + public static ReteNode newReteNodeInstance(NodeType type){ + switch(type){ + case and: + return new AndNode(); + case or: + return new OrNode(); + case criteria: + return new CriteriaNode(); + case namedCriteria: + return new NamedCriteriaNode(); + case objectType: + return new ObjectTypeNode(); + case terminal: + return new TerminalNode(); + } + return null; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ObjectTypeNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ObjectTypeNode.java new file mode 100644 index 0000000..38e26b4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ObjectTypeNode.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.ObjectTypeActivity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class ObjectTypeNode extends BaseReteNode{ + public static final String NON_CLASS="*"; + private String objectTypeClass; + private NodeType nodeType=NodeType.objectType; + public ObjectTypeNode() { + super(0); + } + public ObjectTypeNode(String objectTypeClass,int id) { + super(id); + this.objectTypeClass = objectTypeClass; + } + @Override + public NodeType getNodeType() { + return nodeType; + } + public boolean support(Object object){ + return support(object.getClass().getName()); + } + public boolean support(String className){ + return objectTypeClass.equals(className); + } + public String getObjectTypeClass() { + return objectTypeClass; + } + public void setObjectTypeClass(String objectTypeClass) { + this.objectTypeClass = objectTypeClass; + } + @Override + public Activity newActivity(Map context) { + Class targetClass=null; + ObjectTypeActivity activity=null; + try { + if(!objectTypeClass.equals(ObjectTypeNode.NON_CLASS)){ + targetClass = Class.forName(objectTypeClass); + } + activity=new ObjectTypeActivity(targetClass); + } catch (ClassNotFoundException e) { + activity=new ObjectTypeActivity(objectTypeClass); + } + for(Line line:lines){ + activity.addPath(line.newPath(context)); + } + return activity; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/OrNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/OrNode.java new file mode 100644 index 0000000..392d6fe --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/OrNode.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.OrActivity; + +import java.util.Map; + + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class OrNode extends JunctionNode { + private NodeType nodeType=NodeType.or; + public OrNode() { + super(0); + } + public OrNode(int id) { + super(id); + } + @Override + public NodeType getNodeType() { + return nodeType; + } + @Override + public Activity newActivity(Map context) { + if(context.containsKey(this)){ + return (OrActivity)context.get(this); + } + OrActivity or=new OrActivity(); + for(Line line:lines){ + or.addPath(line.newPath(context)); + } + context.put(this, or); + return or; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Rete.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Rete.java new file mode 100644 index 0000000..e427fa8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/Rete.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.runtime.rete.ObjectTypeActivity; +import com.itheima.sfbx.framework.rule.runtime.rete.ReteInstance; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class Rete implements Node { + private List objectTypeNodes; + private ResourceLibrary resourceLibrary; + public Rete() { + } + public Rete(List objectTypeNodes,ResourceLibrary resourceLibrary){ + this.objectTypeNodes = objectTypeNodes; + this.resourceLibrary=resourceLibrary; + } + public List getObjectTypeNodes() { + return objectTypeNodes; + } + public ResourceLibrary getResourceLibrary() { + return resourceLibrary; + } + + public ReteInstance newReteInstance(){ + List objectTypeActivities=new ArrayList(); + Map contextMap=new HashMap(); + for(ObjectTypeNode node:objectTypeNodes){ + objectTypeActivities.add((ObjectTypeActivity)node.newActivity(contextMap)); + } + return new ReteInstance(objectTypeActivities); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNode.java new file mode 100644 index 0000000..15d9859 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNode.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月12日 + */ +public abstract class ReteNode implements Node { + private int id; + public ReteNode(int id){ + this.id=id; + } + public abstract NodeType getNodeType(); + public abstract Activity newActivity(Map context); + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNodeJsonDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNodeJsonDeserializer.java new file mode 100644 index 0000000..b28c525 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/ReteNodeJsonDeserializer.java @@ -0,0 +1,276 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.AbstractJsonDeserializer; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import org.codehaus.jackson.JsonNode; +import org.codehaus.jackson.JsonParser; +import org.codehaus.jackson.JsonProcessingException; +import org.codehaus.jackson.ObjectCodec; +import org.codehaus.jackson.map.DeserializationContext; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Iterator; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class ReteNodeJsonDeserializer extends AbstractJsonDeserializer> { + @Override + public List deserialize(JsonParser jsonParser, DeserializationContext ctxt) throws IOException, JsonProcessingException { + ObjectCodec oc = jsonParser.getCodec(); + JsonNode jsonNode = oc.readTree(jsonParser); + List reteNodes=new ArrayList(); + Iterator childrenNodesIter=jsonNode.getElements(); + while(childrenNodesIter.hasNext()){ + JsonNode childNode=childrenNodesIter.next(); + int id=childNode.get("id").getIntValue(); + JsonNode nodeTypeNode = childNode.get("nodeType"); + if(nodeTypeNode==null){ + continue; + } + String nodeTypeText=nodeTypeNode.getTextValue(); + NodeType nodeType=NodeType.valueOf(nodeTypeText); + ReteNode reteNode=NodeType.newReteNodeInstance(nodeType); + if(reteNode instanceof ObjectTypeNode){ + ObjectTypeNode node=(ObjectTypeNode)reteNode; + node.setObjectTypeClass(childNode.get("objectTypeClass").getTextValue()); + node.setId(id); + }else if(reteNode instanceof AndNode){ + AndNode node=(AndNode)reteNode; + node.setId(id); + node.setToLineCount(childNode.get("toLineCount").getIntValue()); + node.setLines(parseLines(childNode)); + }else if(reteNode instanceof OrNode){ + OrNode node=(OrNode)reteNode; + node.setId(id); + node.setLines(parseLines(childNode)); + }else if(reteNode instanceof CriteriaNode){ + CriteriaNode node=(CriteriaNode)reteNode; + node.setId(id); + JsonNode criteriaNode=childNode.get("criteria"); + node.setCriteria(parseCriteria(criteriaNode)); + node.setLines(parseLines(childNode)); + }else if(reteNode instanceof NamedCriteriaNode){ + NamedCriteriaNode node=(NamedCriteriaNode)reteNode; + JsonNode criteriaNode=childNode.get("criteria"); + node.setCriteria(parseNamedCriteria(criteriaNode)); + node.setLines(parseLines(childNode)); + node.setId(id); + }else if(reteNode instanceof TerminalNode){ + TerminalNode node=(TerminalNode)reteNode; + node.setId(id); + node.setRule(parseRule(jsonParser,childNode)); + } + reteNodes.add(reteNode); + } + return reteNodes; + } + + private List parseLines(JsonNode node){ + JsonNode lineNodes=node.get("lines"); + if(lineNodes==null){ + return null; + } + List lines=new ArrayList(); + Iterator iter=lineNodes.iterator(); + while(iter.hasNext()){ + JsonNode jsonNode=iter.next(); + Line line=new Line(); + line.setFromNodeId(jsonNode.get("fromNodeId").getIntValue()); + line.setToNodeId(jsonNode.get("toNodeId").getIntValue()); + lines.add(line); + } + return lines; + } + + private NamedCriteria parseNamedCriteria(JsonNode jsonNode){ + NamedCriteria criteria=new NamedCriteria(); + criteria.setReferenceName(jsonNode.get("referenceName").getTextValue()); + criteria.setVariableCategory(jsonNode.get("variableCategory").getTextValue()); + JsonNode unitNode=jsonNode.get("unit"); + if(unitNode!=null){ + CriteriaUnit unit = parseCriteriaUnit(unitNode); + criteria.setUnit(unit); + } + return criteria; + } + + private CriteriaUnit parseCriteriaUnit(JsonNode unitNode) { + CriteriaUnit unit=new CriteriaUnit(); + JsonNode criteriaNode=unitNode.get("criteria"); + if(criteriaNode!=null){ + unit.setCriteria(parseCriteria(criteriaNode)); + } + JsonNode junctionTypeNode=unitNode.get("junctionType"); + if(junctionTypeNode!=null){ + unit.setJunctionType(JunctionType.valueOf(junctionTypeNode.getTextValue())); + } + JsonNode nextUnitNodes=unitNode.get("nextUnits"); + if(nextUnitNodes!=null){ + List nextUnits=new ArrayList(); + Iterator iter=nextUnitNodes.iterator(); + while(iter.hasNext()){ + JsonNode nextNode=iter.next(); + nextUnits.add(parseCriteriaUnit(nextNode)); + } + unit.setNextUnits(nextUnits); + } + return unit; + } + + + private Criteria parseCriteria(JsonNode jsonNode){ + Criteria criteria=new Criteria(); + String opText=jsonNode.get("op").getTextValue(); + Op op=Op.valueOf(opText); + criteria.setOp(op); + JsonNode leftJsonNode=jsonNode.get("left"); + Left left=new Left(); + criteria.setLeft(left); + String type=JsonUtils.getJsonValue(leftJsonNode, "type"); + JsonNode leftPartJsonNode=leftJsonNode.get("leftPart"); + left.setType(LeftType.valueOf(type)); + switch(left.getType()){ + case function: + FunctionLeftPart funPart=new FunctionLeftPart(); + funPart.setName(JsonUtils.getJsonValue(leftPartJsonNode, "name")); + funPart.setParameters(JsonUtils.parseParameters(leftPartJsonNode)); + left.setLeftPart(funPart); + break; + case method: + MethodLeftPart methodPart=new MethodLeftPart(); + methodPart.setBeanId(JsonUtils.getJsonValue(leftPartJsonNode, "beanId")); + methodPart.setBeanLabel(JsonUtils.getJsonValue(leftPartJsonNode, "beanLabel")); + methodPart.setMethodLabel(JsonUtils.getJsonValue(leftPartJsonNode, "methodLabel")); + methodPart.setMethodName(JsonUtils.getJsonValue(leftPartJsonNode, "methodName")); + methodPart.setParameters(JsonUtils.parseParameters(leftPartJsonNode)); + left.setLeftPart(methodPart); + break; + case eval: + EvalLeftPart evalPart=new EvalLeftPart(); + evalPart.setExpression(JsonUtils.getJsonValue(leftPartJsonNode, "expression")); + left.setLeftPart(evalPart); + break; + case all: + AllLeftPart allLeftPart=new AllLeftPart(); + String statisticTypeStr=JsonUtils.getJsonValue(leftPartJsonNode, "statisticType"); + StatisticType statisticType=StatisticType.valueOf(statisticTypeStr); + allLeftPart.setStatisticType(statisticType); + if(statisticType.equals(StatisticType.percent)){ + allLeftPart.setPercent(Integer.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "percent"))); + }else if(statisticType.equals(StatisticType.amount)){ + allLeftPart.setAmount(Integer.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "amount"))); + } + allLeftPart.setVariableCategory(JsonUtils.getJsonValue(leftPartJsonNode, "variableCategory")); + allLeftPart.setVariableLabel(JsonUtils.getJsonValue(leftPartJsonNode, "variableLabel")); + allLeftPart.setVariableName(JsonUtils.getJsonValue(leftPartJsonNode, "variableName")); + JsonNode multiConditionNode=leftPartJsonNode.get("multiCondition"); + allLeftPart.setMultiCondition(parseMultiCondition(multiConditionNode)); + left.setLeftPart(allLeftPart); + break; + case exist: + ExistLeftPart existLeftPart=new ExistLeftPart(); + String existStatisticTypeStr=JsonUtils.getJsonValue(leftPartJsonNode, "statisticType"); + StatisticType existStatisticType=StatisticType.valueOf(existStatisticTypeStr); + existLeftPart.setStatisticType(existStatisticType); + if(existStatisticType.equals(StatisticType.percent)){ + existLeftPart.setPercent(Integer.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "percent"))); + }else if(existStatisticType.equals(StatisticType.amount)){ + existLeftPart.setAmount(Integer.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "amount"))); + } + existLeftPart.setVariableCategory(JsonUtils.getJsonValue(leftPartJsonNode, "variableCategory")); + existLeftPart.setVariableLabel(JsonUtils.getJsonValue(leftPartJsonNode, "variableLabel")); + existLeftPart.setVariableName(JsonUtils.getJsonValue(leftPartJsonNode, "variableName")); + JsonNode existMultiConditionNode=leftPartJsonNode.get("multiCondition"); + existLeftPart.setMultiCondition(parseMultiCondition(existMultiConditionNode)); + left.setLeftPart(existLeftPart); + break; + case collect: + CollectLeftPart collectLeftPart=new CollectLeftPart(); + collectLeftPart.setVariableCategory(JsonUtils.getJsonValue(leftPartJsonNode, "variableCategory")); + collectLeftPart.setVariableLabel(JsonUtils.getJsonValue(leftPartJsonNode, "variableLabel")); + collectLeftPart.setVariableName(JsonUtils.getJsonValue(leftPartJsonNode, "variableName")); + collectLeftPart.setProperty(JsonUtils.getJsonValue(leftPartJsonNode, "property")); + collectLeftPart.setPurpose(CollectPurpose.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "purpose"))); + JsonNode collectMultiConditionNode=leftPartJsonNode.get("multiCondition"); + collectLeftPart.setMultiCondition(parseMultiCondition(collectMultiConditionNode)); + left.setLeftPart(collectLeftPart); + break; + case commonfunction: + CommonFunctionLeftPart functionPart=new CommonFunctionLeftPart(); + functionPart.setLabel(JsonUtils.getJsonValue(leftPartJsonNode, "label")); + functionPart.setName(JsonUtils.getJsonValue(leftPartJsonNode, "name")); + functionPart.setParameter(JsonUtils.parseCommonFunctionParameter(leftPartJsonNode)); + left.setLeftPart(functionPart); + break; + default: + VariableLeftPart varPart=new VariableLeftPart(); + varPart.setVariableCategory(JsonUtils.getJsonValue(leftPartJsonNode, "variableCategory")); + varPart.setVariableLabel(JsonUtils.getJsonValue(leftPartJsonNode, "variableLabel")); + varPart.setVariableName(JsonUtils.getJsonValue(leftPartJsonNode, "variableName")); + varPart.setDatatype(Datatype.valueOf(JsonUtils.getJsonValue(leftPartJsonNode, "datatype"))); + left.setLeftPart(varPart); + } + left.setArithmetic(parseSimpleArithmetic(leftJsonNode)); + Value value=JsonUtils.parseValue(jsonNode); + if(value!=null){ + criteria.setValue(value); + } + return criteria; + } + + + private MultiCondition parseMultiCondition(JsonNode multiConditionNode) { + MultiCondition condition=new MultiCondition(); + condition.setType(JunctionType.valueOf(JsonUtils.getJsonValue(multiConditionNode, "type"))); + Iterator iter=multiConditionNode.get("conditions").getElements(); + while(iter.hasNext()){ + JsonNode propertyCriteriaNode=iter.next(); + PropertyCriteria pc=new PropertyCriteria(); + pc.setOp(Op.valueOf(JsonUtils.getJsonValue(propertyCriteriaNode, "op"))); + pc.setProperty(JsonUtils.getJsonValue(propertyCriteriaNode, "property")); + pc.setValue(JsonUtils.parseValue(propertyCriteriaNode)); + condition.addCondition(pc); + } + return condition; + } + + private SimpleArithmetic parseSimpleArithmetic(JsonNode node){ + JsonNode arithNode=node.get("arithmetic"); + if(arithNode==null){ + return null; + } + SimpleArithmetic arith=new SimpleArithmetic(); + arith.setType(ArithmeticType.valueOf(JsonUtils.getJsonValue(arithNode, "type"))); + arith.setValue(parseSimpleArithmeticValue(arithNode)); + return arith; + } + + private SimpleArithmeticValue parseSimpleArithmeticValue(JsonNode node){ + JsonNode valueNode=node.get("value"); + SimpleArithmeticValue value=new SimpleArithmeticValue(); + value.setContent(valueNode.get("content").getTextValue()); + value.setArithmetic(parseSimpleArithmetic(valueNode)); + return value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/TerminalNode.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/TerminalNode.java new file mode 100644 index 0000000..66d8f2a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/TerminalNode.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete; + +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.rete.Activity; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.TerminalActivity; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class TerminalNode extends ReteNode { + private Rule rule; + private NodeType nodeType=NodeType.terminal; + public TerminalNode() { + super(0); + } + public TerminalNode(Rule rule,int id){ + super(id); + this.rule=rule; + } + @Override + public NodeType getNodeType() { + return nodeType; + } + public Rule[] enter(Context context, Object object) { + return new Rule[]{rule}; + } + public Rule getRule() { + return rule; + } + public void setRule(Rule rule) { + this.rule = rule; + } + @Override + public Activity newActivity(Map context) { + if(context.containsKey(this)){ + return (TerminalActivity)context.get(this); + } + TerminalActivity activity=new TerminalActivity(rule); + context.put(this, activity); + return activity; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/AndBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/AndBuilder.java new file mode 100644 index 0000000..7da4030 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/AndBuilder.java @@ -0,0 +1,90 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.rete.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.And; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月9日 + */ +public class AndBuilder extends JunctionBuilder{ + @Override + public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) { + And and=(And)c; + AndNode andNode=null; + ConditionNode currentCriteriaNode=null; + List criterions=and.getCriterions(); + if(criterions==null || criterions.size()==0){ + throw new RuleException("Condition join node[and] need one child at least."); + } + for(Criterion criterion:criterions){ + ReteNode node=buildCriterion(criterion, context, currentCriteriaNode); + if(node==null){ + continue; + } + if(node instanceof CriteriaNode){ + if(currentCriteriaNode!=null){ + List childrenNodes=currentCriteriaNode.getChildrenNodes(); + if(!childrenNodes.contains(node)){ + if(andNode==null){ + andNode=new AndNode(context.nextId()); + } + currentCriteriaNode.addLine(andNode); + } + } + currentCriteriaNode=(ConditionNode)node; + }else if(node instanceof JunctionNode){ + if(andNode==null){ + andNode=new AndNode(context.nextId()); + } + ((JunctionNode) node).addLine(andNode); + }else if(node instanceof NamedCriteriaNode){ + if(currentCriteriaNode!=null){ + List childrenNodes=currentCriteriaNode.getChildrenNodes(); + if(!childrenNodes.contains(node)){ + if(andNode==null){ + andNode=new AndNode(context.nextId()); + } + currentCriteriaNode.addLine(andNode); + } + } + currentCriteriaNode=(ConditionNode)node; + } + } + if(criterions.size()==1 && currentCriteriaNode!=null){ + return (BaseReteNode)currentCriteriaNode; + } + if(andNode==null){ + return (BaseReteNode)currentCriteriaNode; + } + if(andNode!=null && currentCriteriaNode!=null){ + currentCriteriaNode.addLine(andNode); + } + return andNode; + } + + @Override + public boolean support(Criterion criterion) { + return criterion instanceof And; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContext.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContext.java new file mode 100644 index 0000000..e7bdb6e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContext.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.rete.ObjectTypeNode; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriteria; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public interface BuildContext { + String getObjectType(BaseCriteria criteria); + ObjectTypeNode getObjectTypeNode(BaseCriteria criteria); + boolean assertSameType(BaseCriteria left,BaseCriteria right); + ResourceLibrary getResourceLibrary(); + ObjectTypeNode buildObjectTypeNode(String className); + int nextId(); + void setCurrentRule(Rule rule); + boolean currentRuleIsDebug(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContextImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContextImpl.java new file mode 100644 index 0000000..54ec379 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/BuildContextImpl.java @@ -0,0 +1,186 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rete.ObjectTypeNode; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class BuildContextImpl implements BuildContext { + private ResourceLibrary resourceLibrary; + private List objectTypeNodes; + private int id=0; + private Rule currentRule; + public BuildContextImpl(ResourceLibrary resourceLibrary,List objectTypeNodes) { + this.resourceLibrary = resourceLibrary; + this.objectTypeNodes = objectTypeNodes; + } + + public boolean assertSameType(BaseCriteria left, BaseCriteria right) { + VariableCategory leftCategory = fetchVariableCategory(left); + VariableCategory rightCategory = fetchVariableCategory(right); + if(leftCategory==null || rightCategory==null){ + return false; + } + return leftCategory.getClazz().equals(rightCategory.getClazz()); + } + + private VariableCategory fetchVariableCategory(BaseCriteria criteria) { + VariableCategory vc=null; + if(criteria instanceof Criteria){ + Criteria c=(Criteria)criteria; + LeftPart leftLeftPart=c.getLeft().getLeftPart(); + if(leftLeftPart instanceof VariableLeftPart){ + VariableLeftPart part=(VariableLeftPart)leftLeftPart; + vc=resourceLibrary.getVariableCategory(part.getVariableCategory()); + } + }else if(criteria instanceof NamedCriteria){ + NamedCriteria c=(NamedCriteria)criteria; + vc=resourceLibrary.getVariableCategory(c.getVariableCategory()); + }else{ + throw new RuleException("Unknow Criteria : "+criteria); + } + return vc; + } + + public ObjectTypeNode getObjectTypeNode(BaseCriteria criteria) { + String objectType=getObjectType(criteria); + return buildObjectTypeNode(objectType); + } + + @Override + public String getObjectType(BaseCriteria criteria) { + String className=null; + if(criteria instanceof Criteria){ + Criteria c=(Criteria)criteria; + LeftPart leftPart=c.getLeft().getLeftPart(); + if(leftPart instanceof VariableLeftPart){ + VariableLeftPart varPart=(VariableLeftPart)leftPart; + String variableCategory=varPart.getVariableCategory(); + VariableCategory category=resourceLibrary.getVariableCategory(variableCategory); + className=category.getClazz(); + }else if(leftPart instanceof AbstractLeftPart){ + AbstractLeftPart lp=(AbstractLeftPart)leftPart; + VariableCategory category=resourceLibrary.getVariableCategory(lp.getVariableCategory()); + className=category.getClazz(); + }else if(leftPart instanceof CommonFunctionLeftPart){ + CommonFunctionLeftPart funPart=(CommonFunctionLeftPart)leftPart; + CommonFunctionParameter parameter=funPart.getParameter(); + Value value=parameter.getObjectParameter(); + className = buildValueClass(value); + }else if(leftPart instanceof MethodLeftPart){ + MethodLeftPart methodLeftPart=(MethodLeftPart)leftPart; + List params=methodLeftPart.getParameters(); + if(params!=null && params.size()>0){ + Parameter param=params.get(0); + Value value=param.getValue(); + className = buildValueClass(value); + }else{ + className=ObjectTypeNode.NON_CLASS; + } + }else if(leftPart instanceof FunctionLeftPart){ + FunctionLeftPart funLeftPart=(FunctionLeftPart)leftPart; + List params=funLeftPart.getParameters(); + if(params!=null && params.size()>0){ + Parameter param=params.get(0); + Value value=param.getValue(); + className = buildValueClass(value); + }else{ + className=ObjectTypeNode.NON_CLASS; + } + }else{ + className=ObjectTypeNode.NON_CLASS; + } + }else if(criteria instanceof NamedCriteria){ + NamedCriteria c=(NamedCriteria)criteria; + VariableCategory category=resourceLibrary.getVariableCategory(c.getVariableCategory()); + className=category.getClazz(); + }else{ + throw new RuleException("Unknow Criteria : "+criteria); + } + return className; + } + + private String buildValueClass(Value value) { + String className; + if(value instanceof VariableValue){ + VariableValue varValue=(VariableValue)value; + String variableCategory=varValue.getVariableCategory(); + VariableCategory category=resourceLibrary.getVariableCategory(variableCategory); + className=category.getClazz(); + }else if(value instanceof ParameterValue){ + VariableCategory category=resourceLibrary.getVariableCategory(VariableCategory.PARAM_CATEGORY); + className=category.getClazz(); + }else if(value instanceof VariableCategoryValue){ + VariableCategoryValue categoryValue=(VariableCategoryValue)value; + VariableCategory category=resourceLibrary.getVariableCategory(categoryValue.getVariableCategory()); + className=category.getClazz(); + }else{ + className=ObjectTypeNode.NON_CLASS; + } + return className; + } + + @Override + public ObjectTypeNode buildObjectTypeNode(String className){ + ObjectTypeNode targetObjectTypeNode=null; + for(ObjectTypeNode typeNode:objectTypeNodes){ + if(typeNode.support(className)){ + targetObjectTypeNode=typeNode; + break; + } + } + if(targetObjectTypeNode==null){ + targetObjectTypeNode=new ObjectTypeNode(className,nextId()); + objectTypeNodes.add(targetObjectTypeNode); + } + return targetObjectTypeNode; + } + + @Override + public ResourceLibrary getResourceLibrary() { + return resourceLibrary; + } + + @Override + public int nextId() { + return id++; + } + + @Override + public void setCurrentRule(Rule rule) { + this.currentRule=rule; + } + @Override + public boolean currentRuleIsDebug() { + if(currentRule==null){ + return false; + } + if(currentRule.getDebug()!=null && currentRule.getDebug()){ + return true; + } + return false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriteriaBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriteriaBuilder.java new file mode 100644 index 0000000..5552528 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriteriaBuilder.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.model.rete.BaseReteNode; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; + +/** + * @author Jacky.gao + * @since 2016年9月9日 + */ +public class CriteriaBuilder extends CriterionBuilder{ + @Override + public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) { + Criteria criteria=(Criteria)c; + return buildCriteria(criteria,null,context); + } + @Override + public boolean support(Criterion criterion) { + return criterion instanceof Criteria; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriterionBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriterionBuilder.java new file mode 100644 index 0000000..344d515 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/CriterionBuilder.java @@ -0,0 +1,151 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rete.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; + +import java.util.List; + +public abstract class CriterionBuilder{ + public abstract BaseReteNode buildCriterion(BaseCriterion c,BuildContext context); + public abstract boolean support(Criterion criterion); + + protected BaseReteNode buildCriteria(Criteria criteria,ConditionNode prevNode,BuildContext context) { + String objectType=context.getObjectType(criteria); + if(prevNode!=null && !(prevNode instanceof NamedCriteriaNode)){ + CriteriaNode targetNode=null; + String prevObjectType=context.getObjectType(prevNode.getCriteria()); + if(objectType.equals(prevObjectType)){ + List prevChildrenNodes=prevNode.getChildrenNodes(); + targetNode = fetchSameCriteriaNode(criteria, prevChildrenNodes); + if(targetNode==null){ + targetNode=new CriteriaNode((Criteria)criteria,context.nextId(),context.currentRuleIsDebug()); + prevNode.addLine(targetNode); + } + }else{ + targetNode=buildCriteriaNode(criteria,context,objectType); + } + return targetNode; + }else{ + CriteriaNode criteriaNode=buildCriteriaNode(criteria,context,objectType); + return criteriaNode; + } + } + + /** + * 带reference name的条件比较特殊,它不需要判断是否有父节点,需要将所有节点都直接挂在ObjectTypeNode下 + * @param criteria 命名条件对象 + * @param prevNode 上一节点对象 + * @param context 上下文对象 + * @return 返回命名条件节点对象 + */ + protected NamedCriteriaNode buildNamedCriteria(NamedCriteria criteria,ConditionNode prevNode,BuildContext context){ + /*if(prevNode!=null){ + NamedCriteriaNode targetNode=null; + String objectType=context.getObjectType(criteria); + String prevObjectType=context.getObjectType(criteria); + if(objectType.equals(prevObjectType)){ + List prevChildrenNodes=prevNode.getChildrenNodes(); + targetNode = fetchExistNamedCriteriaNode(criteria, prevChildrenNodes); + if(targetNode==null){ + targetNode=new NamedCriteriaNode(criteria,context.nextId()); + prevNode.addLine(targetNode); + } + }else{ + targetNode=buildNewTypeNamedCriteria(criteria,context); + } + return targetNode; + }else{ + NamedCriteriaNode node=buildNewTypeNamedCriteria(criteria,context); + return node; + }*/ + NamedCriteriaNode node=buildNewTypeNamedCriteria(criteria,context); + return node; + } + + + private CriteriaNode buildCriteriaNode(BaseCriteria criteria,BuildContext context,String objectType) { + ObjectTypeNode targetObjectTypeNode=context.buildObjectTypeNode(objectType); + List childrenNodes=targetObjectTypeNode.getChildrenNodes(); + CriteriaNode targetNode = fetchSameCriteriaNode(criteria, childrenNodes); + if(targetNode==null){ + targetNode=new CriteriaNode((Criteria)criteria,context.nextId(),context.currentRuleIsDebug()); + targetObjectTypeNode.addLine(targetNode); + } + return targetNode; + } + + private NamedCriteriaNode buildNewTypeNamedCriteria(NamedCriteria criteria,BuildContext context) { + VariableCategory category=context.getResourceLibrary().getVariableCategory(criteria.getVariableCategory()); + String objectType=category.getClazz(); + ObjectTypeNode targetObjectTypeNode=context.buildObjectTypeNode(objectType); + List childrenNodes=targetObjectTypeNode.getChildrenNodes(); + NamedCriteriaNode targetNode = fetchExistNamedCriteriaNode(criteria,childrenNodes); + if(targetNode==null){ + targetNode=new NamedCriteriaNode(criteria,context.nextId(),context.currentRuleIsDebug()); + targetObjectTypeNode.addLine(targetNode); + } + return targetNode; + } + + private CriteriaNode fetchSameCriteriaNode(BaseCriteria criteria,List childrenNodes) { + String conditionId=criteria.getId(); + CriteriaNode targetNode=null; + for(Node node:childrenNodes){ + if(!(node instanceof ConditionNode)){ + continue; + } + if(criteria instanceof Criteria){ + if(!(node instanceof CriteriaNode)){ + continue; + } + } + if(criteria instanceof NamedCriteria){ + if(!(node instanceof NamedCriteriaNode)){ + continue; + } + } + ConditionNode baseNode=(ConditionNode)node; + String nodeId=baseNode.getCriteriaInfo(); + if(nodeId.equals(conditionId)){ + targetNode=(CriteriaNode)baseNode; + break; + } + } + return targetNode; + } + + + private NamedCriteriaNode fetchExistNamedCriteriaNode(NamedCriteria criteria,List childrenNodes) { + String conditionId=criteria.getId(); + NamedCriteriaNode targetNode=null; + for(Node node:childrenNodes){ + if(!(node instanceof NamedCriteriaNode)){ + continue; + } + NamedCriteriaNode baseNode=(NamedCriteriaNode)node; + String nodeId=baseNode.getCriteriaInfo(); + if(nodeId.equals(conditionId)){ + targetNode=baseNode; + break; + } + } + return targetNode; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/JunctionBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/JunctionBuilder.java new file mode 100644 index 0000000..5acc0f4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/JunctionBuilder.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.model.rete.BaseReteNode; +import com.itheima.sfbx.framework.rule.model.rete.ConditionNode; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Junction; +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedCriteria; + +public abstract class JunctionBuilder extends CriterionBuilder{ + protected BaseReteNode buildCriterion(Criterion criterion,BuildContext context,ConditionNode prevCriteriaNode){ + if(criterion instanceof Junction){ + Junction junction=(Junction)criterion; + return ReteBuilder.buildCriterion(context, junction); + }else if(criterion instanceof Criteria){ + Criteria criteria=(Criteria)criterion; + return buildCriteria(criteria,prevCriteriaNode,context); + }else if(criterion instanceof NamedCriteria){ + NamedCriteria criteria=(NamedCriteria)criterion; + return buildNamedCriteria(criteria, prevCriteriaNode, context); + } + return null; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/NamedCriteriaBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/NamedCriteriaBuilder.java new file mode 100644 index 0000000..b36e9fa --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/NamedCriteriaBuilder.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.model.rete.BaseReteNode; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedCriteria; + +/** + * @author Jacky.gao + * @since 2016年9月12日 + */ +public class NamedCriteriaBuilder extends CriterionBuilder { + + @Override + public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) { + NamedCriteria criteria=(NamedCriteria)c; + return buildNamedCriteria(criteria,null,context); + } + + @Override + public boolean support(Criterion criterion) { + return criterion instanceof NamedCriteria; + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/OrBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/OrBuilder.java new file mode 100644 index 0000000..d055181 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/OrBuilder.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.rete.BaseReteNode; +import com.itheima.sfbx.framework.rule.model.rete.OrNode; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Or; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月9日 + */ +public class OrBuilder extends JunctionBuilder{ + @Override + public BaseReteNode buildCriterion(BaseCriterion c, BuildContext context) { + Or or=(Or)c; + List criterions=or.getCriterions(); + if(criterions==null || criterions.size()==0){ + throw new RuleException("Condition join node[or] need one child at least."); + } + List childNodes=new ArrayList(); + for(Criterion criterion:criterions){ + BaseReteNode node=buildCriterion(criterion, context , null); + if(node==null){ + continue; + } + childNodes.add(node); + } + if(childNodes.size()==0){ + return null; + } + if(childNodes.size()==1){ + return childNodes.get(0); + } + OrNode orNode=new OrNode(context.nextId()); + for(BaseReteNode node:childNodes){ + node.addLine(orNode); + } + return orNode; + } + @Override + public boolean support(Criterion criterion) { + return criterion instanceof Or; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/ReteBuilder.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/ReteBuilder.java new file mode 100644 index 0000000..f1a6eb7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/builder/ReteBuilder.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.builder; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.rete.*; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月9日 + */ +public class ReteBuilder implements ApplicationContextAware{ + public static final String BEAN_ID="urule.reteBuilder"; + private static Collection criterionBuilders; + public Rete buildRete(List rules,ResourceLibrary resourceLibrary){ + List objectTypeNodes=new ArrayList(); + Rete rete=new Rete(objectTypeNodes,resourceLibrary); + BuildContext context=new BuildContextImpl(resourceLibrary,objectTypeNodes); + for(Rule rule:rules){ + if(rule instanceof LoopRule)continue; + if(rule.getLhs()==null || rule.getLhs().getCriterion()==null)continue; + buildBranch(rule,context); + } + return rete; + } + + private void buildBranch(Rule rule,BuildContext context){ + context.setCurrentRule(rule); + Criterion criterion=rule.getLhs().getCriterion(); + BaseReteNode prevNode = buildCriterion(context, criterion); + if(prevNode instanceof JunctionNode){ + JunctionNode junctionNode=(JunctionNode)prevNode; + List toConnections=junctionNode.getToConnections(); + if(toConnections.size()==1){ + Line conn=toConnections.get(0); + Node fromNode=conn.getFrom(); + if(fromNode instanceof CriteriaNode){ + CriteriaNode cnode=(CriteriaNode)fromNode; + cnode.getLines().remove(conn); + prevNode=cnode; + } + } + } + TerminalNode terminalNode=new TerminalNode(rule,context.nextId()); + prevNode.addLine(terminalNode); + } + + public static BaseReteNode buildCriterion(BuildContext context,Criterion criterion) { + BaseReteNode prevNode=null; + for(CriterionBuilder criterionBuilder:criterionBuilders){ + if(criterionBuilder.support(criterion)){ + prevNode=criterionBuilder.buildCriterion((BaseCriterion)criterion, context); + break; + } + } + if(prevNode==null){ + throw new RuleException("Unknow criterion : "+criterion); + } + return prevNode; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { + ReteBuilder.criterionBuilders=applicationContext.getBeansOfType(CriterionBuilder.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/CommonFunctionValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/CommonFunctionValueDeserializer.java new file mode 100644 index 0000000..65b4bf9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/CommonFunctionValueDeserializer.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.CommonFunctionValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年7月30日 + */ +public class CommonFunctionValueDeserializer implements ValueDeserializer { + @Override + public Value deserialize(JsonNode jsonNode) { + CommonFunctionValue value=new CommonFunctionValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + value.setLabel(JsonUtils.getJsonValue(jsonNode, "label")); + value.setName(JsonUtils.getJsonValue(jsonNode, "name")); + value.setParameter(JsonUtils.parseCommonFunctionParameter(jsonNode)); + value.setValueType(ValueType.CommonFunction); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.CommonFunction); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ConstantValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ConstantValueDeserializer.java new file mode 100644 index 0000000..6c942bb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ConstantValueDeserializer.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.ConstantValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class ConstantValueDeserializer implements ValueDeserializer { + @Override + public Value deserialize(JsonNode jsonNode) { + ConstantValue value=new ConstantValue(); + value.setConstantCategory(JsonUtils.getJsonValue(jsonNode, "constantCategory")); + value.setConstantLabel(JsonUtils.getJsonValue(jsonNode, "constantLabel")); + value.setConstantName(JsonUtils.getJsonValue(jsonNode, "constantName")); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Constant); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/InputValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/InputValueDeserializer.java new file mode 100644 index 0000000..8cba52e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/InputValueDeserializer.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.SimpleValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class InputValueDeserializer implements ValueDeserializer { + + @Override + public Value deserialize(JsonNode jsonNode) { + SimpleValue value=new SimpleValue(); + value.setContent(JsonUtils.getJsonValue(jsonNode, "content")); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Input); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/MethodValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/MethodValueDeserializer.java new file mode 100644 index 0000000..d91abbd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/MethodValueDeserializer.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.MethodValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class MethodValueDeserializer implements ValueDeserializer { + + @Override + public Value deserialize(JsonNode jsonNode) { + MethodValue value=new MethodValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + value.setBeanId(JsonUtils.getJsonValue(jsonNode, "beanId")); + value.setBeanLabel(JsonUtils.getJsonValue(jsonNode, "beanLabel")); + value.setMethodLabel(JsonUtils.getJsonValue(jsonNode, "methodLabel")); + value.setMethodName(JsonUtils.getJsonValue(jsonNode, "methodName")); + value.setParameters(JsonUtils.parseParameters(jsonNode)); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Method); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/NameReferenceValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/NameReferenceValueDeserializer.java new file mode 100644 index 0000000..29d3e76 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/NameReferenceValueDeserializer.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.NamedReferenceValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2016年8月16日 + */ +public class NameReferenceValueDeserializer implements ValueDeserializer { + @Override + public Value deserialize(JsonNode jsonNode) { + NamedReferenceValue value=new NamedReferenceValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + String datatypeText=JsonUtils.getJsonValue(jsonNode, "datatype"); + if(datatypeText!=null){ + value.setDatatype(Datatype.valueOf(datatypeText)); + } + value.setReferenceName(JsonUtils.getJsonValue(jsonNode, "referenceName")); + value.setPropertyLabel(JsonUtils.getJsonValue(jsonNode, "propertyLabel")); + value.setPropertyName(JsonUtils.getJsonValue(jsonNode, "propertyName")); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.NamedReference); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParameterValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParameterValueDeserializer.java new file mode 100644 index 0000000..b9d887d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParameterValueDeserializer.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.ParameterValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年5月26日 + */ +public class ParameterValueDeserializer implements ValueDeserializer { + + @Override + public Value deserialize(JsonNode jsonNode) { + ParameterValue value=new ParameterValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + value.setVariableLabel(JsonUtils.getJsonValue(jsonNode, "variableLabel")); + value.setVariableName(JsonUtils.getJsonValue(jsonNode, "variableName")); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Parameter); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParenValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParenValueDeserializer.java new file mode 100644 index 0000000..cfc2fff --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ParenValueDeserializer.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.ParenValue; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年6月15日 + */ +public class ParenValueDeserializer implements ValueDeserializer { + + @Override + public Value deserialize(JsonNode jsonNode) { + ParenValue value=new ParenValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + value.setValue(JsonUtils.parseValue(jsonNode)); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Paren); + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ValueDeserializer.java new file mode 100644 index 0000000..e985464 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/ValueDeserializer.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public interface ValueDeserializer { + Value deserialize(JsonNode jsonNode); + boolean support(ValueType type); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableCategoryValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableCategoryValueDeserializer.java new file mode 100644 index 0000000..d68db7b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableCategoryValueDeserializer.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import com.itheima.sfbx.framework.rule.model.rule.VariableCategoryValue; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class VariableCategoryValueDeserializer implements ValueDeserializer { + + @Override + public Value deserialize(JsonNode jsonNode) { + VariableCategoryValue value=new VariableCategoryValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + value.setVariableCategory(JsonUtils.getJsonValue(jsonNode, "variableCategory")); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.VariableCategory); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableValueDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableValueDeserializer.java new file mode 100644 index 0000000..acf2d10 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rete/jsondeserializer/VariableValueDeserializer.java @@ -0,0 +1,48 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rete.jsondeserializer; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.ValueType; +import com.itheima.sfbx.framework.rule.model.rule.VariableValue; +import org.codehaus.jackson.JsonNode; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class VariableValueDeserializer implements ValueDeserializer { + @Override + public Value deserialize(JsonNode jsonNode) { + VariableValue value=new VariableValue(); + value.setArithmetic(JsonUtils.parseComplexArithmetic(jsonNode)); + String datatypeText=JsonUtils.getJsonValue(jsonNode, "datatype"); + if(datatypeText!=null){ + value.setDatatype(Datatype.valueOf(datatypeText)); + } + value.setVariableCategory(JsonUtils.getJsonValue(jsonNode, "variableCategory")); + value.setVariableLabel(JsonUtils.getJsonValue(jsonNode, "variableLabel")); + value.setVariableName(JsonUtils.getJsonValue(jsonNode, "variableName")); + return value; + } + + @Override + public boolean support(ValueType type) { + return type.equals(ValueType.Variable); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/AbstractValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/AbstractValue.java new file mode 100644 index 0000000..9f6faef --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/AbstractValue.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public abstract class AbstractValue implements Value { + protected ComplexArithmetic arithmetic; + public ComplexArithmetic getArithmetic() { + return arithmetic; + } + + public void setArithmetic(ComplexArithmetic arithmetic) { + this.arithmetic = arithmetic; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Arithmetic.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Arithmetic.java new file mode 100644 index 0000000..7ea0555 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Arithmetic.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public abstract class Arithmetic { + protected ArithmeticType type; + public ArithmeticType getType() { + return type; + } + public void setType(ArithmeticType type) { + this.type = type; + } + public abstract String getId(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ArithmeticType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ArithmeticType.java new file mode 100644 index 0000000..d44aa4d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ArithmeticType.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.RuleException; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public enum ArithmeticType { + Add{ + @Override + public String toString() { + return "+"; + } + }, + Sub{ + @Override + public String toString() { + return "-"; + } + }, + Mul{ + @Override + public String toString() { + return "*"; + } + }, + Div{ + @Override + public String toString() { + return "/"; + } + }, + Mod{ + @Override + public String toString() { + return "%"; + } + }; + public static ArithmeticType parse(String type){ + if(type.equals("+")){ + return Add; + }else if(type.equals("-")){ + return Sub; + }else if(type.equals("*")){ + return Mul; + }else if(type.equals("/")){ + return Div; + }else if(type.equals("%")){ + return Mod; + } + throw new RuleException("Unsupport arithmetic type ["+type+"]"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/CommonFunctionValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/CommonFunctionValue.java new file mode 100644 index 0000000..2fccd74 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/CommonFunctionValue.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2015年7月28日 + */ +public class CommonFunctionValue extends AbstractValue{ + @JsonIgnore + private String id; + private String name; + private String label; + private CommonFunctionParameter parameter; + private ValueType valueType=ValueType.CommonFunction; + @Override + public String getId() { + if(id==null){ + id= "[函数]"+label+"("+parameter.getId()+")"; + } + return id; + } + @Override + public ValueType getValueType() { + return valueType; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public void setValueType(ValueType valueType) { + this.valueType = valueType; + } + public CommonFunctionParameter getParameter() { + return parameter; + } + public void setParameter(CommonFunctionParameter parameter) { + this.parameter = parameter; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ComplexArithmetic.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ComplexArithmetic.java new file mode 100644 index 0000000..c4479f5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ComplexArithmetic.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public class ComplexArithmetic extends Arithmetic { + private Value value; + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } + @Override + public String getId() { + String id=type.toString()+value.getId(); + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ConstantValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ConstantValue.java new file mode 100644 index 0000000..ea774a5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ConstantValue.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class ConstantValue extends AbstractValue{ + private String constantName; + private String constantLabel; + private String constantCategory; + private ValueType valueType=ValueType.Constant; + public String getConstantName() { + return constantName; + } + public void setConstantName(String constantName) { + this.constantName = constantName; + } + public String getConstantLabel() { + return constantLabel; + } + public void setConstantLabel(String constantLabel) { + this.constantLabel = constantLabel; + } + public String getConstantCategory() { + return constantCategory; + } + public void setConstantCategory(String constantCategory) { + this.constantCategory = constantCategory; + } + public ValueType getValueType() { + return valueType; + } + public String getId() { + String id="[常量]"+constantCategory+"."+constantLabel; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Library.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Library.java new file mode 100644 index 0000000..57a34f8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Library.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月30日 + */ +public class Library { + private String path; + private String version; + private LibraryType type; + public Library() { + } + public Library(String path,String version,LibraryType type) { + this.path = path; + this.version=version; + this.type = type; + } + public void setPath(String path) { + this.path = path; + } + public String getPath() { + return path; + } + public LibraryType getType() { + return type; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } + public void setType(LibraryType type) { + this.type = type; + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/LibraryType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/LibraryType.java new file mode 100644 index 0000000..c8241ea --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/LibraryType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月30日 + */ +public enum LibraryType { + Variable,Constant,Action,Parameter; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/MethodValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/MethodValue.java new file mode 100644 index 0000000..51d6d1f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/MethodValue.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public class MethodValue extends AbstractValue { + private String beanId; + private String beanLabel; + private String methodLabel; + private String methodName; + private List parameters; + private ValueType valueType=ValueType.Method; + @Override + public ValueType getValueType() { + return valueType; + } + + @Override + public String getId() { + String id="[BEAN]["+beanId+"."+methodName+"]"; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } + + public String getBeanId() { + return beanId; + } + + public void setBeanId(String beanId) { + this.beanId = beanId; + } + + public String getBeanLabel() { + return beanLabel; + } + + public void setBeanLabel(String beanLabel) { + this.beanLabel = beanLabel; + } + + public String getMethodLabel() { + return methodLabel; + } + + public void setMethodLabel(String methodLabel) { + this.methodLabel = methodLabel; + } + + public String getMethodName() { + return methodName; + } + + public void setMethodName(String methodName) { + this.methodName = methodName; + } + + public List getParameters() { + return parameters; + } + + public void setParameters(List parameters) { + this.parameters = parameters; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/NamedReferenceValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/NamedReferenceValue.java new file mode 100644 index 0000000..c4baf92 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/NamedReferenceValue.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2016年8月16日 + */ +public class NamedReferenceValue extends AbstractValue{ + private String referenceName; + private String propertyLabel; + private String propertyName; + private Datatype datatype; + + @Override + public String getId() { + String id="[REF]"+referenceName+"."+propertyLabel; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } + @Override + public ValueType getValueType() { + return ValueType.NamedReference; + } + public String getReferenceName() { + return referenceName; + } + public void setReferenceName(String referenceName) { + this.referenceName = referenceName; + } + public String getPropertyLabel() { + return propertyLabel; + } + public void setPropertyLabel(String propertyLabel) { + this.propertyLabel = propertyLabel; + } + public String getPropertyName() { + return propertyName; + } + public void setPropertyName(String propertyName) { + this.propertyName = propertyName; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Op.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Op.java new file mode 100644 index 0000000..6ac3bec --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Op.java @@ -0,0 +1,171 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.RuleException; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public enum Op { + Equals{ + @Override + public String toString() { + return "等于"; + } + },EqualsIgnoreCase{ + @Override + public String toString() { + return "等于(不分大小写)"; + } + }, NotEquals{ + @Override + public String toString() { + return "不等于"; + } + }, NotEqualsIgnoreCase{ + @Override + public String toString() { + return "不等于(不分大小写)"; + } + }, LessThen{ + @Override + public String toString() { + return "小于"; + } + }, LessThenEquals{ + @Override + public String toString() { + return "小于等于"; + } + }, GreaterThen{ + @Override + public String toString() { + return "大于"; + } + }, GreaterThenEquals{ + @Override + public String toString() { + return "大于等于"; + } + }, In{ + @Override + public String toString() { + return "在集合中"; + } + }, NotIn{ + @Override + public String toString() { + return "不在集合中"; + } + }, StartWith{ + @Override + public String toString() { + return "开始于"; + } + }, NotStartWith{ + @Override + public String toString() { + return "不开始于"; + } + }, EndWith{ + @Override + public String toString() { + return "结束于"; + } + }, NotEndWith{ + @Override + public String toString() { + return "不结束于"; + } + }, Null{ + @Override + public String toString() { + return "为空"; + } + }, NotNull{ + @Override + public String toString() { + return "不为空"; + } + }, Match{ + @Override + public String toString() { + return "匹配"; + } + }, NotMatch{ + @Override + public String toString() { + return "不匹配"; + } + }, Contain{ + @Override + public String toString() { + return "包含"; + } + }, NotContain{ + @Override + public String toString() { + return "不包含"; + } + }; + + public static Op parse(String op){ + if(op.equals(">")){ + return GreaterThen; + }else if(op.equals(">=")){ + return GreaterThenEquals; + }else if(op.equals("==")){ + return Equals; + }else if(op.equals("EqualsIgnoreCase")){ + return EqualsIgnoreCase; + }else if(op.equals("!=")){ + return NotEquals; + }else if(op.equals("NotEqualsIgnoreCase")){ + return NotEqualsIgnoreCase; + }else if(op.equals("<")){ + return LessThen; + }else if(op.equals("<=")){ + return LessThenEquals; + }else if(op.equals("In")){ + return In; + }else if(op.equals("NotIn")){ + return NotIn; + }else if(op.equals("StartWith")){ + return StartWith; + }else if(op.equals("NotStartWidth")){ + return NotStartWith; + }else if(op.equals("EndWith")){ + return EndWith; + }else if(op.equals("NotEndWith")){ + return NotEndWith; + }else if(op.equals("Null")){ + return Null; + }else if(op.equals("Notnull")){ + return NotNull; + }else if(op.equals("Match")){ + return Match; + }else if(op.equals("NotMatch")){ + return NotMatch; + }else if(op.equals("Contain")){ + return Contain; + }else if(op.equals("NotContain")){ + return NotContain; + } + throw new RuleException("Unsupport op "+op+""); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Other.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Other.java new file mode 100644 index 0000000..9bd4938 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Other.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.action.Action; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年5月4日 + */ +public class Other { + private List actions; + + public List getActions() { + return actions; + } + + public void setActions(List actions) { + this.actions = actions; + } + + public void addAction(Action action) { + if(actions==null){ + actions=new ArrayList(); + } + actions.add(action); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Parameter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Parameter.java new file mode 100644 index 0000000..b7822e6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Parameter.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2014年12月31日 + */ +public class Parameter { + @JsonIgnore + private String id; + private String name; + private Datatype type; + private Value value; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Datatype getType() { + return type; + } + public void setType(Datatype type) { + this.type = type; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } + public String getId() { + if(id==null){ + if(value==null){ + throw new RuleException("Parameter ["+name+"] not assignment value."); + } + id=value.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParameterValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParameterValue.java new file mode 100644 index 0000000..207cd1f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParameterValue.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2015年3月10日 + */ +public class ParameterValue extends AbstractValue { + private String variableName; + private String variableLabel; + private ValueType valueType=ValueType.Parameter; + @Override + public ValueType getValueType() { + return valueType; + } + + public String getVariableName() { + return variableName; + } + + + public void setVariableName(String variableName) { + this.variableName = variableName; + } + + + public String getVariableLabel() { + return variableLabel; + } + + + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + + + @Override + public String getId() { + String id="[P]参数."+variableLabel; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParenValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParenValue.java new file mode 100644 index 0000000..151a6ee --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ParenValue.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2015年6月14日 + */ +public class ParenValue extends AbstractValue { + private Value value; + @Override + public String getId() { + String id="("; + if(value!=null){ + id+=value.getId(); + } + id+=")"; + return id; + } + @Override + public ValueType getValueType() { + return ValueType.Paren; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rhs.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rhs.java new file mode 100644 index 0000000..22ee556 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rhs.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.action.Action; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public class Rhs { + private List actions; + + public List getActions() { + return actions; + } + + public void setActions(List actions) { + this.actions = actions; + Collections.sort(actions); + } + + public void addAction(Action action) { + if(actions==null){ + actions=new ArrayList(); + } + actions.add(action); + Collections.sort(actions); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rule.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rule.java new file mode 100644 index 0000000..3c35766 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Rule.java @@ -0,0 +1,141 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Lhs; + +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public class Rule implements RuleInfo{ + private String name; + private Integer salience; + private Date effectiveDate; + private Date expiresDate; + private Boolean enabled; + private Boolean debug; + private String activationGroup; + private String agendaGroup; + private Boolean autoFocus; + private String ruleflowGroup; + private Lhs lhs; + private Rhs rhs; + private Other other; + private Boolean loop; + private Boolean loopRule=false; + private String remark; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Date getEffectiveDate() { + return effectiveDate; + } + public Integer getSalience() { + return salience; + } + public void setSalience(Integer salience) { + this.salience = salience; + } + public Boolean getEnabled() { + return enabled; + } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + public Boolean getDebug() { + return debug; + } + public void setDebug(Boolean debug) { + this.debug = debug; + } + public Boolean getAutoFocus() { + return autoFocus; + } + public void setAutoFocus(Boolean autoFocus) { + this.autoFocus = autoFocus; + } + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + public Date getExpiresDate() { + return expiresDate; + } + public void setExpiresDate(Date expiresDate) { + this.expiresDate = expiresDate; + } + public String getActivationGroup() { + return activationGroup; + } + public void setActivationGroup(String activationGroup) { + this.activationGroup = activationGroup; + } + public String getAgendaGroup() { + return agendaGroup; + } + public void setAgendaGroup(String agendaGroup) { + this.agendaGroup = agendaGroup; + } + public String getRuleflowGroup() { + return ruleflowGroup; + } + public void setRuleflowGroup(String ruleflowGroup) { + this.ruleflowGroup = ruleflowGroup; + } + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public Lhs getLhs() { + return lhs; + } + public void setLhs(Lhs lhs) { + this.lhs = lhs; + } + public Rhs getRhs() { + return rhs; + } + public void setRhs(Rhs rhs) { + this.rhs = rhs; + } + public Other getOther() { + return other; + } + public void setOther(Other other) { + this.other = other; + } + + public Boolean getLoop() { + return loop; + } + public void setLoop(Boolean loop) { + this.loop = loop; + } + public Boolean isLoopRule() { + return loopRule; + } + public void setLoopRule(Boolean loopRule) { + this.loopRule = loopRule; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleInfo.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleInfo.java new file mode 100644 index 0000000..1741f96 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleInfo.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月27日 + */ +public interface RuleInfo { + String getName(); + Date getEffectiveDate(); + Integer getSalience(); + Boolean getEnabled(); + Boolean getAutoFocus(); + Date getExpiresDate(); + String getActivationGroup(); + String getAgendaGroup(); + String getRuleflowGroup(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleSet.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleSet.java new file mode 100644 index 0000000..7116df6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/RuleSet.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月30日 + */ +public class RuleSet { + private String remark; + private List libraries; + private List rules; + + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + public void addLibrary(Library library) { + if(this.libraries==null){ + this.libraries=new ArrayList(); + } + this.libraries.add(library); + } + public List getRules() { + return rules; + } + public void setRules(List rules) { + this.rules = rules; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmetic.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmetic.java new file mode 100644 index 0000000..b8d376a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmetic.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public class SimpleArithmetic extends Arithmetic { + private SimpleArithmeticValue value; + + public SimpleArithmeticValue getValue() { + return value; + } + + public void setValue(SimpleArithmeticValue value) { + this.value = value; + } + @Override + public String getId() { + String id=type.toString()+value.getId(); + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmeticValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmeticValue.java new file mode 100644 index 0000000..fc27f1c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleArithmeticValue.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class SimpleArithmeticValue { + private String content; + private SimpleArithmetic arithmetic; + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + public SimpleArithmetic getArithmetic() { + return arithmetic; + } + public void setArithmetic(SimpleArithmetic arithmetic) { + this.arithmetic = arithmetic; + } + public String getId(){ + String id=content; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleValue.java new file mode 100644 index 0000000..34dcc71 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/SimpleValue.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class SimpleValue extends AbstractValue{ + private String content; + private ValueType valueType=ValueType.Input; + public ValueType getValueType() { + return valueType; + } + public String getContent() { + return content; + } + public void setContent(String content) { + this.content = content; + } + public String getId() { + String id="[字符]"+content; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Value.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Value.java new file mode 100644 index 0000000..d44dbc4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/Value.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public interface Value { + ComplexArithmetic getArithmetic(); + ValueType getValueType(); + String getId(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ValueType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ValueType.java new file mode 100644 index 0000000..c5648d0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/ValueType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public enum ValueType { + Input,Variable,Constant,VariableCategory,Method,Parameter,Paren,CommonFunction,NamedReference; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableCategoryValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableCategoryValue.java new file mode 100644 index 0000000..a953c41 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableCategoryValue.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public class VariableCategoryValue extends AbstractValue { + private String variableCategory; + private ValueType valueType=ValueType.VariableCategory; + public VariableCategoryValue() { + } + public VariableCategoryValue(String variableCategory) { + this.variableCategory=variableCategory; + } + + @Override + public ValueType getValueType() { + return valueType; + } + + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + + @Override + public String getId() { + String id="[变量对象]"+variableCategory; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } + public String getVariableCategory() { + return variableCategory; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableValue.java new file mode 100644 index 0000000..1b62c9e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/VariableValue.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class VariableValue extends AbstractValue{ + private String variableName; + private String variableLabel; + private String variableCategory; + private Datatype datatype; + private ValueType valueType=ValueType.Variable; + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + public ValueType getValueType() { + return valueType; + } + public String getId() { + String id="[变量]"+variableCategory+"."+variableLabel; + if(arithmetic!=null){ + id+=arithmetic.getId(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AbstractLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AbstractLeftPart.java new file mode 100644 index 0000000..4013b0d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AbstractLeftPart.java @@ -0,0 +1,100 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + + +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public abstract class AbstractLeftPart implements LeftPart { + protected String id; + protected String variableName; + protected String variableLabel; + protected String variableCategory; + protected MultiCondition multiCondition; + protected ExprValue computeValue(EvaluationContext context,Object obj,List allMatchedObjects){ + ExprValue value=new ExprValue(); + Collection facts=getTargetFacts(context, obj); + int total=facts.size(); + int match=0; + int notMatch=0; + List matchFacts=new ArrayList(); + for(Object fact:facts){ + boolean result=true; + if(multiCondition!=null){ + result=multiCondition.evaluate(context, fact, allMatchedObjects); + } + if(result){ + match++; + matchFacts.add(fact); + }else{ + notMatch++; + } + } + value.setFacts(matchFacts); + value.setMatch(match); + value.setTotal(total); + value.setNotMatch(notMatch); + return value; + } + private Collection getTargetFacts(EvaluationContext context,Object obj){ + Object value=Utils.getObjectProperty(obj, variableName); + if(value==null){ + throw new RuleException("Collection value can not be null."); + } + if(value instanceof Collection){ + return (Collection)value; + } + throw new RuleException("Value is not collection type."); + } + + public String getVariableCategory() { + return variableCategory; + } + + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public MultiCondition getMultiCondition() { + return multiCondition; + } + + public void setMultiCondition(MultiCondition multiCondition) { + this.multiCondition = multiCondition; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AllLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AllLeftPart.java new file mode 100644 index 0000000..a4419d2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/AllLeftPart.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public class AllLeftPart extends AbstractLeftPart { + protected int amount; + protected int percent; + protected StatisticType statisticType=StatisticType.none; + public boolean evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + ExprValue value=computeValue(context, obj, allMatchedObjects); + int total=value.getTotal(),match=value.getMatch(),notMatch=value.getNotMatch(); + switch(statisticType){ + case none: + if(notMatch==0){ + return true; + }else{ + return false; + } + case amount: + if(match==amount){ + return true; + }else{ + return false; + } + case percent: + BigDecimal left=new BigDecimal(match); + BigDecimal currentPercent=left.divide(new BigDecimal(total),4,BigDecimal.ROUND_HALF_UP); + int result=currentPercent.compareTo((new BigDecimal(percent)).divide(new BigDecimal(100))); + if(result==0){ + return true; + }else{ + return false; + } + } + return false; + } + + + @Override + public String getId() { + if(id==null){ + id="all("+variableCategory+"."+variableLabel+","+multiCondition.getId()+")"; + } + return id; + } + + public int getAmount() { + return amount; + } + + public void setAmount(int amount) { + this.amount = amount; + } + + public int getPercent() { + return percent; + } + + public void setPercent(int percent) { + this.percent = percent; + } + + public StatisticType getStatisticType() { + return statisticType; + } + + public void setStatisticType(StatisticType statisticType) { + this.statisticType = statisticType; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/And.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/And.java new file mode 100644 index 0000000..ba51d7d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/And.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public class And extends Junction { + @Override + public String getJunctionType() { + return JunctionType.and.name(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriteria.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriteria.java new file mode 100644 index 0000000..04a2376 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriteria.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月15日 + */ +public interface BaseCriteria { + EvaluateResponse evaluate(EvaluationContext context,Object obj,List allMatchedObjects); + String getId(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriterion.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriterion.java new file mode 100644 index 0000000..f15da5a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/BaseCriterion.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public abstract class BaseCriterion implements Criterion{ + @JsonIgnore + private Junction parent; + public Junction getParent() { + return parent; + } + + public void setParent(Junction parent) { + this.parent = parent; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectLeftPart.java new file mode 100644 index 0000000..811cb95 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectLeftPart.java @@ -0,0 +1,114 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public class CollectLeftPart extends AbstractLeftPart { + private String property; + private CollectPurpose purpose; + public Object evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + ExprValue value=computeValue(context, obj, allMatchedObjects); + int match=value.getMatch(); + List facts=value.getFacts(); + if(purpose.equals(CollectPurpose.count)){ + return match; + } + if(purpose.equals(CollectPurpose.avg)){ + BigDecimal total=new BigDecimal(0); + for(Object fact:facts){ + Object propertyValue=Utils.getObjectProperty(fact, property); + total=total.add(Utils.toBigDecimal(propertyValue)); + } + return total.divide(new BigDecimal(match), 4, BigDecimal.ROUND_HALF_UP); + }else if(purpose.equals(CollectPurpose.sum)){ + BigDecimal total=new BigDecimal(0); + for(Object fact:facts){ + Object propertyValue=Utils.getObjectProperty(fact, property); + total=total.add(Utils.toBigDecimal(propertyValue)); + } + return total; + }else if(purpose.equals(CollectPurpose.max)){ + BigDecimal max=new BigDecimal(0); + for(Object fact:facts){ + Object propertyValue=Utils.getObjectProperty(fact, property); + BigDecimal decValue=Utils.toBigDecimal(propertyValue); + int result=decValue.compareTo(max); + if(result==1){ + max=decValue; + } + } + return max; + }else if(purpose.equals(CollectPurpose.min)){ + BigDecimal min=null; + for(Object fact:facts){ + Object propertyValue=Utils.getObjectProperty(fact, property); + BigDecimal decValue=Utils.toBigDecimal(propertyValue); + if(min!=null){ + int result=decValue.compareTo(min); + if(result==-1){ + min=decValue; + } + }else{ + min=decValue; + } + } + return min; + } + return 0; + } + public String getProperty() { + return property; + } + + public void setProperty(String property) { + this.property = property; + } + + public CollectPurpose getPurpose() { + return purpose; + } + + public void setPurpose(CollectPurpose purpose) { + this.purpose = purpose; + } + + @Override + public String getId() { + if(id==null){ + id="collect("+variableCategory+"."+variableLabel+","; + if(multiCondition!=null){ + id+=multiCondition.getId()+")"; + }else{ + id+=")"; + } + if(purpose.equals(CollectPurpose.count)){ + id+="."+purpose.name(); + }else{ + id+="."+property+"."+purpose.name(); + } + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectPurpose.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectPurpose.java new file mode 100644 index 0000000..36c5a62 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CollectPurpose.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public enum CollectPurpose { + count,sum,max,min,avg; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionLeftPart.java new file mode 100644 index 0000000..6d5cf38 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionLeftPart.java @@ -0,0 +1,74 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.List; + + +/** + * @author Jacky.gao + * @since 2015年7月28日 + */ +public class CommonFunctionLeftPart implements LeftPart { + @JsonIgnore + private String id; + private String name; + private String label; + private CommonFunctionParameter parameter; + public Object evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + FunctionDescriptor function=Utils.findFunctionDescriptor(name); + Value value=parameter.getObjectParameter(); + Object object=context.getValueCompute().complexValueCompute(value, obj, context, allMatchedObjects,null); + Argument arg=function.getArgument(); + String property=null; + if(arg.isNeedProperty()){ + property=parameter.getProperty(); + } + return function.doFunction(object, property,context.getWorkingMemory()); + } + @Override + public String getId() { + if(id==null){ + id= label+"("+parameter.getId()+")"; + } + return id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public CommonFunctionParameter getParameter() { + return parameter; + } + public void setParameter(CommonFunctionParameter parameter) { + this.parameter = parameter; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionParameter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionParameter.java new file mode 100644 index 0000000..53e9ac8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CommonFunctionParameter.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.rule.Value; +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2015年7月28日 + */ +public class CommonFunctionParameter { + @JsonIgnore + private String id; + private Value objectParameter; + private String name; + private String property; + private String propertyLabel; + public Value getObjectParameter() { + return objectParameter; + } + public String getId(){ + if(id==null){ + id=objectParameter.getId(); + if(property!=null){ + id+=","+property; + } + } + return id; + } + public void setObjectParameter(Value objectParameter) { + this.objectParameter = objectParameter; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getProperty() { + return property; + } + public void setProperty(String property) { + this.property = property; + } + public String getPropertyLabel() { + return propertyLabel; + } + public void setPropertyLabel(String propertyLabel) { + this.propertyLabel = propertyLabel; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criteria.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criteria.java new file mode 100644 index 0000000..cb7f54b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criteria.java @@ -0,0 +1,137 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.action.ExecuteMethodAction; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.SimpleArithmetic; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.runtime.assertor.AssertorEvaluator; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Criteria extends BaseCriterion implements BaseCriteria{ + @JsonIgnore + private String id; + private Op op; + private Left left; + private Value value; + + @Override + public EvaluateResponse evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + Object leftValue=null; + Datatype datatype=null; + LeftPart leftPart=left.getLeftPart(); + if(leftPart instanceof VariableLeftPart){ + VariableLeftPart varPart=(VariableLeftPart)leftPart; + datatype=varPart.getDatatype(); + if(varPart.getVariableName()==null){ + throw new RuleException("Criteria left[variableName] can not be null."); + } + leftValue=Utils.getObjectProperty(obj, varPart.getVariableName()); + }else{ + if(leftPart instanceof MethodLeftPart){ + MethodLeftPart methodPart=(MethodLeftPart)leftPart; + ExecuteMethodAction methodAction=new ExecuteMethodAction(); + methodAction.setBeanId(methodPart.getBeanId()); + methodAction.setBeanLabel(methodPart.getBeanLabel()); + methodAction.setMethodLabel(methodPart.getMethodLabel()); + methodAction.setMethodName(methodPart.getMethodName()); + methodAction.setParameters(methodPart.getParameters()); + ActionValue actionValue=methodAction.execute(context, obj,allMatchedObjects,null); + if(actionValue==null){ + leftValue=null; + }else{ + leftValue=actionValue.getValue(); + } + }else if(leftPart instanceof ExistLeftPart){ + ExistLeftPart existPart=(ExistLeftPart)leftPart; + leftValue=existPart.evaluate(context, obj, allMatchedObjects); + }else if(leftPart instanceof AllLeftPart){ + AllLeftPart allPart=(AllLeftPart)leftPart; + leftValue=allPart.evaluate(context, obj, allMatchedObjects); + }else if(leftPart instanceof CollectLeftPart){ + CollectLeftPart collectPart=(CollectLeftPart)leftPart; + leftValue=collectPart.evaluate(context, obj, allMatchedObjects); + }else if(leftPart instanceof CommonFunctionLeftPart){ + CommonFunctionLeftPart part=(CommonFunctionLeftPart)leftPart; + leftValue=part.evaluate(context, obj, allMatchedObjects); + } + datatype=Utils.getDatatype(leftValue); + } + Object leftResult=leftValue; + SimpleArithmetic arithmetic=left.getArithmetic(); + ValueCompute valueCompute=context.getValueCompute(); + if(arithmetic!=null){ + leftResult=valueCompute.simpleArithmeticCompute(context,leftValue, arithmetic); + } + EvaluateResponse response=new EvaluateResponse(); + response.setLeftResult(leftResult); + Object right=null; + if(value!=null){ + right=valueCompute.complexValueCompute(value,obj,context,allMatchedObjects,null); + response.setRightResult(right); + if(right==null){ + response.setResult(false); + return response; + } + } + AssertorEvaluator assertorEvaluator=context.getAssertorEvaluator(); + boolean result=assertorEvaluator.evaluate(leftResult, right, datatype,op); + response.setResult(result); + return response; + } + @Override + public String getId() { + if(id==null){ + id=left.getLeftPart().getId()+"【"+op.toString()+"】"; + if(value!=null)id+=value.getId(); + } + return id; + } + public void setId(String id) { + this.id = id; + } + public Op getOp() { + return op; + } + public void setOp(Op op) { + this.op = op; + } + public Left getLeft() { + return left; + } + public void setLeft(Left left) { + this.left = left; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CriteriaUnit.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CriteriaUnit.java new file mode 100644 index 0000000..05fe9c9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/CriteriaUnit.java @@ -0,0 +1,160 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月15日 + */ +public class CriteriaUnit { + private Criteria criteria; + private JunctionType junctionType; + private List nextUnits; + public EvaluateResponse evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + if(criteria==null){ + for(CriteriaUnit nextUnit:nextUnits){ + EvaluateResponse response=nextUnit.evaluate(context, obj, allMatchedObjects); + boolean nextResult=response.getResult(); + JunctionType junctionType=nextUnit.getJunctionType(); + if(junctionType==null){ + return response; + } + if(junctionType.equals(JunctionType.or)){ + if(nextResult){ + return response; + } + }else{ + if(!nextResult){ + return response; + } + } + } + EvaluateResponse res=new EvaluateResponse(); + res.setResult(true); + return res; + }else{ + EvaluateResponse response=criteria.evaluate(context, obj, allMatchedObjects); + boolean result=response.getResult(); + if(junctionType==null){ + return response; + } + if(result){ + if(junctionType.equals(JunctionType.or)){ + return response; + } + }else{ + if(junctionType.equals(JunctionType.and)){ + return response; + } + } + if(nextUnits==null){ + return response; + } + if(junctionType.equals(JunctionType.and)){ + for(CriteriaUnit nextUnit:nextUnits){ + EvaluateResponse nextResponse=nextUnit.evaluate(context, obj, allMatchedObjects); + boolean nextResult=nextResponse.getResult(); + if(!nextResult){ + return nextResponse; + } + JunctionType type=nextUnit.getJunctionType(); + if(type==null){ + return nextResponse; + } + if(type.equals(JunctionType.or)){ + if(nextResult){ + return nextResponse; + } + }else{ + if(!nextResult){ + return nextResponse; + } + } + } + EvaluateResponse res=new EvaluateResponse(); + res.setResult(true); + return res; + }else{ + for(CriteriaUnit nextUnit:nextUnits){ + EvaluateResponse nextResponse=nextUnit.evaluate(context, obj, allMatchedObjects); + boolean nextResult=nextResponse.getResult(); + if(nextResult){ + return nextResponse; + } + JunctionType type=nextUnit.getJunctionType(); + if(type==null){ + return nextResponse; + } + if(type.equals(JunctionType.or)){ + if(nextResult){ + return nextResponse; + } + }else{ + if(!nextResult){ + return nextResponse; + } + } + } + } + } + EvaluateResponse res=new EvaluateResponse(); + res.setResult(false); + return res; + } + public Criteria getCriteria() { + return criteria; + } + public void setCriteria(Criteria criteria) { + this.criteria = criteria; + } + public JunctionType getJunctionType() { + return junctionType; + } + public void setJunctionType(JunctionType junctionType) { + this.junctionType = junctionType; + } + public List getNextUnits() { + return nextUnits; + } + public void setNextUnits(List nextUnits) { + this.nextUnits = nextUnits; + } + public String getId(){ + StringBuffer sb=new StringBuffer(); + if(criteria!=null){ + sb.append(criteria.getId()); + } + if(junctionType!=null){ + sb.append("-"); + sb.append(junctionType.name()); + } + if(nextUnits!=null){ + int i=0; + for(CriteriaUnit unit:nextUnits){ + if(i>0){ + sb.append(","); + } + sb.append(unit.getId()); + i++; + } + } + return sb.toString(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criterion.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criterion.java new file mode 100644 index 0000000..d2e227b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Criterion.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public interface Criterion{ + Junction getParent(); + void setParent(Junction parent); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvalLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvalLeftPart.java new file mode 100644 index 0000000..66dd0cd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvalLeftPart.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年3月15日 + */ +public class EvalLeftPart implements LeftPart { + private String id; + private String expression; + @Override + public String getId() { + if(id==null){ + id = "[eval]"+expression+""; + } + return id; + } + public String getExpression() { + return expression; + } + public void setExpression(String expression) { + this.expression = expression; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvaluateResponse.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvaluateResponse.java new file mode 100644 index 0000000..f6ceeab --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/EvaluateResponse.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +/** + * @author Jacky.gao + * @since 2017年11月17日 + */ +public class EvaluateResponse { + private boolean result; + private Object leftResult; + private Object rightResult; + + public void setLeftResult(Object leftResult) { + this.leftResult = leftResult; + } + public void setRightResult(Object rightResult) { + this.rightResult = rightResult; + } + public Object getLeftResult() { + return leftResult; + } + public Object getRightResult() { + return rightResult; + } + public void setResult(boolean result) { + this.result = result; + } + public boolean getResult() { + return result; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExistLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExistLeftPart.java new file mode 100644 index 0000000..4680799 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExistLeftPart.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public class ExistLeftPart extends AllLeftPart { + public boolean evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + ExprValue value=computeValue(context, obj, allMatchedObjects); + int total=value.getTotal(),match=value.getMatch(); + switch(statisticType){ + case none: + if(match>0){ + return true; + }else{ + return false; + } + case amount: + if(match>=amount){ + return true; + }else{ + return false; + } + case percent: + BigDecimal left=new BigDecimal(match); + BigDecimal currentPercent=left.divide(new BigDecimal(total),4,BigDecimal.ROUND_HALF_UP); + int result=currentPercent.compareTo((new BigDecimal(percent)).divide(new BigDecimal(100))); + if(result!=-1){ + return true; + }else{ + return false; + } + } + return false; + } + @Override + public String getId() { + if(id==null){ + id="all("+variableCategory+"."+variableLabel+","+multiCondition.getId(); + if(statisticType.equals(StatisticType.amount)){ + id+=","+amount+")"; + }else if(statisticType.equals(StatisticType.percent)){ + id+=","+percent+"%)"; + }else{ + id+=")"; + } + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExprValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExprValue.java new file mode 100644 index 0000000..dc80f50 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/ExprValue.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年6月1日 + */ +public class ExprValue { + private int total=0; + private int match=0; + private int notMatch=0; + private List facts; + public int getTotal() { + return total; + } + public void setTotal(int total) { + this.total = total; + } + public int getMatch() { + return match; + } + public void setMatch(int match) { + this.match = match; + } + public int getNotMatch() { + return notMatch; + } + public void setNotMatch(int notMatch) { + this.notMatch = notMatch; + } + public List getFacts() { + return facts; + } + public void setFacts(List facts) { + this.facts = facts; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/FunctionLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/FunctionLeftPart.java new file mode 100644 index 0000000..13e88c2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/FunctionLeftPart.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月14日 + */ +public class FunctionLeftPart implements LeftPart{ + @JsonIgnore + private String id; + private String name; + private List parameters; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public List getParameters() { + return parameters; + } + public void setParameters(List parameters) { + this.parameters = parameters; + } + @Override + public String getId() { + if(id==null){ + if(parameters!=null){ + String parametersId=""; + int i=0; + for(Parameter parameter:parameters){ + if(i>0){ + parametersId+=","; + } + parametersId+=parameter.getId(); + i++; + } + id = "[函数]."+name+"("+parametersId+")"; + }else{ + id = "[函数]."+name; + } + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Junction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Junction.java new file mode 100644 index 0000000..63266bb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Junction.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import java.util.ArrayList; +import java.util.List; + + +/** + * @author Jacky.gao + * @since 2014年12月25日 + */ +public abstract class Junction extends BaseCriterion { + private List criterions; + public List getCriterions() { + return criterions; + } + + public void addCriterion(Criterion criterion){ + if(criterions==null){ + criterions=new ArrayList(); + } + criterion.setParent(this); + criterions.add(criterion); + } + + public void setCriterions(List criterions) { + for(Criterion criterion:criterions){ + criterion.setParent(this); + } + this.criterions = criterions; + } + public abstract String getJunctionType(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/JunctionType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/JunctionType.java new file mode 100644 index 0000000..0b235f1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/JunctionType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public enum JunctionType { + and,or; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Left.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Left.java new file mode 100644 index 0000000..f1f4f32 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Left.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.rule.SimpleArithmetic; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Left { + private LeftPart leftPart; + private LeftType type; + private SimpleArithmetic arithmetic; + public LeftPart getLeftPart() { + return leftPart; + } + public void setLeftPart(LeftPart leftPart) { + this.leftPart = leftPart; + } + public SimpleArithmetic getArithmetic() { + return arithmetic; + } + public void setArithmetic(SimpleArithmetic arithmetic) { + this.arithmetic = arithmetic; + } + public LeftType getType() { + return type; + } + public void setType(LeftType type) { + this.type = type; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftPart.java new file mode 100644 index 0000000..c882f44 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftPart.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年3月14日 + */ +public interface LeftPart { + String getId(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftType.java new file mode 100644 index 0000000..1d70ec9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/LeftType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年3月11日 + */ +public enum LeftType { + variable,parameter,method,function,eval,all,exist,collect,commonfunction,NamedReference; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Lhs.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Lhs.java new file mode 100644 index 0000000..4c92087 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Lhs.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Lhs { + private Criterion criterion; + + public Criterion getCriterion() { + return criterion; + } + + public void setCriterion(Criterion criterion) { + this.criterion = criterion; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MethodLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MethodLeftPart.java new file mode 100644 index 0000000..8b0e6da --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MethodLeftPart.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月14日 + */ +public class MethodLeftPart implements LeftPart{ + @JsonIgnore + private String id; + private String beanId; + private String beanLabel; + private String methodName; + private String methodLabel; + private List parameters; + public String getBeanId() { + return beanId; + } + public void setBeanId(String beanId) { + this.beanId = beanId; + } + public String getBeanLabel() { + return beanLabel; + } + public void setBeanLabel(String beanLabel) { + this.beanLabel = beanLabel; + } + public String getMethodName() { + return methodName; + } + public void setMethodName(String methodName) { + this.methodName = methodName; + } + public String getMethodLabel() { + return methodLabel; + } + public void setMethodLabel(String methodLabel) { + this.methodLabel = methodLabel; + } + public List getParameters() { + return parameters; + } + public void setParameters(List parameters) { + this.parameters = parameters; + } + @Override + public String getId() { + if(id==null){ + if(parameters!=null){ + String parametersId=""; + int i=0; + for(Parameter parameter:parameters){ + if(i>0){ + parametersId+=","; + } + parametersId+=parameter.getId(); + i++; + } + id="[方法]"+beanLabel+"."+methodLabel+"("+parametersId+")"; + }else{ + id="[方法]"+beanLabel+"."+methodLabel; + } + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MultiCondition.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MultiCondition.java new file mode 100644 index 0000000..f6f3c7a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/MultiCondition.java @@ -0,0 +1,81 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public class MultiCondition { + private String id; + private List conditions; + private JunctionType type=JunctionType.and; + public boolean evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + if(type.equals(JunctionType.and)){ + for(PropertyCriteria criteria:conditions){ + boolean value=criteria.evaluate(context, obj, allMatchedObjects); + if(!value){ + return false; + } + } + }else{ + for(PropertyCriteria criteria:conditions){ + boolean value=criteria.evaluate(context, obj, allMatchedObjects); + if(value){ + break; + } + } + } + return true; + } + public void addCondition(PropertyCriteria condition){ + if(conditions==null){ + conditions=new ArrayList(); + } + conditions.add(condition); + } + public List getConditions() { + return conditions; + } + + public void setConditions(List conditions) { + this.conditions = conditions; + } + + public JunctionType getType() { + return type; + } + public void setType(JunctionType type) { + this.type = type; + } + public String getId(){ + if(id==null){ + for(PropertyCriteria criteria:conditions){ + if(id==null){ + id=criteria.getId(); + }else{ + id+=type.name()+" "+criteria.getId(); + } + } + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedCriteria.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedCriteria.java new file mode 100644 index 0000000..90e0e56 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedCriteria.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月15日 + */ +public class NamedCriteria extends BaseCriterion implements BaseCriteria{ + private String referenceName; + private String variableCategory; + private CriteriaUnit unit; + private String id; + + @Override + public EvaluateResponse evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + EvaluateResponse response=unit.evaluate(context, obj, allMatchedObjects); + return response; + } + + public String getReferenceName() { + return referenceName; + } + + public void setReferenceName(String referenceName) { + this.referenceName = referenceName; + } + + public String getVariableCategory() { + return variableCategory; + } + + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + + public CriteriaUnit getUnit() { + return unit; + } + + public void setUnit(CriteriaUnit unit) { + this.unit = unit; + } + + @Override + public String getId() { + if(id==null){ + StringBuffer sb=new StringBuffer(); + sb.append(referenceName+":"+variableCategory+"("); + sb.append(unit.getId()); + sb.append(")"); + id=sb.toString(); + } + return id; + } + + public void setId(String id) { + this.id = id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedItem.java new file mode 100644 index 0000000..73c98d4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedItem.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.Value; + +public class NamedItem { + private String variableName; + private String variableLabel; + private Datatype datatype; + private Op op; + private Value value; + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + public Op getOp() { + return op; + } + public void setOp(Op op) { + this.op = op; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedJunction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedJunction.java new file mode 100644 index 0000000..7c1f714 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/NamedJunction.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import java.util.List; + +public class NamedJunction extends BaseCriterion{ + private String referenceName; + private String variableCategory; + private JunctionType junctionType; + private List items; + public String getReferenceName() { + return referenceName; + } + public void setReferenceName(String referenceName) { + this.referenceName = referenceName; + } + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public JunctionType getJunctionType() { + return junctionType; + } + public void setJunctionType(JunctionType junctionType) { + this.junctionType = junctionType; + } + public List getItems() { + return items; + } + public void setItems(List items) { + this.items = items; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Or.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Or.java new file mode 100644 index 0000000..31bd958 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/Or.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class Or extends Junction { + @Override + public String getJunctionType() { + return JunctionType.or.name(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/PropertyCriteria.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/PropertyCriteria.java new file mode 100644 index 0000000..8fa862b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/PropertyCriteria.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.runtime.assertor.AssertorEvaluator; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年6月1日 + */ +public class PropertyCriteria { + private String property; + private Op op; + private Value value; + private String id; + public String getId(){ + if(id==null){ + id=property+op.name()+value.getId(); + } + return id; + } + public boolean evaluate(EvaluationContext context,Object obj,List allMatchedObjects){ + Object left=Utils.getObjectProperty(obj, property); + Object right=context.getValueCompute().complexValueCompute(value,obj,context,allMatchedObjects,null); + if(right==null){ + return false; + } + AssertorEvaluator assertorEvaluator=context.getAssertorEvaluator(); + Datatype datatype=Utils.getDatatype(left); + boolean result=assertorEvaluator.evaluate(left, right, datatype,op); + return result; + } + public String getProperty() { + return property; + } + public void setProperty(String property) { + this.property = property; + } + public Op getOp() { + return op; + } + public void setOp(Op op) { + this.op = op; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/StatisticType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/StatisticType.java new file mode 100644 index 0000000..c9079d6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/StatisticType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; +/** + * @author Jacky.gao + * @since 2015年5月29日 + */ +public enum StatisticType { + percent,amount,none; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/VariableLeftPart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/VariableLeftPart.java new file mode 100644 index 0000000..9e3dd7d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/lhs/VariableLeftPart.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.lhs; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2015年3月14日 + */ +public class VariableLeftPart implements LeftPart{ + @JsonIgnore + private String id; + private String variableName; + private String variableLabel; + private String variableCategory; + private Datatype datatype; + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + @Override + public String getId() { + if(id==null){ + id="[变量]"+getVariableCategory()+"."+getVariableLabel(); + } + return id; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopEnd.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopEnd.java new file mode 100644 index 0000000..d98f8b2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopEnd.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.loop; + +import com.itheima.sfbx.framework.rule.action.Action; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public class LoopEnd { + private List actions; + + public List getActions() { + return actions; + } + + public void setActions(List actions) { + this.actions = actions; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopRule.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopRule.java new file mode 100644 index 0000000..f15c01e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopRule.java @@ -0,0 +1,188 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.loop; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.builtinaction.LoopAction; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public class LoopRule extends Rule{ + private LoopStart loopStart; + private LoopEnd loopEnd; + private LoopTarget loopTarget; + private KnowledgePackageWrapper knowledgePackageWrapper; + private Log log=LogFactory.getLog(getClass()); + public LoopRule() { + this.setLoopRule(true); + } + + public List execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap){ + Object loopTargetObj=context.getValueCompute().complexValueCompute(loopTarget.getValue(), matchedObject, context, allMatchedObjects,variableMap); + if(loopTargetObj==null){ + log.warn("Loop rule ["+getName()+"] target value is null,cannot be executed."); + return null; + } + + List values=new ArrayList(); + KnowledgeSession parentSession=(KnowledgeSession)context.getWorkingMemory(); + List facts=parentSession.getAllFacts(); + Map parameters=parentSession.getParameters(); + + if(loopStart!=null){ + List startActions=loopStart.getActions(); + if(startActions!=null){ + for(Action action:startActions){ + if(this.getDebug()!=null){ + action.setDebug(this.getDebug()); + } + ActionValue value=action.execute(context, matchedObject, allMatchedObjects,variableMap); + if(value!=null){ + values.add(value); + } + } + } + } + + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackageWrapper.getKnowledgePackage(),context.getDebugMessageItems()); + if(loopTargetObj instanceof Collection){ + Collection collections=(Collection)loopTargetObj; + String loopClazz=null; + for(Object object:collections){ + if(loopClazz==null){ + if(object instanceof GeneralEntity){ + loopClazz=((GeneralEntity)object).getTargetClass(); + }else{ + loopClazz=object.getClass().getName(); + } + } + for(Object fact:facts){ + String clazz=null; + if(fact instanceof GeneralEntity){ + clazz=((GeneralEntity)fact).getTargetClass(); + }else{ + clazz=fact.getClass().getName(); + } + if(!loopClazz.equals(clazz)){ + session.insert(fact); + } + } + session.insert(object); + RuleExecutionResponse response=session.fireRules(parameters); + List list=response.getActionValues(); + boolean needBreak=false; + if(list!=null){ + for(ActionValue av:list){ + if(av.getActionId().equals(LoopAction.BREAK_LOOP_ACTION_ID)){ + needBreak=true; + }else{ + values.add(av); + } + } + } + parameters=new HashMap(); + parameters.putAll(session.getParameters()); + if(needBreak){ + break; + } + } + }else if(loopTargetObj instanceof Object[]){ + Object[] objs=(Object[])loopTargetObj; + for(Object object:objs){ + for(Object fact:facts){ + session.insert(fact); + } + session.insert(object); + RuleExecutionResponse response=session.fireRules(); + List list=response.getActionValues(); + boolean needBreak=false; + if(list!=null){ + for(ActionValue av:list){ + if(av.getActionId().equals(LoopAction.BREAK_LOOP_ACTION_ID)){ + needBreak=true; + }else{ + values.add(av); + } + } + } + parameters=new HashMap(); + parameters.putAll(session.getParameters()); + if(needBreak){ + break; + } + } + }else{ + throw new RuntimeException("Loop rule target variable must be Collection or Object array type."); + } + parentSession.getParameters().putAll(parameters); + if(loopEnd!=null){ + List endActions=loopEnd.getActions(); + if(endActions!=null){ + for(Action action:endActions){ + if(this.getDebug()!=null){ + action.setDebug(this.getDebug()); + } + ActionValue value=action.execute(context, matchedObject, allMatchedObjects,variableMap); + if(value!=null){ + values.add(value); + } + } + } + } + + return values; + } + + public LoopStart getLoopStart() { + return loopStart; + } + public void setLoopStart(LoopStart loopStart) { + this.loopStart = loopStart; + } + public LoopEnd getLoopEnd() { + return loopEnd; + } + public void setLoopEnd(LoopEnd loopEnd) { + this.loopEnd = loopEnd; + } + public LoopTarget getLoopTarget() { + return loopTarget; + } + public void setLoopTarget(LoopTarget loopTarget) { + this.loopTarget = loopTarget; + } + public KnowledgePackageWrapper getKnowledgePackageWrapper() { + return knowledgePackageWrapper; + } + public void setKnowledgePackageWrapper( + KnowledgePackageWrapper knowledgePackageWrapper) { + this.knowledgePackageWrapper = knowledgePackageWrapper; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopStart.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopStart.java new file mode 100644 index 0000000..36c2a1e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopStart.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.loop; + +import com.itheima.sfbx.framework.rule.action.Action; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public class LoopStart { + private List actions; + + public List getActions() { + return actions; + } + + public void setActions(List actions) { + this.actions = actions; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopTarget.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopTarget.java new file mode 100644 index 0000000..f87fe1a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/rule/loop/LoopTarget.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.rule.loop; + +import com.itheima.sfbx.framework.rule.model.rule.Value; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public class LoopTarget { + private Value value; + + public Value getValue() { + return value; + } + + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AssignTargetType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AssignTargetType.java new file mode 100644 index 0000000..f0fe64d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AssignTargetType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public enum AssignTargetType { + variable,parameter,none; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AttributeRow.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AttributeRow.java new file mode 100644 index 0000000..94a6ff5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/AttributeRow.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月21日 + */ +public class AttributeRow extends CardRow{ + private List conditionRows; + + public List getConditionRows() { + return conditionRows; + } + + public void setConditionRows(List conditionRows) { + this.conditionRows = conditionRows; + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardCell.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardCell.java new file mode 100644 index 0000000..4a6b8b9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardCell.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.table.Joint; + +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public class CardCell implements Comparable{ + private String variableLabel; + private String variableName; + private Datatype datatype; + private CellType type; + private String weight; + private Joint joint; + private Value value; + private int row; + private int col; + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + public CellType getType() { + return type; + } + public void setType(CellType type) { + this.type = type; + } + public String getWeight() { + return weight; + } + public void setWeight(String weight) { + this.weight = weight; + } + public Joint getJoint() { + return joint; + } + public void setJoint(Joint joint) { + this.joint = joint; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } + public int getRow() { + return row; + } + public void setRow(int row) { + this.row = row; + } + public int getCol() { + return col; + } + public void setCol(int col) { + this.col = col; + } + @Override + public int compareTo(CardCell o) { + return row-o.getRow(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardRow.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardRow.java new file mode 100644 index 0000000..5c74b38 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CardRow.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; + + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class CardRow { + private int rowNumber; + + public int getRowNumber() { + return rowNumber; + } + + public void setRowNumber(int rowNumber) { + this.rowNumber = rowNumber; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CellType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CellType.java new file mode 100644 index 0000000..d251f7e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CellType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public enum CellType { + attribute,score,condition,custom; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ConditionRow.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ConditionRow.java new file mode 100644 index 0000000..b76701b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ConditionRow.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; +/** + * @author Jacky.gao + * @since 2016年9月21日 + */ +public class ConditionRow extends CardRow{ +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CustomCol.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CustomCol.java new file mode 100644 index 0000000..abfcc1e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/CustomCol.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public class CustomCol { + private String name; + private String width; + private int colNumber; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getWidth() { + return width; + } + public void setWidth(String width) { + this.width = width; + } + public int getColNumber() { + return colNumber; + } + public void setColNumber(int colNumber) { + this.colNumber = colNumber; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScorecardDefinition.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScorecardDefinition.java new file mode 100644 index 0000000..7a3a7c6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScorecardDefinition.java @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Library; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public class ScorecardDefinition { + private String name; + private Integer salience; + private Date effectiveDate; + private Date expiresDate; + private Boolean enabled; + private Boolean debug; + + private String attributeColName; + private String attributeColWidth; + private String attributeColVariableCategory; + + private String conditionColName; + private String conditionColWidth; + + private String scoreColName; + private String scoreColWidth; + + private boolean weightSupport; + private ScoringType scoringType; + private String scoringBean; + private AssignTargetType assignTargetType; + + private String remark; + private String variableCategory; + private String variableName; + private String variableLabel; + private Datatype datatype; + + private List cells; + private List customCols; + private List rows; + private List libraries; + + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public Integer getSalience() { + return salience; + } + public void setSalience(Integer salience) { + this.salience = salience; + } + public Date getEffectiveDate() { + return effectiveDate; + } + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + public Date getExpiresDate() { + return expiresDate; + } + public void setExpiresDate(Date expiresDate) { + this.expiresDate = expiresDate; + } + public Boolean getEnabled() { + return enabled; + } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + public Boolean getDebug() { + return debug; + } + public void setDebug(Boolean debug) { + this.debug = debug; + } + public String getAttributeColName() { + return attributeColName; + } + public void setAttributeColName(String attributeColName) { + this.attributeColName = attributeColName; + } + public String getAttributeColWidth() { + return attributeColWidth; + } + public void setAttributeColWidth(String attributeColWidth) { + this.attributeColWidth = attributeColWidth; + } + public String getAttributeColVariableCategory() { + return attributeColVariableCategory; + } + public void setAttributeColVariableCategory(String attributeColVariableCategory) { + this.attributeColVariableCategory = attributeColVariableCategory; + } + public String getConditionColName() { + return conditionColName; + } + public void setConditionColName(String conditionColName) { + this.conditionColName = conditionColName; + } + public String getConditionColWidth() { + return conditionColWidth; + } + public void setConditionColWidth(String conditionColWidth) { + this.conditionColWidth = conditionColWidth; + } + public String getScoreColName() { + return scoreColName; + } + public void setScoreColName(String scoreColName) { + this.scoreColName = scoreColName; + } + public String getScoreColWidth() { + return scoreColWidth; + } + public void setScoreColWidth(String scoreColWidth) { + this.scoreColWidth = scoreColWidth; + } + public boolean isWeightSupport() { + return weightSupport; + } + public void setWeightSupport(boolean weightSupport) { + this.weightSupport = weightSupport; + } + public ScoringType getScoringType() { + return scoringType; + } + public void setScoringType(ScoringType scoringType) { + this.scoringType = scoringType; + } + public String getScoringBean() { + return scoringBean; + } + public void setScoringBean(String scoringBean) { + this.scoringBean = scoringBean; + } + public AssignTargetType getAssignTargetType() { + return assignTargetType; + } + public void setAssignTargetType(AssignTargetType assignTargetType) { + this.assignTargetType = assignTargetType; + } + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + public List getCustomCols() { + return customCols; + } + public void setCustomCols(List customCols) { + this.customCols = customCols; + } + public List getRows() { + return rows; + } + public void setRows(List rows) { + this.rows = rows; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + public void addLibrary(Library library){ + if(libraries==null){ + libraries=new ArrayList(); + } + libraries.add(library); + } + public List getCells() { + return cells; + } + public void setCells(List cells) { + this.cells = cells; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScoringType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScoringType.java new file mode 100644 index 0000000..6799581 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/ScoringType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard; +/** + * @author Jacky.gao + * @since 2016年9月20日 + */ +public enum ScoringType { + sum,weightsum,custom; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/CellItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/CellItem.java new file mode 100644 index 0000000..8a408e2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/CellItem.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class CellItem { + private String colName; + private Object value; + public CellItem(String colName,Object value) { + this.colName=colName; + this.value=value; + } + public String getColName() { + return colName; + } + public Object getValue() { + return value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItem.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItem.java new file mode 100644 index 0000000..486ca20 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItem.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public interface RowItem { + int getRowNumber(); + Object getScore(); + Object getActualScore(); + void setActualScore(Object actualScore); + String getWeight(); + List getCellItems(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItemImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItemImpl.java new file mode 100644 index 0000000..6c583b1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/RowItemImpl.java @@ -0,0 +1,92 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class RowItemImpl implements RowItem { + private int rowNumber; + private Object score; + private Object actualScore; + private String weight; + private List cellItems; + + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItemI#getRowNumber() + */ + @Override + public int getRowNumber() { + return rowNumber; + } + public void setRowNumber(int rowNumber) { + this.rowNumber = rowNumber; + } + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItemI#getScore() + */ + @Override + public Object getScore() { + return score; + } + public void setScore(Object score) { + this.score = score; + } + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItemI#getActualScore() + */ + @Override + public Object getActualScore() { + return actualScore; + } + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItem#setActualScore(java.lang.Object) + */ + @Override + public void setActualScore(Object actualScore) { + this.actualScore = actualScore; + } + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItemI#getWeight() + */ + @Override + public String getWeight() { + return weight; + } + public void setWeight(String weight) { + this.weight = weight; + } + /* (non-Javadoc) + * @see com.itheima.sfbx.framework.rule.model.scorecard.runtime.RowItemI#getCellItems() + */ + @Override + public List getCellItems() { + return cellItems; + } + public void setCellItems(List cellItems) { + this.cellItems = cellItems; + } + public void addCellItem(CellItem cellItem){ + if(this.cellItems==null){ + this.cellItems=new ArrayList(); + } + this.cellItems.add(cellItem); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRule.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRule.java new file mode 100644 index 0000000..d771aff --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRule.java @@ -0,0 +1,205 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.scorecard.AssignTargetType; +import com.itheima.sfbx.framework.rule.model.scorecard.ScoringType; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.ValueCompute; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.codehaus.jackson.annotate.JsonIgnore; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class ScoreRule extends Rule{ + private ScoringType scoringType; + private String scoringBean; + private AssignTargetType assignTargetType; + + private String variableCategory; + private String variableName; + private String variableLabel; + private Datatype datatype; + @JsonIgnore + private List libraries; + private KnowledgePackageWrapper knowledgePackageWrapper; + private final Log log=LogFactory.getLog(getClass()); + public List execute(Context context,Object matchedObject,List allMatchedObjects,Map variableMap){ + KnowledgeSession parentSession=(KnowledgeSession)context.getWorkingMemory(); + List facts=parentSession.getAllFacts(); + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackageWrapper.getKnowledgePackage(),context.getDebugMessageItems()); + for(Object fact:facts){ + session.insert(fact); + } + boolean isdebug=false; + if(this.getDebug()!=null){ + isdebug=this.getDebug(); + } + List values=session.fireRules(parentSession.getParameters()).getActionValues(); + Map rowMap=new HashMap(); + for(ActionValue value:values){ + if(!(value.getValue() instanceof ScoreRuntimeValue)){ + continue; + } + ScoreRuntimeValue scoreValue=(ScoreRuntimeValue)value.getValue(); + int rowNumber=scoreValue.getRowNumber(); + if(isdebug && Utils.isDebug()){ + String msg="---行"+rowNumber+",得分:"+scoreValue.getValue(); + context.debugMsg(msg, MsgType.ScoreCard, isdebug); + } + RowItemImpl rowItem=null; + if(rowMap.containsKey(rowNumber)){ + rowItem=rowMap.get(rowNumber); + }else{ + rowItem=new RowItemImpl(); + rowItem.setRowNumber(rowNumber); + rowMap.put(rowNumber, rowItem); + } + if(scoreValue.getName().equals(ScoreRuntimeValue.SCORE_VALUE)){ + rowItem.setScore(scoreValue.getValue()); + rowItem.setWeight(scoreValue.getWeight()); + }else{ + CellItem cellItem=new CellItem(scoreValue.getName(),scoreValue.getValue()); + rowItem.addCellItem(cellItem); + } + } + List items=new ArrayList(); + items.addAll(rowMap.values()); + ScorecardImpl card=new ScorecardImpl(getName(),items,isdebug); + Object actualScore=null; + if(scoringType.equals(ScoringType.sum)){ + actualScore=card.executeSum(context); + }else if(scoringType.equals(ScoringType.weightsum)){ + actualScore=card.executeWeightSum(context); + }else if(scoringType.equals(ScoringType.custom)){ + if(isdebug && Utils.isDebug()){ + String msg="---执行自定义评分卡得分计算Bean:"+scoringBean; + context.debugMsg(msg, MsgType.ScoreCard, isdebug); + } + ScoringStrategy scoringStrategy=(ScoringStrategy)context.getApplicationContext().getBean(scoringBean); + actualScore=scoringStrategy.calculate(card, context); + } + if(assignTargetType.equals(AssignTargetType.none)){ + log.warn("Scorecard ["+card.getName()+"] not setting assignment object for score value, score value is :"+actualScore); + }else{ + Object targetFact=null; + ValueCompute valueCompute=context.getValueCompute(); + String className=context.getVariableCategoryClass(variableCategory); + if(className.equals(HashMap.class.getName())){ + targetFact=session.getParameters(); + }else{ + targetFact=valueCompute.findObject(className, matchedObject, context); + } + if(targetFact==null){ + throw new RuleException("Class["+className+"] not found in workingmemory."); + } + actualScore=datatype.convert(actualScore); + Utils.setObjectProperty(targetFact, variableName, actualScore); + } + parentSession.getParameters().putAll(session.getParameters()); + return null; + } + + public ScoringType getScoringType() { + return scoringType; + } + + public void setScoringType(ScoringType scoringType) { + this.scoringType = scoringType; + } + + public String getScoringBean() { + return scoringBean; + } + + public void setScoringBean(String scoringBean) { + this.scoringBean = scoringBean; + } + + public AssignTargetType getAssignTargetType() { + return assignTargetType; + } + + public void setAssignTargetType(AssignTargetType assignTargetType) { + this.assignTargetType = assignTargetType; + } + + public String getVariableCategory() { + return variableCategory; + } + + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + + public String getVariableName() { + return variableName; + } + + public void setVariableName(String variableName) { + this.variableName = variableName; + } + + public String getVariableLabel() { + return variableLabel; + } + + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + + public Datatype getDatatype() { + return datatype; + } + + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + + public List getLibraries() { + return libraries; + } + + public void setLibraries(List libraries) { + this.libraries = libraries; + } + + public KnowledgePackageWrapper getKnowledgePackageWrapper() { + return knowledgePackageWrapper; + } + public void setKnowledgePackageWrapper( + KnowledgePackageWrapper knowledgePackageWrapper) { + this.knowledgePackageWrapper = knowledgePackageWrapper; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRuntimeValue.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRuntimeValue.java new file mode 100644 index 0000000..a7e8b40 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoreRuntimeValue.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class ScoreRuntimeValue { + public static final String SCORE_VALUE="scoring_value"; + private int rowNumber; + private String name; + private String weight; + private Object value; + public ScoreRuntimeValue(int rowNumber,String name,String weight,Object value) { + this.rowNumber=rowNumber; + this.name = name; + this.weight=weight; + this.value=value; + } + public int getRowNumber() { + return rowNumber; + } + public String getName() { + return name; + } + + public String getWeight() { + return weight; + } + + public Object getValue() { + return value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/Scorecard.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/Scorecard.java new file mode 100644 index 0000000..df3e8c0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/Scorecard.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月27日 + */ +public interface Scorecard { + /** + * @return 评分卡名称 + */ + String getName(); + /** + * @return 评分卡表格的所有的行信息 + */ + List getRowItems(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScorecardImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScorecardImpl.java new file mode 100644 index 0000000..d7b9cc7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScorecardImpl.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public class ScorecardImpl implements Scorecard { + private String name; + private boolean debug; + private List rowItems; + + public ScorecardImpl(String name, List rowItems,boolean debug) { + this.name = name; + this.rowItems = rowItems; + this.debug=debug; + } + + public BigDecimal executeSum(Context context){ + BigDecimal result=new BigDecimal(0); + for(RowItem row:rowItems){ + BigDecimal score=Utils.toBigDecimal(row.getScore()); + row.setActualScore(score); + result=result.add(score); + } + String msg="+++求和得分:"+result; + context.debugMsg(msg, MsgType.ScoreCard, debug); + return result; + } + public BigDecimal executeWeightSum(Context context){ + BigDecimal result=new BigDecimal(0); + for(RowItem row:rowItems){ + BigDecimal score=Utils.toBigDecimal(row.getScore()); + BigDecimal weight=Utils.toBigDecimal(row.getWeight()); + BigDecimal actualScore=score.multiply(weight); + row.setActualScore(actualScore); + result=result.add(actualScore); + } + String msg="+++加权求和得分:"+result; + context.debugMsg(msg, MsgType.ScoreCard, debug); + return result; + } + @Override + public String getName() { + return name; + } + @Override + public List getRowItems() { + return rowItems; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoringStrategy.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoringStrategy.java new file mode 100644 index 0000000..932a221 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/scorecard/runtime/ScoringStrategy.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.scorecard.runtime; + +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +/** + * @author Jacky.gao + * @since 2016年9月26日 + */ +public interface ScoringStrategy { + /** + * 计算得分方法 + * @param scorecard 当前评分卡对象 + * @param context 运行时上下文对象 + * @return 返回最终的得分值 + */ + Object calculate(Scorecard scorecard,Context context); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Cell.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Cell.java new file mode 100644 index 0000000..dc17178 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Cell.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.model.rule.Value; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class Cell { + private int row; + private int col; + private int rowspan; + private Joint joint; + private Value value; + private Action action; + public int getRow() { + return row; + } + public void setRow(int row) { + this.row = row; + } + public int getCol() { + return col; + } + public void setCol(int col) { + this.col = col; + } + + public int getRowspan() { + return rowspan; + } + public void setRowspan(int rowspan) { + this.rowspan = rowspan; + } + public Joint getJoint() { + return joint; + } + public void setJoint(Joint joint) { + this.joint = joint; + } + public Action getAction() { + return action; + } + public void setAction(Action action) { + this.action = action; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Column.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Column.java new file mode 100644 index 0000000..a933068 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Column.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class Column implements Comparable{ + private int num; + private int width; + private String variableCategory; + private String variableLabel; + private String variableName; + private Datatype datatype; + private ColumnType type; + public int getNum() { + return num; + } + public void setNum(int num) { + this.num = num; + } + public int getWidth() { + return width; + } + public void setWidth(int width) { + this.width = width; + } + public String getVariableCategory() { + return variableCategory; + } + public void setVariableCategory(String variableCategory) { + this.variableCategory = variableCategory; + } + public String getVariableLabel() { + return variableLabel; + } + public void setVariableLabel(String variableLabel) { + this.variableLabel = variableLabel; + } + public String getVariableName() { + return variableName; + } + public void setVariableName(String variableName) { + this.variableName = variableName; + } + public ColumnType getType() { + return type; + } + public void setType(ColumnType type) { + this.type = type; + } + public Datatype getDatatype() { + return datatype; + } + public void setDatatype(Datatype datatype) { + this.datatype = datatype; + } + public int compareTo(Column o) { + return o.getNum()-num; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ColumnType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ColumnType.java new file mode 100644 index 0000000..223a3a5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ColumnType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public enum ColumnType { + Criteria,Assignment,ConsolePrint,ExecuteMethod; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Condition.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Condition.java new file mode 100644 index 0000000..5341596 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Condition.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.Value; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class Condition { + private Op op; + private Value value; + public Op getOp() { + return op; + } + public void setOp(Op op) { + this.op = op; + } + public Value getValue() { + return value; + } + public void setValue(Value value) { + this.value = value; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/DecisionTable.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/DecisionTable.java new file mode 100644 index 0000000..cfb1758 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/DecisionTable.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.model.rule.Library; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class DecisionTable { + private Integer salience; + private Date effectiveDate; + private Date expiresDate; + private Boolean enabled; + private Boolean debug; + private String remark; + private List rows; + private List columns; + private Map cellMap; + private List libraries; + + public Integer getSalience() { + return salience; + } + public void setSalience(Integer salience) { + this.salience = salience; + } + public Date getEffectiveDate() { + return effectiveDate; + } + public void setEffectiveDate(Date effectiveDate) { + this.effectiveDate = effectiveDate; + } + public Date getExpiresDate() { + return expiresDate; + } + public void setExpiresDate(Date expiresDate) { + this.expiresDate = expiresDate; + } + public Boolean getEnabled() { + return enabled; + } + public void setEnabled(Boolean enabled) { + this.enabled = enabled; + } + public Boolean getDebug() { + return debug; + } + public void setDebug(Boolean debug) { + this.debug = debug; + } + public String getRemark() { + return remark; + } + public void setRemark(String remark) { + this.remark = remark; + } + public List getRows() { + return rows; + } + public void addLibrary(Library library){ + if(libraries==null){ + libraries=new ArrayList(); + } + libraries.add(library); + } + public void addRow(Row row){ + if(rows==null){ + rows=new ArrayList(); + } + rows.add(row); + } + public void addColumn(Column col){ + if(columns==null){ + columns=new ArrayList(); + } + columns.add(col); + } + public void addCell(Cell cell){ + if(cellMap==null){ + cellMap=new HashMap(); + } + cellMap.put(buildCellKey(cell.getRow(),cell.getCol()), cell); + } + public void setRows(List rows) { + this.rows = rows; + } + public List getColumns() { + return columns; + } + public void setColumns(List columns) { + this.columns = columns; + } + public Map getCellMap() { + return cellMap; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + public String buildCellKey(int row,int col){ + return row+","+col; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Joint.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Joint.java new file mode 100644 index 0000000..9d6276c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Joint.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.And; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Junction; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Or; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class Joint { + private List conditions; + private List joints; + private JointType type; + public Junction getJunction(){ + if(type.equals(JointType.and)){ + return new And(); + }else{ + return new Or(); + } + } + public List getConditions() { + return conditions; + } + public void setConditions(List conditions) { + this.conditions = conditions; + } + public void addJoint(Joint joint){ + if(joints==null){ + joints=new ArrayList(); + } + joints.add(joint); + } + public void addCondition(Condition condition){ + if(conditions==null){ + conditions=new ArrayList(); + } + conditions.add(condition); + } + public List getJoints() { + return joints; + } + public void setJoints(List joints) { + this.joints = joints; + } + public JointType getType() { + return type; + } + public void setType(JointType type) { + this.type = type; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/JointType.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/JointType.java new file mode 100644 index 0000000..5c3a3ec --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/JointType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public enum JointType { + and,or; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Row.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Row.java new file mode 100644 index 0000000..ec11b77 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/Row.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class Row implements Comparable{ + private int num; + private int height; + public int getNum() { + return num; + } + public void setNum(int num) { + this.num = num; + } + public int getHeight() { + return height; + } + public void setHeight(int height) { + this.height = height; + } + public int compareTo(Row o) { + return o.getNum()-num; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptCell.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptCell.java new file mode 100644 index 0000000..1768559 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptCell.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; +/** + * @author Jacky.gao + * @since 2015年5月5日 + */ +public class ScriptCell { + private int row; + private int col; + private int rowspan; + private String script; + public int getRow() { + return row; + } + public void setRow(int row) { + this.row = row; + } + public int getCol() { + return col; + } + public void setCol(int col) { + this.col = col; + } + public int getRowspan() { + return rowspan; + } + public void setRowspan(int rowspan) { + this.rowspan = rowspan; + } + public String getScript() { + return script; + } + public void setScript(String script) { + this.script = script; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptDecisionTable.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptDecisionTable.java new file mode 100644 index 0000000..4c9d7f7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/model/table/ScriptDecisionTable.java @@ -0,0 +1,82 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.model.table; + +import com.itheima.sfbx.framework.rule.model.rule.Library; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年5月5日 + */ +public class ScriptDecisionTable { + private List rows; + private List columns; + private Map cellMap; + private List libraries; + public List getRows() { + return rows; + } + public void addLibrary(Library library){ + if(libraries==null){ + libraries=new ArrayList(); + } + libraries.add(library); + } + public void addRow(Row row){ + if(rows==null){ + rows=new ArrayList(); + } + rows.add(row); + } + public void addColumn(Column col){ + if(columns==null){ + columns=new ArrayList(); + } + columns.add(col); + } + public void addCell(ScriptCell cell){ + if(cellMap==null){ + cellMap=new HashMap(); + } + cellMap.put(buildCellKey(cell.getRow(),cell.getCol()), cell); + } + public void setRows(List rows) { + this.rows = rows; + } + public List getColumns() { + return columns; + } + public void setColumns(List columns) { + this.columns = columns; + } + public Map getCellMap() { + return cellMap; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + public String buildCellKey(int row,int col){ + return row+","+col; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractParser.java new file mode 100644 index 0000000..8264ab5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractParser.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年2月28日 + */ +public abstract class AbstractParser implements Parser { + protected List parseParameters(Element element,ValueParser valueParser) { + List parameters=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("parameter")){ + Parameter parameter=new Parameter(); + parameter.setName(ele.attributeValue("name")); + parameter.setType(Datatype.valueOf(ele.attributeValue("type"))); + for(Object o:ele.elements()){ + if(o==null || !(o instanceof Element)){ + continue; + } + Element e=(Element)o; + if(valueParser.support(e.getName())){ + Value value=valueParser.parse(e); + parameter.setValue(value); + break; + } + } + parameters.add(parameter); + } + } + return parameters; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractRuleParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractRuleParser.java new file mode 100644 index 0000000..eee615e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/AbstractRuleParser.java @@ -0,0 +1,103 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.text.ParseException; +import java.text.SimpleDateFormat; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public abstract class AbstractRuleParser implements Parser { + protected LhsParser lhsParser; + protected RhsParser rhsParser; + private OtherParser otherParser; + public void parseRule(Rule rule,Element element) { + rule.setName(element.attributeValue("name")); + String salience=element.attributeValue("salience"); + if(StringUtils.isNotEmpty(salience)){ + rule.setSalience(Integer.valueOf(salience)); + } + String effectiveDate=element.attributeValue("effective-date"); + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + if(StringUtils.isNotEmpty(effectiveDate)){ + try { + rule.setEffectiveDate(sd.parse(effectiveDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String expiresDate=element.attributeValue("expires-date"); + if(StringUtils.isNotEmpty(expiresDate)){ + try { + rule.setExpiresDate(sd.parse(expiresDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String enabled=element.attributeValue("enabled"); + if(StringUtils.isNotEmpty(enabled)){ + rule.setEnabled(Boolean.valueOf(enabled)); + } + String debug=element.attributeValue("debug"); + if(StringUtils.isNotEmpty(debug)){ + rule.setDebug(Boolean.valueOf(debug)); + } + String loop=element.attributeValue("loop"); + if(StringUtils.isNotEmpty(loop)){ + rule.setLoop(Boolean.valueOf(loop)); + } + rule.setActivationGroup(element.attributeValue("activation-group")); + rule.setAgendaGroup(element.attributeValue("agenda-group")); + String autoFocus=element.attributeValue("auto-focus"); + if(StringUtils.isNotEmpty(autoFocus)){ + rule.setAutoFocus(Boolean.valueOf(autoFocus)); + } + rule.setRuleflowGroup(element.attributeValue("ruleflow-group")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(lhsParser.support(ele.getName())){ + rule.setLhs(lhsParser.parse(ele)); + }else if(rhsParser.support(ele.getName())){ + rule.setRhs(rhsParser.parse(ele)); + }else if(otherParser.support(ele.getName())){ + rule.setOther(otherParser.parse(ele)); + }else if(ele.getName().equals("remark")){ + rule.setRemark(ele.getText()); + } + } + } + + public void setLhsParser(LhsParser lhsParser) { + this.lhsParser = lhsParser; + } + public void setRhsParser(RhsParser rhsParser) { + this.rhsParser = rhsParser; + } + public void setOtherParser(OtherParser otherParser) { + this.otherParser = otherParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionLibraryParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionLibraryParser.java new file mode 100644 index 0000000..00d0754 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionLibraryParser.java @@ -0,0 +1,83 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.Method; +import com.itheima.sfbx.framework.rule.model.library.action.Parameter; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ActionLibraryParser implements Parser { + public ActionLibrary parse(Element element) { + ActionLibrary lib=new ActionLibrary(); + for(Object obj:element.elements()){ + if(obj==null){ + continue; + } + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("spring-bean")){ + lib.addSpringBean(parseSpringBean(ele)); + } + } + return lib; + } + private SpringBean parseSpringBean(Element element){ + SpringBean bean=new SpringBean(); + bean.setId(element.attributeValue("id")); + bean.setName(element.attributeValue("name")); + for(Object obj:element.elements()){ + if(obj==null){ + continue; + } + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + Method method=new Method(); + method.setMethodName(ele.attributeValue("method-name")); + method.setName(ele.attributeValue("name")); + for(Object o:ele.elements()){ + if(o==null){ + continue; + } + if(!(o instanceof Element)){ + continue; + } + Element e=(Element)o; + if(e.getName().equals("parameter")){ + Parameter parameter=new Parameter(); + parameter.setName(e.attributeValue("name")); + parameter.setType(Datatype.valueOf(e.attributeValue("type"))); + method.addParameter(parameter); + } + } + bean.addMethod(method); + } + return bean; + } + public boolean support(String name) { + return name.equals("action-library"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionParser.java new file mode 100644 index 0000000..d5e7026 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ActionParser.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; + + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public abstract class ActionParser extends AbstractParser { + protected ValueParser valueParser; + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CommonFunctionActionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CommonFunctionActionParser.java new file mode 100644 index 0000000..6a42aa1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CommonFunctionActionParser.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ExecuteCommonFunctionAction; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年7月31日 + */ +public class CommonFunctionActionParser extends ActionParser { + @Override + public Action parse(Element element) { + ExecuteCommonFunctionAction action=new ExecuteCommonFunctionAction(); + action.setLabel(element.attributeValue("function-label")); + action.setName(element.attributeValue("function-name")); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(!ele.getName().equals("function-parameter")){ + continue; + } + CommonFunctionParameter p=new CommonFunctionParameter(); + p.setName(ele.attributeValue("name")); + p.setProperty(ele.attributeValue("property-name")); + p.setPropertyLabel(ele.attributeValue("property-label")); + for(Object object:ele.elements()){ + if(!(object instanceof Element)){ + continue; + } + Element e=(Element)object; + if(!e.getName().equals("value")){ + continue; + } + p.setObjectParameter(valueParser.parse(e)); + } + action.setParameter(p); + } + return action; + } + @Override + public boolean support(String name) { + return name.equals("execute-function"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ComplexArithmeticParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ComplexArithmeticParser.java new file mode 100644 index 0000000..a665608 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ComplexArithmeticParser.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.ArithmeticType; +import com.itheima.sfbx.framework.rule.model.rule.ComplexArithmetic; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ComplexArithmeticParser implements Parser { + private ValueParser valueParser; + private ParenParser parenParser; + public ComplexArithmetic parse(Element element) { + ComplexArithmetic arithmetic=new ComplexArithmetic(); + ArithmeticType arithmeticType=ArithmeticType.valueOf(element.attributeValue("type")); + arithmetic.setType(arithmeticType); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + arithmetic.setValue(valueParser.parse(ele)); + }else if(parenParser.support(ele.getName())){ + arithmetic.setValue(parenParser.parse(ele)); + } + } + return arithmetic; + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + public void setParenParser(ParenParser parenParser) { + this.parenParser = parenParser; + } + public boolean support(String name) { + return name.equals("complex-arith"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConsolePrintActionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConsolePrintActionParser.java new file mode 100644 index 0000000..97877e5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConsolePrintActionParser.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ConsolePrintAction; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ConsolePrintActionParser extends ActionParser { + public Action parse(Element element) { + ConsolePrintAction action=new ConsolePrintAction(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + action.setValue(valueParser.parse(ele)); + break; + } + } + return action; + } + public boolean support(String name) { + return name.equals("console-print"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConstantLibraryParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConstantLibraryParser.java new file mode 100644 index 0000000..86d8c9c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ConstantLibraryParser.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.constant.Constant; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantCategory; +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantLibrary; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ConstantLibraryParser implements Parser { + public static final String BEAN_ID="urule.constantLibraryParser"; + public ConstantLibrary parse(Element element) { + List categories=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("category")){ + categories.add(parseConstantCategory(ele)); + } + } + ConstantLibrary library=new ConstantLibrary(); + library.setCategories(categories); + return library; + } + private ConstantCategory parseConstantCategory(Element element){ + ConstantCategory category=new ConstantCategory(); + category.setName(element.attributeValue("name")); + category.setLabel(element.attributeValue("label")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("constant")){ + category.addConstant(parseConstant(ele)); + } + } + return category; + } + private Constant parseConstant(Element element){ + Constant constant=new Constant(); + constant.setName(element.attributeValue("name")); + constant.setLabel(element.attributeValue("label")); + constant.setType(Datatype.valueOf(element.attributeValue("type"))); + return constant; + } + public boolean support(String name) { + return name.equals("constant-library"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriteriaParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriteriaParser.java new file mode 100644 index 0000000..7b78d4b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriteriaParser.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class CriteriaParser extends CriterionParser { + private ValueParser valueParser; + private LeftParser leftParser; + public Criterion parse(Element element) { + Criteria criteria=new Criteria(); + Op op=Op.valueOf(element.attributeValue("op")); + criteria.setOp(op); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(name.equals("value")){ + criteria.setValue(valueParser.parse(ele)); + }else if(name.equals("left")){ + criteria.setLeft(leftParser.parse(ele)); + } + } + return criteria; + } + + + public boolean support(String name) { + return name.equals("atom"); + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + public void setLeftParser(LeftParser leftParser) { + this.leftParser = leftParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriterionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriterionParser.java new file mode 100644 index 0000000..94f08ae --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/CriterionParser.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public abstract class CriterionParser extends AbstractParser implements ApplicationContextAware { + protected Collection criterionParsers; + + protected List parseCriterion(Element element){ + List list=null; + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + for(CriterionParser parser:criterionParsers){ + if(parser.support(name)){ + if(list==null)list=new ArrayList(); + Criterion criterion=parser.parse(ele); + if(criterion!=null){ + list.add(criterion); + } + break; + } + } + } + return list; + } + + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + criterionParsers=applicationContext.getBeansOfType(CriterionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ExecuteMethodActionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ExecuteMethodActionParser.java new file mode 100644 index 0000000..b85054f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ExecuteMethodActionParser.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ExecuteMethodAction; +import com.itheima.sfbx.framework.rule.model.rule.Parameter; +import org.dom4j.Element; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ExecuteMethodActionParser extends ActionParser { + public Action parse(Element element) { + ExecuteMethodAction action=new ExecuteMethodAction(); + action.setBeanId(element.attributeValue("bean")); + action.setBeanLabel(element.attributeValue("bean-label")); + action.setMethodLabel(element.attributeValue("method-label")); + action.setMethodName(element.attributeValue("method-name")); + List parameters = parseParameters(element,valueParser); + action.setParameters(parameters); + return action; + } + public boolean support(String name) { + return name.equals("execute-method"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/JunctionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/JunctionParser.java new file mode 100644 index 0000000..7b8c004 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/JunctionParser.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.And; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Or; +import org.dom4j.Element; + +import java.util.List; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class JunctionParser extends CriterionParser { + public Criterion parse(Element element) { + List list=parseCriterion(element); + if(list==null || list.size()==0){ + return null; + } + String name=element.getName(); + if(name.equals("and")){ + And and=new And(); + and.setCriterions(list); + return and; + }else{ + Or or=new Or(); + or.setCriterions(list); + return or; + } + } + + public boolean support(String name) { + return name.equals("and") || name.equals("or"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LeftParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LeftParser.java new file mode 100644 index 0000000..fa24d35 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LeftParser.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.lhs.*; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class LeftParser extends AbstractParser { + private SimpleArithmeticParser arithmeticParser; + private ValueParser valueParser; + @Override + public Left parse(Element element) { + Left left=new Left(); + String type=element.attributeValue("type"); + if(StringUtils.isNotEmpty(type)){ + left.setType(LeftType.valueOf(type)); + }else{ + left.setType(LeftType.variable); + } + switch(left.getType()){ + case variable: + left.setLeftPart(buildVariableLeftPart(element)); + break; + case function: + left.setLeftPart(buildFunctionLeftPart(element)); + break; + case method: + left.setLeftPart(buildMethodLeftPart(element)); + break; + case parameter: + left.setLeftPart(buildVariableLeftPart(element)); + break; + case commonfunction: + left.setLeftPart(buildCommonFunctionLeftPart(element)); + break; + case NamedReference: + throw new RuleException("Not support reference type."); + case all: + throw new RuleException("Not support all type."); + case exist: + throw new RuleException("Not support exist type."); + case collect: + throw new RuleException("Not support collect type."); + case eval: + throw new RuleException("Not support eval type."); + } + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(arithmeticParser.support(ele.getName())){ + left.setArithmetic(arithmeticParser.parse(ele)); + } + } + return left; + } + + + private CommonFunctionLeftPart buildCommonFunctionLeftPart(Element element){ + CommonFunctionLeftPart part=new CommonFunctionLeftPart(); + part.setName(element.attributeValue("function-name")); + part.setLabel(element.attributeValue("function-label")); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(!ele.getName().equals("function-parameter")){ + continue; + } + CommonFunctionParameter p=new CommonFunctionParameter(); + p.setName(ele.attributeValue("name")); + p.setProperty(ele.attributeValue("property-name")); + p.setPropertyLabel(ele.attributeValue("property-label")); + for(Object object:ele.elements()){ + if(!(object instanceof Element)){ + continue; + } + Element e=(Element)object; + if(!e.getName().equals("value")){ + continue; + } + p.setObjectParameter(valueParser.parse(e)); + } + part.setParameter(p); + } + return part; + } + + private MethodLeftPart buildMethodLeftPart(Element element){ + MethodLeftPart part=new MethodLeftPart(); + part.setBeanId(element.attributeValue("bean-name")); + part.setBeanLabel(element.attributeValue("bean-label")); + part.setMethodLabel(element.attributeValue("method-label")); + part.setMethodName(element.attributeValue("method-name")); + part.setParameters(parseParameters(element, valueParser)); + return part; + } + + private FunctionLeftPart buildFunctionLeftPart(Element element){ + FunctionLeftPart part=new FunctionLeftPart(); + part.setName(element.attributeValue("name")); + part.setParameters(parseParameters(element, valueParser)); + return part; + } + + private VariableLeftPart buildVariableLeftPart(Element element){ + VariableLeftPart part=new VariableLeftPart(); + String variable=element.attributeValue("var"); + if(StringUtils.isNotEmpty(variable)){ + part.setVariableName(variable); + } + String variableLabel=element.attributeValue("var-label"); + if(StringUtils.isNotEmpty(variableLabel)){ + part.setVariableLabel(variableLabel); + } + String variableCategory=element.attributeValue("var-category"); + if(StringUtils.isNotEmpty(variableCategory)){ + part.setVariableCategory(variableCategory); + } + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotEmpty(datatype)){ + part.setDatatype(Datatype.valueOf(datatype)); + } + return part; + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + public void setArithmeticParser(SimpleArithmeticParser arithmeticParser) { + this.arithmeticParser = arithmeticParser; + } + @Override + public boolean support(String name) { + return name.equals("left"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LhsParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LhsParser.java new file mode 100644 index 0000000..eb3b5be --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LhsParser.java @@ -0,0 +1,71 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Lhs; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class LhsParser implements Parser,ApplicationContextAware { + private Collection criterionParsers; + public Lhs parse(Element element) { + Lhs lhs=new Lhs(); + lhs.setCriterion(parseCriterion(element)); + return lhs; + } + + public Criterion parseCriterion(Element element){ + Criterion criterion=null; + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + for(CriterionParser parser:criterionParsers){ + if(parser.support(name)){ + criterion=(Criterion)parser.parse(ele); + if(criterion!=null){ + break; + } + } + } + } + return criterion; + } + + + public boolean support(String name) { + return name.equals("if"); + } + + public Collection getCriterionParsers() { + return criterionParsers; + } + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + criterionParsers=applicationContext.getBeansOfType(CriterionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LoopRuleParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LoopRuleParser.java new file mode 100644 index 0000000..6892046 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/LoopRuleParser.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopEnd; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopStart; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopTarget; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年5月31日 + */ +public class LoopRuleParser extends AbstractRuleParser { + private ValueParser valueParser; + public LoopRule parse(Element element) { + LoopRule rule=new LoopRule(); + parseRule(rule, element); + + LoopStart loopStart=new LoopStart(); + rule.setLoopStart(loopStart); + LoopEnd loopEnd=new LoopEnd(); + rule.setLoopEnd(loopEnd); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(name.equals("loop-start")){ + loopStart.setActions(rhsParser.parseActions(ele)); + }else if(name.equals("loop-end")){ + loopEnd.setActions(rhsParser.parseActions(ele)); + }else if(name.equals("loop-target")){ + LoopTarget loopTarget=new LoopTarget(); + rule.setLoopTarget(loopTarget); + for(Object eleObj:ele.elements()){ + if(eleObj==null || !(eleObj instanceof Element)){ + continue; + } + Element e=(Element)eleObj; + if(valueParser.support(e.getName())){ + loopTarget.setValue(valueParser.parse(e)); + break; + } + } + + } + } + + return rule; + } + + + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + + public boolean support(String name) { + return name.equals("loop-rule"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/NamedJunctionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/NamedJunctionParser.java new file mode 100644 index 0000000..041f8c9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/NamedJunctionParser.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criterion; +import com.itheima.sfbx.framework.rule.model.rule.lhs.JunctionType; +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedItem; +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedJunction; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class NamedJunctionParser extends CriterionParser { + private ValueParser valueParser; + public Criterion parse(Element element) { + NamedJunction junction=new NamedJunction(); + junction.setReferenceName(element.attributeValue("reference-name")); + junction.setVariableCategory(element.attributeValue("var-category")); + junction.setJunctionType(JunctionType.valueOf(element.attributeValue("junction-type"))); + List items=new ArrayList(); + junction.setItems(items); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(!name.equals("named-criteria")){ + continue; + } + items.add(parseNamedItem(ele)); + } + return junction; + } + + private NamedItem parseNamedItem(Element element){ + NamedItem item=new NamedItem(); + String variable=element.attributeValue("var"); + if(StringUtils.isNotEmpty(variable)){ + item.setVariableName(variable); + } + String variableLabel=element.attributeValue("var-label"); + if(StringUtils.isNotEmpty(variableLabel)){ + item.setVariableLabel(variableLabel); + } + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotEmpty(datatype)){ + item.setDatatype(Datatype.valueOf(datatype)); + } + Op op=Op.valueOf(element.attributeValue("op")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + item.setValue(valueParser.parse(ele)); + break; + } + } + item.setOp(op); + return item; + } + + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + + public boolean support(String name) { + return name.equals("named-atom"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/OtherParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/OtherParser.java new file mode 100644 index 0000000..52b75d1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/OtherParser.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.Other; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class OtherParser implements Parser,ApplicationContextAware { + private Collection actionParsers; + public Other parse(Element element) { + Other other=new Other(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + for(ActionParser actionParser:actionParsers){ + if(actionParser.support(name)){ + other.addAction(actionParser.parse(ele)); + break; + } + } + } + return other; + } + public boolean support(String name) { + return name.equals("else"); + } + public void setApplicationContext(ApplicationContext context) throws BeansException { + actionParsers=context.getBeansOfType(ActionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParameterLibraryParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParameterLibraryParser.java new file mode 100644 index 0000000..144fe06 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParameterLibraryParser.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月10日 + */ +public class ParameterLibraryParser implements Parser> { + private VariableParser variableParser; + @Override + public List parse(Element element) { + List variables=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(name.equals("parameter")){ + variables.add(variableParser.parse(ele)); + } + } + return variables; + } + @Override + public boolean support(String name) { + return name.equals("parameter-library"); + } + public void setVariableParser(VariableParser variableParser) { + this.variableParser = variableParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParenParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParenParser.java new file mode 100644 index 0000000..eb60bad --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ParenParser.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.ParenValue; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年6月14日 + */ +public class ParenParser implements Parser { + private ValueParser valueParser; + private ComplexArithmeticParser arithmeticParser; + @Override + public ParenValue parse(Element element) { + ParenValue value=new ParenValue(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + value.setValue(valueParser.parse(ele)); + }else if(arithmeticParser.support(ele.getName())){ + value.setArithmetic(arithmeticParser.parse(ele)); + } + } + return value; + } + + @Override + public boolean support(String name) { + return name.equals("paren"); + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + public void setArithmeticParser(ComplexArithmeticParser arithmeticParser) { + this.arithmeticParser = arithmeticParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/Parser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/Parser.java new file mode 100644 index 0000000..2a6ca95 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/Parser.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public interface Parser { + boolean support(String name); + T parse(Element element); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RhsParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RhsParser.java new file mode 100644 index 0000000..e1a64f2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RhsParser.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class RhsParser implements Parser,ApplicationContextAware { + private Collection actionParsers; + public Rhs parse(Element element) { + Rhs rhs=new Rhs(); + rhs.setActions(parseActions(element)); + return rhs; + } + public List parseActions(Element element){ + List actions=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + for(ActionParser actionParser:actionParsers){ + if(actionParser.support(name)){ + actions.add(actionParser.parse(ele)); + break; + } + } + } + return actions; + } + + public boolean support(String name) { + return name.equals("then"); + } + + public Collection getActionParsers() { + return actionParsers; + } + public void setApplicationContext(ApplicationContext context) throws BeansException { + actionParsers=context.getBeansOfType(ActionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleParser.java new file mode 100644 index 0000000..b829866 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleParser.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class RuleParser extends AbstractRuleParser { + public Rule parse(Element element) { + Rule rule=new Rule(); + parseRule(rule, element); + return rule; + } + public boolean support(String name) { + return name.equals("rule"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleSetParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleSetParser.java new file mode 100644 index 0000000..63e2f73 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/RuleSetParser.java @@ -0,0 +1,86 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class RuleSetParser implements Parser { + private RuleParser ruleParser; + private LoopRuleParser loopRuleParser; + private RulesRebuilder rulesRebuilder; + public RuleSet parse(Element element) { + RuleSet ruleSet=new RuleSet(); + String parameterLibrary=element.attributeValue("parameter-library"); + if(StringUtils.isNotEmpty(parameterLibrary)){ + ruleSet.addLibrary(new Library(parameterLibrary,null,LibraryType.Parameter)); + } + List rules=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null){ + continue; + } + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(ruleParser.support(name)){ + rules.add(ruleParser.parse(ele)); + }else if(loopRuleParser.support(name)){ + rules.add(loopRuleParser.parse(ele)); + }else if(name.equals("import-variable-library")){ + ruleSet.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + ruleSet.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + ruleSet.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + ruleSet.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Parameter)); + }else if(name.equals("remark")){ + ruleSet.setRemark(ele.getText()); + } + } + ruleSet.setRules(rules); + rulesRebuilder.rebuildRules(ruleSet.getLibraries(), rules); + return ruleSet; + } + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } + + public boolean support(String name) { + return name.equals("rule-set"); + } + public void setRuleParser(RuleParser ruleParser) { + this.ruleParser = ruleParser; + } + public void setLoopRuleParser(LoopRuleParser loopRuleParser) { + this.loopRuleParser = loopRuleParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SimpleArithmeticParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SimpleArithmeticParser.java new file mode 100644 index 0000000..dcd202c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SimpleArithmeticParser.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.rule.ArithmeticType; +import com.itheima.sfbx.framework.rule.model.rule.SimpleArithmetic; +import com.itheima.sfbx.framework.rule.model.rule.SimpleArithmeticValue; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class SimpleArithmeticParser implements Parser { + public SimpleArithmetic parse(Element element) { + SimpleArithmetic arithmetic=new SimpleArithmetic(); + ArithmeticType arithmeticType=ArithmeticType.valueOf(element.attributeValue("type")); + arithmetic.setType(arithmeticType); + SimpleArithmeticValue value=new SimpleArithmeticValue(); + value.setContent(element.attributeValue("value")); + arithmetic.setValue(value); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(this.support(ele.getName())){ + value.setArithmetic(this.parse(ele)); + break; + } + } + return arithmetic; + } + public boolean support(String name) { + return name.equals("simple-arith"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SpringBeanParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SpringBeanParser.java new file mode 100644 index 0000000..9def73d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/SpringBeanParser.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.action.Method; +import com.itheima.sfbx.framework.rule.model.library.action.Parameter; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class SpringBeanParser implements Parser { + public SpringBean parse(Element element) { + SpringBean bean=new SpringBean(); + bean.setId(element.attributeValue("id")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("method")){ + Method method=parseMethod(ele); + bean.addMethod(method); + } + } + return bean; + } + private Method parseMethod(Element element){ + Method method=new Method(); + method.setName(element.attributeValue("name")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("parameter")){ + Parameter parameter=new Parameter(); + parameter.setType(Datatype.valueOf(ele.attributeValue("type"))); + method.addParameter(parameter); + } + } + return method; + } + public boolean support(String name) { + return name.equals("spring-bean"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ValueParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ValueParser.java new file mode 100644 index 0000000..ca17851 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/ValueParser.java @@ -0,0 +1,153 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; +import org.apache.commons.lang.StringEscapeUtils; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.util.List; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ValueParser extends AbstractParser { + private ComplexArithmeticParser arithmeticParser; + public Value parse(Element element) { + AbstractValue av=null; + ValueType type=ValueType.valueOf(element.attributeValue("type")); + if(type.equals(ValueType.Input)){ + SimpleValue sv=new SimpleValue(); + String content=element.attributeValue("content"); + if(StringUtils.isNotEmpty(content)){ + sv.setContent(StringEscapeUtils.unescapeXml(content)); + } + av=sv; + }else if(type.equals(ValueType.Parameter)){ + ParameterValue pv=new ParameterValue(); + pv.setVariableName(element.attributeValue("var")); + pv.setVariableLabel(element.attributeValue("var-label")); + av=pv; + }else if(type.equals(ValueType.Variable)){ + VariableValue vv=new VariableValue(); + String variable=element.attributeValue("var"); + if(StringUtils.isNotEmpty(variable)){ + vv.setVariableName(variable); + } + String variableLabel=element.attributeValue("var-label"); + if(StringUtils.isNotEmpty(variableLabel)){ + vv.setVariableLabel(variableLabel); + } + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotEmpty(datatype)){ + vv.setDatatype(Datatype.valueOf(datatype)); + } + String variableCategory=element.attributeValue("var-category"); + if(StringUtils.isNotEmpty(variableCategory)){ + vv.setVariableCategory(variableCategory); + } + av=vv; + }else if(type.equals(ValueType.VariableCategory)){ + String variableCategory=element.attributeValue("var-category"); + av=new VariableCategoryValue(variableCategory); + }else if(type.equals(ValueType.Method)){ + MethodValue mv=new MethodValue(); + String beanName=element.attributeValue("bean-name"); + mv.setBeanId(beanName); + String beanLabel=element.attributeValue("bean-label"); + mv.setBeanLabel(beanLabel); + String methodName=element.attributeValue("method-name"); + mv.setMethodName(methodName); + String methodLabel=element.attributeValue("method-label"); + mv.setMethodLabel(methodLabel); + List parameters = parseParameters(element,this); + mv.setParameters(parameters); + av=mv; + }else if(type.equals(ValueType.CommonFunction)){ + CommonFunctionValue value=new CommonFunctionValue(); + value.setName(element.attributeValue("function-name")); + value.setLabel(element.attributeValue("function-label")); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(!ele.getName().equals("function-parameter")){ + continue; + } + CommonFunctionParameter p=new CommonFunctionParameter(); + p.setName(ele.attributeValue("name")); + p.setProperty(ele.attributeValue("property-name")); + p.setPropertyLabel(ele.attributeValue("property-name")); + for(Object object:ele.elements()){ + if(!(object instanceof Element)){ + continue; + } + Element e=(Element)object; + if(!e.getName().equals("value")){ + continue; + } + p.setObjectParameter(this.parse(e)); + } + value.setParameter(p); + } + av=value; + }else if(type.equals(ValueType.NamedReference)){ + NamedReferenceValue value=new NamedReferenceValue(); + value.setReferenceName(element.attributeValue("reference-name")); + value.setPropertyName(element.attributeValue("property-name")); + value.setPropertyLabel(element.attributeValue("property-label")); + value.setDatatype(Datatype.valueOf(element.attributeValue("datatype"))); + av=value; + }else{ + ConstantValue cv=new ConstantValue(); + String constant=element.attributeValue("const"); + if(StringUtils.isNotEmpty(constant)){ + cv.setConstantName(constant); + } + String constantLabel=element.attributeValue("const-label"); + if(StringUtils.isNotEmpty(constantLabel)){ + cv.setConstantLabel(constantLabel); + } + String constantCategory=element.attributeValue("const-category"); + if(StringUtils.isNotEmpty(constantCategory)){ + cv.setConstantCategory(constantCategory); + } + av=cv; + } + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(arithmeticParser.support(name)){ + av.setArithmetic(arithmeticParser.parse(ele)); + break; + } + } + return av; + } + public boolean support(String name) { + return name.equals("value"); + } + public void setArithmeticParser(ComplexArithmeticParser arithmeticParser) { + this.arithmeticParser = arithmeticParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableAssignActionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableAssignActionParser.java new file mode 100644 index 0000000..a642d95 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableAssignActionParser.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.VariableAssignAction; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.lhs.LeftType; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableAssignActionParser extends ActionParser { + public Action parse(Element element) { + VariableAssignAction action=new VariableAssignAction(); + String referenceName=element.attributeValue("reference-name"); + if(StringUtils.isNotEmpty(referenceName)){ + action.setReferenceName(referenceName); + } + String variable=element.attributeValue("var"); + if(StringUtils.isEmpty(variable)){ + variable=element.attributeValue("property-name"); + } + action.setVariableName(variable); + String variableLabel=element.attributeValue("var-label"); + if(StringUtils.isEmpty(variableLabel)){ + variableLabel=element.attributeValue("property-label"); + } + action.setVariableLabel(variableLabel); + String variableCategory=element.attributeValue("var-category"); + action.setVariableCategory(variableCategory); + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotEmpty(datatype)){ + action.setDatatype(Datatype.valueOf(datatype)); + } + String type=element.attributeValue("type"); + if(StringUtils.isNotEmpty(type)){ + action.setType(LeftType.valueOf(type)); + } + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + action.setValue(valueParser.parse(ele)); + break; + } + } + return action; + } + public boolean support(String name) { + return name.equals("var-assign"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableCategoryParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableCategoryParser.java new file mode 100644 index 0000000..66cb49d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableCategoryParser.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.variable.CategoryType; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableCategoryParser implements Parser { + private VariableParser variableParser; + public VariableCategory parse(Element element) { + VariableCategory category=new VariableCategory(); + category.setName(element.attributeValue("name")); + category.setClazz(element.attributeValue("clazz")); + category.setType(CategoryType.valueOf(element.attributeValue("type"))); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(variableParser.support(name)){ + category.addVariable(variableParser.parse(ele)); + } + } + return category; + } + public boolean support(String name) { + return name.equals("category"); + } + public void setVariableParser(VariableParser variableParser) { + this.variableParser = variableParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableLibraryParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableLibraryParser.java new file mode 100644 index 0000000..20398bb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableLibraryParser.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableLibraryParser implements Parser> { + private VariableCategoryParser variableCategoryParser; + public List parse(Element element) { + List variableCategories=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(variableCategoryParser.support(name)){ + variableCategories.add(variableCategoryParser.parse(ele)); + } + } + return variableCategories; + } + public boolean support(String name) { + return name.equals("variable-library"); + } + public void setVariableCategoryParser(VariableCategoryParser variableCategoryParser) { + this.variableCategoryParser = variableCategoryParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableParser.java new file mode 100644 index 0000000..098afed --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/VariableParser.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.variable.Act; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableParser implements Parser { + public Variable parse(Element element) { + Variable variable=new Variable(); + variable.setName(element.attributeValue("name")); + variable.setLabel(element.attributeValue("label")); + variable.setDefaultValue(element.attributeValue("default-value")); + variable.setType(Datatype.valueOf(element.attributeValue("type"))); + variable.setAct(Act.valueOf(element.attributeValue("act"))); + return variable; + } + public boolean support(String name) { + return name.equals("var"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ActionTreeNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ActionTreeNodeParser.java new file mode 100644 index 0000000..91e4b57 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ActionTreeNodeParser.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.decisiontree; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.model.decisiontree.ActionTreeNode; +import com.itheima.sfbx.framework.rule.model.decisiontree.TreeNodeType; +import com.itheima.sfbx.framework.rule.parse.ActionParser; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class ActionTreeNodeParser implements Parser,ApplicationContextAware { + private Collection actionParsers; + @Override + public ActionTreeNode parse(Element element) { + ActionTreeNode node=new ActionTreeNode(); + node.setNodeType(TreeNodeType.action); + List actions=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + + for(ActionParser actionParser:actionParsers){ + if(actionParser.support(name)){ + actions.add(actionParser.parse(ele)); + break; + } + } + } + node.setActions(actions); + return node; + } + + @Override + public boolean support(String name) { + return name.equals("action-tree-node"); + } + public void setApplicationContext(ApplicationContext context) throws BeansException { + actionParsers=context.getBeansOfType(ActionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ConditionTreeNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ConditionTreeNodeParser.java new file mode 100644 index 0000000..8ebf573 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/ConditionTreeNodeParser.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.decisiontree; + +import com.itheima.sfbx.framework.rule.model.decisiontree.ActionTreeNode; +import com.itheima.sfbx.framework.rule.model.decisiontree.ConditionTreeNode; +import com.itheima.sfbx.framework.rule.model.decisiontree.TreeNodeType; +import com.itheima.sfbx.framework.rule.model.decisiontree.VariableTreeNode; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.parse.Parser; +import com.itheima.sfbx.framework.rule.parse.ValueParser; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class ConditionTreeNodeParser implements Parser { + private ValueParser valueParser; + private VariableTreeNodeParser variableTreeNodeParser; + private ActionTreeNodeParser actionTreeNodeParser; + @Override + public ConditionTreeNode parse(Element element) { + ConditionTreeNode node=new ConditionTreeNode(); + node.setNodeType(TreeNodeType.condition); + node.setOp(Op.valueOf(element.attributeValue("op"))); + List conditionTreeNodes=new ArrayList(); + List actionTreeNodes=new ArrayList(); + List variableTreeNodes=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(valueParser.support(name)){ + node.setValue(valueParser.parse(ele)); + }else if(support(name)){ + ConditionTreeNode cn=parse(ele); + cn.setParentNode(node); + conditionTreeNodes.add(cn); + }else if(variableTreeNodeParser.support(name)){ + VariableTreeNode vn=variableTreeNodeParser.parse(ele); + vn.setParentNode(node); + variableTreeNodes.add(vn); + }else if(actionTreeNodeParser.support(name)){ + ActionTreeNode an=actionTreeNodeParser.parse(ele); + an.setParentNode(node); + actionTreeNodes.add(an); + } + } + if(conditionTreeNodes.size()>0){ + node.setConditionTreeNodes(conditionTreeNodes); + } + if(actionTreeNodes.size()>0){ + node.setActionTreeNodes(actionTreeNodes); + } + if(variableTreeNodes.size()>0){ + node.setVariableTreeNodes(variableTreeNodes); + } + return node; + } + + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + + public void setActionTreeNodeParser( + ActionTreeNodeParser actionTreeNodeParser) { + this.actionTreeNodeParser = actionTreeNodeParser; + } + public void setVariableTreeNodeParser( + VariableTreeNodeParser variableTreeNodeParser) { + this.variableTreeNodeParser = variableTreeNodeParser; + } + + @Override + public boolean support(String name) { + return name.equals("condition-tree-node"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/DecisionTreeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/DecisionTreeParser.java new file mode 100644 index 0000000..3b851dd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/DecisionTreeParser.java @@ -0,0 +1,183 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.decisiontree; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.model.decisiontree.*; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Left; +import com.itheima.sfbx.framework.rule.model.rule.lhs.LeftPart; +import com.itheima.sfbx.framework.rule.model.rule.lhs.VariableLeftPart; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class DecisionTreeParser implements Parser { + private VariableTreeNodeParser variableTreeNodeParser; + private RulesRebuilder rulesRebuilder; + @Override + public DecisionTree parse(Element element) { + DecisionTree tree=new DecisionTree(); + + String salience=element.attributeValue("salience"); + if(StringUtils.isNotEmpty(salience)){ + tree.setSalience(Integer.valueOf(salience)); + } + String effectiveDate=element.attributeValue("effective-date"); + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + if(StringUtils.isNotEmpty(effectiveDate)){ + try { + tree.setEffectiveDate(sd.parse(effectiveDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String expiresDate=element.attributeValue("expires-date"); + if(StringUtils.isNotEmpty(expiresDate)){ + try { + tree.setExpiresDate(sd.parse(expiresDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String enabled=element.attributeValue("enabled"); + if(StringUtils.isNotEmpty(enabled)){ + tree.setEnabled(Boolean.valueOf(enabled)); + } + + String debug=element.attributeValue("debug"); + if(StringUtils.isNotEmpty(debug)){ + tree.setDebug(Boolean.valueOf(debug)); + } + + List libs=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(variableTreeNodeParser.support(name)){ + tree.setVariableTreeNode(variableTreeNodeParser.parse(ele)); + }if(name.equals("import-variable-library")){ + libs.add(new Library(ele.attributeValue("path"),null,LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + libs.add(new Library(ele.attributeValue("path"),null,LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + libs.add(new Library(ele.attributeValue("path"),null,LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + libs.add(new Library(ele.attributeValue("path"),null,LibraryType.Parameter)); + }else if(name.equals("remark")){ + tree.setRemark(ele.getText()); + } + } + tree.setLibraries(libs); + ResourceLibrary resourceLibrary = rulesRebuilder.getResourceLibraryBuilder().buildResourceLibrary(libs); + rebuildTreeNode(resourceLibrary,tree.getVariableTreeNode()); + return tree; + } + + private void rebuildTreeNode(ResourceLibrary resourceLibrary,TreeNode treeNode){ + if(treeNode==null)return; + if(treeNode instanceof VariableTreeNode){ + VariableTreeNode varNode=(VariableTreeNode)treeNode; + Left left=varNode.getLeft(); + if(left!=null){ + LeftPart part=left.getLeftPart(); + if(part!=null && part instanceof VariableLeftPart){ + VariableLeftPart varPart=(VariableLeftPart)part; + String category=varPart.getVariableCategory(); + String name=varPart.getVariableName(); + if(StringUtils.isNotBlank(category) && StringUtils.isNotBlank(name)){ + Variable var=rulesRebuilder.getVariableByName(resourceLibrary.getVariableCategories(), category, name, null); + varPart.setDatatype(var.getType()); + varPart.setVariableLabel(var.getLabel()); + } + } + } + List nodes=varNode.getConditionTreeNodes(); + if(nodes!=null){ + for(ConditionTreeNode node:nodes){ + rebuildTreeNode(resourceLibrary, node); + } + } + }else if(treeNode instanceof ConditionTreeNode){ + ConditionTreeNode node=(ConditionTreeNode)treeNode; + Value value=node.getValue(); + if(value!=null){ + rulesRebuilder.rebuildValue(value, resourceLibrary, null, false); + } + List actionNodes=node.getActionTreeNodes(); + if(actionNodes!=null){ + for(ActionTreeNode actionNode:actionNodes){ + rebuildTreeNode(resourceLibrary, actionNode); + } + } + List conditionNodes=node.getConditionTreeNodes(); + if(conditionNodes!=null){ + for(ConditionTreeNode conditionNode:conditionNodes){ + rebuildTreeNode(resourceLibrary, conditionNode); + } + } + List varNodes=node.getVariableTreeNodes(); + if(varNodes!=null){ + for(VariableTreeNode varNode:varNodes){ + rebuildTreeNode(resourceLibrary, varNode); + } + } + }else if(treeNode instanceof ActionTreeNode){ + ActionTreeNode actionNode=(ActionTreeNode)treeNode; + List actions=actionNode.getActions(); + if(actions!=null){ + for(Action action:actions){ + if(action==null){ + continue; + } + rulesRebuilder.rebuildAction(action, resourceLibrary, null, false); + } + } + } + } + + public void setVariableTreeNodeParser( + VariableTreeNodeParser variableTreeNodeParser) { + this.variableTreeNodeParser = variableTreeNodeParser; + } + @Override + public boolean support(String name) { + return name.equals("decision-tree"); + } + + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/VariableTreeNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/VariableTreeNodeParser.java new file mode 100644 index 0000000..de1f46e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/decisiontree/VariableTreeNodeParser.java @@ -0,0 +1,73 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.decisiontree; + +import com.itheima.sfbx.framework.rule.model.decisiontree.ConditionTreeNode; +import com.itheima.sfbx.framework.rule.model.decisiontree.TreeNodeType; +import com.itheima.sfbx.framework.rule.model.decisiontree.VariableTreeNode; +import com.itheima.sfbx.framework.rule.parse.LeftParser; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年2月26日 + */ +public class VariableTreeNodeParser implements Parser { + private LeftParser leftParser; + private ConditionTreeNodeParser conditionTreeNodeParser; + @Override + public VariableTreeNode parse(Element element) { + VariableTreeNode node=new VariableTreeNode(); + node.setNodeType(TreeNodeType.variable); + List conditionTreeNodes=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(name.equals("left")){ + node.setLeft(leftParser.parse(ele)); + }else if(conditionTreeNodeParser.support(name)){ + ConditionTreeNode cn=conditionTreeNodeParser.parse(ele); + cn.setParentNode(node); + conditionTreeNodes.add(cn); + } + } + if(conditionTreeNodes.size()>0){ + node.setConditionTreeNodes(conditionTreeNodes); + } + return node; + } + + public void setConditionTreeNodeParser( + ConditionTreeNodeParser conditionTreeNodeParser) { + this.conditionTreeNodeParser = conditionTreeNodeParser; + } + + public void setLeftParser(LeftParser leftParser) { + this.leftParser = leftParser; + } + + @Override + public boolean support(String name) { + return name.equals("variable-tree-node"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ActionLibraryDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ActionLibraryDeserializer.java new file mode 100644 index 0000000..1d15473 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ActionLibraryDeserializer.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.parse.ActionLibraryParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ActionLibraryDeserializer implements Deserializer { + public static final String BEAN_ID="urule.actionLibraryDeserializer"; + private ActionLibraryParser actionLibraryParser; + public ActionLibrary deserialize(Element root) { + return actionLibraryParser.parse(root); + } + public boolean support(Element root) { + return actionLibraryParser.support(root.getName()); + } + public void setActionLibraryParser(ActionLibraryParser actionLibraryParser) { + this.actionLibraryParser = actionLibraryParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ConstantLibraryDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ConstantLibraryDeserializer.java new file mode 100644 index 0000000..9fc4da2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ConstantLibraryDeserializer.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.library.constant.ConstantLibrary; +import com.itheima.sfbx.framework.rule.parse.ConstantLibraryParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ConstantLibraryDeserializer implements Deserializer { + public static final String BEAN_ID="urule.constantLibraryDeserializer"; + private ConstantLibraryParser constantLibraryParser; + public ConstantLibrary deserialize(Element root) { + return constantLibraryParser.parse(root); + } + public boolean support(Element root) { + return constantLibraryParser.support(root.getName()); + } + public void setConstantLibraryParser( + ConstantLibraryParser constantLibraryParser) { + this.constantLibraryParser = constantLibraryParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTableDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTableDeserializer.java new file mode 100644 index 0000000..0538618 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTableDeserializer.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.table.DecisionTable; +import com.itheima.sfbx.framework.rule.parse.table.DecisionTableParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class DecisionTableDeserializer implements Deserializer{ + public static final String BEAN_ID="urule.decisionTableDeserializer"; + private DecisionTableParser decisionTableParser; + public DecisionTable deserialize(Element root) { + return decisionTableParser.parse(root); + } + public boolean support(Element root) { + return decisionTableParser.support(root.getName()); + } + public void setDecisionTableParser(DecisionTableParser decisionTableParser) { + this.decisionTableParser = decisionTableParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTreeDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTreeDeserializer.java new file mode 100644 index 0000000..89c3ba7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/DecisionTreeDeserializer.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.decisiontree.DecisionTree; +import com.itheima.sfbx.framework.rule.parse.decisiontree.DecisionTreeParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年2月29日 + */ +public class DecisionTreeDeserializer implements Deserializer { + public static final String BEAN_ID="urule.decisionTreeDeserializer"; + private DecisionTreeParser decisionTreeParser; + @Override + public DecisionTree deserialize(Element root) { + return decisionTreeParser.parse(root); + } + public void setDecisionTreeParser(DecisionTreeParser decisionTreeParser) { + this.decisionTreeParser = decisionTreeParser; + } + @Override + public boolean support(Element root) { + return decisionTreeParser.support(root.getName()); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/Deserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/Deserializer.java new file mode 100644 index 0000000..590be1a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/Deserializer.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import org.dom4j.Element; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public interface Deserializer{ + T deserialize(Element root); + boolean support(Element root); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/FlowDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/FlowDeserializer.java new file mode 100644 index 0000000..9349883 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/FlowDeserializer.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.parse.flow.FlowDefinitionParser; +import org.dom4j.Element; +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class FlowDeserializer implements Deserializer{ + public static final String BEAN_ID="urule.flowDeserializer"; + private FlowDefinitionParser flowDefinitionParser; + public FlowDefinition deserialize(Element root) { + return (FlowDefinition)flowDefinitionParser.parse(root); + } + public boolean support(Element root) { + if(flowDefinitionParser.support(root.getName())){ + return true; + }else{ + return false; + } + } + public void setFlowDefinitionParser(FlowDefinitionParser flowDefinitionParser) { + this.flowDefinitionParser = flowDefinitionParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ParameterLibraryDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ParameterLibraryDeserializer.java new file mode 100644 index 0000000..c4dbc95 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ParameterLibraryDeserializer.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.parse.ParameterLibraryParser; +import org.dom4j.Element; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年3月10日 + */ +public class ParameterLibraryDeserializer implements Deserializer> { + public static final String BEAN_ID="urule.parameterLibraryDeserializer"; + private ParameterLibraryParser parameterLibraryParser; + @Override + public List deserialize(Element root) { + return parameterLibraryParser.parse(root); + } + @Override + public boolean support(Element root) { + return parameterLibraryParser.support(root.getName()); + } + public void setParameterLibraryParser( + ParameterLibraryParser parameterLibraryParser) { + this.parameterLibraryParser = parameterLibraryParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/RuleSetDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/RuleSetDeserializer.java new file mode 100644 index 0000000..004cb6c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/RuleSetDeserializer.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; +import com.itheima.sfbx.framework.rule.parse.RuleSetParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class RuleSetDeserializer implements Deserializer{ + public static final String BEAN_ID="urule.ruleSetDeserializer"; + private RuleSetParser ruleSetParser; + public RuleSet deserialize(Element root) { + return ruleSetParser.parse(root); + } + public boolean support(Element root) { + if(ruleSetParser.support(root.getName())){ + return true; + }else{ + return false; + } + } + public void setRuleSetParser(RuleSetParser ruleSetParser) { + this.ruleSetParser = ruleSetParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScorecardDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScorecardDeserializer.java new file mode 100644 index 0000000..5933884 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScorecardDeserializer.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.scorecard.ScorecardDefinition; +import com.itheima.sfbx.framework.rule.parse.scorecard.ScorecardParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class ScorecardDeserializer implements Deserializer { + public static final String BEAN_ID="urule.scorecardDeserializer"; + private ScorecardParser scorecardParser; + @Override + public ScorecardDefinition deserialize(Element root) { + ScorecardDefinition card=scorecardParser.parse(root); + return card; + } + + public void setScorecardParser(ScorecardParser scorecardParser) { + this.scorecardParser = scorecardParser; + } + @Override + public boolean support(Element root) { + return scorecardParser.support(root.getName()); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScriptDecisionTableDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScriptDecisionTableDeserializer.java new file mode 100644 index 0000000..6b1ceeb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/ScriptDecisionTableDeserializer.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.table.ScriptDecisionTable; +import com.itheima.sfbx.framework.rule.parse.table.ScriptDecisionTableParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class ScriptDecisionTableDeserializer implements Deserializer{ + public static final String BEAN_ID="urule.scriptDecisionTableDeserializer"; + private ScriptDecisionTableParser scriptDecisionTableParser; + public ScriptDecisionTable deserialize(Element root) { + return scriptDecisionTableParser.parse(root); + } + public boolean support(Element root) { + return scriptDecisionTableParser.support(root.getName()); + } + public void setScriptDecisionTableParser( + ScriptDecisionTableParser scriptDecisionTableParser) { + this.scriptDecisionTableParser = scriptDecisionTableParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/VariableLibraryDeserializer.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/VariableLibraryDeserializer.java new file mode 100644 index 0000000..24a6586 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/deserializer/VariableLibraryDeserializer.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.deserializer; + +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.parse.VariableLibraryParser; +import org.dom4j.Element; + +import java.util.List; + + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class VariableLibraryDeserializer implements Deserializer>{ + public static final String BEAN_ID="urule.variableLibraryDeserializer"; + private VariableLibraryParser variableLibraryParser; + public List deserialize(Element root) { + return variableLibraryParser.parse(root); + } + public boolean support(Element root) { + if(variableLibraryParser.support(root.getName())){ + return true; + }else{ + return false; + } + } + + public void setVariableLibraryParser(VariableLibraryParser variableLibraryParser) { + this.variableLibraryParser = variableLibraryParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ActionNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ActionNodeParser.java new file mode 100644 index 0000000..bea0291 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ActionNodeParser.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ActionNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ActionNodeParser extends FlowNodeParser { + public ActionNode parse(Element element) { + ActionNode action=new ActionNode(element.attributeValue("name")); + action.setActionBean(element.attributeValue("action-bean")); + action.setEventBean(element.attributeValue("event-bean")); + action.setX(element.attributeValue("x")); + action.setY(element.attributeValue("y")); + action.setWidth(element.attributeValue("width")); + action.setHeight(element.attributeValue("height")); + action.setConnections(parseConnections(element)); + return action; + } + public boolean support(String name) { + return name.equals("action"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/DecisionNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/DecisionNodeParser.java new file mode 100644 index 0000000..9b3814c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/DecisionNodeParser.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.DecisionItem; +import com.itheima.sfbx.framework.rule.model.flow.DecisionNode; +import com.itheima.sfbx.framework.rule.model.flow.DecisionType; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class DecisionNodeParser extends FlowNodeParser { + public DecisionNode parse(Element element) { + DecisionNode decision=new DecisionNode(element.attributeValue("name")); + decision.setEventBean(element.attributeValue("event-bean")); + String decitionType=element.attributeValue("decision-type"); + if(StringUtils.isNotEmpty(decitionType)){ + decision.setDecisionType(DecisionType.valueOf(decitionType)); + } + decision.setX(element.attributeValue("x")); + decision.setY(element.attributeValue("y")); + decision.setWidth(element.attributeValue("width")); + decision.setHeight(element.attributeValue("height")); + decision.setConnections(parseConnections(element)); + List items=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(!ele.getName().equals("item")){ + continue; + } + DecisionItem item=parseDecisionItem(ele); + items.add(item); + } + decision.setItems(items); + return decision; + } + + private DecisionItem parseDecisionItem(Element element){ + DecisionItem item=new DecisionItem(); + item.setTo(element.attributeValue("connection")); + String script=element.getStringValue(); + item.setScript(script); + String percent=element.attributeValue("percent"); + if(StringUtils.isNotEmpty(percent)){ + item.setPercent(Integer.valueOf(percent)); + } + return item; + } + + public boolean support(String name) { + return name.equals("decision"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/EndNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/EndNodeParser.java new file mode 100644 index 0000000..4ec66aa --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/EndNodeParser.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.EndNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class EndNodeParser extends FlowNodeParser { + public EndNode parse(Element element) { + EndNode end=new EndNode(element.attributeValue("name")); + end.setConnections(parseConnections(element)); + end.setEventBean(element.attributeValue("event-bean")); + return end; + } + public boolean support(String name) { + return name.equals("end"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowDefinitionParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowDefinitionParser.java new file mode 100644 index 0000000..c51f855 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowDefinitionParser.java @@ -0,0 +1,96 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +@SuppressWarnings("rawtypes") +public class FlowDefinitionParser implements Parser,ApplicationContextAware { + private Collection nodeParsers; + public FlowDefinition parse(Element element) { + FlowDefinition flow=new FlowDefinition(); + flow.setId(element.attributeValue("id")); + String debug=element.attributeValue("debug"); + if(StringUtils.isNotBlank(debug)){ + flow.setDebug(Boolean.valueOf(debug)); + } + List nodes=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(name.equals("import-variable-library")){ + flow.addLibrary(buildLibrary(ele, LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + flow.addLibrary(buildLibrary(ele, LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + flow.addLibrary(buildLibrary(ele, LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + flow.addLibrary(buildLibrary(ele, LibraryType.Parameter)); + }else{ + for(FlowNodeParser parser:nodeParsers){ + if(parser.support(ele.getName())){ + nodes.add((FlowNode)parser.parse(ele)); + break; + } + } + } + } + flow.setNodes(nodes); + flow.buildConnectionToNode(); + return flow; + } + private Library buildLibrary(Element ele, LibraryType type) { + String path=ele.attributeValue("path"); + if(path.endsWith(".xml")){ + Library lib=new Library(path,null,type); + return lib; + }else{ + int versionPos=path.lastIndexOf(":"); + String version=path.substring(versionPos+1,path.length()); + if(version.equals("LATEST"))version=null; + path=path.substring(0,versionPos); + Library lib=new Library(path,version,type); + return lib; + } + } + public boolean support(String name) { + return name.equals("rule-flow"); + } + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + nodeParsers=applicationContext.getBeansOfType(FlowNodeParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowNodeParser.java new file mode 100644 index 0000000..f5e1157 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/FlowNodeParser.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.Connection; +import com.itheima.sfbx.framework.rule.parse.CriterionParser; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public abstract class FlowNodeParser implements ApplicationContextAware,Parser { + protected Collection criterionParsers; + protected List parseConnections(Element element){ + List connections=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(!ele.getName().equals("connection")){ + continue; + } + connections.add(buildConnection(ele)); + } + return connections; + } + private Connection buildConnection(Element element){ + Connection conn=new Connection(); + conn.setName(element.attributeValue("name")); + conn.setToName(element.attributeValue("to")); + conn.setG(element.attributeValue("g")); + String script=element.getStringValue(); + if(StringUtils.isNotEmpty(script)){ + conn.setScript(script); + } + return conn; + } + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + criterionParsers=applicationContext.getBeansOfType(CriterionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ForkNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ForkNodeParser.java new file mode 100644 index 0000000..3a2827a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ForkNodeParser.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ForkNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class ForkNodeParser extends FlowNodeParser { + public ForkNode parse(Element element) { + ForkNode fork=new ForkNode(element.attributeValue("name")); + fork.setConnections(parseConnections(element)); + fork.setEventBean(element.attributeValue("event-bean")); + fork.setX(element.attributeValue("x")); + fork.setY(element.attributeValue("y")); + fork.setWidth(element.attributeValue("width")); + fork.setHeight(element.attributeValue("height")); + return fork; + } + public boolean support(String name) { + return name.equals("fork"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/JoinNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/JoinNodeParser.java new file mode 100644 index 0000000..6c2d11f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/JoinNodeParser.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.JoinNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class JoinNodeParser extends FlowNodeParser { + public JoinNode parse(Element element) { + JoinNode join=new JoinNode(element.attributeValue("name")); + join.setConnections(parseConnections(element)); + join.setEventBean(element.attributeValue("event-bean")); + join.setX(element.attributeValue("x")); + join.setY(element.attributeValue("y")); + join.setWidth(element.attributeValue("width")); + join.setHeight(element.attributeValue("height")); + return join; + } + public boolean support(String name) { + return name.equals("join"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RuleNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RuleNodeParser.java new file mode 100644 index 0000000..442b822 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RuleNodeParser.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.RuleNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年4月21日 + */ +public class RuleNodeParser extends FlowNodeParser { + @Override + public RuleNode parse(Element element) { + RuleNode node=new RuleNode(element.attributeValue("name")); + node.setFile(element.attributeValue("file")); + node.setVersion(element.attributeValue("version")); + node.setX(element.attributeValue("x")); + node.setY(element.attributeValue("y")); + node.setWidth(element.attributeValue("width")); + node.setHeight(element.attributeValue("height")); + node.setEventBean(element.attributeValue("event-bean")); + node.setConnections(parseConnections(element)); + return node; + } + @Override + public boolean support(String name) { + return name.equals("rule"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RulePackageNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RulePackageNodeParser.java new file mode 100644 index 0000000..196020b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/RulePackageNodeParser.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.RulePackageNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年4月21日 + */ +public class RulePackageNodeParser extends FlowNodeParser { + @Override + public RulePackageNode parse(Element element) { + RulePackageNode node=new RulePackageNode(element.attributeValue("name")); + node.setConnections(parseConnections(element)); + node.setProject(element.attributeValue("project")); + node.setPackageId(element.attributeValue("package-id")); + node.setX(element.attributeValue("x")); + node.setY(element.attributeValue("y")); + node.setWidth(element.attributeValue("width")); + node.setHeight(element.attributeValue("height")); + return node; + } + @Override + public boolean support(String name) { + return name.equals("rule-package"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ScriptNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ScriptNodeParser.java new file mode 100644 index 0000000..f009c17 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/ScriptNodeParser.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.ScriptNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年4月22日 + */ +public class ScriptNodeParser extends FlowNodeParser { + @Override + public ScriptNode parse(Element element) { + ScriptNode node =new ScriptNode(); + node.setName(element.attributeValue("name")); + node.setEventBean(element.attributeValue("event-bean")); + node.setX(element.attributeValue("x")); + node.setY(element.attributeValue("y")); + node.setWidth(element.attributeValue("width")); + node.setHeight(element.attributeValue("height")); + node.setConnections(parseConnections(element)); + String script=element.getStringValue(); + node.setScript(script); + return node; + } + public boolean support(String name) { + return name.equals("script"); + }; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/StartNodeParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/StartNodeParser.java new file mode 100644 index 0000000..a24b055 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/flow/StartNodeParser.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.flow; + +import com.itheima.sfbx.framework.rule.model.flow.StartNode; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2014年12月23日 + */ +public class StartNodeParser extends FlowNodeParser { + public StartNode parse(Element element) { + StartNode start=new StartNode(element.attributeValue("name")); + start.setConnections(parseConnections(element)); + start.setEventBean(element.attributeValue("event-bean")); + start.setX(element.attributeValue("x")); + start.setY(element.attributeValue("y")); + start.setWidth(element.attributeValue("width")); + start.setHeight(element.attributeValue("height")); + return start; + } + public boolean support(String name) { + return name.equals("start"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/AttributeRowParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/AttributeRowParser.java new file mode 100644 index 0000000..28b68fb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/AttributeRowParser.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.scorecard; + +import com.itheima.sfbx.framework.rule.model.scorecard.AttributeRow; +import com.itheima.sfbx.framework.rule.model.scorecard.ConditionRow; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class AttributeRowParser implements Parser { + @Override + public AttributeRow parse(Element element) { + AttributeRow row=new AttributeRow(); + row.setRowNumber(Integer.valueOf(element.attributeValue("row-number"))); + List rows=new ArrayList(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("condition-row")){ + ConditionRow r=new ConditionRow(); + r.setRowNumber(Integer.valueOf(ele.attributeValue("row-number"))); + rows.add(r); + } + } + row.setConditionRows(rows); + return row; + } + @Override + public boolean support(String name) { + return name.equals("attribute-row"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CardCellParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CardCellParser.java new file mode 100644 index 0000000..52f1e5a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CardCellParser.java @@ -0,0 +1,72 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.scorecard; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.scorecard.CardCell; +import com.itheima.sfbx.framework.rule.model.scorecard.CellType; +import com.itheima.sfbx.framework.rule.parse.Parser; +import com.itheima.sfbx.framework.rule.parse.ValueParser; +import com.itheima.sfbx.framework.rule.parse.table.JointParser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class CardCellParser implements Parser { + private ValueParser valueParser; + private JointParser jointParser; + @Override + public CardCell parse(Element element) { + CardCell cell=new CardCell(); + cell.setType(CellType.valueOf(element.attributeValue("type"))); + cell.setCol(Integer.valueOf(element.attributeValue("col"))); + cell.setRow(Integer.valueOf(element.attributeValue("row"))); + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotBlank(datatype)){ + cell.setDatatype(Datatype.valueOf(datatype)); + } + cell.setVariableName(element.attributeValue("var")); + cell.setVariableLabel(element.attributeValue("var-label")); + cell.setWeight(element.attributeValue("weight")); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + cell.setValue(valueParser.parse(ele)); + }else if(jointParser.support(ele.getName())){ + cell.setJoint(jointParser.parse(ele)); + } + } + return cell; + } + + public void setJointParser(JointParser jointParser) { + this.jointParser = jointParser; + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + + @Override + public boolean support(String name) { + return name.equals("card-cell"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CustomColParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CustomColParser.java new file mode 100644 index 0000000..69c8083 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/CustomColParser.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.scorecard; + +import com.itheima.sfbx.framework.rule.model.scorecard.CustomCol; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class CustomColParser implements Parser { + @Override + public CustomCol parse(Element element) { + CustomCol col=new CustomCol(); + col.setColNumber(Integer.parseInt(element.attributeValue("col-number"))); + col.setName(element.attributeValue("name")); + col.setWidth(element.attributeValue("width")); + return col; + } + @Override + public boolean support(String name) { + return name.equals("custom-col"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/ScorecardParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/ScorecardParser.java new file mode 100644 index 0000000..d603253 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/scorecard/ScorecardParser.java @@ -0,0 +1,192 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.scorecard; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.scorecard.*; +import com.itheima.sfbx.framework.rule.model.table.Condition; +import com.itheima.sfbx.framework.rule.model.table.Joint; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月22日 + */ +public class ScorecardParser implements Parser { + private CardCellParser cardCellParser; + private AttributeRowParser attributeRowParser=new AttributeRowParser(); + private CustomColParser customColParser=new CustomColParser(); + private RulesRebuilder rulesRebuilder; + @Override + public ScorecardDefinition parse(Element element) { + ScorecardDefinition card=new ScorecardDefinition(); + card.setName(element.attributeValue("name")); + card.setScoringType(ScoringType.valueOf(element.attributeValue("scoring-type"))); + card.setAssignTargetType(AssignTargetType.valueOf(element.attributeValue("assign-target-type"))); + card.setVariableCategory(element.attributeValue("var-category")); + card.setVariableName(element.attributeValue("var")); + card.setVariableLabel(element.attributeValue("var-label")); + + String dt=element.attributeValue("datatype"); + if(StringUtils.isNotBlank(dt)){ + card.setDatatype(Datatype.valueOf(dt)); + } + card.setScoringBean(element.attributeValue("custom-scoring-bean")); + String salience=element.attributeValue("salience"); + if(StringUtils.isNotEmpty(salience)){ + card.setSalience(Integer.valueOf(salience)); + } + String effectiveDate=element.attributeValue("effective-date"); + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + if(StringUtils.isNotEmpty(effectiveDate)){ + try { + card.setEffectiveDate(sd.parse(effectiveDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String expiresDate=element.attributeValue("expires-date"); + if(StringUtils.isNotEmpty(expiresDate)){ + try { + card.setExpiresDate(sd.parse(expiresDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String enabled=element.attributeValue("enabled"); + if(StringUtils.isNotEmpty(enabled)){ + card.setEnabled(Boolean.valueOf(enabled)); + } + String debug=element.attributeValue("debug"); + if(StringUtils.isNotEmpty(debug)){ + card.setDebug(Boolean.valueOf(debug)); + } + + card.setAttributeColWidth(element.attributeValue("attr-col-width")); + card.setAttributeColName(element.attributeValue("attr-col-name")); + card.setAttributeColVariableCategory(element.attributeValue("attr-col-category")); + + card.setConditionColName(element.attributeValue("condition-col-name")); + card.setConditionColWidth(element.attributeValue("condition-col-width")); + + card.setScoreColName(element.attributeValue("score-col-name")); + card.setScoreColWidth(element.attributeValue("score-col-width")); + + String weightSupport=element.attributeValue("weight-support"); + if(StringUtils.isNotBlank(weightSupport)){ + card.setWeightSupport(Boolean.valueOf(weightSupport)); + } + + List cells=new ArrayList(); + List rows=new ArrayList(); + List cols=new ArrayList(); + card.setCells(cells); + card.setRows(rows); + card.setCustomCols(cols); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(cardCellParser.support(name)){ + cells.add(cardCellParser.parse(ele)); + }else if(attributeRowParser.support(name)){ + rows.add(attributeRowParser.parse(ele)); + }else if(customColParser.support(name)){ + cols.add(customColParser.parse(ele)); + }else if(name.equals("import-variable-library")){ + card.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + card.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + card.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + card.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Parameter)); + }else if(name.equals("remark")){ + card.setRemark(ele.getText()); + } + } + rebuildScorecard(card); + return card; + } + + private void rebuildScorecard(ScorecardDefinition card){ + ResourceLibrary resLibraries=rulesRebuilder.getResourceLibraryBuilder().buildResourceLibrary(card.getLibraries()); + String category=card.getVariableCategory(); + String name=card.getVariableName(); + if(StringUtils.isNotBlank(category) && StringUtils.isNotBlank(name)){ + Variable variable=rulesRebuilder.getVariableByName(resLibraries.getVariableCategories(), category, name, null); + card.setVariableLabel(variable.getLabel()); + card.setDatatype(variable.getType()); + } + String colCategory=card.getAttributeColVariableCategory(); + List cells=card.getCells(); + if(cells==null)return; + for(CardCell cell:cells){ + Joint joint=cell.getJoint(); + if(joint!=null && joint.getConditions()!=null){ + for(Condition condition:joint.getConditions()){ + if(condition==null){ + continue; + } + Value value=condition.getValue(); + if(value!=null){ + rulesRebuilder.rebuildValue(value, resLibraries, null, false); + } + } + } + Value value=cell.getValue(); + if(value!=null){ + rulesRebuilder.rebuildValue(value, resLibraries, null, false); + } + String varName=cell.getVariableName(); + if(StringUtils.isNotBlank(varName)){ + Variable variable=rulesRebuilder.getVariableByName(resLibraries.getVariableCategories(), colCategory, varName, null); + cell.setDatatype(variable.getType()); + cell.setVariableLabel(variable.getLabel()); + } + } + } + + public void setCardCellParser(CardCellParser cardCellParser) { + this.cardCellParser = cardCellParser; + } + + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } + + @Override + public boolean support(String name) { + return name.equals("scorecard"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/CellParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/CellParser.java new file mode 100644 index 0000000..8870cbe --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/CellParser.java @@ -0,0 +1,76 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.table.Cell; +import com.itheima.sfbx.framework.rule.parse.ActionParser; +import com.itheima.sfbx.framework.rule.parse.Parser; +import com.itheima.sfbx.framework.rule.parse.ValueParser; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class CellParser implements Parser,ApplicationContextAware { + private JointParser jointParser; + private ValueParser valueParser; + private Collection actionParsers; + public Cell parse(Element element) { + Cell cell=new Cell(); + cell.setRow(Integer.valueOf(element.attributeValue("row"))); + cell.setCol(Integer.valueOf(element.attributeValue("col"))); + cell.setRowspan(Integer.valueOf(element.attributeValue("rowspan"))); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(jointParser.support(name)){ + cell.setJoint(jointParser.parse(ele)); + }else if(valueParser.support(name)){ + cell.setValue(valueParser.parse(ele)); + }else{ + for(ActionParser parser:actionParsers){ + if(parser.support(name)){ + cell.setAction(parser.parse(ele)); + break; + } + } + } + } + return cell; + } + public boolean support(String name) { + return name.equals("cell"); + } + public void setJointParser(JointParser jointParser) { + this.jointParser = jointParser; + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + actionParsers=applicationContext.getBeansOfType(ActionParser.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ColumnParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ColumnParser.java new file mode 100644 index 0000000..2b9a087 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ColumnParser.java @@ -0,0 +1,47 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.table.Column; +import com.itheima.sfbx.framework.rule.model.table.ColumnType; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class ColumnParser implements Parser { + public Column parse(Element element) { + Column col=new Column(); + col.setNum(Integer.valueOf(element.attributeValue("num"))); + col.setType(ColumnType.valueOf(element.attributeValue("type"))); + col.setVariableCategory(element.attributeValue("var-category")); + col.setVariableLabel(element.attributeValue("var-label")); + col.setVariableName(element.attributeValue("var")); + col.setWidth(Integer.valueOf(element.attributeValue("width"))); + String datatype=element.attributeValue("datatype"); + if(StringUtils.isNotEmpty(datatype)){ + col.setDatatype(Datatype.valueOf(datatype)); + } + return col; + } + public boolean support(String name) { + return name.equals("col"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/DecisionTableParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/DecisionTableParser.java new file mode 100644 index 0000000..6351ed0 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/DecisionTableParser.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.RulesRebuilder; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.rule.Value; +import com.itheima.sfbx.framework.rule.model.table.Cell; +import com.itheima.sfbx.framework.rule.model.table.Column; +import com.itheima.sfbx.framework.rule.model.table.Condition; +import com.itheima.sfbx.framework.rule.model.table.DecisionTable; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Element; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class DecisionTableParser implements Parser { + private RowParser rowParser; + private ColumnParser columnParser; + private CellParser cellParser; + private RulesRebuilder rulesRebuilder; + public DecisionTable parse(Element element) { + DecisionTable table =new DecisionTable(); + String salience=element.attributeValue("salience"); + if(StringUtils.isNotEmpty(salience)){ + table.setSalience(Integer.valueOf(salience)); + } + String effectiveDate=element.attributeValue("effective-date"); + SimpleDateFormat sd=new SimpleDateFormat(Configure.getDateFormat()); + if(StringUtils.isNotEmpty(effectiveDate)){ + try { + table.setEffectiveDate(sd.parse(effectiveDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String expiresDate=element.attributeValue("expires-date"); + if(StringUtils.isNotEmpty(expiresDate)){ + try { + table.setExpiresDate(sd.parse(expiresDate)); + } catch (ParseException e) { + throw new RuleException(e); + } + } + String enabled=element.attributeValue("enabled"); + if(StringUtils.isNotEmpty(enabled)){ + table.setEnabled(Boolean.valueOf(enabled)); + } + String debug=element.attributeValue("debug"); + if(StringUtils.isNotEmpty(debug)){ + table.setDebug(Boolean.valueOf(debug)); + } + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(rowParser.support(name)){ + table.addRow(rowParser.parse(ele)); + }else if(columnParser.support(name)){ + table.addColumn(columnParser.parse(ele)); + }else if(cellParser.support(name)){ + table.addCell(cellParser.parse(ele)); + }if(name.equals("import-variable-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Parameter)); + }else if(name.equals("remark")){ + table.setRemark(ele.getText()); + } + } + rebuildTable(table); + return table; + } + + private void rebuildTable(DecisionTable table){ + List libraries=table.getLibraries(); + ResourceLibrary resLibraries=rulesRebuilder.getResourceLibraryBuilder().buildResourceLibrary(libraries); + Map namedMap=new HashMap(); + for(Cell cell:table.getCellMap().values()){ + if(cell.getAction()!=null){ + rulesRebuilder.rebuildAction(cell.getAction(), resLibraries, namedMap, false);; + }else if(cell.getValue()!=null){ + rulesRebuilder.rebuildValue(cell.getValue(), resLibraries, namedMap, false); + }else if(cell.getJoint()!=null){ + if(cell.getJoint()!=null && cell.getJoint().getJunction()!=null){ + List conditions=cell.getJoint().getConditions(); + if(conditions!=null){ + for(Condition condition:conditions){ + Value value=condition.getValue(); + if(value!=null){ + rulesRebuilder.rebuildValue(value, resLibraries, namedMap, false); + } + } + } + } + } + } + for(Column col:table.getColumns()){ + String category=col.getVariableCategory(); + String name=col.getVariableName(); + if(StringUtils.isBlank(category) || StringUtils.isBlank(name)){ + continue; + } + Variable variable=rulesRebuilder.getVariableByName(resLibraries.getVariableCategories(), category, name, namedMap); + col.setDatatype(variable.getType()); + col.setVariableLabel(variable.getLabel()); + } + } + + public boolean support(String name) { + return name.equals("decision-table"); + } + public void setColumnParser(ColumnParser columnParser) { + this.columnParser = columnParser; + } + public void setRowParser(RowParser rowParser) { + this.rowParser = rowParser; + } + public void setCellParser(CellParser cellParser) { + this.cellParser = cellParser; + } + public void setRulesRebuilder(RulesRebuilder rulesRebuilder) { + this.rulesRebuilder = rulesRebuilder; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/JointParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/JointParser.java new file mode 100644 index 0000000..74a519b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/JointParser.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.rule.Op; +import com.itheima.sfbx.framework.rule.model.table.Condition; +import com.itheima.sfbx.framework.rule.model.table.Joint; +import com.itheima.sfbx.framework.rule.model.table.JointType; +import com.itheima.sfbx.framework.rule.parse.Parser; +import com.itheima.sfbx.framework.rule.parse.ValueParser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class JointParser implements Parser { + private ValueParser valueParser; + public Joint parse(Element element) { + Joint joint=new Joint(); + joint.setType(JointType.valueOf(element.attributeValue("type"))); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(ele.getName().equals("condition")){ + joint.addCondition(parseCondition(ele)); + }else if(support(ele.getName())){ + joint.addJoint(parse(ele)); + } + } + return joint; + } + public Condition parseCondition(Element element) { + Condition condition=new Condition(); + condition.setOp(Op.valueOf(element.attributeValue("op"))); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + if(valueParser.support(ele.getName())){ + condition.setValue(valueParser.parse(ele)); + break; + } + } + return condition; + } + public boolean support(String name) { + return name.equals("joint"); + } + public void setValueParser(ValueParser valueParser) { + this.valueParser = valueParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/RowParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/RowParser.java new file mode 100644 index 0000000..8095097 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/RowParser.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.table.Row; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class RowParser implements Parser { + public Row parse(Element element) { + Row row=new Row(); + row.setHeight(Integer.valueOf(element.attributeValue("height"))); + row.setNum(Integer.valueOf(element.attributeValue("num"))); + return row; + } + public boolean support(String name) { + return name.equals("row"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptCellParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptCellParser.java new file mode 100644 index 0000000..fb32bed --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptCellParser.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.table.ScriptCell; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class ScriptCellParser implements Parser{ + public ScriptCell parse(Element element) { + ScriptCell cell=new ScriptCell(); + cell.setRow(Integer.valueOf(element.attributeValue("row"))); + cell.setCol(Integer.valueOf(element.attributeValue("col"))); + cell.setRowspan(Integer.valueOf(element.attributeValue("rowspan"))); + cell.setScript(element.getStringValue()); + return cell; + } + public boolean support(String name) { + return name.equals("script-cell"); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptDecisionTableParser.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptDecisionTableParser.java new file mode 100644 index 0000000..48975d5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/parse/table/ScriptDecisionTableParser.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.parse.table; + +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.LibraryType; +import com.itheima.sfbx.framework.rule.model.table.ScriptDecisionTable; +import com.itheima.sfbx.framework.rule.parse.Parser; +import org.dom4j.Element; + +/** + * @author Jacky.gao + * @since 2015年1月19日 + */ +public class ScriptDecisionTableParser implements Parser { + private RowParser rowParser; + private ColumnParser columnParser; + private ScriptCellParser scriptCellParser; + public ScriptDecisionTable parse(Element element) { + ScriptDecisionTable table =new ScriptDecisionTable(); + for(Object obj:element.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + if(rowParser.support(name)){ + table.addRow(rowParser.parse(ele)); + }else if(columnParser.support(name)){ + table.addColumn(columnParser.parse(ele)); + }else if(scriptCellParser.support(name)){ + table.addCell(scriptCellParser.parse(ele)); + }if(name.equals("import-variable-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Variable)); + }else if(name.equals("import-constant-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Constant)); + }else if(name.equals("import-action-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Action)); + }else if(name.equals("import-parameter-library")){ + table.addLibrary(new Library(ele.attributeValue("path"),null,LibraryType.Parameter)); + } + } + return table; + } + public boolean support(String name) { + return name.equals("script-decision-table"); + } + public void setColumnParser(ColumnParser columnParser) { + this.columnParser = columnParser; + } + public void setRowParser(RowParser rowParser) { + this.rowParser = rowParser; + } + public void setScriptCellParser(ScriptCellParser scriptCellParser) { + this.scriptCellParser = scriptCellParser; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSession.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSession.java new file mode 100644 index 0000000..1acff68 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSession.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; +/** + * @author Jacky.gao + * @since 2015年9月29日 + */ +public interface BatchSession { + public static final int DEFAULT_BATCH_SIZE=100; + public static final int DEFAULT_THREAD_SIZE=10; + + + /** + * 添加一个具体要执行Business对象 + * @param business Business对象实例 + */ + void addBusiness(Business business); + + + /** + * 等待线程池中所有业务线程执行完成,在进行批处理操作时一定要以此方法作为方法调用结尾 + */ + void waitForCompletion(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSessionImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSessionImpl.java new file mode 100644 index 0000000..8a0fd43 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchSessionImpl.java @@ -0,0 +1,84 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.RuleException; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.TimeUnit; + +/** + * @author Jacky.gao + * @since 2015年9月29日 + */ +public class BatchSessionImpl implements BatchSession { + private ExecutorService executorService; + private int batchSize; + private List businessList=new ArrayList(); + private KnowledgePackage knowledgePackage; + private KnowledgePackage[] knowledgePackages; + + public BatchSessionImpl(KnowledgePackage knowledgePackage,int threadSize,int batchSize) { + this.executorService=Executors.newFixedThreadPool(threadSize); + this.knowledgePackage=knowledgePackage; + this.batchSize=batchSize; + } + public BatchSessionImpl(KnowledgePackage[] knowledgePackages,int threadSize,int batchSize) { + this.executorService=Executors.newFixedThreadPool(threadSize); + this.knowledgePackages=knowledgePackages; + this.batchSize=batchSize; + } + @Override + public void addBusiness(Business business) { + if(businessList!=null){ + if(businessList.size()>=batchSize){ + doBusinesses(); + businessList=new ArrayList(); + } + }else{ + businessList=new ArrayList(); + } + businessList.add(business); + } + private void doBusinesses() { + BatchThread thread=null; + if(knowledgePackage!=null){ + thread=new BatchThread(knowledgePackage,businessList); + }else if(knowledgePackages!=null){ + thread=new BatchThread(knowledgePackages,businessList); + }else{ + throw new RuleException("KnowledgePackage can not be null."); + } + executorService.execute(thread); + businessList=null; + } + @Override + public void waitForCompletion() { + if(businessList!=null && businessList.size()>0){ + doBusinesses(); + } + executorService.shutdown(); + try{ + while(!executorService.awaitTermination(300, TimeUnit.MILLISECONDS)){} + }catch(InterruptedException ex){ + ex.printStackTrace(); + throw new RuleException(ex); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchThread.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchThread.java new file mode 100644 index 0000000..eb87c5c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/BatchThread.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年9月29日 + */ +public class BatchThread implements Runnable { + private List businesses; + private KnowledgeSession session; + public BatchThread(KnowledgePackage knowledgePackage,List businesses) { + session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + this.businesses=businesses; + } + public BatchThread(KnowledgePackage[] knowledgePackages,List businesses) { + session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackages); + this.businesses=businesses; + } + @Override + public void run() { + Thread thread=Thread.currentThread(); + String oldThreadName=thread.getName(); + thread.setName("urule-"+oldThreadName); + try{ + int size=businesses.size(); + for(int i=0;i builtInActions=new ArrayList(); + public List getBuiltInActions() { + return builtInActions; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + String[] names=applicationContext.getBeanDefinitionNames(); + if(names==null || names.length==0)return; + for(String name:names){ + Object obj=null; + try{ + obj=applicationContext.getBean(name); + }catch(Exception ex){ + continue; + } + if(obj==null){ + continue; + } + ActionBean aa=obj.getClass().getAnnotation(ActionBean.class); + if(aa==null){ + continue; + } + SpringBean bean=new SpringBean(); + bean.setId(name); + bean.setName(aa.name()); + bean.setMethods(buildMethod(obj.getClass().getMethods())); + builtInActions.add(bean); + } + } + private List buildMethod(Method[] methods){ + List list=new ArrayList(); + for(Method m:methods){ + ActionMethod methodAnnotation=m.getAnnotation(ActionMethod.class); + if(methodAnnotation==null)continue; + String name=methodAnnotation.name(); + String methodName=m.getName(); + com.itheima.sfbx.framework.rule.model.library.action.Method libMethod=new com.itheima.sfbx.framework.rule.model.library.action.Method(); + libMethod.setMethodName(methodName); + libMethod.setName(name); + list.add(libMethod); + ActionMethodParameter mp=m.getAnnotation(ActionMethodParameter.class); + List parameterNames=new ArrayList(); + if(mp!=null){ + String pnames[]=mp.names(); + for(String pname:pnames){ + parameterNames.add(pname); + } + } + libMethod.setParameters(buildParameters(m,parameterNames)); + } + return list; + } + private List buildParameters(Method m,List parameterNames){ + List list=new ArrayList(); + Class pclasses[]=m.getParameterTypes(); + for(int i=0;i c=pclasses[i]; + String name=""; + if(parameterNames.size()>i){ + name=parameterNames.get(i); + } + Parameter p=new Parameter(); + p.setName(name); + p.setType(buildDatatype(c)); + list.add(p); + } + return list; + } + + private Datatype buildDatatype(Class clazz){ + if(clazz.getName().equals("java.lang.Object")){ + return Datatype.Object; + } + if(clazz.isAssignableFrom(Integer.class) || clazz.isAssignableFrom(int.class)){ + return Datatype.Integer; + }else if(clazz.isAssignableFrom(Long.class) || clazz.isAssignableFrom(long.class)){ + return Datatype.Long; + }else if(clazz.isAssignableFrom(Double.class) || clazz.isAssignableFrom(double.class)){ + return Datatype.Double; + }else if(clazz.isAssignableFrom(Float.class) || clazz.isAssignableFrom(float.class)){ + return Datatype.Float; + }else if(clazz.isAssignableFrom(BigDecimal.class)){ + return Datatype.BigDecimal; + }else if(clazz.isAssignableFrom(Boolean.class) || clazz.isAssignableFrom(boolean.class)){ + return Datatype.Boolean; + }else if(clazz.isAssignableFrom(Date.class)){ + return Datatype.Date; + }else if(clazz.isAssignableFrom(List.class)){ + return Datatype.List; + }else if(clazz.isAssignableFrom(Set.class)){ + return Datatype.Set; + }else if(clazz.isAssignableFrom(Enum.class)){ + return Datatype.Enum; + }else if(clazz.isAssignableFrom(Map.class)){ + return Datatype.Map; + }else if(clazz.isAssignableFrom(String.class)){ + return Datatype.String; + }else if(clazz.isAssignableFrom(Character.class) || clazz.isAssignableFrom(char.class)){ + return Datatype.Char; + }else{ + return Datatype.Object; + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/Business.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/Business.java new file mode 100644 index 0000000..1a4232f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/Business.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; +/** + * @author Jacky.gao + * @since 2015年9月29日 + */ +public interface Business { + void execute(KnowledgeSession session); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/ElCalculator.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/ElCalculator.java new file mode 100644 index 0000000..9f7bfaa --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/ElCalculator.java @@ -0,0 +1,226 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.Utils; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Collections; +import java.util.Stack; + +/** + * @author Jacky.gao + * @since 2017年10月27日 + */ +public class ElCalculator { + private static int[] PRIORITY = new int[] { 0, 3, 2, 1, -1, 1, 0, 2 };// 运用运算符ASCII码-40做索引的运算符优先级 + public Object eval(String expression) { + expression = transform(expression); + Object result = calculate(expression); + return result; + } + + /** + * 将表达式中负数的符号更改 + * @param expression 例如-2+-1*(-3E-2)-(-1) 被转为 ~2+~1*(~3E~2)-(~1) + * @return 返回转换结果 + */ + private String transform(String expression) { + char[] arr = expression.toCharArray(); + for (int i = 0; i < arr.length; i++) { + char cc=arr[i]; + if (cc == '-') { + if (i == 0) { + arr[i] = '~'; + } else { + char c = arr[i - 1]; + if (c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == 'E' || c == 'e') { + arr[i] = '~'; + } + } + } + } + if(arr[0]=='~'||arr[1]=='('){ + arr[0]='-'; + return "0"+new String(arr); + }else{ + return new String(arr); + } + } + + /** + * 按照给定的表达式计算 + * @param expression 要计算的表达式例如:5+12*(3+5)/7 + * @return 返回计算结果 + */ + private Object calculate(String expression) { + Stack postfixStack = new Stack(); + Stack resultStack = new Stack(); + prepare(expression,postfixStack); + Collections.reverse(postfixStack);// 将后缀式栈反转 + while (!postfixStack.isEmpty()) { + String currentValue = postfixStack.pop(); + if (currentValue.equals("") || !isOperator(currentValue.charAt(0))) {// 如果不是运算符则存入操作数栈中 + if(currentValue.startsWith("\"")){ + currentValue=currentValue.substring(1,currentValue.length()-1); + } + currentValue = currentValue.replace("~", "-"); + resultStack.push(currentValue); + } else {// 如果是运算符则从操作数栈中取两个值和该数值一起参与运算 + String secondValue = resultStack.pop().toString(); + String firstValue = resultStack.pop().toString(); + + // 将负数标记符改为负号 + firstValue = firstValue.replace("~", "-"); + secondValue = secondValue.replace("~", "-"); + + Object tempResult = calculate(firstValue, secondValue, currentValue.charAt(0)); + resultStack.push(tempResult); + } + } + return resultStack.pop(); + } + + private void prepare(String expression,Stack postfixStack) { + Stack opStack = new Stack(); + opStack.push(',');// 运算符放入栈底元素逗号,此符号优先级最低 + char[] arr = expression.toCharArray(); + int currentIndex = 0;// 当前字符的位置 + int count = 0;// 上次算术运算符到本次算术运算符的字符的长度便于或者之间的数值 + char currentOp, peekOp;// 当前操作符和栈顶操作符 + String prevData=null; + for (int i = 0; i < arr.length; i++) { + currentOp = arr[i]; + if(isInvertedComma(currentOp)){ + currentIndex=i+1; + i++; + count=1; + while(i 0) { + String data=new String(arr, currentIndex, count).trim(); + postfixStack.push(data); + //取两个运算符之间的内容 + } + peekOp = opStack.peek(); + if (currentOp == ')') { + //遇到反括号则将运算符栈中的元素移除到后缀式栈中直到遇到左括号 + while (opStack.peek() != '(') { + postfixStack.push(String.valueOf(opStack.pop())); + } + opStack.pop(); + } else { + while (currentOp != '(' && peekOp != ',' && compare(currentOp, peekOp)) { + postfixStack.push(String.valueOf(opStack.pop())); + peekOp = opStack.peek(); + } + opStack.push(currentOp); + } + count = 0; + currentIndex = i + 1; + } else { + count++; + } + } + if(prevData!=null){ + postfixStack.push(prevData); + }else if (count > 1 || (count == 1 && !isOperator(arr[currentIndex]))) {// 最后一个字符不是括号或者其他运算符的则加入后缀式栈中 + postfixStack.push(new String(arr, currentIndex, count)); + } + + while (opStack.peek() != ',') { + postfixStack.push(String.valueOf(opStack.pop()));// 将操作符栈中的剩余的元素添加到后缀式栈中 + } + } + + private boolean isInvertedComma(char c){ + return c=='"'; + } + + private boolean isOperator(char c) { + return c == '+' || c == '-' || c == '*' || c == '/' || c == '%' || c == '(' || c == ')'; + } + public boolean compare(char cur, char peek) {// 如果是peek优先级高于cur,返回true,默认都是peek优先级要低 + if(cur=='%')cur='*'; + if(peek=='%')peek='*'; + boolean result = false; + if (PRIORITY[(peek) - 40] >= PRIORITY[(cur) - 40]) { + result = true; + } + return result; + } + + private Object calculate(String firstValue, String secondValue, char currentOp) { + Object result = null; + BigDecimal first,second; + try{ + switch (currentOp) { + case '+': + first=Utils.toBigDecimal(firstValue); + second=Utils.toBigDecimal(secondValue); + result=first.add(second); + break; + case '-': + first=Utils.toBigDecimal(firstValue); + second=Utils.toBigDecimal(secondValue); + result=first.subtract(second); + break; + case '*': + first=Utils.toBigDecimal(firstValue); + second=Utils.toBigDecimal(secondValue); + result=first.multiply(second); + break; + case '/': + first=Utils.toBigDecimal(firstValue); + second=Utils.toBigDecimal(secondValue); + result=first.divide(second,10,RoundingMode.HALF_UP); + break; + case '%': + first=Utils.toBigDecimal(firstValue); + second=Utils.toBigDecimal(secondValue); + result=first.doubleValue() % second.doubleValue(); + break; + } + }catch(Exception ex){ + String msg=ex.getMessage() == null ? "" : ex.getMessage(); + String a=(firstValue == null ? "null" : firstValue.toString()); + String b=(secondValue == null ? "null" : secondValue.toString()); + if(currentOp=='+'){ + result = a+b; + }else if(currentOp=='/' && msg.indexOf("by zero")!=-1){ + result = "Infinity"; + }else{ + throw ex; + } + } + return result; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/EventManager.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/EventManager.java new file mode 100644 index 0000000..0734631 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/EventManager.java @@ -0,0 +1,32 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.runtime.event.KnowledgeEvent; +import com.itheima.sfbx.framework.rule.runtime.event.KnowledgeEventListener; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface EventManager { + void addEventListener(KnowledgeEventListener listener); + boolean removeEventListener(KnowledgeEventListener listener); + void fireEvent(KnowledgeEvent event); + List getKnowledgeEventListeners(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackage.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackage.java new file mode 100644 index 0000000..4fffff4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackage.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.rete.Rete; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.rete.ReteInstance; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public interface KnowledgePackage { + Rete getRete(); + Map getVariableCateogoryMap(); + Map getFlowMap(); + Map getParameters(); + ReteInstance newReteInstance(); + long getTimestamp(); + void resetTimestamp(); + List getNoLhsRules(); + List getWithElseRules(); + String getId(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageImpl.java new file mode 100644 index 0000000..176e768 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageImpl.java @@ -0,0 +1,158 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.RuleJsonDeserializer; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.rete.*; +import com.itheima.sfbx.framework.rule.model.rule.Other; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.rete.ReteInstance; +import org.codehaus.jackson.annotate.JsonIgnore; +import org.codehaus.jackson.map.annotate.JsonDeserialize; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class KnowledgePackageImpl implements KnowledgePackage { + private Rete rete; + private Map variableCategoryMap=new HashMap(); + private Map flowMap; + private Map parameters; + + @JsonDeserialize(using=RuleJsonDeserializer.class) + private List noLhsRules; + + @JsonIgnore + private Map elseRulesMap=new HashMap(); + + @JsonIgnore + private List withElseRules=new ArrayList(); + + private long timestamp; + private String id=UUID.randomUUID().toString(); + public KnowledgePackageImpl() { + timestamp=System.currentTimeMillis(); + } + + public void buildWithElseRules(){ + List typeNodes=rete.getObjectTypeNodes(); + if(typeNodes!=null){ + for(ObjectTypeNode typeNode:typeNodes){ + buildReteLinesForElseRules(typeNode.getLines()); + } + } + } + + private void buildReteLinesForElseRules(List lines){ + if(lines==null)return; + for(Line line:lines){ + Node toNode=line.getTo(); + if(toNode==null)continue; + if(toNode instanceof TerminalNode){ + TerminalNode terminalNode=(TerminalNode)toNode; + Rule rule=terminalNode.getRule(); + if(!withElseRules.contains(rule)){ + Other other=rule.getOther(); + if(other!=null && other.getActions()!=null && other.getActions().size()>0){ + withElseRules.add(rule); + + Rule elseRule=new Rule(); + elseRule.setName(rule.getName()+"else"); + elseRule.setActivationGroup(rule.getActivationGroup()); + elseRule.setAgendaGroup(rule.getAgendaGroup()); + elseRule.setAutoFocus(rule.getAutoFocus()); + elseRule.setEffectiveDate(rule.getEffectiveDate()); + elseRule.setExpiresDate(rule.getExpiresDate()); + elseRule.setEnabled(rule.getEnabled()); + elseRule.setRuleflowGroup(rule.getRuleflowGroup()); + elseRule.setSalience(rule.getSalience()); + Rhs rhs=new Rhs(); + rhs.setActions(other.getActions()); + elseRule.setRhs(rhs); + + elseRulesMap.put(rule, elseRule); + } + } + }else if(toNode instanceof BaseReteNode){ + BaseReteNode reteNode=(BaseReteNode)toNode; + buildReteLinesForElseRules(reteNode.getLines()); + } + } + } + + public Rule getElseRule(Rule rule){ + return elseRulesMap.get(rule); + } + + public String getId() { + return id; + } + + public Rete getRete() { + return rete; + } + public void setRete(Rete rete) { + this.rete = rete; + } + public long getTimestamp() { + return timestamp; + } + public void resetTimestamp() { + timestamp=System.currentTimeMillis(); + } + public Map getVariableCateogoryMap() { + return variableCategoryMap; + } + public void setNoLhsRules(List noLhsRules) { + this.noLhsRules = noLhsRules; + } + @Override + public List getNoLhsRules() { + return noLhsRules; + } + + @Override + public List getWithElseRules() { + return this.withElseRules; + } + + + public void setVariableCategoryMap(Map variableCategoryMap) { + this.variableCategoryMap = variableCategoryMap; + } + public Map getFlowMap() { + return flowMap; + } + public void setFlowMap(Map flowMap) { + this.flowMap = flowMap; + } + public ReteInstance newReteInstance() { + return rete.newReteInstance(); + } + public void setParameters(Map parameters) { + this.parameters = parameters; + } + @Override + public Map getParameters() { + return this.parameters; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageWrapper.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageWrapper.java new file mode 100644 index 0000000..664b83b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgePackageWrapper.java @@ -0,0 +1,125 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.rete.*; +import org.codehaus.jackson.map.annotate.JsonDeserialize; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年3月6日 + */ +public class KnowledgePackageWrapper { + @JsonDeserialize(as=KnowledgePackageImpl.class) + private KnowledgePackage knowledgePackage; + @JsonDeserialize(using=com.itheima.sfbx.framework.rule.model.rete.ReteNodeJsonDeserializer.class) + private List allNodes=new ArrayList(); + public KnowledgePackageWrapper() { + } + public KnowledgePackageWrapper(KnowledgePackage knowledgePackage) { + this.knowledgePackage=knowledgePackage; + initNodes(); + } + + private void initNodes(){ + Rete rete=knowledgePackage.getRete(); + List typeNodes=rete.getObjectTypeNodes(); + List childreNodes=new ArrayList(); + childreNodes.addAll(typeNodes); + queryReteNodes(childreNodes); + } + private void queryReteNodes(List reteNodes){ + if(reteNodes==null){ + return; + } + for(ReteNode reteNode:reteNodes){ + if(!allNodes.contains(reteNode) && !(reteNode instanceof ObjectTypeNode)){ + allNodes.add(reteNode); + } + if(reteNode instanceof BaseReteNode){ + BaseReteNode abstractReteNode=(BaseReteNode)reteNode; + queryReteNodes(abstractReteNode.getChildrenNodes()); + } + } + } + + public void buildDeserialize(){ + Rete rete=knowledgePackage.getRete(); + List typeNodes=rete.getObjectTypeNodes(); + for(ObjectTypeNode typeNode:typeNodes){ + List lines=typeNode.getLines(); + for(Line line:lines){ + line.setFrom(typeNode); + } + rebuildLine(lines, allNodes); + } + ((KnowledgePackageImpl)knowledgePackage).buildWithElseRules(); + + Map flowMap=knowledgePackage.getFlowMap(); + if(flowMap!=null && flowMap.size()>0){ + for(FlowDefinition fd:flowMap.values()){ + fd.buildConnectionToNode(); + } + } + } + + private void rebuildLine(List lines,List reteNodes){ + if(lines==null){ + return; + } + for(Line line:lines){ + if(line.getFrom()==null){ + int fromId=line.getFromNodeId(); + ReteNode fromNode=findTargetNode(reteNodes, fromId); + line.setFrom(fromNode); + if(fromNode instanceof BaseReteNode){ + BaseReteNode node=(BaseReteNode)fromNode; + rebuildLine(node.getLines(), reteNodes); + } + } + if(line.getTo()==null){ + int toId=line.getToNodeId(); + ReteNode toNode=findTargetNode(reteNodes, toId); + line.setTo(toNode); + if(toNode instanceof BaseReteNode){ + BaseReteNode node=(BaseReteNode)toNode; + rebuildLine(node.getLines(), reteNodes); + } + } + } + } + private ReteNode findTargetNode(List reteNodes,int id){ + for(ReteNode node:reteNodes){ + if(node.getId()==id){ + return node; + } + } + throw new RuleException("Node["+id+"] not exist."); + } + + public List getAllNodes() { + return allNodes; + } + public KnowledgePackage getKnowledgePackage() { + return knowledgePackage; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSession.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSession.java new file mode 100644 index 0000000..baaf665 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSession.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.runtime.agenda.AgendaFilter; +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; + +import java.io.IOException; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public interface KnowledgeSession extends WorkingMemory{ + /** + * 执行当前WorkMemory中所有满足条件的规则 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(); + /** + * 对当前WorkMemory中所有满足条件的规则进行过滤执行 + * @param filter 对满足条件的规则进行过滤 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(AgendaFilter filter); + /** + * 对当前WorkMemory中所有满足条件的规则进行过滤执行,并向WorkingMemory中设置一个Map的参数对象 + * @param parameters 向WorkingMemory中设置一个Map的参数对象 + * @param filter 对满足条件的规则进行过滤 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(Map parameters,AgendaFilter filter); + /** + * 对当前WorkMemory中所有满足条件的规则进行执行,并定义执行的最大数目,超出后就不再执行 + * @param max 执行规则的最大数目 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(int max); + /** + * 对当前WorkMemory中所有满足条件的规则进行执行,并定义执行的最大数目,超出后就不再执行,
+ * 并向WorkingMemory中设置一个Map的参数对象 + * @param parameters 向WorkingMemory中设置一个Map的参数对象 + * @param max 执行规则的最大数目 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(Map parameters,int max); + /** + * 对当前WorkMemory中所有满足条件的规则进行过滤执行,并定义执行数目的最大值 + * @param filter 对满足条件的规则进行过滤 + * @param max 执行规则的最大数目 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(AgendaFilter filter,int max); + /** + * 对当前WorkMemory中所有满足条件的规则进行过滤执行,并定义执行数目的最大值,
+ * 并向WorkingMemory中设置一个Map的参数对象 + * @param parameters 向WorkingMemory中设置一个Map的参数对象 + * @param filter 对满足条件的规则进行过滤 + * @param max 执行规则的最大数目 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(Map parameters,AgendaFilter filter,int max); + /** + * 对当前WorkMemory中所有满足条件的规则进行执行,并向WorkingMemory中设置一个Map的参数对象 + * @param parameters 向WorkingMemory中设置一个Map的参数对象 + * @return 返回一个ExecutionResponse对象,其中包含规则执行耗时,满足条件的规则,执行的规则等信息 + */ + RuleExecutionResponse fireRules(Map parameters); + /** + * 根据规则流ID,执行目标规则流 + * @param processId 要执行的规则流ID + * @return 返回一个ExecutionResponse对象,其中包含规则流执行耗时信息 + */ + FlowExecutionResponse startProcess(String processId); + /** + * 根据规则流ID,执行目标规则流,并向WorkingMemory中设置一个Map的参数对象 + * @param processId 要执行的规则流ID + * @param parameters 向WorkingMemory中设置一个Map的参数对象 + * @return 返回一个ExecutionResponse对象,其中包含规则流执行耗时信息 + */ + FlowExecutionResponse startProcess(String processId,Map parameters); + + /** + * 执行将日志信息写入到日志文件操作,要看到日志文件我们需要设置urule.debugToFile属性值为true,
+ * 同时定义输出文件目录属性urule.defaultHtmlFileDebugPath,这样在urule.debug属性为true情况下就会向这个目录下写入日志文件,
+ * 需要的时候,可以通过实现com.itheima.sfbx.framework.rule.debug.DebugWriter接口定义自己的日志输出文件,这样就可以将日志输出到任何地方 + * @throws IOException 抛出IO异常 + */ + void writeLogFile() throws IOException; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionFactory.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionFactory.java new file mode 100644 index 0000000..fdc5b1b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionFactory.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.debug.MessageItem; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public class KnowledgeSessionFactory { + /** + * 创建一个普通的KnowledgeSession对象 + * @param knowledgePackage 创建KnowledgeSession对象所需要的KnowledgePackage对象 + * @return 返回一个新的KnowledgeSession对象 + */ + public static KnowledgeSession newKnowledgeSession(KnowledgePackage knowledgePackage){ + return new KnowledgeSessionImpl(knowledgePackage); + } + + /** + * 创建一个普通的KnowledgeSession对象,同时将上级调试信息集合传入,以便于后续调试输出 + * @param knowledgePackage 创建KnowledgeSession对象所需要的KnowledgePackage对象 + * @param debugMessageItems 上级调试信息集合 + * @return 返回一个新的KnowledgeSession对象 + */ + public static KnowledgeSession newKnowledgeSession(KnowledgePackage knowledgePackage,List debugMessageItems){ + return new KnowledgeSessionImpl(knowledgePackage,debugMessageItems); + } + + + /** + * 创建一个普通的KnowledgeSession对象 + * @param knowledgePackages 创建KnowledgeSession对象所需要的KnowledgePackage集合对象 + * @return 返回一个新的KnowledgeSession对象 + */ + public static KnowledgeSession newKnowledgeSession(KnowledgePackage[] knowledgePackages){ + return new KnowledgeSessionImpl(knowledgePackages,null); + } + + /** + * 创建一个用于批处理的BatchSession对象,这里默认将开启10个普通的线程池来运行提交的批处理任务,默认将每100个任务放在一个线程里处理 + * @param knowledgePackage 创建BatchSession对象所需要的KnowledgePackage对象 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSession(KnowledgePackage knowledgePackage){ + return new BatchSessionImpl(knowledgePackage,BatchSession.DEFAULT_THREAD_SIZE,BatchSession.DEFAULT_BATCH_SIZE); + } + + /** + * 创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,默认将每100个任务放在一个线程里处理 + * @param knowledgePackage 创建BatchSession对象所需要的KnowledgePackage对象 + * @param threadSize 线程池中可用的线程个数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSessionByThreadSize(KnowledgePackage knowledgePackage,int threadSize){ + return new BatchSessionImpl(knowledgePackage,threadSize,BatchSession.DEFAULT_BATCH_SIZE); + } + + /** + * 创建一个用于批处理的BatchSession对象,这里默认将开启10个普通的线程池来运行提交的批处理任务,第二个参数用来决定单个线程处理的任务数 + * @param knowledgePackage 创建BatchSession对象所需要的KnowledgePackage对象 + * @param batchSize 单个线程处理的任务数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSessionByBatchSize(KnowledgePackage knowledgePackage,int batchSize){ + return new BatchSessionImpl(knowledgePackage,BatchSession.DEFAULT_THREAD_SIZE,batchSize); + } + + /** + * 创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,第三个参数用来决定单个线程处理的任务数 + * @param knowledgePackage 创建BatchSession对象所需要的KnowledgePackage对象 + * @param threadSize 线程池中可用的线程个数 + * @param batchSize 单个线程处理的任务数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSession(KnowledgePackage knowledgePackage,int threadSize,int batchSize){ + return new BatchSessionImpl(knowledgePackage,threadSize,batchSize); + } + + /** + * 创建一个用于批处理的BatchSession对象,这里默认将开启10个普通的线程池来运行提交的批处理任务,默认将每100个任务放在一个线程里处理 + * @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSession(KnowledgePackage[] knowledgePackages){ + return new BatchSessionImpl(knowledgePackages,BatchSession.DEFAULT_THREAD_SIZE,BatchSession.DEFAULT_BATCH_SIZE); + } + + /** + * 创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,默认将每100个任务放在一个线程里处理 + * @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 + * @param threadSize 线程池中可用的线程个数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSessionByThreadSize(KnowledgePackage[] knowledgePackages,int threadSize){ + return new BatchSessionImpl(knowledgePackages,threadSize,BatchSession.DEFAULT_BATCH_SIZE); + } + + /** + * 创建一个用于批处理的BatchSession对象,这里默认将开启10个普通的线程池来运行提交的批处理任务,第二个参数用来决定单个线程处理的任务数 + * @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 + * @param batchSize 单个线程处理的任务数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSessionByBatchSize(KnowledgePackage[] knowledgePackages,int batchSize){ + return new BatchSessionImpl(knowledgePackages,BatchSession.DEFAULT_THREAD_SIZE,batchSize); + } + + /** + * 创建一个用于批处理的BatchSession对象,第二个参数来指定线程池中可用线程个数,第三个参数用来决定单个线程处理的任务数 + * @param knowledgePackages 创建BatchSession对象所需要的KnowledgePackage集合对象 + * @param threadSize 线程池中可用的线程个数 + * @param batchSize 单个线程处理的任务数 + * @return 返回一个新的BatchSession对象 + */ + public static BatchSession newBatchSession(KnowledgePackage[] knowledgePackages,int threadSize,int batchSize){ + return new BatchSessionImpl(knowledgePackages,threadSize,batchSize); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionImpl.java new file mode 100644 index 0000000..8981e71 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/KnowledgeSessionImpl.java @@ -0,0 +1,410 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.DebugWriter; +import com.itheima.sfbx.framework.rule.debug.MessageItem; +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContextImpl; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.agenda.ActivationImpl; +import com.itheima.sfbx.framework.rule.runtime.agenda.Agenda; +import com.itheima.sfbx.framework.rule.runtime.agenda.AgendaFilter; +import com.itheima.sfbx.framework.rule.runtime.agenda.RuleBox; +import com.itheima.sfbx.framework.rule.runtime.event.*; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ProcessAfterCompletedEventImpl; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +import java.io.IOException; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class KnowledgeSessionImpl implements KnowledgeSession{ + private Context context; + private EvaluationContextImpl evaluationContext; + private FlowContextImpl flowContext; + private Agenda agenda; + private List debugMessageItems=new ArrayList(); + private Map initParameters=new HashMap(); + private List facts=new ArrayList(); + private List historyFacts=new ArrayList(); + private List knowledgePackageList=new ArrayList(); + private List reteInstanceList=new ArrayList(); + private Map parameterMap=new HashMap(); + private List> factMaps=new ArrayList>(); + private List eventListeners=new ArrayList(); + public KnowledgeSessionImpl(KnowledgePackage knowledgePackage) { + this(new KnowledgePackage[]{knowledgePackage},null); + } + public KnowledgeSessionImpl(KnowledgePackage knowledgePackage,List debugMessageItems) { + this(new KnowledgePackage[]{knowledgePackage},debugMessageItems); + } + public KnowledgeSessionImpl(KnowledgePackage[] knowledgePackages,List debugMessageItems){ + if(debugMessageItems!=null){ + this.debugMessageItems=debugMessageItems; + } + for(KnowledgePackage knowledgePackage:knowledgePackages){ + knowledgePackageList.add(knowledgePackage); + reteInstanceList.add(knowledgePackage.newReteInstance()); + Map p=knowledgePackage.getParameters(); + if(p!=null){ + for(String key:p.keySet()){ + Datatype type=Datatype.valueOf(p.get(key)); + if(type.equals(Datatype.Integer)){ + initParameters.put(key, 0); + }else if(type.equals(Datatype.Long)){ + initParameters.put(key, 0); + }else if(type.equals(Datatype.Double)){ + initParameters.put(key, 0); + }else if(type.equals(Datatype.Float)){ + initParameters.put(key, 0); + }else if(type.equals(Datatype.Boolean)){ + initParameters.put(key, false); + }else if(type.equals(Datatype.List)){ + initParameters.put(key, new ArrayList()); + }else if(type.equals(Datatype.Set)){ + initParameters.put(key, new HashSet()); + } + } + } + } + initContext(); + this.agenda=new Agenda(this,context); + } + + public RuleExecutionResponse fireRules() { + return execute(null,null,Integer.MAX_VALUE); + } + public RuleExecutionResponse fireRules(int max) { + return execute(null,null,max); + } + public RuleExecutionResponse fireRules(AgendaFilter filter) { + return execute(filter,null,Integer.MAX_VALUE); + } + public RuleExecutionResponse fireRules(AgendaFilter filter, int max) { + return execute(filter,null,max); + } + public RuleExecutionResponse fireRules(Map parameters) { + return execute(null,parameters,Integer.MAX_VALUE); + } + public RuleExecutionResponse fireRules(Map parameters,AgendaFilter filter) { + return execute(filter,parameters,Integer.MAX_VALUE); + } + public RuleExecutionResponse fireRules(Map parameters,AgendaFilter filter, int max) { + return execute(filter,parameters,max); + } + public RuleExecutionResponse fireRules(Map parameters, int max) { + return execute(null,parameters,max); + } + @Override + public FlowExecutionResponse startProcess(String processId) { + return startProcess(processId,null); + } + @Override + public FlowExecutionResponse startProcess(String processId,Map parameters) { + FlowDefinition targetFlow=null; + for(KnowledgePackage knowledgePackage:knowledgePackageList){ + Map flowMap=knowledgePackage.getFlowMap(); + if(flowMap==null){ + continue; + } + if(flowMap.containsKey(processId)){ + targetFlow=flowMap.get(processId); + break; + } + } + if(targetFlow==null){ + throw new RuleException("Rule flow ["+processId+"] not exist."); + } + this.parameterMap.clear(); + this.clearInitParameters(); + this.parameterMap.putAll(initParameters); + if(parameters!=null){ + this.parameterMap.putAll(parameters); + } + flowContext.setVariableMap(this.parameterMap); + flowContext.setResponse(new ExecutionResponseImpl()); + long start=System.currentTimeMillis(); + ProcessInstance pi=targetFlow.newInstance(flowContext); + fireEvent(new ProcessAfterCompletedEventImpl(pi,this)); + historyFacts.addAll(facts); + facts.clear(); + ExecutionResponseImpl response=(ExecutionResponseImpl)flowContext.getResponse(); + response.setDuration(System.currentTimeMillis()-start); + reset(); + return response; + } + + private RuleExecutionResponse execute(AgendaFilter filter, Map params,int max){ + this.parameterMap.clear(); + this.clearInitParameters(); + this.parameterMap.putAll(initParameters); + for(Map map:factMaps){ + for(Object key:map.keySet()){ + this.parameterMap.put(key.toString(), map.get(key)); + } + } + if(params!=null){ + this.parameterMap.putAll(params); + } + if(!facts.contains(parameterMap)){ + facts.add(parameterMap); + } + long start=System.currentTimeMillis(); + for(Object fact:facts){ + evaluationRete(fact); + } + buildElseRules(true); + ExecutionResponseImpl resp=(ExecutionResponseImpl)agenda.execute(filter,max); + resp.setDuration(System.currentTimeMillis()-start); + reset(); + return resp; + } + + + @SuppressWarnings("rawtypes") + private void clearInitParameters(){ + for(Object obj:initParameters.values()){ + if(obj==null){ + continue; + } + if(obj instanceof List){ + ((List)obj).clear(); + } + if(obj instanceof Set){ + ((Set)obj).clear(); + } + } + } + + private void buildElseRules(boolean buildNoLhsRules) { + List trackers=new ArrayList(); + for(KnowledgePackage knowledgePackage:knowledgePackageList){ + if(buildNoLhsRules){ + List noLhsRules=knowledgePackage.getNoLhsRules(); + if(noLhsRules!=null){ + for(Rule rule:noLhsRules){ + FactTracker tracker=new FactTracker(); + tracker.setActivation(new ActivationImpl(rule,null)); + trackers.add(tracker); + } + } + } + buildWithElseRules(trackers, knowledgePackage); + } + if(trackers.size()>0){ + agenda.addTrackers(trackers); + } + } + private void buildWithElseRules(List trackers, KnowledgePackage knowledgePackage) { + List withElseRules=knowledgePackage.getWithElseRules(); + if(withElseRules==null)return; + for(Rule rule:withElseRules){ + boolean active=false; + for(RuleBox box:agenda.getRuleBoxes()){ + if(box.getRules().contains(rule)){ + active=true; + break; + } + if(active)break; + } + if(active)continue; + Rule elseRule=((KnowledgePackageImpl)knowledgePackage).getElseRule(rule); + FactTracker tracker=new FactTracker(); + tracker.setActivation(new ActivationImpl(elseRule,null)); + trackers.add(tracker); + } + } + + + @Override + public Object getParameter(String key) { + return parameterMap.get(key); + } + @Override + public boolean update(Object obj) { + reevaluate(obj); + return true; + } + + @SuppressWarnings("rawtypes") + @Override + public boolean insert(Object fact){ + if(!(fact instanceof GeneralEntity) && (fact instanceof Map)){ + Map map=(Map)fact; + factMaps.add(map); + }else if(!facts.contains(fact)){ + return facts.add(fact); + } + return false; + } + @Override + public boolean retract(Object fact) { + agenda.retract(fact); + facts.remove(fact); + historyFacts.remove(fact); + return true; + } + + @Override + public void assertFact(Object fact) { + facts.add(fact); + reevaluate(fact); + } + + @Override + public Map getParameters() { + return parameterMap; + } + + @Override + public List getHistoryFacts() { + return historyFacts; + } + + private void reset(){ + historyFacts.clear(); + agenda.clean(); + factMaps.clear(); + facts.clear(); + } + + private void reevaluate(Object obj){ + for(ReteInstance reteInstance:reteInstanceList){ + reteInstance.resetForReevaluate(obj); + } + agenda.reevaluate(obj, evaluationContext); + evaluationRete(obj); + buildElseRules(false); + } + + private void evaluationRete(Object fact) { + for(ReteInstance reteInstance:reteInstanceList){ + Collection trackers=reteInstance.enter(evaluationContext, fact); + if(trackers!=null){ + agenda.addTrackers(trackers); + } + } + } + @Override + public void writeLogFile() throws IOException{ + if(debugMessageItems.size()==0){ + return; + } + for(DebugWriter writer:Utils.getDebugWriters()){ + writer.write(debugMessageItems); + } + debugMessageItems.clear(); + } + + public List getAllFacts() { + return facts; + } + + @Override + public void addEventListener(KnowledgeEventListener listener) { + eventListeners.add(listener); + } + @Override + public List getKnowledgeEventListeners() { + return eventListeners; + } + @Override + public boolean removeEventListener(KnowledgeEventListener listener) { + return eventListeners.remove(listener); + } + + @Override + public void fireEvent(KnowledgeEvent event) { + if(event instanceof ActivationEvent){ + for(KnowledgeEventListener listener:eventListeners){ + if(!(listener instanceof AgendaEventListener)){ + continue; + } + AgendaEventListener lis=(AgendaEventListener)listener; + if(event instanceof ActivationCancelledEvent){ + ActivationCancelledEvent e=(ActivationCancelledEvent)event; + lis.activationCancelled(e); + }else if(event instanceof ActivationCreatedEvent){ + ActivationCreatedEvent e=(ActivationCreatedEvent)event; + lis.activationCreated(e); + }else if(event instanceof ActivationBeforeFiredEvent){ + ActivationBeforeFiredEvent e=(ActivationBeforeFiredEvent)event; + lis.beforeActivationFired(e); + }else if(event instanceof ActivationAfterFiredEvent){ + ActivationAfterFiredEvent e=(ActivationAfterFiredEvent)event; + lis.afterActivationFired(e); + } + } + }else if(event instanceof ProcessEvent){ + for(KnowledgeEventListener listener:eventListeners){ + if(!(listener instanceof ProcessEventListener)){ + continue; + } + ProcessEventListener lis=(ProcessEventListener)listener; + if(event instanceof ProcessAfterCompletedEvent){ + ProcessAfterCompletedEvent e=(ProcessAfterCompletedEvent)event; + lis.afterProcessCompleted(e); + }else if(event instanceof ProcessAfterStartedEvent){ + ProcessAfterStartedEvent e=(ProcessAfterStartedEvent)event; + lis.afterProcessStarted(e); + }else if(event instanceof ProcessBeforeCompletedEvent){ + ProcessBeforeCompletedEvent e=(ProcessBeforeCompletedEvent)event; + lis.beforeProcessCompleted(e); + }else if(event instanceof ProcessBeforeStartedEvent){ + ProcessBeforeStartedEvent e=(ProcessBeforeStartedEvent)event; + lis.beforeProcessStarted(e); + }else if(event instanceof ProcessAfterNodeTriggeredEvent){ + ProcessAfterNodeTriggeredEvent e=(ProcessAfterNodeTriggeredEvent)event; + lis.afterNodeTriggered(e); + }else if(event instanceof ProcessBeforeNodeTriggeredEvent){ + ProcessBeforeNodeTriggeredEvent e=(ProcessBeforeNodeTriggeredEvent)event; + lis.beforeNodeTriggered(e); + } + } + } + } + + + private void initContext() { + Map allVariableCateogoryMap=null; + for(KnowledgePackage knowledgePackage:knowledgePackageList){ + if(allVariableCateogoryMap==null){ + allVariableCateogoryMap=knowledgePackage.getVariableCateogoryMap(); + }else{ + allVariableCateogoryMap.putAll(knowledgePackage.getVariableCateogoryMap()); + } + } + context = new ContextImpl(this,Utils.getApplicationContext(),allVariableCateogoryMap,debugMessageItems); + evaluationContext=new EvaluationContextImpl(this,Utils.getApplicationContext(),allVariableCateogoryMap,debugMessageItems); + flowContext=new FlowContextImpl(this,allVariableCateogoryMap,Utils.getApplicationContext(),debugMessageItems); + } + + public List getReteInstanceList() { + return reteInstanceList; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/WorkingMemory.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/WorkingMemory.java new file mode 100644 index 0000000..d9fa89c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/WorkingMemory.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime; + +import java.util.List; +import java.util.Map; + + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public interface WorkingMemory extends EventManager{ + /** + * 插入一个业务数据对象,对应到规则当中就是一个变量对象 + * @param fact 目标业务数据对象 + * @return 插入是否成功 + */ + boolean insert(Object fact); + /** + * 利用当前WorkingMemory中的规则信息来评估当前与业务对象,看其是否会满足相关规则的条件,同时将该对象插入到WorkingMemory + * @param fact 要评估的对象 + */ + void assertFact(Object fact); + /** + * 更新一个在当前WorkingMemory中已存在的业务对象,如果对象存在,那么WorkingMemory会重新评估这个对象 + * @param fact 要更新的对象 + * @return 更新是否成功,如果对象不在WorkingMemory中,则返回false + */ + boolean update(Object fact); + /** + * 移除一个在WorkingMemory中的对象,如果对象存在,那么会尝试对已满足条件的规则进行重新评估, + * 看看当前对象的移除是否会影响已满足条件的规则,如果有影响,则同样移除已满足条件的规则 + * @param obj 要移除的对象 + * @return 是否移除成功,如果在WorkingMemory中存在,则返回true,否则返回false + */ + boolean retract(Object obj); + /** + * 获取当前WorkingMemory中的某个参数值 + * @param key 参数对应的key值 + * @return 返回具体的值 + */ + Object getParameter(String key); + /** + * @return 返回所有的参数对象 + */ + Map getParameters(); + /** + * @return 返回当前WorkingMemory中所有的业务数据对象 + */ + List getAllFacts(); + /** + * @return 返回所有WorkingMemory中所有历史业务数据对象 + */ + List getHistoryFacts(); + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AbstractRuleBox.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AbstractRuleBox.java new file mode 100644 index 0000000..39bbc1d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AbstractRuleBox.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ActivationCancelledEventImpl; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public abstract class AbstractRuleBox implements RuleBox { + protected List executedRules; + protected Context context; + protected List rules; + public AbstractRuleBox(Context context,List executedRules) { + this.context=context; + this.rules=new ArrayList(); + this.executedRules=executedRules; + } + protected void retract(Object obj,List activations){ + List needRemovedList=new ArrayList(); + for(Activation activation:activations){ + if(activation.contain(obj)){ + needRemovedList.add(activation); + } + } + KnowledgeSession session = (KnowledgeSession)context.getWorkingMemory(); + for(Activation ac:needRemovedList){ + activations.remove(ac); + session.fireEvent(new ActivationCancelledEventImpl(ac,session)); + } + } + + protected boolean addActivation(Activation activation, List list) { + boolean result=list.add(activation); + Collections.sort(list); + return result; + } + + protected boolean activationShouldAdd(Activation activation){ + Rule rule=activation.getRule(); + for(Rule r:rules){ + if(r.equals(rule)){ + if(r.getLoop()!=null && r.getLoop()){ + return true; + }else{ + return false; + } + } + } + return true; + } + + + @Override + public List getRules() { + return rules; + } + + protected List reevaluate(Object obj,List activations,EvaluationContext context){ + List needRemoved=new ArrayList(); + for(Activation activation:activations){ + if(activation.isProcessed()){ + continue; + } + if(!activation.reevaluate(obj,context)){ + needRemoved.add(activation); + } + } + KnowledgeSession session = (KnowledgeSession)context.getWorkingMemory(); + for(Activation ac:needRemoved){ + activations.remove(ac); + session.fireEvent(new ActivationCancelledEventImpl(ac,session)); + } + return needRemoved; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Activation.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Activation.java new file mode 100644 index 0000000..e70a231 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Activation.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public interface Activation extends Comparable{ + boolean isProcessed(); + Rule getRule(); + boolean reevaluate(Object obj,EvaluationContext context); + boolean contain(Object obj); + RuleInfo execute(Context context,List executedRules,List actionValues); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroup.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroup.java new file mode 100644 index 0000000..72ea76a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroup.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +import java.util.ArrayList; +import java.util.List; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class ActivationGroup extends RuleGroup{ + private boolean executed; + public ActivationGroup(String name,List executedRules) { + super(name, executedRules); + } + @Override + public List execute(Context context, AgendaFilter filter, int max,List actionValues) { + executed=true; + Activation activation=fetchNextExecutableActivation(activations); + if(activation==null){ + return null; + } + activations.clear(); + if(filter==null || filter.accept(activation)){ + RuleInfo ruleInfo=activation.execute(context, executedRules,actionValues); + List ruleInfos=new ArrayList(); + ruleInfos.add(ruleInfo); + return ruleInfos; + } + return null; + } + public boolean isExecuted() { + return executed; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroupRuleBox.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroupRuleBox.java new file mode 100644 index 0000000..d737619 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationGroupRuleBox.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * 规则以activation-group属性进行分组,该属性相同且满足所有条件的规则都会划到此组中,
+ * 这样,在执行时这个组中规则只要有一个执行,那么其它的规则将不再执行,因此也叫互斥组。 + * activation-group级别要低于agenda-group级别。 + * @author Jacky.gao + * @since 2015年1月2日 + * */ +public class ActivationGroupRuleBox extends AbstractRuleBox { + private Map activationGroupMap=new HashMap(); + public ActivationGroupRuleBox(Context context,List executedRules) { + super(context, executedRules); + } + + public List execute(AgendaFilter filter, int max,List actionValues) { + List ruleInfos=new ArrayList(); + ActivationGroup group=findNextActivationGroup(); + while(group!=null){ + if(ruleInfos.size()>=max){ + break; + } + List ruleInfoResult=group.execute(context, filter,1,actionValues); + if(ruleInfoResult!=null){ + ruleInfos.addAll(ruleInfoResult); + } + if(ruleInfos.size()>=max){ + break; + } + group=findNextActivationGroup(); + } + return ruleInfos; + } + + public ActivationGroup findNextActivationGroup(){ + for(ActivationGroup group:activationGroupMap.values()){ + if(!group.isExecuted()){ + return group; + } + } + return null; + } + + @Override + public RuleBox next() { + ActivationGroup group= findNextActivationGroup(); + if(group!=null){ + return this; + } + return null; + } + + @Override + public void clean() { + executedRules.clear(); + activationGroupMap.clear(); + rules.clear(); + } + + @Override + public void retract(Object obj) { + for(ActivationGroup group:activationGroupMap.values()){ + List activations=group.getActivations(); + super.retract(obj, activations); + } + } + + @Override + public void reevaluate(Object obj,EvaluationContext context) { + for(ActivationGroup group:activationGroupMap.values()){ + List activations=group.getActivations(); + super.reevaluate(obj, activations, context); + } + } + + public boolean add(Activation activation) { + boolean shouldAdd=this.activationShouldAdd(activation); + if(!shouldAdd){ + return false; + } + Rule rule=activation.getRule(); + String activationGroup=rule.getActivationGroup(); + if(StringUtils.isEmpty(activationGroup)){ + return false; + } + ActivationGroup group=activationGroupMap.get(activationGroup); + if(group==null){ + group=new ActivationGroup(activationGroup,executedRules); + activationGroupMap.put(activationGroup, group); + } + List list=group.getActivations(); + addActivation(activation, list); + rules.add(activation.getRule()); + return true; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationImpl.java new file mode 100644 index 0000000..6f76a08 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationImpl.java @@ -0,0 +1,180 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.Action; +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.rule.Rhs; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.EvaluateResponse; +import com.itheima.sfbx.framework.rule.model.rule.loop.LoopRule; +import com.itheima.sfbx.framework.rule.model.scorecard.runtime.ScoreRule; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ActivationAfterFiredEventImpl; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ActivationBeforeFiredEventImpl; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class ActivationImpl implements Activation{ + private boolean processed; + private Rule rule; + //当前WorkingMemory当中命名变量,为then或else部分可能存在的根据变量引用进行的计算操作作为准备 + private Map variableMap; + private Map> objectCriteriaMap=new HashMap>(); + public ActivationImpl(Rule rule,Map variableMap) { + this.rule=rule; + this.variableMap=variableMap; + } + public RuleInfo execute(Context context,List executedRules,List actionValues) { + KnowledgeSession session = (KnowledgeSession)context.getWorkingMemory(); + session.fireEvent(new ActivationBeforeFiredEventImpl(this,session)); + executedRules.add(rule); + boolean enabled=true; + if(rule.getEnabled()!=null){ + enabled=rule.getEnabled(); + } + if(!enabled){ + return null; + } + Date now=new Date(); + Date effectiveDate=rule.getEffectiveDate(); + if(effectiveDate!=null){ + if(effectiveDate.getTime()>now.getTime()){ + return null; + } + } + Date expiresDate=rule.getExpiresDate(); + if(expiresDate!=null){ + if(expiresDate.getTime() matchedObjects=new ArrayList(); + matchedObjects.addAll(objectCriteriaMap.keySet()); + if(rule instanceof LoopRule){ + LoopRule loopRule=(LoopRule)rule; + List values=loopRule.execute(context, objectCriteriaMap.keySet(), matchedObjects,variableMap); + if(values!=null){ + actionValues.addAll(values); + } + }else if(rule instanceof ScoreRule){ + ScoreRule scoreRule=(ScoreRule)rule; + scoreRule.execute(context, objectCriteriaMap.keySet(), matchedObjects,variableMap); + }else{ + Rhs rhs=rule.getRhs(); + if(rhs!=null){ + List actions=rhs.getActions(); + if(actions!=null){ + for(Action action:actions){ + if(rule.getDebug()!=null){ + action.setDebug(rule.getDebug()); + } + ActionValue actionValue=action.execute(context,objectCriteriaMap.keySet(),matchedObjects,variableMap); + if(actionValue!=null){ + actionValues.add(actionValue); + } + } + } + } + } + session.fireEvent(new ActivationAfterFiredEventImpl(this,session)); + processed=true; + return rule; + } + public void setObjectCriteriaMap(Map> objectCriteriaMap) { + this.objectCriteriaMap = objectCriteriaMap; + } + + @Override + public boolean contain(Object obj) { + return objectCriteriaMap.containsKey(obj); + } + + @Override + public boolean reevaluate(Object obj,EvaluationContext context) { + Object key=obj; + if((obj instanceof HashMap) && !(obj instanceof GeneralEntity)){ + key=HashMap.class.getName(); + } + if(!objectCriteriaMap.containsKey(key)){ + return true; + } + List list=objectCriteriaMap.get(key); + boolean result=false; + for(BaseCriteria criteria:list){ + List allMatchedObjects=new ArrayList(); + EvaluateResponse response=criteria.evaluate(context,obj,allMatchedObjects); + result=response.getResult(); + if(result){ + for(Object object:allMatchedObjects){ + addObjectCriteria(object, criteria); + } + }else{ + break; + } + } + return result; + } + private void addObjectCriteria(Object obj, BaseCriteria criteria) { + if(obj instanceof HashMap && !(obj instanceof GeneralEntity)){ + obj=HashMap.class.getName(); + } + if(objectCriteriaMap.containsKey(obj)){ + List list=objectCriteriaMap.get(obj); + if(!list.contains(criteria)){ + list.add(criteria); + } + }else{ + List list=new ArrayList(); + list.add(criteria); + objectCriteriaMap.put(obj, list); + } + } + public Rule getRule() { + return rule; + } + public void setRule(Rule rule) { + this.rule = rule; + } + public boolean isProcessed() { + return processed; + } + public void setProcessed(boolean processed) { + this.processed = processed; + } + public int compareTo(Activation o) { + Integer o1=o.getRule().getSalience(); + Integer o2=rule.getSalience(); + if(o1!=null && o2!=null){ + return o1-o2; + }else if(o1!=null){ + return 1; + }else if(o2!=null){ + return -1; + } + return 0; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationRuleBox.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationRuleBox.java new file mode 100644 index 0000000..2c372ef --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/ActivationRuleBox.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.ArrayList; +import java.util.List; +/** + * 所有未定义activation-group及agenda-group的满足条件的规则都放在此处 + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class ActivationRuleBox extends AbstractRuleBox{ + private List activations=new ArrayList(); + public ActivationRuleBox(Context context,List executedRules) { + super(context,executedRules); + } + public List execute(AgendaFilter filter, int max,List actionValues) { + Activation activation=findNextActivation(); + List ruleInfos=new ArrayList(); + while(activation!=null){ + ActivationImpl ac=(ActivationImpl)activation; + ac.setProcessed(true); + if(filter!=null && !filter.accept(activation)){ + continue; + } + if(ruleInfos.size()>=max){ + break; + } + RuleInfo ruleInfo=activation.execute(context, executedRules,actionValues); + if(ruleInfo!=null){ + ruleInfos.add(ruleInfo); + } + activation=RuleGroup.fetchNextExecutableActivation(activations); + } + return ruleInfos; + } + + public Activation findNextActivation(){ + return RuleGroup.fetchNextExecutableActivation(activations); + } + + @Override + public RuleBox next() { + Activation activation = findNextActivation(); + if(activation!=null){ + return this; + } + return null; + } + + @Override + public void clean() { + executedRules.clear(); + activations.clear(); + rules.clear(); + } + + public void retract(Object obj){ + super.retract(obj, activations); + } + + @Override + public void reevaluate(Object obj,EvaluationContext context) { + super.reevaluate(obj, activations, context); + } + + @Override + public boolean add(Activation activation) { + boolean shouldAdd=this.activationShouldAdd(activation); + if(!shouldAdd){ + return false; + } + rules.add(activation.getRule()); + return addActivation(activation, activations); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Agenda.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Agenda.java new file mode 100644 index 0000000..833181a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/Agenda.java @@ -0,0 +1,118 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionImpl; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; +import com.itheima.sfbx.framework.rule.runtime.rete.FactTracker; +import com.itheima.sfbx.framework.rule.runtime.rete.ReteInstance; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class Agenda { + private Context context; + private List ruleBoxes=new ArrayList(); + private List matchedRules=new ArrayList(); + public Agenda(WorkingMemory workingMemory,Context context){ + this.context=context; + ruleBoxes.add(new AgendaGroupRuleBox(context,matchedRules)); + ruleBoxes.add(new ActivationGroupRuleBox(context,matchedRules)); + ruleBoxes.add(new ActivationRuleBox(context,matchedRules)); + } + public RuleExecutionResponse execute(AgendaFilter filter,int max){ + ExecutionResponseImpl response=new ExecutionResponseImpl(); + List actionValues=new ArrayList(); + response.setActionValues(actionValues); + List firedRules=new ArrayList(); + RuleBox ruleBox=nextRuleBox(); + while(ruleBox!=null){ + List ruleInfoResult=ruleBox.execute(filter, max-firedRules.size(),actionValues); + if(ruleInfoResult!=null && ruleInfoResult.size()>0){ + firedRules.addAll(ruleInfoResult); + } + if(firedRules.size()>=max){ + break; + } + ruleBox=nextRuleBox(); + } + + KnowledgeSessionImpl session=(KnowledgeSessionImpl)context.getWorkingMemory(); + List reteInstanceList=session.getReteInstanceList(); + for(ReteInstance reteInstance:reteInstanceList){ + reteInstance.reset(); + } + session.getAllFacts().clear(); + response.setFiredRules(firedRules); + response.addMatchedRules(matchedRules); + return response; + } + + private RuleBox nextRuleBox(){ + for(RuleBox ruleBox:ruleBoxes){ + RuleBox next=ruleBox.next(); + if(next!=null){ + return next; + } + } + return null; + } + + + public void addTrackers(Collection list){ + for(FactTracker tracker:list){ + Activation activation=tracker.getActivation(); + for(RuleBox ruleBox:ruleBoxes){ + boolean add=ruleBox.add(activation); + if(add){ + break; + } + } + } + } + + public void retract(Object obj){ + for(RuleBox ruleBox:ruleBoxes){ + ruleBox.retract(obj); + } + } + + public void reevaluate(Object obj,EvaluationContext context){ + for(RuleBox ruleBox:ruleBoxes){ + ruleBox.reevaluate(obj, context); + } + } + + public List getRuleBoxes() { + return ruleBoxes; + } + + public void clean(){ + for(RuleBox ruleBox:ruleBoxes){ + ruleBox.clean(); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaFilter.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaFilter.java new file mode 100644 index 0000000..fb73d8d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaFilter.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public interface AgendaFilter { + boolean accept(Activation activation); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroup.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroup.java new file mode 100644 index 0000000..6c8cc27 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroup.java @@ -0,0 +1,78 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class AgendaGroup extends RuleGroup{ + private boolean focus; + private boolean executed; + public AgendaGroup(String name,List executedRules) { + super(name, executedRules); + } + @Override + public List execute(Context context,AgendaFilter filter, int max,List actionValues){ + executed=true; + List ruleInfos=new ArrayList(); + for(int i=0;i=max){ + break; + } + } + return ruleInfos; + } + + public boolean isExecuted() { + return executed; + } + + public boolean isFocus() { + return focus; + } + + public void setFocus(boolean focus) { + this.focus = focus; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroupRuleBox.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroupRuleBox.java new file mode 100644 index 0000000..daa84f8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/AgendaGroupRuleBox.java @@ -0,0 +1,122 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +/** + * 以agenda-group属性划分的组,如果该属性相同,则划到这个组当中,
+ * 默认情况下,引擎在执行这些有agenda-group属性的规则时,需要某个组得到了焦点,
+ * 或者当前组中要执行的规则设置了auto-focus=true,否则该组下所有规则不会被执行。
+ * agenda-group级别最高,高于activation-group级别。 + * @author Jacky.gao + * @since 2015年1月2日 + */ +public class AgendaGroupRuleBox extends AbstractRuleBox { + private Map agendaGroupMap=new HashMap(); + public AgendaGroupRuleBox(Context context,List executedRules) { + super(context,executedRules); + } + public List execute(AgendaFilter filter, int max,List actionValues) { + List ruleInfos=new ArrayList(); + AgendaGroup ag=findNextAgendaGroup(); + while(ag!=null){ + List ruleInfoResult=ag.execute(context, filter,max,actionValues); + ruleInfos.addAll(ruleInfoResult); + if(ruleInfos.size()>=max){ + break; + } + ag=findNextAgendaGroup(); + } + return ruleInfos; + } + + public AgendaGroup findNextAgendaGroup(){ + for(AgendaGroup ag:agendaGroupMap.values()){ + if(!ag.isExecuted()){ + return ag; + } + } + return null; + } + + @Override + public RuleBox next() { + AgendaGroup group= findNextAgendaGroup(); + if(group!=null){ + return this; + } + return null; + } + + public AgendaGroup getAgendaGroup(String agendaGroupName){ + return agendaGroupMap.get(agendaGroupName); + } + + @Override + public void clean() { + executedRules.clear(); + agendaGroupMap.clear(); + rules.clear(); + } + + @Override + public void retract(Object obj) { + for(AgendaGroup group:agendaGroupMap.values()){ + List activations=group.getActivations(); + super.retract(obj, activations); + } + } + + @Override + public void reevaluate(Object obj,EvaluationContext context) { + for(AgendaGroup group:agendaGroupMap.values()){ + List activations=group.getActivations(); + super.reevaluate(obj, activations, context); + } + } + + @Override + public boolean add(Activation activation) { + boolean shouldAdd=this.activationShouldAdd(activation); + if(!shouldAdd){ + return false; + } + Rule rule=activation.getRule(); + String agendaGroup=rule.getAgendaGroup(); + if(StringUtils.isEmpty(agendaGroup)){ + return false; + } + AgendaGroup group=agendaGroupMap.get(agendaGroup); + if(group==null){ + group=new AgendaGroup(agendaGroup,executedRules); + agendaGroupMap.put(agendaGroup, group); + } + List list=group.getActivations(); + addActivation(activation, list); + rules.add(activation.getRule()); + return true; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleBox.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleBox.java new file mode 100644 index 0000000..5e3d5a6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleBox.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.EvaluationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public interface RuleBox{ + List execute(AgendaFilter filter,int max,List actionValues); + boolean add(Activation activation); + RuleBox next(); + List getRules(); + void reevaluate(Object obj,EvaluationContext context); + void retract(Object obj); + void clean(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleGroup.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleGroup.java new file mode 100644 index 0000000..2c22cf6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/agenda/RuleGroup.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.agenda; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.rete.*; + +import java.util.ArrayList; +import java.util.List; +/** + * @author Jacky.gao + * @since 2015年1月2日 + */ +public abstract class RuleGroup { + private String name; + protected List executedRules; + protected List activations=new ArrayList(); + public RuleGroup(String name,List executedRules) { + this.name=name; + this.executedRules=executedRules; + } + public abstract List execute(Context context,AgendaFilter filter, int max,List actionValues); + + public static Activation fetchNextExecutableActivation(List activations){ + Activation targetActivation=null; + for(Activation ac:activations){ + if(!ac.isProcessed()){ + targetActivation=ac; + break; + } + } + return targetActivation; + } + + public List getActivations() { + return activations; + } + public String getName() { + return name; + } + public boolean contains(Rule rule){ + for(Activation activation:activations){ + if(activation.getRule().equals(rule)){ + return true; + } + } + return false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/Assertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/Assertor.java new file mode 100644 index 0000000..3d5e064 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/Assertor.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public interface Assertor { + boolean eval(Object left,Object right,Datatype datatype); + boolean support(Op op); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/AssertorEvaluator.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/AssertorEvaluator.java new file mode 100644 index 0000000..64205e2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/AssertorEvaluator.java @@ -0,0 +1,50 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class AssertorEvaluator implements ApplicationContextAware{ + public static final String BEAN_ID="urule.assertorEvaluator"; + private Collection assertors; + public boolean evaluate(Object left,Object right,Datatype datatype,Op op){ + Assertor targetAssertor=null; + for(Assertor assertor:assertors){ + if(assertor.support(op)){ + targetAssertor=assertor; + break; + } + } + if(targetAssertor==null){ + throw new RuleException("Unsupport op:"+op); + } + return targetAssertor.eval(left, right,datatype); + } + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + assertors=applicationContext.getBeansOfType(Assertor.class).values(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/ContainAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/ContainAssertor.java new file mode 100644 index 0000000..55c2be6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/ContainAssertor.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2017年12月21日 + */ +public class ContainAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(left instanceof String){ + return left.toString().contains(right.toString()); + } + if(left instanceof Collection){ + Collection list=(Collection)left; + if(right instanceof Collection){ + Collection rightList=(Collection)right; + return list.containsAll(rightList); + }else{ + return list.contains(right); + } + } + String leftStr=left.toString(); + String rightStr=right.toString(); + return leftStr.contains(rightStr); + } + + public boolean support(Op op) { + return op.equals(Op.Contain); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EndWithAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EndWithAssertor.java new file mode 100644 index 0000000..1fa7c3d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EndWithAssertor.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class EndWithAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(!(left instanceof String) || !(right instanceof String)){ + return false; + } + String leftStr=left.toString(); + String rightStr=right.toString(); + if(leftStr.endsWith(rightStr)){ + return true; + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.EndWith); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsAssertor.java new file mode 100644 index 0000000..0cc34fc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsAssertor.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class EqualsAssertor implements Assertor { + @SuppressWarnings("unchecked") + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null && right==null){ + return true; + }else if(left==null || right==null){ + return false; + } + BigDecimal b1=null; + BigDecimal b2=null; + switch(datatype){ + case String: + return left.toString().equals(right.toString()); + case Boolean: + return left.toString().equals(right.toString()); + case Date: + Date ld=(Date)datatype.convert(left); + Date rd=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(ld); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rd); + return leftCalendar.compareTo(rightCalendar)==0; + case Double: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Float: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Integer: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Long: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case BigDecimal: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Enum: + Enum e1=(Enum)left; + if(right instanceof Enum){ + Enum e2=(Enum)right; + return e1.equals(e2); + }else{ + Enum e2=Enum.valueOf(e1.getClass(), right.toString()); + return e1.equals(e2); + } + default : + return right.toString().equals(left.toString()); + } + } + public boolean support(Op op) { + return op.equals(Op.Equals); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsIgnoreCaseAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsIgnoreCaseAssertor.java new file mode 100644 index 0000000..69a1a09 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/EqualsIgnoreCaseAssertor.java @@ -0,0 +1,89 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class EqualsIgnoreCaseAssertor implements Assertor { + @SuppressWarnings("unchecked") + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null && right==null){ + return true; + }else if(left==null || right==null){ + return false; + } + BigDecimal b1=null; + BigDecimal b2=null; + switch(datatype){ + case String: + return left.toString().equalsIgnoreCase(right.toString()); + case Boolean: + return left.toString().equals(right.toString()); + case Date: + Date ld=(Date)datatype.convert(left); + Date rd=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(ld); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rd); + return leftCalendar.compareTo(rightCalendar)==0; + case Double: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Float: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Integer: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Long: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case BigDecimal: + b1=Utils.toBigDecimal(left); + b2=Utils.toBigDecimal(right); + return b1.compareTo(b2)==0; + case Enum: + Enum e1=(Enum)left; + if(right instanceof Enum){ + Enum e2=(Enum)right; + return e1.equals(e2); + }else{ + Enum e2=Enum.valueOf(e1.getClass(), right.toString()); + return e1.equals(e2); + } + default : + return right.toString().equalsIgnoreCase(left.toString()); + } + } + public boolean support(Op op) { + return op.equals(Op.EqualsIgnoreCase); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenAssertor.java new file mode 100644 index 0000000..01fae7c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenAssertor.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class GreaterThenAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(datatype.equals(Datatype.Date)){ + Date leftDate=(Date)datatype.convert(left); + Date rightDate=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(leftDate); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rightDate); + int result=leftCalendar.compareTo(rightCalendar); + if(result==1){ + return true; + } + }else{ + BigDecimal leftNumber=Utils.toBigDecimal(left); + BigDecimal rightNumber=Utils.toBigDecimal(right); + int result=leftNumber.compareTo(rightNumber); + if(result==1){ + return true; + } + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.GreaterThen); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenEqualsAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenEqualsAssertor.java new file mode 100644 index 0000000..1ee07c7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/GreaterThenEqualsAssertor.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class GreaterThenEqualsAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(datatype.equals(Datatype.Date)){ + Date leftDate=(Date)datatype.convert(left); + Date rightDate=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(leftDate); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rightDate); + int result=leftCalendar.compareTo(rightCalendar); + if(result==1 || result==0){ + return true; + } + }else{ + BigDecimal leftNumber=Utils.toBigDecimal(left); + BigDecimal rightNumber=Utils.toBigDecimal(right); + int result=leftNumber.compareTo(rightNumber); + if(result==1 || result==0){ + return true; + } + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.GreaterThenEquals); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/InAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/InAssertor.java new file mode 100644 index 0000000..229e461 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/InAssertor.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class InAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(right instanceof Collection){ + Collection coll=(Collection)right; + if(left instanceof Collection){ + Collection leftColl=(Collection)left; + boolean match=false; + for(Object leftObj:leftColl){ + for(Object obj:coll){ + if(obj.toString().equals(leftObj.toString())){ + match=true; + break; + }else{ + match=false; + } + } + } + return match; + }else{ + String[] leftStrings=left.toString().split(","); + boolean match=false; + for(String str:leftStrings){ + for(Object obj:coll){ + if(obj.toString().equals(str)){ + match=true; + break; + }else{ + match=false; + } + } + } + return match; + } + }else if(right instanceof String){ + String str=(String)right; + String[] array=str.split(","); + if(left instanceof Collection){ + Collection leftColl=(Collection)left; + boolean match=false; + for(Object leftObj:leftColl){ + for(String rightStr:array){ + if(leftObj.toString().equals(rightStr)){ + match=true; + break; + }else{ + match=false; + } + } + } + return match; + }else{ + String[] leftStrings=left.toString().split(","); + boolean match=false; + for(String leftStr:leftStrings){ + for(String righStr:array){ + if(righStr.equals(leftStr)){ + match=true; + break; + }else{ + match=false; + } + } + } + return match; + } + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.In); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenAssertor.java new file mode 100644 index 0000000..2ba0f11 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenAssertor.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class LessThenAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(datatype.equals(Datatype.Date)){ + Date leftDate=(Date)datatype.convert(left); + Date rightDate=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(leftDate); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rightDate); + int result=leftCalendar.compareTo(rightCalendar); + if(result==-1){ + return true; + } + }else{ + BigDecimal leftNumber=Utils.toBigDecimal(left); + BigDecimal rightNumber=Utils.toBigDecimal(right); + int result=leftNumber.compareTo(rightNumber); + if(result==-1){ + return true; + } + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.LessThen); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenEqualsAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenEqualsAssertor.java new file mode 100644 index 0000000..b6e440e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/LessThenEqualsAssertor.java @@ -0,0 +1,61 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.math.BigDecimal; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class LessThenEqualsAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(datatype.equals(Datatype.Date)){ + Date leftDate=(Date)datatype.convert(left); + Date rightDate=(Date)datatype.convert(right); + Calendar leftCalendar=Calendar.getInstance(); + leftCalendar.setTime(leftDate); + Calendar rightCalendar=Calendar.getInstance(); + rightCalendar.setTime(rightDate); + int result=leftCalendar.compareTo(rightCalendar); + if(result==-1 || result==0){ + return true; + } + }else{ + BigDecimal leftNumber=Utils.toBigDecimal(left); + BigDecimal rightNumber=Utils.toBigDecimal(right); + int result=leftNumber.compareTo(rightNumber); + if(result==-1 || result==0){ + return true; + } + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.LessThenEquals); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/MatchAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/MatchAssertor.java new file mode 100644 index 0000000..d68c0e8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/MatchAssertor.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class MatchAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + Pattern pattern=Pattern.compile(right.toString()); + Matcher matcher=pattern.matcher(left.toString()); + return matcher.matches(); + } + + public boolean support(Op op) { + return op.equals(Op.Match); + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotContainAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotContainAssertor.java new file mode 100644 index 0000000..88cf9a1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotContainAssertor.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2017年12月21日 + */ +public class NotContainAssertor extends ContainAssertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + return !super.eval(left, right, datatype); + } + + public boolean support(Op op) { + return op.equals(Op.NotContain); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEndWithAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEndWithAssertor.java new file mode 100644 index 0000000..416af66 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEndWithAssertor.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotEndWithAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(!(left instanceof String) || !(right instanceof String)){ + return false; + } + String leftStr=(String)left; + String rightStr=(String)right; + if(!leftStr.endsWith(rightStr)){ + return true; + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.NotEndWith); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsAssertor.java new file mode 100644 index 0000000..98f6e7c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsAssertor.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotEqualsAssertor extends EqualsAssertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null && right!=null){ + return true; + }else if(left!=null && right==null){ + return true; + }else if(left==null && right==null){ + return false; + } + return !super.eval(left, right, datatype); + } + + public boolean support(Op op) { + return op.equals(Op.NotEquals); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsIgnoreCaseAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsIgnoreCaseAssertor.java new file mode 100644 index 0000000..2fa8dc5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotEqualsIgnoreCaseAssertor.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotEqualsIgnoreCaseAssertor extends EqualsIgnoreCaseAssertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null && right!=null){ + return true; + }else if(left!=null && right==null){ + return true; + }else if(left==null && right==null){ + return false; + } + return !super.eval(left, right, datatype); + } + + public boolean support(Op op) { + return op.equals(Op.NotEqualsIgnoreCase); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotInAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotInAssertor.java new file mode 100644 index 0000000..28272bd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotInAssertor.java @@ -0,0 +1,33 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotInAssertor extends InAssertor { + @Override + public boolean eval(Object left, Object right,Datatype datatype) { + return !super.eval(left, right,datatype); + } + @Override + public boolean support(Op op) { + return op.equals(Op.NotIn); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotMatchAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotMatchAssertor.java new file mode 100644 index 0000000..b4b86b5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotMatchAssertor.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotMatchAssertor implements Assertor { + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + Pattern pattern=Pattern.compile(right.toString()); + Matcher matcher=pattern.matcher(left.toString()); + return !matcher.matches(); + } + + public boolean support(Op op) { + return op.equals(Op.NotMatch); + } + +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotNullAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotNullAssertor.java new file mode 100644 index 0000000..56af82d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotNullAssertor.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import org.apache.commons.lang.StringUtils; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotNullAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left!=null && StringUtils.isNotBlank(left.toString())){ + return true; + }else{ + return false; + } + } + + public boolean support(Op op) { + return op.equals(Op.NotNull); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotStartWithAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotStartWithAssertor.java new file mode 100644 index 0000000..9b14c96 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NotStartWithAssertor.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NotStartWithAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(!(left instanceof String) || !(right instanceof String)){ + return false; + } + String leftStr=(String)left; + String rightStr=(String)right; + if(!leftStr.startsWith(rightStr)){ + return true; + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.NotStartWith); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NullAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NullAssertor.java new file mode 100644 index 0000000..fa68863 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/NullAssertor.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; +import org.apache.commons.lang.StringUtils; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NullAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null){ + return true; + }else{ + return StringUtils.isBlank(left.toString()); + } + } + + public boolean support(Op op) { + return op.equals(Op.Null); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/StartWithAssertor.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/StartWithAssertor.java new file mode 100644 index 0000000..c5ea879 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/assertor/StartWithAssertor.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.assertor; + +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.rule.Op; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class StartWithAssertor implements Assertor { + + public boolean eval(Object left, Object right,Datatype datatype) { + if(left==null || right==null){ + return false; + } + if(!(left instanceof String) || !(right instanceof String)){ + return false; + } + String leftStr=(String)left; + String rightStr=(String)right; + if(leftStr.startsWith(rightStr)){ + return true; + } + return false; + } + + public boolean support(Op op) { + return op.equals(Op.StartWith); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/DateAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/DateAction.java new file mode 100644 index 0000000..4f59eed --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/DateAction.java @@ -0,0 +1,408 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +import org.apache.commons.lang.StringUtils; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年11月27日 + */ +@ActionBean(name="日期") +public class DateAction { + + @ActionMethod(name="解析字符串为日期") + @ActionMethodParameter(names={"日期字符串","格式"}) + public Date formatString(String dateStr,String pattern){ + if(StringUtils.isBlank(dateStr)){ + return null; + } + SimpleDateFormat sd=new SimpleDateFormat(pattern); + try { + return sd.parse(dateStr); + } catch (ParseException e) { + throw new RuleException(e); + } + } + + @ActionMethod(name="当前日期") + @ActionMethodParameter(names={}) + public Date getDate(){ + return new Date(); + } + + @ActionMethod(name="格式化日期") + @ActionMethodParameter(names={"目标日期","格式"}) + public String format(Date date,String pattern){ + if(date==null){ + return null; + } + SimpleDateFormat sd=new SimpleDateFormat(pattern); + return sd.format(date); + } + @ActionMethod(name="加日期") + @ActionMethodParameter(names={"目标日期","年数","月数","天数","小时","分钟","秒数"}) + public Date addDate(Date date,int years,int months,int days,int hours,int minutes,int seconds){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.YEAR, years); + c.add(Calendar.MONTH, months); + c.add(Calendar.DAY_OF_MONTH, days); + c.add(Calendar.HOUR_OF_DAY, hours); + c.add(Calendar.MINUTE, minutes); + c.add(Calendar.SECOND, seconds); + return c.getTime(); + } + @ActionMethod(name="日期加年") + @ActionMethodParameter(names={"目标日期","年数"}) + public Date addDateForYear(Date date,int years){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.YEAR, years); + return c.getTime(); + } + + @ActionMethod(name="日期加月") + @ActionMethodParameter(names={"目标日期","月数"}) + public Date addDateForMonth(Date date,int months){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.MONTH, months); + return c.getTime(); + } + @ActionMethod(name="日期加天") + @ActionMethodParameter(names={"目标日期","天数"}) + public Date addDateForDay(Date date,int days){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.DAY_OF_MONTH, days); + return c.getTime(); + } + + @ActionMethod(name="日期加小时") + @ActionMethodParameter(names={"目标日期","小时数"}) + public Date addDateForHour(Date date,int hours){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.HOUR_OF_DAY, hours); + return c.getTime(); + } + + @ActionMethod(name="日期加分钟") + @ActionMethodParameter(names={"目标日期","分钟数"}) + public Date addDateForMinute(Date date,int minutes){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.MINUTE, minutes); + return c.getTime(); + } + @ActionMethod(name="日期加秒") + @ActionMethodParameter(names={"目标日期","秒数"}) + public Date addDateForSecond(Date date,int seconds){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.SECOND, seconds); + return c.getTime(); + } + @ActionMethod(name="减日期") + @ActionMethodParameter(names={"目标日期","年数","月数","天数","小时","分钟","秒数"}) + public Date subDate(Date date,int years,int months,int days,int hours,int minutes,int seconds){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.YEAR, -years); + c.add(Calendar.MONTH, -months); + c.add(Calendar.DAY_OF_MONTH, -days); + c.add(Calendar.HOUR_OF_DAY, -hours); + c.add(Calendar.MINUTE, -minutes); + c.add(Calendar.SECOND, -seconds); + return c.getTime(); + } + @ActionMethod(name="减日期减年") + @ActionMethodParameter(names={"目标日期","年数"}) + public Date subDateForYear(Date date,int years){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.YEAR, -years); + return c.getTime(); + } + @ActionMethod(name="减日期减月") + @ActionMethodParameter(names={"目标日期","月数"}) + public Date subDateForMonth(Date date,int months){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.MONTH, -months); + return c.getTime(); + } + @ActionMethod(name="减日期减天") + @ActionMethodParameter(names={"目标日期","天数"}) + public Date subDateForDay(Date date,int days){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.DAY_OF_MONTH, -days); + return c.getTime(); + } + @ActionMethod(name="减日期减小时") + @ActionMethodParameter(names={"目标日期","小时"}) + public Date subDateForHour(Date date,int hours){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.HOUR_OF_DAY, -hours); + return c.getTime(); + } + @ActionMethod(name="减日期减分钟") + @ActionMethodParameter(names={"目标日期","分钟"}) + public Date subDateForMinute(Date date,int minutes){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.MINUTE, -minutes); + return c.getTime(); + } + @ActionMethod(name="减日期减秒") + @ActionMethodParameter(names={"目标日期","秒数"}) + public Date subDateForSecond(Date date,int seconds){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + c.add(Calendar.SECOND, -seconds); + return c.getTime(); + } + + @ActionMethod(name="取年份") + @ActionMethodParameter(names={"目标日期"}) + public Object getYear(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.YEAR); + } + + @ActionMethod(name="取月份") + @ActionMethodParameter(names={"目标日期"}) + public Object getMonth(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.MONTH); + } + + @ActionMethod(name="取星期") + @ActionMethodParameter(names={"目标日期"}) + public Object getWeek(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.DAY_OF_WEEK); + } + @ActionMethod(name="取天") + @ActionMethodParameter(names={"目标日期"}) + public Object getay(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.DAY_OF_MONTH); + } + @ActionMethod(name="取小时") + @ActionMethodParameter(names={"目标日期"}) + public Object getHour(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.HOUR_OF_DAY); + } + @ActionMethod(name="取分钟") + @ActionMethodParameter(names={"目标日期"}) + public Object getMinute(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.MINUTE); + } + @ActionMethod(name="取秒") + @ActionMethodParameter(names={"目标日期"}) + public Object getSecond(Date date){ + if(date==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(date); + return c.get(Calendar.SECOND); + } + @ActionMethod(name="日期相减返回毫秒") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifMillSecond(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return a-b; + } + @ActionMethod(name="日期相减返回秒") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifSecond(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return (a-b)/1000; + } + @ActionMethod(name="日期相减返回分钟") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifMinute(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return (a-b)/(1000*60); + } + @ActionMethod(name="日期相减返回小时") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifHour(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return (a-b)/(1000*60*60); + } + @ActionMethod(name="日期相减返回天") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifDay(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return (a-b)/(1000*60*60*24); + } + @ActionMethod(name="日期相减返回星期") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifWeek(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + long a=c.getTimeInMillis(); + long b=c1.getTimeInMillis(); + return (a-b)/(1000*60*60*24*7); + } + @ActionMethod(name="日期相减返回月") + @ActionMethodParameter(names={"日期","减去的日期"}) + public Object dateDifMonth(Date d1,Date d2){ + if(d1==null || d2==null){ + return null; + } + Calendar c=Calendar.getInstance(); + c.setTime(d1); + Calendar c1=Calendar.getInstance(); + c1.setTime(d2); + + int year1=c.get(Calendar.YEAR); + int year2=c1.get(Calendar.YEAR); + + int month1=c.get(Calendar.MONTH); + int month2=c1.get(Calendar.MONTH); + int result=12*(year1-year2)+(month1-month2); + return result; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/ListAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/ListAction.java new file mode 100644 index 0000000..6e93758 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/ListAction.java @@ -0,0 +1,173 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; + +import java.math.BigDecimal; +import java.util.*; + +/** + * @author Jacky.gao + * @since 2016年6月21日 + */ +@ActionBean(name="List集合") +public class ListAction { + @ActionMethod(name="求List大小") + @ActionMethodParameter(names={"集合对象"}) + public int size(List list){ + return list.size(); + } + + @ActionMethod(name="求List中所有的数字最大值") + @ActionMethodParameter(names={"包含所有数字的集合对象"}) + public Number max(List list){ + double max=Double.MIN_VALUE; + for(Object obj:list){ + BigDecimal v=Utils.toBigDecimal(obj); + max=Math.max(max, v.doubleValue()); + } + return max; + } + + @ActionMethod(name="求List中所有的数字最小值") + @ActionMethodParameter(names={"包含所有数字的集合对象"}) + public Number min(List list){ + if(list.size()==0){ + throw new RuleException("Number list can not be null when compute min value from list."); + } + double min=Double.MAX_VALUE; + for(Object obj:list){ + BigDecimal v=Utils.toBigDecimal(obj); + min=Math.min(min, v.doubleValue()); + } + return min; + } + + @ActionMethod(name="向List中添加对象") + @ActionMethodParameter(names={"集合对象","要添加的对象"}) + public void add(List list,Object obj){ + list.add(obj); + } + + @ActionMethod(name="集合排序") + @ActionMethodParameter(names={"集合对象","属性名","排序方式"}) + public List sort(List list,final String propertyName,String type){ + final boolean asc=asc(type); + Collections.sort(list, new Comparator() { + @Override + public int compare(Object o1, Object o2) { + int result=0; + String[] props=propertyName.split(","); + for(String prop:props){ + result = objectCompare(prop, asc, o1, o2); + if(result!=0){ + break; + } + } + return result; + } + + private int objectCompare(final String propertyName,final boolean asc, Object o1, Object o2) { + Object v1=Utils.getObjectProperty(o1, propertyName); + Object v2=Utils.getObjectProperty(o2, propertyName); + if(v1==null){ + if(asc){ + return 0; + }else{ + return 1; + } + } + if(v2==null){ + if(asc){ + return 1; + }else{ + return 0; + } + } + if(v1 instanceof String){ + if(asc){ + return ((String) v1).compareTo(v2.toString()); + }else{ + return ((String) v2).compareTo(v1.toString()); + } + } + if(v1 instanceof Date){ + if(asc){ + return ((Date)v1).compareTo((Date)v2); + }else{ + return ((Date)v2).compareTo((Date)v1); + } + } + if(v1 instanceof Number){ + BigDecimal b1=Utils.toBigDecimal(v1); + BigDecimal b2=Utils.toBigDecimal(v2); + if(asc){ + return b1.compareTo(b2); + }else{ + return b2.compareTo(b1); + } + } + return 0; + } + }); + return list; + } + + private boolean asc(String type){ + if(type==null){ + return true; + } + if(type.equals("1") || type.equals("true") || type.equals("正序")){ + return true; + } + return false; + } + + @ActionMethod(name="抽取集合属性") + @ActionMethodParameter(names={"集合对象","属性名"}) + public List retrive(List list,String propertyName){ + List result=new ArrayList(); + if(list==null){ + return result; + } + for(Object obj:list){ + Object value=Utils.getObjectProperty(obj, propertyName); + result.add(value); + } + return result; + } + + @ActionMethod(name="从List中删除对象") + @ActionMethodParameter(names={"集合对象","要删除的对象"}) + public void remove(List list,Object obj){ + list.remove(obj); + } + @ActionMethod(name="指定对象是否存在") + @ActionMethodParameter(names={"集合对象","要判断的对象"}) + public boolean contains(List list,Object obj){ + return list.contains(obj); + } + @ActionMethod(name="List是否为空") + @ActionMethodParameter(names={"集合对象"}) + public boolean isEmpty(List list){ + return list.isEmpty(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/LoopAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/LoopAction.java new file mode 100644 index 0000000..7a4c223 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/LoopAction.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.action.ActionId; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; + +/** + * @author Jacky.gao + * @since 2016年9月30日 + */ +@ActionBean(name="循环操作") +public class LoopAction { + public static final String BREAK_LOOP_ACTION_ID="_loop_break__"; + @ActionMethod(name="中断循环") + @ActionMethodParameter(names={}) + @ActionId(BREAK_LOOP_ACTION_ID) + public String breakLoop(){ + return "break"; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MapAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MapAction.java new file mode 100644 index 0000000..3a5b4b9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MapAction.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; + +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2016年6月21日 + */ +@ActionBean(name="Map集合") +public class MapAction { + + @ActionMethod(name="添加到Map") + @ActionMethodParameter(names={"Map对象","key","value"}) + public void put(Map map,String key,Object value){ + map.put(key, value); + } + @ActionMethod(name="从Map中删除") + @ActionMethodParameter(names={"Map对象","key"}) + public void remove(Map map,String key){ + map.remove(key); + } + @ActionMethod(name="指定Key是否存在") + @ActionMethodParameter(names={"Map对象","key"}) + public boolean containsKey(Map map,String key){ + return map.containsKey(key); + } + @ActionMethod(name="从Map中取值") + @ActionMethodParameter(names={"Map对象","key"}) + public Object get(Map map,String key){ + return map.get(key); + } + @ActionMethod(name="返回Map大小") + @ActionMethodParameter(names={"Map对象"}) + public int size(Map map){ + return map.size(); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MathAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MathAction.java new file mode 100644 index 0000000..5d18719 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/MathAction.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; + +import java.math.BigDecimal; +/** + * @author Jacky.gao + * @since 2015年11月27日 + */ +@ActionBean(name="数学函数") +public class MathAction { + @ActionMethod(name="求绝对值") + @ActionMethodParameter(names={"数字"}) + public Number abs(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.abs(v1.doubleValue()); + } + @ActionMethod(name="求最大值") + @ActionMethodParameter(names={"数字1","数字2"}) + public Number max(Object obj,Object obj1){ + BigDecimal v1=Utils.toBigDecimal(obj); + BigDecimal v2=Utils.toBigDecimal(obj1); + return Math.max(v1.doubleValue(), v2.doubleValue()); + } + @ActionMethod(name="求最小值") + @ActionMethodParameter(names={"数字1","数字2"}) + public Number min(Object obj,Object obj1){ + BigDecimal v1=Utils.toBigDecimal(obj); + BigDecimal v2=Utils.toBigDecimal(obj1); + return Math.min(v1.doubleValue(), v2.doubleValue()); + } + + @ActionMethod(name="求正弦") + @ActionMethodParameter(names={"数字"}) + public Number in(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.sin(v1.doubleValue()); + } + @ActionMethod(name="求余弦") + @ActionMethodParameter(names={"数字"}) + public Number cos(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.cos(v1.doubleValue()); + } + @ActionMethod(name="求正切") + @ActionMethodParameter(names={"数字"}) + public Number tan(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.tan(v1.doubleValue()); + } + @ActionMethod(name="求余切") + @ActionMethodParameter(names={"数字"}) + public Number cot(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return 1/Math.tan(v1.doubleValue()); + } + @ActionMethod(name="求e为底的对数") + @ActionMethodParameter(names={"数字"}) + public Number log(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.log(v1.doubleValue()); + } + @ActionMethod(name="求10为底的对数") + @ActionMethodParameter(names={"数字"}) + public Number log10(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.log10(v1.doubleValue()); + } + + @ActionMethod(name="四舍五入") + @ActionMethodParameter(names={"数字"}) + public Number round(Object obj){ + BigDecimal v1=Utils.toBigDecimal(obj); + return Math.round(v1.doubleValue()); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/StringAction.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/StringAction.java new file mode 100644 index 0000000..61ba6a6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/builtinaction/StringAction.java @@ -0,0 +1,142 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.builtinaction; + +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年11月27日 + */ +@ActionBean(name="字符串") +public class StringAction { + @ActionMethod(name="去空格") + @ActionMethodParameter(names={"目标字符串"}) + public String trim(String str){ + if(str==null){ + return str; + } + return str.trim(); + } + + @ActionMethod(name="指定起始的字符串截取") + @ActionMethodParameter(names={"目标字符串","开始位置","结束位置"}) + public String substring(String str,int start,int end){ + if(str==null){ + return null; + } + return str.substring(start, end); + } + + @ActionMethod(name="指定开始的字符串截取") + @ActionMethodParameter(names={"目标字符串","开始位置"}) + public String substringForStart(String str,int start){ + if(str==null){ + return null; + } + return str.substring(start); + } + @ActionMethod(name="指定结束的字符串截取") + @ActionMethodParameter(names={"目标字符串","结束位置"}) + public String substringForEnd(String str,int end){ + if(str==null){ + return null; + } + return str.substring(0,end); + } + + @ActionMethod(name="转小写") + @ActionMethodParameter(names={"目标字符串"}) + public String toLowerCase(String str){ + if(str==null){ + return null; + } + return str.toLowerCase(); + } + + @ActionMethod(name="转大写") + @ActionMethodParameter(names={"目标字符串"}) + public String toUpperCase(String str){ + if(str==null){ + return null; + } + return str.toUpperCase(); + } + + @ActionMethod(name="获取长度") + @ActionMethodParameter(names={"目标字符串"}) + public Object length(String str){ + if(str==null){ + return null; + } + return str.length(); + } + + @ActionMethod(name="获取字符") + @ActionMethodParameter(names={"目标字符串","位置"}) + public Object charAt(String str,int index){ + if(str==null){ + return null; + } + return str.charAt(index); + } + + @ActionMethod(name="字符首次出现位置") + @ActionMethodParameter(names={"目标字符串","要查找的字符串"}) + public Object indexOf(String str,String targetStr){ + if(str==null){ + return null; + } + return str.indexOf(targetStr); + } + + @ActionMethod(name="字符最后出现位置") + @ActionMethodParameter(names={"目标字符串","要查找的字符串"}) + public Object lastIndexOf(String str,String targetStr){ + if(str==null){ + return null; + } + return str.lastIndexOf(targetStr); + } + + @ActionMethod(name="替换字符串") + @ActionMethodParameter(names={"目标字符串","原字符串","新字符串"}) + public String replace(String str,String oldStr,String newStr){ + if(str==null){ + return null; + } + return str.replace(oldStr, newStr); + } + @ActionMethod(name="拆分字符串为集合") + @ActionMethodParameter(names={"目标字符串","原字符串","新字符串"}) + public List split(String str,String regex){ + if(StringUtils.isBlank(str)){ + return new ArrayList(); + } + String[] arr=str.split(regex); + List list=new ArrayList(); + for(String item:arr){ + list.add(item); + } + return list; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/CacheUtils.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/CacheUtils.java new file mode 100644 index 0000000..29ef026 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/CacheUtils.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.cache; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.util.Collection; + +/** + * @author Jacky.gao + * @since 2016年12月29日 + */ +public class CacheUtils implements ApplicationContextAware{ + private static KnowledgeCache knowledgeCache; + public static KnowledgeCache getKnowledgeCache() { + return knowledgeCache; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + Collection caches=applicationContext.getBeansOfType(KnowledgeCache.class).values(); + if(caches.size()>0){ + CacheUtils.knowledgeCache=caches.iterator().next(); + }else{ + CacheUtils.knowledgeCache=new MemoryKnowledgeCache(); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/KnowledgeCache.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/KnowledgeCache.java new file mode 100644 index 0000000..719d892 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/KnowledgeCache.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.cache; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public interface KnowledgeCache { + public static final String BEAN_ID="urule.knowledgeCache"; + KnowledgePackage getKnowledge(String packageId); + void putKnowledge(String packageId,KnowledgePackage knowledgePackage); + void removeKnowledge(String packageId); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/MemoryKnowledgeCache.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/MemoryKnowledgeCache.java new file mode 100644 index 0000000..37905f7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/cache/MemoryKnowledgeCache.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.cache; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public class MemoryKnowledgeCache implements KnowledgeCache { + + private Map map = new ConcurrentHashMap(); + + @Override + public KnowledgePackage getKnowledge(String packageId) { + if (packageId.startsWith("/")) { + packageId = packageId.substring(1, packageId.length()); + } + return map.get(packageId); + } + + @Override + public void putKnowledge(String packageId, KnowledgePackage knowledgePackage) { + if (packageId.startsWith("/")) { + packageId = packageId.substring(1, packageId.length()); + } + map.put(packageId, knowledgePackage); + } + + @Override + public void removeKnowledge(String packageId) { + map.remove(packageId); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationAfterFiredEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationAfterFiredEvent.java new file mode 100644 index 0000000..529ec78 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationAfterFiredEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ActivationAfterFiredEvent extends ActivationEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationBeforeFiredEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationBeforeFiredEvent.java new file mode 100644 index 0000000..9900e87 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationBeforeFiredEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ActivationBeforeFiredEvent extends ActivationEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCancelledEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCancelledEvent.java new file mode 100644 index 0000000..777184b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCancelledEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ActivationCancelledEvent extends ActivationEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCreatedEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCreatedEvent.java new file mode 100644 index 0000000..a7565d6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationCreatedEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ActivationCreatedEvent extends ActivationEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationEvent.java new file mode 100644 index 0000000..a35ddbc --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ActivationEvent.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; + +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ActivationEvent extends KnowledgeEvent{ + Activation getActivation(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/AgendaEventListener.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/AgendaEventListener.java new file mode 100644 index 0000000..1949677 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/AgendaEventListener.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface AgendaEventListener extends KnowledgeEventListener{ + /** + * 当规则条件满足时,创建一个包装规则的Activation对象时触发 + * @param event ActivationCreatedEvent对象 + */ + void activationCreated(ActivationCreatedEvent event); + /** + * 当因某个Fact对象从WorkingMemory中删除导致某个规则条件不满足时触发 + * @param event ActivationCancelledEvent对象 + */ + void activationCancelled(ActivationCancelledEvent event); + /** + * 在执行某个满足条件的规则动作之前触发 + * @param event ActivationBeforeFiredEvent对象 + */ + void beforeActivationFired(ActivationBeforeFiredEvent event); + /** + * 在执行某个满足条件的规则动作之前触发 + * @param event ActivationAfterFiredEvent对象 + */ + void afterActivationFired(ActivationAfterFiredEvent event); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEvent.java new file mode 100644 index 0000000..a1d9467 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEvent.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface KnowledgeEvent { + KnowledgeSession getKnowledgeSession(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEventListener.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEventListener.java new file mode 100644 index 0000000..9117e5a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/KnowledgeEventListener.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface KnowledgeEventListener { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterCompletedEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterCompletedEvent.java new file mode 100644 index 0000000..afcc3a2 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterCompletedEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessAfterCompletedEvent extends ProcessEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterNodeTriggeredEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterNodeTriggeredEvent.java new file mode 100644 index 0000000..a0ec80e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterNodeTriggeredEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessAfterNodeTriggeredEvent extends ProcessNodeEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterStartedEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterStartedEvent.java new file mode 100644 index 0000000..550c586 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessAfterStartedEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessAfterStartedEvent extends ProcessEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeCompletedEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeCompletedEvent.java new file mode 100644 index 0000000..d1aec73 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeCompletedEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessBeforeCompletedEvent extends ProcessEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeNodeTriggeredEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeNodeTriggeredEvent.java new file mode 100644 index 0000000..73b656f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeNodeTriggeredEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessBeforeNodeTriggeredEvent extends ProcessNodeEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeStartedEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeStartedEvent.java new file mode 100644 index 0000000..1b6e1ab --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessBeforeStartedEvent.java @@ -0,0 +1,22 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public interface ProcessBeforeStartedEvent extends ProcessEvent { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEvent.java new file mode 100644 index 0000000..5b8c1c9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEvent.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ProcessEvent extends KnowledgeEvent{ + ProcessInstance getProcessInstance(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEventListener.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEventListener.java new file mode 100644 index 0000000..de22fe3 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessEventListener.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ProcessEventListener extends KnowledgeEventListener{ + /** + * 规则流开始之前触发 + * @param event ProcessBeforeStartedEvent对象 + */ + void beforeProcessStarted(ProcessBeforeStartedEvent event); + /** + * 规则流开始之后触发,执行完开始节点后触发 + * @param event ProcessAfterStartedEvent对象 + */ + void afterProcessStarted(ProcessAfterStartedEvent event); + /** + * 规则流结束之前触发 + * @param event ProcessBeforeCompletedEvent对象 + */ + void beforeProcessCompleted(ProcessBeforeCompletedEvent event); + /** + * 规则流结束之后触发 + * @param event ProcessAfterCompletedEvent对象 + */ + void afterProcessCompleted(ProcessAfterCompletedEvent event); + /** + * 流经规则流中每个节点前触发 + * @param event ProcessBeforeNodeTriggeredEvent对象 + */ + void beforeNodeTriggered(ProcessBeforeNodeTriggeredEvent event); + /** + * 流经规则流中每个节点后触发 + * @param event ProcessBeforeNodeTriggeredEvent对象 + */ + void afterNodeTriggered(ProcessAfterNodeTriggeredEvent event); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessNodeEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessNodeEvent.java new file mode 100644 index 0000000..8c5714e --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/ProcessNodeEvent.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public interface ProcessNodeEvent extends ProcessEvent{ + FlowNode getFlowNode(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationAfterFiredEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationAfterFiredEventImpl.java new file mode 100644 index 0000000..1d5bcbb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationAfterFiredEventImpl.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.event.ActivationAfterFiredEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ActivationAfterFiredEventImpl extends DefaultActivationEvent implements ActivationAfterFiredEvent{ + public ActivationAfterFiredEventImpl(Activation activation, + KnowledgeSession knowledgeSession) { + super(activation, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationBeforeFiredEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationBeforeFiredEventImpl.java new file mode 100644 index 0000000..7bf0cc7 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationBeforeFiredEventImpl.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.event.ActivationBeforeFiredEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ActivationBeforeFiredEventImpl extends DefaultActivationEvent implements ActivationBeforeFiredEvent{ + public ActivationBeforeFiredEventImpl(Activation activation, + KnowledgeSession knowledgeSession) { + super(activation, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCancelledEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCancelledEventImpl.java new file mode 100644 index 0000000..76741a4 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCancelledEventImpl.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.event.ActivationCancelledEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ActivationCancelledEventImpl extends DefaultActivationEvent implements ActivationCancelledEvent{ + public ActivationCancelledEventImpl(Activation activation, + KnowledgeSession knowledgeSession) { + super(activation, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCreatedEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCreatedEventImpl.java new file mode 100644 index 0000000..cd660cf --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ActivationCreatedEventImpl.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.event.ActivationCreatedEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ActivationCreatedEventImpl extends DefaultActivationEvent implements ActivationCreatedEvent{ + public ActivationCreatedEventImpl(Activation activation, + KnowledgeSession knowledgeSession) { + super(activation, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultActivationEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultActivationEvent.java new file mode 100644 index 0000000..7899f97 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultActivationEvent.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.event.ActivationEvent; + +/** + * @author Jacky.gao + * @since 2015年7月20日 + */ +public class DefaultActivationEvent implements ActivationEvent { + private Activation activation; + private KnowledgeSession knowledgeSession; + public DefaultActivationEvent(Activation activation,KnowledgeSession knowledgeSession) { + this.activation = activation; + this.knowledgeSession = knowledgeSession; + } + + @Override + public Activation getActivation() { + return activation; + } + + @Override + public KnowledgeSession getKnowledgeSession() { + return knowledgeSession; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultProcessEvent.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultProcessEvent.java new file mode 100644 index 0000000..21422e6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/DefaultProcessEvent.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.ProcessEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class DefaultProcessEvent implements ProcessEvent { + private ProcessInstance processInstance; + private KnowledgeSession knowledgeSession; + public DefaultProcessEvent(ProcessInstance processInstance,KnowledgeSession knowledgeSession) { + this.processInstance = processInstance; + this.knowledgeSession = knowledgeSession; + } + + @Override + public KnowledgeSession getKnowledgeSession() { + return knowledgeSession; + } + + @Override + public ProcessInstance getProcessInstance() { + return processInstance; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterCompletedEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterCompletedEventImpl.java new file mode 100644 index 0000000..e985253 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterCompletedEventImpl.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessAfterCompletedEventImpl extends DefaultProcessEvent { + public ProcessAfterCompletedEventImpl(ProcessInstance processInstance, + KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterNodeTriggeredEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterNodeTriggeredEventImpl.java new file mode 100644 index 0000000..9a69312 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterNodeTriggeredEventImpl.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.ProcessAfterNodeTriggeredEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessAfterNodeTriggeredEventImpl extends DefaultProcessEvent implements ProcessAfterNodeTriggeredEvent{ + private FlowNode flowNode; + public ProcessAfterNodeTriggeredEventImpl(FlowNode flowNode,ProcessInstance processInstance,KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + this.flowNode=flowNode; + } + @Override + public FlowNode getFlowNode() { + return flowNode; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterStartedEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterStartedEventImpl.java new file mode 100644 index 0000000..a6ef2ad --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessAfterStartedEventImpl.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessAfterStartedEventImpl extends DefaultProcessEvent { + public ProcessAfterStartedEventImpl(ProcessInstance processInstance, + KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeCompletedEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeCompletedEventImpl.java new file mode 100644 index 0000000..8da24dd --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeCompletedEventImpl.java @@ -0,0 +1,30 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessBeforeCompletedEventImpl extends DefaultProcessEvent { + public ProcessBeforeCompletedEventImpl(ProcessInstance processInstance, + KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeNodeTriggeredEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeNodeTriggeredEventImpl.java new file mode 100644 index 0000000..0ae6a88 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeNodeTriggeredEventImpl.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.event.ProcessBeforeNodeTriggeredEvent; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessBeforeNodeTriggeredEventImpl extends DefaultProcessEvent implements ProcessBeforeNodeTriggeredEvent{ + private FlowNode flowNode; + public ProcessBeforeNodeTriggeredEventImpl(FlowNode flowNode,ProcessInstance processInstance,KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + this.flowNode=flowNode; + } + @Override + public FlowNode getFlowNode() { + return flowNode; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeStartedEventImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeStartedEventImpl.java new file mode 100644 index 0000000..ea9860c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/event/impl/ProcessBeforeStartedEventImpl.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.event.impl; + +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; + +/** + * @author Jacky.gao + * @since 2015年7月21日 + */ +public class ProcessBeforeStartedEventImpl extends DefaultProcessEvent{ + public ProcessBeforeStartedEventImpl(ProcessInstance processInstance,KnowledgeSession knowledgeSession) { + super(processInstance, knowledgeSession); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponse.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponse.java new file mode 100644 index 0000000..f87448a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponse.java @@ -0,0 +1,28 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.response; + + +/** + * @author Jacky.gao + * @since 2015年1月27日 + */ +public interface ExecutionResponse { + /** + * @return 返回以毫秒为单位的执行时间 + */ + long getDuration(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponseImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponseImpl.java new file mode 100644 index 0000000..28b7f49 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/ExecutionResponseImpl.java @@ -0,0 +1,98 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.response; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月27日 + */ +public class ExecutionResponseImpl implements RuleExecutionResponse,FlowExecutionResponse { + private long duration; + private String flowId; + private List nodeNames=new ArrayList(); + private List ruleExecutionResponses=new ArrayList(); + private List flowExecutionResponses=new ArrayList(); + private List rulesFired; + private List matchedRules=new ArrayList(); + private List actionValues; + + @Override + public String getFlowId() { + return flowId; + } + public void setFlowId(String flowId) { + this.flowId = flowId; + } + + public void addFlowExecutionResponse(FlowExecutionResponse response) { + flowExecutionResponses.add(response); + } + + @Override + public List getFlowExecutionResponses() { + return flowExecutionResponses; + } + + @Override + public List getRuleExecutionResponses() { + return ruleExecutionResponses; + } + + public void addRuleExecutionResponse(RuleExecutionResponse response) { + ruleExecutionResponses.add(response); + } + + @Override + public List getNodeNames() { + return nodeNames; + } + + public void addNodeName(String nodeName) { + nodeNames.add(nodeName); + } + + @Override + public List getActionValues() { + return actionValues; + } + public void setActionValues(List actionValues) { + this.actionValues = actionValues; + } + public long getDuration() { + return duration; + } + public void setDuration(long duration) { + this.duration = duration; + } + public List getMatchedRules() { + return matchedRules; + } + public void addMatchedRules(List matchedRules){ + this.matchedRules.addAll(matchedRules); + } + public List getFiredRules() { + return rulesFired; + } + public void setFiredRules(List rulesFired) { + this.rulesFired = rulesFired; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/FlowExecutionResponse.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/FlowExecutionResponse.java new file mode 100644 index 0000000..93e4ee9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/FlowExecutionResponse.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.response; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月7日 + */ +public interface FlowExecutionResponse extends ExecutionResponse{ + /** + * @return 返回执行的决策流ID + */ + String getFlowId(); + /** + * @return 返回当前决策流经过的节点名称列表 + */ + List getNodeNames(); + /** + * @return 返回规则集执行信息 + */ + List getRuleExecutionResponses(); + /** + * @return 返回决策流执行信息 + */ + List getFlowExecutionResponses(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/RuleExecutionResponse.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/RuleExecutionResponse.java new file mode 100644 index 0000000..5fcdaae --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/response/RuleExecutionResponse.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.response; + +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年9月7日 + */ +public interface RuleExecutionResponse extends ExecutionResponse { + /** + * @return 返回所有触发的规则对象信息 + */ + List getFiredRules(); + /** + * @return 返回所有匹配的规则对象信息 + */ + List getMatchedRules(); + /** + * @return 返回匹配规则动作执行时返回的结果(如果有定义返回值的话) + */ + List getActionValues(); + /** + * @return 返回决策流执行信息 + */ + List getFlowExecutionResponses(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AbstractActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AbstractActivity.java new file mode 100644 index 0000000..a1eb4de --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AbstractActivity.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public abstract class AbstractActivity implements Activity { + private List paths; + public List getPaths() { + return paths; + } + public void addPath(Path path){ + if(paths==null){ + paths=new ArrayList(); + } + this.paths.add(path); + } + protected List visitPahs(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap){ + if(paths==null || paths.size()==0){ + return null; + } + List trackers=null; + int size=paths.size(); + for(Path path:paths){ + Collection results=null; + Activity activity=path.getTo(); + path.setPassed(true); + if(size>0){ + Map newVariableMap=new HashMap(); + newVariableMap.putAll(variableMap); + results=activity.enter(context, obj, tracker.newSubFactTracker(),newVariableMap); + }else{ + results=activity.enter(context, obj, tracker,variableMap); + } + if(results!=null){ + if(trackers==null){ + trackers=new ArrayList(); + } + trackers.addAll(results); + } + } + return trackers; + } + public abstract boolean orNodeIsPassed(); + public abstract void reset(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Activity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Activity.java new file mode 100644 index 0000000..49fd9c1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Activity.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月12日 + */ +public interface Activity extends Instance{ + List getPaths(); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AndActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AndActivity.java new file mode 100644 index 0000000..6509a16 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/AndActivity.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriteria; + +import java.util.*; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class AndActivity extends JoinActivity { + private List fromPaths=new ArrayList(); + private boolean pass; + private FactTracker currentTracker; + private Map>> toActivityMap=new HashMap>>(); + + public Collection enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + Activity prevActivity=context.getPrevActivity(); + if(prevActivity!=null){ + if(toActivityMap.containsKey(prevActivity)){ + List> variableList=toActivityMap.get(prevActivity); + if(pass){ + variableList.clear(); + } + variableList.add(variableMap); + }else{ + List> variableList=new ArrayList>(); + variableList.add(variableMap); + toActivityMap.put(prevActivity, variableList); + } + } + if(currentTracker!=null){ + Map> map=tracker.getObjectCriteriaMap(); + Map> currentMap=currentTracker.getObjectCriteriaMap(); + for(Object key:currentMap.keySet()){ + if(map.containsKey(key)){ + continue; + } + map.put(key, currentMap.get(key)); + } + } + currentTracker=tracker; + if(isAllPassed()){ + context.setPrevActivity(this); + pass=true; + List allTrackers=new ArrayList(); + List> list=buildPathVariableMaps(); + for(Map varMap:list){ + List trackers=visitPahs(context,obj,tracker,varMap); + if(trackers!=null && trackers.size()>0){ + allTrackers.addAll(trackers); + } + } + return allTrackers; + } + return null; + } + + private boolean isAllPassed(){ + boolean passed=true; + for(Path path:fromPaths){ + if(!path.isPassed()){ + passed=false; + break; + } + } + return passed; + } + + public void addFromPath(Path fromPath){ + fromPaths.add(fromPath); + } + + private List> buildPathVariableMaps(){ + List> result=new ArrayList>(); + Iterator>> iter=toActivityMap.values().iterator(); + while(iter.hasNext()){ + List> list1=iter.next(); + result=buildVariableMaps(list1,result); + } + return result; + } + + private static List> buildVariableMaps(List> list1,List> list2){ + List> resultList=new ArrayList>(); + for(Map map1:list1){ + if(list2.size()==0){ + resultList.add(map1); + }else{ + for(Map map2:list2){ + Map newMap=new HashMap(); + newMap.putAll(map1); + newMap.putAll(map2); + resultList.add(newMap); + } + } + } + return resultList; + } + + @Override + public boolean orNodeIsPassed() { + return false; + } + + @Override + public void reset() { + toActivityMap.clear(); + pass=false; + currentTracker=null; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Context.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Context.java new file mode 100644 index 0000000..97e9acf --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Context.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.debug.MessageItem; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; +import com.itheima.sfbx.framework.rule.runtime.assertor.AssertorEvaluator; +import org.springframework.context.ApplicationContext; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public interface Context { + AssertorEvaluator getAssertorEvaluator(); + ValueCompute getValueCompute(); + ApplicationContext getApplicationContext(); + String getVariableCategoryClass(String variableCategory); + WorkingMemory getWorkingMemory(); + Object parseExpression(String expression); + List getDebugMessageItems(); + void debugMsg(String msg,MsgType type,boolean debug); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ContextImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ContextImpl.java new file mode 100644 index 0000000..aedbbb5 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ContextImpl.java @@ -0,0 +1,97 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MessageItem; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.runtime.ElCalculator; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; +import com.itheima.sfbx.framework.rule.runtime.assertor.AssertorEvaluator; +import org.apache.commons.lang.StringUtils; +import org.springframework.context.ApplicationContext; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class ContextImpl implements Context { + private ApplicationContext applicationContext; + private AssertorEvaluator assertorEvaluator; + private Map variableCategoryMap; + private ValueCompute valueCompute; + private WorkingMemory workingMemory; + private List debugMessageItems; + private ElCalculator elCalculator=new ElCalculator(); + public ContextImpl(WorkingMemory workingMemory,ApplicationContext applicationContext,Map variableCategoryMap,List debugMessageItems) { + this.workingMemory=workingMemory; + this.applicationContext = applicationContext; + this.assertorEvaluator=(AssertorEvaluator)applicationContext.getBean(AssertorEvaluator.BEAN_ID); + this.variableCategoryMap=variableCategoryMap; + this.debugMessageItems=debugMessageItems; + this.valueCompute=(ValueCompute)applicationContext.getBean(ValueCompute.BEAN_ID); + } + @Override + public WorkingMemory getWorkingMemory() { + return workingMemory; + } + + public ApplicationContext getApplicationContext() { + return applicationContext; + } + public AssertorEvaluator getAssertorEvaluator() { + return assertorEvaluator; + } + + @Override + public Object parseExpression(String expression) { + return elCalculator.eval(expression); + } + + @Override + public void debugMsg(String msg, MsgType type, boolean enableDebug) { + if(!Utils.isDebug() || !enableDebug){ + return; + } + if(!Utils.isDebugToFile()){ + System.out.println(msg); + return; + } + MessageItem item=new MessageItem(msg,type); + debugMessageItems.add(item); + } + + @Override + public List getDebugMessageItems() { + return debugMessageItems; + } + + public String getVariableCategoryClass(String variableCategory) { + String clazz=variableCategoryMap.get(variableCategory); + if(StringUtils.isEmpty(clazz)){ + //throw new RuleException("Variable category ["+variableCategory+"] not exist."); + clazz=HashMap.class.getName(); + } + return clazz; + } + public ValueCompute getValueCompute() { + return valueCompute; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaActivity.java new file mode 100644 index 0000000..d14bdd8 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaActivity.java @@ -0,0 +1,94 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; +import com.itheima.sfbx.framework.rule.model.rule.lhs.EvaluateResponse; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class CriteriaActivity extends AbstractActivity { + protected Criteria criteria; + private boolean pass; + private boolean debug; + public CriteriaActivity(Criteria criteria,boolean debug){ + this.criteria=criteria; + this.debug=debug; + } + public List enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + if(pass){ + return null; + } + if(orNodeIsPassed()){ + return null; + } + List allMatchedObjects=new ArrayList(); + EvaluateResponse response=criteria.evaluate(context, obj,allMatchedObjects); + boolean result=response.getResult(); + doDebug(response,context); + if(result){ + context.setPrevActivity(this); + pass=true; + tracker.addObjectCriteria(obj, criteria); + for(Object object:allMatchedObjects){ + tracker.addObjectCriteria(object, criteria); + } + return visitPahs(context,obj,tracker,variableMap); + } + return null; + } + + private void doDebug(EvaluateResponse response,Context context){ + if(!debug || !Utils.isDebug()){ + return; + } + String id=criteria.getId(); + StringBuffer sb=new StringBuffer(); + sb.append("^^^条件:"+id); + String result=response.getResult() ? "满足" : "不满足"; + sb.append(" =>"+result); + sb.append(", 左值:"+(response.getLeftResult()==null ? "null" : response.getLeftResult())); + sb.append(", 右值:"+(response.getRightResult()==null ? "null" : response.getRightResult())); + context.debugMsg(sb.toString(), MsgType.Condition, debug); + } + + @Override + public boolean orNodeIsPassed() { + List paths=getPaths(); + if(paths!=null){ + if(paths.size()>1){ + return false; + }else if(paths.size()==1){ + Path path=paths.get(0); + AbstractActivity activity=(AbstractActivity)path.getTo(); + return activity.orNodeIsPassed(); + } + } + return false; + } + @Override + public void reset() { + pass=false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaJoinActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaJoinActivity.java new file mode 100644 index 0000000..b5ee9db --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/CriteriaJoinActivity.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.model.rule.lhs.Criteria; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月20日 + */ +public class CriteriaJoinActivity extends CriteriaActivity { + public CriteriaJoinActivity(Criteria criteria) { + super(criteria,false); + } + + @Override + public List enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + return super.enter(context, obj,tracker,variableMap); + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContext.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContext.java new file mode 100644 index 0000000..5bf1e06 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContext.java @@ -0,0 +1,26 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + + +/** + * @author Jacky.gao + * @since 2015年3月9日 + */ +public interface EvaluationContext extends Context { + Activity getPrevActivity(); + void setPrevActivity(Activity activity); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContextImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContextImpl.java new file mode 100644 index 0000000..330f14f --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/EvaluationContextImpl.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.debug.MessageItem; +import com.itheima.sfbx.framework.rule.runtime.WorkingMemory; +import org.springframework.context.ApplicationContext; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年3月9日 + */ +public class EvaluationContextImpl extends ContextImpl implements EvaluationContext { + private Activity prevActivity; + public EvaluationContextImpl(WorkingMemory workingMemory, + ApplicationContext applicationContext, + Map variableCategoryMap,List debugMessageItems) { + super(workingMemory, applicationContext, variableCategoryMap,debugMessageItems); + } + @Override + public Activity getPrevActivity() { + return prevActivity; + } + @Override + public void setPrevActivity(Activity activity) { + this.prevActivity=activity; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/FactTracker.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/FactTracker.java new file mode 100644 index 0000000..f3bec43 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/FactTracker.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.rule.lhs.BaseCriteria; +import com.itheima.sfbx.framework.rule.runtime.agenda.Activation; +import com.itheima.sfbx.framework.rule.runtime.agenda.ActivationImpl; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年8月2日 + */ +public class FactTracker { + private Activation activation; + private Map> objectCriteriaMap=new HashMap>(); + public Activation getActivation() { + return activation; + } + public void setActivation(Activation activation) { + ActivationImpl ac=(ActivationImpl)activation; + ac.setObjectCriteriaMap(objectCriteriaMap); + this.activation = activation; + } + public Map> getObjectCriteriaMap() { + return objectCriteriaMap; + } + public void addObjectCriteria(Object obj, BaseCriteria criteria) { + if(obj instanceof HashMap && !(obj instanceof GeneralEntity)){ + obj=HashMap.class.getName(); + } + if(objectCriteriaMap.containsKey(obj)){ + List list=objectCriteriaMap.get(obj); + if(!list.contains(criteria)){ + list.add(criteria); + } + }else{ + List list=new ArrayList(); + list.add(criteria); + objectCriteriaMap.put(obj, list); + } + } + public FactTracker newSubFactTracker(){ + FactTracker tracker=new FactTracker(); + tracker.getObjectCriteriaMap().putAll(objectCriteriaMap); + return tracker; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Instance.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Instance.java new file mode 100644 index 0000000..8fea465 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Instance.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import java.util.Collection; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月9日 + */ +public interface Instance { + Collection enter(EvaluationContext context,Object obj,FactTracker tracker,Map variableMap); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/JoinActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/JoinActivity.java new file mode 100644 index 0000000..8ef33cf --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/JoinActivity.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + + +/** + * @author Jacky.gao + * @since 2015年1月9日 + */ +public abstract class JoinActivity extends AbstractActivity { +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/NamedCriteriaActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/NamedCriteriaActivity.java new file mode 100644 index 0000000..720f10d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/NamedCriteriaActivity.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.rule.lhs.EvaluateResponse; +import com.itheima.sfbx.framework.rule.model.rule.lhs.NamedCriteria; +import org.apache.commons.lang.StringUtils; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class NamedCriteriaActivity extends AbstractActivity{ + protected NamedCriteria criteria; + private boolean pass; + private boolean debug; + public NamedCriteriaActivity(NamedCriteria criteria,boolean debug){ + this.criteria=criteria; + this.debug=debug; + } + public List enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + String referenceName=criteria.getReferenceName(); + if(pass){ + if(StringUtils.isBlank(referenceName) || variableMap.containsKey(referenceName)){ + return null; + } + } + List allMatchedObjects=new ArrayList(); + EvaluateResponse response=criteria.evaluate(context,obj,allMatchedObjects); + boolean result=response.getResult(); + doDebug(response,context); + if(result){ + if(StringUtils.isNotBlank(referenceName)){ + variableMap.put(referenceName,obj); + } + context.setPrevActivity(this); + pass=true; + tracker.addObjectCriteria(obj, criteria); + for(Object object:allMatchedObjects){ + tracker.addObjectCriteria(object, criteria); + } + return visitPahs(context,obj,tracker,variableMap); + } + return null; + } + + private void doDebug(EvaluateResponse response,Context context){ + if(!debug || !Utils.isDebug()){ + return; + } + String id=criteria.getId(); + StringBuffer sb=new StringBuffer(); + sb.append("^^^命名条件:"+id); + String result=response.getResult() ? "满足" : "不满足"; + sb.append(" =>"+result); + System.out.println(sb.toString()); + context.debugMsg(sb.toString(), MsgType.Condition, debug); + } + + @Override + public boolean orNodeIsPassed() { + return false; + } + @Override + public void reset() { + pass=false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ObjectTypeActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ObjectTypeActivity.java new file mode 100644 index 0000000..aedf20d --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ObjectTypeActivity.java @@ -0,0 +1,70 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.model.GeneralEntity; + +import java.util.Collection; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月9日 + */ +public class ObjectTypeActivity extends AbstractActivity { + private Class typeClass; + private String clazz; + public ObjectTypeActivity(String clazz){ + this.clazz=clazz; + } + public ObjectTypeActivity(Class typeClass){ + this.typeClass=typeClass; + } + public Collection enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + return visitPahs(context,obj,tracker,variableMap); + } + public boolean support(Object object){ + if(typeClass==null && clazz==null){ + return true; + } + if(object instanceof GeneralEntity){ + GeneralEntity generalEntity=(GeneralEntity)object; + String targetClass=generalEntity.getTargetClass(); + if(clazz!=null){ + if(targetClass.equals(clazz)){ + return true; + } + }else{ + if(targetClass.equals(typeClass.getName())){ + return true; + } + } + }else if(typeClass!=null){ + Class c=object.getClass(); + if(typeClass.isAssignableFrom(c) || typeClass.getName().equals(c.getName())){ + return true; + } + } + return false; + } + @Override + public boolean orNodeIsPassed() { + return false; + } + @Override + public void reset() { + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/OrActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/OrActivity.java new file mode 100644 index 0000000..00d042b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/OrActivity.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class OrActivity extends JoinActivity { + private boolean pass; + public List enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + if(pass && variableMap.size()==0){ + return null; + } + context.setPrevActivity(this); + pass=true; + return visitPahs(context,obj,tracker,variableMap); + } + @Override + public boolean orNodeIsPassed() { + return pass; + } + @Override + public void reset(){ + pass=false; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Path.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Path.java new file mode 100644 index 0000000..3b1c21a --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/Path.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class Path { + private boolean passed; + private Activity to; + public Path(Activity to) { + this.to = to; + if(to instanceof AndActivity){ + AndActivity andActivity=(AndActivity)to; + andActivity.addFromPath(this); + } + } + public Activity getTo() { + return to; + } + public boolean isPassed() { + return passed; + } + public void setPassed(boolean passed) { + this.passed = passed; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ReteInstance.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ReteInstance.java new file mode 100644 index 0000000..2205109 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ReteInstance.java @@ -0,0 +1,87 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class ReteInstance{ + private List objectTypeActivities; + public ReteInstance(List objectTypeActivities) { + this.objectTypeActivities=objectTypeActivities; + } + public Collection enter(EvaluationContext context, Object obj) { + Collection trackers=null; + for(ObjectTypeActivity objectTypeActivity:objectTypeActivities){ + if(objectTypeActivity.support(obj)){ + Collection result=objectTypeActivity.enter(context,obj,new FactTracker(),new HashMap()); + if(result!=null){ + if(trackers==null){ + trackers=result; + }else{ + trackers.addAll(result); + } + } + } + } + return trackers; + } + public List getObjectTypeActivities() { + return objectTypeActivities; + } + public void reset(){ + for(ObjectTypeActivity objectTypeActivity:objectTypeActivities){ + List paths=objectTypeActivity.getPaths(); + resetActivities(paths,false); + } + } + public void resetForReevaluate(Object valuateObj){ + for(ObjectTypeActivity objectTypeActivity:objectTypeActivities){ + if(objectTypeActivity.support(valuateObj)){ + List paths=objectTypeActivity.getPaths(); + resetActivities(paths,true); + } + } + } + private void resetActivities(List paths,boolean forReevaluate){ + if(paths==null)return; + for(Path path:paths){ + path.setPassed(false); + Activity activity=path.getTo(); + if(forReevaluate){ + if(activity instanceof OrActivity){ + OrActivity ac=(OrActivity)activity; + ac.reset(); + } + if(activity instanceof CriteriaActivity){ + CriteriaActivity ac=(CriteriaActivity)activity; + ac.reset(); + } + }else{ + if(activity instanceof AbstractActivity){ + AbstractActivity ac=(AbstractActivity)activity; + ac.reset(); + } + } + resetActivities(activity.getPaths(),forReevaluate); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/TerminalActivity.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/TerminalActivity.java new file mode 100644 index 0000000..16ebf5c --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/TerminalActivity.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.debug.MsgType; +import com.itheima.sfbx.framework.rule.model.rule.Rule; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.agenda.ActivationImpl; +import com.itheima.sfbx.framework.rule.runtime.event.impl.ActivationCreatedEventImpl; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月8日 + */ +public class TerminalActivity extends AbstractActivity { + private Rule rule; + public TerminalActivity(Rule rule) { + this.rule = rule; + } + public Collection enter(EvaluationContext context, Object obj,FactTracker tracker,Map variableMap) { + List result=new ArrayList(); + ActivationImpl ac=new ActivationImpl(rule,variableMap); + tracker.setActivation(ac); + result.add(tracker); + KnowledgeSession session = (KnowledgeSession)context.getWorkingMemory(); + session.fireEvent(new ActivationCreatedEventImpl(ac,session)); + if(rule.getDebug()!=null){ + String msg="√√√规则【"+rule.getName()+"】成功匹配"; + context.debugMsg(msg, MsgType.RuleMatch, rule.getDebug()); + } + return result; + } + @Override + public boolean orNodeIsPassed() { + return false; + } + @Override + public void reset() { + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ValueCompute.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ValueCompute.java new file mode 100644 index 0000000..7704403 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/rete/ValueCompute.java @@ -0,0 +1,249 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.rete; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.action.ActionValue; +import com.itheima.sfbx.framework.rule.action.ExecuteMethodAction; +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.function.Argument; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rule.*; +import com.itheima.sfbx.framework.rule.model.rule.lhs.CommonFunctionParameter; + +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2014年12月29日 + */ +public class ValueCompute { + public static final String BEAN_ID="urule.valueCompute"; + public Object complexValueCompute(Value value,Object matchedObject,Context context,List allMatchedObjects,Map variableMap){ + return compute(value,context,matchedObject,allMatchedObjects,variableMap); + } + public Object simpleArithmeticCompute(Context context,Object leftObj,SimpleArithmetic simpleArithmetic){ + String expr=null; + if(!(leftObj instanceof Number)){ + expr="\""+leftObj+"\""; + }else{ + expr=leftObj.toString(); + } + while(simpleArithmetic!=null){ + ArithmeticType type=simpleArithmetic.getType(); + SimpleArithmeticValue nextValue=simpleArithmetic.getValue(); + expr+=type.toString()+"\""+nextValue.getContent()+"\""; + simpleArithmetic=nextValue.getArithmetic(); + } + return context.parseExpression(expr); + } + + private Object compute(Value value,Context context,Object matchedFact,List allMatchedObjects,Map variableMap){ + Object leftObj=fetchValue(value,context,matchedFact,allMatchedObjects,variableMap); + ComplexArithmetic arithmetic=value.getArithmetic(); + if(arithmetic==null){ + return leftObj; + } + StringBuffer expr=new StringBuffer(); + addToExpr(expr, leftObj); + while(arithmetic!=null){ + ArithmeticType type=arithmetic.getType(); + addToExpr(expr, type); + AbstractValue rightValue=(AbstractValue)arithmetic.getValue(); + if(rightValue instanceof ParenValue){ + ParenValue pv=(ParenValue)rightValue; + Object obj=compute(pv.getValue(), context,matchedFact,allMatchedObjects,variableMap); + addToExpr(expr, obj); + }else{ + Object rightObj=fetchValue(rightValue, context,matchedFact,allMatchedObjects,variableMap); + if(rightObj==null){ + rightObj="null"; + } + addToExpr(expr, rightObj); + } + arithmetic=rightValue.getArithmetic(); + } + return context.parseExpression(expr.toString()); + } + + private void addToExpr(StringBuffer expr,Object obj){ + expr.append(" "); + if(obj instanceof ArithmeticType){ + expr.append(obj.toString()); + }else if(obj instanceof Number){ + expr.append(obj.toString()); + }else{ + expr.append("\""+obj+"\""); + } + expr.append(" "); + } + + private Object fetchValue(Value value,Context context,Object matchedFact,List allMatchedObjects,Map variableMap){ + Object left=null; + ValueType type=value.getValueType(); + if(type.equals(ValueType.Input)){ + left=((SimpleValue)value).getContent(); + }else if(type.equals(ValueType.Constant)){ + ConstantValue cv=(ConstantValue)value; + left=cv.getConstantName(); + }else if(type.equals(ValueType.VariableCategory)){ + VariableCategoryValue vc=(VariableCategoryValue)value; + String categoryName=vc.getVariableCategory(); + return findObject(context, matchedFact, categoryName,allMatchedObjects); + }else if(type.equals(ValueType.Parameter)){ + ParameterValue pv=(ParameterValue)value; + String categoryName=VariableCategory.PARAM_CATEGORY; + Object object = findObject(context, matchedFact, categoryName,allMatchedObjects); + if(object==null){ + return null; + } + String property=pv.getVariableName(); + left=Utils.getObjectProperty(object, property); + }else if(type.equals(ValueType.Method)){ + MethodValue mv=(MethodValue)value; + ExecuteMethodAction action=new ExecuteMethodAction(); + action.setBeanId(mv.getBeanId()); + action.setBeanLabel(mv.getBeanLabel()); + action.setMethodName(mv.getMethodName()); + action.setMethodLabel(mv.getMethodLabel()); + action.setParameters(mv.getParameters()); + ActionValue actionValue=action.execute(context, matchedFact,allMatchedObjects,variableMap); + if(actionValue!=null){ + left=actionValue.getValue(); + }else{ + left=null; + } + }else if(type.equals(ValueType.CommonFunction)){ + CommonFunctionValue v=(CommonFunctionValue)value; + CommonFunctionParameter functionParameter=v.getParameter(); + Value propertyValue=functionParameter.getObjectParameter(); + Object object=this.complexValueCompute(propertyValue, matchedFact, context, allMatchedObjects,variableMap); + FunctionDescriptor fun=Utils.findFunctionDescriptor(v.getName()); + Argument arg=fun.getArgument(); + String property=null; + if(arg.isNeedProperty()){ + property=functionParameter.getProperty(); + } + left=fun.doFunction(object, property,context.getWorkingMemory()); + }else if(type.equals(ValueType.Paren)){ + ParenValue parenValue=(ParenValue)value; + left=compute(parenValue.getValue(), context,matchedFact,allMatchedObjects,variableMap); + }else if(type.equals(ValueType.NamedReference)){ + NamedReferenceValue namedValue=(NamedReferenceValue)value; + String prop=namedValue.getPropertyName(); + String refName=namedValue.getReferenceName(); + if(variableMap==null){ + throw new RuleException("Reference ["+refName+"] not define"); + } + Object obj=variableMap.get(refName); + if(obj==null){ + refName=refName.substring(1,refName.length()); + obj=variableMap.get(refName); + } + if(obj==null){ + throw new RuleException("Reference ["+refName+"] not define"); + } + if(prop!=null){ + left=Utils.getObjectProperty(obj, prop); + }else{ + left=obj; + } + }else{ + VariableValue vv=(VariableValue)value; + String categoryName=vv.getVariableCategory(); + Object object = findObject(context, matchedFact, categoryName,allMatchedObjects); + if(object==null){ + return null; + } + String property=vv.getVariableName(); + left=Utils.getObjectProperty(object, property); + } + return left; + } + + + private Object findObject(Context context,Object matchedFact, String categoryName,List allMatchedObjects) { + String className=context.getVariableCategoryClass(categoryName); + Object object = findObject(className, matchedFact,context); + if(allMatchedObjects!=null && object!=null && !allMatchedObjects.contains(object)){ + allMatchedObjects.add(object); + } + return object; + } + @SuppressWarnings("rawtypes") + public Object findObject(String className,Object matchedFact,Context context) { + if(className.equals(Map.class.getName())||className.equals(HashMap.class.getName())){ + return context.getWorkingMemory().getParameters(); + } + if(matchedFact instanceof Collection){ + Collection coll=(Collection)matchedFact; + for(Object obj:coll){ + if(obj.getClass().getName().equals(className)){ + return obj; + }else if(obj instanceof GeneralEntity){ + GeneralEntity entity=(GeneralEntity)obj; + if(entity.getTargetClass().equals(className)){ + return obj; + } + } + } + }else{ + if(matchedFact.getClass().getName().equals(className)){ + return matchedFact; + }else if(matchedFact instanceof GeneralEntity){ + GeneralEntity entity=(GeneralEntity)matchedFact; + if(entity.getTargetClass().equals(className)){ + return matchedFact; + } + } + } + Object object=null; + List allFacts=context.getWorkingMemory().getAllFacts(); + for(Object obj:allFacts){ + if(obj.getClass().getName().equals(className)){ + object = obj; + break; + }else if(obj instanceof GeneralEntity){ + GeneralEntity entity=(GeneralEntity)obj; + if(entity.getTargetClass().equals(className)){ + object = obj; + break; + } + } + } + if(object==null){ + allFacts=context.getWorkingMemory().getHistoryFacts(); + for(Object obj:allFacts){ + if(obj.getClass().getName().equals(className)){ + object = obj; + break; + }else if(obj instanceof GeneralEntity){ + GeneralEntity entity=(GeneralEntity)obj; + if(entity.getTargetClass().equals(className)){ + object = obj; + break; + } + } + } + } + return object; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgePackageService.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgePackageService.java new file mode 100644 index 0000000..aaa67eb --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgePackageService.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.service; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; + +import java.io.IOException; + +/** + * @author Jacky.gao + * @since 2015年3月20日 + */ +public interface KnowledgePackageService { + public static final String BEAN_ID="urule.knowledgePackageService"; + KnowledgePackage buildKnowledgePackage(String packageInfo) throws IOException; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeService.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeService.java new file mode 100644 index 0000000..d031ce1 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeService.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.service; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; + +import java.io.IOException; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public interface KnowledgeService { + public static final String BEAN_ID="urule.knowledgeService"; + /** + * 根据给定的资源包ID获取对应的KnowledgePackage对象 + * @param packageId 资源包ID + * @return 返回与给定的资源包ID获取对应的KnowledgePackage对象 + * @throws IOException 抛出IO异常 + */ + KnowledgePackage getKnowledge(String packageId) throws IOException; + /** + * 根据给定的一个或多个资源包ID获取对应的KnowledgePackage对象的集合 + * @param packageIds 资源包ID数组 + * @return 返回与给定的一个或多个资源包ID获取对应的KnowledgePackage对象集合 + * @throws IOException 抛出IO异常 + */ + KnowledgePackage[] getKnowledges(String[] packageIds) throws IOException; +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeServiceImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeServiceImpl.java new file mode 100644 index 0000000..78a47f9 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/KnowledgeServiceImpl.java @@ -0,0 +1,115 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.service; + + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.cache.CacheUtils; +import org.apache.commons.lang.StringUtils; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import java.io.IOException; +import java.util.logging.Logger; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public class KnowledgeServiceImpl implements KnowledgeService,ApplicationContextAware { + private long knowledgeUpdateCycle; + private RemoteService remoteService; + private KnowledgePackageService knowledgePackageService; + private Logger log=Logger.getLogger(KnowledgeServiceImpl.class.getName()); + @Override + public KnowledgePackage[] getKnowledges(String[] packageIds) throws IOException{ + KnowledgePackage[] packages=new KnowledgePackage[packageIds.length]; + for(int i=0;i=knowledgeUpdateCycle){ + KnowledgePackage remoteKnowledgePackage=remoteService.getKnowledge(packageId, String.valueOf(knowledgePackage.getTimestamp())); + if(remoteKnowledgePackage==null){ + //表示repository中knowledgepackage与本地的比较无更新 + log.info("Not need update remote knowledgepackage."); + knowledgePackage.resetTimestamp(); + CacheUtils.getKnowledgeCache().putKnowledge(packageId, knowledgePackage); + }else{ + log.info("Need update remote knowledgepackage."); + remoteKnowledgePackage.resetTimestamp(); + CacheUtils.getKnowledgeCache().putKnowledge(packageId, remoteKnowledgePackage); + } + } + } + return knowledgePackage; + } + + private KnowledgePackage fetchKnowledgePackage(String packageId) throws IOException{ + KnowledgePackage knowledgePackage=remoteService.getKnowledge(packageId, null); + if(knowledgePackage==null){ + //表示无法连接远程server. + if(knowledgePackageService==null){ + throw new RuleException("Remote service and local KnowledgePackageService all unavailable"); + }else{ + knowledgePackage=knowledgePackageService.buildKnowledgePackage(packageId); + } + } + return knowledgePackage; + } + public void setRemoteService(RemoteService remoteService) { + this.remoteService = remoteService; + } + public void setKnowledgeUpdateCycle(String knowledgeUpdateCycle) { + if(StringUtils.isEmpty(knowledgeUpdateCycle) || knowledgeUpdateCycle.equals("${urule.knowledgeUpdateCycle}")){ + return; + } + this.knowledgeUpdateCycle = Long.valueOf(knowledgeUpdateCycle); + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + boolean hasBean=applicationContext.containsBean(KnowledgePackageService.BEAN_ID); + if(hasBean){ + knowledgePackageService=(KnowledgePackageService)applicationContext.getBean(KnowledgePackageService.BEAN_ID); + } + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteService.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteService.java new file mode 100644 index 0000000..07fb996 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteService.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.service; + +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public interface RemoteService { + public static final String BEAN_ID="urule.remoteService"; + KnowledgePackage getKnowledge(String packageId,String timestamp); +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteServiceImpl.java b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteServiceImpl.java new file mode 100644 index 0000000..fa5f71b --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/java/com/itheima/sfbx/framework/rule/runtime/service/RemoteServiceImpl.java @@ -0,0 +1,130 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.framework.rule.runtime.service; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.rete.JsonUtils; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import org.apache.commons.lang.StringUtils; + +import java.io.*; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Map; +import java.util.logging.Logger; + +/** + * @author Jacky.gao + * @since 2015年1月28日 + */ +public class RemoteServiceImpl implements RemoteService{ + private String resporityServerUrl; + private Logger log=Logger.getLogger(RemoteServiceImpl.class.getName()); + public KnowledgePackage getKnowledge(String packageId, String timestamp) { + if(StringUtils.isEmpty(resporityServerUrl)){ + return null; + } + log.info("Load knowledgepackage from remote..."); + String content=sendRequest(packageId, timestamp); + if(StringUtils.isEmpty(content)){ + return null; + } + KnowledgePackageWrapper wrapper=JsonUtils.parseKnowledgePackageWrapper(content); + KnowledgePackage knowledgePackage=wrapper.getKnowledgePackage(); + Map flowMap=knowledgePackage.getFlowMap(); + if(flowMap!=null && flowMap.size()>0){ + for(FlowDefinition fd:flowMap.values()){ + fd.buildConnectionToNode(); + } + } + return knowledgePackage; + } + private String sendRequest(String packageId, String timestamp) { + HttpURLConnection connection=null; + OutputStreamWriter writer=null; + InputStream inputStream=null; + InputStreamReader inputStreamReader=null; + BufferedReader bufferedReader=null; + try { + packageId=Utils.encodeURL(packageId); + packageId=Utils.encodeURL(packageId); + String content="packageId="+packageId+""; + if(StringUtils.isNotEmpty(timestamp)){ + content+="×tamp="+timestamp+""; + } + URL url=new URL(resporityServerUrl); + connection=(HttpURLConnection)url.openConnection(); + connection.setRequestMethod("POST"); + connection.setRequestProperty("Accept-Charset", "utf-8"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setRequestProperty("Content-Length", String.valueOf(content.length())); + connection.setUseCaches(false); + connection.setDoOutput(true); + connection.connect(); + writer=new OutputStreamWriter(connection.getOutputStream()); + writer.write(content); + writer.flush(); + if (connection.getResponseCode() != 200) { + throw new RuleException("Server request was failed, Response message : " + connection.getResponseMessage()); + } + inputStream=connection.getInputStream(); + inputStreamReader=new InputStreamReader(inputStream,"utf-8"); + bufferedReader=new BufferedReader(inputStreamReader); + String line=null; + StringBuilder sb=new StringBuilder(); + while ((line = bufferedReader.readLine()) != null) { + sb.append(line); + } + return sb.toString(); + } catch (Exception e) { + throw new RuleException(e); + } finally { + try { + if(writer!=null){ + writer.close(); + } + if(bufferedReader!=null){ + bufferedReader.close(); + } + if(inputStreamReader!=null){ + inputStreamReader.close(); + } + if(inputStream!=null){ + inputStream.close(); + } + } catch (IOException e) { + e.printStackTrace(); + } + if(connection!=null){ + connection.disconnect(); + } + } + } + public void setResporityServerUrl(String resporityServerUrl) { + if(StringUtils.isEmpty(resporityServerUrl) || resporityServerUrl.equals("urule.resporityServerUrl")){ + return; + } + if(resporityServerUrl.endsWith("/")){ + resporityServerUrl+="urule/loadknowledge"; + }else{ + resporityServerUrl+="/urule/loadknowledge"; + } + this.resporityServerUrl = resporityServerUrl; + } +} diff --git a/day02/sfbx-framework/framework-rule-base/src/main/resources/rule.xsd b/day02/sfbx-framework/framework-rule-base/src/main/resources/rule.xsd new file mode 100644 index 0000000..95054e6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/resources/rule.xsd @@ -0,0 +1,838 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.properties b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.properties new file mode 100644 index 0000000..5bf6a57 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.properties @@ -0,0 +1,8 @@ +urule.repository.dir=/ +#urule.repository.dir=/home/ +urule.repository.xml= +urule.decisionTree.style=new +urule.welcomePage= +urule.console.title=URule Console +urule.repository.datasourcename= +urule.repository.databasetype= diff --git a/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.xml b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.xml new file mode 100644 index 0000000..fd8adf6 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-console-context.xml @@ -0,0 +1,113 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + classpath:urule-console-context.properties + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.properties b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.properties new file mode 100644 index 0000000..5153049 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.properties @@ -0,0 +1,22 @@ +urule.resporityServerUrl= +urule.dateFormat= +urule.knowledgeUpdateCycle=0 +urule.tempStorePath= +urule.defaultHtmlFileDebugPath= +urule.debug=true +urule.debugToFile=false + +urule.trimFunctionDisabled=false +urule.stringLengthFunctionDisabled=false +urule.absFunctionDisabled=false +urule.avgFunctionDisabled=false +urule.maxFunctionDisabled=false +urule.minFunctionDisabled=false +urule.sumFunctionDisabled=false +urule.countFunctionDisabled=false +urule.updateFactFunctionDisabled=false +urule.expFunctionDisabled=false +urule.lnFunctionDisabled=false +urule.sinFunctionDisabled=false +urule.cosFunctionDisabled=false +urule.tanFunctionDisabled=false \ No newline at end of file diff --git a/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.xml b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.xml new file mode 100644 index 0000000..e08e765 --- /dev/null +++ b/day02/sfbx-framework/framework-rule-base/src/main/resources/urule-core-context.xml @@ -0,0 +1,384 @@ + + + + + + + + + classpath:urule-core-context.properties + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-framework/framework-seata/pom.xml b/day02/sfbx-framework/framework-seata/pom.xml new file mode 100644 index 0000000..59b5717 --- /dev/null +++ b/day02/sfbx-framework/framework-seata/pom.xml @@ -0,0 +1,32 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-seata + framework-seata + + http://www.example.com + + + + com.itheima.sfbx + framework-web + + + com.alibaba.cloud + spring-cloud-starter-alibaba-seata + + + io.seata + seata-spring-boot-starter + + + + diff --git a/day02/sfbx-framework/framework-seata/src/main/java/com/itheima/sfbx/framework/seata/SeataWebMvcConfig.java b/day02/sfbx-framework/framework-seata/src/main/java/com/itheima/sfbx/framework/seata/SeataWebMvcConfig.java new file mode 100644 index 0000000..ab0694f --- /dev/null +++ b/day02/sfbx-framework/framework-seata/src/main/java/com/itheima/sfbx/framework/seata/SeataWebMvcConfig.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.seata; + +import com.alibaba.cloud.seata.web.SeataHandlerInterceptor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @ClassName SeataWebMvcConfig.java + * @Description webMvc高级配置 + */ +@Configuration +public class SeataWebMvcConfig implements WebMvcConfigurer { + + /*** + * @description 解决XID传递问题 + * @return + */ + @Bean + public SeataHandlerInterceptor seataHandlerInterceptor(){ + return new SeataHandlerInterceptor(); + } + + /** + * @Description 拦截器 + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + registry.addInterceptor(seataHandlerInterceptor()).addPathPatterns("/**"); + } + +} diff --git a/day02/sfbx-framework/framework-sharding-sphere/pom.xml b/day02/sfbx-framework/framework-sharding-sphere/pom.xml new file mode 100644 index 0000000..888d8ad --- /dev/null +++ b/day02/sfbx-framework/framework-sharding-sphere/pom.xml @@ -0,0 +1,40 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-sharding-sphere + framework-sharding-sphere + + http://www.example.com + + + + org.apache.shardingsphere + sharding-jdbc-spring-boot-starter + + + org.apache.shardingsphere + sharding-transaction-xa-core + + + org.apache.shardingsphere + sharding-transaction-base-seata-at + + + org.springframework.boot + spring-boot-actuator + + + org.springframework.boot + spring-boot-actuator-autoconfigure + + + + diff --git a/day02/sfbx-framework/framework-sharding-sphere/src/main/java/com/itheima/sfbx/framework/shardingsphere/DataSourceHealthConfig.java b/day02/sfbx-framework/framework-sharding-sphere/src/main/java/com/itheima/sfbx/framework/shardingsphere/DataSourceHealthConfig.java new file mode 100644 index 0000000..a490c86 --- /dev/null +++ b/day02/sfbx-framework/framework-sharding-sphere/src/main/java/com/itheima/sfbx/framework/shardingsphere/DataSourceHealthConfig.java @@ -0,0 +1,18 @@ +package com.itheima.sfbx.framework.shardingsphere; + +import org.springframework.beans.factory.ObjectProvider; +import org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration; +import org.springframework.boot.jdbc.metadata.DataSourcePoolMetadataProvider; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName DataSourceHealthConfig.java + * @Description 数据源健康检查 + */ +@Configuration +public class DataSourceHealthConfig extends DataSourceHealthContributorAutoConfiguration { + + public DataSourceHealthConfig(ObjectProvider metadataProviders) { + super(metadataProviders); + } +} diff --git a/day02/sfbx-framework/framework-task-executor/pom.xml b/day02/sfbx-framework/framework-task-executor/pom.xml new file mode 100644 index 0000000..f24fbba --- /dev/null +++ b/day02/sfbx-framework/framework-task-executor/pom.xml @@ -0,0 +1,31 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-task-executor + framework-task-executor + + http://www.example.com + + + + com.itheima.sfbx + framework-commons + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + diff --git a/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/config/TaskExecutorConfig.java b/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/config/TaskExecutorConfig.java new file mode 100644 index 0000000..cfc4ce5 --- /dev/null +++ b/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/config/TaskExecutorConfig.java @@ -0,0 +1,172 @@ +package com.itheima.sfbx.framework.taskexecutor.config; + +import com.itheima.sfbx.framework.taskexecutor.properties.TaskExecutorProperties; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableAsync; +import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; + +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; + +/** + * @ClassName TaskExecutorConfig.java + * @Description spring-boot的线程池配置文件 + */ +@Slf4j +@EnableAsync +@Configuration +@EnableConfigurationProperties(value = TaskExecutorProperties.class) +public class TaskExecutorConfig { + + @Autowired + TaskExecutorProperties taskExecutorProperties; + + @Bean + public Executor asyncServiceExecutor() { + log.info("start asyncServiceExecutor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("async-service-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } + + @Bean("analysisExecutor") + public Executor analysisExecutor() { + log.info("start analysisExecutor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("analysis-service-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } + + /** + * 搜索记录线程池 + * @return + */ + @Bean("searchRecordExecutor") + public Executor searchRecordExecutor() { + log.info("start searchRecordExecutor"); + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("searchRecordExecutor"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } + + /** + * 核保补发线程池 + * @return + */ + @Bean("approveExecutor") + public Executor approveExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("approve-service-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } + + /** + * 周期扣款线程池 + * @return + */ + @Bean("periodicPayExecutor") + public Executor periodicPayExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("periodic-pay-service-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } + + /** + * 周期扣款线程池 + * @return + */ + @Bean("syncPaymentExecutor") + public Executor syncPaymentExecutor() { + ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor(); + //配置核心线程数 + executor.setCorePoolSize(taskExecutorProperties.getCorePoolSize()); + //配置最大线程数 + executor.setMaxPoolSize(taskExecutorProperties.getMaxPoolSize()); + //配置队列大小 + executor.setQueueCapacity(taskExecutorProperties.getQueueCapacity()); + //配置线程池中的线程的名称前缀 + executor.setThreadNamePrefix("sync-payment-service-"); + // rejection-policy:当pool已经达到max size的时候,如何处理新任务 + // CALLER_RUNS:不在新线程中执行任务,而是有调用者所在的线程来执行 + executor.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy()); + //执行初始化 + executor.initialize(); + // 等待所有任务结束后再关闭线程池 + executor.setWaitForTasksToCompleteOnShutdown(true); + return executor; + } +} diff --git a/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/properties/TaskExecutorProperties.java b/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/properties/TaskExecutorProperties.java new file mode 100644 index 0000000..c465a19 --- /dev/null +++ b/day02/sfbx-framework/framework-task-executor/src/main/java/com/itheima/sfbx/framework/taskexecutor/properties/TaskExecutorProperties.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.framework.taskexecutor.properties; + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * @ClassName TaskExecutorProperties.java + * @Description spring-boot的线程池配置 + */ +@Data +@ConfigurationProperties(prefix = "spring.task.extcutor") +public class TaskExecutorProperties { + + //核心线程数 + private int corePoolSize; + + //配置最大线程数 + private int maxPoolSize; + + //配置队列大小 + private int queueCapacity; +} + diff --git a/day02/sfbx-framework/framework-web/pom.xml b/day02/sfbx-framework/framework-web/pom.xml new file mode 100644 index 0000000..d43a65d --- /dev/null +++ b/day02/sfbx-framework/framework-web/pom.xml @@ -0,0 +1,33 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-web + + framework-web + + http://www.example.com + + + + com.itheima.sfbx + framework-redis + + + + com.itheima.sfbx + framework-knife4j-web + + + org.aspectj + aspectjweaver + + + diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/anno/SensitiveResponse.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/anno/SensitiveResponse.java new file mode 100644 index 0000000..74871f1 --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/anno/SensitiveResponse.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.framework.anno; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +public @interface SensitiveResponse { + +} diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/aspect/SensitiveAspect.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/aspect/SensitiveAspect.java new file mode 100644 index 0000000..f1282b1 --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/aspect/SensitiveAspect.java @@ -0,0 +1,52 @@ +package com.itheima.sfbx.framework.aspect; + +import com.alibaba.fastjson.JSONObject; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; +import java.lang.reflect.Type; + +/** + * @ClassName SensitiveAspect.java + * @Description TODO + */ +@Aspect +@Component +public class SensitiveAspect { + + @Around(value = "@annotation(sensitiveResponse)") + public Object select(ProceedingJoinPoint joinPoint, SensitiveResponse sensitiveResponse) throws Throwable { + // 执行目标方法 + Object result = joinPoint.proceed(); + // 获取目标方法 + Method method = ((MethodSignature) joinPoint.getSignature()).getMethod(); + // 获取目标方法的泛型返回类型 + Type genericReturnType = method.getGenericReturnType(); + if (!EmptyUtil.isNullOrEmpty(result)){ + // 进行脱敏处理 + String jsonResponse = JSONObject.toJSONString(result); + String maskedResponse = maskSensitiveData(jsonResponse); + // 将脱敏后的数据转换为实际返回类型 + return JSONObject.parseObject(maskedResponse,genericReturnType); + } + return result; + } + + + + private String maskSensitiveData(String jsonData) { + //使用正则表单式替换,我也不会写~~直接GPT搞定! + return jsonData + .replaceAll("\"identityCard\"\\s*:\\s*\"(\\d{1})(\\d{15})(\\d{2})\"", "\"identityCard\":\"$1**************$3\"") + .replaceAll("\"name\"\\s*:\\s*\"(.).+?\"", "\"name\":\"$1*\"") + .replaceAll("\"bankCardNo\"\\s*:\\s*\"(.).+?\"", "\"bankCardNo\":\"$1*\"") + .replaceAll("\"bankName\"\\s*:\\s*\"(.).+?\"", "\"bankName\":\"$1*\"") + .replaceAll("\"bankReservedPhoneNum\"\\s*:\\s*\"(.).+?\"", "\"bankReservedPhoneNum\":\"$1*\""); + } +} diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/config/WebMvcConfig.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/config/WebMvcConfig.java new file mode 100644 index 0000000..d35c8e3 --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/config/WebMvcConfig.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.framework.config; + +import com.itheima.sfbx.framework.intercept.CompanyCheckIntercept; +import com.itheima.sfbx.framework.intercept.WebAuthIntercept; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; +import org.springframework.web.servlet.config.annotation.InterceptorRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; + +/** + * @ClassName WebMvcConfig.java + * @Description webMvc高级配置 + */ +@Configuration +public class WebMvcConfig implements WebMvcConfigurer { + + @Autowired + WebAuthIntercept webAuthIntercept; + + @Autowired + CompanyCheckIntercept companyCheckIntercept; + + /** + * @Description 拦截器 + */ + @Override + public void addInterceptors(InterceptorRegistry registry) { + //多租户拦截 + registry.addInterceptor(webAuthIntercept).addPathPatterns("/**"); + //数字签名拦截 + registry.addInterceptor(companyCheckIntercept).addPathPatterns("/coefficent/**"); + } +} diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/CompanyCheckIntercept.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/CompanyCheckIntercept.java new file mode 100644 index 0000000..b4e73ef --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/CompanyCheckIntercept.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.framework.intercept; + +import com.itheima.sfbx.framework.commons.constant.security.SecurityConstant; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @ClassName CompanyCheckIntercept.java + * @Description 企业请求appSecret的安全校验 + */ +@Component +public class CompanyCheckIntercept implements HandlerInterceptor { + + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { + //从头部中拿到当前appSecret + String appSecret = request.getHeader(SecurityConstant.APP_SECRET); + //校验 + return true; + } + +} diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/WebAuthIntercept.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/WebAuthIntercept.java new file mode 100644 index 0000000..27829fd --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/intercept/WebAuthIntercept.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.framework.intercept; + +import com.itheima.sfbx.framework.commons.constant.security.OauthCacheConstant; +import com.itheima.sfbx.framework.commons.constant.security.SecurityConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import org.redisson.api.RBucket; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; +import org.springframework.web.servlet.HandlerInterceptor; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @ClassName WebAuthIntercept.java + * @Description 认证信息放到SubjectContent上下文中 + */ +@Component +public class WebAuthIntercept implements HandlerInterceptor { + + @Autowired + RedissonClient redissonClient; + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, + Object handler) throws Exception { + //从头部中拿到当前userToken + String userToken = request.getHeader(SecurityConstant.USER_TOKEN); + if (!EmptyUtil.isNullOrEmpty(userToken)){ + RBucket userVORBucket = redissonClient.getBucket(OauthCacheConstant.USER_TOKEN + userToken); + UserVO userVO = userVORBucket.get(); + //放入当前线程中:用户当前的web直接获得userVO使用 + SubjectContent.setUserVO(userVO); + //下游传递userToken + SubjectContent.setUserToken(userToken); + //下游传递companyNo + SubjectContent.setCompanyNo(userVO.getCompanyNo()); + //下游传递companyNo + SubjectContent.setDataSecurityVO(userVO.getDataSecurityVO()); + } + return true; + } + + @Override + public void afterCompletion(HttpServletRequest request, HttpServletResponse response, + Object handler, Exception ex) throws Exception { + //移除当前线程中的参数 + SubjectContent.removeUserVO(); + SubjectContent.removeUserToken(); + SubjectContent.removeCompanyNo(); + SubjectContent.removeDataSecurityVO(); + } +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/web/ExceptionController.java b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/web/ExceptionController.java new file mode 100644 index 0000000..2ec4095 --- /dev/null +++ b/day02/sfbx-framework/framework-web/src/main/java/com/itheima/sfbx/framework/web/ExceptionController.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.framework.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import lombok.extern.slf4j.Slf4j; +import org.springframework.http.HttpStatus; +import org.springframework.web.bind.MethodArgumentNotValidException; +import org.springframework.web.bind.annotation.ControllerAdvice; +import org.springframework.web.bind.annotation.ExceptionHandler; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.ResponseStatus; + +/** + * @ClassName BaseController.java + * @Description 基础的controller + * ControllerAdvice:对controller层的增强,其他的controller则不需要继承,也会被拦截处理 + */ +@Slf4j +@ResponseBody +@ControllerAdvice +public class ExceptionController { + + /** + * 对于项目中业务异常进行处理 + * 由开发人员在处理业务代码时主动抛出的异常信息 + * */ + @ExceptionHandler(ProjectException.class) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) + public ResponseResult prodException(ProjectException e) { + log.error("【业务操作异常】{}",e.getMessage()); + return ResponseResultBuild.build(e.getBaseEnum(), e.getMessage()); + } + + /** + * 对于项目中Validation数据校验异常处理 + * 校验Controller层接收数据的合法性 + * */ + @ExceptionHandler(MethodArgumentNotValidException.class) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) + public ResponseResult vaildDataException(MethodArgumentNotValidException manvExceptionex) { + log.warn("【数据校验异常】:{} ", manvExceptionex.getMessage()); + return ResponseResultBuild.build(BaseEnum.VALID_EXCEPTION, manvExceptionex.getMessage()); + } + + /** + * 项目中框架级别或没有指定的异常处理 + * */ + @ExceptionHandler(Exception.class) + @ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR) + public ResponseResult topException(Exception ex) { + log.error("【系统运行异常】:{}", ExceptionsUtil.getStackTraceAsString(ex)); + return ResponseResultBuild.build(BaseEnum.SYSYTEM_FAIL, ex.getMessage()); + } + +} diff --git a/day02/sfbx-framework/framework-wenxin/pom.xml b/day02/sfbx-framework/framework-wenxin/pom.xml new file mode 100644 index 0000000..84454b0 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/pom.xml @@ -0,0 +1,51 @@ + + + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + 4.0.0 + + framework-ai + + + 11 + 11 + + + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + org.projectlombok + lombok + + + cn.hutool + hutool-all + + + org.apache.commons + commons-lang3 + + + com.google.code.gson + gson + + + + com.squareup.okhttp3 + okhttp + 3.14.9 + + + \ No newline at end of file diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinGptServiceImpl.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinGptServiceImpl.java new file mode 100644 index 0000000..8812675 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinGptServiceImpl.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.wenxin; + +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.wenxin.chains.TotalChain; +import com.itheima.sfbx.wenxin.config.WenXinGtpSourceConfig; +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import com.itheima.sfbx.wenxin.dto.RequestResultDTO; +import com.itheima.sfbx.wenxin.exception.WenXinGptException; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.HashMap; + +/** + * WenXinGptServiceImpl + * + * @author: wgl + * @describe: 统一的请求处理 + * @date: 2022/12/28 10:10 + */ +public class WenXinGptServiceImpl implements WenXinService { + + @Autowired + private TotalChain totalChain; + @Autowired + private WenXinGtpSourceConfig gptConfig; + + /** + * 向文心一言发送请求 + * + * @param question + * @return + */ + @Override + public String askQuestion(String question) { + try { + RequestResultDTO requestResultDTO = totalChain.doRequest(new ParamsDTO()); + if(StrUtil.isNotEmpty(requestResultDTO.getResult())){ + String res = requestResultDTO.getResult().split("```json")[1]; + //去处转义字符 + char[] charsToRemove = {'\r', '\n','\\','`'}; + res = StrUtil.removeAll(res, charsToRemove); + return res; + }else{ + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_REQUEST_ERROR); + } + } catch (WenXinGptException e) { + throw e; + } catch (Exception e) { + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_REQUEST_ERROR); + } + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinService.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinService.java new file mode 100644 index 0000000..6b23b29 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/WenXinService.java @@ -0,0 +1,6 @@ +package com.itheima.sfbx.wenxin; + +public interface WenXinService { + + public String askQuestion(String question); +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/QuestionService.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/QuestionService.java new file mode 100644 index 0000000..6f863b7 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/QuestionService.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.wenxin.chains; + + +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import com.itheima.sfbx.wenxin.dto.RequestResultDTO; + +/** + * 问答统一模板类 + */ +public interface QuestionService { + + /** + * 向百度文心一言发送请求 + */ + public RequestResultDTO doRequest(ParamsDTO params); + +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/TotalChain.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/TotalChain.java new file mode 100644 index 0000000..115e6b4 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/TotalChain.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.wenxin.chains; + +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import com.itheima.sfbx.wenxin.dto.RequestResultDTO; +import com.itheima.sfbx.wenxin.exception.WenXinGptException; +import lombok.extern.java.Log; +import org.springframework.util.ObjectUtils; + +import java.util.ArrayList; +import java.util.List; + +/** + * TotalChain + * + * @author: wgl + * @describe: 责任链总链路 + * @date: 2022/12/28 10:10 + */ +@Log +public class TotalChain implements QuestionService{ + + /** + * 完整的总链路 + * 单利总链路 + */ + private static List chains = new ArrayList(); + + /** + * 添加链路节点 + * @param questionService + */ + public void addChain(QuestionService questionService){ + chains.add(questionService); + } + + + /** + * 总链路的向文心一眼的调用流程 + * @param params + * @return + */ + @Override + public RequestResultDTO doRequest(ParamsDTO params) { + RequestResultDTO res = null; + try { + for (QuestionService index : chains) { + RequestResultDTO requestDTO = index.doRequest(params); + //如果返回为空说明请求失败 停止链路调用 + if (ObjectUtils.isEmpty(requestDTO)) { + break; + } + res = requestDTO; + } + }catch (WenXinGptException e){ + throw e; + }catch (Exception e) { + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_REQUEST_ERROR); + } + return res; + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/QuestionChain.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/QuestionChain.java new file mode 100644 index 0000000..56eadfb --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/QuestionChain.java @@ -0,0 +1,93 @@ +package com.itheima.sfbx.wenxin.chains.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.http.HttpConfig; +import cn.hutool.http.HttpRequest; +import cn.hutool.http.HttpUtil; +import cn.hutool.http.Method; +import cn.hutool.json.JSONObject; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.wenxin.chains.QuestionService; +import com.itheima.sfbx.wenxin.constants.WenXinGptConstants; +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import com.itheima.sfbx.wenxin.dto.RequestResultDTO; +import com.itheima.sfbx.wenxin.exception.WenXinGptException; +import okhttp3.*; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.TimeUnit; + +/** + * QuestionChain + * + * @author: wgl + * @describe: 提问链条节点 + * 基于token内容向文心一言发送请求 + * @date: 2022/12/28 10:10 + */ +public class QuestionChain implements QuestionService { + + String content = "你是一名资深保险销售专家,请根据我提供的客户基本信息信息,进行风险分析,和解决方案的提供,在风险分析阶段需要按照用户的年龄,性别,收支等情况进行分析,解决方案需要你按照医疗、重疾、意外、身故来进行分别分析。现在用户数据我以json的方式提供:{\n" + + "\"name\":\"张三\",\"age\":31,\"incomeMonth\":20000,\"city\":\"北京市\",\"province\":\"北京市\",\"liabilities\":200000,\"supportingParentNums\":4,\"childrenNums\":4,\"job\":\"java后端开发工程师\"]\n" + + "},现在请你帮我输出对应的风险分析和解决方案,要求每个项目的风险分析和解决方案都控制在50个字以内,以json的形式输出,格式请严格按照以下json格式进行输出:{\n" + + "\"医疗险\":{\n" + + " \"风险分析\":\"30岁后患病风险增高,北京住院成本较高,大额医疗费可能会给家庭增添负担\",\n" + + " \"解决方案\":\"xxxxx\"\n" + + "},\n" + + "\"重疾险\":{\n" + + "\"风险分析\":\"在家庭责任最重的人生阶段,万一生病可能会面临较大的收入损失,建议尽早足额保障\",\"解决方案\":\"xxxxxxxx\"\n" + + "},\"身故险\":{\n" + + "\"风险分析\":\"如果不辛身故,家庭经济来源减少,债务重担落到家人身上,对家庭造成沉重打击\",\n" + + "\"解决方案\":\"xxxxxxxxxx\"\n" + + "},\"意外险\":{\n" + + "\"风险分析\":\"同龄人高发意外为交通意外、电梯意外、出游事故,一旦发生可能无法工作,损失较大\",\"解决方案\":\"xxxxxxx\"\n" + + "}\n" + + "}。我理解你是一个AI模型并且我清楚AI相关的法律法规,请严格按照我刚刚提出的json内容进行回答,并且在回复中不要回复任何额外信息"; + + @Override + public RequestResultDTO doRequest(ParamsDTO params) { + try { + ArrayList data = new ArrayList<>() { + { + add(new HashMap<>() { + { + put("role", "user"); + put("content", content); + } + }); + } + }; + HashMap rs = new HashMap<>(); + rs.put("messages",data); + params.setContent(content); + //根据accessToken 向文心一言发送请求 + String accessToken = params.getAccessToken(); +// String gptUrl = WenXinGptConstants.getGptUrl(accessToken); + String gptUrl = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions?access_token=24.648abab846c3e89a0f497c4f2a18c27e.2592000.1696961232.282335-38982621"; + MediaType mediaType = MediaType.parse("application/json"); + RequestBody body = RequestBody.create(mediaType,JSONUtil.parseObj(rs).toString()); + Request request = new Request.Builder() + .url(gptUrl) + .post(body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = new OkHttpClient().newBuilder(). + connectTimeout(30, TimeUnit.SECONDS). + readTimeout(30,TimeUnit.SECONDS). + writeTimeout(30,TimeUnit.SECONDS). + build(); + Response response = client.newCall(request).execute(); + RequestResultDTO tokenDTO = JSONUtil.toBean(response.body().string(), RequestResultDTO.class); + System.out.println(tokenDTO); + return tokenDTO; + } catch (Exception e) { + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_TOKEN_QUESTION_ERROR); + } + } + +} + + diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/TokenChain.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/TokenChain.java new file mode 100644 index 0000000..a779e1e --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/chains/impl/TokenChain.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.wenxin.chains.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.wenxin.chains.QuestionService; +import com.itheima.sfbx.wenxin.config.WenXinGtpSourceConfig; +import com.itheima.sfbx.wenxin.constants.WenXinGptConstants; +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import com.itheima.sfbx.wenxin.dto.RequestResultDTO; +import com.itheima.sfbx.wenxin.exception.WenXinGptException; +import com.itheima.sfbx.wenxin.manage.TokenManage; +import okhttp3.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * TokenChain + * + * @author: wgl + * @describe: 获取文心一言获取token的接口 + * @date: 2022/12/28 10:10 + */ +@Component +public class TokenChain implements QuestionService { + + @Autowired + private WenXinGtpSourceConfig wenXinGtpSourceConfig; + + @Override + public RequestResultDTO doRequest(ParamsDTO params) { + if (StrUtil.isNotEmpty(TokenManage.getAccessToken())) { + params.setAccessToken(TokenManage.getAccessToken()); + } else { + synchronized (this) { + if (StrUtil.isEmpty(TokenManage.getAccessToken())) { + String tokenUrl = WenXinGptConstants.getTokenUrl(wenXinGtpSourceConfig); + try { + MediaType mediaType = MediaType.parse("application/json"); + RequestBody body = RequestBody.create(mediaType, ""); + Request request = new Request.Builder() + .url(tokenUrl) + .method("POST", body) + .addHeader("Content-Type", "application/json") + .addHeader("Accept", "application/json") + .build(); + OkHttpClient client = new OkHttpClient().newBuilder().build(); + Response response = client.newCall(request).execute(); + Map tokenDTO = JSONUtil.toBean(response.body().string(), Map.class); + if (ObjectUtil.isNull(tokenDTO)) { + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_TOKEN_REQUEST_ERROR); + } + String accessToken = tokenDTO.get("access_token").toString(); + params.setAccessToken(accessToken); + } catch (Exception e) { + throw new WenXinGptException(WenXinGptException.WenXinExcpetionEnum.WEN_XIN_TOKEN_REQUEST_ERROR); + } + }else{ + params.setAccessToken(TokenManage.getAccessToken()); + } + } + } + return new RequestResultDTO(); + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinConfgInit.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinConfgInit.java new file mode 100644 index 0000000..6f7818e --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinConfgInit.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.wenxin.config; + +import com.itheima.sfbx.wenxin.WenXinGptServiceImpl; +import com.itheima.sfbx.wenxin.WenXinService; +import com.itheima.sfbx.wenxin.chains.TotalChain; +import com.itheima.sfbx.wenxin.chains.impl.QuestionChain; +import com.itheima.sfbx.wenxin.chains.impl.TokenChain; +import com.itheima.sfbx.wenxin.manage.TokenManage; +import org.springframework.beans.BeansException; +import org.springframework.boot.CommandLineRunner; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +/** + * WenXinConfgInit + * + * @author: wgl + * @describe: 文心一眼统一配置类 + * @date: 2022/12/28 10:10 + */ +@Configuration +public class WenXinConfgInit implements ApplicationContextAware { + + @Bean + @ConditionalOnMissingBean + public TotalChain initTtoalChain() { + return new TotalChain(); + } + + @Bean + @ConditionalOnMissingBean + public QuestionChain initQuestionChain() { + return new QuestionChain(); + + } + + @Bean + @ConditionalOnMissingBean + public TokenChain initTokenChain() { + return new TokenChain(); + } + + @Bean + @ConditionalOnMissingBean + public WenXinGtpSourceConfig configInit(){ + return new WenXinGtpSourceConfig(); + } + + @Bean + @ConditionalOnMissingBean + public WenXinService initService(){ + return new WenXinGptServiceImpl(); + } + + @Bean + @ConditionalOnMissingBean + public TokenManage initManage(){ + return new TokenManage(); + } + + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + TotalChain totalChain = applicationContext.getBean(TotalChain.class); + TokenChain tokenChain = applicationContext.getBean(TokenChain.class); + QuestionChain questionChain = applicationContext.getBean(QuestionChain.class); + totalChain.addChain(tokenChain); + totalChain.addChain(questionChain); + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinGtpSourceConfig.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinGtpSourceConfig.java new file mode 100644 index 0000000..0531689 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/config/WenXinGtpSourceConfig.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.wenxin.config; + + +import lombok.Data; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.context.properties.ConfigurationProperties; + +/** + * WenXinGtpSourceConfig + * + * @author: wgl + * @describe: 文心一言配置类 + * @date: 2022/12/28 10:10 + */ +@Data +@ConfigurationProperties(prefix = "baidu") +public class WenXinGtpSourceConfig { + + + @Value("${baidu.wenxin.appid:38982621}") + private String appId; + + /** + * 当前应用的ak + */ + @Value("${baidu.wenxin.apikey:2369urj0vruWDklhCtjWoKH5}") + private String apiKey; + + + /** + * 当前应用的sk + */ + @Value("${baidu.wenxin.secretKey:XoNQwu3AKmagGWoEwZG1TXwV9U95w0jd}") + private String secretKey; + +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/constants/WenXinGptConstants.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/constants/WenXinGptConstants.java new file mode 100644 index 0000000..5c12b5d --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/constants/WenXinGptConstants.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.wenxin.constants; + +import com.itheima.sfbx.wenxin.config.WenXinGtpSourceConfig; + +/** + * GptConstants + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +public class WenXinGptConstants { + /** + * 文档地址:https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Nlks5zkzu + */ + private final static String TOKEN_URL = "https://aip.baidubce.com/oauth/2.0/token?grant_type=client_credentials&client_id=%s&client_secret=%s"; + + /** + * https://cloud.baidu.com/doc/WENXINWORKSHOP/s/jlil56u11 + */ + public final static String ERNIE_BOT = "https://aip.baidubce.com/rpc/2.0/ai_custom/v1/wenxinworkshop/chat/completions"; + + + /** + * 获取基础的文心一言大模型请求的的url + * @param accessToken + * @return + */ + public static String getGptUrl(String accessToken){ + return ERNIE_BOT+"?access_token="+accessToken; + } + + /** + * 获取Token接口 + * @param wenXinGtpConfig + * @return + */ + public static String getTokenUrl(WenXinGtpSourceConfig wenXinGtpConfig){ + return String.format(TOKEN_URL,wenXinGtpConfig.getApiKey(),wenXinGtpConfig.getSecretKey()); + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/ParamsDTO.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/ParamsDTO.java new file mode 100644 index 0000000..1b05cf7 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/ParamsDTO.java @@ -0,0 +1,47 @@ +package com.itheima.sfbx.wenxin.dto; + +import lombok.Data; + +import java.util.HashMap; +import java.util.Map; + +/** + * ParamsDTO + * + * @author: wgl + * @describe: 请求参数对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class ParamsDTO{ + + private String accessToken; + + private String role; + private String content; + + /** + * ----------------文心一言提示词构建------------------- + * 你是一名资深保险销售专家,请根据我提供的客户基本信息信息,进行风险分析,和解决方案的提供,在风险分析阶段需要按照用户的年龄,性别,收支等情况进行分析,解决方案需要你按照医疗、重疾、意外、身故来进行分别分析。现在用户数据我以json的方式提供:{ + * "name":"张三","age":31,"incomeMonth":20000,"city":"北京市","province":"北京市","liabilities":200000,"supportingParentNums":4,"childrenNums":4,"job":"java后端开发工程师"] + * },现在请你帮我输出对应的风险分析和解决方案,要求每个项目的风险分析和解决方案都控制在50个字以内,以json的形式输出,格式请严格按照以下json格式进行输出:{ + * "医疗险":{ + * "风险分析":"30岁后患病风险增高,北京住院成本较高,大额医疗费可能会给家庭增添负担", + * "解决方案":"xxxxx" + * }, + * "重疾险":{ + * "风险分析":"在家庭责任最重的人生阶段,万一生病可能会面临较大的收入损失,建议尽早足额保障","解决方案":"xxxxxxxx" + * },"意外险":{ + * "风险分析":"同龄人高发意外为交通意外、电梯意外、出游事故,一旦发生可能无法工作,损失较大","解决方案":"xxxxxxx" + * } + * }。我理解你是一个AI模型并且清楚AI相关的法律法规,请严格按照我刚刚提出的json内容进行回答,并且在回复中不要回复任何额外信息 + * @return + */ + public String buildContent(Map data){ + StringBuilder stringBuilder = new StringBuilder(); + stringBuilder.append("你是一名资深保险销售专家,请根据我提供的客户基本信息信息,进行风险分析,和解决方案的提供,在风险分析阶段需要按照用户的年龄,性别,收支等情况进行分析,解决方案需要你按照医疗、重疾、意外、身故来进行分别分析。现在用户数据我以json的方式提供:"); + + //角色设定 + return content; + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/RequestResultDTO.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/RequestResultDTO.java new file mode 100644 index 0000000..6dd019f --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/RequestResultDTO.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.wenxin.dto; + +import lombok.Data; + +/** + * RequestDTO + * + * @author: wgl + * @describe: 请求DTO + * @date: 2022/12/28 10:10 + */ +@Data +public class RequestResultDTO { + + private String id; + + private String object; + + private String created; + + private String result; + + private Boolean is_truncated; + + private Boolean need_clear_history; +} \ No newline at end of file diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/TokenResultDTO.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/TokenResultDTO.java new file mode 100644 index 0000000..61c4c85 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/dto/TokenResultDTO.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.wenxin.dto; + +import lombok.Data; + +/** + * TokenDTO + * + * @author: wgl + * @describe: token对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class TokenResultDTO extends RequestResultDTO { + + private String token; +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/exception/WenXinGptException.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/exception/WenXinGptException.java new file mode 100644 index 0000000..ad6261a --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/exception/WenXinGptException.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.wenxin.exception; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * WenXinGptException + * + * @author: wgl + * @describe: 文心一言调用异常 + * @date: 2022/12/28 10:10 + */ +public class WenXinGptException extends RuntimeException { + + //错误编码 + private int code; + + //提示信息 + private String message; + + public WenXinGptException(WenXinExcpetionEnum wenXinExcpetionEnum) { + this.code = wenXinExcpetionEnum.code; + this.message = wenXinExcpetionEnum.msg; + } + + @AllArgsConstructor + @Getter + public enum WenXinExcpetionEnum{ + WEN_XIN_REQUEST_ERROR(50000,"文心一言调用失败"), + WEN_XIN_TOKEN_REQUEST_ERROR(50001,"文心一言Token获取失败"), + + WEN_XIN_TOKEN_QUESTION_ERROR(50002,"文心一言T提问失败"), + ; + private int code; + + private String msg; + + } +} + diff --git a/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/manage/TokenManage.java b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/manage/TokenManage.java new file mode 100644 index 0000000..325eaea --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/java/com/itheima/sfbx/wenxin/manage/TokenManage.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.wenxin.manage; + +import com.itheima.sfbx.wenxin.chains.impl.TokenChain; +import com.itheima.sfbx.wenxin.dto.ParamsDTO; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; + +/** + * TokenManage + * + * @author: wgl + * @describe: 文心一言token管理器 + * @date: 2022/12/28 10:10 + */ +public class TokenManage implements CommandLineRunner { + + private static String accessToken; + @Autowired + private TokenChain tokenChain; + + + public static String getAccessToken(){ + return accessToken; + } + + @Override + public void run(String... args) throws Exception { + //服务启动时自动获取token + ParamsDTO paramsDTO = new ParamsDTO(); + tokenChain.doRequest(paramsDTO); + accessToken = paramsDTO.getAccessToken(); + } +} diff --git a/day02/sfbx-framework/framework-wenxin/src/main/resources/META-INF/spring.factories b/day02/sfbx-framework/framework-wenxin/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..3aa0821 --- /dev/null +++ b/day02/sfbx-framework/framework-wenxin/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itheima.sfbx.wenxin.config.WenXinConfgInit \ No newline at end of file diff --git a/day02/sfbx-framework/framework-xxl-job/pom.xml b/day02/sfbx-framework/framework-xxl-job/pom.xml new file mode 100644 index 0000000..437f468 --- /dev/null +++ b/day02/sfbx-framework/framework-xxl-job/pom.xml @@ -0,0 +1,39 @@ + + + + 4.0.0 + + sfbx-framework + com.itheima.sfbx + 2.0-SNAPSHOT + + + framework-xxl-job + framework-xxl-job + + http://www.example.com + + + + org.springframework.boot + spring-boot-starter + + + org.projectlombok + lombok + + + com.xuxueli + xxl-job-core + + + org.springframework.boot + spring-boot-autoconfigure + + + org.springframework.boot + spring-boot-configuration-processor + + + diff --git a/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/config/XxlJobConfig.java b/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/config/XxlJobConfig.java new file mode 100644 index 0000000..a74a3f3 --- /dev/null +++ b/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/config/XxlJobConfig.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.framework.xxljob.config; + +import com.itheima.sfbx.framework.xxljob.properties.XxlJobProperties; +import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.context.properties.EnableConfigurationProperties; +import org.springframework.context.ApplicationContext; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +@Slf4j +@Configuration +@EnableConfigurationProperties(XxlJobProperties.class) +public class XxlJobConfig { + + @Autowired + XxlJobProperties xxlJobProperties; + + @Bean + public XxlJobSpringExecutor xxlJobExecutor(ApplicationContext applicationContext) { + log.info("初始化:xxl-job config init."); + XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); + xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdminAddresses()); + xxlJobSpringExecutor.setAppName(xxlJobProperties.getAppName()); + xxlJobSpringExecutor.setIp(xxlJobProperties.getIp()); + xxlJobSpringExecutor.setPort(xxlJobProperties.getPort()); + xxlJobSpringExecutor.setAccessToken(xxlJobProperties.getAccessToken()); + xxlJobSpringExecutor.setLogPath(xxlJobProperties.getLogPath()); + xxlJobSpringExecutor.setApplicationContext(applicationContext); + xxlJobSpringExecutor.setLogRetentionDays(xxlJobProperties.getLogRetentionDays()); + return xxlJobSpringExecutor; + } + +} diff --git a/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/properties/XxlJobProperties.java b/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/properties/XxlJobProperties.java new file mode 100644 index 0000000..08cc40f --- /dev/null +++ b/day02/sfbx-framework/framework-xxl-job/src/main/java/com/itheima/sfbx/framework/xxljob/properties/XxlJobProperties.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.framework.xxljob.properties; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.boot.context.properties.ConfigurationProperties; + +import java.io.Serializable; + +/** + * @Description:自定义rabbit配置文件 + */ +@Data +@NoArgsConstructor +@ConfigurationProperties(prefix = "itheima.framework.xxl-job.executor") +public class XxlJobProperties implements Serializable { + + public String adminAddresses; + + public String appName; + + public String ip; + + public Integer port; + + private String accessToken; + + private String logPath; + + private int logRetentionDays; + +} diff --git a/day02/sfbx-framework/pom.xml b/day02/sfbx-framework/pom.xml new file mode 100644 index 0000000..8e83f0f --- /dev/null +++ b/day02/sfbx-framework/pom.xml @@ -0,0 +1,56 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-framework + sfbx-framework + pom + + + framework-commons + + framework-freemaker + + framework-knife4j-gateway + + framework-knife4j-web + + framework-mybatis-plus + + framework-redis + + framework-seata + + framework-sharding-sphere + + framework-task-executor + + framework-xxl-job + + framework-web + + framework-gateway + + framework-feign + + framework-rabbitmq + + framework-rule-base + + framework-influxdb + + framework-wenxin + + framework-out-interface + + + http://www.example.com + + diff --git a/day02/sfbx-gateway/gateway-app/Dockerfile b/day02/sfbx-gateway/gateway-app/Dockerfile new file mode 100644 index 0000000..f7ec4db --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /gateway-app +ARG PACKAGE_PATH=./target/gateway-app.jar +ADD ${PACKAGE_PATH:-./} gateway-app.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m\ +-Dspring.profiles.active=test" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS gateway-app.jar"] \ No newline at end of file diff --git a/day02/sfbx-gateway/gateway-app/pom.xml b/day02/sfbx-gateway/gateway-app/pom.xml new file mode 100644 index 0000000..47fa406 --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/pom.xml @@ -0,0 +1,81 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-gateway + 2.0-SNAPSHOT + + + gateway-app + gateway-app + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.itheima.sfbx + framework-knife4j-gateway + + + com.itheima.sfbx + framework-gateway + + + + org.redisson + redisson-spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + gateway-app + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-gateway/gateway-app/src/main/java/com/itheima/sfbx/gateway/GatewayAppStart.java b/day02/sfbx-gateway/gateway-app/src/main/java/com/itheima/sfbx/gateway/GatewayAppStart.java new file mode 100644 index 0000000..35366c1 --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/src/main/java/com/itheima/sfbx/gateway/GatewayAppStart.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.gateway; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @Description:小程序项目启动类 + */ +@SpringBootApplication(scanBasePackages = "com.itheima.sfbx") +public class GatewayAppStart { + + public static void main(String[] args) { + SpringApplication.run(GatewayAppStart.class, args); + } +} diff --git a/day02/sfbx-gateway/gateway-app/src/main/resources/banner.txt b/day02/sfbx-gateway/gateway-app/src/main/resources/banner.txt new file mode 100644 index 0000000..a8ff8c3 --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 传智教育---献给可爱的传智人 :: diff --git a/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap-test.yml b/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..f94c965 --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap-test.yml @@ -0,0 +1,48 @@ +#服务配置 +server: + #端口 + port: 7068 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + config: + activate: + on-profile: + - test + #应用配置 + application: + #应用名称 + name: gateway-app + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-security.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-log.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap.yml b/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..1302a44 --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/src/main/resources/bootstrap.yml @@ -0,0 +1,42 @@ +#服务配置 +server: + #端口 + port: 7068 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + profiles: + active: dev + #应用配置 + application: + #应用名称 + name: gateway-app + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-security.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-log.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-gateway/gateway-app/src/main/resources/logback.xml b/day02/sfbx-gateway/gateway-app/src/main/resources/logback.xml new file mode 100644 index 0000000..ead43bf --- /dev/null +++ b/day02/sfbx-gateway/gateway-app/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/gateway-app-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-gateway/gateway-mgt/Dockerfile b/day02/sfbx-gateway/gateway-mgt/Dockerfile new file mode 100644 index 0000000..58250c5 --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/Dockerfile @@ -0,0 +1,20 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /gateway-mgt +ARG PACKAGE_PATH=./target/gateway-mgt.jar +ADD ${PACKAGE_PATH:-./} gateway-mgt.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS gateway-mgt.jar"] \ No newline at end of file diff --git a/day02/sfbx-gateway/gateway-mgt/pom.xml b/day02/sfbx-gateway/gateway-mgt/pom.xml new file mode 100644 index 0000000..05fd031 --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/pom.xml @@ -0,0 +1,83 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-gateway + 2.0-SNAPSHOT + + + gateway-mgt + gateway-mgt + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.itheima.sfbx + framework-knife4j-gateway + + + + com.itheima.sfbx + framework-gateway + + + + + org.redisson + redisson-spring-boot-starter + + + org.springframework.boot + spring-boot-starter-web + + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + gateway-mgt + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-gateway/gateway-mgt/src/main/java/com/itheima/sfbx/gateway/GatewayMgtStart.java b/day02/sfbx-gateway/gateway-mgt/src/main/java/com/itheima/sfbx/gateway/GatewayMgtStart.java new file mode 100644 index 0000000..38f9c5e --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/src/main/java/com/itheima/sfbx/gateway/GatewayMgtStart.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.gateway; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * @Description:管理后端项目启动类 + */ +@SpringBootApplication(scanBasePackages = "com.itheima.sfbx") +public class GatewayMgtStart { + + public static void main(String[] args) { + SpringApplication.run(GatewayMgtStart.class, args); + } +} diff --git a/day02/sfbx-gateway/gateway-mgt/src/main/resources/banner.txt b/day02/sfbx-gateway/gateway-mgt/src/main/resources/banner.txt new file mode 100644 index 0000000..a8ff8c3 --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 传智教育---献给可爱的传智人 :: diff --git a/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap-test.yml b/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..7fbff56 --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap-test.yml @@ -0,0 +1,51 @@ +#服务配置 +server: + #端口 + port: 7069 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + mvc: + pathmatch: + matching-strategy: ant_path_matcher + main: + allow-bean-definition-overriding: true + allow-circular-references: true + config: + activate: + on-profile: + - test + #应用配置 + application: + #应用名称 + name: gateway-mgt + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-security.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-log.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap.yml b/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..6514665 --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/src/main/resources/bootstrap.yml @@ -0,0 +1,45 @@ +#服务配置 +server: + #端口 + port: 7069 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + mvc: + pathmatch: + matching-strategy: ant_path_matcher + main: + allow-bean-definition-overriding: true + allow-circular-references: true + profiles: + active: dev + #应用配置 + application: + #应用名称 + name: gateway-mgt + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-security.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-log.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-gateway/gateway-mgt/src/main/resources/logback.xml b/day02/sfbx-gateway/gateway-mgt/src/main/resources/logback.xml new file mode 100644 index 0000000..ad21fdf --- /dev/null +++ b/day02/sfbx-gateway/gateway-mgt/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/gateway-mgt-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-gateway/pom.xml b/day02/sfbx-gateway/pom.xml new file mode 100644 index 0000000..6d442ff --- /dev/null +++ b/day02/sfbx-gateway/pom.xml @@ -0,0 +1,20 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-gateway + pom + sfbx-gateway + + gateway-mgt + gateway-app + + + diff --git a/day02/sfbx-insurance/insurance-app/Dockerfile b/day02/sfbx-insurance/insurance-app/Dockerfile new file mode 100644 index 0000000..289d0a1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/Dockerfile @@ -0,0 +1,20 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /insurance-app +ARG PACKAGE_PATH=./target/insurance-app.jar +ADD ${PACKAGE_PATH:-./} insurance-app.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS insurance-app.jar"] \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-app/pom.xml b/day02/sfbx-insurance/insurance-app/pom.xml new file mode 100644 index 0000000..d24fda1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/pom.xml @@ -0,0 +1,89 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-insurance + 2.0-SNAPSHOT + + + insurance-app + insurance-app + + http://www.example.com + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.squareup.okhttp3 + okhttp + + + com.itheima.sfbx + framework-task-executor + + + com.itheima.sfbx + framework-web + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + com.itheima.sfbx + framework-knife4j-web + + + com.itheima.sfbx + insurance-service + + + junit + junit + test + + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + insurance-app + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/InsuranceAppStart.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/InsuranceAppStart.java new file mode 100644 index 0000000..a79fbb7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/InsuranceAppStart.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.insurance; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 小程序端对于保险的启动类 + */ +@SpringBootApplication(scanBasePackages = "com.itheima.sfbx") +public class InsuranceAppStart { + + public static void main(String[] args) { + SpringApplication.run(InsuranceAppStart.class); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java new file mode 100644 index 0000000..894df3c --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.binding; + +import com.itheima.sfbx.framework.rabbitmq.source.FileSource; +import com.itheima.sfbx.framework.rabbitmq.source.WarrantySource; +import org.springframework.cloud.stream.annotation.EnableBinding; + +/** + * @ClassName Binding.java + * @Description 绑定文件发送者声明 + */ +@EnableBinding({WarrantySource.class}) +public class SourceBinding { +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/AppSelfSelectionController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/AppSelfSelectionController.java new file mode 100644 index 0000000..41ddbc4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/AppSelfSelectionController.java @@ -0,0 +1,88 @@ +package com.itheima.sfbx.insurance.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.service.IBrowsingHistoryService; +import com.itheima.sfbx.insurance.service.ISearchRecordService; +import com.itheima.sfbx.insurance.service.ISelfSelectionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName AppSelfSelectionController.java + * @Description 自选 + */ +@Slf4j +@Api(tags = "自选") +@RestController +@RequestMapping("app-self-selection") +public class AppSelfSelectionController { + + @Autowired + private ISelfSelectionService selfSelectionService; + + @Autowired + private IBrowsingHistoryService browsingHistoryService; + + @Autowired + private ISearchRecordService searchRecordService; + + + /*** + * @description 添加自选 + * @param selfSelectionVO + * @return + */ + @PostMapping("selection-insure") + @ApiOperation(value = "添加自选保险",notes = "添加自选保险") + public ResponseResult selfSelectionInsuer(@RequestBody SelfSelectionVO selfSelectionVO){ + SelfSelectionVO res = selfSelectionService.save(selfSelectionVO); + return ResponseResultBuild.successBuild(res); + } + + /*** + * @description 删除自选 + * @param selfSelectionVO + * @return + */ + @DeleteMapping("selection-insure") + @ApiOperation(value = "删除自选保险",notes = "删除自选保险") + public ResponseResult delSelectionInsuer(@RequestBody SelfSelectionVO selfSelectionVO){ + Boolean flag = selfSelectionService.delete(selfSelectionVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 我的自选 + * @return + */ + @PostMapping("find-self-selection-insure") + @ApiOperation(value = "我的自选",notes = "我的自选") + public ResponseResult> findSelfSelectionInsure(){ + List res = selfSelectionService.findMySelection(SubjectContent.getUserVO()); + return ResponseResultBuild.successBuild(res); + } + + + + /*** + * @description 最近浏览 + * @return + */ + @PostMapping("find-history") + @ApiOperation(value = "最近的浏览",notes = "查询最近的浏览记录") + public ResponseResult> findMyHistory(){ + UserVO userVO = SubjectContent.getUserVO(); + List res = searchRecordService.findMyHistory(userVO); + return ResponseResultBuild.successBuild(res); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/CombinationInfoController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/CombinationInfoController.java new file mode 100644 index 0000000..3288afa --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/CombinationInfoController.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CombinationInsuranceVO; +import com.itheima.sfbx.insurance.dto.CombinationVO; +import com.itheima.sfbx.insurance.dto.CombinationDetailVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.service.ICombinationInsuranceService; +import com.itheima.sfbx.insurance.service.ICombinationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName IndexController.java + * @Description 保险方案详情 + */ +@Slf4j +@Api(tags = "保险方案详情") +@RestController +@RequestMapping("combination-info") +public class CombinationInfoController { + + @Autowired + private ICombinationInsuranceService combinationService; + + /** + * 首页保险方案查询 + * @return + */ + @PostMapping("find-combination-index") + @ApiOperation(value = "首页保险方案",notes = "首页保险方案") + public ResponseResult> findCombinationIndex() { + return ResponseResultBuild.successBuild(combinationService.findPage(CombinationInsuranceVO.builder().dataState(SuperConstant.DATA_STATE_0).build(),0,5)); + } + + /** + *保险方案详情页-->tab_combination-->tab_combination_insurance-->tab_insurance-->tab_insurance_plan-->tab_plan_safeguard + */ + @PostMapping("find-combination/{id}") + @ApiOperation(value = "保险方案详情",notes = "保险方案详情") + @ApiImplicitParam(name = "id",value = "保险方案id",required = true,dataType = "String") + public ResponseResult findCombination(@PathVariable("id") String id) { + return ResponseResultBuild.successBuild(combinationService.findById(id)); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/IndexController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/IndexController.java new file mode 100644 index 0000000..1ec7fc1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/IndexController.java @@ -0,0 +1,182 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.category.CategoryConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.dto.BannerVO; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.itheima.sfbx.insurance.dto.CombinationVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.service.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName IndexController.java + * @Description 销售平台首页 + */ +@Slf4j +@Api(tags = "销售平台首页") +@RestController +@RequestMapping("index") +public class IndexController { + + @Autowired + private ICategoryService categoryService; + + @Autowired + private IInsuranceService insuranceService; + + @Autowired + private IInsurancePlanService iInsurancePlanService; + + @Autowired + private ICombinationService combinationService; + + @Autowired + IBannerService bannerService; + + /** + * @Description 分类树形 + * @param categoryVO 分类对象 + * @return + */ + @PostMapping("tree") + @ApiOperation(value = "分类树形",notes = "分类树形") + @ApiImplicitParam(name = "categoryVO",value = "分类对象",required = false,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryType","categoryVO.checkedCategoryNos"}) + public ResponseResult categoryTreeVO(@RequestBody CategoryVO categoryVO) { + TreeVO treeVO = categoryService.categoryTreeVO(categoryVO.getParentCategoryNo(), categoryVO.getCategoryType(),categoryVO.getCheckedCategoryNos()); + return ResponseResultBuild.successBuild(treeVO); + } + + /** + * 获取所有的推荐分类 + * + * @return List + * @description 获取首页分类-->tab_category-->category_type:1 + */ + @ApiOperation(value = "产品分类", notes = "产品分类") + @PostMapping("/find-index-category-product") + public ResponseResult> findIndexCategory() { + List nodeFloors = Lists.newArrayList(2L); + CategoryVO categoryVO = CategoryVO.builder(). + categoryType(CategoryConstant.PRODUCT_TYPE). + dataState(CategoryConstant.DATA_STATE_0). + showIndex(CategoryConstant.SHOW_INDEX_STATE_0). + build(); + categoryVO.setNodeFloors(nodeFloors); + return ResponseResultBuild.successBuild(categoryService.findList(categoryVO)); + } + + /** + * @description 热点保险推荐-找到每个分类下售卖的最好的一个保险 + * 热点保险推荐-->tab_insurance-->show_index:0并且是上架且有效状态--->附件调用fegin-->file + * @return: Page + */ + @PostMapping("find-hotspot-insurePage") + @ApiOperation(value = "热点保险推荐", notes = "APP首页热点保险推荐分页") + public ResponseResult> findHotspotInsurePage() { + InsuranceVO insuranceVO = InsuranceVO.builder(). + showIndex(InsureConstant.SHOW_INDEX_STATE_0). + dataState(InsureConstant.DATA_STATE_0). + build(); + Page page = insuranceService.findPage(insuranceVO, 0, 10); + return ResponseResultBuild.successBuild(page.getRecords()); + } + + /** + * 获取所有的产品分类 + * 产品分类-->tab_category-->category_type:1 + */ + @ApiOperation(value = "推荐分类", notes = "推荐分类") + @PostMapping("/find-index-category-recommend") + public ResponseResult> findCategoryRecommend() { + CategoryVO categoryVO = CategoryVO.builder(). + categoryType(CategoryConstant.RECOMMEND_TYPE). + dataState(CategoryConstant.DATA_STATE_0). + showIndex(CategoryConstant.SHOW_INDEX_STATE_0). + build(); + return ResponseResultBuild.successBuild(categoryService.findList(categoryVO)); + } + + //推荐保险列表-->tab_insurance[tab_insurance_plan价格排序]-->optimization升序再按创建时间--->附件调用fegin-->file + + /** + * @description 推荐保险列表- + * 推荐保险列表-->tab_insurance[tab_insurance_plan价格排序]-->optimization升序再按创建时间--->附件调用fegin-->file + * @return: Page + */ + @PostMapping("recommend-insure-list") + @ApiOperation(value = "推荐保险列表", notes = "推荐保险列表") + @ApiImplicitParam(name = "recommendCategoryNo", value = "保险类型", required = false, dataType = "String") + public ResponseResult> recommendInsureList(@RequestParam(value = "recommendCategoryNo",required = false) String recommendCategoryNo) { + InsuranceVO insuranceVO = InsuranceVO.builder(). + showIndex(InsureConstant.SHOW_INDEX_STATE_0). + dataState(InsureConstant.DATA_STATE_0). + build(); + if (!EmptyUtil.isNullOrEmpty(recommendCategoryNo)){ + insuranceVO.setRecommendCategoryNo(Long.valueOf(recommendCategoryNo)); + } + Page page = insuranceService.findPage(insuranceVO, 0, 10); + return ResponseResultBuild.successBuild(page.getRecords()); + } + + /** + * 金牌好品 + * @param category 保险分类编号 + * @description 金牌好品、安心培 + * -->tab_insurance-->optimization 或者 relieved + */ + @PostMapping("glod-insurance-list/{category}") + @ApiOperation(value = "金牌好品", notes = "金牌好品") + @ApiImplicitParam(name = "category", value = "保险分类编号", required = true, dataType = "Long", paramType = "path", example = "分类接口中获得的内容") + public ResponseResult> glodInsurancelist(@PathVariable("category") String category) { + InsuranceVO insuranceVO = InsuranceVO.builder(). + dataState(SuperConstant.DATA_STATE_0). + categoryNo(Long.valueOf(category)). + goldSelection(InsuranceConstant.GOLDSELECTION_0). + build(); + Page insuranceVOPage = insuranceService.findPage(insuranceVO, 0, 10); + return ResponseResultBuild.successBuild(insuranceVOPage.getRecords()); + } + + /** + * @description 保险方案 + */ + @PostMapping("insurance-plan") + @ApiOperation(value = "保险方案", notes = "保险方案") + public ResponseResult> insurancePlan() { + Page page = combinationService.findPage(CombinationVO.builder().dataState(SuperConstant.DATA_STATE_0).build(), 0, 6); + return ResponseResultBuild.successBuild(page.getRecords()); + } + + /*** + * @description 多条件查询列表 + * @return List + */ + @GetMapping("list") + @ApiOperation(value = "banner查询列表",notes = "banner查询列表") + public ResponseResult> bannerList() { + BannerVO bannerVO = BannerVO.builder() + .dataState(SuperConstant.DATA_STATE_0) + .build(); + List bannerVOList = bannerService.findList(bannerVO); + return ResponseResultBuild.successBuild(bannerVOList); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/InsureController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/InsureController.java new file mode 100644 index 0000000..aa719a8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/InsureController.java @@ -0,0 +1,180 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.trade.TradeVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.rule.AccessRuleDTO; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.IRuleService; +import com.itheima.sfbx.insurance.service.IWarrantyOrderService; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @ClassName InsureController.java + * @Description 投保 + */ +@Slf4j +@Api(tags = "保险投保") +@RestController +@RequestMapping("insure") +public class InsureController { + + @Autowired + IWarrantyService warrantyService; + + @Autowired + IWarrantyOrderService warrantyOrderService; + + @Autowired + private IInsuranceService insuranceService; + + /*** + * @description 保险投保 + * @param doInsureVo 保险产品VO对象 + * @return 保险合同 + */ + @PostMapping("do-insure") + @ApiOperation(value = "保险投保",notes = "保险投保") + @ApiImplicitParam(name = "doInsureVo",value = "保险产品详情Vo对象",required = true,dataType = "DoInsureVo") + public ResponseResult doInsure(@RequestBody DoInsureVo doInsureVo) { + WarrantyVO warrantyVO = warrantyService.doInsure(doInsureVo); + return ResponseResultBuild.successBuild(warrantyVO); + } + + /** + * @Description 查询保险合同及未支付的合同订单 + * @param warrantyId 保险合同ID + * @return WarrantyVO + */ + @PostMapping("warranty/{warrantyId}") + @ApiOperation(value = "查询合同",notes = "查询合同") + @ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String") + public ResponseResult findWarranty(@PathVariable("warrantyId") String warrantyId) { + WarrantyVO warrantyVOResult = warrantyService.findWarranty(warrantyId); + return ResponseResultBuild.successBuild(warrantyVOResult); + } + + + /*** + * @description 保费计算 + * @param doInsureVo 投保试算对象 + * @return 投入型:最终本期投保金额,返回0则表示不符合条件 + */ + @PostMapping("do-premium") + @ApiOperation(value = "保费计算",notes = "保费计算") + @ApiImplicitParam(name = "doInsureVo",value = "投保试算对象",required = true,dataType = "DoInsureVo") + public ResponseResult doPremium(@RequestBody DoInsureVo doInsureVo) { + String priceBuy= insuranceService.doPremium(doInsureVo); + return ResponseResultBuild.successBuild(priceBuy); + } + + /*** + * @description 理财收益 + * @param doInsureVo 投保试算对象 + * @return 理财型:最终收益,返回0则表示不符合条件 + */ + @PostMapping("do-earnings") + @ApiOperation(value = "收益计算",notes = "收益计算") + @ApiImplicitParam(name = "doInsureVo",value = "投保试算对象",required = true,dataType = "DoInsureVo") + public ResponseResult doEarnings(@RequestBody DoInsureVo doInsureVo) { + EarningVO earningVO= insuranceService.doEarnings(doInsureVo); + return ResponseResultBuild.successBuild(earningVO); + } + + /*** + * @description 保险支付:一次性支付 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return 支付会话签名 + */ + @PostMapping("do-payment/{warrantyOrderId}/{tradingChannel}") + @ApiOperation(value = "一次性支付",notes = "一次性支付") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "String"), + @ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String") + }) + public ResponseResult doPayment(@PathVariable("warrantyOrderId")String warrantyOrderId, + @PathVariable("tradingChannel")String tradingChannel) { + return ResponseResultBuild.successBuild(warrantyOrderService.doPayment(warrantyOrderId,tradingChannel)); + } + + /*** + * @description 关闭订单 + * @param tradeOrderNo 交易订单号 + * @param tradingChannel 支付渠道 + * @return 支付会话签名 + */ + @PostMapping("do-close/{tradeOrderNo}/{tradingChannel}") + @ApiOperation(value = "关闭订单",notes = "关闭订单") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "tradeOrderNo",value = "交易订单号",required = true,dataType = "String"), + @ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String") + }) + public ResponseResult doClose(@PathVariable("tradeOrderNo")String tradeOrderNo, + @PathVariable("tradingChannel")String tradingChannel) { + return ResponseResultBuild.successBuild(warrantyOrderService.doClose(tradeOrderNo,tradingChannel)); + } + + /*** + * @description 保险支付:独立签约 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return 签约唤醒签名 + */ + @PostMapping("sign-contract/{warrantyOrderId}/{tradingChannel}") + @ApiOperation(value = "独立签约",notes = "独立签约") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"), + @ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String") + }) + public ResponseResult signContract(@PathVariable("warrantyOrderId")String warrantyOrderId, + @PathVariable("tradingChannel")String tradingChannel) { + return ResponseResultBuild.successBuild(warrantyOrderService.signContract(warrantyOrderId,tradingChannel)); + } + + /*** + * @description 保险支付:签约同步,并首次扣款 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @param agreementNo 支付签约号 + * @return 签约唤醒签名 + */ + @PostMapping("sign-contract-sync/{warrantyOrderId}/{tradingChannel}/{agreementNo}") + @ApiOperation(value = "签约同步",notes = "签约同步") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"), + @ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String"), + @ApiImplicitParam(paramType = "path",name = "agreementNo",value = "支付签约号",required = true,dataType = "String") + }) + public ResponseResult signContractSync(@PathVariable("warrantyOrderId")String warrantyOrderId, + @PathVariable("tradingChannel")String tradingChannel, + @PathVariable("agreementNo")String agreementNo) { + return ResponseResultBuild.successBuild(warrantyOrderService.signContractSync(warrantyOrderId,tradingChannel,agreementNo)); + } + + /*** + * @description 保险支付:关闭签约 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return 支付会话签名 + */ + @PostMapping("do-close-sign-contract/{warrantyOrderId}/{tradingChannel}") + @ApiOperation(value = "关闭签约",notes = "关闭签约") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "path",name = "warrantyOrderId",value = "合同保单Id",required = true,dataType = "Long"), + @ApiImplicitParam(paramType = "path",name = "tradingChannel",value = "支付渠道",required = true,dataType = "String") + }) + public ResponseResult doCloseSignContract(@PathVariable("warrantyOrderId")String warrantyOrderId, + @PathVariable("tradingChannel")String tradingChannel) { + return ResponseResultBuild.successBuild(warrantyOrderService.doCloseSignContract(warrantyOrderId,tradingChannel)); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineController.java new file mode 100644 index 0000000..b96e0e4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineController.java @@ -0,0 +1,237 @@ +package com.itheima.sfbx.insurance.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.security.CustomerVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.service.ICustomerCardService; +import com.itheima.sfbx.insurance.service.ICustomerInfoService; +import com.itheima.sfbx.insurance.service.ICustomerRelationService; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import com.itheima.sfbx.security.feign.CustomerFeign; +import com.itheima.sfbx.wenxin.WenXinService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName MineController.java + * @Description 我的 + */ +@Slf4j +@Api(tags = "我的tab页") +@RestController +@RequestMapping("mined") +public class MineController { + + @Autowired + private CustomerFeign customerFeign; + + @Autowired + private ICustomerInfoService customerInfoService; + + @Autowired + private ICustomerCardService customerCardService; + + @Autowired + private ICustomerRelationService customerRelationService; + + @Autowired + private WenXinService wenXinService; + + /** + * 01、注册页面:调用security-interface中的CustomerFeign接口 + */ + @PostMapping("register") + @ApiOperation(value = "注册", notes = "注册") + @ApiImplicitParam(name = "customerVO", value = "客户对象VO", dataType = "CustomerVO") + public ResponseResult register(@RequestBody CustomerVO customerVO) { + UserVO userVO = customerFeign.registerUser(customerVO); + userVO.setPassword(""); + return ResponseResultBuild.successBuild(userVO); + } + + //03、重置密码:必须登录才能重置密码,必须是完成手机号码补充内容 + @PostMapping("reset-password") + @ApiOperation(value = "重置密码", notes = "重置密码") + public ResponseResult resetPassword() { + UserVO userVO = SubjectContent.getUserVO(); + return ResponseResultBuild.successBuild(customerInfoService.resetPassword(userVO)); + } + + /** + * 07、我的关系-->tab_customer_relation + */ + @PostMapping("my-relation") + @ApiOperation(value = "根据当前登录人信息获取关系网", notes = "根据当前登录人信息获取关系网") + public ResponseResult> myRelation() { + UserVO userVO = SubjectContent.getUserVO(); + CustomerRelationVO relationVO = CustomerRelationVO.builder() + .customerId(userVO.getId()) + .dataState(SuperConstant.DATA_STATE_0) + .build(); + List res = customerRelationService.myRelation(relationVO); + return ResponseResultBuild.successBuild(res); + } + + /** + * 根据关系字段获取对应的亲属 + * + * @param fields + */ + @PostMapping("my-relation-field/{relationgFields}") + @ApiOperation(value = "根据关系字段获取当前登录人信息获取关系网", notes = "根据关系字段获取当前登录人信息获取关系网") + @ApiImplicitParam(name = "relationgFields", value = "关系字段列表(用逗号分隔)", required = true, dataType = "String") + public ResponseResult> myRelationsFields(@PathVariable("relationgFields") String fields) { + CustomerRelationVO relationVO = CustomerRelationVO.builder(). + dataState(SuperConstant.DATA_STATE_0). + customerId(SubjectContent.getUserVO().getId()). + relations(customerRelationService.getRelations(fields)). + build(); + List res = customerRelationService.myRelation(relationVO); + return ResponseResultBuild.successBuild(res); + } + + + + /** + * 根据关系字段获取对应的亲属 + */ + @PostMapping("ocr-access") + @ApiOperation(value = "获取百度云token", notes = "获取百度云token") + public ResponseResult myRelationsFields() { + BaiduCloudTokenVO ocrToken = customerInfoService.getOcrToken(SubjectContent.getUserVO()); + return ResponseResultBuild.successBuild(ocrToken); + } + + @Autowired + IWarrantyService warrantyService; + + /*** + * @description 我的保单合同列表 + * @return 保单列表 + */ + @PostMapping("my-warrantys-nums") + @ApiOperation(value = "我的保单数量", notes = "我的保单数量") + public ResponseResult myWarrantyNums(){ + MyWarrantyInfoVO res = warrantyService.myWarrantyNums(SubjectContent.getUserVO()); + return ResponseResultBuild.successBuild(res); + } + + /*** + * @description 我的保单合同列表 + * @return 保单列表 + */ + @PostMapping("my-warrantys") + @ApiOperation(value = "我的保单列表", notes = "我的保单列表") + public ResponseResult> myWarrantyVOs(@RequestBody(required = false) CustomerRelationVO customerRelationVO){ + List warrantyVOs = warrantyService.myWarrantyVOs(SubjectContent.getUserVO(),customerRelationVO); + return ResponseResultBuild.successBuild(warrantyVOs); + } + + /** + * @Description 保单详情 + * @param warrantyId 保险合同ID + * @return WarrantyVO + */ + @PostMapping("detail/{warrantyId}") + @ApiOperation(value = "保单详情",notes = "保单详情") + @ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String") + public ResponseResult createWarranty(@PathVariable("warrantyId") String warrantyId) { + WarrantyVO warrantyVOResult = warrantyService.findById(warrantyId); + return ResponseResultBuild.successBuild(warrantyVOResult); + } + + /** + * 根据关系字段获取对应的亲属 + */ + @PostMapping("find-risk-solution") + @ApiOperation(value = "获取我的风险和解决方案", notes = "向文心一言请求风险和解决方案") + public ResponseResult findRiskAndSolution() { + String question = wenXinService.askQuestion(null); + return ResponseResultBuild.successBuild(question); + } + + /** + * 银行卡列表 + */ + @PostMapping("bank-card-list") + @ApiOperation(value = "我的银行卡列表", notes = "我的银行卡列表") + public ResponseResult> bankCardList() { + CustomerCardVO customerCardVO = CustomerCardVO.builder(). + dataState(SuperConstant.DATA_STATE_0). + customerId(String.valueOf(SubjectContent.getUserVO().getId())). + build(); + List res = customerCardService.bankCardList(customerCardVO); + return ResponseResultBuild.successBuild(res); + } + + /** + * 添加银行卡 + */ + @PostMapping("bank-card") + @ApiOperation(value = "添加银行卡", notes = "添加银行卡") + public ResponseResult saveBankCard(@RequestBody CustomerCardVO customerCardVO) { + CustomerCardVO res = customerCardService.saveBankCard(customerCardVO); + return ResponseResultBuild.successBuild(res); + } + + /** + * 人脸识别认证 + */ + @PostMapping("face-check") + @ApiOperation(value = "人脸识别认证", notes = "人脸识别认证") + public ResponseResult faceCheck() { + Boolean res = customerInfoService.faceCheck(); + return ResponseResultBuild.successBuild(res); + } + + + /** + * 身份证号存储 + */ + @PostMapping("id-card") + @ApiOperation(value = "身份证号存储", notes = "身份证号存储") + public ResponseResult idCard(@RequestBody CustomerInfoVO customerInfo) { + CustomerInfoVO res = customerInfoService.idCard(customerInfo); + return ResponseResultBuild.successBuild(res); + } + + /** + * 身份证号存储 + */ + @PostMapping("id-card-info") + @ApiOperation(value = "身份证信息", notes = "身份证信息") + public ResponseResult idCardInfo() { + CustomerInfoVO res = customerInfoService.idCardInfo(); + return ResponseResultBuild.successBuild(res); + } + + /** + * 修改默认使用银行卡 + */ + @PostMapping("default-bank-card/{customerCardId}") + @ApiOperation(value = "修改默认使用银行卡", notes = "修改默认使用银行卡") + public ResponseResult defaultBankCard(@PathVariable("customerCardId") String customerCardId) { + CustomerCardVO res = customerCardService.defaultBankCard(customerCardId); + return ResponseResultBuild.successBuild(res); + } + + /** + * 解绑银行卡 + */ + @PostMapping("remove-bank-card") + @ApiOperation(value = "解绑银行卡", notes = "解绑银行卡") + public ResponseResult removeBankCarrd(@RequestBody CustomerCardVO customerCardVO) { + CustomerCardVO res = customerCardService.removeBankCard(customerCardVO); + return ResponseResultBuild.successBuild(res); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineHomeController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineHomeController.java new file mode 100644 index 0000000..d442bf1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/MineHomeController.java @@ -0,0 +1,107 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.dto.HomePeopleVO; +import com.itheima.sfbx.insurance.dto.SelfWarrantyVO; +import com.itheima.sfbx.insurance.service.ICustomerRelationService; +import com.itheima.sfbx.insurance.service.IRuleService; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.validation.BindingResult; +import org.springframework.validation.FieldError; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.validation.Valid; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @ClassName WarrantyController.java + * @Description 家庭保障 + */ +@Slf4j +@Api(tags = "我的家庭") +@RestController +@RequestMapping("mine-home") +public class MineHomeController { + + @Autowired + private IWarrantyService warrantyService; + + @Autowired + private IRuleService ruleService; + + @Autowired + private ICustomerRelationService customerRelationService; + + /** + * 获取我的保单 + */ + @PostMapping("home-all-warranty-order") + @ApiOperation(value = "家庭全部保单数量", notes = "家庭全部保单数量") + public ResponseResult myRelationsFields() { + return ResponseResultBuild.successBuild(warrantyService.findMyWarrantyNums(SubjectContent.getUserVO())); + } + + /** + * 家庭人身保障 + */ + @PostMapping("home-people-safe") + @ApiOperation(value = "家庭人身保障", notes = "家庭人身保障") + public ResponseResult> homePeopleSafe() { + return ResponseResultBuild.successBuild(warrantyService.findHomeSafeInfo(SubjectContent.getUserVO())); + } + + /** + * 添加人物关系 + */ + @PostMapping("customer-relation") + @ApiOperation(value = "添加人物关系", notes = "添加人物关系") + @ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO") + public ResponseResult addCustomerRelation(@Valid @RequestBody CustomerRelationVO customerRelationVO, BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + return ResponseResultBuild.validateErrorBuild(null); + }else { + return ResponseResultBuild.successBuild(customerRelationService.save(customerRelationVO)); + } + } + + /** + * 修改人物关系 + */ + @PostMapping("update-customer-relation") + @ApiOperation(value = "修改人物关系", notes = "修改人物关系") + @ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO") + public ResponseResult updateHomePeopleSafe(@Valid @RequestBody CustomerRelationVO customerRelationVO,BindingResult bindingResult) { + if (bindingResult.hasErrors()) { + // 返回包含错误信息的响应 + return ResponseResultBuild.validateErrorBuild(null); + }else { + customerRelationService.update(customerRelationVO); + return ResponseResultBuild.successBuild(customerRelationVO); + } + } + + /** + * 添加人物关系 + */ + @PostMapping("delete-customer-relation") + @ApiOperation(value = "删除人物关系", notes = "删除人物关系") + @ApiImplicitParam(name = "customerRelationVO", value = "用户关系", required = false, dataType = "CustomerRelationVO") + @ApiOperationSupport(includeParameters = {"customerRelationVO.checkedIds"}) + public ResponseResult deleteHomePeopleSafe(@RequestBody CustomerRelationVO customerRelationVO) { + return ResponseResultBuild.successBuild(customerRelationService.delete(customerRelationVO.getCheckedIds())); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/ProductController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/ProductController.java new file mode 100644 index 0000000..c2f3aa9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/ProductController.java @@ -0,0 +1,93 @@ +package com.itheima.sfbx.insurance.web; + +import cn.hutool.core.collection.CollectionUtil; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.category.CategoryConstant; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.pojo.WarrantyOrder; +import com.itheima.sfbx.insurance.service.ICategoryConditionService; +import com.itheima.sfbx.insurance.service.ICategoryService; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Collection; +import java.util.List; + +/** + * @ClassName ProductController.java + * @Description 产品 + */ +@Slf4j +@Api(tags = "产品") +@RestController +@RequestMapping("product") +public class ProductController { + + @Autowired + private ICategoryService categoryService; + + @Autowired + private ICategoryConditionService categoryConditionService; + + @Autowired + IInsuranceService insuranceService; + + /** + * @description 获取产品页面下的分类 + * @return TreeVO + */ + @ApiOperation(value = "查询产品页下的产品分类",notes = "查询产品页下的产品分类") + @PostMapping("/find-product-categorys") + public ResponseResult findCategoryByType() { + TreeVO treeVO = categoryService.categoryTreeVO(SuperConstant.ROOT_PARENT_ID, CategoryConstant.PRODUCT_TYPE, null); + return ResponseResultBuild.successBuild(treeVO); + } + + /*** + * @description 查询产品分类下筛选项目 + * @param categoryNo + * @return ResponseResult> + */ + @ApiOperation(value = "查询产品分类下筛选项目",notes = "查询产品分类下筛选项目") + @PostMapping("/find-condition/{categoryNo}") + public ResponseResult> findConditionByCategoryNo(@PathVariable(name = "categoryNo",required = false)String categoryNo) { + return ResponseResultBuild.successBuild(categoryConditionService.findConditionByType(categoryNo)); + } + + /*** + * @description 查询产品列表 + * @param insuranceVO 搜索对象 + * @return ResponseResult> + */ + @PostMapping("find-insurance-product") + @ApiOperation(value = "查询产品列表",notes = "查询产品列表") + public ResponseResult> findInsuranceProduct(@RequestBody InsuranceVO insuranceVO){ + insuranceVO.setInsuranceState(InsuranceConstant.INSURANCE_STATE_0); + return ResponseResultBuild.successBuild(insuranceService.findList(insuranceVO)); + } + + /*** + * @description 保险产品详情 + * @param insuranceId 保险id + * @return + */ + @PostMapping("find-insurance/{insuranceId}") + @ApiOperation(value = "保险产品详情",notes = "保险产品详情") + @ApiImplicitParam(name = "insuranceId",value = "保险id",required = true,dataType = "String") + public ResponseResult findInsuranceDetails(@PathVariable("insuranceId")String insuranceId){ + InsuranceVO insuranceVO = insuranceService.findById(insuranceId); + return ResponseResultBuild.successBuild(insuranceVO); + } + +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/RiskController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/RiskController.java new file mode 100644 index 0000000..797569a --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/RiskController.java @@ -0,0 +1,114 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.insurance.enums.RiskEnum; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.dto.RiskVO; +import com.itheima.sfbx.insurance.service.IRiskService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description:风险表响应接口 + */ +@Slf4j +@Api(tags = "风险表") +@RestController +@RequestMapping("risk") +public class RiskController { + + @Autowired + IRiskService riskService; + + /*** + * @description 多条件查询风险表分页 + * @param riskVO 风险表VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "风险表分页",notes = "风险表分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"}) + public ResponseResult> findRiskVOPage( + @RequestBody RiskVO riskVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page riskVOPage = riskService.findPage(riskVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(riskVOPage); + } + + /** + * @Description 保存风险表 + * @param riskVO 风险表VO对象 + * @return RiskVO + */ + @PutMapping + @ApiOperation(value = "保存Risk",notes = "添加Risk") + @ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO") + @ApiOperationSupport(includeParameters = {"riskVO.dataState","riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"}) + public ResponseResult createRisk(@RequestBody RiskVO riskVO) { + RiskVO riskVOResult = riskService.save(riskVO); + return ResponseResultBuild.successBuild(riskVOResult); + } + + /** + * @Description 修改风险表 + * @param riskVO 风险表VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改风险表",notes = "修改风险表") + @ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO") + @ApiOperationSupport(includeParameters = {"riskVO.id","riskVO.dataState","riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"}) + public ResponseResult updateRisk(@RequestBody RiskVO riskVO) { + Boolean flag = riskService.update(riskVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除风险表 + * @param riskVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除风险表",notes = "删除风险表") + @ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO") + @ApiOperationSupport(includeParameters = {"riskVO.checkedIds"}) + public ResponseResult deleteRisk(@RequestBody RiskVO riskVO) { + Boolean flag = riskService.delete(riskVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询风险表列表 + * @param riskVO 风险表VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询风险表列表",notes = "多条件查询风险表列表") + @ApiImplicitParam(name = "riskVO",value = "风险表VO对象",required = true,dataType = "RiskVO") + @ApiOperationSupport(includeParameters = {"riskVO.riskTypeKey","riskVO.riskTypeName","riskVO.riskKey","riskVO.riskName","riskVO.sortNo"}) + public ResponseResult> riskList(@RequestBody RiskVO riskVO) { + List riskVOList = riskService.findList(riskVO); + return ResponseResultBuild.successBuild(riskVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SaleTopInsuranceController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SaleTopInsuranceController.java new file mode 100644 index 0000000..561fe1f --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SaleTopInsuranceController.java @@ -0,0 +1,126 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.itheima.sfbx.insurance.dto.SaleTopInsuranceVO; +import com.itheima.sfbx.insurance.service.ICategoryService; +import com.itheima.sfbx.insurance.service.ISaleTopInsuranceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:响应接口 + */ +@Slf4j +@Api(tags = "热销榜") +@RestController +@RequestMapping("sale-top-insurance") +public class SaleTopInsuranceController { + + @Autowired + ISaleTopInsuranceService saleTopInsuranceService; + + @Autowired + ICategoryService categoryService; + + /*** + * @description 多条件查询分页 + * @param saleTopInsuranceVO VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "分页",notes = "分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"}) + public ResponseResult> findSaleTopInsuranceVOPage( + @RequestBody SaleTopInsuranceVO saleTopInsuranceVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page saleTopInsuranceVOPage = saleTopInsuranceService.findPage(saleTopInsuranceVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(saleTopInsuranceVOPage); + } + + /** + * @Description 保存 + * @param saleTopInsuranceVO VO对象 + * @return SaleTopInsuranceVO + */ + @PutMapping + @ApiOperation(value = "保存SaleTopInsurance",notes = "添加SaleTopInsurance") + @ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO") + @ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.dataState","saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"}) + public ResponseResult createSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) { + SaleTopInsuranceVO saleTopInsuranceVOResult = saleTopInsuranceService.save(saleTopInsuranceVO); + return ResponseResultBuild.successBuild(saleTopInsuranceVOResult); + } + + /** + * @Description 修改 + * @param saleTopInsuranceVO VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改",notes = "修改") + @ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO") + @ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.id","saleTopInsuranceVO.dataState","saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"}) + public ResponseResult updateSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) { + Boolean flag = saleTopInsuranceService.update(saleTopInsuranceVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除 + * @param saleTopInsuranceVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除",notes = "删除") + @ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO") + @ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkedIds"}) + public ResponseResult deleteSaleTopInsurance(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) { + Boolean flag = saleTopInsuranceService.delete(saleTopInsuranceVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询列表 + * @param saleTopInsuranceVO VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询列表",notes = "多条件查询列表") + @ApiImplicitParam(name = "saleTopInsuranceVO",value = "VO对象",required = true,dataType = "SaleTopInsuranceVO") + @ApiOperationSupport(includeParameters = {"saleTopInsuranceVO.checkRule","saleTopInsuranceVO.insuranceId","saleTopInsuranceVO.insuranceName","saleTopInsuranceVO.insuranceDetail","saleTopInsuranceVO.comment","saleTopInsuranceVO.remake","saleTopInsuranceVO.categoryNo","saleTopInsuranceVO.companyNo"}) + public ResponseResult> saleTopInsuranceList(@RequestBody SaleTopInsuranceVO saleTopInsuranceVO) { + List saleTopInsuranceVOList = saleTopInsuranceService.findList(saleTopInsuranceVO); + return ResponseResultBuild.successBuild(saleTopInsuranceVOList); + } + + + /*** + * @description 人种榜/险种榜分类 + * @return List + */ + @PostMapping("category-check-rule/{type}") + @ApiOperation(value = "人种/险种分类",notes = "人种/险种分类") + public ResponseResult> categoryCheckRule(@PathVariable("type")String type) { + List res = categoryService.categoryCheckRule(type); + return ResponseResultBuild.successBuild(res); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SearchIndexController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SearchIndexController.java new file mode 100644 index 0000000..624330f --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SearchIndexController.java @@ -0,0 +1,114 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.dto.SearchRecordVO; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.IInsuranceTopService; +import com.itheima.sfbx.insurance.service.ISearchRecordService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName SearchIndexController.java + * @Description 搜索提示框首页 + */ +@Slf4j +@Api(tags = "搜索提示框首页") +@RestController +@RequestMapping("search-index") +public class SearchIndexController { + + @Autowired + private ISearchRecordService searchRecordService; + + @Autowired + private IInsuranceTopService insuranceTopService; + + @Autowired + private IInsuranceService insuranceService; + + + /** + * 搜索历史-->tab_search_record-->SubjectContent[当前登录人] + * 只查询前5条记录 + */ + @PostMapping("find-search-record") + @ApiOperation(value = "搜索历史", notes = "搜索历史") + public ResponseResult> findSearchRecord() { + SearchRecordVO searchVO = SearchRecordVO.builder(). + createBy(SubjectContent.getUserVO().getId()). + dataState(SuperConstant.DATA_STATE_0). + build(); + List records = searchRecordService.findPage(searchVO, 0, 6).getRecords(); + return ResponseResultBuild.successBuild(records); + } + + /** + * 搜索历史-->tab_search_record-->SubjectContent[当前登录人] + * 只查询前5条记录 + */ + @PostMapping("clean-search-record") + @ApiOperation(value = "清空历史记录", notes = "清空历史记录") + public ResponseResult cleanSearchRecord() { + return ResponseResultBuild.successBuild(searchRecordService.cleanSearchRecord()); + } + + /** + * 热搜榜-->tab_search_record + */ + @PostMapping("/find-hot-search-record") + @ApiOperation(value = "热搜榜", notes = "热搜榜") + public ResponseResult> findHotSearchRecord() { + List records = searchRecordService.tindTopRecord(10); + return ResponseResultBuild.successBuild(records); + } + + /** + * 人气保险-->tab_insurance_top + */ + @PostMapping("find-popular-top-insurance") + @ApiOperation(value = "人气保险", notes = "人气保险") + public ResponseResult> findPopularTopInsurance() { + //默认条数 + Integer defaultNum = 3; + //30天内有效数据 + Integer dateLimit = 30; + //获取人气保险 + List topInsurance = insuranceTopService.findTopInsurance(defaultNum, dateLimit); + return ResponseResultBuild.successBuild(topInsurance); + } + + /*** + * @description 搜索保险 + * @param insuranceVO 保险名称 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("find-search-insure/{pageNum}/{pageSize}") + @ApiOperation(value = "搜索保险", notes = "搜索保险") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceVO", value = "保险搜索条件", dataType = "InsuranceVO"), + @ApiImplicitParam(name = "pageNum", value = "页码", example = "1", dataType = "Integer"), + @ApiImplicitParam(name = "pageSize", value = "每页条数", example = "10", dataType = "Integer") + }) + public ResponseResult> findSearchInsure( + @RequestBody InsuranceVO insuranceVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page insurePageVO = insuranceService.findPage(insuranceVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(insurePageVO); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java new file mode 100644 index 0000000..bbd3558 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java @@ -0,0 +1,129 @@ +package com.itheima.sfbx.insurance.web; + + +import com.alibaba.nacos.common.utils.MD5Utils; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import com.itheima.sfbx.insurance.service.DataExportService; +import com.itheima.sfbx.insurance.service.IRuleService; +import com.itheima.sfbx.insurance.service.ISickSearchRecordService; +import com.itheima.sfbx.insurance.service.ISickService; +import com.itheima.sfbx.insurance.service.impl.SickServiceImpl; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName SeekAdviceController.java + * @Description 健康咨询 + */ +@Slf4j +@Api(tags = "健康咨询") +@RestController +@RequestMapping("seek-advice") +public class SeekAdviceController { + + @Autowired + private ISickService sickService; + + @Autowired + private ISickSearchRecordService sickSearchRecordService; + + /** + * @description 医疗重疾类保险 健康咨询 + */ + @PostMapping("sick-type") + @ApiOperation(value = "疾病类型",notes = "疾病类型列表") + public ResponseResult> findSickType() { + return ResponseResultBuild.successBuild(sickService.findSickType()); + } + + /** + * @description 疾病添加 + */ + @ApiOperation(value = "添加疾病",notes = "添加疾病") + @PostMapping("sick-add") + public ResponseResult saveSick(@RequestBody SickVO sickVO) { + return ResponseResultBuild.successBuild(sickService.save(sickVO)); + } + + /** + * @description 疾病搜索 + */ + @ApiOperation(value = "疾病搜索",notes = "疾病搜索") + @PostMapping("sick-search") + public ResponseResult> searchSick(@RequestBody SickVO sickVO) { + return ResponseResultBuild.successBuild(sickService.searchSick(sickVO.getSickKeyName(), SubjectContent.getUserVO())); + } + + /** + * @description 热搜榜 + * 默认查询30天内搜索次数最多的疾病 + */ + @ApiOperation(value = "疾病热搜榜",notes = "30天内被搜索次数最多的疾病") + @PostMapping("hot-sick-list") + public ResponseResult> hotSickList() { + return ResponseResultBuild.successBuild(sickSearchRecordService.hotSickList()); + } + /** + * @description 常见疾病 + * 默认查询30天内搜索次数最多的疾病 + */ + @ApiOperation(value = "常见疾病",notes = "常见疾病") + @PostMapping("common-diseases") + public ResponseResult> commonDiseases() { + return ResponseResultBuild.successBuild(sickService.commonDiseases()); + } + + /** + * @description 医疗重疾类保险 健康咨询 + */ + @PostMapping("seek-advice-from-health") + @ApiOperation(value = "健康咨询",notes = "医疗重疾类保险:健康咨询") + @ApiImplicitParam(name = "seekAdviceVO",value = "健康咨询传入对象",required = true,dataType = "SeekAdviceVO") + public ResponseResult seekAdviceHealth(@RequestBody SeekAdviceVO seekAdviceVO) { + + return ResponseResultBuild.successBuild(sickService.seekAdviceHealth(seekAdviceVO)); + } + + /** + * @description 提交问卷选项 + */ + @PostMapping("submit-question-choose") + @ApiOperation(value = "提交问卷选项",notes = "用户点击确认无误后,提交用户的选项") + public ResponseResult submitQuestionChoose(@RequestBody AdviceHealthDTO healthTemplate) { + return ResponseResultBuild.successBuild(sickService.submitQuestionChoose(healthTemplate)); + } + + //=====================疾病数据导入===================== + + @Autowired + private DataExportService dataExportService; + + /** + * @description 提交问卷选项 + */ + @PostMapping("data-input") + public ResponseResult dataInport() { + return ResponseResultBuild.successBuild(dataExportService.dataInport()); + } + + + /** + * @description 数据修改 + */ + @PostMapping("data-update") + public ResponseResult dataUpdate() { + return ResponseResultBuild.successBuild(dataExportService.dataUpdate()); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/WorryFreeInsuranceController.java b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/WorryFreeInsuranceController.java new file mode 100644 index 0000000..2f0c6a0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/java/com/itheima/sfbx/insurance/web/WorryFreeInsuranceController.java @@ -0,0 +1,126 @@ +package com.itheima.sfbx.insurance.web; + +import cn.hutool.json.JSON; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO; +import com.itheima.sfbx.insurance.dto.WorryFreeInsuranceMatchVO; +import com.itheima.sfbx.insurance.dto.WorryFreeRiskItemVO; +import com.itheima.sfbx.insurance.dto.WorryFreeSafeguardQuotaVO; +import com.itheima.sfbx.insurance.service.*; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * WorryFreeInsuranceController + * + * @author: wgl + * @describe: 省心配controller + * @date: 2022/12/28 10:10 + */ +@Slf4j +@Api(tags = "省心配") +@RestController +@RequestMapping("worry-free-insurance") +public class WorryFreeInsuranceController { + + @Autowired + private IWorryFreeInsuranceService worryFreeInsuranceService; + + @Autowired + private IRuleService ruleService; + + @Autowired + private IWorryFreeRiskItemService worryFreeRiskItemService; + + @Autowired + private IWorryFreeFlowNodeService worryFreeFlowNodeService; + + @Autowired + private IWorryFreeSafeguardQuotaService worryFreeSafeguardQuotaService; + + @Autowired + private IWorryFreeInsuranceMatchService worryFreeInsuranceMatchService; + /** + * 省心配首页 + * @return + */ + @PostMapping("/index") + @ApiOperation(value = "省心配首页", notes = "省心配首页") + public String index() { + return "worryfree"; + } + + + /** + * 根据当前登录人从redis中获取对应的风险项 + * @return + */ + @PostMapping("/flow-node/{customerInfoId}") + @ApiOperation(value = "流程节点", notes = "流程节点") + @ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String") + public ResponseResult> flowNode(@PathVariable("customerInfoId") String customerInfoId) { + //获取流程节点数据 + List res = worryFreeFlowNodeService.flowNode(Long.valueOf(customerInfoId)); + return ResponseResultBuild.successBuild(res); + } + + + /** + * 根据当前登录人从redis中获取对应的风险项 + * @return + */ + @PostMapping("/safeguard-assess/{customerInfoId}") + @ApiOperation(value = "保障评估", notes = "保障评估") + @ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String") + public ResponseResult safeguardAssess(@PathVariable("customerInfoId") String customerInfoId) { + WorryFreeSafeguardQuotaVO res = worryFreeSafeguardQuotaService.findSaferQuota(Long.valueOf(customerInfoId)); + return ResponseResultBuild.successBuild(res); + } + + + /** + * 根据当前登录人从redis中获取对应的风险项 + * @return + */ + @PostMapping("/risk-analysis/{customerInfoId}") + @ApiOperation(value = "风险分析", notes = "获取风险分析结果") + @ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String") + public ResponseResult> findMyRiskItem(@PathVariable("customerInfoId") String customerInfoId) { + List res = worryFreeRiskItemService.findMyRiskItem(Long.valueOf(customerInfoId)); + return ResponseResultBuild.successBuild(res); + } + + + /** + * 开始结算接口 + * @return + */ + @PostMapping("/do-calculate") + @ApiOperation(value = "省心配核心:开始计算", notes = "省心配核心:开始计算") + public ResponseResult worryFree(@RequestBody WorryFreeCustomerInfoVO worryFreeCustomerInfoVO) { + ruleService.buildBaseParams(worryFreeCustomerInfoVO); + WorryFreeCustomerInfoVO res = ruleService.worryFreePairing(worryFreeCustomerInfoVO); + return ResponseResultBuild.successBuild(res); + } + + /** + * 获取推荐产品列表 + * @return + */ + @PostMapping("/product-list/{customerInfoId}") + @ApiOperation(value = "省心配核心:获取推荐产品列表", notes = "省心配核心:获取推荐产品列表") + @ApiImplicitParam(paramType = "path",name = "customerInfoId",value = "用户信息ID",example = "1",dataType = "String") + public ResponseResult> productList(@PathVariable("customerInfoId") String customerInfoId) { + List res = worryFreeInsuranceMatchService.productList(Long.valueOf(customerInfoId)); + return ResponseResultBuild.successBuild(res); + } +} diff --git a/day02/sfbx-insurance/insurance-app/src/main/resources/banner.txt b/day02/sfbx-insurance/insurance-app/src/main/resources/banner.txt new file mode 100644 index 0000000..a8ff8c3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 传智教育---献给可爱的传智人 :: diff --git a/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap-test.yml b/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..3992ff9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap-test.yml @@ -0,0 +1,57 @@ +#服务配置 +server: + #端口 + port: 7065 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + config: + activate: + on-profile: + - test + #应用配置 + application: + #应用名称 + name: insurance-app + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml +urule: + resporityServerUrl: http://localhost:8090 + knowledgeUpdateCycle: 1 \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap.yml b/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..d8ee36a --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/resources/bootstrap.yml @@ -0,0 +1,55 @@ +#服务配置 +server: + #端口 + port: 7065 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + profiles: + active: dev + #应用配置 + application: + #应用名称 + name: insurance-app + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-warranty.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml +urule: + resporityServerUrl: http://localhost:8090 + knowledgeUpdateCycle: 1 + diff --git a/day02/sfbx-insurance/insurance-app/src/main/resources/logback.xml b/day02/sfbx-insurance/insurance-app/src/main/resources/logback.xml new file mode 100644 index 0000000..0209770 --- /dev/null +++ b/day02/sfbx-insurance/insurance-app/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/insurance-app-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-insurance/insurance-interface/pom.xml b/day02/sfbx-insurance/insurance-interface/pom.xml new file mode 100644 index 0000000..debd227 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/pom.xml @@ -0,0 +1,25 @@ + + + + sfbx-insurance + com.itheima.sfbx + 2.0-SNAPSHOT + + 4.0.0 + + insurance-interface + + + 11 + 11 + + + + + com.itheima.sfbx + framework-feign + + + \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/config/InsuranceFeignConfig.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/config/InsuranceFeignConfig.java new file mode 100644 index 0000000..7ab005c --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/config/InsuranceFeignConfig.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.instance.config; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +/** +* @ClassName InsuranceFeignConfig.java +* @Description feign的最优化配置 +*/ +@EnableFeignClients(basePackages = "com.itheima.sfbx.instance.feign") +@Configuration +public class InsuranceFeignConfig { +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/AnalysisBusinessFeign.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/AnalysisBusinessFeign.java new file mode 100644 index 0000000..ea7c2ee --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/AnalysisBusinessFeign.java @@ -0,0 +1,47 @@ +package com.itheima.sfbx.instance.feign; + + +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.instance.hystrix.AnalysisBusinessHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PutMapping; + +import java.util.List; + + +/** + * AnalysisBusinessFeign + * + * @author: wgl + * @describe: 统计分析:业务数据统计分析feign服务 + * @date: 2022/12/28 10:10 + */ +@FeignClient(value = "insurance-mgt",fallback = AnalysisBusinessHystrix.class) +public interface AnalysisBusinessFeign { + + + /** + * 统计昨日保单数量DTO + * @return + */ + @PutMapping("analysis-feign/analysis-insurance") + AnalysisCustomerInsuranceDTO countCustomerInstance(); + + /** + * 统计:投保人性别统计 + * @return + */ + @PutMapping("analysis-feign/analysis-warranty-sex") + AnalysisCustomerSexDTO countWarrantySex(); + + + /** + * 投保统计:投保分类类型统计及投保数量统计 + * @return + */ + @PutMapping("analysis-feign/analysis-customer-insurance-type") + List countCustomerInstanceType(); +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/CategoryFeign.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/CategoryFeign.java new file mode 100644 index 0000000..e0dc031 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/CategoryFeign.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.instance.feign; + +import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO; +import com.itheima.sfbx.instance.hystrix.AnalysisBusinessHystrix; +import com.itheima.sfbx.instance.hystrix.CategoryHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * @Description:保险分类响应接口 + */ +@FeignClient(value = "insurance-mgt",fallback = CategoryHystrix.class) +public interface CategoryFeign { + + /*** + * @description 多条件查询保险分类列表 + * @param categoryVO 保险分类VO对象 + * @return List + */ + @PostMapping("category-feign/list") + public List categoryList(@RequestBody CategoryReportVO categoryVO); + +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/SaleReportFeign.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/SaleReportFeign.java new file mode 100644 index 0000000..3037660 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/SaleReportFeign.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.instance.feign; + +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.instance.hystrix.SaleReportHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; + +import java.util.List; + +/** + * @ClassName SaleReportFeign.java + * @Description 日投保明细服务接口 + */ +@FeignClient(value = "insurance-mgt",fallback = SaleReportHystrix.class) +public interface SaleReportFeign { + + /** + * 计划任务:日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("sale-report-feign/do-insure-detail-day/{reportTime}") + SaleReportDTO doInsureDetailDay(@PathVariable("reportTime")String reportTime); + + /** + * 计划任务:统计日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("sale-report-feign/do-insure-category/{reportTime}") + List doInsureCategory(@PathVariable("reportTime")String reportTime); +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/WarrantyFeign.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/WarrantyFeign.java new file mode 100644 index 0000000..c948273 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/feign/WarrantyFeign.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.instance.feign; + + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.instance.hystrix.WarrantyHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; + +import java.util.List; + + +/** + * WarrantyFeign + */ +@FeignClient(value = "insurance-mgt",fallback = WarrantyHystrix.class) +public interface WarrantyFeign { + + + /** + * 系统监听:清理合同保单 + * @return + */ + @PostMapping("warranty-feign/clean-warranty/{warrantyNo}") + public Boolean cleanWarranty(@PathVariable("warrantyNo") String warrantyNo); + + /** + * 计划任务:周期代扣 + * @return + */ + @PostMapping("warranty-feign/periodic-pay") + public Boolean periodicPay(); + + /** + * 系统监听:同步合同支付结果 + * @param orderNo WarrantyOrderVO的订单编号 + * @return + */ + @PostMapping("warranty-feign/sync-payment/{orderNo}/{tradeState}") + public Boolean syncPayment(@PathVariable("orderNo") String orderNo,@PathVariable("tradeState") String tradeState); + +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/AnalysisBusinessHystrix.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/AnalysisBusinessHystrix.java new file mode 100644 index 0000000..57fc8d8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/AnalysisBusinessHystrix.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.instance.hystrix; + +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.instance.feign.AnalysisBusinessFeign; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * AnalysisBusinessHystrix + * + * @author: wgl + * @describe: 业务部分统计分析 + * @date: 2022/12/28 10:10 + */ +@Component +public class AnalysisBusinessHystrix implements AnalysisBusinessFeign { + + + @Override + public AnalysisCustomerInsuranceDTO countCustomerInstance() { + return null; + } + + @Override + public AnalysisCustomerSexDTO countWarrantySex() { + return null; + } + + @Override + public List countCustomerInstanceType() { + return null; + } +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/CategoryHystrix.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/CategoryHystrix.java new file mode 100644 index 0000000..4ef46b7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/CategoryHystrix.java @@ -0,0 +1,21 @@ +package com.itheima.sfbx.instance.hystrix; + +import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO; +import com.itheima.sfbx.instance.feign.CategoryFeign; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +import java.util.List; + +/** + * @Description:保险分类响应接口 + */ +public class CategoryHystrix implements CategoryFeign { + + + @Override + public List categoryList(CategoryReportVO categoryVO) { + return null; + } +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/SaleReportHystrix.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/SaleReportHystrix.java new file mode 100644 index 0000000..cddfccb --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/SaleReportHystrix.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.instance.hystrix; + +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.instance.feign.SaleReportFeign; + +import java.util.List; + +/** + * @ClassName SaleReportFeignHystrix.java + * @Description TODO + */ +public class SaleReportHystrix implements SaleReportFeign { + + @Override + public SaleReportDTO doInsureDetailDay(String reportTime) { + return null; + } + + @Override + public List doInsureCategory(String reportTime) { + return null; + } +} diff --git a/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/WarrantyHystrix.java b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/WarrantyHystrix.java new file mode 100644 index 0000000..1c170d3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-interface/src/main/java/com/itheima/sfbx/instance/hystrix/WarrantyHystrix.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.instance.hystrix; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.instance.feign.AnalysisBusinessFeign; +import com.itheima.sfbx.instance.feign.WarrantyFeign; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * WarrantyFeign + */ +@Component +public class WarrantyHystrix implements WarrantyFeign { + + + @Override + public Boolean cleanWarranty(String warrantyNo) { + return null; + } + + @Override + public Boolean periodicPay() { + return null; + } + + @Override + public Boolean syncPayment(String orderNo, String tradeState) { + return null; + } + + +} diff --git a/day02/sfbx-insurance/insurance-mgt/Dockerfile b/day02/sfbx-insurance/insurance-mgt/Dockerfile new file mode 100644 index 0000000..5c4ba2a --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/Dockerfile @@ -0,0 +1,22 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /insurance-mgt +ARG PACKAGE_PATH=./target/insurance-mgt.jar +ADD ${PACKAGE_PATH:-./} insurance-mgt.jar + + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx512m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m\ +-Dspring.profiles.active=test" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS insurance-mgt.jar"] \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/pom.xml b/day02/sfbx-insurance/insurance-mgt/pom.xml new file mode 100644 index 0000000..eba1d59 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-insurance + 2.0-SNAPSHOT + + + insurance-mgt + insurance-mgt + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + com.squareup.okhttp3 + okhttp + + + com.itheima.sfbx + framework-task-executor + + + com.itheima.sfbx + framework-web + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + com.itheima.sfbx + framework-knife4j-web + + + com.itheima.sfbx + insurance-service + + + junit + junit + test + + + + + + src/main/resources + + **/*.yml + **/*.properties + **/*.xml + **/*.yaml + **/*.txt + + + + insurance-mgt + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/InsuranceMgtStart.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/InsuranceMgtStart.java new file mode 100644 index 0000000..0af8af8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/InsuranceMgtStart.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.insurance; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 后端管理界面中几乎所有管理功能对应的启动类 + */ +@SpringBootApplication(scanBasePackages = "com.itheima.sfbx") +public class InsuranceMgtStart { + + public static void main(String[] args) { + SpringApplication.run(InsuranceMgtStart.class); + } +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java new file mode 100644 index 0000000..2e226ac --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/binding/SourceBinding.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.insurance.binding; + +import com.itheima.sfbx.framework.rabbitmq.source.WarrantySource; +import org.springframework.cloud.stream.annotation.EnableBinding; + +/** + * @ClassName Binding.java + * @Description 绑定文件发送者声明 + */ +@EnableBinding({WarrantySource.class}) +public class SourceBinding { +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/CategoryFeignController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/CategoryFeignController.java new file mode 100644 index 0000000..2c1879d --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/CategoryFeignController.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.insurance.feign; + +import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.itheima.sfbx.insurance.service.ICategoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @Description:保险分类响应接口 + */ +@Slf4j +@Api(tags = "保险分类-feign") +@RestController +@RequestMapping("category-feign") +public class CategoryFeignController { + + @Autowired + ICategoryService categoryService; + + /*** + * @description 多条件查询保险分类列表 + * @param categoryReportVO 保险分类VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险分类列表",notes = "多条件查询保险分类列表") + @ApiImplicitParam(name = "categoryReportVO",value = "保险分类报表VO对象",required = true,dataType = "CategoryReportVO") + public List categoryList(@RequestBody CategoryReportVO categoryReportVO) { + CategoryVO categoryVO = BeanConv.toBean(categoryReportVO, CategoryVO.class); + return BeanConv.toBeanList(categoryService.findList(categoryVO),CategoryReportVO.class); + } +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/SaleReportFeignController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/SaleReportFeignController.java new file mode 100644 index 0000000..d50b7d0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/SaleReportFeignController.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.feign; + +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @ClassName SaleReportFeign.java + * @Description 日投保明细服务接口 + */ +@Slf4j +@Api(tags = "保险分类-feign") +@RestController +@RequestMapping("sale-report-feign") +public class SaleReportFeignController { + + @Autowired + IWarrantyService warrantyService; + + /** + * 计划任务:日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-detail-day/{reportTime}") + @ApiOperation(value = "日投保额度明细",notes = "日投保额度明细") + SaleReportDTO doInsureDetailDay(@PathVariable("reportTime")String reportTime){ + return warrantyService.doInsureDetailDay(reportTime); + } + + /** + * 计划任务:统计日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-category/{reportTime}") + @ApiOperation(value = "统计日投保分类明细",notes = "统计日投保分类明细") + List doInsureCategory(@PathVariable("reportTime")String reportTime){ + return warrantyService.doInsureCategory(reportTime); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/WarrantyFeignController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/WarrantyFeignController.java new file mode 100644 index 0000000..b5efd97 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/feign/WarrantyFeignController.java @@ -0,0 +1,74 @@ +package com.itheima.sfbx.insurance.feign; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.WarrantyVO; +import com.itheima.sfbx.insurance.service.IWarrantyOrderService; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险合同响应接口 + */ +@Slf4j +@Api(tags = "保险合同-feign") +@RestController +@RequestMapping("warranty-feign") +public class WarrantyFeignController { + + @Autowired + IWarrantyService warrantyService; + + @Autowired + IWarrantyOrderService warrantyOrderService; + + /*** + * @description 系统监听:清理合同保单 + * @param warrantyNo 订单合同号 + * @return: Boolean + */ + @PostMapping("clean-warranty/{warrantyNo}") + @ApiOperation(value = "系统监听:清理合同保单",notes = "监听:清理合同保单") + @ApiImplicitParam(paramType = "path",name = "warrantyNo",value = "保单号",dataType = "String") + public Boolean cleanWarranty(@PathVariable("warrantyNo") String warrantyNo) { + Boolean flag = warrantyService.cleanWarranty(warrantyNo); + return flag; + } + + /*** + * @description 计划任务:周期代扣 + * @return 扣款结果 + */ + @PostMapping("periodic-pay") + @ApiOperation(value = "计划任务:周期代扣",notes = "计划任务:周期代扣") + public Boolean periodicPay() { + return warrantyOrderService.periodicPay(); + } + + /*** + * @description 系统监听:同步合同支付结果 + * @param orderNo 订单合同号 + * @return: Boolean + */ + @PostMapping("sync-payment/{orderNo}/{tradeState}") + @ApiOperation(value = "系统监听:同步合同支付结果",notes = "系统监听:同步合同支付结果") + @ApiImplicitParams(value = { + @ApiImplicitParam(paramType = "path",name = "orderNo",value = "合同订单编号",dataType = "String"), + @ApiImplicitParam(paramType = "path",name = "tradeState",value = "交易状态",dataType = "String"), + }) + public Boolean syncPayment(@PathVariable("orderNo") String orderNo,@PathVariable("tradeState") String tradeState) { + Boolean flag = warrantyOrderService.syncPayment(orderNo,tradeState); + return flag; + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/BannerController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/BannerController.java new file mode 100644 index 0000000..a298671 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/BannerController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.BannerVO; +import com.itheima.sfbx.insurance.service.IBannerService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:响应接口 + */ +@Slf4j +@Api(tags = "导航信息") +@RestController +@RequestMapping("banner") +public class BannerController { + + @Autowired + IBannerService bannerService; + + /*** + * @description 多条件查询分页 + * @param bannerVO VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "分页",notes = "分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"}) + public ResponseResult> findBannerVOPage( + @RequestBody BannerVO bannerVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page bannerVOPage = bannerService.findPage(bannerVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(bannerVOPage); + } + + /** + * @Description 保存 + * @param bannerVO VO对象 + * @return BannerVO + */ + @PutMapping + @ApiOperation(value = "保存Banner",notes = "添加Banner") + @ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO") + @ApiOperationSupport(includeParameters = {"bannerVO.dataState","bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"}) + public ResponseResult createBanner(@RequestBody BannerVO bannerVO) { + BannerVO bannerVOResult = bannerService.save(bannerVO); + return ResponseResultBuild.successBuild(bannerVOResult); + } + + /** + * @Description 修改 + * @param bannerVO VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改",notes = "修改") + @ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO") + @ApiOperationSupport(includeParameters = {"bannerVO.id","bannerVO.dataState","bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"}) + public ResponseResult updateBanner(@RequestBody BannerVO bannerVO) { + Boolean flag = bannerService.update(bannerVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除 + * @param bannerVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除",notes = "删除") + @ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO") + @ApiOperationSupport(includeParameters = {"bannerVO.checkedIds"}) + public ResponseResult deleteBanner(@RequestBody BannerVO bannerVO) { + Boolean flag = bannerService.delete(bannerVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询列表 + * @param bannerVO VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询列表",notes = "多条件查询列表") + @ApiImplicitParam(name = "bannerVO",value = "VO对象",required = true,dataType = "BannerVO") + @ApiOperationSupport(includeParameters = {"bannerVO.sortNo","bannerVO.url","bannerVO.bannerType"}) + public ResponseResult> bannerList(@RequestBody BannerVO bannerVO) { + List bannerVOList = bannerService.findList(bannerVO); + return ResponseResultBuild.successBuild(bannerVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryCoefficentController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryCoefficentController.java new file mode 100644 index 0000000..5aec63e --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryCoefficentController.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CategoryCoefficentVO; +import com.itheima.sfbx.insurance.service.ICategoryCoefficentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:分类系数项响应接口 + */ +@Slf4j +@Api(tags = "分类系数项") +@RestController +@RequestMapping("category-coefficent") +public class CategoryCoefficentController { + + @Autowired + ICategoryCoefficentService categoryCoefficentService; + + /*** + * @description 多条件查询分类系数项列表 + * @param categoryCoefficentVO 分类系数项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询分类系数项列表",notes = "多条件查询分类系数项列表") + @ApiImplicitParam(name = "categoryCoefficentVO",value = "分类系数项VO对象",required = true,dataType = "CategoryCoefficentVO") + @ApiOperationSupport(includeParameters = {"categoryCoefficentVO.categoryNo","categoryCoefficentVO.coefficentKey","categoryCoefficentVO.sortNo","categoryCoefficentVO.remake"}) + public ResponseResult> categoryCoefficentList(@RequestBody CategoryCoefficentVO categoryCoefficentVO) { + List categoryCoefficentVOList = categoryCoefficentService.findList(categoryCoefficentVO); + return ResponseResultBuild.successBuild(categoryCoefficentVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryConditionController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryConditionController.java new file mode 100644 index 0000000..611454e --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryConditionController.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CategoryConditionVO; +import com.itheima.sfbx.insurance.service.ICategoryConditionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:分类筛选项响应接口 + */ +@Slf4j +@Api(tags = "分类筛选项") +@RestController +@RequestMapping("category-condition") +public class CategoryConditionController { + + @Autowired + ICategoryConditionService categoryConditionService; + + /*** + * @description 多条件查询分类筛选项列表 + * @param categoryConditionVO 分类筛选项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询分类筛选项列表",notes = "多条件查询分类筛选项列表") + @ApiImplicitParam(name = "categoryConditionVO",value = "分类筛选项VO对象",required = true,dataType = "CategoryConditionVO") + @ApiOperationSupport(includeParameters = {"categoryConditionVO.categoryNo","categoryConditionVO.conditionKey","categoryConditionVO.sortNo","categoryConditionVO.remake"}) + public ResponseResult> categoryConditionList(@RequestBody CategoryConditionVO categoryConditionVO) { + List categoryConditionVOList = categoryConditionService.findList(categoryConditionVO); + return ResponseResultBuild.successBuild(categoryConditionVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryController.java new file mode 100644 index 0000000..9f3426c --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategoryController.java @@ -0,0 +1,135 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.itheima.sfbx.insurance.service.ICategoryService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险分类响应接口 + */ +@Slf4j +@Api(tags = "保险分类") +@RestController +@RequestMapping("category") +public class CategoryController { + + @Autowired + ICategoryService categoryService; + + /*** + * @description 多条件查询保险分类分页 + * @param categoryVO 保险分类VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保险分类分页",notes = "保险分类分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryNo","categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex","categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType"}) + public ResponseResult> findCategoryVOPage( + @RequestBody CategoryVO categoryVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page categoryVOPage = categoryService.findPage(categoryVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(categoryVOPage); + } + + /** + * @Description 保存保险分类 + * @param categoryVO 保险分类VO对象 + * @return CategoryVO + */ + @PutMapping + @ApiOperation(value = "保存Category",notes = "添加Category") + @ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.dataState","categoryVO.parentCategoryNo", + "categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex", + "categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType", + "categoryVO.categoryClaimVOs.claimKey","categoryVO.categoryConditionVOs.conditionKey", + "categoryVO.categoryCoefficentVOs.coefficentKey","categoryVO.categorySafeguardVOs.safeguardKey"}) + public ResponseResult createCategory(@RequestBody CategoryVO categoryVO) { + CategoryVO categoryVOResult = categoryService.save(categoryVO); + return ResponseResultBuild.successBuild(categoryVOResult); + } + + /** + * @Description 修改保险分类 + * @param categoryVO 保险分类VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险分类",notes = "修改保险分类") + @ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.id","categoryVO.dataState","categoryVO.parentCategoryNo", + "categoryVO.categoryNo","categoryVO.categoryName","categoryVO.icon","categoryVO.leafNode", + "categoryVO.showIndex","categoryVO.categoryType","categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType", + "categoryVO.categoryClaimVOs.claimKey","categoryVO.categoryConditionVOs.conditionKey", + "categoryVO.categoryCoefficentVOs.coefficentKey","categoryVO.categorySafeguardVOs.safeguardKey"}) + public ResponseResult updateCategory(@RequestBody CategoryVO categoryVO) { + Boolean flag = categoryService.update(categoryVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除保险分类 + * @param categoryVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除保险分类",notes = "删除保险分类") + @ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.checkedIds"}) + public ResponseResult deleteCategory(@RequestBody CategoryVO categoryVO) { + Boolean flag = categoryService.delete(categoryVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保险分类列表 + * @param categoryVO 保险分类VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险分类列表",notes = "多条件查询保险分类列表") + @ApiImplicitParam(name = "categoryVO",value = "保险分类VO对象",required = true,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryNo","categoryVO.categoryName", + "categoryVO.icon","categoryVO.leafNode","categoryVO.showIndex","categoryVO.categoryType", + "categoryVO.sortNo","categoryVO.remake","categoryVO.insuranceType"}) + public ResponseResult> categoryList(@RequestBody CategoryVO categoryVO) { + List categoryVOList = categoryService.findList(categoryVO); + return ResponseResultBuild.successBuild(categoryVOList); + } + + /** + * @Description 分类树形 + * @param categoryVO 分类对象 + * @return + */ + @PostMapping("tree") + @ApiOperation(value = "分类树形",notes = "分类树形") + @ApiImplicitParam(name = "categoryVO",value = "分类对象",required = false,dataType = "CategoryVO") + @ApiOperationSupport(includeParameters = {"categoryVO.parentCategoryNo","categoryVO.categoryType","categoryVO.checkedCategoryNos"}) + public ResponseResult categoryTreeVO(@RequestBody CategoryVO categoryVO) { + TreeVO treeVO = categoryService.categoryTreeVO(categoryVO.getParentCategoryNo(), categoryVO.getCategoryType(),categoryVO.getCheckedCategoryNos()); + return ResponseResultBuild.successBuild(treeVO); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategorySafeguardController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategorySafeguardController.java new file mode 100644 index 0000000..9c15a26 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CategorySafeguardController.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CategorySafeguardVO; +import com.itheima.sfbx.insurance.service.ICategorySafeguardService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:分类保障项响应接口 + */ +@Slf4j +@Api(tags = "分类保障项") +@RestController +@RequestMapping("category-safeguard") +public class CategorySafeguardController { + + @Autowired + ICategorySafeguardService categorySafeguardService; + + /*** + * @description 多条件查询分类保障项列表 + * @param categorySafeguardVO 分类保障项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询分类保障项列表",notes = "多条件查询分类保障项列表") + @ApiImplicitParam(name = "categorySafeguardVO",value = "分类保障项VO对象",required = true,dataType = "CategorySafeguardVO") + @ApiOperationSupport(includeParameters = {"categorySafeguardVO.categoryNo","categorySafeguardVO.safeguardKey","categorySafeguardVO.sortNo","categorySafeguardVO.remake"}) + public ResponseResult> categorySafeguardList(@RequestBody CategorySafeguardVO categorySafeguardVO) { + List categorySafeguardVOList = categorySafeguardService.findList(categorySafeguardVO); + return ResponseResultBuild.successBuild(categorySafeguardVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CoefficentController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CoefficentController.java index 59ab5bb..8542c10 100644 --- a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CoefficentController.java +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CoefficentController.java @@ -1,4 +1,82 @@ package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CoefficentVO; +import com.itheima.sfbx.insurance.pojo.Coefficent; +import com.itheima.sfbx.insurance.service.ICoefficentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.checkerframework.checker.units.qual.A; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + + +@Api(tags = "系数管理") +@RestController +@RequestMapping("coefficent") public class CoefficentController { + + @Autowired + private ICoefficentService coefficentService; + + /** + * 新建系数 + * @param coefficentVO 系数VO + * @return 系数VO + */ + @ApiImplicitParam(name = "coefficentVO", value = "系数VO", dataType = "CoefficentVO", paramType = "body") + @ApiOperation(value = "新建系数", notes = "根据系数VO新建系数") + @ApiOperationSupport(includeParameters = {"coefficentVO"}) + @PutMapping + public ResponseResult createCoefficent(@RequestBody CoefficentVO coefficentVO) { + CoefficentVO save = coefficentService.save(coefficentVO); + return ResponseResultBuild.successBuild(save); + } + + /** + * @description 多条件查询系数项分页 + * @param coefficentVO 系数项VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "系数项分页",notes = "系数项分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "coefficentVO",value = "系数项VO对象",required = true,dataType = "CoefficentVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"coefficentVO.dataState","coefficentVO.coefficentKey","coefficentVO.coefficentKeyName","coefficentVO.coefficentVal","coefficentVO.sortNo","coefficentVO.remake","coefficentVO.coefficentType"}) + public ResponseResult> findCoefficentVOPage( + @RequestBody CoefficentVO coefficentVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page coefficentVOPage = coefficentService.findPage(coefficentVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(coefficentVOPage); + } + + @PatchMapping + public ResponseResult updateCoefficent(@RequestBody CoefficentVO coefficentVO) { + + Boolean update = coefficentService.update(coefficentVO); + return ResponseResultBuild.successBuild(update); + } + + + + @DeleteMapping + public ResponseResult deleteCoefficent(@RequestBody CoefficentVO coefficent) { + Boolean delete = coefficentService.delete(coefficent.getCheckedIds()); + return ResponseResultBuild.successBuild(delete); + } + + + } diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CombinationController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CombinationController.java new file mode 100644 index 0000000..89a3c4a --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/CombinationController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CombinationVO; +import com.itheima.sfbx.insurance.service.ICombinationService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:组合方案响应接口 + */ +@Slf4j +@Api(tags = "组合方案") +@RestController +@RequestMapping("combination") +public class CombinationController { + + @Autowired + ICombinationService combinationService; + + /*** + * @description 多条件查询组合方案分页 + * @param combinationVO 组合方案VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "组合方案分页",notes = "组合方案分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"}) + public ResponseResult> findCombinationVOPage( + @RequestBody CombinationVO combinationVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page combinationVOPage = combinationService.findPage(combinationVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(combinationVOPage); + } + + /** + * @Description 保存组合方案 + * @param combinationVO 组合方案VO对象 + * @return CombinationVO + */ + @PutMapping + @ApiOperation(value = "保存Combination",notes = "添加Combination") + @ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO") + @ApiOperationSupport(includeParameters = {"combinationVO.dataState","combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"}) + public ResponseResult createCombination(@RequestBody CombinationVO combinationVO) { + CombinationVO combinationVOResult = combinationService.save(combinationVO); + return ResponseResultBuild.successBuild(combinationVOResult); + } + + /** + * @Description 修改组合方案 + * @param combinationVO 组合方案VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改组合方案",notes = "修改组合方案") + @ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO") + @ApiOperationSupport(includeParameters = {"combinationVO.id","combinationVO.dataState","combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"}) + public ResponseResult updateCombination(@RequestBody CombinationVO combinationVO) { + Boolean flag = combinationService.update(combinationVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除组合方案 + * @param combinationVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除组合方案",notes = "删除组合方案") + @ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO") + @ApiOperationSupport(includeParameters = {"combinationVO.checkedIds"}) + public ResponseResult deleteCombination(@RequestBody CombinationVO combinationVO) { + Boolean flag = combinationService.delete(combinationVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询组合方案列表 + * @param combinationVO 组合方案VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询组合方案列表",notes = "多条件查询组合方案列表") + @ApiImplicitParam(name = "combinationVO",value = "组合方案VO对象",required = true,dataType = "CombinationVO") + @ApiOperationSupport(includeParameters = {"combinationVO.combinationName","combinationVO.riskAnalysis","combinationVO.riskScenarioJson"}) + public ResponseResult> combinationList(@RequestBody CombinationVO combinationVO) { + List combinationVOList = combinationService.findList(combinationVO); + return ResponseResultBuild.successBuild(combinationVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/ConditionController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/ConditionController.java new file mode 100644 index 0000000..524cd32 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/ConditionController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.ConditionVO; +import com.itheima.sfbx.insurance.service.IConditionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:筛选项响应接口 + */ +@Slf4j +@Api(tags = "筛选项") +@RestController +@RequestMapping("condition") +public class ConditionController { + + @Autowired + IConditionService conditionService; + + /*** + * @description 多条件查询筛选项分页 + * @param conditionVO 筛选项VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "筛选项分页",notes = "筛选项分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"}) + public ResponseResult> findConditionVOPage( + @RequestBody ConditionVO conditionVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page conditionVOPage = conditionService.findPage(conditionVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(conditionVOPage); + } + + /** + * @Description 保存筛选项 + * @param conditionVO 筛选项VO对象 + * @return ConditionVO + */ + @PutMapping + @ApiOperation(value = "保存Condition",notes = "添加Condition") + @ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO") + @ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"}) + public ResponseResult createCondition(@RequestBody ConditionVO conditionVO) { + ConditionVO conditionVOResult = conditionService.save(conditionVO); + return ResponseResultBuild.successBuild(conditionVOResult); + } + + /** + * @Description 修改筛选项 + * @param conditionVO 筛选项VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改筛选项",notes = "修改筛选项") + @ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO") + @ApiOperationSupport(includeParameters = {"conditionVO.id","conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"}) + public ResponseResult updateCondition(@RequestBody ConditionVO conditionVO) { + Boolean flag = conditionService.update(conditionVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除筛选项 + * @param conditionVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除筛选项",notes = "删除筛选项") + @ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO") + @ApiOperationSupport(includeParameters = {"conditionVO.checkedIds"}) + public ResponseResult deleteCondition(@RequestBody ConditionVO conditionVO) { + Boolean flag = conditionService.delete(conditionVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询筛选项列表 + * @param conditionVO 筛选项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询筛选项列表",notes = "多条件查询筛选项列表") + @ApiImplicitParam(name = "conditionVO",value = "筛选项VO对象",required = true,dataType = "ConditionVO") + @ApiOperationSupport(includeParameters = {"conditionVO.dataState","conditionVO.conditionKey","conditionVO.conditionKeyName","conditionVO.conditionVal","conditionVO.sortNo","conditionVO.remake"}) + public ResponseResult> conditionList(@RequestBody ConditionVO conditionVO) { + List conditionVOList = conditionService.findList(conditionVO); + return ResponseResultBuild.successBuild(conditionVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/HealthAssessmentController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/HealthAssessmentController.java new file mode 100644 index 0000000..e5ab8d5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/HealthAssessmentController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.HealthAssessmentVO; +import com.itheima.sfbx.insurance.service.IHealthAssessmentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:评估类目响应接口 + */ +@Slf4j +@Api(tags = "评估类目") +@RestController +@RequestMapping("health-assessment") +public class HealthAssessmentController { + + @Autowired + IHealthAssessmentService healthAssessmentService; + + /*** + * @description 多条件查询评估类目分页 + * @param healthAssessmentVO 评估类目VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "评估类目分页",notes = "评估类目分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"}) + public ResponseResult> findHealthAssessmentVOPage( + @RequestBody HealthAssessmentVO healthAssessmentVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page healthAssessmentVOPage = healthAssessmentService.findPage(healthAssessmentVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(healthAssessmentVOPage); + } + + /** + * @Description 保存评估类目 + * @param healthAssessmentVO 评估类目VO对象 + * @return HealthAssessmentVO + */ + @PutMapping + @ApiOperation(value = "保存HealthAssessment",notes = "添加HealthAssessment") + @ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO") + @ApiOperationSupport(includeParameters = {"healthAssessmentVO.dataState","healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"}) + public ResponseResult createHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) { + HealthAssessmentVO healthAssessmentVOResult = healthAssessmentService.save(healthAssessmentVO); + return ResponseResultBuild.successBuild(healthAssessmentVOResult); + } + + /** + * @Description 修改评估类目 + * @param healthAssessmentVO 评估类目VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改评估类目",notes = "修改评估类目") + @ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO") + @ApiOperationSupport(includeParameters = {"healthAssessmentVO.id","healthAssessmentVO.dataState","healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"}) + public ResponseResult updateHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) { + Boolean flag = healthAssessmentService.update(healthAssessmentVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除评估类目 + * @param healthAssessmentVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除评估类目",notes = "删除评估类目") + @ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO") + @ApiOperationSupport(includeParameters = {"healthAssessmentVO.checkedIds"}) + public ResponseResult deleteHealthAssessment(@RequestBody HealthAssessmentVO healthAssessmentVO) { + Boolean flag = healthAssessmentService.delete(healthAssessmentVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询评估类目列表 + * @param healthAssessmentVO 评估类目VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询评估类目列表",notes = "多条件查询评估类目列表") + @ApiImplicitParam(name = "healthAssessmentVO",value = "评估类目VO对象",required = true,dataType = "HealthAssessmentVO") + @ApiOperationSupport(includeParameters = {"healthAssessmentVO.insuranceId","healthAssessmentVO.assessmentKey","healthAssessmentVO.assessmentKeyName","healthAssessmentVO.assessmentVal","healthAssessmentVO.sortNo","healthAssessmentVO.remake"}) + public ResponseResult> healthAssessmentList(@RequestBody HealthAssessmentVO healthAssessmentVO) { + List healthAssessmentVOList = healthAssessmentService.findList(healthAssessmentVO); + return ResponseResultBuild.successBuild(healthAssessmentVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveController.java new file mode 100644 index 0000000..9f23af0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveController.java @@ -0,0 +1,122 @@ +package com.itheima.sfbx.insurance.web; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.dto.InsuranceApproveVO; +import com.itheima.sfbx.insurance.service.IInsuranceApproveService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保批信息响应接口 + */ +@Slf4j +@Api(tags = "保批信息") +@RestController +@RequestMapping("insurance-approve") +public class InsuranceApproveController { + + @Autowired + IInsuranceApproveService insuranceApproveService; + + /*** + * @description 多条件查询保批信息分页 + * @param insuranceApproveVO 保批信息VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保批信息分页",notes = "保批信息分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"}) + public ResponseResult> findInsuranceApproveVOPage( + @RequestBody InsuranceApproveVO insuranceApproveVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page insuranceApproveVOPage = insuranceApproveService.findPage(insuranceApproveVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(insuranceApproveVOPage); + } + + /** + * @Description 保存保批信息 + * @return InsuranceApproveVO + */ + @PostMapping + @ApiOperation(value = "保存InsuranceApprove",notes = "添加InsuranceApprove") + @ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveVO.dataState","insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"}) + public ResponseResult createInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) { + InsuranceApproveVO res = insuranceApproveService.save(insuranceApproveVO); + return ResponseResultBuild.successBuild(res); + } + + /** + * @Description 修改保批信息 + * @param insuranceApproveVO 保批信息VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保批信息",notes = "修改保批信息") + @ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveVO.id","insuranceApproveVO.dataState","insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"}) + public ResponseResult updateInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) { + Boolean flag = insuranceApproveService.update(insuranceApproveVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除保批信息 + * @param insuranceApproveVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除保批信息",notes = "删除保批信息") + @ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveVO.checkedIds"}) + public ResponseResult deleteInsuranceApprove(@RequestBody InsuranceApproveVO insuranceApproveVO) { + Boolean flag = insuranceApproveService.delete(insuranceApproveVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保批信息列表 + * @param insuranceApproveVO 保批信息VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保批信息列表",notes = "多条件查询保批信息列表") + @ApiImplicitParam(name = "insuranceApproveVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveVO.changeFieldKey","insuranceApproveVO.changeFieldName","insuranceApproveVO.changeBeforeValue","insuranceApproveVO.changeAfterValue","insuranceApproveVO.insuranceId","insuranceApproveVO.insuranceName","insuranceApproveVO.warrantyNo","insuranceApproveVO.approveState","insuranceApproveVO.applicantId","insuranceApproveVO.applicantName","insuranceApproveVO.applicantTime","insuranceApproveVO.companyNo","insuranceApproveVO.companyName","insuranceApproveVO.insuredId","insuranceApproveVO.insuredName","insuranceApproveVO.sortNo","insuranceApproveVO.remake"}) + public ResponseResult> insuranceApproveList(@RequestBody InsuranceApproveVO insuranceApproveVO) { + List insuranceApproveVOList = insuranceApproveService.findList(insuranceApproveVO); + return ResponseResultBuild.successBuild(insuranceApproveVOList); + } + + + /*** + * @description 根据合同编号获取报批信息 + * @return List + */ + @PostMapping("approve-warrantyNo/{warrantyNo}") + @ApiOperation(value = "根据合同编号获取报批信息",notes = "根据合同编号获取报批信息") + public ResponseResult> approveWarrantyNo(@PathVariable String warrantyNo) { + List insuranceApproveVOList = insuranceApproveService.findByWarrantyNo(warrantyNo); + return ResponseResultBuild.successBuild(insuranceApproveVOList); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveDetailController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveDetailController.java new file mode 100644 index 0000000..cd7b177 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceApproveDetailController.java @@ -0,0 +1,113 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.insurance.enums.InsuranceApproveDetailEnum; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.dto.InsuranceApproveDetailVO; +import com.itheima.sfbx.insurance.service.IInsuranceApproveDetailService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description:保批信息响应接口 + */ +@Slf4j +@Api(tags = "保批信息详情") +@RestController +@RequestMapping("insurance-approve-detail") +public class InsuranceApproveDetailController { + + @Autowired + IInsuranceApproveDetailService insuranceApproveDetailService; + + /*** + * @description 多条件查询保批信息分页 + * @param insuranceApproveDetailVO 保批信息VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保批信息分页",notes = "保批信息分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"}) + public ResponseResult> findInsuranceApproveDetailVOPage( + @RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page insuranceApproveDetailVOPage = insuranceApproveDetailService.findPage(insuranceApproveDetailVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(insuranceApproveDetailVOPage); + } + + /** + * @Description 保存保批信息 + * @param insuranceApproveDetailVO 保批信息VO对象 + * @return InsuranceApproveDetailVO + */ + @PutMapping + @ApiOperation(value = "保存InsuranceApproveDetail",notes = "添加InsuranceApproveDetail") + @ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.dataState","insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"}) + public ResponseResult createInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) { + InsuranceApproveDetailVO insuranceApproveDetailVOResult = insuranceApproveDetailService.save(insuranceApproveDetailVO); + return ResponseResultBuild.successBuild(insuranceApproveDetailVOResult); + } + + /** + * @Description 修改保批信息 + * @param insuranceApproveDetailVO 保批信息VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保批信息",notes = "修改保批信息") + @ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.id","insuranceApproveDetailVO.dataState","insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"}) + public ResponseResult updateInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) { + Boolean flag = insuranceApproveDetailService.update(insuranceApproveDetailVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除保批信息 + * @param insuranceApproveDetailVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除保批信息",notes = "删除保批信息") + @ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.checkedIds"}) + public ResponseResult deleteInsuranceApproveDetail(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) { + Boolean flag = insuranceApproveDetailService.delete(insuranceApproveDetailVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保批信息列表 + * @param insuranceApproveDetailVO 保批信息VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保批信息列表",notes = "多条件查询保批信息列表") + @ApiImplicitParam(name = "insuranceApproveDetailVO",value = "保批信息VO对象",required = true,dataType = "InsuranceApproveDetailVO") + @ApiOperationSupport(includeParameters = {"insuranceApproveDetailVO.approveId","insuranceApproveDetailVO.type","insuranceApproveDetailVO.changeFieldKey","insuranceApproveDetailVO.title","insuranceApproveDetailVO.label","insuranceApproveDetailVO.modifyCont","insuranceApproveDetailVO.modifyReason","insuranceApproveDetailVO.approveTime","insuranceApproveDetailVO.sortNo"}) + public ResponseResult> insuranceApproveDetailList(@RequestBody InsuranceApproveDetailVO insuranceApproveDetailVO) { + List insuranceApproveDetailVOList = insuranceApproveDetailService.findList(insuranceApproveDetailVO); + return ResponseResultBuild.successBuild(insuranceApproveDetailVOList); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceCoefficentController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceCoefficentController.java new file mode 100644 index 0000000..78b2685 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceCoefficentController.java @@ -0,0 +1,71 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.InsuranceCoefficentVO; +import com.itheima.sfbx.insurance.service.IInsuranceCoefficentService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险系数项响应接口 + */ +@Slf4j +@Api(tags = "保险系数项") +@RestController +@RequestMapping("insurance-coefficent") +public class InsuranceCoefficentController { + + @Autowired + IInsuranceCoefficentService insuranceCoefficentService; + + /** + * @Description 保存保险系数项 + * @param insuranceCoefficentVOs 保险系数项VO对象 + * @return Boolean 是否修改成功 + */ + @PutMapping + @ApiOperation(value = "保存InsuranceCoefficent",notes = "添加InsuranceCoefficent") + @ApiImplicitParam(name = "insuranceCoefficentVOs",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO") + public ResponseResult createInsuranceCoefficent(@RequestBody List insuranceCoefficentVOs) { + Boolean flag = insuranceCoefficentService.save(insuranceCoefficentVOs); + return ResponseResultBuild.successBuild(flag); + } + + + /** + * @Description 修改保险系数项 + * @param insuranceCoefficentVOs 保险系数项VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险系数项",notes = "修改保险系数项") + @ApiImplicitParam(name = "insuranceCoefficentVOs",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO") + public ResponseResult updateInsuranceCoefficent(@RequestBody List insuranceCoefficentVOs) { + Boolean flag = insuranceCoefficentService.update(insuranceCoefficentVOs); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保险系数项列表 + * @param insuranceCoefficentVO 保险系数项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险系数项列表",notes = "多条件查询保险系数项列表") + @ApiImplicitParam(name = "insuranceCoefficentVO",value = "保险系数项VO对象",required = true,dataType = "InsuranceCoefficentVO") + @ApiOperationSupport(includeParameters = {"insuranceCoefficentVO.insuranceId","insuranceCoefficentVO.coefficentKey","insuranceCoefficentVO.coefficentKeyName","insuranceCoefficentVO.coefficentValue","insuranceCoefficentVO.score","insuranceCoefficentVO.isDefault","insuranceCoefficentVO.sortNo"}) + public ResponseResult> insuranceCoefficentList(@RequestBody InsuranceCoefficentVO insuranceCoefficentVO) { + List insuranceCoefficentVOList = insuranceCoefficentService.findList(insuranceCoefficentVO); + return ResponseResultBuild.successBuild(insuranceCoefficentVOList); + } + + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceConditionController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceConditionController.java new file mode 100644 index 0000000..e521300 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceConditionController.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.InsuranceConditionVO; +import com.itheima.sfbx.insurance.service.IInsuranceConditionService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险筛选项响应接口 + */ +@Slf4j +@Api(tags = "保险筛选项") +@RestController +@RequestMapping("insurance-condition") +public class InsuranceConditionController { + + @Autowired + IInsuranceConditionService insuranceConditionService; + + /** + * @Description 保存保险筛选项 + * @param insuranceConditionListVOs 保险筛选项VO对象 + * @return InsuranceConditionVO + */ + @PutMapping + @ApiOperation(value = "保存InsuranceCondition", notes = "添加InsuranceCondition") + @ApiImplicitParam(name = "insuranceConditionListVOs", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO") + public ResponseResult createInsuranceCondition(@RequestBody List insuranceConditionListVOs) { + Boolean flag = insuranceConditionService.save(insuranceConditionListVOs); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 修改保险筛选项 + * @param insuranceConditionListVOs 保险筛选项VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险筛选项", notes = "修改保险筛选项") + @ApiImplicitParam(name = "insuranceConditionListVOs", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO") + public ResponseResult updateInsuranceCondition(@RequestBody List insuranceConditionListVOs) { + Boolean flag = insuranceConditionService.update(insuranceConditionListVOs); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保险筛选项列表 + * @param insuranceConditionVO 保险筛选项VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险筛选项列表", notes = "多条件查询保险筛选项列表") + @ApiImplicitParam(name = "insuranceConditionVO", value = "保险筛选项VO对象", required = true, dataType = "InsuranceConditionVO") + public ResponseResult> insuranceConditionList(@RequestBody InsuranceConditionVO insuranceConditionVO) { + List insuranceConditionVOList = insuranceConditionService.findList(insuranceConditionVO); + return ResponseResultBuild.successBuild(insuranceConditionVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceController.java new file mode 100644 index 0000000..ff35105 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceController.java @@ -0,0 +1,141 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险产品响应接口 + */ +@Slf4j +@Api(tags = "保险产品") +@RestController +@RequestMapping("insurance") +public class InsuranceController { + + @Autowired + IInsuranceService insuranceService; + + /*** + * @description 多条件查询保险产品分页 + * @param insuranceVO 保险产品VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保险产品分页",notes = "保险产品分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"insuranceVO.categoryNo","insurance.checkRule", + "insuranceVO.publishNumber","insuranceVO.categoryNo","insuranceVO.recommendCategoryNo", + "insuranceVO.insuranceName","insuranceVO.optimization","insuranceVO.relieved", + "insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson","insuranceVO.timeStart", + "insuranceVO.timeStartUnit","insuranceVO.timeEnd","insuranceVO.timeEndUnit","insuranceVO.relation", + "insuranceVO.sortNo","insuranceVO.multiple","insuranceVO.continuousInsuranceAge","insuranceVO.companyNo", + "insuranceVO.insuranceState","insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival", + "insuranceVO.revivalUnit","insuranceVO.comment","insuranceVO.remake"}) + public ResponseResult> findInsuranceVOPage( + @RequestBody InsuranceVO insuranceVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page insuranceVOPage = insuranceService.findPage(insuranceVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(insuranceVOPage); + } + + /** + * @Description 保存保险产品 + * @param insuranceVO 保险产品VO对象 + * @return InsuranceVO + */ + @PutMapping + @ApiOperation(value = "保存Insurance",notes = "添加Insurance") + @ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO") + @ApiOperationSupport(includeParameters = {"insuranceVO.publishNumber","insuranceVO.categoryNo", + "insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection", + "insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson", + "insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd", + "insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple", + "insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo", + "insuranceVO.insuranceState", "insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival", + "insuranceVO.revivalUnit", "insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation", + "insuranceVO.waits", "insuranceVO.operatingRate","insuranceVO.individualAgentRate", + "insuranceVO.platformAgentRate"}) + public ResponseResult createInsurance(@RequestBody InsuranceVO insuranceVO) { + InsuranceVO insuranceVOResult = insuranceService.save(insuranceVO); + return ResponseResultBuild.successBuild(insuranceVOResult); + } + + /** + * @Description 修改保险产品 + * @param insuranceVO 保险产品VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险产品",notes = "修改保险产品") + @ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO") + @ApiOperationSupport(includeParameters = {"insuranceVO.id","insuranceVO.publishNumber","insuranceVO.categoryNo", + "insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection", + "insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson", + "insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd", + "insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple", + "insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo","insuranceVO.insuranceState", + "insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival","insuranceVO.revivalUnit", + "insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation","insuranceVO.waits", + "insuranceVO.operatingRate","insuranceVO.individualAgentRate","insuranceVO.platformAgentRate"}) + public ResponseResult updateInsurance(@RequestBody InsuranceVO insuranceVO) { + Boolean flag = insuranceService.update(insuranceVO); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保险产品列表 + * @param insuranceVO 保险产品VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险产品列表",notes = "多条件查询保险产品列表") + @ApiImplicitParam(name = "insuranceVO",value = "保险产品VO对象",required = true,dataType = "InsuranceVO") + @ApiOperationSupport(includeParameters = {"insuranceVO.publishNumber","insuranceVO.categoryNo", + "insuranceVO.recommendCategoryNo","insuranceVO.insuranceName","insuranceVO.goldSelection", + "insuranceVO.carefree","insuranceVO.showIndex","insuranceVO.labelsJson","insuranceVO.remakeJson", + "insuranceVO.timeStart","insuranceVO.timeStartUnit","insuranceVO.timeEnd", + "insuranceVO.timeEndUnit","insuranceVO.relation","insuranceVO.sortNo","insuranceVO.multiple", + "insuranceVO.continuousInsuranceAge","insuranceVO.checkRule","insuranceVO.companyNo","insuranceVO.insuranceState", + "insuranceVO.grace","insuranceVO.graceUnit","insuranceVO.revival","insuranceVO.revivalUnit", + "insuranceVO.comment","insuranceVO.remake","insuranceVO.hesitation","insuranceVO.waits", + "insuranceVO.operatingRate","insuranceVO.individualAgentRate","insuranceVO.platformAgentRate"}) + public ResponseResult> insuranceList(@RequestBody InsuranceVO insuranceVO) { + List insuranceVOList = insuranceService.findList(insuranceVO); + return ResponseResultBuild.successBuild(insuranceVOList); + } + + /*** + * @description 保险产品详情 + * @param insuranceId 保险id + * @return + */ + @PostMapping("insurance/{insuranceId}") + @ApiOperation(value = "保险产品详情",notes = "保险产品详情") + @ApiImplicitParam(name = "insuranceId",value = "保险id",required = true,dataType = "String") + public ResponseResult findInsuranceDetails(@PathVariable("insuranceId")String insuranceId){ + InsuranceVO insuranceVO = insuranceService.findById(insuranceId); + return ResponseResultBuild.successBuild(insuranceVO); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsurancePlanController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsurancePlanController.java new file mode 100644 index 0000000..ae0afd6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsurancePlanController.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.InsurancePlanVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.service.IInsurancePlanService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Description:保险方案响应接口 + */ +@Slf4j +@Api(tags = "保险方案") +@RestController +@RequestMapping("insurance-plan") +public class InsurancePlanController { + + @Autowired + IInsurancePlanService insurancePlanService; + + /** + * @Description 保存保险方案 + * @param insurancePlanVOs 保险产品方案VO对象列表 + * @return InsurancePlanVO + */ + @PutMapping + @ApiOperation(value = "保存InsurancePlan",notes = "添加InsurancePlan") + @ApiImplicitParam(name = "insurancePlanVOs",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO") + public ResponseResult createInsurancePlans(@RequestBody List insurancePlanVOs) { + Boolean flag=insurancePlanService.save(insurancePlanVOs); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 修改保险方案 + * @param insurancePlanVOs 保险产品方案VO对象列表 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险方案",notes = "修改保险方案") + @ApiImplicitParam(name = "insurancePlanVOs",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO") + public ResponseResult updateInsurancePlan(@RequestBody List insurancePlanVOs) { + Boolean flag = insurancePlanService.update(insurancePlanVOs); + return ResponseResultBuild.successBuild(true); + } + + /*** + * @description 多条件查询保险方案列表 + * @param insurancePlanVO 保险方案VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险方案列表",notes = "多条件查询保险方案列表") + @ApiImplicitParam(name = "insurancePlanVO",value = "保险方案VO对象",required = true,dataType = "InsurancePlanVO") + @ApiOperationSupport(includeParameters = {"insurancePlanVO.insuranceId","insurancePlanVO.palnName","insurancePlanVO.palnRemake","insurancePlanVO.price","insurancePlanVO.priceUnit","insurancePlanVO.rateTopGrade","insurancePlanVO.rateLastYear","insurancePlanVO.rateGuarantee","insurancePlanVO.sortNo"}) + public ResponseResult> insurancePlanList(@RequestBody InsurancePlanVO insurancePlanVO) { + List insurancePlanVOList = insurancePlanService.findList(insurancePlanVO); + return ResponseResultBuild.successBuild(insurancePlanVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceSievingController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceSievingController.java new file mode 100644 index 0000000..ce6bf70 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/InsuranceSievingController.java @@ -0,0 +1,114 @@ +package com.itheima.sfbx.insurance.web; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.insurance.enums.InsuranceSievingEnum; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.dto.InsuranceSievingVO; +import com.itheima.sfbx.insurance.service.IInsuranceSievingService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import org.springframework.web.bind.annotation.RestController; + +/** + * @Description:初筛结果响应接口 + */ +@Slf4j +@Api(tags = "初筛结果") +@RestController +@RequestMapping("insurance-sieving") +public class InsuranceSievingController { + + @Autowired + IInsuranceSievingService insuranceSievingService; + + /*** + * @description 多条件查询初筛结果分页 + * @param insuranceSievingVO 初筛结果VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "初筛结果分页",notes = "初筛结果分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"}) + public ResponseResult> findInsuranceSievingVOPage( + @RequestBody InsuranceSievingVO insuranceSievingVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page insuranceSievingVOPage = insuranceSievingService.findPage(insuranceSievingVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(insuranceSievingVOPage); + } + + /** + * @Description 保存初筛结果 + * @param insuranceSievingVO 初筛结果VO对象 + * @return InsuranceSievingVO + */ + @PutMapping + @ApiOperation(value = "保存InsuranceSieving",notes = "添加InsuranceSieving") + @ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO") + @ApiOperationSupport(includeParameters = {"insuranceSievingVO.dataState","insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"}) + public ResponseResult createInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) { + InsuranceSievingVO insuranceSievingVOResult = insuranceSievingService.save(insuranceSievingVO); + return ResponseResultBuild.successBuild(insuranceSievingVOResult); + } + + /** + * @Description 修改初筛结果 + * @param insuranceSievingVO 初筛结果VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改初筛结果",notes = "修改初筛结果") + @ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO") + @ApiOperationSupport(includeParameters = {"insuranceSievingVO.id","insuranceSievingVO.dataState","insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"}) + public ResponseResult updateInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) { + Boolean flag = insuranceSievingService.update(insuranceSievingVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除初筛结果 + * @param insuranceSievingVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除初筛结果",notes = "删除初筛结果") + @ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO") + @ApiOperationSupport(includeParameters = {"insuranceSievingVO.checkedIds"}) + public ResponseResult deleteInsuranceSieving(@RequestBody InsuranceSievingVO insuranceSievingVO) { + Boolean flag = insuranceSievingService.delete(insuranceSievingVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询初筛结果列表 + * @param insuranceSievingVO 初筛结果VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询初筛结果列表",notes = "多条件查询初筛结果列表") + @ApiImplicitParam(name = "insuranceSievingVO",value = "初筛结果VO对象",required = true,dataType = "InsuranceSievingVO") + @ApiOperationSupport(includeParameters = {"insuranceSievingVO.name","insuranceSievingVO.sicksName","insuranceSievingVO.sicksKey","insuranceSievingVO.result","insuranceSievingVO.sortNo"}) + public ResponseResult> insuranceSievingList(@RequestBody InsuranceSievingVO insuranceSievingVO) { + List insuranceSievingVOList = insuranceSievingService.findList(insuranceSievingVO); + return ResponseResultBuild.successBuild(insuranceSievingVOList); + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/RiskAnalysisController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/RiskAnalysisController.java new file mode 100644 index 0000000..73643d6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/RiskAnalysisController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.RiskAnalysisVO; +import com.itheima.sfbx.insurance.service.IRiskAnalysisService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:风险类目响应接口 + */ +@Slf4j +@Api(tags = "风险类目") +@RestController +@RequestMapping("risk-analysis") +public class RiskAnalysisController { + + @Autowired + IRiskAnalysisService riskAnalysisService; + + /*** + * @description 多条件查询风险类目分页 + * @param riskAnalysisVO 风险类目VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "风险类目分页",notes = "风险类目分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"}) + public ResponseResult> findRiskAnalysisVOPage( + @RequestBody RiskAnalysisVO riskAnalysisVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page riskAnalysisVOPage = riskAnalysisService.findPage(riskAnalysisVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(riskAnalysisVOPage); + } + + /** + * @Description 保存风险类目 + * @param riskAnalysisVO 风险类目VO对象 + * @return RiskAnalysisVO + */ + @PutMapping + @ApiOperation(value = "保存RiskAnalysis",notes = "添加RiskAnalysis") + @ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO") + @ApiOperationSupport(includeParameters = {"riskAnalysisVO.dataState","riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"}) + public ResponseResult createRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) { + RiskAnalysisVO riskAnalysisVOResult = riskAnalysisService.save(riskAnalysisVO); + return ResponseResultBuild.successBuild(riskAnalysisVOResult); + } + + /** + * @Description 修改风险类目 + * @param riskAnalysisVO 风险类目VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改风险类目",notes = "修改风险类目") + @ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO") + @ApiOperationSupport(includeParameters = {"riskAnalysisVO.id","riskAnalysisVO.dataState","riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"}) + public ResponseResult updateRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) { + Boolean flag = riskAnalysisService.update(riskAnalysisVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除风险类目 + * @param riskAnalysisVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除风险类目",notes = "删除风险类目") + @ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO") + @ApiOperationSupport(includeParameters = {"riskAnalysisVO.checkedIds"}) + public ResponseResult deleteRiskAnalysis(@RequestBody RiskAnalysisVO riskAnalysisVO) { + Boolean flag = riskAnalysisService.delete(riskAnalysisVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询风险类目列表 + * @param riskAnalysisVO 风险类目VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询风险类目列表",notes = "多条件查询风险类目列表") + @ApiImplicitParam(name = "riskAnalysisVO",value = "风险类目VO对象",required = true,dataType = "RiskAnalysisVO") + @ApiOperationSupport(includeParameters = {"riskAnalysisVO.insuranceId","riskAnalysisVO.assessmentKey","riskAnalysisVO.assessmentKeyName","riskAnalysisVO.assessmentVal","riskAnalysisVO.assessmentType","riskAnalysisVO.sortNo","riskAnalysisVO.remake"}) + public ResponseResult> riskAnalysisList(@RequestBody RiskAnalysisVO riskAnalysisVO) { + List riskAnalysisVOList = riskAnalysisService.findList(riskAnalysisVO); + return ResponseResultBuild.successBuild(riskAnalysisVOList); + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java new file mode 100644 index 0000000..776c18b --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SafeguardController.java @@ -0,0 +1,156 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +@Api(tags = "保障项管理") +@RestController +@RequestMapping("/safeguard") +public class SafeguardController { + + @Autowired + private ISafeguardService safeguardService; + + /** + * 根据条件分页查询保障项 + * + * @param safeguardVO 查询条件 + * @param pageNum 页号 + * @param pageSize 页大小 + * @return 返回保障项分页列表 + */ + @ApiOperation(value = "根据条件分页查询保障项", notes = "根据保障项名称、保障项类型分页查询保障项列表") + // 指定给Swagger的方法参数有哪些,以后再swagger-ui.html中查看 + @ApiImplicitParams({ + @ApiImplicitParam(name = "safeguardVO", value = "保障项查询条件", dataType = "SafeguardVO", paramType = "body"), + @ApiImplicitParam(name = "pageNum", value = "页号", dataType = "Integer", paramType = "path"), + @ApiImplicitParam(name = "pageSize", value = "页大小", dataType = "Integer", paramType = "path") + }) + @ApiOperationSupport(includeParameters = { "safeguardVO.safeguardType", "safeguardVO.safeguardKey", + "safeguardVO.safeguardKeyName" }) + @PostMapping("/page/{pageNum}/{pageSize}") + public ResponseResult> findSafeguardVoPage(@RequestBody SafeguardVO safeguardVO, + @PathVariable("pageNum") Integer pageNum, + @PathVariable("pageSize") Integer pageSize) { + Page page = safeguardService.findPage(safeguardVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(page); + + } + + /** + * 新增保障项 + * + * @param safeguardVO 保障项新增信息 + * @return 返回新增的保障项信息 + */ + @ApiOperation(value = "新增保障项", notes = "新增保障项") + @ApiImplicitParam(name = "safeguardVO", value = "保障项新增信息", dataType = "SafeguardVO", paramType = "body") + @ApiOperationSupport(includeParameters = { "safeguardVO.safeguardKey", "safeguardVO.safeguardName", + "safeguardVO.safeguardVal" }) + @PutMapping + public ResponseResult createSafeguard(@RequestBody SafeguardVO safeguardVO) { + SafeguardVO result = safeguardService.save(safeguardVO); + return ResponseResultBuild.successBuild(result); + + } + + /** + * 修改保障项 + * + * @param safeguardVO 保障项修改信息 + * @return 返回修改结果 + */ + @ApiOperation(value = "修改保障项", notes = "修改保障项") + @ApiImplicitParam(name = "safeguardVO", value = "保障项修改信息", dataType = "SafeguardVO", paramType = "body") + @ApiOperationSupport(includeParameters = { "safeguardVO.safeguardId", "safeguardVO.safeguardName", + "safeguardVO.safeguardVal" }) + @PatchMapping + public ResponseResult updateSafeguard(@RequestBody SafeguardVO safeguardVO) { + Boolean result = safeguardService.update(safeguardVO); + return ResponseResultBuild.successBuild(result); + } + + /** + * 删除保障项 + * + * @param safeguardVO 保障项删除信息 + * @return 返回删除结果 + */ + @ApiOperation(value = "删除保障项", notes = "根据保障项ID删除保障项") + @ApiImplicitParam(name = "checkedIds", value = "保障项ID列表", dataType = "String[]", paramType = "body") + @DeleteMapping + public ResponseResult deleteSafeguard(@RequestBody SafeguardVO safeguardVO) { + Boolean result = safeguardService.delete(safeguardVO.getCheckedIds()); + return ResponseResultBuild.successBuild(result); + } + + + /** + * 根据条件查询保障项列表 + * + * @param safeguardVO 查询条件 + * @return 返回保障项列表 + */ + + @ApiOperation(value = "根据条件查询保障项列表", notes = "根据保障项名称、保障项类型查询保障项列表") + @ApiImplicitParams({ + @ApiImplicitParam(name = "safeguardVO", value = "保障项查询条件", dataType = "SafeguardVO", paramType = "body") + }) + @ApiOperationSupport(includeParameters = { "safeguardVO.safeguardType", "safeguardVO.safeguardKey", + "safeguardVO.safeguardKeyName" }) + @PostMapping("/list") + public ResponseResult > findSafeguardVList(@RequestBody SafeguardVO safeguardVO) { + List list = safeguardService.findList(safeguardVO); + return ResponseResultBuild.successBuild(list); + } + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java new file mode 100644 index 0000000..61c24cc --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/SeekAdviceController.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.web; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import com.itheima.sfbx.insurance.service.IInsuranceSievingService; +import com.itheima.sfbx.insurance.service.ISickSearchRecordService; +import com.itheima.sfbx.insurance.service.ISickService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @ClassName SeekAdviceController.java + * @Description 健康咨询 + */ +@Slf4j +@Api(tags = "健康咨询,保险初筛") +@RestController +@RequestMapping("seek-advice") +public class SeekAdviceController { + + @Autowired + private IInsuranceSievingService insuranceSievingService; + + /** + * @description 分页查询保险问卷 + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "分页查询保险问卷",notes = "分页查询保险问卷") + @ApiImplicitParams({ + @ApiImplicitParam(name = "insuranceSievingVO",value = "筛选项VO对象",required = true,dataType = "InsuranceSievingVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + public ResponseResult> findInsuranceSievingPage( + @RequestBody InsuranceSievingVO insuranceSievingVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page page = insuranceSievingService.findPage(insuranceSievingVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(page); + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyController.java new file mode 100644 index 0000000..bf44275 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyController.java @@ -0,0 +1,145 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.WarrantyVO; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:保险合同响应接口 + */ +@Slf4j +@Api(tags = "保险合同") +@RestController +@RequestMapping("warranty") +public class WarrantyController { + + @Autowired + IWarrantyService warrantyService; + + /*** + * @description 多条件查询保险合同分页 + * @param warrantyVO 保险合同VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "保险合同分页",notes = "保险合同分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"}) + public ResponseResult> findWarrantyVOPage( + @RequestBody WarrantyVO warrantyVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page warrantyVOPage = warrantyService.findPage(warrantyVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(warrantyVOPage); + } + + /** + * @Description 保存保险合同 + * @param warrantyVO 保险合同VO对象 + * @return WarrantyVO + */ + @PutMapping + @ApiOperation(value = "保存Warranty",notes = "添加Warranty") + @ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO") + @ApiOperationSupport(includeParameters = {"warrantyVO.dataState","warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"}) + public ResponseResult createWarranty(@RequestBody WarrantyVO warrantyVO) { + WarrantyVO warrantyVOResult = warrantyService.save(warrantyVO); + return ResponseResultBuild.successBuild(warrantyVOResult); + } + + /** + * @Description 修改保险合同 + * @param warrantyVO 保险合同VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改保险合同",notes = "修改保险合同") + @ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO") + @ApiOperationSupport(includeParameters = {"warrantyVO.id","warrantyVO.dataState","warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"}) + public ResponseResult updateWarranty(@RequestBody WarrantyVO warrantyVO) { + Boolean flag = warrantyService.update(warrantyVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除保险合同 + * @param warrantyVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除保险合同",notes = "删除保险合同") + @ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO") + @ApiOperationSupport(includeParameters = {"warrantyVO.checkedIds"}) + public ResponseResult deleteWarranty(@RequestBody WarrantyVO warrantyVO) { + Boolean flag = warrantyService.delete(warrantyVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询保险合同列表 + * @param warrantyVO 保险合同VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询保险合同列表",notes = "多条件查询保险合同列表") + @ApiImplicitParam(name = "warrantyVO",value = "保险合同VO对象",required = true,dataType = "WarrantyVO") + @ApiOperationSupport(includeParameters = {"warrantyVO.insuranceId","warrantyVO.insuranceName","warrantyVO.insuranceJson","warrantyVO.warrantyNo","warrantyVO.applicantName","warrantyVO.applicantIdentityCard","warrantyVO.insuredName","warrantyVO.insuredIdentityCard","warrantyVO.companyNo","warrantyVO.companyName","warrantyVO.safeguardStartTime","warrantyVO.safeguardEndTime","warrantyVO.premium","warrantyVO.paymentMethod","warrantyVO.autoWarrantyExtension","warrantyVO.warrantyState","warrantyVO.underwritingState","warrantyVO.periods","warrantyVO.dutyPeriod","warrantyVO.sortNo","warrantyVO.hesitationTime","warrantyVO.grace","warrantyVO.graceUnit","warrantyVO.revival","warrantyVO.revivalUnit"}) + public ResponseResult> warrantyList(@RequestBody WarrantyVO warrantyVO) { + List warrantyVOList = warrantyService.findList(warrantyVO); + return ResponseResultBuild.successBuild(warrantyVOList); + } + + /*** + * @description 核保补发 + * @return List + */ + @PostMapping("send-check-info") + @ApiOperation(value = "核保补发",notes = "核保补发") + public ResponseResult sendCheckInfo() { + warrantyService.sendCheckInfo(); + return ResponseResultBuild.successBuild(true); + } + + + /*** + * @description 保批补发 + * @return List + */ + @PostMapping("send-approve-info") + @ApiOperation(value = "保批补发",notes = "保批补发") + public ResponseResult sendApproveInfo() { + warrantyService.sendApproveInfo(); + return ResponseResultBuild.successBuild(true); + } + + /** + * @Description 查询保险合同 + * @param warrantyId 保险合同ID + * @return WarrantyVO + */ + @PostMapping("detail/{warrantyId}") + @ApiOperation(value = "查询合同",notes = "查询合同") + @ApiImplicitParam(paramType = "path",name = "warrantyId",value = "合同ID",dataType = "String") + public ResponseResult createWarranty(@PathVariable("warrantyId") String warrantyId) { + WarrantyVO warrantyVOResult = warrantyService.findById(warrantyId); + return ResponseResultBuild.successBuild(warrantyVOResult); + } +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyCustomerController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyCustomerController.java new file mode 100644 index 0000000..5c6518f --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyCustomerController.java @@ -0,0 +1,57 @@ +package com.itheima.sfbx.insurance.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.WarrantyApplicantVO; +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import com.itheima.sfbx.insurance.service.IWarrantyCustomerService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @Description:保险客户响应接口 + */ +@Slf4j +@Api(tags = "合同客户相关") +@RestController +@RequestMapping("warranty-customer") +public class WarrantyCustomerController { + + @Autowired + IWarrantyCustomerService warrantyCustomerService; + + /** + * @param warrantyNo 保单号 + * @return CustomerInfoVO + * @Description 按保单号查询投保人信息 + */ + @PostMapping("/warranty-applicant/{warrantyNo}") + @ApiOperation(value = "合同投保人信息", notes = "合同投保人信息") + @ApiImplicitParam(paramType = "path", name = "warrantyNo", value = "合同编号", dataType = "String") + public ResponseResult findWarrantyApplicant(@PathVariable("warrantyNo") String warrantyNo) { + WarrantyApplicantVO warrantyApplicant = warrantyCustomerService.findWarrantyApplicant(warrantyNo); + return ResponseResultBuild.successBuild(warrantyApplicant); + } + + /** + * @param warrantyNo 身份证 + * @return CustomerInfoVO + * @Description 按保单号查询被投保人信息 + */ + @PostMapping("/warranty-insured/{warrantyNo}") + @ApiOperation(value = "合同被保人信息", notes = "合同被保人信息") + @ApiImplicitParam(paramType = "path", name = "warrantyNo", value = "合同编号", dataType = "String") + public ResponseResult> findWarrantyInsured(@PathVariable("warrantyNo") String warrantyNo) { + List warrantyInsureds = warrantyCustomerService.findWarrantyInsured(warrantyNo); + return ResponseResultBuild.successBuild(warrantyInsureds); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyEarningsOrderController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyEarningsOrderController.java new file mode 100644 index 0000000..9fe7ec4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyEarningsOrderController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.WarrantyEarningsOrderVO; +import com.itheima.sfbx.insurance.service.IWarrantyEarningsOrderService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:给付计划订单响应接口 + */ +@Slf4j +@Api(tags = "给付计划订单") +@RestController +@RequestMapping("warranty-earnings-order") +public class WarrantyEarningsOrderController { + + @Autowired + IWarrantyEarningsOrderService warrantyEarningsOrderService; + + /*** + * @description 多条件查询给付计划订单分页 + * @param warrantyEarningsOrderVO 给付计划订单VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "给付计划订单分页",notes = "给付计划订单分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"}) + public ResponseResult> findWarrantyEarningsOrderVOPage( + @RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page warrantyEarningsOrderVOPage = warrantyEarningsOrderService.findPage(warrantyEarningsOrderVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(warrantyEarningsOrderVOPage); + } + + /** + * @Description 保存给付计划订单 + * @param warrantyEarningsOrderVO 给付计划订单VO对象 + * @return WarrantyEarningsOrderVO + */ + @PutMapping + @ApiOperation(value = "保存WarrantyEarningsOrder",notes = "添加WarrantyEarningsOrder") + @ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.dataState","warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"}) + public ResponseResult createWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + WarrantyEarningsOrderVO warrantyEarningsOrderVOResult = warrantyEarningsOrderService.save(warrantyEarningsOrderVO); + return ResponseResultBuild.successBuild(warrantyEarningsOrderVOResult); + } + + /** + * @Description 修改给付计划订单 + * @param warrantyEarningsOrderVO 给付计划订单VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改给付计划订单",notes = "修改给付计划订单") + @ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.id","warrantyEarningsOrderVO.dataState","warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"}) + public ResponseResult updateWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + Boolean flag = warrantyEarningsOrderService.update(warrantyEarningsOrderVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除给付计划订单 + * @param warrantyEarningsOrderVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除给付计划订单",notes = "删除给付计划订单") + @ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.checkedIds"}) + public ResponseResult deleteWarrantyEarningsOrder(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + Boolean flag = warrantyEarningsOrderService.delete(warrantyEarningsOrderVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询给付计划订单列表 + * @param warrantyEarningsOrderVO 给付计划订单VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询给付计划订单列表",notes = "多条件查询给付计划订单列表") + @ApiImplicitParam(name = "warrantyEarningsOrderVO",value = "给付计划订单VO对象",required = true,dataType = "WarrantyEarningsOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyEarningsOrderVO.orderNo","warrantyEarningsOrderVO.premium","warrantyEarningsOrderVO.warrantyNo","warrantyEarningsOrderVO.currentPeriod","warrantyEarningsOrderVO.scheduleTime","warrantyEarningsOrderVO.actualTime","warrantyEarningsOrderVO.orderState","warrantyEarningsOrderVO.applicantName","warrantyEarningsOrderVO.applicantIdentityCard","warrantyEarningsOrderVO.sortNo"}) + public ResponseResult> warrantyEarningsOrderList(@RequestBody WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + List warrantyEarningsOrderVOList = warrantyEarningsOrderService.findList(warrantyEarningsOrderVO); + return ResponseResultBuild.successBuild(warrantyEarningsOrderVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyOrderController.java b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyOrderController.java new file mode 100644 index 0000000..e9f50e9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/java/com/itheima/sfbx/insurance/web/WarrantyOrderController.java @@ -0,0 +1,110 @@ +package com.itheima.sfbx.insurance.web; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.insurance.dto.WarrantyOrderVO; +import com.itheima.sfbx.insurance.service.IWarrantyOrderService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * @Description:合同订单响应接口 + */ +@Slf4j +@Api(tags = "保费明细") +@RestController +@RequestMapping("warranty-order") +public class WarrantyOrderController { + + @Autowired + IWarrantyOrderService warrantyOrderService; + + /*** + * @description 多条件查询合同订单分页 + * @param warrantyOrderVO 合同订单VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "合同订单分页",notes = "合同订单分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {"warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"}) + public ResponseResult> findWarrantyOrderVOPage( + @RequestBody WarrantyOrderVO warrantyOrderVO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page warrantyOrderVOPage = warrantyOrderService.findPage(warrantyOrderVO, pageNum, pageSize); + return ResponseResultBuild.successBuild(warrantyOrderVOPage); + } + + /** + * @Description 保存合同订单 + * @param warrantyOrderVO 合同订单VO对象 + * @return WarrantyOrderVO + */ + @PutMapping + @ApiOperation(value = "保存WarrantyOrder",notes = "添加WarrantyOrder") + @ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyOrderVO.dataState","warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"}) + public ResponseResult createWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) { + WarrantyOrderVO warrantyOrderVOResult = warrantyOrderService.save(warrantyOrderVO); + return ResponseResultBuild.successBuild(warrantyOrderVOResult); + } + + /** + * @Description 修改合同订单 + * @param warrantyOrderVO 合同订单VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改合同订单",notes = "修改合同订单") + @ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyOrderVO.id","warrantyOrderVO.dataState","warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"}) + public ResponseResult updateWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) { + Boolean flag = warrantyOrderService.update(warrantyOrderVO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除合同订单 + * @param warrantyOrderVO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除合同订单",notes = "删除合同订单") + @ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyOrderVO.checkedIds"}) + public ResponseResult deleteWarrantyOrder(@RequestBody WarrantyOrderVO warrantyOrderVO) { + Boolean flag = warrantyOrderService.delete(warrantyOrderVO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询合同订单列表 + * @param warrantyOrderVO 合同订单VO对象 + * @return List + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询合同订单列表",notes = "多条件查询合同订单列表") + @ApiImplicitParam(name = "warrantyOrderVO",value = "合同订单VO对象",required = true,dataType = "WarrantyOrderVO") + @ApiOperationSupport(includeParameters = {"warrantyOrderVO.orderNo","warrantyOrderVO.warrantyNo","warrantyOrderVO.periods","warrantyOrderVO.currentPeriod","warrantyOrderVO.premium","warrantyOrderVO.scheduleTime","warrantyOrderVO.actualTime","warrantyOrderVO.graceTime","warrantyOrderVO.revivalTime","warrantyOrderVO.orderState","warrantyOrderVO.sortNo","warrantyOrderVO.companyNo","warrantyOrderVO.tradingChannel"}) + public ResponseResult> warrantyOrderList(@RequestBody WarrantyOrderVO warrantyOrderVO) { + List warrantyOrderVOList = warrantyOrderService.findList(warrantyOrderVO); + return ResponseResultBuild.successBuild(warrantyOrderVOList); + } + +} diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/resources/banner.txt b/day02/sfbx-insurance/insurance-mgt/src/main/resources/banner.txt new file mode 100644 index 0000000..a8ff8c3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 传智教育---献给可爱的传智人 :: diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap-test.yml b/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..62f37f6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap-test.yml @@ -0,0 +1,54 @@ +#服务配置 +server: + #端口 + port: 7066 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + config: + activate: + on-profile: + - test + #应用配置 + application: + #应用名称 + name: insurance-mgt + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap.yml b/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..230e196 --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/resources/bootstrap.yml @@ -0,0 +1,51 @@ +#服务配置 +server: + #端口 + port: 7066 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + main: + allow-bean-definition-overriding: true + allow-circular-references: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + profiles: + active: dev + #应用配置 + application: + #应用名称 + name: insurance-mgt + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-basic.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-stream-rabbit-source-warranty.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-insurance/insurance-mgt/src/main/resources/logback.xml b/day02/sfbx-insurance/insurance-mgt/src/main/resources/logback.xml new file mode 100644 index 0000000..85628ec --- /dev/null +++ b/day02/sfbx-insurance/insurance-mgt/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/insurance-mgt-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-insurance/insurance-service/pom.xml b/day02/sfbx-insurance/insurance-service/pom.xml new file mode 100644 index 0000000..45e2b7e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/pom.xml @@ -0,0 +1,85 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-insurance + 2.0-SNAPSHOT + + + insurance-service + insurance-service + + + com.itheima.sfbx + framework-mybatis-plus + + + com.itheima.sfbx + file-interface + + + com.itheima.sfbx + framework-redis + + + com.itheima.sfbx + framework-rabbitmq + + + com.itheima.sfbx + framework-seata + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + test + + + com.itheima.sfbx + security-interface + + + + com.itheima.sfbx + rule-client + + + + com.itheima.sfbx + trade-interface + + + + com.itheima.sfbx + framework-out-interface + + + + com.itheima.sfbx + dict-interface + + + + com.itheima.sfbx + framework-ai + + + + com.itheima.sfbx + sfbx-apache-httpclient + + + + + + + + diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BannerCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BannerCacheConstant.java new file mode 100644 index 0000000..c6eccba --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BannerCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:缓存常量 +*/ +public class BannerCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "banner:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BrowsingHistoryCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BrowsingHistoryCacheConstant.java new file mode 100644 index 0000000..8f59c70 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/BrowsingHistoryCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:浏览记录缓存常量 +*/ +public class BrowsingHistoryCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "browsing-history:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCacheConstant.java new file mode 100644 index 0000000..78f2bd6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCacheConstant.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险分类缓存常量 +*/ +public class CategoryCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "category:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //树形 + public static final String TREE = PREFIX+"tree";; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCoefficentCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCoefficentCacheConstant.java new file mode 100644 index 0000000..929bea3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryCoefficentCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:分类系数项缓存常量 +*/ +public class CategoryCoefficentCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "category-coefficent:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryConditionCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryConditionCacheConstant.java new file mode 100644 index 0000000..8950351 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategoryConditionCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:分类筛选项缓存常量 +*/ +public class CategoryConditionCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "category-condition:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategorySafeguardCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategorySafeguardCacheConstant.java new file mode 100644 index 0000000..b2f907d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CategorySafeguardCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:分类保障项缓存常量 +*/ +public class CategorySafeguardCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "category-safeguard:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CoefficentCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CoefficentCacheConstant.java new file mode 100644 index 0000000..3700d67 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CoefficentCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:系数项缓存常量 +*/ +public class CoefficentCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "coefficent:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationCacheConstant.java new file mode 100644 index 0000000..f6264d2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:组合方案缓存常量 +*/ +public class CombinationCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "combination:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationInsuranceCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationInsuranceCacheConstant.java new file mode 100644 index 0000000..eec8133 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CombinationInsuranceCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:组合保险缓存常量 +*/ +public class CombinationInsuranceCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "combination-insurance:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/ConditionCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/ConditionCacheConstant.java new file mode 100644 index 0000000..74742d5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/ConditionCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:筛选项缓存常量 +*/ +public class ConditionCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "condition:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerCardCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerCardCacheConstant.java new file mode 100644 index 0000000..7b1c920 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerCardCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:绑卡信息缓存常量 +*/ +public class CustomerCardCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "customer-card:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerInfoCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerInfoCacheConstant.java new file mode 100644 index 0000000..d21d19f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerInfoCacheConstant.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:客户信息表缓存常量 +*/ +public class CustomerInfoCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "customer-info:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + //list下拉框 + public static final String OCR= PREFIX+"OCR"; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerPetCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerPetCacheConstant.java new file mode 100644 index 0000000..fd42f5c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerPetCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:客户宠物缓存常量 +*/ +public class CustomerPetCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "customer-pet:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationCacheConstant.java new file mode 100644 index 0000000..ce75272 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:客户关系表缓存常量 +*/ +public class CustomerRelationCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "customer-relation:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationConstant.java new file mode 100644 index 0000000..a02b9ec --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/CustomerRelationConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; + +/** +* @Description:客户关系表缓存常量 +*/ +public class CustomerRelationConstant extends SuperConstant { + + //本人 + public static final String SELF= "0"; + + //子女 + public static final String CHILDREN= "3"; + + //配偶 + public static final String SPOUSE = "1"; + + //父母 + public static final String PARENTS= "2"; + + //其他 + public static final String OTHER= "4"; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/HealthAssessmentCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/HealthAssessmentCacheConstant.java new file mode 100644 index 0000000..df548b4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/HealthAssessmentCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:评估类目缓存常量 +*/ +public class HealthAssessmentCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "health-assessment:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveCacheConstant.java new file mode 100644 index 0000000..a76eaf4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保批信息缓存常量 +*/ +public class InsuranceApproveCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-approve:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveDetailCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveDetailCacheConstant.java new file mode 100644 index 0000000..c9ad4ae --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceApproveDetailCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保批信息缓存常量 +*/ +public class InsuranceApproveDetailCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-approve-detail:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCacheConstant.java new file mode 100644 index 0000000..b09b8b5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险产品缓存常量 +*/ +public class InsuranceCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCoefficentCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCoefficentCacheConstant.java new file mode 100644 index 0000000..46d51e3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceCoefficentCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险系数项缓存常量 +*/ +public class InsuranceCoefficentCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-coefficent:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConditionCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConditionCacheConstant.java new file mode 100644 index 0000000..7932df5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConditionCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险筛选项缓存常量 +*/ +public class InsuranceConditionCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-condition:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConstant.java new file mode 100644 index 0000000..c2d2e76 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceConstant.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.insurance.constant; + +/** + * @ClassName InsuranceConstant.java + * @Description TODO + */ +public class InsuranceConstant { + + //单位:天 + public static final String DAY = "DAY"; + //单位:周 + public static final String WEEK = "WEEK"; + //单位:月 + public static final String MONTH = "MONTH"; + //单位:年 + public static final String YEAR = "YEAR"; + //单位:岁 + public static final String AGE = "AGE"; + //年龄范围 + public static final String RANGE_AGE = "XS005"; + //什么时候开始领 + public static final String ACTUAL_GET_START = "XS012"; + //合同规定:领至多久 + public static final String ACTUAL_GET_END = "XS013"; + //养老测算:领至多久 + public static final String TRIAL_GET_END ="XS015"; + //领取周期 + public static final String ACTUAL_GET_UNIT = "XS014"; + //理财:投入方式 + public static final String BUY_MODE = "XS002"; + //定投:追投方式投入 + public static final String BUY_MODE_0 = "XS002-0"; + //趸交:一次性投入 + public static final String BUY_MODE_1 = "XS002-1"; + //团险人数 + public static final String NUMBER_OF_PEOPLE = "XS016"; + //投入周期单位 + public static final String PERIODIC_UNIT = "XS011"; + //投入时长 + public static final String PERIODIC = "XS008"; + //保障期限 + public static final String PROTECTION_PERIOD = "XS006"; + //付款方式 + public static final String PAY_MENT = "XS003"; + //连续投保 + public static final String AUTO_WARRANTY_EXTENSION = "XS010"; + //金牌好品 + public static final String GOLDSELECTION_0="0"; + //上架状态 + public static final String INSURANCE_STATE_0="0"; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsurancePlanCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsurancePlanCacheConstant.java new file mode 100644 index 0000000..2fb74d1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsurancePlanCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险方案缓存常量 +*/ +public class InsurancePlanCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-plan:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceRuleCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceRuleCacheConstant.java new file mode 100644 index 0000000..0e0703a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceRuleCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险规则缓存常量 +*/ +public class InsuranceRuleCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-rule:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceSievingCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceSievingCacheConstant.java new file mode 100644 index 0000000..ef497bf --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceSievingCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:初筛结果缓存常量 +*/ +public class InsuranceSievingCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-sieving:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceTopCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceTopCacheConstant.java new file mode 100644 index 0000000..6b383dd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/InsuranceTopCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:人气保险缓存常量 +*/ +public class InsuranceTopCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "insurance-top:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsCacheConstant.java new file mode 100644 index 0000000..d479f70 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:方案给付缓存常量 +*/ +public class PlanEarningsCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "plan-earnings:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsConstant.java new file mode 100644 index 0000000..dd3fa96 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanEarningsConstant.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:方案给付缓存常量 +*/ +public class PlanEarningsConstant extends CacheConstant { + + //给付类型:0终身领取 1固定领取 + public static final String EarningsType_0= "0"; + public static final String EarningsType_1= "1"; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanSafeguardCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanSafeguardCacheConstant.java new file mode 100644 index 0000000..9b10763 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/PlanSafeguardCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:方案保障项缓存常量 +*/ +public class PlanSafeguardCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "plan-safeguard:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskAnalysisCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskAnalysisCacheConstant.java new file mode 100644 index 0000000..c19eef5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskAnalysisCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:风险类目缓存常量 +*/ +public class RiskAnalysisCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "risk-analysis:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskCacheConstant.java new file mode 100644 index 0000000..e9a9bf3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RiskCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:风险表缓存常量 +*/ +public class RiskCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "risk:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RuleConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RuleConstant.java new file mode 100644 index 0000000..2ff79d8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/RuleConstant.java @@ -0,0 +1,44 @@ +package com.itheima.sfbx.insurance.constant; + +/** + * RuleConstant + * + * @author: wgl + * @describe: 规则常量类 + * @date: 2022/12/28 10:10 + */ +public class RuleConstant { + + public final static String RULE_GROUP_NAME = "四方保险销售平台"; + + private final static String SICK_ADVICE_KNOWLEDGEID = "rule_stream_34"; + + private final static String SICK_ADVICE_PROCESSID = "rule_stream_01"; + + public final static String SLASH = "/"; + + /** + * 获取 + * @param knowledgeId + * @return + */ + public final static String getRuleKnowledge(String knowledgeId){ + return RULE_GROUP_NAME+SLASH+knowledgeId; + } + + /** + * 获取 + * @return + */ + public final static String sickAdviceAdviceKnowledge(){ + return RULE_GROUP_NAME+SLASH+SICK_ADVICE_KNOWLEDGEID; + } + + /** + * 获取 + * @return + */ + public final static String sickAdviceProcessId(){ + return SICK_ADVICE_PROCESSID; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SafeguardCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SafeguardCacheConstant.java new file mode 100644 index 0000000..9ebdf66 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SafeguardCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保障项缓存常量 +*/ +public class SafeguardCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "safeguard:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SaleTopInsuranceCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SaleTopInsuranceCacheConstant.java new file mode 100644 index 0000000..04fe166 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SaleTopInsuranceCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:缓存常量 +*/ +public class SaleTopInsuranceCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "sale-top-insurance:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SearchRecordCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SearchRecordCacheConstant.java new file mode 100644 index 0000000..ad64403 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SearchRecordCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:搜索记录缓存常量 +*/ +public class SearchRecordCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "search-record:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SelfSelectionCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SelfSelectionCacheConstant.java new file mode 100644 index 0000000..fc99a84 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SelfSelectionCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:自选保险缓存常量 +*/ +public class SelfSelectionCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "self-selection:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickCacheConstant.java new file mode 100644 index 0000000..b0ef089 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:疾病表缓存常量 +*/ +public class SickCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "sick:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickSearchRecordCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickSearchRecordCacheConstant.java new file mode 100644 index 0000000..2dc8dd3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/SickSearchRecordCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:疾病搜索记录缓存常量 +*/ +public class SickSearchRecordCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "sick-search-record:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyCacheConstant.java new file mode 100644 index 0000000..2dcca9b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyCacheConstant.java @@ -0,0 +1,25 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:保险合同缓存常量 +*/ +public class WarrantyCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderCacheConstant.java new file mode 100644 index 0000000..5aa0fac --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:给付计划订单缓存常量 +*/ +public class WarrantyEarningsOrderCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty-earnings-order:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderConstant.java new file mode 100644 index 0000000..e045c13 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyEarningsOrderConstant.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.insurance.constant; + +/** + * @ClassName WarrantyEarningsOrderConstant.java + * @Description TODO + */ +public class WarrantyEarningsOrderConstant { + + //状态(0未赔付 1已赔付 2 断保中止 3断保终止) + public static final String ORDER_STATE_0= "0"; + + public static final String ORDER_STATE_1= "1"; + + public static final String ORDER_STATE_2= "2"; + + public static final String ORDER_STATE_3= "3"; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyInsuredCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyInsuredCacheConstant.java new file mode 100644 index 0000000..127a7bb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyInsuredCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:合同被保人缓存常量 +*/ +public class WarrantyInsuredCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty-insured:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyOrderCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyOrderCacheConstant.java new file mode 100644 index 0000000..30157df --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyOrderCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:合同订单缓存常量 +*/ +public class WarrantyOrderCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty-order:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyRenewalCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyRenewalCacheConstant.java new file mode 100644 index 0000000..a7aaf4d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyRenewalCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:合同续期缓存常量 +*/ +public class WarrantyRenewalCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty-renewal:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyVerifyCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyVerifyCacheConstant.java new file mode 100644 index 0000000..278bce6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WarrantyVerifyCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:合同核保缓存常量 +*/ +public class WarrantyVerifyCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "warranty-verify:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeFlowNodeCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeFlowNodeCacheConstant.java new file mode 100644 index 0000000..c50b453 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeFlowNodeCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:省心配流程节点记录缓存常量 +*/ +public class WorryFreeFlowNodeCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "worry-free-flow-node:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeInsuranceMatchCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeInsuranceMatchCacheConstant.java new file mode 100644 index 0000000..6cd492f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeInsuranceMatchCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:省心配保险推荐记录缓存常量 +*/ +public class WorryFreeInsuranceMatchCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "worry-free-insurance-match:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeRiskItemCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeRiskItemCacheConstant.java new file mode 100644 index 0000000..d07ac3f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeRiskItemCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:缓存常量 +*/ +public class WorryFreeRiskItemCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "worry-free-risk-item:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeSafeguardQuotaCacheConstant.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeSafeguardQuotaCacheConstant.java new file mode 100644 index 0000000..dc348d2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/constant/WorryFreeSafeguardQuotaCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:省心配流程保障配额记录缓存常量 +*/ +public class WorryFreeSafeguardQuotaCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "worry-free-safeguard-quota:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BaiduCloudTokenVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BaiduCloudTokenVO.java new file mode 100644 index 0000000..d2aefee --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BaiduCloudTokenVO.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * BaiduCloudTokenVO + * + * @author: wgl + * @describe: 百度云Token对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="百度云Token对象", description="") +public class BaiduCloudTokenVO extends BaseVO { + + @Builder + public BaiduCloudTokenVO(Long id, String dataState,String refreshToken, String expiresIn, String accessToken,String sessionKey,String sessionSecret,String scope){ + super(id, dataState); + this.refreshToken=refreshToken; + this.expiresIn=expiresIn; + this.accessToken=accessToken; + this.sessionKey = sessionKey; + this.sessionSecret = sessionSecret; + this.scope = scope; + } + + @ApiModelProperty(value = "百度云刷新Token") + private String refreshToken; + + @ApiModelProperty(value = "百度云超时时间") + private String expiresIn; + + @ApiModelProperty(value = "百度云session_key") + private String sessionKey; + + @ApiModelProperty(value = "百度云session_secret") + private String sessionSecret; + @ApiModelProperty(value = "百度云访问token") + private String accessToken; + + @ApiModelProperty(value = "百度云scope") + private String scope; + + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BannerVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BannerVO.java new file mode 100644 index 0000000..a6d03fb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BannerVO.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Banner对象", description="") +public class BannerVO extends BaseVO { + + @Builder + public BannerVO(String bannerType,Long id,String dataState,List fileVOs,Integer sortNo,String url){ + super(id, dataState); + this.sortNo=sortNo; + this.url=url; + this.fileVOs=fileVOs; + this.bannerType=bannerType; + } + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "调整路径") + private String url; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "导航类型(0首页 1推荐)") + private String bannerType; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BrowsingHistoryVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BrowsingHistoryVO.java new file mode 100644 index 0000000..a98a20e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/BrowsingHistoryVO.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:浏览记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="BrowsingHistory对象", description="浏览记录") +public class BrowsingHistoryVO extends BaseVO { + + @Builder + public BrowsingHistoryVO(Long id,String dataState,Long insuranceId,Integer sortNo,Long createBy){ + super(id, dataState); + this.insuranceId=insuranceId; + this.sortNo=sortNo; + setCreateBy(createBy); + } + + @ApiModelProperty(value = "保险ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryCoefficentVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryCoefficentVO.java new file mode 100644 index 0000000..efb6327 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryCoefficentVO.java @@ -0,0 +1,59 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:分类系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CategoryCoefficent对象", description="分类系数项") +public class CategoryCoefficentVO extends BaseVO { + + @Builder + public CategoryCoefficentVO(String coefficentKeyNamem,Long id,String dataState,String categoryNo,String coefficentKey,Integer sortNo,String remake,String coefficentType){ + super(id, dataState); + this.categoryNo=categoryNo; + this.coefficentKey=coefficentKey; + this.coefficentKeyName = coefficentKeyName; + this.sortNo=sortNo; + this.remake=remake; + this.coefficentType = coefficentType; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "系数项key") + private String coefficentKey; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "系数项名称") + private String coefficentKeyName; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "系数类型") + private String coefficentType; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryConditionVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryConditionVO.java new file mode 100644 index 0000000..d3c5070 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryConditionVO.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:分类筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CategoryCondition对象", description="分类筛选项") +public class CategoryConditionVO extends BaseVO { + + @Builder + public CategoryConditionVO(String conditionKeyName,Long id,String dataState,String categoryNo,String conditionKey,Integer sortNo,String remake){ + super(id, dataState); + this.categoryNo=categoryNo; + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "条件项值") + private String conditionVal; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategorySafeguardVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategorySafeguardVO.java new file mode 100644 index 0000000..58d21e9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategorySafeguardVO.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:分类保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CategorySafeguard对象", description="分类保障项") +public class CategorySafeguardVO extends BaseVO { + + @Builder + public CategorySafeguardVO(String safeguardKeyName,Long id,String dataState,String categoryNo,String safeguardKey,Integer sortNo,String remake){ + super(id, dataState); + this.categoryNo=categoryNo; + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "保障项维度") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "补充说明") + private String remake; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryVO.java new file mode 100644 index 0000000..abf476e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CategoryVO.java @@ -0,0 +1,93 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +/** + * @Description:保险分类 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Category对象", description="保险分类") +public class CategoryVO extends BaseVO { + + @Builder + public CategoryVO(List nodeFloors,Long id,String dataState,String parentCategoryNo,String categoryNo,String categoryName,String icon,String leafNode,String showIndex,String categoryType,Integer sortNo,String remake,String checkRule){ + super(id, dataState); + this.parentCategoryNo=parentCategoryNo; + this.categoryNo=categoryNo; + this.categoryName=categoryName; + this.icon=icon; + this.leafNode=leafNode; + this.showIndex=showIndex; + this.categoryType=categoryType; + this.sortNo=sortNo; + this.remake=remake; + this.checkRule=checkRule; + this.nodeFloors = nodeFloors; + } + + @ApiModelProperty(value = "父分类编号") + private String parentCategoryNo; + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "图标") + private String icon; + + @ApiModelProperty(value = "是否叶子节点(0是 否1)") + private String leafNode; + + @ApiModelProperty(value = "是否显示在首页(0是 否1)") + private String showIndex; + + @ApiModelProperty(value = "分类类型:0推荐分类 1产品分类 ") + private String categoryType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "分类补充说明") + private String remake; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "分类筛选项") + private List categoryConditionVOs; + + @ApiModelProperty(value = "分类系数项") + private List categoryCoefficentVOs; + + @ApiModelProperty(value = "分类保障项") + private List categorySafeguardVOs; + + @ApiModelProperty(value = "TREE结构:选中分类编号") + private String[] checkedCategoryNos; + + @ApiModelProperty(value = "节点层级:最多5层") + private List nodeFloors; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ChosesVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ChosesVO.java new file mode 100644 index 0000000..ab050c3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ChosesVO.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * ChosesDTO + * + * @author: wgl + * @describe: 选项VO + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="问卷详情", description="每个疾病的问卷详情信息") +public class ChosesVO { + @ApiModelProperty(value = "选项名") + private String choseName; + @ApiModelProperty(value = "选项值") + private String choseValue; +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CoefficentVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CoefficentVO.java new file mode 100644 index 0000000..2167c72 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CoefficentVO.java @@ -0,0 +1,59 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Coefficent对象", description="系数项") +public class CoefficentVO extends BaseVO { + + @Builder + public CoefficentVO(String coefficentType,Long id,String dataState,String coefficentKey,String coefficentKeyName,String coefficentVal,Integer sortNo,String remake){ + super(id, dataState); + this.coefficentKey=coefficentKey; + this.coefficentKeyName=coefficentKeyName; + this.coefficentVal=coefficentVal; + this.sortNo=sortNo; + this.remake=remake; + this.coefficentType=coefficentType; + } + + @ApiModelProperty(value = "系数项key:bznx") + private String coefficentKey; + + @ApiModelProperty(value = "系数项名称:保障年限") + private String coefficentKeyName; + + @ApiModelProperty(value = "系数项值") + private String coefficentVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + +@ApiModelProperty(value = "系数项类型:0、选项系数1、范围类型") + private String coefficentType; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationDetailVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationDetailVO.java new file mode 100644 index 0000000..50c3de7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationDetailVO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + +/** + * CombinationDetailVO + * + * @author: wgl + * @describe: 保险方案详情对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CombinationDetailVO对象", description="保险方案详情对象") +public class CombinationDetailVO extends BaseVO { + + @ApiModelProperty(value = "保险方案") + private CombinationVO combination; + + @ApiModelProperty(value = "关联的保险列表") + private List insuranceList; + + @ApiModelProperty(value = "最低缴保险计划,Key为保险id") + private Map plans; + + @ApiModelProperty(value = "展示的保障项,key为保险id") + private Map> safes; + + @ApiModelProperty(value = "方案金额") + private String totalMoney; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationInsuranceVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationInsuranceVO.java new file mode 100644 index 0000000..8954ba4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationInsuranceVO.java @@ -0,0 +1,62 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:组合保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CombinationInsurance对象", description="组合保险") +public class CombinationInsuranceVO extends BaseVO { + + @Builder + public CombinationInsuranceVO(Long id,String dataState,Long combinationId,Long insuranceId,String suggest,String thinking,String priority){ + super(id, dataState); + this.combinationId=combinationId; + this.insuranceId=insuranceId; + this.suggest=suggest; + this.thinking=thinking; + this.priority=priority; + } + + @ApiModelProperty(value = "保险组合ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long combinationId; + + @ApiModelProperty(value = "保险ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "建议") + private String suggest; + + @ApiModelProperty(value = "配置思路") + private String thinking; + + @ApiModelProperty(value = "优先级") + private String priority; + + @ApiModelProperty(value = "组成组合的保险列表") + private List insurances; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationVO.java new file mode 100644 index 0000000..5481ace --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CombinationVO.java @@ -0,0 +1,72 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +/** + * @Description:组合方案 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Combination对象", description="组合方案") +public class CombinationVO extends BaseVO { + + + @Builder + public CombinationVO(Long id, String dataState, String combinationName, String riskAnalysis, String riskScenario, List fileVOs, String[] checkedIds, CombinationVO combination, List insuranceList, String totalMoney) { + super(id, dataState); + this.combinationName = combinationName; + this.riskAnalysis = riskAnalysis; + this.riskScenario = riskScenario; + this.fileVOs = fileVOs; + this.checkedIds = checkedIds; + this.combination = combination; + this.insuranceList = insuranceList; + this.totalMoney = totalMoney; + } + + @ApiModelProperty(value = "组合名称") + private String combinationName; + + @ApiModelProperty(value = "风险分析") + private String riskAnalysis; + + @ApiModelProperty(value = "主要分析场景") + private String riskScenario; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "保险方案") + private CombinationVO combination; + + @ApiModelProperty(value = "关联的保险列表") + private List insuranceList; + + @ApiModelProperty(value = "方案金额") + private String totalMoney; + + @ApiModelProperty(value = "批量操作:保险id") + private String[] checkIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ConditionVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ConditionVO.java new file mode 100644 index 0000000..6bbcde0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/ConditionVO.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Condition对象", description="筛选项") +public class ConditionVO extends BaseVO { + + @Builder + public ConditionVO(Long id,String dataState,String conditionKey,String conditionKeyName,String conditionVal,Integer sortNo,String remake){ + super(id, dataState); + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.conditionVal=conditionVal; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; + + @ApiModelProperty(value = "条件项值") + private String conditionVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "批量操作:conditionKeys") + private String[] conditionKeys; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerBackInfoVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerBackInfoVO.java new file mode 100644 index 0000000..92bf7b7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerBackInfoVO.java @@ -0,0 +1,70 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.insurance.validator.anno.IdentityCard; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Description:客户信息表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CustomerInfo后台对象", description="CustomerInfo后台对象 后台对象不进行数据脱敏") +public class CustomerBackInfoVO extends BaseVO { + + @Builder + public CustomerBackInfoVO(String identityCard, Long id, String dataState, List fileVOs, String customerId, String remark, String cityName, BigDecimal income, BigDecimal liabilities, String realNameAuthentication, String bindingCard){ + super(id, dataState); + this.customerId=customerId; + this.remark=remark; + this.cityName=cityName; + this.income=income; + this.liabilities=liabilities; + this.realNameAuthentication=realNameAuthentication; + this.bindingCard=bindingCard; + this.fileVOs=fileVOs; + this.identityCard = identityCard; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "常驻城市") + private String cityName; + + @ApiModelProperty(value = "收入") + private BigDecimal income; + + @ApiModelProperty(value = "负债") + private BigDecimal liabilities; + + @ApiModelProperty(value = "实名认证(0是 1否)") + private String realNameAuthentication; + + @ApiModelProperty(value = "绑卡(0是 1否)") + private String bindingCard; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "身份证号码") + @IdentityCard(message = "身份证号格式错误") + private String identityCard; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerCardVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerCardVO.java new file mode 100644 index 0000000..cc30885 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerCardVO.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; +/** + * @Description:绑卡信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CustomerCard对象", description="绑卡信息") +public class CustomerCardVO extends BaseVO { + + @Builder + public CustomerCardVO(Long id,String dataState,List fileVOs,String customerId,String bankName,String bankAddress,String bankCardNo,String isDefault){ + super(id, dataState); + this.customerId=customerId; + this.bankName=bankName; + this.bankAddress=bankAddress; + this.bankCardNo=bankCardNo; + this.isDefault=isDefault; + this.fileVOs=fileVOs; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "银行名称") + private String bankName; + + @ApiModelProperty(value = "开户行地址") + private String bankAddress; + + @ApiModelProperty(value = "银行卡号") + private String bankCardNo; + + @ApiModelProperty(value = "是否默认(0是 1否)") + private String isDefault; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "银行预留手机号") + private String bankReservedPhoneNum; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerInfoVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerInfoVO.java new file mode 100644 index 0000000..429e1d3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerInfoVO.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.insurance.validator.anno.IdentityCard; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; +/** + * @Description:客户信息表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CustomerInfo对象", description="客户信息表") +public class CustomerInfoVO extends BaseVO { + + @Builder + public CustomerInfoVO(String identityCard,Long id,String dataState,List fileVOs,String customerId,String remark,String cityName,BigDecimal income,BigDecimal liabilities,String realNameAuthentication,String bindingCard,String name){ + super(id, dataState); + this.customerId=customerId; + this.remark=remark; + this.cityName=cityName; + this.income=income; + this.liabilities=liabilities; + this.realNameAuthentication=realNameAuthentication; + this.bindingCard=bindingCard; + this.fileVOs=fileVOs; + this.identityCard = identityCard; + this.name = name; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "常驻城市") + private String cityName; + + @ApiModelProperty(value = "收入") + private BigDecimal income; + + @ApiModelProperty(value = "负债") + private BigDecimal liabilities; + + @ApiModelProperty(value = "实名认证(0是 1否)") + private String realNameAuthentication; + + @ApiModelProperty(value = "绑卡(0是 1否)") + private String bindingCard; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "身份证号码") + @IdentityCard(message = "身份证号格式错误") + private String identityCard; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerPetVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerPetVO.java new file mode 100644 index 0000000..124312c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerPetVO.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +/** + * @Description:客户宠物 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="CustomerPet对象", description="客户宠物") +public class CustomerPetVO extends BaseVO { + + @Builder + public CustomerPetVO(Long id,String dataState,List fileVOs,String customerId,String petType,Date birthday,String sex,String sterilization){ + super(id, dataState); + this.customerId=customerId; + this.petType=petType; + this.birthday=birthday; + this.sex=sex; + this.sterilization=sterilization; + this.fileVOs=fileVOs; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "宠物种类:0猫 1狗") + private String petType; + + @ApiModelProperty(value = "生日") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date birthday; + + @ApiModelProperty(value = "性别:0公 1母") + private String sex; + + @ApiModelProperty(value = "绝育情况:0未绝育 1已绝育 3未知") + private String sterilization; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerRelationVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerRelationVO.java new file mode 100644 index 0000000..700251c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/CustomerRelationVO.java @@ -0,0 +1,126 @@ +package com.itheima.sfbx.insurance.dto; + +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.insurance.validator.anno.IdentityCard; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Description:客户关系表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "CustomerRelation对象", description = "客户关系表") +public class CustomerRelationVO extends BaseVO { + + @Builder + public CustomerRelationVO(Long id, String dataState, List fileVOs, String relation, String name, String identityCard, String companyNo, Integer sortNo, String socialSecurity, Long customerId, Long createBy, String[] relations,String sex) { + super(id, dataState); + this.relation = relation; + this.name = name; + this.identityCard = identityCard; + this.companyNo = companyNo; + this.sortNo = sortNo; + this.socialSecurity = socialSecurity; + this.fileVOs = fileVOs; + this.customerId = customerId; + this.relations = relations; + this.sex = sex; + setCreateBy(createBy); + } + + /** + * 根据身份证号获取性别 + * @return + */ + public String setSexByIdCard() { + String idNumber = this.identityCard; + if(StrUtil.isNotEmpty(idNumber)) { + if (idNumber.length() == 18) { + char genderChar = idNumber.charAt(16); // 18位身份证号的第17位 + int genderDigit = Character.getNumericValue(genderChar); + if (genderDigit % 2 == 0) { + this.sex = "女"; + return "女"; + } else { + this.sex = "男"; + return "男"; + } + } else if (idNumber.length() == 15) { + char genderChar = idNumber.charAt(14); // 15位身份证号的最后一位 + int genderDigit = Character.getNumericValue(genderChar); + if (genderDigit % 2 == 0) { + this.sex = "女"; + return "女"; + } else { + this.sex = "男"; + return "男"; + } + } else { + // 如果身份证号位数不是15位或18位,可以根据实际需求返回错误信息或其他处理方式 + this.sex = "无法确定性别"; + return "无法确定性别"; + } + }else { + // 如果身份证号位数不是15位或18位,可以根据实际需求返回错误信息或其他处理方式 + this.sex = "无法确定性别"; + return "无法确定性别"; + } + } + + + @ApiModelProperty(value = "关系人ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long customerId; + + @ApiModelProperty(value = "关系") + private String relation; + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "身份证号码") + @IdentityCard(message = "身份证号格式错误") + private String identityCard; + + @ApiModelProperty(value = "公司") + private String companyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "社保状态(0有 1无)") + private String socialSecurity; + + @ApiModelProperty(value = "城市编号") + private String cityNo; + + @ApiModelProperty(value = "收入") + private BigDecimal income; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "关系列表") + private String[] relations; + + @ApiModelProperty(value = "性别") + private String sex; + + @ApiModelProperty(value = "年龄") + private Integer age; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/DoInsureVo.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/DoInsureVo.java new file mode 100644 index 0000000..d12f245 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/DoInsureVo.java @@ -0,0 +1,86 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +/** + * @ClassName DoInsureVo.java + * @Description 投保请求Vo + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value="DoInsureVo对象", description="投保请求Vo") +public class DoInsureVo implements Serializable { + + @ApiModelProperty(value = "保险产品ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "保险方案ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insurancePlanId; + + @ApiModelProperty(value = "保险公司编号") + private String companyNo; + + @ApiModelProperty(value = "被投保人") + private List customerRelationIds; + + @ApiModelProperty(value = "旅游:保障生效期") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保险系数IDS") + private List insuranceCoefficentIds; + + @ApiModelProperty(value = "理财:购买价格") + private BigDecimal price; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "代理人Id") + private String agentId; + + @ApiModelProperty(value = "代理人姓名") + private String agentName; + + @ApiModelProperty(value = "是否有问题:0 是,1 否") + private String isProblem; + + @ApiModelProperty(value = "健康检查传输对象") + private AdviceHealthDTO adviceHealthDTO; + + @Builder + public DoInsureVo(String isProblem,Long insuranceId, Long insurancePlanId, String companyNo, List customerRelationIds, LocalDateTime safeguardStartTime, List insuranceCoefficentIds, BigDecimal price,String checkRule) { + this.insuranceId = insuranceId; + this.insurancePlanId = insurancePlanId; + this.companyNo = companyNo; + this.customerRelationIds = customerRelationIds; + this.safeguardStartTime = safeguardStartTime; + this.insuranceCoefficentIds = insuranceCoefficentIds; + this.price = price; + this.checkRule = checkRule; + this.isProblem = isProblem; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/EarningVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/EarningVO.java new file mode 100644 index 0000000..26a478d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/EarningVO.java @@ -0,0 +1,90 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +/** + * @ClassName EarningVO.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value="EarningVO对象", description="收益试算结果对象") +public class EarningVO implements Serializable { + + @ApiModelProperty(value = "每周期保费") + private BigDecimal premium; + + @ApiModelProperty(value = "投入总保费") + private BigDecimal premiums; + + @ApiModelProperty(value = "投入总期数") + private Integer periods; + + @ApiModelProperty(value = "投入周期单位") + private String periodicUnit; + + @ApiModelProperty(value = "投入周期时长") + private String periodic; + + @ApiModelProperty(value = "投入结束时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime putInEndTime; + + @ApiModelProperty(value = "领取开始时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime actualGetStartTime; + + @ApiModelProperty(value = "领取周期单位") + private String actualGetPeriodicUnit; + + @ApiModelProperty(value = "领取周期计划") + private List periodicVos ; + + @ApiModelProperty(value = "领取总金额") + private BigDecimal receivedAmounts ; + + @ApiModelProperty(value = "累计收益") + private BigDecimal accumulatedEarnings; + + @ApiModelProperty(value = "累计倍数") + private BigDecimal multiple; + + @Builder + public EarningVO(LocalDateTime putInEndTime,BigDecimal multiple,BigDecimal accumulatedEarnings,BigDecimal premium, BigDecimal premiums, Integer periods, String periodicUnit, String periodic, LocalDateTime actualGetStartTime, String actualGetPeriodicUnit, List periodicVos, BigDecimal receivedAmounts) { + this.premium = premium; + this.premiums = premiums; + this.periods = periods; + this.periodicUnit = periodicUnit; + this.periodic = periodic; + this.putInEndTime = putInEndTime; + this.actualGetStartTime = actualGetStartTime; + this.actualGetPeriodicUnit = actualGetPeriodicUnit; + this.periodicVos = periodicVos; + this.receivedAmounts = receivedAmounts; + this.accumulatedEarnings=accumulatedEarnings; + this.multiple = multiple; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HealthAssessmentVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HealthAssessmentVO.java new file mode 100644 index 0000000..2b9ee2c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HealthAssessmentVO.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:评估类目 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="HealthAssessment对象", description="评估类目") +public class HealthAssessmentVO extends BaseVO { + + @Builder + public HealthAssessmentVO(Long id,String dataState,Long insuranceId,String assessmentKey,String assessmentKeyName,String assessmentVal,Integer sortNo,String remake){ + super(id, dataState); + this.insuranceId=insuranceId; + this.assessmentKey=assessmentKey; + this.assessmentKeyName=assessmentKeyName; + this.assessmentVal=assessmentVal; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保险产品id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "评估类目key") + private String assessmentKey; + + @ApiModelProperty(value = "评估类目名称") + private String assessmentKeyName; + + @ApiModelProperty(value = "评估类目值") + private String assessmentVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomePeopleVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomePeopleVO.java new file mode 100644 index 0000000..36abf7b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomePeopleVO.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * HomePeopleVO + * + * @author: wgl + * @describe: 家庭人身保障 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ApiModel(value="家庭人身保障对象", description="家庭人身保障") +public class HomePeopleVO { + + @ApiModelProperty(value = "姓名(脱敏后)") + private String name; + + @ApiModelProperty(value = "保险信息") + private List type; + + @ApiModelProperty(value = "关系") + private String relation; + + @ApiModelProperty(value = "性别") + private String sex; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomeSafeguardDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomeSafeguardDTO.java new file mode 100644 index 0000000..93a8660 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/HomeSafeguardDTO.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * HomeSafeguardDTO + * + * @author: wgl + * @describe: 家庭保障DTO对象 + * @date: 2022/12/28 10:10 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class HomeSafeguardDTO { + + /** + * 保险ID + */ + private String insuranceId; + + /** + * 身份证号 + */ + private String idCard; + + /** + * 合同编号 + */ + private String warrantyNo; + + /** + * 保单类型 + */ + private String checkRule; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveDetailVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveDetailVO.java new file mode 100644 index 0000000..6303af1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveDetailVO.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:保批信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceApproveDetail对象", description="保批信息") +public class InsuranceApproveDetailVO extends BaseVO { + + @Builder + public InsuranceApproveDetailVO(Long id,String dataState,Long approveId,String type,String changeFieldKey,String title,String label,String modifyCont,String modifyReason,String approveTime,Integer sortNo){ + super(id, dataState); + this.approveId=approveId; + this.type=type; + this.changeFieldKey=changeFieldKey; + this.title=title; + this.label=label; + this.modifyCont=modifyCont; + this.modifyReason=modifyReason; + this.approveTime=approveTime; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "报批id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long approveId; + + @ApiModelProperty(value = "投保人:0 被保人:1") + private String type; + + @ApiModelProperty(value = "修改字段键") + private String changeFieldKey; + + @ApiModelProperty(value = "修改字段名") + private String title; + + @ApiModelProperty(value = "修改前的内容") + private String label; + + @ApiModelProperty(value = "修改后的内容") + private String modifyCont; + + @ApiModelProperty(value = "原因") + private String modifyReason; + + @ApiModelProperty(value = "修改时间") + private String approveTime; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveVO.java new file mode 100644 index 0000000..6847e63 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceApproveVO.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:保批信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceApprove对象", description="保批信息") +public class InsuranceApproveVO extends BaseVO { + + @Builder + public InsuranceApproveVO(Long id,String dataState,String companyNo,String warrantyNo,String approveState,Date approveTime,Integer sortNo){ + super(id, dataState); + this.companyNo=companyNo; + this.warrantyNo=warrantyNo; + this.approveState=approveState; + this.approveTime=approveTime; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "公司编号") + private String companyNo; + + @ApiModelProperty(value = "保险合同编号") + private String warrantyNo; + + @ApiModelProperty(value = "批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)") + private String approveState; + + @ApiModelProperty(value = "修改时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date approveTime; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + + @ApiModelProperty(value = "保批详情") + private List approveDetails; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceCoefficentVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceCoefficentVO.java new file mode 100644 index 0000000..9951ff4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceCoefficentVO.java @@ -0,0 +1,81 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:保险系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceCoefficent对象", description="保险系数项") +public class InsuranceCoefficentVO extends BaseVO { + + @Builder + public InsuranceCoefficentVO(String isShow,String coefficentAsName,String coefficentType,Long id,String dataState,Long insuranceId,String coefficentKey,String coefficentKeyName,String coefficentValue,BigDecimal score,String isDefault,Integer sortNo,String[] checkedIds,Long[] instanceIds){ + super(id, dataState); + this.insuranceId=insuranceId; + this.coefficentKey=coefficentKey; + this.coefficentKeyName=coefficentKeyName; + this.coefficentValue=coefficentValue; + this.coefficentType=coefficentType; + this.coefficentAsName=coefficentAsName; + this.score=score; + this.isShow=isShow; + this.isDefault=isDefault; + this.sortNo=sortNo; + this.checkedIds = checkedIds; + this.instanceIds = instanceIds; + } + + @ApiModelProperty(value = "保险产品id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "系数项key:bznx") + private String coefficentKey; + + @ApiModelProperty(value = "系数项名称:保障年限") + private String coefficentKeyName; + + @ApiModelProperty(value = "系数项类型:0、选项系数1、范围系数 2、年限系数") + private String coefficentType; + + @ApiModelProperty(value = "系数项别名") + private String coefficentAsName; + + @ApiModelProperty(value = "系数项值") + private String coefficentValue; + + @ApiModelProperty(value = "系数项试算值") + private BigDecimal score; + + @ApiModelProperty(value = "是否默认") + private String isDefault; + + @ApiModelProperty(value = "是否展示") + private String isShow; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "批量操作:保险ID") + private Long[] instanceIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceConditionVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceConditionVO.java new file mode 100644 index 0000000..817dcde --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceConditionVO.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:保险筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceCondition对象", description="保险筛选项") +public class InsuranceConditionVO extends BaseVO { + + @Builder + public InsuranceConditionVO(Long id, String dataState, String insuranceId, String conditionKey, String conditionKeyName, String conditionVal, Integer sortNo, String remake, String[] checkedIds,Long[] insuranceIds){ + super(id, dataState); + this.insuranceId=insuranceId; + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.conditionVal=conditionVal; + this.sortNo=sortNo; + this.remake=remake; + this.checkedIds = checkedIds; + this.insuranceIds= insuranceIds; + } + + @ApiModelProperty(value = "保险产品ID") + private String insuranceId; + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; + + @ApiModelProperty(value = "条件项值") + private String conditionVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "批量操作:保险id") + private Long[] insuranceIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanTimeDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanTimeDTO.java new file mode 100644 index 0000000..83a3935 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanTimeDTO.java @@ -0,0 +1,57 @@ +package com.itheima.sfbx.insurance.dto; + +import lombok.AllArgsConstructor; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * InsurancePlanTimeDTO + * + * @author: wgl + * @describe: 保险方案次数DTO + * @date: 2022/12/28 10:10 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +public class InsurancePlanTimeDTO { + + /** + * 包含保障项次数 + */ + private Integer times; + + /** + * 保险 + */ + private InsuranceVO insuranceVO; + + /** + * 对应的保险方案 + */ + private InsurancePlanVO insurancePlanVO; + + /** + * 方案对应的保额 + */ + private BigDecimal amount; + + + /** + * 对应的类型 医疗 意外 重疾 + */ + private String type; + + + /** + * 保险建议 + */ + private String insuranceSuggest; + + /** + * 解决方案 + */ + private String solution; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanVO.java new file mode 100644 index 0000000..ccf6201 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsurancePlanVO.java @@ -0,0 +1,92 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:保险方案 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsurancePlan对象", description="保险方案") +public class InsurancePlanVO extends BaseVO { + + @Builder + public InsurancePlanVO(Long planNo,BigDecimal maxPriceYear,BigDecimal maxPriceMonth,BigDecimal maxPriceWeek,BigDecimal maxPriceAllIn,Long id,String dataState,Long insuranceId,String palnName,String palnRemake,BigDecimal price,String priceUnit,Integer sortNo,Long[] insuranceIds){ + super(id, dataState); + this.insuranceId=insuranceId; + this.palnName=palnName; + this.palnRemake=palnRemake; + this.price=price; + this.priceUnit=priceUnit; + this.sortNo=sortNo; + this.maxPriceYear =maxPriceYear; + this.maxPriceMonth =maxPriceMonth; + this.maxPriceWeek =maxPriceWeek; + this.maxPriceAllIn=maxPriceAllIn; + this.insuranceIds = insuranceIds; + this.planNo=planNo; + } + + @ApiModelProperty(value = "保险商品id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "保险方案名称") + private String palnName; + + @ApiModelProperty(value = "保险方案编号") + private Long planNo; + + @ApiModelProperty(value = "保险方案名称补充") + private String palnRemake; + + @ApiModelProperty(value = "默认定价") + private BigDecimal price; + + @ApiModelProperty(value = "默认定价单位:y/d,y/m,y/y") + private String priceUnit; + + @ApiModelProperty(value = "每年最高") + private BigDecimal maxPriceYear; + + @ApiModelProperty(value = "每月最高") + private BigDecimal maxPriceMonth; + + @ApiModelProperty(value = "每周最高") + private BigDecimal maxPriceWeek; + + @ApiModelProperty(value = "一次性投入最高") + private BigDecimal maxPriceAllIn; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "保险方案保障项") + private List planSafeguardVOs; + + @ApiModelProperty(value = "方案给付计划") + private PlanEarningsVO planEarningsVO; + + @ApiModelProperty(value = "批量操作:保险id") + private Long[] insuranceIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceRuleVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceRuleVO.java new file mode 100644 index 0000000..2beb814 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceRuleVO.java @@ -0,0 +1,48 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:保险规则 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceRule对象", description="保险规则") +public class InsuranceRuleVO extends BaseVO { + + @Builder + public InsuranceRuleVO(Long id,String dataState,String rulesId,String insuranceId,String rulesType){ + super(id, dataState); + this.rulesId=rulesId; + this.insuranceId=insuranceId; + this.rulesType=rulesType; + } + + @ApiModelProperty(value = "规则ID") + private String rulesId; + + @ApiModelProperty(value = "保险ID") + private String insuranceId; + + @ApiModelProperty(value = "规则类型") + private String rulesType; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSafeguardCoverageDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSafeguardCoverageDTO.java new file mode 100644 index 0000000..302579b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSafeguardCoverageDTO.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.insurance.dto; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * InsuranceCoverageDTO + * + * @author: wgl + * @describe: 保障项详情类目 + * @date: 2022/12/28 10:10 + */ +@Data +public class InsuranceSafeguardCoverageDTO { + + //保额 + private String val; + + //保险名称 + private String name; + + private BigDecimal score; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSievingVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSievingVO.java new file mode 100644 index 0000000..5f78cc2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceSievingVO.java @@ -0,0 +1,47 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +/** + * @Description:初筛结果 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceSieving对象", description="初筛结果") +public class InsuranceSievingVO extends BaseVO { + + @Builder + public InsuranceSievingVO(Long id,String dataState,String name,String sicksName,String sicksKey,Boolean result,Integer sortNo){ + super(id, dataState); + this.name=name; + this.sicksName=sicksName; + this.sicksKey=sicksKey; + this.result=result; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "疾病列表") + private String sicksName; + + @ApiModelProperty(value = "疾病key列表") + private String sicksKey; + + @ApiModelProperty(value = "初筛结果") + private Boolean result; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTopVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTopVO.java new file mode 100644 index 0000000..9e7248b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTopVO.java @@ -0,0 +1,75 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:人气保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="InsuranceTop对象", description="人气保险") +public class InsuranceTopVO extends BaseVO { + + @Builder + public InsuranceTopVO(Long id,String dataState,Long insuranceId,String insuranceName,String categoryNo,String categoryType,String categoryName,Long palnId,BigDecimal price,String priceUnit,Long salesVolume){ + super(id, dataState); + this.insuranceId=insuranceId; + this.insuranceName=insuranceName; + this.categoryNo=categoryNo; + this.categoryType=categoryType; + this.categoryName=categoryName; + this.palnId=palnId; + this.price=price; + this.priceUnit=priceUnit; + this.salesVolume=salesVolume; + } + + @ApiModelProperty(value = "保险ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "保障类型: 1推荐分类 2产品分类 ") + private String categoryType; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "方案ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long palnId; + + @ApiModelProperty(value = "默认定价") + private BigDecimal price; + + @ApiModelProperty(value = "默认定价单位:y/d,y/m,y/y") + private String priceUnit; + + @ApiModelProperty(value = "销量") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long salesVolume; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTypeInfoVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTypeInfoVO.java new file mode 100644 index 0000000..798447c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceTypeInfoVO.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; + +import java.util.List; + +/** + * InsuranceTypeInfoVO + * + * @author: wgl + * @describe: 保险类型下的保险VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ApiModel(value="保险类型下的保险VO类", description="保险分类列表") +public class InsuranceTypeInfoVO { + + @ApiModelProperty(value = "保险类型") + private String checkRule; + + @ApiModelProperty(value = "当前类型下的保险列表") + private List data; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceVO.java new file mode 100644 index 0000000..8135da0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsuranceVO.java @@ -0,0 +1,184 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.security.CompanyVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** + * @Description:保险产品 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "Insurance对象", description = "保险产品") +public class InsuranceVO extends BaseVO { + + @Builder + public InsuranceVO(BigDecimal operatingRate, BigDecimal individualAgentRate, BigDecimal platformAgentRate, String goldSelection, String carefree, Long id, String dataState, List fileVOs, String publishNumber, Long categoryNo, Long recommendCategoryNo, String insuranceName, String showIndex, String labelsJson, String remakeJson, Long timeStart, String timeStartUnit, Long timeEnd, String timeEndUnit, String relation, Integer sortNo, String multiple, Long continuousInsuranceAge, String checkRule, String companyNo, String insuranceState, Integer grace, String graceUnit, Integer revival, String revivalUnit, String comment, String remake, Integer hesitation, Integer waits,String[] checkedIds) { + super(id, dataState); + this.publishNumber = publishNumber; + this.categoryNo = categoryNo; + this.recommendCategoryNo = recommendCategoryNo; + this.insuranceName = insuranceName; + this.goldSelection = goldSelection; + this.carefree = carefree; + this.showIndex = showIndex; + this.labelsJson = labelsJson; + this.remakeJson = remakeJson; + this.timeStart = timeStart; + this.timeStartUnit = timeStartUnit; + this.timeEnd = timeEnd; + this.timeEndUnit = timeEndUnit; + this.relation = relation; + this.sortNo = sortNo; + this.multiple = multiple; + this.continuousInsuranceAge = continuousInsuranceAge; + this.checkRule = checkRule; + this.companyNo = companyNo; + this.insuranceState = insuranceState; + this.grace = grace; + this.graceUnit = graceUnit; + this.revival = revival; + this.revivalUnit = revivalUnit; + this.comment = comment; + this.remake = remake; + this.hesitation = hesitation; + this.waits = waits; + this.fileVOs = fileVOs; + this.operatingRate = operatingRate; + this.individualAgentRate = individualAgentRate; + this.platformAgentRate = platformAgentRate; + this.checkedIds = checkedIds; + } + + @ApiModelProperty(value = "银保监备案号") + private String publishNumber; + + @ApiModelProperty(value = "分类编号") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long categoryNo; + + @ApiModelProperty(value = "推荐分类") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long recommendCategoryNo; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "金选:0是 1否") + private String goldSelection; + + @ApiModelProperty(value = "安心赔:0是 1否") + private String carefree; + + @ApiModelProperty(value = "首页热点显示(是0 否1)") + private String showIndex; + + @ApiModelProperty(value = "保险标签格式:[{key:200万医疗金,val:指定私立意义}]") + private String labelsJson; + + @ApiModelProperty(value = "补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]") + private String remakeJson; + + @ApiModelProperty(value = "可购买起始点") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long timeStart; + + @ApiModelProperty(value = "可购买起始点单位:天、年") + private String timeStartUnit; + + @ApiModelProperty(value = "可购买结束点") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long timeEnd; + + @ApiModelProperty(value = "可购买结束点单位:天、年") + private String timeEndUnit; + + @ApiModelProperty(value = "可投保关系:self,children:spouse,parents") + private String relation; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "团个险(0团 1个)") + private String multiple; + + @ApiModelProperty(value = "连续投保年龄") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long continuousInsuranceAge; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4年金 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "保险状态(上架0 下架1)") + private String insuranceState; + + @ApiModelProperty(value = "保单宽限") + private Integer grace; + + @ApiModelProperty(value = "宽限单位") + private String graceUnit; + + @ApiModelProperty(value = "保单复效") + private Integer revival; + + @ApiModelProperty(value = "复效单位") + private String revivalUnit; + + @ApiModelProperty(value = "产品点评") + private String comment; + + @ApiModelProperty(value = "产品描述") + private String remake; + + @ApiModelProperty(value = "犹豫期") + private Integer hesitation; + + @ApiModelProperty(value = "等待期") + private Integer waits; + + @ApiModelProperty(value = "文件VO对象") + private List fileVOs; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "运营费率") + private BigDecimal operatingRate; + + @ApiModelProperty(value = "个人代理费率") + private BigDecimal individualAgentRate; + + @ApiModelProperty(value = "平台代理费率") + private BigDecimal platformAgentRate; + + @ApiModelProperty(value = "保险方案") + private List insurancePlanVOs; + + @ApiModelProperty(value = "公司信息") + private CompanyVO companyVO; + + @ApiModelProperty(value = "保险系数项") + private List insuranceCoefficentVOs; + + @ApiModelProperty(value = "查询:保险筛选项值") + private List conditionVals; + + @ApiModelProperty(value = "保险筛选项") + private List insuranceConditionVOs; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureProcessVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureProcessVO.java new file mode 100644 index 0000000..3527f3d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureProcessVO.java @@ -0,0 +1,48 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.security.CompanyVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * @ClassName InsureProcessVO.java + * @Description 投保、试算处理对象 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value="InsureProcessVO对象", description="投保、试算处理对象") +public class InsureProcessVO implements Serializable { + + @ApiModelProperty(value = "保险信息") + private InsuranceVO insuranceVO; + + @ApiModelProperty(value = "保险方案") + private InsurancePlanVO insurancePlanVO; + + @ApiModelProperty(value = "公司信息") + private CompanyVO companyVO; + + @ApiModelProperty(value = "保障项信息)") + private List safeguardVOs; + + @ApiModelProperty(value = "保险系数项") + private List coefficents; + + @Builder + public InsureProcessVO(InsuranceVO insuranceVO, InsurancePlanVO insurancePlanVO, CompanyVO companyVO, List safeguardVOs, List coefficents) { + this.insuranceVO = insuranceVO; + this.insurancePlanVO = insurancePlanVO; + this.companyVO = companyVO; + this.safeguardVOs = safeguardVOs; + this.coefficents = coefficents; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureTypeOnHomePeopleVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureTypeOnHomePeopleVO.java new file mode 100644 index 0000000..d1a79b1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/InsureTypeOnHomePeopleVO.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * InsureTypeOnHomePeopleVO + * + * @author: wgl + * @describe: 家庭人身保障向项DTP + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class InsureTypeOnHomePeopleVO { + + /** + * 类型名称 + */ + @ApiModelProperty(value = "类型名称") + private String checkRule; + + /** + * 对应的值 + */ + @ApiModelProperty(value = "是否保障") + private Boolean value; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonAttribute.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonAttribute.java new file mode 100644 index 0000000..aa72372 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonAttribute.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName JsonAttribute.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@ApiModel(value="json属性对象", description="json属性对象") +public class JsonAttribute implements Serializable { + + @Builder + public JsonAttribute(String name, String val) { + this.name = name; + this.val = val; + } + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "值") + private String val; + + @ApiModelProperty(value = "单位") + private String unit; + + @ApiModelProperty(value = "计算值:通常用于投入周期时长,保障时长计算") + private String calculatedVal; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonScoreAttribute.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonScoreAttribute.java new file mode 100644 index 0000000..3a73094 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/JsonScoreAttribute.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName JsonScoreAttribute.java + * @Description 保障项打分对象 + */ +@Data +@NoArgsConstructor +@ApiModel(value="json打分属性对象", description="json打分属性对象") +public class JsonScoreAttribute implements Serializable { + + @Builder + public JsonScoreAttribute(String name, String val,String scorre) { + this.name = name; + this.val = val; + this.scorre = scorre; + } + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "值") + private String val; + + @ApiModelProperty(value = "单位") + private String scorre; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoItemVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoItemVO.java new file mode 100644 index 0000000..ca64608 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoItemVO.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName MyWarrantyInfoVO.java + * @Description 我的保险信息VO + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value = "MyWarrantyInfoVO对象", description = "我的tab页:各保险数量") +public class MyWarrantyInfoItemVO implements Serializable { + + @ApiModelProperty(value = "保障类型") + private String warrantyType; + + @ApiModelProperty(value = "保单数量") + private Integer nums; + + @Builder + public MyWarrantyInfoItemVO(String warrantyType, Integer nums) { + this.warrantyType = warrantyType; + this.nums = nums; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoVO.java new file mode 100644 index 0000000..525bec6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/MyWarrantyInfoVO.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * MyWarrantyInfoVO + * + * @author: wgl + * @describe: 总的我的保单信息对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value = "MyWarrantyInfoVO对象", description = "我的tab页:各保险数量以及我的保单数量") +public class MyWarrantyInfoVO implements Serializable { + + @ApiModelProperty(value = "保障类型") + private List data; + + @ApiModelProperty(value = "总数") + private Integer nums; + + @Builder + public MyWarrantyInfoVO(List data, Integer nums) { + this.data = data; + this.nums = nums; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PeriodicVo.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PeriodicVo.java new file mode 100644 index 0000000..0bb9503 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PeriodicVo.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +/** + * @ClassName PeriodicVo.java + * @Description 领取周期计划 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value="PeriodicVo对象", description="领取周期计划") +public class PeriodicVo implements Serializable { + + @ApiModelProperty(value = "第几期") + private String periodic; + + @ApiModelProperty(value = "领取金额") + private BigDecimal receivedAmount; + + + @ApiModelProperty(value = "领取时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime actualGetStartTime; + + @Builder + public PeriodicVo(String periodic, BigDecimal receivedAmount, LocalDateTime actualGetStartTime) { + this.periodic = periodic; + this.receivedAmount = receivedAmount; + this.actualGetStartTime = actualGetStartTime; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanEarningsVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanEarningsVO.java new file mode 100644 index 0000000..3c7961c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanEarningsVO.java @@ -0,0 +1,52 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:方案给付 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="PlanEarnings对象", description="方案给付") +public class PlanEarningsVO extends BaseVO { + + @Builder + public PlanEarningsVO(Long id,String dataState,Long palnId,String earningsType,Integer periods,String earningsJson){ + super(id, dataState); + this.palnId=palnId; + this.earningsType=earningsType; + this.periods=periods; + this.earningsJson=earningsJson; + } + + @ApiModelProperty(value = "保险方案id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long palnId; + + @ApiModelProperty(value = "给付类型:0终身领取 1固定领取") + private String earningsType; + + @ApiModelProperty(value = "周期数") + private Integer periods; + + @ApiModelProperty(value = "领取计划") + private String earningsJson; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanSafeguardVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanSafeguardVO.java new file mode 100644 index 0000000..4d9361a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/PlanSafeguardVO.java @@ -0,0 +1,77 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:方案保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="PlanSafeguard对象", description="方案保障项") +public class PlanSafeguardVO extends BaseVO { + + @Builder + public PlanSafeguardVO(Long id,String dataState,Long planId,String safeguardKey,String safeguardKeyName,String safeguardValue,String safeguardAsName,String safeguardType,String position,String remake,Integer sortNo){ + super(id, dataState); + this.planId=planId; + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.safeguardValue=safeguardValue; + this.safeguardAsName=safeguardAsName; + this.safeguardType=safeguardType; + this.position=position; + this.remake=remake; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险方案ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long planId; + + @ApiModelProperty(value = "保障项key:mzyl") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "保障项值") + private String safeguardValue; + + @ApiModelProperty(value = "表单:全量保障项值") + private List safeguardVOs; + + @ApiModelProperty(value = "保障项别名:一般门诊费用") + private String safeguardAsName; + + @ApiModelProperty(value = "保障类型(0保障规则 1 保障信息)") + private String safeguardType; + + @ApiModelProperty(value = "显示位置:0 列表页 1 详情页") + private String position; + + @ApiModelProperty(value = "保障内容补充说明") + private String remake; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionTemplateVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionTemplateVO.java new file mode 100644 index 0000000..886351d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionTemplateVO.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + +/** + * QuestionTemplateDTO + * + * @author: wgl + * @describe: 问卷对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="问卷对象", description="健康咨询问卷对象") +public class QuestionTemplateVO { + + @ApiModelProperty(value = "疾病列表") + private List sicks; + + @ApiModelProperty(value = "问卷列表,key为疾病key value为对应的问卷") + private Map> questions; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionVO.java new file mode 100644 index 0000000..c537003 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/QuestionVO.java @@ -0,0 +1,31 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + +/** + * QuestionDTO + * + * @author: wgl + * @describe: 问题对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="问卷详情", description="每个疾病的问卷详情信息") +public class QuestionVO { + + @ApiModelProperty(value = "问卷唯一标识") + private String questionKey; + + @ApiModelProperty(value = "标题") + private String title; + + @ApiModelProperty(value = "用户选项") + private List choses; +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RangJsonAttribute.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RangJsonAttribute.java new file mode 100644 index 0000000..b4638c3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RangJsonAttribute.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; + +/** + * @ClassName JsonAttribute.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@ApiModel(value="范围json属性对象", description="范围json属性对象") +public class RangJsonAttribute implements Serializable { + + @Builder + public RangJsonAttribute(String start, String startUnit, String end, String endUnit) { + this.start = start; + this.startUnit = startUnit; + this.end = end; + this.endUnit = endUnit; + } + + @ApiModelProperty(value = "起始") + private String start; + + @ApiModelProperty(value = "起始单位") + private String startUnit; + + @ApiModelProperty(value = "结束") + private String end; + + @ApiModelProperty(value = "结束单位") + private String endUnit; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskAnalysisVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskAnalysisVO.java new file mode 100644 index 0000000..2c832b9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskAnalysisVO.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:风险类目 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="RiskAnalysis对象", description="风险类目") +public class RiskAnalysisVO extends BaseVO { + + @Builder + public RiskAnalysisVO(Long id,String dataState,Long insuranceId,String assessmentKey,String assessmentKeyName,String assessmentVal,String assessmentType,Integer sortNo,String remake){ + super(id, dataState); + this.insuranceId=insuranceId; + this.assessmentKey=assessmentKey; + this.assessmentKeyName=assessmentKeyName; + this.assessmentVal=assessmentVal; + this.assessmentType=assessmentType; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保险产品id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "风险项key") + private String assessmentKey; + + @ApiModelProperty(value = "风险项项名称") + private String assessmentKeyName; + + @ApiModelProperty(value = "风险项项值") + private String assessmentVal; + + @ApiModelProperty(value = "风险项类型: 0医疗风险 1重疾风险 2身故风险 3意外风险") + private String assessmentType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskVO.java new file mode 100644 index 0000000..3f34b40 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/RiskVO.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:风险表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Risk对象", description="风险表") +public class RiskVO extends BaseVO { + + @Builder + public RiskVO(Long id,String dataState,String riskTypeKey,String riskTypeName,String riskKey,String riskName,Integer sortNo){ + super(id, dataState); + this.riskTypeKey=riskTypeKey; + this.riskTypeName=riskTypeName; + this.riskKey=riskKey; + this.riskName=riskName; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险项类型key") + private String riskTypeKey; + + @ApiModelProperty(value = "风险项类型name") + private String riskTypeName; + + @ApiModelProperty(value = "风险项key") + private String riskKey; + + @ApiModelProperty(value = "风险项名称") + private String riskName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SafeguardVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SafeguardVO.java new file mode 100644 index 0000000..6c7bd76 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SafeguardVO.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="SafeguardVO对象", description="保障项") +public class SafeguardVO extends BaseVO { + + @Builder + public SafeguardVO(Long id,String dataState,String safeguardKey,String safeguardKeyName,String safeguardVal,String safeguardType,Integer sortNo,String remake,String[] checkedIds){ + super(id, dataState); + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.safeguardVal=safeguardVal; + this.safeguardType=safeguardType; + this.sortNo=sortNo; + this.remake=remake; + this.checkedIds = checkedIds; + + } + + @ApiModelProperty(value = "保障项key:mzyl") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "保障项值") + private String safeguardVal; + + @ApiModelProperty(value = "保障项分类:0保障规则 1保障信息") + private String safeguardType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SaleTopInsuranceVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SaleTopInsuranceVO.java new file mode 100644 index 0000000..52dad81 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SaleTopInsuranceVO.java @@ -0,0 +1,63 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "SaleTopInsurance对象", description = "") +public class SaleTopInsuranceVO extends BaseVO { + + @Builder + public SaleTopInsuranceVO(Long id, String dataState, String checkRule, Long insuranceId, String insuranceName, String insuranceDetail, String comment, String remake, Long categoryNo, String companyNo) { + super(id, dataState); + this.checkRule = checkRule; + this.insuranceId = insuranceId; + this.insuranceName = insuranceName; + this.insuranceDetail = insuranceDetail; + this.comment = comment; + this.remake = remake; + this.categoryNo = categoryNo; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "保险类型") + private String checkRule; + + @ApiModelProperty(value = "保险id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "保险详情") + private String insuranceDetail; + + @ApiModelProperty(value = "产品点评") + private String comment; + + @ApiModelProperty(value = "产品描述") + private String remake; + + @ApiModelProperty(value = "分类编号") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long categoryNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SearchRecordVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SearchRecordVO.java new file mode 100644 index 0000000..c71dba6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SearchRecordVO.java @@ -0,0 +1,41 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:搜索记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="SearchRecord对象", description="搜索记录") +public class SearchRecordVO extends BaseVO { + + @Builder + public SearchRecordVO(Long id,String dataState,String content,Long createBy){ + super(id, dataState); + this.content=content; + setCreateBy(createBy); + } + + @ApiModelProperty(value = "搜索内容") + private String content; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SeekAdviceVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SeekAdviceVO.java new file mode 100644 index 0000000..0af2afd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SeekAdviceVO.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * SeekAdviceVO + * + * @author: wgl + * @describe: 健康咨询VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "健康咨询对象", description = "健康咨询对象") +public class SeekAdviceVO { + + @ApiModelProperty(value = "用户选择的疾病列表") + private List sickList; + + + @ApiModelProperty(value = "保险id") + private String insuranceId; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionIndexVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionIndexVO.java new file mode 100644 index 0000000..78e6137 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionIndexVO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.util.List; +import java.util.Map; + +/** + * SelfSelectionIndexVO + * + * @author: wgl + * @describe: 自选保险首页列表 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "SelfSelection对象", description = "自选保险") +public class SelfSelectionIndexVO extends BaseVO { + + @Builder + public SelfSelectionIndexVO(Long id, String dataState, SelfSelectionVO selections, InsurancePlanVO insurancePlanVO) { + super(id, dataState); + this.selections = selections; + this.insurancePlanVO = insurancePlanVO; + } + + @ApiModelProperty(value = "自选保险列表") + private SelfSelectionVO selections; + + + @ApiModelProperty(value = "最便宜保险计划") + private InsurancePlanVO insurancePlanVO; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionVO.java new file mode 100644 index 0000000..1a6d8d3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfSelectionVO.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:自选保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="SelfSelection对象", description="自选保险") +public class SelfSelectionVO extends BaseVO { + + @Builder + public SelfSelectionVO(Long id,String dataState,Long insuranceId,String relation,Integer sortNo){ + super(id, dataState); + this.insuranceId=insuranceId; + this.relation=relation; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "关系") + private String relation; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfWarrantyVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfWarrantyVO.java new file mode 100644 index 0000000..fcfe186 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SelfWarrantyVO.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.insurance.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * SelfWarrantyVO + * + * @author: wgl + * @describe: 个人保险数据对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="个人保险数据对象", description="个人保险数据对象") +public class SelfWarrantyVO{ + + + @Builder + public SelfWarrantyVO(Integer insureNums, Integer insureIngNums,Integer notRenewalNums) { + this.insureNums = insureNums; + this.insureIngNums = insureIngNums; + this.notRenewalNums = notRenewalNums; + } + + @ApiModelProperty(value = "保单数量") + private Integer insureNums; + + @ApiModelProperty(value = "持续中的保单数量") + private Integer insureIngNums; + + @ApiModelProperty(value = "待续保单数量") + private Integer notRenewalNums; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickSearchRecordVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickSearchRecordVO.java new file mode 100644 index 0000000..61cdc45 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickSearchRecordVO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:疾病搜索记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="SickSearchRecord对象", description="疾病搜索记录") +public class SickSearchRecordVO extends BaseVO { + + @Builder + public SickSearchRecordVO(Long id,String dataState,String content){ + super(id, dataState); + this.content=content; + } + + @ApiModelProperty(value = "搜索内容") + private String content; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickVO.java new file mode 100644 index 0000000..dad19bc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/SickVO.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:疾病表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="Sick对象", description="疾病表") +public class SickVO extends BaseVO { + + @Builder + public SickVO(Long id,String dataState,String sickKey,String sickKeyName,String sickVal,String remake,String sickType,Long createBy){ + super(id, dataState); + this.sickKey=sickKey; + this.sickKeyName=sickKeyName; + this.sickVal=sickVal; + this.remake=remake; + this.sickType=sickType; + super.setCreateBy(createBy); + } + + @ApiModelProperty(value = "疾病Key") + private String sickKey; + + @ApiModelProperty(value = "疾病类型") + private String sickType; + + @ApiModelProperty(value = "咨询问卷Json") + private String question; + + @ApiModelProperty(value = "疾病名称") + private String sickKeyName; + + @ApiModelProperty(value = "疾病项值") + private String sickVal; + + @ApiModelProperty(value = "备注") + private String remake; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyApplicantVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyApplicantVO.java new file mode 100644 index 0000000..4a72378 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyApplicantVO.java @@ -0,0 +1,75 @@ +package com.itheima.sfbx.insurance.dto; + +import cn.hutool.core.util.StrUtil; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.CustomerInfoUtil; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +/** + * @ClassName WarrantyApplicantVO.java + * @Description 合同投保人 + */ +@Data +@EqualsAndHashCode +@ApiModel(value="WarrantyInsured对象", description="合同投保人") +public class WarrantyApplicantVO { + + @ApiModelProperty(value = "客户基本信息") + private CustomerBackInfoVO customerInfoVO; + + @ApiModelProperty(value = "绑卡信息") + private List customerCardVO; + + @ApiModelProperty(value = "生日") + private String birthday; + + @ApiModelProperty(value = "性别") + private String sex; + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "年龄") + private Integer age; + + + + /** + * 构造方法私有 + * @param customerBackInfoVO + * @param customerCardVO + * @param realName + */ + + private WarrantyApplicantVO(CustomerBackInfoVO customerBackInfoVO, List customerCardVO, String realName) { + this.customerInfoVO = customerBackInfoVO; + this.customerCardVO = customerCardVO; + this.realName = realName; + this.sex = CustomerInfoUtil.setSexByIdCard(customerInfoVO.getIdentityCard()); + this.age = CustomerInfoUtil.getAgeByIdCard(customerInfoVO.getIdentityCard()); + this.birthday = CustomerInfoUtil.getBirthDateByIdCard(customerInfoVO.getIdentityCard()); + } + + /** + * 提供对外提供服务的构造方法 + * @param customerInfoVO + * @param customerCardVO + * @param realName + * @return + */ + public static WarrantyApplicantVO buildApplicantInfo(CustomerInfoVO customerInfoVO, List customerCardVO, String realName) { + CustomerBackInfoVO customerBackInfoVO = BeanConv.toBean(customerInfoVO, CustomerBackInfoVO.class); + WarrantyApplicantVO warrantyApplicantVO = new WarrantyApplicantVO(customerBackInfoVO,customerCardVO,realName); + return warrantyApplicantVO; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyEarningsOrderVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyEarningsOrderVO.java new file mode 100644 index 0000000..75c6ed0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyEarningsOrderVO.java @@ -0,0 +1,85 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; +/** + * @Description:给付计划订单 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyEarningsOrder对象", description="给付计划订单") +public class WarrantyEarningsOrderVO extends BaseVO { + + @Builder + public WarrantyEarningsOrderVO(Long id,String dataState,String orderNo,BigDecimal premium,String warrantyNo,String currentPeriod,LocalDateTime scheduleTime,LocalDateTime actualTime,String orderState,String applicantName,String applicantIdentityCard,Integer sortNo){ + super(id, dataState); + this.orderNo=orderNo; + this.premium=premium; + this.warrantyNo=warrantyNo; + this.currentPeriod=currentPeriod; + this.scheduleTime=scheduleTime; + this.actualTime=actualTime; + this.orderState=orderState; + this.applicantName=applicantName; + this.applicantIdentityCard=applicantIdentityCard; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "订单编号") + private String orderNo; + + @ApiModelProperty(value = "当期赔付") + private BigDecimal premium; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "当前期数") + private String currentPeriod; + + @ApiModelProperty(value = "计划时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime scheduleTime; + + @ApiModelProperty(value = "实际时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime actualTime; + + @ApiModelProperty(value = "状态(0未赔付 1已赔付 2 断保中止 3断保终止)") + private String orderState; + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyInsuredVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyInsuredVO.java new file mode 100644 index 0000000..27bea17 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyInsuredVO.java @@ -0,0 +1,54 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + * @Description:合同被保人 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyInsured对象", description="合同被保人") +public class WarrantyInsuredVO extends BaseVO { + + @Builder + public WarrantyInsuredVO(Long id, String dataState, String warrantyNo, String insuredName, String insuredIdentityCard, List warrantyNos){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.insuredName=insuredName; + this.insuredIdentityCard=insuredIdentityCard; + this.warrantyNos=warrantyNos; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "被投保人姓名") + private String insuredName; + + @ApiModelProperty(value = "被投保人身份证号码") + private String insuredIdentityCard; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "批量操作:合同编号") + private List warrantyNos; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyOrderVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyOrderVO.java new file mode 100644 index 0000000..09fcfe4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyOrderVO.java @@ -0,0 +1,144 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +/** + * @Description:合同订单 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyOrder对象", description="合同订单") +public class WarrantyOrderVO extends BaseVO { + + @Builder + public WarrantyOrderVO(String agreementNo,String applicantName,String applicantIdentityCard,Long id, String dataState, String orderNo, String warrantyNo, Integer periods, Integer currentPeriod, BigDecimal premium, BigDecimal premiums, String periodicUnit, LocalDateTime scheduleTime, LocalDateTime actualTime, LocalDateTime graceTime, LocalDateTime revivalTime, String orderState, Integer sortNo, String companyNo, String tradingChannel, String externalAgreementNo, String[] checkedIds, String agentId, String agentName, BigDecimal agentFee, BigDecimal platformFee) { + super(id, dataState); + this.orderNo = orderNo; + this.warrantyNo = warrantyNo; + this.periods = periods; + this.currentPeriod = currentPeriod; + this.premium = premium; + this.premiums = premiums; + this.periodicUnit = periodicUnit; + this.scheduleTime = scheduleTime; + this.actualTime = actualTime; + this.graceTime = graceTime; + this.revivalTime = revivalTime; + this.orderState = orderState; + this.sortNo = sortNo; + this.companyNo = companyNo; + this.tradingChannel = tradingChannel; + this.externalAgreementNo = externalAgreementNo; + this.agreementNo = agreementNo; + this.checkedIds = checkedIds; + this.agentId = agentId; + this.agentName = agentName; + this.agentFee = agentFee; + this.platformFee = platformFee; + this.applicantName = applicantName; + this.applicantIdentityCard = applicantIdentityCard; + } + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "订单编号") + private String orderNo; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "总期数") + private Integer periods; + + @ApiModelProperty(value = "当前期数") + private Integer currentPeriod; + + @ApiModelProperty(value = "期交保费") + private BigDecimal premium; + + @ApiModelProperty(value = "总保费") + private BigDecimal premiums; + + @ApiModelProperty(value = "周期单位") + private String periodicUnit; + + @ApiModelProperty(value = "计划时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime scheduleTime; + + @ApiModelProperty(value = "实际时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime actualTime; + + @ApiModelProperty(value = "宽限期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime graceTime; + + @ApiModelProperty(value = "复效期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime revivalTime; + + @ApiModelProperty(value = "状态(0待付款 1已付款 2逾期 3补缴 4付款失败 5付款中)") + private String orderState; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "支付渠道【支付宝、微信、三方银行】") + private String tradingChannel; + + @ApiModelProperty(value = "商户签约号") + private String externalAgreementNo; + + @ApiModelProperty(value = "支付宝签约号:关联支付") + private String agreementNo; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "代理人Id") + private String agentId; + + @ApiModelProperty(value = "代理人姓名") + private String agentName; + + @ApiModelProperty(value = "代理人费用") + private BigDecimal agentFee; + + @ApiModelProperty(value = "平台代理费用") + private BigDecimal platformFee; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyRenewalVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyRenewalVO.java new file mode 100644 index 0000000..3079644 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyRenewalVO.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; +/** + * @Description:合同续期 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyRenewal对象", description="合同续期") +public class WarrantyRenewalVO extends BaseVO { + + @Builder + public WarrantyRenewalVO(Long id,String dataState,String warrantyNo,Integer sortNo,LocalDateTime safeguardStartTime,LocalDateTime safeguardEndTime,String companyNo){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.sortNo=sortNo; + this.safeguardStartTime=safeguardStartTime; + this.safeguardEndTime=safeguardEndTime; + this.companyNo=companyNo; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "保障起始时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保障截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardEndTime; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyTimeVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyTimeVO.java new file mode 100644 index 0000000..f1611a7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyTimeVO.java @@ -0,0 +1,64 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.time.LocalDateTime; + +/** + * @ClassName WarrantyTimeVO.java + * @Description TODO + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode +@ApiModel(value="WarrantyTimeVO对象", description="保险合同时间") +public class WarrantyTimeVO implements Serializable { + + @ApiModelProperty(value = "犹豫期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime hesitationTime; + + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @ApiModelProperty(value = "等待期截止时间") + private LocalDateTime waitTime; + + @ApiModelProperty(value = "保障起始时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保障截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardEndTime; + + @Builder + public WarrantyTimeVO(LocalDateTime hesitationTime, LocalDateTime waitTime, LocalDateTime safeguardStartTime, LocalDateTime safeguardEndTime) { + this.hesitationTime = hesitationTime; + this.waitTime = waitTime; + this.safeguardStartTime = safeguardStartTime; + this.safeguardEndTime = safeguardEndTime; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVO.java new file mode 100644 index 0000000..7f4d845 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVO.java @@ -0,0 +1,190 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import com.itheima.sfbx.insurance.pojo.Insurance; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; +import java.util.List; + +/** + * @Description:保险合同 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyVo对象", description="保险合同Vo") +public class WarrantyVO extends BaseVO { + + @Builder + public WarrantyVO(Long categoryNo,Long id, String dataState, Long insuranceId, String insuranceName, String insuranceJson, String warrantyNo, String applicantName, String applicantIdentityCard, String companyNo, String companyName, LocalDateTime safeguardStartTime, LocalDateTime safeguardEndTime, BigDecimal premium, BigDecimal premiums, String autoWarrantyExtension, String warrantyState, String underwritingState, Integer periods, String periodicUnit, Integer dutyPeriod, Integer sortNo, LocalDateTime hesitationTime, LocalDateTime waitTime, Integer grace, String graceUnit, Integer revival, String revivalUnit, String[] checkedIds, List customerRelationVOs, String agentId, String agentName,String[] warrantyStates,List insuredVOS) { + super(id, dataState); + this.insuranceId = insuranceId; + this.insuranceName = insuranceName; + this.insuranceJson = insuranceJson; + this.warrantyNo = warrantyNo; + this.applicantName = applicantName; + this.applicantIdentityCard = applicantIdentityCard; + this.companyNo = companyNo; + this.companyName = companyName; + this.safeguardStartTime = safeguardStartTime; + this.safeguardEndTime = safeguardEndTime; + this.premium = premium; + this.premiums = premiums; + this.autoWarrantyExtension = autoWarrantyExtension; + this.warrantyState = warrantyState; + this.underwritingState = underwritingState; + this.periods = periods; + this.periodicUnit = periodicUnit; + this.dutyPeriod = dutyPeriod; + this.sortNo = sortNo; + this.hesitationTime = hesitationTime; + this.waitTime = waitTime; + this.grace = grace; + this.graceUnit = graceUnit; + this.revival = revival; + this.revivalUnit = revivalUnit; + this.checkedIds = checkedIds; + this.customerRelationVOs = customerRelationVOs; + this.agentId = agentId; + this.agentName = agentName; + this.warrantyStates = warrantyStates; + this.insuredVOS = insuredVOS; + this.categoryNo = categoryNo; + } + + @ApiModelProperty(value = "保险ID") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "投保详情") + private String insuranceJson; + + @ApiModelProperty(value = "保险分类编号") + private Long categoryNo; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "企业名称") + private String companyName; + + @ApiModelProperty(value = "保障起始时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保障截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime safeguardEndTime; + + @ApiModelProperty(value = "保费") + private BigDecimal premium; + + @ApiModelProperty(value = "总保费") + private BigDecimal premiums; + + @ApiModelProperty(value = "自动延保(0是 1否)") + private String autoWarrantyExtension; + + @ApiModelProperty(value = "状态(0待付款 1待生效 2保障中 3 逾期中止 4理赔终止 5 复效中止 6 复效终止 6满期终止 7 拒保 8 犹豫期退保 9 协议退保 )") + private String warrantyState; + + @ApiModelProperty(value = "核保状态(0发送失败 1核保中 2核保失败 3核保成功 )") + private String underwritingState; + + @ApiModelProperty(value = "批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)") + private String approveState; + + @ApiModelProperty(value = "总期数") + private Integer periods; + + @ApiModelProperty(value = "周期单位") + private String periodicUnit; + + @ApiModelProperty(value = "已缴纳期数") + private Integer dutyPeriod; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "犹豫期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime hesitationTime; + + @ApiModelProperty(value = "等待期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private LocalDateTime waitTime; + + @ApiModelProperty(value = "保单宽限") + private Integer grace; + + @ApiModelProperty(value = "宽限单位") + private String graceUnit; + + @ApiModelProperty(value = "保单复效") + private Integer revival; + + @ApiModelProperty(value = "复效单位") + private String revivalUnit; + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "被投保人关系") + private List customerRelationVOs; + + @ApiModelProperty(value = "代理人Id") + private String agentId; + + @ApiModelProperty(value = "代理人姓名") + private String agentName; + + @ApiModelProperty(value = "合同状态数组") + private String[] warrantyStates; + + @ApiModelProperty(value = "合同订单") + private List warrantyOrderVOList; + + @ApiModelProperty(value = "被投保人") + private List insuredVOS; + + @ApiModelProperty(value = "保单编号列表") + private List warrantyNos; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVerifyVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVerifyVO.java new file mode 100644 index 0000000..5f03888 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WarrantyVerifyVO.java @@ -0,0 +1,56 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:合同核保 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WarrantyVerify对象", description="合同核保") +public class WarrantyVerifyVO extends BaseVO { + + @Builder + public WarrantyVerifyVO(Long id,String dataState,String warrantyNo,String companyNo,Integer sortNo,String verifyCode,String verifyMsg){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.companyNo=companyNo; + this.sortNo=sortNo; + this.verifyCode=verifyCode; + this.verifyMsg=verifyMsg; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "核保结果") + private String verifyCode; + + @ApiModelProperty(value = "核保信息") + private String verifyMsg; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeCustomerInfoVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeCustomerInfoVO.java new file mode 100644 index 0000000..917277c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeCustomerInfoVO.java @@ -0,0 +1,122 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.rule.model.Label; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.*; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * WorryFreeCustomerInfoDTO + * + *{income=6000, cityNo=1, childNum=1, idCard=430203199206251018, sex=男, seriousScore=0, eduNo=3, dieScore=0, expensesMonth=5000, applicationAmount=250000, this$0=com.itheima.sfbx.insurance.service.impl.RuleServiceImpl@50dc169c, jobNo=JOB_01_02, name=张三, liabilities=25000, checkList=[], deposit=20000, accidentScore=0, riskItem=[], id=1234564878, repaymentCycle=2, medicalScore=0, age=21} + * map.put("jobNo","JOB_01_02"); + * map.put("riskItem",new ArrayList<>()); + * @author: wgl + * @describe: 省心配省心配对象 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +@ApiModel(value="省心配数据传输对象", description="省心配传输对象") +public class WorryFreeCustomerInfoVO { + + @Label("用户id") + @ApiModelProperty(value = "用户id") + private String id; + + @Label("客户编号") + @ApiModelProperty(value = "申请人姓名") + private String name; + + @Label("年龄") + @ApiModelProperty(value = "年龄") + private int age; + + @Label("性别") + @ApiModelProperty(value = "性别") + private String sex; + + @Label("职业") + @ApiModelProperty(value = "职业") + private String jobNo; + + @Label("身份证号") + @ApiModelProperty(value = "身份证号") + private String idCard; + + @Label("每月收入") + @ApiModelProperty(value = "每月收入") + private BigDecimal income; + + @Label("子女数量") + @ApiModelProperty(value = "子女数量") + private int childNum; + + @Label("赡养父母数量") + @ApiModelProperty(value = "赡养父母数量") + private int parentNum; + + @Label("常驻城市") + @ApiModelProperty(value = "常驻城市") + private String cityNo; + + @Label("医疗风险总分") + @ApiModelProperty(value = "医疗风险总分") + private Integer medicalScore=0; + + @Label("意外风险总分") + @ApiModelProperty(value = "意外风险总分") + private Integer accidentScore=0; + + @Label("身故风险总分") + @ApiModelProperty(value = "身故风险总分") + private Integer dieScore=0; + + @Label("重疾风险总分") + @ApiModelProperty(value = "重疾风险总分") + private Integer seriousScore=0; + + @Label("风险项结果") + @ApiModelProperty(value = "风险项结果") + private List riskItem = new ArrayList(); + + @Label("风险结果") + @ApiModelProperty(value = "风险结果") + private List risks = new ArrayList(); + + @Label("保障项列表") + private List safeguardList = new ArrayList(); + + @Label("医疗保额") + private BigDecimal medicalAmount = BigDecimal.ZERO; + + @Label("意外保额") + private BigDecimal accidentAmount = BigDecimal.ZERO; + + @Label("身故保额") + private BigDecimal dieAmount = BigDecimal.ZERO; + + @Label("重疾保额") + private BigDecimal seriousAmount = BigDecimal.ZERO; + + @Label("医疗配额级别") + private String medicalLevel; + + @Label("意外配额级别") + private String accidentLevelt; + + @Label("身故配额级别") + private String dieLevel; + + @Label("重疾配额级别") + private String seriousLevel; + + @Label("用户标签") + private List userTag = new ArrayList(); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeFlowNodeVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeFlowNodeVO.java new file mode 100644 index 0000000..a0b1de2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeFlowNodeVO.java @@ -0,0 +1,49 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:省心配流程节点记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WorryFreeFlowNode对象", description="省心配流程节点记录") +public class WorryFreeFlowNodeVO extends BaseVO { + + @Builder + public WorryFreeFlowNodeVO(Long id,String dataState,String nodes,Long customerId,Integer sortNo){ + super(id, dataState); + this.nodes=nodes; + this.customerId=customerId; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险项名称列表 json") + private String nodes; + + @ApiModelProperty(value = "用户id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeInsuranceMatchVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeInsuranceMatchVO.java new file mode 100644 index 0000000..9980b73 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeInsuranceMatchVO.java @@ -0,0 +1,77 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description:省心配保险推荐记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WorryFreeInsuranceMatch对象", description="省心配保险推荐记录") +public class WorryFreeInsuranceMatchVO extends BaseVO { + + @Builder + public WorryFreeInsuranceMatchVO(Long id,String dataState,String type,String insuranceJson,String insurancePlan,Long amount,String solution,String planSuggest,Long customerId,Integer sortNo,String insuranceId,BigDecimal price){ + super(id, dataState); + this.type=type; + this.insuranceJson=insuranceJson; + this.insurancePlan=insurancePlan; + this.amount=amount; + this.solution=solution; + this.planSuggest=planSuggest; + this.customerId=customerId; + this.sortNo=sortNo; + this.insuranceId = insuranceId; + this.price = price; + } + + @ApiModelProperty(value = "风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)") + private String type; + + @ApiModelProperty(value = "保险json") + private String insuranceJson; + + @ApiModelProperty(value = "保险id") + private String insuranceId; + @ApiModelProperty(value = "保险方案") + private String insurancePlan; + + @ApiModelProperty(value = "分配的保额") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long amount; + + @ApiModelProperty(value = "解决方案") + private String solution; + + @ApiModelProperty(value = "方案建议") + private String planSuggest; + + @ApiModelProperty(value = "用户id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; + + @ApiModelProperty(value = "保费") + private BigDecimal price; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeRiskItemVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeRiskItemVO.java new file mode 100644 index 0000000..64ab811 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeRiskItemVO.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="WorryFreeRiskItem对象", description="") +public class WorryFreeRiskItemVO extends BaseVO { + + @Builder + public WorryFreeRiskItemVO(Long id,String dataState,String type,String names,Long customerId,Integer sortNo){ + super(id, dataState); + this.type=type; + this.names=names; + this.customerId=customerId; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)") + private String type; + + @ApiModelProperty(value = "风险项名称列表 json") + private String names; + + @ApiModelProperty(value = "用户id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeSafeguardQuotaVO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeSafeguardQuotaVO.java new file mode 100644 index 0000000..ecbcb7c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/dto/WorryFreeSafeguardQuotaVO.java @@ -0,0 +1,62 @@ +package com.itheima.sfbx.insurance.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:省心配流程保障配额记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "WorryFreeSafeguardQuota对象", description = "省心配流程保障配额记录") +public class WorryFreeSafeguardQuotaVO extends BaseVO { + + @Builder + public WorryFreeSafeguardQuotaVO(Long id, String dataState, String safeguards, Long medicalAmount, Long accidentAmount, Long dieAmount, Long seriousAmount, Long customerId, Integer sortNo) { + super(id, dataState); + this.safeguards = safeguards; + this.medicalAmount = medicalAmount; + this.accidentAmount = accidentAmount; + this.dieAmount = dieAmount; + this.seriousAmount = seriousAmount; + this.customerId = customerId; + this.sortNo = sortNo; + } + + @ApiModelProperty(value = "保障项列表 json") + private String safeguards; + + @ApiModelProperty(value = "医疗配额") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long medicalAmount; + + @ApiModelProperty(value = "意外配额") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long accidentAmount; + + @ApiModelProperty(value = "身故配额") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long dieAmount; + + @ApiModelProperty(value = "重疾配额") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long seriousAmount; + + @ApiModelProperty(value = "用户id") + @JsonFormat(shape = JsonFormat.Shape.STRING) + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BannerEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BannerEnum.java new file mode 100644 index 0000000..e720bc3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BannerEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName BannerEnum.java +* @Description 枚举 +*/ + +public enum BannerEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分页失败"), + LIST_FAIL(53002, "查询列表失败"), + FIND_ONE_FAIL(53003, "查询对象失败"), + SAVE_FAIL(53004, "保存失败"), + UPDATE_FAIL(53005, "修改失败"), + DEL_FAIL(53006, "删除失败") + ; + + private Integer code; + + private String msg; + + BannerEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BrowsingHistoryEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BrowsingHistoryEnum.java new file mode 100644 index 0000000..4fd4933 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/BrowsingHistoryEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName BrowsingHistoryEnum.java +* @Description 浏览记录枚举 +*/ + +public enum BrowsingHistoryEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询浏览记录分页失败"), + LIST_FAIL(53002, "查询浏览记录列表失败"), + FIND_ONE_FAIL(53003, "查询浏览记录对象失败"), + SAVE_FAIL(53004, "保存浏览记录失败"), + UPDATE_FAIL(53005, "修改浏览记录失败"), + DEL_FAIL(53006, "删除浏览记录失败") + ; + + private Integer code; + + private String msg; + + BrowsingHistoryEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryClaimEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryClaimEnum.java new file mode 100644 index 0000000..7f58dfd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryClaimEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategoryClaimEnum.java +* @Description 分类理赔表单项枚举 +*/ + +public enum CategoryClaimEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分类理赔表单项分页失败"), + LIST_FAIL(53002, "查询分类理赔表单项列表失败"), + FIND_ONE_FAIL(53003, "查询分类理赔表单项对象失败"), + SAVE_FAIL(53004, "保存分类理赔表单项失败"), + UPDATE_FAIL(53005, "修改分类理赔表单项失败"), + DEL_FAIL(53006, "删除分类理赔表单项失败") + ; + + private Integer code; + + private String msg; + + CategoryClaimEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryCoefficentEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryCoefficentEnum.java new file mode 100644 index 0000000..0846ca9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryCoefficentEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategoryCoefficentEnum.java +* @Description 分类系数项枚举 +*/ + +public enum CategoryCoefficentEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分类系数项分页失败"), + LIST_FAIL(53002, "查询分类系数项列表失败"), + FIND_ONE_FAIL(53003, "查询分类系数项对象失败"), + SAVE_FAIL(53004, "保存分类系数项失败"), + UPDATE_FAIL(53005, "修改分类系数项失败"), + DEL_FAIL(53006, "删除分类系数项失败") + ; + + private Integer code; + + private String msg; + + CategoryCoefficentEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryConditionEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryConditionEnum.java new file mode 100644 index 0000000..135869c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryConditionEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategoryConditionEnum.java +* @Description 分类筛选项枚举 +*/ + +public enum CategoryConditionEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分类筛选项分页失败"), + LIST_FAIL(53002, "查询分类筛选项列表失败"), + FIND_ONE_FAIL(53003, "查询分类筛选项对象失败"), + SAVE_FAIL(53004, "保存分类筛选项失败"), + UPDATE_FAIL(53005, "修改分类筛选项失败"), + DEL_FAIL(53006, "删除分类筛选项失败") + ; + + private Integer code; + + private String msg; + + CategoryConditionEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryEnum.java new file mode 100644 index 0000000..fd46c72 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategoryEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategoryEnum.java +* @Description 保险分类枚举 +*/ + +public enum CategoryEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险分类分页失败"), + LIST_FAIL(53002, "查询保险分类列表失败"), + FIND_ONE_FAIL(53003, "查询保险分类对象失败"), + SAVE_FAIL(53004, "保存保险分类失败"), + UPDATE_FAIL(53005, "修改保险分类失败"), + DEL_FAIL(53006, "删除保险分类失败"), + TREE_FAIL(53007, "保险分类树查询失败"), + ; + + private Integer code; + + private String msg; + + CategoryEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategorySafeguardEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategorySafeguardEnum.java new file mode 100644 index 0000000..441d34c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CategorySafeguardEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategorySafeguardEnum.java +* @Description 分类保障项枚举 +*/ + +public enum CategorySafeguardEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分类保障项分页失败"), + LIST_FAIL(53002, "查询分类保障项列表失败"), + FIND_ONE_FAIL(53003, "查询分类保障项对象失败"), + SAVE_FAIL(53004, "保存分类保障项失败"), + UPDATE_FAIL(53005, "修改分类保障项失败"), + DEL_FAIL(53006, "删除分类保障项失败") + ; + + private Integer code; + + private String msg; + + CategorySafeguardEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ClaimEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ClaimEnum.java new file mode 100644 index 0000000..cd28a95 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ClaimEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName ClaimEnum.java +* @Description 理赔表单项枚举 +*/ + +public enum ClaimEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询理赔表单项分页失败"), + LIST_FAIL(53002, "查询理赔表单项列表失败"), + FIND_ONE_FAIL(53003, "查询理赔表单项对象失败"), + SAVE_FAIL(53004, "保存理赔表单项失败"), + UPDATE_FAIL(53005, "修改理赔表单项失败"), + DEL_FAIL(53006, "删除理赔表单项失败") + ; + + private Integer code; + + private String msg; + + ClaimEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CoefficentEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CoefficentEnum.java new file mode 100644 index 0000000..2dfa436 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CoefficentEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CoefficentEnum.java +* @Description 系数项枚举 +*/ + +public enum CoefficentEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询系数项分页失败"), + LIST_FAIL(53002, "查询系数项列表失败"), + FIND_ONE_FAIL(53003, "查询系数项对象失败"), + SAVE_FAIL(53004, "保存系数项失败"), + UPDATE_FAIL(53005, "修改系数项失败"), + DEL_FAIL(53006, "删除系数项失败") + ; + + private Integer code; + + private String msg; + + CoefficentEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationEnum.java new file mode 100644 index 0000000..6edf6b4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CombinationEnum.java +* @Description 组合方案枚举 +*/ + +public enum CombinationEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询组合方案分页失败"), + LIST_FAIL(53002, "查询组合方案列表失败"), + FIND_ONE_FAIL(53003, "查询组合方案对象失败"), + SAVE_FAIL(53004, "保存组合方案失败"), + UPDATE_FAIL(53005, "修改组合方案失败"), + DEL_FAIL(53006, "删除组合方案失败") + ; + + private Integer code; + + private String msg; + + CombinationEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationInsuranceEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationInsuranceEnum.java new file mode 100644 index 0000000..52a2428 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CombinationInsuranceEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CombinationInsuranceEnum.java +* @Description 组合保险枚举 +*/ + +public enum CombinationInsuranceEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询组合保险分页失败"), + LIST_FAIL(53002, "查询组合保险列表失败"), + FIND_ONE_FAIL(53003, "查询组合保险对象失败"), + SAVE_FAIL(53004, "保存组合保险失败"), + UPDATE_FAIL(53005, "修改组合保险失败"), + DEL_FAIL(53006, "删除组合保险失败") + ; + + private Integer code; + + private String msg; + + CombinationInsuranceEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ConditionEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ConditionEnum.java new file mode 100644 index 0000000..514b0c8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/ConditionEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName ConditionEnum.java +* @Description 筛选项枚举 +*/ + +public enum ConditionEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询筛选项分页失败"), + LIST_FAIL(53002, "查询筛选项列表失败"), + FIND_ONE_FAIL(53003, "查询筛选项对象失败"), + SAVE_FAIL(53004, "保存筛选项失败"), + UPDATE_FAIL(53005, "修改筛选项失败"), + DEL_FAIL(53006, "删除筛选项失败") + ; + + private Integer code; + + private String msg; + + ConditionEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerCardEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerCardEnum.java new file mode 100644 index 0000000..c0241b6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerCardEnum.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CustomerCardEnum.java +* @Description 绑卡信息枚举 +*/ + +public enum CustomerCardEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询绑卡信息分页失败"), + LIST_FAIL(53002, "查询绑卡信息列表失败"), + FIND_ONE_FAIL(53003, "查询绑卡信息对象失败"), + SAVE_FAIL(53004, "保存绑卡信息失败"), + UPDATE_FAIL(53005, "修改绑卡信息失败"), + DEL_FAIL(53006, "删除绑卡信息失败"), + + ONLY_ONE(53007, "只有一张银行卡不能解绑"), + ; + + private Integer code; + + private String msg; + + CustomerCardEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerInfoEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerInfoEnum.java new file mode 100644 index 0000000..893044b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerInfoEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CustomerInfoEnum.java +* @Description 客户信息表枚举 +*/ + +public enum CustomerInfoEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询客户信息表分页失败"), + LIST_FAIL(53002, "查询客户信息表列表失败"), + FIND_ONE_FAIL(53003, "查询客户信息表对象失败"), + SAVE_FAIL(53004, "保存客户信息表失败"), + UPDATE_FAIL(53005, "修改客户信息表失败"), + DEL_FAIL(53006, "删除客户信息表失败") + ; + + private Integer code; + + private String msg; + + CustomerInfoEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerPetEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerPetEnum.java new file mode 100644 index 0000000..5277543 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerPetEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CustomerPetEnum.java +* @Description 客户宠物枚举 +*/ + +public enum CustomerPetEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询客户宠物分页失败"), + LIST_FAIL(53002, "查询客户宠物列表失败"), + FIND_ONE_FAIL(53003, "查询客户宠物对象失败"), + SAVE_FAIL(53004, "保存客户宠物失败"), + UPDATE_FAIL(53005, "修改客户宠物失败"), + DEL_FAIL(53006, "删除客户宠物失败") + ; + + private Integer code; + + private String msg; + + CustomerPetEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerRelationEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerRelationEnum.java new file mode 100644 index 0000000..7672af0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/CustomerRelationEnum.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CustomerRelationEnum.java +* @Description 客户关系表枚举 +*/ + +public enum CustomerRelationEnum implements IBaseEnum { + + + PAGE_FAIL(53001, "查询客户关系表分页失败"), + LIST_FAIL(53002, "查询客户关系表列表失败"), + FIND_ONE_FAIL(53003, "查询客户关系表对象失败"), + SAVE_FAIL(53004, "保存客户关系表失败"), + UPDATE_FAIL(53005, "修改客户关系表失败"), + DEL_FAIL(53006, "删除客户关系表失败"), + UN_LOGIN(530007,"当前操作未登录"), + RELATION_FIELD_ERROR(530008,"关系标志位内容错误"), + ID_CARD_ERROR(530009, "当前用户不存在身份证号,数据异常"); + + private Integer code; + + private String msg; + + CustomerRelationEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/HealthAssessmentEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/HealthAssessmentEnum.java new file mode 100644 index 0000000..3a0507e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/HealthAssessmentEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName HealthAssessmentEnum.java +* @Description 评估类目枚举 +*/ + +public enum HealthAssessmentEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询评估类目分页失败"), + LIST_FAIL(53002, "查询评估类目列表失败"), + FIND_ONE_FAIL(53003, "查询评估类目对象失败"), + SAVE_FAIL(53004, "保存评估类目失败"), + UPDATE_FAIL(53005, "修改评估类目失败"), + DEL_FAIL(53006, "删除评估类目失败") + ; + + private Integer code; + + private String msg; + + HealthAssessmentEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveDetailEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveDetailEnum.java new file mode 100644 index 0000000..eba2995 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveDetailEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceApproveDetailEnum.java +* @Description 保批信息枚举 +*/ + +public enum InsuranceApproveDetailEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保批信息分页失败"), + LIST_FAIL(53002, "查询保批信息列表失败"), + FIND_ONE_FAIL(53003, "查询保批信息对象失败"), + SAVE_FAIL(53004, "保存保批信息失败"), + UPDATE_FAIL(53005, "修改保批信息失败"), + DEL_FAIL(53006, "删除保批信息失败") + ; + + private Integer code; + + private String msg; + + InsuranceApproveDetailEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveEnum.java new file mode 100644 index 0000000..a02dc25 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceApproveEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceApproveEnum.java +* @Description 保批信息枚举 +*/ + +public enum InsuranceApproveEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保批信息分页失败"), + LIST_FAIL(53002, "查询保批信息列表失败"), + FIND_ONE_FAIL(53003, "查询保批信息对象失败"), + SAVE_FAIL(53004, "保存保批信息失败"), + UPDATE_FAIL(53005, "修改保批信息失败"), + DEL_FAIL(53006, "删除保批信息失败") + ; + + private Integer code; + + private String msg; + + InsuranceApproveEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceClaimEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceClaimEnum.java new file mode 100644 index 0000000..9f4bdbb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceClaimEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceClaimEnum.java +* @Description 保险理赔表单项枚举 +*/ + +public enum InsuranceClaimEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险理赔表单项分页失败"), + LIST_FAIL(53002, "查询保险理赔表单项列表失败"), + FIND_ONE_FAIL(53003, "查询保险理赔表单项对象失败"), + SAVE_FAIL(53004, "保存保险理赔表单项失败"), + UPDATE_FAIL(53005, "修改保险理赔表单项失败"), + DEL_FAIL(53006, "删除保险理赔表单项失败") + ; + + private Integer code; + + private String msg; + + InsuranceClaimEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceCoefficentEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceCoefficentEnum.java new file mode 100644 index 0000000..00d3cbc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceCoefficentEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceCoefficentEnum.java +* @Description 保险系数项枚举 +*/ + +public enum InsuranceCoefficentEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险系数项分页失败"), + LIST_FAIL(53002, "查询保险系数项列表失败"), + FIND_ONE_FAIL(53003, "查询保险系数项对象失败"), + SAVE_FAIL(53004, "保存保险系数项失败"), + UPDATE_FAIL(53005, "修改保险系数项失败"), + DEL_FAIL(53006, "删除保险系数项失败") + ; + + private Integer code; + + private String msg; + + InsuranceCoefficentEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceConditionEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceConditionEnum.java new file mode 100644 index 0000000..63bff17 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceConditionEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceConditionEnum.java +* @Description 保险筛选项枚举 +*/ + +public enum InsuranceConditionEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险筛选项分页失败"), + LIST_FAIL(53002, "查询保险筛选项列表失败"), + FIND_ONE_FAIL(53003, "查询保险筛选项对象失败"), + SAVE_FAIL(53004, "保存保险筛选项失败"), + UPDATE_FAIL(53005, "修改保险筛选项失败"), + DEL_FAIL(53006, "删除保险筛选项失败") + ; + + private Integer code; + + private String msg; + + InsuranceConditionEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceEnum.java new file mode 100644 index 0000000..981da87 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceEnum.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceEnum.java +* @Description 保险产品枚举 +*/ + +public enum InsuranceEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险产品分页失败"), + LIST_FAIL(53002, "查询保险产品列表失败"), + FIND_ONE_FAIL(53003, "查询保险产品对象失败"), + SAVE_FAIL(53004, "保存保险产品失败"), + UPDATE_FAIL(53005, "修改保险产品失败"), + DEL_FAIL(53006, "删除保险产品失败"), + CHECK_ROUTE_FAIL(53007, "检测路由获取失败"), + CALCULATION_FAIL(53008, "保费计算失败"), + INCOME_FAIL(53008, "收益计算失败"), + ; + + private Integer code; + + private String msg; + + InsuranceEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsurancePlanEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsurancePlanEnum.java new file mode 100644 index 0000000..937c251 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsurancePlanEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsurancePlanEnum.java +* @Description 保险方案枚举 +*/ + +public enum InsurancePlanEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险方案分页失败"), + LIST_FAIL(53002, "查询保险方案列表失败"), + FIND_ONE_FAIL(53003, "查询保险方案对象失败"), + SAVE_FAIL(53004, "保存保险方案失败"), + UPDATE_FAIL(53005, "修改保险方案失败"), + DEL_FAIL(53006, "删除保险方案失败"), + DATA_ERROR(53007,"数据异常"), + ; + + private Integer code; + + private String msg; + + InsurancePlanEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceRuleEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceRuleEnum.java new file mode 100644 index 0000000..ce0c9b6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceRuleEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceRuleEnum.java +* @Description 保险规则枚举 +*/ + +public enum InsuranceRuleEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险规则分页失败"), + LIST_FAIL(53002, "查询保险规则列表失败"), + FIND_ONE_FAIL(53003, "查询保险规则对象失败"), + SAVE_FAIL(53004, "保存保险规则失败"), + UPDATE_FAIL(53005, "修改保险规则失败"), + DEL_FAIL(53006, "删除保险规则失败") + ; + + private Integer code; + + private String msg; + + InsuranceRuleEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceSievingEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceSievingEnum.java new file mode 100644 index 0000000..3d16782 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceSievingEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceSievingEnum.java +* @Description 初筛结果枚举 +*/ + +public enum InsuranceSievingEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询初筛结果分页失败"), + LIST_FAIL(53002, "查询初筛结果列表失败"), + FIND_ONE_FAIL(53003, "查询初筛结果对象失败"), + SAVE_FAIL(53004, "保存初筛结果失败"), + UPDATE_FAIL(53005, "修改初筛结果失败"), + DEL_FAIL(53006, "删除初筛结果失败") + ; + + private Integer code; + + private String msg; + + InsuranceSievingEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceTopEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceTopEnum.java new file mode 100644 index 0000000..fb7e237 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/InsuranceTopEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName InsuranceTopEnum.java +* @Description 人气保险枚举 +*/ + +public enum InsuranceTopEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询人气保险分页失败"), + LIST_FAIL(53002, "查询人气保险列表失败"), + FIND_ONE_FAIL(53003, "查询人气保险对象失败"), + SAVE_FAIL(53004, "保存人气保险失败"), + UPDATE_FAIL(53005, "修改人气保险失败"), + DEL_FAIL(53006, "删除人气保险失败"), + DATA_FAIL(50337,"数据异常") + ; + + private Integer code; + + private String msg; + + InsuranceTopEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/OutDataInfoOcrEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/OutDataInfoOcrEnum.java new file mode 100644 index 0000000..493bc89 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/OutDataInfoOcrEnum.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * OCR识别异常枚举 + */ +public enum OutDataInfoOcrEnum implements IBaseEnum { + + LOGIN_FAIL(53001, "进行OCR认证需要先登录"), + + BANK_OCR_OUT_INTERFACE_ERROR(53002,"银行卡OCR接口调用失败"), + + TOKEN_ERROR(53003, "百度云获取token失败"), + ; + + private Integer code; + + private String msg; + + OutDataInfoOcrEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanEarningsEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanEarningsEnum.java new file mode 100644 index 0000000..5ce9f92 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanEarningsEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName PlanEarningsEnum.java +* @Description 方案给付枚举 +*/ + +public enum PlanEarningsEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询方案给付分页失败"), + LIST_FAIL(53002, "查询方案给付列表失败"), + FIND_ONE_FAIL(53003, "查询方案给付对象失败"), + SAVE_FAIL(53004, "保存方案给付失败"), + UPDATE_FAIL(53005, "修改方案给付失败"), + DEL_FAIL(53006, "删除方案给付失败") + ; + + private Integer code; + + private String msg; + + PlanEarningsEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanSafeguardEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanSafeguardEnum.java new file mode 100644 index 0000000..e5bd42a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/PlanSafeguardEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName PlanSafeguardEnum.java +* @Description 方案保障项枚举 +*/ + +public enum PlanSafeguardEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询方案保障项分页失败"), + LIST_FAIL(53002, "查询方案保障项列表失败"), + FIND_ONE_FAIL(53003, "查询方案保障项对象失败"), + SAVE_FAIL(53004, "保存方案保障项失败"), + UPDATE_FAIL(53005, "修改方案保障项失败"), + DEL_FAIL(53006, "删除方案保障项失败") + ; + + private Integer code; + + private String msg; + + PlanSafeguardEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskAnalysisEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskAnalysisEnum.java new file mode 100644 index 0000000..a4b8a04 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskAnalysisEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName RiskAnalysisEnum.java +* @Description 风险类目枚举 +*/ + +public enum RiskAnalysisEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询风险类目分页失败"), + LIST_FAIL(53002, "查询风险类目列表失败"), + FIND_ONE_FAIL(53003, "查询风险类目对象失败"), + SAVE_FAIL(53004, "保存风险类目失败"), + UPDATE_FAIL(53005, "修改风险类目失败"), + DEL_FAIL(53006, "删除风险类目失败") + ; + + private Integer code; + + private String msg; + + RiskAnalysisEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskEnum.java new file mode 100644 index 0000000..43bc6eb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RiskEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName RiskEnum.java +* @Description 风险表枚举 +*/ + +public enum RiskEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询风险表分页失败"), + LIST_FAIL(53002, "查询风险表列表失败"), + FIND_ONE_FAIL(53003, "查询风险表对象失败"), + SAVE_FAIL(53004, "保存风险表失败"), + UPDATE_FAIL(53005, "修改风险表失败"), + DEL_FAIL(53006, "删除风险表失败") + ; + + private Integer code; + + private String msg; + + RiskEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RuleEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RuleEnum.java new file mode 100644 index 0000000..3ec480d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/RuleEnum.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** + * 规则异常枚举类 + */ +public enum RuleEnum implements IBaseEnum { + + DATA_ERROR_PER_ERROR(53001, "数据异常:未找到个人信息"), + WORRRY_FREE_INSURANCE_ERROR(53002, "省心配模块异常:无法计算"), + LOCK_NOT_ACQUIRED_ERROR(53003,"当前用户正在计算中"), + + SICK_ERROR_INSURANCE_ERROR(53004, "初筛,疾病问卷模块异常:无法计算"), + + ; + + private Integer code; + + private String msg; + + RuleEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SafeguardEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SafeguardEnum.java new file mode 100644 index 0000000..a5ffde1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SafeguardEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SafeguardEnum.java +* @Description 保障项枚举 +*/ + +public enum SafeguardEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保障项分页失败"), + LIST_FAIL(53002, "查询保障项列表失败"), + FIND_ONE_FAIL(53003, "查询保障项对象失败"), + SAVE_FAIL(53004, "保存保障项失败"), + UPDATE_FAIL(53005, "修改保障项失败"), + DEL_FAIL(53006, "删除保障项失败") + ; + + private Integer code; + + private String msg; + + SafeguardEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SaleTopInsuranceEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SaleTopInsuranceEnum.java new file mode 100644 index 0000000..f96118a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SaleTopInsuranceEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SaleTopInsuranceEnum.java +* @Description 枚举 +*/ + +public enum SaleTopInsuranceEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分页失败"), + LIST_FAIL(53002, "查询列表失败"), + FIND_ONE_FAIL(53003, "查询对象失败"), + SAVE_FAIL(53004, "保存失败"), + UPDATE_FAIL(53005, "修改失败"), + DEL_FAIL(53006, "删除失败") + ; + + private Integer code; + + private String msg; + + SaleTopInsuranceEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SearchRecordEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SearchRecordEnum.java new file mode 100644 index 0000000..939fdf7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SearchRecordEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SearchRecordEnum.java +* @Description 搜索记录枚举 +*/ + +public enum SearchRecordEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询搜索记录分页失败"), + LIST_FAIL(53002, "查询搜索记录列表失败"), + FIND_ONE_FAIL(53003, "查询搜索记录对象失败"), + SAVE_FAIL(53004, "保存搜索记录失败"), + UPDATE_FAIL(53005, "修改搜索记录失败"), + DEL_FAIL(53006, "删除搜索记录失败") + ; + + private Integer code; + + private String msg; + + SearchRecordEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SelfSelectionEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SelfSelectionEnum.java new file mode 100644 index 0000000..a629ce2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SelfSelectionEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SelfSelectionEnum.java +* @Description 自选保险枚举 +*/ + +public enum SelfSelectionEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询自选保险分页失败"), + LIST_FAIL(53002, "查询自选保险列表失败"), + FIND_ONE_FAIL(53003, "查询自选保险对象失败"), + SAVE_FAIL(53004, "保存自选保险失败"), + UPDATE_FAIL(53005, "修改自选保险失败"), + DEL_FAIL(53006, "删除自选保险失败"), + EXIST_FAIL(53007, "重复的数据"), + ; + + private Integer code; + + private String msg; + + SelfSelectionEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickEnum.java new file mode 100644 index 0000000..1163c7b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickEnum.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SickEnum.java +* @Description 疾病表枚举 +*/ + +public enum SickEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询疾病表分页失败"), + LIST_FAIL(53002, "查询疾病表列表失败"), + FIND_ONE_FAIL(53003, "查询疾病表对象失败"), + SAVE_FAIL(53004, "保存疾病表失败"), + UPDATE_FAIL(53005, "修改疾病表失败"), + DEL_FAIL(53006, "删除疾病表失败"), + SICK_TYPE_FAIL(53007, "查询疾病类型列表失败"), + + ADVICE_SICK_DATA_FAIL(53008, "健康咨询疾病数据异常,数据不能为空"), + ; + + private Integer code; + + private String msg; + + SickEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickSearchRecordEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickSearchRecordEnum.java new file mode 100644 index 0000000..b17047c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/SickSearchRecordEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName SickSearchRecordEnum.java +* @Description 疾病搜索记录枚举 +*/ + +public enum SickSearchRecordEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询疾病搜索记录分页失败"), + LIST_FAIL(53002, "查询疾病搜索记录列表失败"), + FIND_ONE_FAIL(53003, "查询疾病搜索记录对象失败"), + SAVE_FAIL(53004, "保存疾病搜索记录失败"), + UPDATE_FAIL(53005, "修改疾病搜索记录失败"), + DEL_FAIL(53006, "删除疾病搜索记录失败") + ; + + private Integer code; + + private String msg; + + SickSearchRecordEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyApplicantEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyApplicantEnum.java new file mode 100644 index 0000000..df52abc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyApplicantEnum.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +public enum WarrantyApplicantEnum implements IBaseEnum { + + + APPLICANT_ERROR(53001,"投保人信息构建失败" ), + INSURED_ERROR(53002,"被保人信息构建失败"), + ; + + private Integer code; + + private String msg; + + WarrantyApplicantEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEarningsOrderEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEarningsOrderEnum.java new file mode 100644 index 0000000..63a90cc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEarningsOrderEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyEarningsOrderEnum.java +* @Description 给付计划订单枚举 +*/ + +public enum WarrantyEarningsOrderEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询给付计划订单分页失败"), + LIST_FAIL(53002, "查询给付计划订单列表失败"), + FIND_ONE_FAIL(53003, "查询给付计划订单对象失败"), + SAVE_FAIL(53004, "保存给付计划订单失败"), + UPDATE_FAIL(53005, "修改给付计划订单失败"), + DEL_FAIL(53006, "删除给付计划订单失败") + ; + + private Integer code; + + private String msg; + + WarrantyEarningsOrderEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEnum.java new file mode 100644 index 0000000..7421c75 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyEnum.java +* @Description 保险合同枚举 +*/ + +public enum WarrantyEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询保险合同分页失败"), + LIST_FAIL(53002, "查询保险合同列表失败"), + FIND_ONE_FAIL(53003, "查询保险合同对象失败"), + SAVE_FAIL(53004, "保存保险合同失败"), + UPDATE_FAIL(53005, "修改保险合同失败"), + DEL_FAIL(53006, "删除保险合同失败") + ; + + private Integer code; + + private String msg; + + WarrantyEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyInsuredEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyInsuredEnum.java new file mode 100644 index 0000000..1fd0c91 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyInsuredEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyInsuredEnum.java +* @Description 合同被保人枚举 +*/ + +public enum WarrantyInsuredEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询合同被保人分页失败"), + LIST_FAIL(53002, "查询合同被保人列表失败"), + FIND_ONE_FAIL(53003, "查询合同被保人对象失败"), + SAVE_FAIL(53004, "保存合同被保人失败"), + UPDATE_FAIL(53005, "修改合同被保人失败"), + DEL_FAIL(53006, "删除合同被保人失败") + ; + + private Integer code; + + private String msg; + + WarrantyInsuredEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyOrderEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyOrderEnum.java new file mode 100644 index 0000000..3df01b8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyOrderEnum.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyOrderEnum.java +* @Description 合同订单枚举 +*/ + +public enum WarrantyOrderEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询合同订单分页失败"), + LIST_FAIL(53002, "查询合同订单列表失败"), + FIND_ONE_FAIL(53003, "查询合同订单对象失败"), + SAVE_FAIL(53004, "保存合同订单失败"), + UPDATE_FAIL(53005, "修改合同订单失败"), + DEL_FAIL(53006, "删除合同订单失败"), + SYNC_PAYMENT_FAIL(53007, "同步订单结果失败"), + ; + + private Integer code; + + private String msg; + + WarrantyOrderEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyRenewalEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyRenewalEnum.java new file mode 100644 index 0000000..8c7cdba --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyRenewalEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyRenewalEnum.java +* @Description 合同续期枚举 +*/ + +public enum WarrantyRenewalEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询合同续期分页失败"), + LIST_FAIL(53002, "查询合同续期列表失败"), + FIND_ONE_FAIL(53003, "查询合同续期对象失败"), + SAVE_FAIL(53004, "保存合同续期失败"), + UPDATE_FAIL(53005, "修改合同续期失败"), + DEL_FAIL(53006, "删除合同续期失败") + ; + + private Integer code; + + private String msg; + + WarrantyRenewalEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyVerifyEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyVerifyEnum.java new file mode 100644 index 0000000..57f4fd0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WarrantyVerifyEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WarrantyVerifyEnum.java +* @Description 合同核保枚举 +*/ + +public enum WarrantyVerifyEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询合同核保分页失败"), + LIST_FAIL(53002, "查询合同核保列表失败"), + FIND_ONE_FAIL(53003, "查询合同核保对象失败"), + SAVE_FAIL(53004, "保存合同核保失败"), + UPDATE_FAIL(53005, "修改合同核保失败"), + DEL_FAIL(53006, "删除合同核保失败") + ; + + private Integer code; + + private String msg; + + WarrantyVerifyEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeFlowNodeEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeFlowNodeEnum.java new file mode 100644 index 0000000..3453989 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeFlowNodeEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WorryFreeFlowNodeEnum.java +* @Description 省心配流程节点记录枚举 +*/ + +public enum WorryFreeFlowNodeEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询省心配流程节点记录分页失败"), + LIST_FAIL(53002, "查询省心配流程节点记录列表失败"), + FIND_ONE_FAIL(53003, "查询省心配流程节点记录对象失败"), + SAVE_FAIL(53004, "保存省心配流程节点记录失败"), + UPDATE_FAIL(53005, "修改省心配流程节点记录失败"), + DEL_FAIL(53006, "删除省心配流程节点记录失败") + ; + + private Integer code; + + private String msg; + + WorryFreeFlowNodeEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeInsuranceMatchEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeInsuranceMatchEnum.java new file mode 100644 index 0000000..bb79a49 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeInsuranceMatchEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WorryFreeInsuranceMatchEnum.java +* @Description 省心配保险推荐记录枚举 +*/ + +public enum WorryFreeInsuranceMatchEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询省心配保险推荐记录分页失败"), + LIST_FAIL(53002, "查询省心配保险推荐记录列表失败"), + FIND_ONE_FAIL(53003, "查询省心配保险推荐记录对象失败"), + SAVE_FAIL(53004, "保存省心配保险推荐记录失败"), + UPDATE_FAIL(53005, "修改省心配保险推荐记录失败"), + DEL_FAIL(53006, "删除省心配保险推荐记录失败") + ; + + private Integer code; + + private String msg; + + WorryFreeInsuranceMatchEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeRiskItemEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeRiskItemEnum.java new file mode 100644 index 0000000..b18ae6d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeRiskItemEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WorryFreeRiskItemEnum.java +* @Description 枚举 +*/ + +public enum WorryFreeRiskItemEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询分页失败"), + LIST_FAIL(53002, "查询列表失败"), + FIND_ONE_FAIL(53003, "查询对象失败"), + SAVE_FAIL(53004, "保存失败"), + UPDATE_FAIL(53005, "修改失败"), + DEL_FAIL(53006, "删除失败") + ; + + private Integer code; + + private String msg; + + WorryFreeRiskItemEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeSafeguardQuotaEnum.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeSafeguardQuotaEnum.java new file mode 100644 index 0000000..4aca052 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/enums/WorryFreeSafeguardQuotaEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName WorryFreeSafeguardQuotaEnum.java +* @Description 省心配流程保障配额记录枚举 +*/ + +public enum WorryFreeSafeguardQuotaEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询省心配流程保障配额记录分页失败"), + LIST_FAIL(53002, "查询省心配流程保障配额记录列表失败"), + FIND_ONE_FAIL(53003, "查询省心配流程保障配额记录对象失败"), + SAVE_FAIL(53004, "保存省心配流程保障配额记录失败"), + UPDATE_FAIL(53005, "修改省心配流程保障配额记录失败"), + DEL_FAIL(53006, "删除省心配流程保障配额记录失败") + ; + + private Integer code; + + private String msg; + + WorryFreeSafeguardQuotaEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureHandler.java new file mode 100644 index 0000000..70a9032 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureHandler.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.insurance.handler; + +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import com.itheima.sfbx.insurance.dto.EarningVO; +import com.itheima.sfbx.insurance.dto.WarrantyOrderVO; +import com.itheima.sfbx.insurance.dto.WarrantyVO; + +import java.util.List; + +/** + * @ClassName InsureHandler.java + * @Description 投保、创建订单、保费计算、理财收益 + */ +public interface InsureHandler { + + /*** + * @description 投保操作 + * @param doInsureVo 投保处理 + * @return 保险合同 + */ + WarrantyVO doInsure(DoInsureVo doInsureVo); + + /*** + * @description 创建投保合同订单 + * @param warrantyVO + * @return + */ + List createWarrantyOrderVO(WarrantyVO warrantyVO); + + /*** + * @description 保费计算 + * @param doInsureVo 投保请求对象 + * @return 保费 + */ + String doPremium(DoInsureVo doInsureVo); + + /*** + * @description 理财收益 + * @param doInsureVo 投保请求对象 + * @return 收益 + */ + EarningVO doEarnings(DoInsureVo doInsureVo); + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureProcessHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureProcessHandler.java new file mode 100644 index 0000000..230e35f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/InsureProcessHandler.java @@ -0,0 +1,228 @@ +package com.itheima.sfbx.insurance.handler; + +import com.itheima.sfbx.insurance.dto.*; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.List; + +/** + * @ClassName InsureProcessHandler.java + * @Description 投保业务操作流程 + */ +public interface InsureProcessHandler { + + + /*** + * @description 投保对象信息 + * @param insuranceId 保险产品Id + * @param insurancePlanId 保险方案Id + * @param companyNo 保险公司编号 + * @param InsuranceCoefficentIds 投保系数Id + * @return + */ + InsureProcessVO buildInsureProcessVO(Long insuranceId, Long insurancePlanId, + String companyNo, List InsuranceCoefficentIds); + + /*** + * @description 个险:被投保人信息 + * @param customerRelationId 客户关系ID + * @return + */ + CustomerRelationVO buildInsured(String customerRelationId); + + /*** + * @description 团险:被投保人信息 + * @param customerRelationIds 客户关系IDs + * @return + */ + List buildInsureds(List customerRelationIds); + + /*** + * @description 投保人信息 + * @return + */ + CustomerRelationVO buildApplicant(); + + /** + * @description 系数唯一性检查 + * @param insuranceCoefficentVOs 保险系数 + * @return: Boolean + */ + Boolean checkBaseOnly(List insuranceCoefficentVOs); + + /** + * @description 个险:投保年龄是否符合检测 + * @param insuranceVO 保险产品 + * @param insured 被投保人 + * @return: Boolean + */ + Boolean checkAge(InsuranceVO insuranceVO,CustomerRelationVO insured); + + /** + * @description 理财:投保金额是否符合检测 + * @param insurancePlanVO 保险方案 + * @param insuranceCoefficentVOs 保险系数 + * @param price 投入金额 + * @return: Boolean + */ + Boolean checkPrice(InsurancePlanVO insurancePlanVO,List insuranceCoefficentVOs, BigDecimal price); + + + /** + * @description 保障:保险必填参数检测 + * @param coefficentVOs 保险系数 + * @return: Boolean + */ + Boolean checkSafeguard(List coefficentVOs); + + /** + * @description 旅游:保险必填参数检测 + * @param coefficentVOs 保险系数 + * @return: Boolean + */ + Boolean checkTravel(List coefficentVOs); + + /** + * @description 理财:保险必填参数检测 + * @param coefficentVOs 保险系数 + * @return: Boolean + */ + Boolean checkEarnings(List coefficentVOs); + + /** + * @description 个险:被保人年龄归属投保系数 + * @param coefficentVOs 页面提交保险系数 + * @param insuranceId 保险产品 + * @param insured 被投保人 + * @return: Boolean + */ + List ageHandler(List coefficentVOs,Long insuranceId,CustomerRelationVO insured); + + /** + * @description 团险:被保人数量归属投保系数 + * @param coefficentVOs 页面提交保险系数 + * @param insuranceId 保险产品 + * @param insureds 被投保人 + * @return: List + */ + List numberOfPeopleHandler(List coefficentVOs,Long insuranceId, List insureds); + + /*** + * @description 旅游:保费计算 + * @param insurancePlanVO 所选保险方案 + * @param coefficentVOs 所选保险系数 + * @return 保费 + */ + String premiumComputeTravel(InsurancePlanVO insurancePlanVO, List coefficentVOs); + + /*** + * @description 保障:保费计算 + * @param insurancePlanVO 所选保险方案 + * @param coefficentVOs 所选保险系数 + * @return 保费 + */ + String premiumComputeSafeguard(InsurancePlanVO insurancePlanVO,List coefficentVOs); + + /*** + * @description 理财:收益计算 + * @param warrantyNo 合同编号 + * @param insurancePlanVO 所选保险方案 + * @param coefficentVOs 所选保险系数 + * @param insured 被投保人 + * @param isTrial 是否试算 + * @return 保费 + */ + EarningVO earningsCompute(String warrantyNo,CustomerRelationVO applicant,DoInsureVo doInsureVo, + InsurancePlanVO insurancePlanVO, + List coefficentVOs, + CustomerRelationVO insured,Boolean isTrial); + + /*** + * @description 领取计划 + * @param warrantyNo 合同编号 + * @param applicant 投保人 + * @param insured 被投保人 + * @param insurancePlanVO 保险方案 + * @param coefficentVOs 系数 + * @param premiums 总保费 + * @param actualGetPeriodicUnit 领取单位 + * @param actualGetStartTime 领取开始时间 + * @return 总周期 + */ + List periodicVos(String warrantyNo, CustomerRelationVO applicant, CustomerRelationVO insured,InsurancePlanVO insurancePlanVO, BigDecimal premiums, + List coefficentVOs, String actualGetPeriodicUnit, + LocalDateTime actualGetStartTime,Boolean isTrial,DoInsureVo doInsureVo); + + /*** + * @description 理财:总周期计算 + * @param coefficentVOs 保险系数 + * @return 总周期 + */ + Integer earningsPeriods(List coefficentVOs); + + /*** + * @description 保障:总周期计算 + * @param coefficentVOs 保险系数 + * @return 总周期 + */ + Integer SafeguardPeriods(List coefficentVOs); + + + /*** + * @description 犹豫期截止时间、等待期期截止时间、保障截止时间 + * @return + */ + WarrantyTimeVO timeSetup(DoInsureVo doInsureVo,List coefficentVOs, InsuranceVO insuranceVO); + + /*** + * @description 是否自动续保 + * @param coefficentVOs 保险系数 + * @return + */ + String autoWarrantyExtension(List coefficentVOs); + + /*** + * @description 投入周期时长 + * @param coefficentVOs 保险系数 + * @return 周期时长 + */ + BigDecimal periodic(List coefficentVOs); + + /*** + * @description 理财:投入周期单位 + * @param coefficentVOs 保险系数 + * @return + */ + String periodicUnit(List coefficentVOs); + + /*** + * @description 保障:付款方式 + * @param coefficentVOs 保险系数 + * @return + */ + String payMent(List coefficentVOs); + + /*** + * @description 领取起始时间 + * @param coefficentVOs 保险系数 + * @param insured 被投保人 + * @return + */ + LocalDateTime actualGetStartTime(List coefficentVOs, CustomerRelationVO insured ); + + /*** + * @description 理财影响系数:领取,投入方式不同会影响最最终收益 + * @param coefficentVOs 保险系数 + * @param premiums 原始保费 + * @return + */ + BigDecimal premiumsHandler(List coefficentVOs,BigDecimal premiums); + + /*** + * @description 领取单位 + * @param coefficentVOs 保险系数 + * @return + */ + String actualGetPeriodicUnit(List coefficentVOs); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AccidentInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AccidentInsureHandler.java new file mode 100644 index 0000000..984ae9c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AccidentInsureHandler.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import org.springframework.stereotype.Service; + +/** + * @ClassName AccidentInsureHandler.java + * @Description 保障型意外类:保险投保、创建订单、保费计算 + */ +@Service +public class AccidentInsureHandler extends SafeguardInsureHandler implements InsureHandler { + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AgedInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AgedInsureHandler.java new file mode 100644 index 0000000..3d6edf7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AgedInsureHandler.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import com.itheima.sfbx.insurance.dto.EarningVO; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import org.springframework.stereotype.Service; + +/** + * @ClassName AgedInsureHandler.java + * @Description 理财型养老保险投保、收益计算、保险订单生成 + */ +@Service +public class AgedInsureHandler extends EarningsInsureHandler implements InsureHandler { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AnnuityInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AnnuityInsureHandler.java new file mode 100644 index 0000000..308ac9a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/AnnuityInsureHandler.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.itheima.sfbx.insurance.handler.InsureHandler; +import org.springframework.stereotype.Service; + +/** + * @ClassName AnnuityInsureHandler.java + * @Description 年金理财型保险投保、收益计算、保险订单生成 + */ +@Service("annuityInsureHandler") +public class AnnuityInsureHandler extends EarningsInsureHandler implements InsureHandler { +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/BaseProcessHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/BaseProcessHandler.java new file mode 100644 index 0000000..43cc374 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/BaseProcessHandler.java @@ -0,0 +1,739 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.IdcardUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.ibm.icu.text.DecimalFormat; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.security.CompanyVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.constant.CustomerRelationConstant; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.constant.PlanEarningsConstant; +import com.itheima.sfbx.insurance.constant.WarrantyEarningsOrderConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.handler.InsureProcessHandler; +import com.itheima.sfbx.insurance.pojo.WarrantyEarningsOrder; +import com.itheima.sfbx.insurance.service.*; +import com.itheima.sfbx.security.feign.CompanyFeign; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @ClassName InsureProcessHandler.java + * @Description 投保业务操作流程 + */ +@Service("baseProcessHandler") +public class BaseProcessHandler implements InsureProcessHandler { + + @Autowired + IInsuranceService insuranceService; + + @Autowired + IInsurancePlanService insurancePlanService; + + @Autowired + IPlanSafeguardService planSafeguardService; + + @Autowired + CompanyFeign companyFeign; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Autowired + IInsuranceCoefficentService insuranceCoefficentService; + + @Autowired + ICustomerRelationService customerRelationService; + + @Override + public InsureProcessVO buildInsureProcessVO(Long insuranceId, Long insurancePlanId, String companyNo, List InsuranceCoefficentIds) { + //保险产品 + InsuranceVO insuranceVO = insuranceService.findById(String.valueOf(insuranceId)); + if (EmptyUtil.isNullOrEmpty(insuranceVO)){ + throw new RuntimeException("保险异常"); + } + if (SuperConstant.DATA_STATE_1.equals(insuranceVO.getDataState())|| + SuperConstant.DATA_STATE_1.equals(insuranceVO.getInsuranceState())){ + throw new RuntimeException("保险下架"); + } + //保险方案 + InsurancePlanVO insurancePlanVO = insurancePlanService.findByIdAndInsuranceId(insurancePlanId,insuranceId); + if (EmptyUtil.isNullOrEmpty(insurancePlanVO)){ + throw new RuntimeException("保险产品异常"); + } + //方案保障项 + List planSafeguardVOs = insurancePlanVO.getPlanSafeguardVOs(); + if (EmptyUtil.isNullOrEmpty(planSafeguardVOs)){ + throw new RuntimeException("产品保障型异常"); + } + //保险公司 + CompanyVO companyVO = companyFeign.findCompanyByNo(insuranceVO.getCompanyNo()); + if (EmptyUtil.isNullOrEmpty(companyVO)){ + throw new RuntimeException("保险对应公司不存在"); + } + //保险系数项 + List coefficentVOs = insuranceCoefficentService + .findListByIdsAndInsuranceId(InsuranceCoefficentIds,insuranceId); + if (EmptyUtil.isNullOrEmpty(coefficentVOs)){ + throw new RuntimeException("保险系数异常"); + } + return InsureProcessVO.builder() + .insuranceVO(insuranceVO) + .insurancePlanVO(insurancePlanVO) + .coefficents(coefficentVOs) + .safeguardVOs(planSafeguardVOs) + .companyVO(companyVO) + .build(); + } + + @Override + public CustomerRelationVO buildInsured(String customerRelationId) { + return customerRelationService.findById(customerRelationId); + } + + @Override + public List buildInsureds(List customerRelationIds) { + return customerRelationService.findInId(customerRelationIds); + } + + @Override + public CustomerRelationVO buildApplicant() { + //当前登录人 + Long customerId = SubjectContent.getUserVO().getId(); + //当前登录人关系 + List list = customerRelationService + .findList(CustomerRelationVO.builder().customerId(customerId).build()); + //投保人 + return list.stream() + .filter(n -> { return n.getRelation().equals(CustomerRelationConstant.SELF);}) + .findFirst().get(); + } + + @Override + public Boolean checkBaseOnly(List insuranceCoefficentVOs) { + //保险系数相同系数只可拥有一个 + Map> coefficentVoMap = insuranceCoefficentVOs.stream() + .collect(Collectors.groupingBy(InsuranceCoefficentVO::getCoefficentKey)); + for (List coefficentVos : coefficentVoMap.values()) { + if (coefficentVos.size()!=1) + return false; + } + return true; + } + + @Override + public Boolean checkAge(InsuranceVO insuranceVO, CustomerRelationVO insured) { + //保险年龄限制信息,包括4部分:起始、起始单位、结束、结束单位 + Long timeStart = insuranceVO.getTimeStart(); + String timeStartUnit = insuranceVO.getTimeStartUnit(); + Long timeEnd=insuranceVO.getTimeEnd(); + String timeEndUnit= insuranceVO.getTimeEndUnit(); + //限制补全则无限制 + if (EmptyUtil.isNullOrEmpty(timeStart)||EmptyUtil.isNullOrEmpty(timeStartUnit)|| + EmptyUtil.isNullOrEmpty(timeEnd)||EmptyUtil.isNullOrEmpty(timeEndUnit)){ + return true; + } + //根据身份证获得当年龄,年纪为0则表示不满一周 + Long age = Long.valueOf(IdcardUtil.getAgeByIdCard(insured.getIdentityCard(), new Date())); + //限制起始单位:年,年纪小于1岁,直接拒绝 + if (InsuranceConstant.YEAR.equals(timeStartUnit)&&age.equals(0L)){ + return false; + } + //限制起始单位:年,年纪大于1岁,判断年纪是否在起始时间和结束时间的闭空间内 + if (InsuranceConstant.YEAR.equals(timeStartUnit)&&!age.equals(0L)){ + return timeStart <= age && timeEnd >= age; + } + //限制起始单位:天,年纪小于1岁,获得被投保人出生天数,判断出生天数是否大于开始时间 + if (InsuranceConstant.DAY.equals(timeStartUnit)&&age.equals(0L)){ + String birthByIdCard = IdcardUtil.getBirthByIdCard(insured.getIdentityCard()); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + LocalDate startDate = LocalDate.parse(birthByIdCard,formatter); + long until = startDate.until(LocalDate.now(), ChronoUnit.DAYS); + return timeStart <= until; + } + //限制起始单位:天,年纪大于1岁,判断结束时间是否大于年纪 + if (InsuranceConstant.DAY.equals(timeStartUnit)&&!age.equals(0L)){ + return timeEnd >= age; + } + return true; + } + + @Override + public Boolean checkPrice(InsurancePlanVO insurancePlanVO, List insuranceCoefficentVOs, BigDecimal price) { + //投入方式 + InsuranceCoefficentVO buyMode = insuranceCoefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.BUY_MODE);}) + .findFirst().get(); + //趸交 + JsonAttribute jsonBuyMode = JSONObject.parseObject(buyMode.getCoefficentValue(), JsonAttribute.class); + if (InsuranceConstant.BUY_MODE_1.equals(jsonBuyMode.getVal())){ + return insurancePlanVO.getMaxPriceAllIn().compareTo(price)>0; + } + //定投 + InsuranceCoefficentVO periodicUnit = insuranceCoefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC_UNIT);}) + .findFirst().get(); + JsonAttribute jsonPeriodicUnit = JSONObject.parseObject(periodicUnit.getCoefficentValue(), JsonAttribute.class); + //单位判定 + if (InsuranceConstant.WEEK.equals(jsonPeriodicUnit.getVal())){ + return insurancePlanVO.getMaxPriceWeek().compareTo(price)>0; + }else if (InsuranceConstant.MONTH.equals(jsonPeriodicUnit.getVal())){ + return insurancePlanVO.getMaxPriceMonth().compareTo(price)>0; + }else if(InsuranceConstant.YEAR.equals(jsonPeriodicUnit.getVal())){ + return insurancePlanVO.getMaxPriceYear().compareTo(price)>0; + }else { + return false; + } + } + + @Override + public Boolean checkSafeguard(List coefficentVOs) { + //系数:必须包含连续投保系数 + List autoWarrantyExtensionList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.AUTO_WARRANTY_EXTENSION);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(autoWarrantyExtensionList)){ + return false; + } + //系数:必须包含保障期限 + List protectionPeriodList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PROTECTION_PERIOD);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(protectionPeriodList)){ + return false; + } + //系数:必须包含投入时长 + List buyDurationList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC); }) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(buyDurationList)){ + return false; + } + //系数:付款方式 + List payMentList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PAY_MENT); }) + .collect(Collectors.toList()); + return !EmptyUtil.isNullOrEmpty(payMentList); + } + + @Override + public Boolean checkTravel(List coefficentVOs) { + //系数:必须包含保障期限 + List protectionPeriodList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PROTECTION_PERIOD);}) + .collect(Collectors.toList()); + return !EmptyUtil.isNullOrEmpty(protectionPeriodList); + } + + @Override + public Boolean checkEarnings(List coefficentVOs) { + //系数:必须含领取开始 + List actualAgeGet = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.ACTUAL_GET_START);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(actualAgeGet)){ + return false; + } + //系数:必须含领取周期 + List actualGetPeriodic = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.ACTUAL_GET_UNIT);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(actualGetPeriodic)){ + return false; + } + //系数:必须投入方式 + List buyMode = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.BUY_MODE);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(buyMode)){ + return false; + } + //判定:是否为追投方式 + if (buyMode.get(0).getCoefficentKey().equals(InsuranceConstant.BUY_MODE_0)){ + //系数:必须含投入周期单位 + List periodicUnitList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC_UNIT);}) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(periodicUnitList)){ + return false; + } + //系数:必须包含投入周期时长 + List periodicList = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC); }) + .collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(periodicList)){ + return false; + } + } + return true; + } + + @Override + public List ageHandler(List coefficentVOs, Long insuranceId, CustomerRelationVO insured) { + //获得保险年龄系数 + InsuranceCoefficentVO insuranceCoefficentVO = InsuranceCoefficentVO.builder() + .coefficentKey(InsuranceConstant.RANGE_AGE) + .insuranceId(insuranceId) + .build(); + List rangeAgeList = insuranceCoefficentService.findList(insuranceCoefficentVO); + if (!EmptyUtil.isNullOrEmpty(rangeAgeList)) { + //根据身份证获得当年龄 + int age = IdcardUtil.getAgeByIdCard(insured.getIdentityCard(), new Date()); + List rangeAgeListHandler = rangeAgeList.stream().filter(n -> { + //转换为RangAgeVo对象 + RangJsonAttribute rangJsonAttribute = JSONObject.parseObject(n.getCoefficentValue(), RangJsonAttribute.class); + //保险起始单位:天,且获得年龄等于0,则要进行天数判断 + if (InsuranceConstant.DAY.equals(rangJsonAttribute.getStartUnit())&&age==0) { + //获得投保人生日 + String birthByIdCard = IdcardUtil.getBirthByIdCard(insured.getIdentityCard()); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd"); + LocalDate startDate = LocalDate.parse(birthByIdCard, formatter); + long until = startDate.until(LocalDate.now(),ChronoUnit.DAYS); + return Long.parseLong(rangJsonAttribute.getStart()) < until; + //保险起始单位:年,且获得年龄大于0,则要进行年龄判断 + } else if (InsuranceConstant.YEAR.equals(rangJsonAttribute.getStartUnit())&&age>0) { + return Long.parseLong(rangJsonAttribute.getStart()) <= age + &&Long.parseLong(rangJsonAttribute.getEnd()) > age; + } else { + return false; + } + }).collect(Collectors.toList()); + //确定投入年龄系数后需要累加 + if (!EmptyUtil.isNullOrEmpty(rangeAgeListHandler)) { + coefficentVOs.addAll(rangeAgeListHandler); + } + } + return coefficentVOs; + } + + @Override + public List numberOfPeopleHandler(List coefficentVOs, Long insuranceId, List insureds) { + //保险:人数系数 + InsuranceCoefficentVO insuranceCoefficentVO = InsuranceCoefficentVO.builder() + .coefficentKey(InsuranceConstant.NUMBER_OF_PEOPLE) + .insuranceId(insuranceId) + .build(); + List numberOfPeopleList = insuranceCoefficentService.findList(insuranceCoefficentVO); + if (!EmptyUtil.isNullOrEmpty(numberOfPeopleList)) { + //获得投保人数 + Long numberOfPeople = Long.valueOf(insureds.size()); + List numberOfPeopleListHandler = numberOfPeopleList.stream().filter(n -> { + //转换为RangJsonAttribute处理对象 + RangJsonAttribute rangJsonAttribute = JSONObject.parseObject(n.getCoefficentValue(), RangJsonAttribute.class); + //投保人所在范围 + return numberOfPeople >= Long.valueOf(rangJsonAttribute.getStart())&& + numberOfPeople < Long.valueOf(rangJsonAttribute.getEnd()); + }).collect(Collectors.toList()); + //确定投入人数系数后需要累加 + if (!EmptyUtil.isNullOrEmpty(numberOfPeopleListHandler)) { + coefficentVOs.addAll(numberOfPeopleListHandler); + } + } + return coefficentVOs; + } + + @Override + public String premiumComputeTravel(InsurancePlanVO insurancePlanVO, List coefficentVOs) { + //最终系数合=累加所有系数维度值[不包含投保人数系数]+1 + BigDecimal sumScore = coefficentVOs.stream() + .filter(n->{ return !n.getCoefficentKey().equals(InsuranceConstant.NUMBER_OF_PEOPLE);}) + .map(n -> {return !EmptyUtil.isNullOrEmpty(n.getScore())?n.getScore():BigDecimal.ZERO;}) + .reduce(BigDecimal.ZERO, BigDecimal::add).add(BigDecimal.ONE); + //系数:投保人数 + InsuranceCoefficentVO numberOfpeople = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.NUMBER_OF_PEOPLE);}) + .findFirst().get(); + BigDecimal numberOfpeopleScore = numberOfpeople.getScore(); + //最终投保金额=方案起步价X最终系数合X投保人数系数 + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + return decimalFormat.format(insurancePlanVO.getPrice().multiply(sumScore).multiply(numberOfpeopleScore)); + } + + @Override + public String premiumComputeSafeguard(InsurancePlanVO insurancePlanVO, List coefficentVOs) { + //最终系数合=1+系数A+系数B+系数C+......[不含缴费方式] + BigDecimal sumScore = coefficentVOs.stream() + .filter(n->{ return !n.getCoefficentKey().equals(InsuranceConstant.PAY_MENT);}) + .map(n -> {return !EmptyUtil.isNullOrEmpty(n.getScore())?n.getScore():BigDecimal.ZERO;}) + .reduce(BigDecimal.ZERO, BigDecimal::add).add(BigDecimal.ONE); + //付款方式 + InsuranceCoefficentVO payment = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PAY_MENT);}) + .findFirst().get(); + BigDecimal PaymentScore = payment.getScore(); + //最终投保金额=方案起步价X最终系数X缴费方式系数 + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + return decimalFormat.format(insurancePlanVO.getPrice().multiply(sumScore).multiply(PaymentScore)); + } + + @Autowired + IWarrantyEarningsOrderService warrantyEarningsOrderService; + + @Override + public EarningVO earningsCompute(String warrantyNo,CustomerRelationVO applicant,DoInsureVo doInsureVo, + InsurancePlanVO insurancePlanVO, + List coefficentVOs, + CustomerRelationVO insured, + Boolean isTrial) { + //系数:投入方式 + List buyMode = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.BUY_MODE);}) + .collect(Collectors.toList()); + //转换JsonAttribute + JsonAttribute jsonAttribute = JSONObject.parseObject(buyMode.get(0).getCoefficentValue(), JsonAttribute.class); + //定义:投入周期时长 + BigDecimal periodic = null; + //定义:投入周期单位 + String periodicUnit = null; + //定义:投入总周期数 + Integer periods = null; + //定义:投入总金额 + BigDecimal premiums = null; + if (jsonAttribute.getVal().equals(InsuranceConstant.BUY_MODE_0)){ + //找到投入周期时长系数转换为JsonAttribute获取CalculatedVal + periodic = periodic(coefficentVOs); + //找到投入周期时长系数转换为JsonAttribute获取Val + periodicUnit = periodicUnit(coefficentVOs); + //找投入周期时长X投入周期频率:例如每月投,投入3年计算方式2X12=36期 + periods = earningsPeriods(coefficentVOs); + //投入周期时长X传入金额 + premiums = doInsureVo.getPrice().multiply(new BigDecimal(periods)); + }else { + periodic=BigDecimal.ZERO; + periodicUnit = "ALL-IN"; + periods = 1; + premiums = doInsureVo.getPrice(); + } + //投入结束时间 + LocalDateTime putInEndTime = LocalDateTimeUtil.offset(LocalDateTime.now(), periodic.longValue(), ChronoUnit.YEARS); + //领取周期单位 + String actualGetPeriodicUnit = actualGetPeriodicUnit(coefficentVOs); + //领取起始时间 + LocalDateTime actualGetStartTime = actualGetStartTime(coefficentVOs,insured); + //理财影响系数:影响最终收益的系数 + BigDecimal premiumsHandler = premiumsHandler(coefficentVOs,premiums); + //领取计划 + List periodicVos = periodicVos(warrantyNo,applicant,insured,insurancePlanVO,premiumsHandler, + coefficentVOs,actualGetPeriodicUnit,actualGetStartTime,isTrial,doInsureVo); + //领取总金额 + BigDecimal receivedAmounts = periodicVos.stream() + .map(PeriodicVo::getReceivedAmount) + .reduce(BigDecimal.ZERO,BigDecimal::add); + return EarningVO.builder() + .premium(doInsureVo.getPrice()) + .premiums(premiums) + .periodic(periodic.toPlainString()) + .periods(periods) + .periodicUnit(periodicUnit) + .actualGetStartTime(actualGetStartTime) + .putInEndTime(putInEndTime) + .actualGetPeriodicUnit(actualGetPeriodicUnit) + .periodicVos(periodicVos) + .accumulatedEarnings(receivedAmounts.subtract(premiums)) + .receivedAmounts(receivedAmounts.setScale(2,RoundingMode.HALF_UP)) + .multiple(receivedAmounts.divide(premiums,2,RoundingMode.HALF_UP)) + .build(); + } + + @Override + public BigDecimal premiumsHandler(List coefficentVOs, BigDecimal premiums) { + //最终系数合=累加所有系数维度值+1 + BigDecimal sumScore = coefficentVOs.stream() + .map(n -> {return !EmptyUtil.isNullOrEmpty(n.getScore())?n.getScore():BigDecimal.ZERO;}) + .reduce(BigDecimal.ZERO, BigDecimal::add).add(BigDecimal.ONE); + //最终投保金额=原始保费X最终系数 + DecimalFormat decimalFormat = new DecimalFormat("0.00"); + return premiums.multiply(sumScore); + } + + @Override + public List periodicVos( String warrantyNo,CustomerRelationVO applicant,CustomerRelationVO insured, + InsurancePlanVO insurancePlanVO, BigDecimal premiums, + List coefficentVOs, String actualGetPeriodicUnit, + LocalDateTime actualGetStartTime,Boolean isTrial,DoInsureVo doInsureVo) { + //领取计划存储 + List periodicVos = Lists.newArrayList(); + //保险给付计划 + PlanEarningsVO planEarningsVO = insurancePlanVO.getPlanEarningsVO(); + //此处定义的jsonAttributes的val为每年领取比例 + List jsonAttributes = JSONArray.parseArray(planEarningsVO.getEarningsJson(), JsonAttribute.class); + //终身领取型 + if (PlanEarningsConstant.EarningsType_0.equals(planEarningsVO.getEarningsType())){ + InsuranceCoefficentVO coefficentVOHandler = null; + //养老试算时,用户指定测算时间 + if (isTrial&&doInsureVo.getCheckRule().equals(InsureConstant.CHECK_RULE_3)){ + coefficentVOHandler = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.TRIAL_GET_END);}) + .collect(Collectors.toList()).get(0); + //非养老试算时,合同规定截止时间,领至终身假定150岁 + }else { + coefficentVOHandler = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.ACTUAL_GET_END);}) + .collect(Collectors.toList()).get(0); + } + JsonAttribute jsonAttribute = JSONObject.parseObject(coefficentVOHandler.getCoefficentValue(), JsonAttribute.class); + //计算领取总年数=领取结束时间-领取开始时间 + long actualGetYear = 0L; + if (InsuranceConstant.YEAR.equals(jsonAttribute.getUnit())){ + //领取截止时间 + LocalDateTime actualGetEndTime = LocalDateTimeUtil.offset(LocalDateTime.now(), + Long.valueOf(jsonAttribute.getVal()),ChronoUnit.YEARS); + actualGetYear = LocalDateTimeUtil.between(actualGetStartTime,actualGetEndTime,ChronoUnit.YEARS); + } + if (InsuranceConstant.AGE.equals(jsonAttribute.getUnit())){ + //被投保人当前年龄 + int age = IdcardUtil.getAgeByIdCard(insured.getIdentityCard(), new Date()); + //领取截止时间 + LocalDateTime actualGetEndTime = LocalDateTimeUtil.offset(LocalDateTime.now(), + Long.valueOf(jsonAttribute.getVal())-age,ChronoUnit.YEARS); + actualGetYear = LocalDateTimeUtil.between(actualGetStartTime,actualGetEndTime,ChronoUnit.YEARS); + } + //按月领取 + if (InsuranceConstant.MONTH.equals(actualGetPeriodicUnit)){ + actualGetYear = actualGetYear*12; + BigDecimal flag = new BigDecimal(jsonAttributes.get(0).getVal()) + .divide(new BigDecimal(12),2,BigDecimal.ROUND_HALF_UP) + .divide(new BigDecimal(100)); + for (int i = 0; i < actualGetYear; i++) { + PeriodicVo periodicVo = new PeriodicVo(); + periodicVo.setPeriodic("第"+(i+1)+"期"); + periodicVo.setActualGetStartTime(LocalDateTimeUtil.offset(actualGetStartTime, i, ChronoUnit.MONTHS)); + periodicVo.setReceivedAmount(premiums.multiply(flag)); + periodicVos.add(periodicVo); + } + } + //按年领取 + if (InsuranceConstant.YEAR.equals(actualGetPeriodicUnit)){ + BigDecimal flag = new BigDecimal(jsonAttributes.get(0).getVal()) + .divide(new BigDecimal(100)); + for (int i = 0; i < actualGetYear; i++) { + PeriodicVo periodicVo = new PeriodicVo(); + periodicVo.setPeriodic("第"+(i+1)+"期"); + periodicVo.setActualGetStartTime(LocalDateTimeUtil.offset(actualGetStartTime, i, ChronoUnit.YEARS)); + periodicVo.setReceivedAmount(premiums.multiply(flag)); + periodicVos.add(periodicVo); + } + } + } + //固定期限领取 + if (PlanEarningsConstant.EarningsType_1.equals(planEarningsVO.getEarningsType())){ + for (int i = 0; i < jsonAttributes.size(); i++) { + BigDecimal flag = new BigDecimal(jsonAttributes.get(i).getVal()).divide(new BigDecimal(100)); + PeriodicVo periodicVo = new PeriodicVo(); + periodicVo.setPeriodic(jsonAttributes.get(i).getName()); + periodicVo.setReceivedAmount(premiums.multiply(flag)); + periodicVo.setActualGetStartTime(LocalDateTimeUtil.offset(actualGetStartTime, i, ChronoUnit.YEARS)); + periodicVos.add(periodicVo); + } + } + //非试算,需要保存给付计划订单 + if (!isTrial&&!EmptyUtil.isNullOrEmpty(periodicVos)){ + List warrantyEarningsOrderList = Lists.newArrayList(); + periodicVos.forEach(n->{ + WarrantyEarningsOrder warrantyEarningsOrder = WarrantyEarningsOrder.builder() + .scheduleTime(n.getActualGetStartTime()) + .applicantIdentityCard(applicant.getIdentityCard()) + .applicantName(applicant.getName()) + .currentPeriod(n.getPeriodic()) + .orderNo(String.valueOf(identifierGenerator.nextId(periodicVos))) + .orderState(WarrantyEarningsOrderConstant.ORDER_STATE_0) + .warrantyNo(warrantyNo) + .premium(n.getReceivedAmount()) + .build(); + warrantyEarningsOrderList.add(warrantyEarningsOrder); + }); + warrantyEarningsOrderService.saveBatch(warrantyEarningsOrderList); + } + return periodicVos; + } + + @Override + public Integer earningsPeriods(List coefficentVOs) { + //投入周期时长【投3年、投5年、投10年】 + BigDecimal periodic = periodic(coefficentVOs); + //投入周期单位 + String periodicUnit = periodicUnit(coefficentVOs); + //周期计算 + switch (periodicUnit){ + //按周 + case InsuranceConstant.WEEK: + periodic = periodic.multiply(new BigDecimal(52)); + break; + //按月 + case InsuranceConstant.MONTH: + periodic = periodic.multiply(new BigDecimal(12)); + break; + //按年 + case InsuranceConstant.YEAR: + periodic = periodic.multiply(new BigDecimal(1)); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + return periodic.intValue(); + } + + @Override + public Integer SafeguardPeriods(List coefficentVOs) { + //投入周期时长【投3年、投5年、投10年】 + BigDecimal periodic = periodic(coefficentVOs); + //投入周期单位 + String periodicUnit = payMent(coefficentVOs); + //周期计算 + switch (periodicUnit){ + //按周 + case InsuranceConstant.WEEK: + periodic = periodic.multiply(new BigDecimal(52)); + break; + //按月 + case InsuranceConstant.MONTH: + periodic = periodic.multiply(new BigDecimal(12)); + break; + //按年 + case InsuranceConstant.YEAR: + periodic = periodic.multiply(new BigDecimal(1)); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + return periodic.intValue(); + } + + @Override + public WarrantyTimeVO timeSetup(DoInsureVo doInsureVo,List coefficentVOs, InsuranceVO insuranceVO) { + //保障起始时间 + LocalDateTime safeguardStartTime = EmptyUtil.isNullOrEmpty(doInsureVo.getSafeguardStartTime())? + LocalDateTime.now():doInsureVo.getSafeguardStartTime(); + //犹豫期截止时间 + LocalDateTime hesitationTime = null; + //等待期截止时间 + LocalDateTime waitTime = null; + //保障截止时间 + LocalDateTime safeguardEndTime = null; + //医疗和重疾类保险才有犹豫期和等待期 + if (doInsureVo.getCheckRule().equals(InsureConstant.CHECK_RULE_0)|| + doInsureVo.getCheckRule().equals(InsureConstant.CHECK_RULE_1)){ + //犹豫期截止时间 + hesitationTime = LocalDateTimeUtil.offset(LocalDateTime.now(), insuranceVO.getHesitation(), ChronoUnit.DAYS); + //等待期截止时间 + waitTime = LocalDateTimeUtil.offset(LocalDateTime.now(), insuranceVO.getWaits(), ChronoUnit.DAYS); + } + //养老和储蓄类保险无保障结束时间 + if (!doInsureVo.getCheckRule().equals(InsureConstant.CHECK_RULE_3)&& + !doInsureVo.getCheckRule().equals(InsureConstant.CHECK_RULE_4)){ + //保障期限 + InsuranceCoefficentVO protectionPeriod = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PROTECTION_PERIOD);}) + .findFirst().get(); + String valProtectionPeriod = JSONObject.parseObject(protectionPeriod.getCoefficentValue(), JsonAttribute.class).getUnit(); + String calculatedVal = JSONObject.parseObject(protectionPeriod.getCoefficentValue(), JsonAttribute.class).getCalculatedVal(); + Integer rearwardShift = 0; + //推迟:年计算 + if (valProtectionPeriod.equals(InsuranceConstant.YEAR)) { + rearwardShift = Integer.valueOf(calculatedVal); + safeguardEndTime = LocalDateTimeUtil.offset(safeguardStartTime, rearwardShift, ChronoUnit.YEARS); + } + //推迟:月计算 + if (valProtectionPeriod.equals(InsuranceConstant.MONTH)){ + rearwardShift = Integer.valueOf(calculatedVal); + safeguardEndTime = LocalDateTimeUtil.offset(safeguardStartTime, rearwardShift, ChronoUnit.MONTHS); + } + //推迟:天计算 + if (valProtectionPeriod.equals(InsuranceConstant.DAY)){ + rearwardShift = Integer.valueOf(calculatedVal); + safeguardEndTime = LocalDateTimeUtil.offset(safeguardStartTime, rearwardShift, ChronoUnit.DAYS); + } + } + return WarrantyTimeVO.builder() + .hesitationTime(hesitationTime) + .waitTime(waitTime) + .safeguardStartTime(safeguardStartTime) + .safeguardEndTime(safeguardEndTime).build(); + } + + @Override + public String autoWarrantyExtension(List coefficentVOs) { + //是否自动续保 + InsuranceCoefficentVO autoWarrantyExtension = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.AUTO_WARRANTY_EXTENSION);}) + .findFirst().get(); + return JSONObject.parseObject(autoWarrantyExtension.getCoefficentValue(),JsonAttribute.class).getVal(); + } + + @Override + public BigDecimal periodic(List coefficentVOs) { + //投入时长 + InsuranceCoefficentVO periodic = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC);}) + .findFirst().get(); + return new BigDecimal(JSONObject.parseObject(periodic.getCoefficentValue(),JsonAttribute.class).getCalculatedVal()); + } + + @Override + public String periodicUnit(List coefficentVOs) { + //投入周期单位 + InsuranceCoefficentVO periodicUnit = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PERIODIC_UNIT);}) + .findFirst().get(); + return JSONObject.parseObject(periodicUnit.getCoefficentValue(),JsonAttribute.class).getVal(); + } + + @Override + public String payMent(List coefficentVOs) { + //投入周期单位 + InsuranceCoefficentVO payMent = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.PAY_MENT);}) + .findFirst().get(); + return JSONObject.parseObject(payMent.getCoefficentValue(),JsonAttribute.class).getVal(); + } + + @Override + public LocalDateTime actualGetStartTime(List coefficentVOs, CustomerRelationVO insured) { + //领取开始系数 + InsuranceCoefficentVO actualGet = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.ACTUAL_GET_START);}) + .findFirst().get(); + JsonAttribute jsonActualGet = JSONObject.parseObject(actualGet.getCoefficentValue(), JsonAttribute.class); + BigDecimal compoundAnnualInterest = BigDecimal.ZERO; + //多少年后开始领取 + if (InsuranceConstant.YEAR.equals(jsonActualGet.getUnit())){ + compoundAnnualInterest = new BigDecimal(jsonActualGet.getCalculatedVal()); + } + //多少岁后开始领取 + if (InsuranceConstant.AGE.equals(jsonActualGet.getUnit())){ + //被投保人当前年龄 + int age = IdcardUtil.getAgeByIdCard(insured.getIdentityCard(), new Date()); + compoundAnnualInterest = new BigDecimal(jsonActualGet.getCalculatedVal()).subtract(new BigDecimal(age)); + } + return LocalDateTimeUtil.offset(LocalDateTime.now(), compoundAnnualInterest.longValue(), ChronoUnit.YEARS); + } + + @Override + public String actualGetPeriodicUnit(List coefficentVOs) { + //领取周期 + InsuranceCoefficentVO actualGetPeriodicUnit = coefficentVOs.stream() + .filter(n -> { return n.getCoefficentKey().equals(InsuranceConstant.ACTUAL_GET_UNIT);}) + .findFirst().get(); + JsonAttribute jsonActualGet = JSONObject.parseObject(actualGetPeriodicUnit.getCoefficentValue(), JsonAttribute.class); + return jsonActualGet.getVal(); + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/EarningsInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/EarningsInsureHandler.java new file mode 100644 index 0000000..b74af09 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/EarningsInsureHandler.java @@ -0,0 +1,294 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import cn.hutool.core.date.LocalDateTimeUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyOrderConstant; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import com.itheima.sfbx.insurance.handler.InsureProcessHandler; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; +import java.util.List; + +/** + * @ClassName EarningsInsureHandler.java + * @Description 理财型:保险投保、创建订单、理财收益 + */ +@Service("earningsInsureHandler") +public class EarningsInsureHandler implements InsureHandler { + + @Autowired + InsureProcessHandler insureProcessHandler; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Override + public WarrantyVO doInsure(DoInsureVo doInsureVo) { + //不支持团险 + if (doInsureVo.getCustomerRelationIds().size()>1){ + throw new RuntimeException("不支持团险"); + } + //不支持指定生效期 + if (!EmptyUtil.isNullOrEmpty(doInsureVo.getSafeguardStartTime())){ + throw new RuntimeException("不支持指定生效期"); + } + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //被投保人关系ID + String customerRelationId = doInsureVo.getCustomerRelationIds().get(0); + //被投保人信息 + CustomerRelationVO insured = insureProcessHandler.buildInsured(customerRelationId); + //投保人信息 + CustomerRelationVO applicant = insureProcessHandler.buildApplicant(); + //系数唯一性检查 + Boolean flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //理财保险必填参数检测 + flag = insureProcessHandler.checkEarnings(coefficentVOs); + if (!flag){ + throw new RuntimeException("理财型保险缺少必填参数!"); + } + //理财投保金额是否符合检测 + flag = insureProcessHandler.checkPrice(insurancePlanVO, + coefficentVOs,doInsureVo.getPrice()); + if (!flag){ + throw new RuntimeException("投保金额不符合!"); + } + //检查投保年龄是否符合检测 + flag = insureProcessHandler.checkAge(insuranceVO,insured); + if (!flag){ + throw new RuntimeException("投保年龄不符合!"); + } + String warrantyNo= String.valueOf(identifierGenerator.nextId(insureProcessVO)); + //收益计算 + EarningVO earningVO = insureProcessHandler.earningsCompute(warrantyNo,applicant,doInsureVo,insurancePlanVO, coefficentVOs, insured,false); + //犹豫期截止时间、等待期期截止时间、保障截止时间 + WarrantyTimeVO warrantyTimeVO = insureProcessHandler.timeSetup(doInsureVo,coefficentVOs, insuranceVO); + //构建保障合同对象 + return WarrantyVO.builder() + .insuranceId(insuranceVO.getId()) + .insuranceName(insuranceVO.getInsuranceName()) + .insuranceJson(JSONObject.toJSONString(insureProcessVO)) + .warrantyNo(warrantyNo) + .applicantName(applicant.getName()) + .applicantIdentityCard(applicant.getIdentityCard()) + .companyNo(insureProcessVO.getCompanyVO().getCompanyNo()) + .companyName(insureProcessVO.getCompanyVO().getCompanName()) + .safeguardStartTime(warrantyTimeVO.getSafeguardStartTime()) + .safeguardEndTime(warrantyTimeVO.getSafeguardEndTime()) + .premium(doInsureVo.getPrice()) + .premiums(earningVO.getPremiums()) + .autoWarrantyExtension("0") + .warrantyState(WarrantyConstant.STATE_NOT_PAY) + .underwritingState(WarrantyConstant.UNDERWRITING_STATE_1) + .periods(earningVO.getPeriods()) + .dutyPeriod(0) + .hesitationTime(warrantyTimeVO.getHesitationTime()) + .waitTime(warrantyTimeVO.getWaitTime()) + .grace(insuranceVO.getGrace()) + .graceUnit(insuranceVO.getGraceUnit()) + .revival(insuranceVO.getRevival()) + .revivalUnit(insuranceVO.getRevivalUnit()) + .periodicUnit(earningVO.getPeriodicUnit()) + .customerRelationVOs(Lists.newArrayList(insured)) + .build(); + } + + @Override + public List createWarrantyOrderVO(WarrantyVO warrantyVO) { + List warrantyOrderVOs = Lists.newArrayList(); + //总周期数 + Integer periods = warrantyVO.getPeriods(); + for (int i = 1; i <= periods; i++) { + WarrantyOrderVO warrantyOrderVO = WarrantyOrderVO.builder() + .orderNo(String.valueOf(identifierGenerator.nextId(warrantyOrderVOs))) + .warrantyNo(warrantyVO.getWarrantyNo()) + .companyNo(warrantyVO.getCompanyNo()) + .periods(warrantyVO.getPeriods()) + .currentPeriod(i) + .premium(warrantyVO.getPremium()) + .premiums(warrantyVO.getPremiums()) + .periodicUnit(warrantyVO.getPeriodicUnit()) + .orderState(WarrantyOrderConstant.ORDER_STATE_0) + .build(); + //利润分成 + if (i==1){ + InsureProcessVO insureProcessVO = JSONObject.parseObject(warrantyVO.getInsuranceJson(), InsureProcessVO.class); + //有代理人 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getAgentId())){ + BigDecimal individualAgentRate = insureProcessVO.getInsuranceVO().getIndividualAgentRate(); + warrantyOrderVO.setAgentFee(warrantyVO.getPremium().multiply(individualAgentRate).divide(new BigDecimal(100))); + BigDecimal platformAgentRate = insureProcessVO.getInsuranceVO().getPlatformAgentRate(); + warrantyOrderVO.setPlatformFee(warrantyVO.getPremium().multiply(platformAgentRate).divide(new BigDecimal(100))); + //无代理人 + }else { + warrantyOrderVO.setAgentFee(BigDecimal.ZERO); + BigDecimal individualAgentRate = insureProcessVO.getInsuranceVO().getIndividualAgentRate(); + BigDecimal platformAgentRate = insureProcessVO.getInsuranceVO().getPlatformAgentRate().add(individualAgentRate); + warrantyOrderVO.setPlatformFee(warrantyVO.getPremium().multiply(platformAgentRate).divide(new BigDecimal(100))); + } + }else { + warrantyOrderVO.setAgentFee(BigDecimal.ZERO); + warrantyOrderVO.setPlatformFee(BigDecimal.ZERO); + } + LocalDateTime now = LocalDateTime.now(); + if (periods!=1) { + //计划执行时间 + LocalDateTime scheduleTime = null; + if (i!=1) { + if (now.getDayOfMonth() <= 10) { + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 5, 0, 0); + } else if (now.getDayOfMonth() <= 20) { + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 15, 0, 0); + } else { + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 25, 0, 0); + } + switch (warrantyVO.getPeriodicUnit()) { + //按周 + case InsuranceConstant.WEEK: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i - 1, ChronoUnit.WEEKS); + break; + //按月 + case InsuranceConstant.MONTH: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i - 1, ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i - 1, ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + }else { + scheduleTime = LocalDateTime.now(); + } + warrantyOrderVO.setScheduleTime(scheduleTime); + }else { + warrantyOrderVO.setScheduleTime(now); + } + //宽限期截止时间 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getGraceUnit())) { + LocalDateTime graceTime = null; + switch (warrantyVO.getGraceUnit()) { + //按天 + case InsuranceConstant.DAY: + graceTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getGrace(), ChronoUnit.DAYS); + break; + //按月 + case InsuranceConstant.MONTH: + graceTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getGrace(), ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + graceTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getGrace(), ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + warrantyOrderVO.setGraceTime(graceTime); + } + //复效期截止时间 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getRevivalUnit())) { + LocalDateTime revivalTime = null; + switch (warrantyVO.getRevivalUnit()) { + //按天 + case InsuranceConstant.DAY: + revivalTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getRevival(), ChronoUnit.DAYS); + break; + //按月 + case InsuranceConstant.MONTH: + revivalTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getRevival(), ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + revivalTime = LocalDateTimeUtil.offset(warrantyOrderVO.getScheduleTime(), warrantyVO.getRevival(), ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + warrantyOrderVO.setRevivalTime(revivalTime); + } + warrantyOrderVO.setApplicantName(warrantyVO.getApplicantName()); + warrantyOrderVO.setApplicantIdentityCard(warrantyVO.getApplicantIdentityCard()); + warrantyOrderVOs.add(warrantyOrderVO); + } + return warrantyOrderVOs; + } + + @Override + public EarningVO doEarnings(DoInsureVo doInsureVo) { + //不支持团险 + if (doInsureVo.getCustomerRelationIds().size()>1){ + throw new RuntimeException("不支持团险"); + } + //不支持指定生效期 + if (!EmptyUtil.isNullOrEmpty(doInsureVo.getSafeguardStartTime())){ + throw new RuntimeException("不支持指定生效期"); + } + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //投保人信息 + CustomerRelationVO applicant = insureProcessHandler.buildApplicant(); + //被投保人信息 + CustomerRelationVO insured = insureProcessHandler.buildInsured(doInsureVo.getCustomerRelationIds().get(0)); + //系数唯一性检查 + Boolean flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //理财保险必填参数检测 + flag = insureProcessHandler.checkEarnings(coefficentVOs); + if (!flag){ + throw new RuntimeException("理财型保险缺少必填参数!"); + } + //检查投保年龄是否符合检测 + flag = insureProcessHandler.checkAge(insuranceVO,insured); + if (!flag){ + throw new RuntimeException("投保年龄不符合!"); + } + //理财投保金额是否符合检测 + flag = insureProcessHandler.checkPrice(insurancePlanVO, + coefficentVOs,doInsureVo.getPrice()); + if (!flag){ + throw new RuntimeException("投保金额不符合!"); + } + //试算收益 + return insureProcessHandler.earningsCompute(null,applicant,doInsureVo,insurancePlanVO, coefficentVOs, insured,true); + } + + @Override + public String doPremium(DoInsureVo doTrialVo) { + return null; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/MedicalInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/MedicalInsureHandler.java new file mode 100644 index 0000000..692667b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/MedicalInsureHandler.java @@ -0,0 +1,48 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import com.itheima.sfbx.insurance.dto.InsureProcessVO; +import com.itheima.sfbx.insurance.dto.WarrantyVO; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import com.itheima.sfbx.insurance.handler.InsureProcessHandler; +import com.itheima.sfbx.insurance.rule.AccessRuleDTO; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import com.itheima.sfbx.insurance.service.IRuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** + * @ClassName MedicalInsureHandler.java + * @Description 保障型医疗类:保险投保、创建订单、保费计算 + */ +@Service +public class MedicalInsureHandler extends SafeguardInsureHandler implements InsureHandler { + + @Autowired + InsureProcessHandler insureProcessHandler; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Autowired + IRuleService ruleService; + + @Override + public WarrantyVO doInsure(DoInsureVo doInsureVo) { + //问卷:是否有问题处理 + if (doInsureVo.getIsProblem().equals(InsureConstant.IS_PROBLEM_0)){ + //医疗和重疾需要跑规则引擎 + AdviceHealthDTO adviceHealthDTO = ruleService.submitQuestionChoose(doInsureVo.getAdviceHealthDTO()); + if (adviceHealthDTO.getResult()){ + return super.doInsure(doInsureVo); + }else { + throw new RuntimeException("初筛不通过"); + } + }else { + return super.doInsure(doInsureVo); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SafeguardInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SafeguardInsureHandler.java new file mode 100644 index 0000000..8755666 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SafeguardInsureHandler.java @@ -0,0 +1,295 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import cn.hutool.core.date.LocalDateTimeUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyOrderConstant; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import com.itheima.sfbx.insurance.handler.InsureProcessHandler; +import com.itheima.sfbx.insurance.service.IRuleService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; +import java.util.List; + +/** + * @ClassName SafeguardInsureHandler.java + * @Description 保障型:保险投保、创建订单、保费计算 + */ +@Service("safeguardInsureHandler") +public class SafeguardInsureHandler implements InsureHandler { + + @Autowired + InsureProcessHandler insureProcessHandler; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Autowired + IRuleService ruleService; + + @Override + public WarrantyVO doInsure(DoInsureVo doInsureVo) { + //不支持团险 + if (doInsureVo.getCustomerRelationIds().size()>1){ + throw new RuntimeException("不支持团险"); + } + //不支持指定生效期 + if (!EmptyUtil.isNullOrEmpty(doInsureVo.getSafeguardStartTime())){ + throw new RuntimeException("不支持指定生效期"); + } + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //被投保人关系ID + String customerRelationId = doInsureVo.getCustomerRelationIds().get(0); + //被投保人信息 + CustomerRelationVO insured = insureProcessHandler.buildInsured(customerRelationId); + //投保人信息 + CustomerRelationVO applicant = insureProcessHandler.buildApplicant(); + //系数唯一性检查 + Boolean flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //保障型保险必填参数检测 + flag = insureProcessHandler.checkSafeguard(coefficentVOs); + if (!flag){ + throw new RuntimeException("保障型保险缺少必填参数!"); + } + //投保年龄是否符合检测 + flag = insureProcessHandler.checkAge(insuranceVO,insured); + if (!flag){ + throw new RuntimeException("投保年龄不符合!"); + } + //投保年龄系数 + coefficentVOs = insureProcessHandler.ageHandler(coefficentVOs,insuranceVO.getId(),insured); + //保费计算 + doInsureVo.setPrice(new BigDecimal(insureProcessHandler.premiumComputeSafeguard(insurancePlanVO, coefficentVOs))); + //总周期计算 + Integer periods = insureProcessHandler.SafeguardPeriods(coefficentVOs); + //周期单位 + String periodicUnit = insureProcessHandler.payMent(coefficentVOs); + //犹豫期截止时间、等待期截止时间、保障截止时间 + WarrantyTimeVO warrantyTimeVO = insureProcessHandler.timeSetup(doInsureVo,coefficentVOs, insuranceVO); + //是否自动续保 + String autoWarrantyExtension = insureProcessHandler.autoWarrantyExtension(coefficentVOs); + //构建保障合同对象 + return WarrantyVO.builder() + .insuranceId(insuranceVO.getId()) + .insuranceName(insuranceVO.getInsuranceName()) + .insuranceJson(JSONObject.toJSONString(insureProcessVO)) + .warrantyNo(String.valueOf(identifierGenerator.nextId(insureProcessVO))) + .applicantName(applicant.getName()) + .applicantIdentityCard(applicant.getIdentityCard()) + .companyNo(insureProcessVO.getCompanyVO().getCompanyNo()) + .companyName(insureProcessVO.getCompanyVO().getCompanName()) + .safeguardStartTime(warrantyTimeVO.getSafeguardStartTime()) + .safeguardEndTime(warrantyTimeVO.getSafeguardEndTime()) + .premium(doInsureVo.getPrice()) + .premiums(doInsureVo.getPrice().multiply(new BigDecimal(periods))) + .autoWarrantyExtension(autoWarrantyExtension) + .warrantyState(WarrantyConstant.STATE_NOT_PAY) + .underwritingState(WarrantyConstant.UNDERWRITING_STATE_1) + .periods(periods) + .dutyPeriod(0) + .hesitationTime(warrantyTimeVO.getHesitationTime()) + .waitTime(warrantyTimeVO.getWaitTime()) + .grace(insuranceVO.getGrace()) + .graceUnit(insuranceVO.getGraceUnit()) + .revival(insuranceVO.getRevival()) + .revivalUnit(insuranceVO.getRevivalUnit()) + .periodicUnit(periodicUnit) + .customerRelationVOs(Lists.newArrayList(insured)) + .build(); + } + + @Override + public List createWarrantyOrderVO(WarrantyVO warrantyVO) { + List warrantyOrderVOs = Lists.newArrayList(); + //总周期数 + Integer periods = warrantyVO.getPeriods(); + for (int i = 1; i <= periods; i++) { + //构建WarrantyOrderVO + WarrantyOrderVO warrantyOrderVO = WarrantyOrderVO.builder() + .orderNo(String.valueOf(identifierGenerator.nextId(warrantyOrderVOs))) + .warrantyNo(warrantyVO.getWarrantyNo()) + .companyNo(warrantyVO.getCompanyNo()) + .periods(warrantyVO.getPeriods()) + .currentPeriod(i) + .premium(warrantyVO.getPremium()) + .periodicUnit(warrantyVO.getPeriodicUnit()) + .premiums(warrantyVO.getPremiums()) + .orderState(WarrantyOrderConstant.ORDER_STATE_0) + .build(); + //利润分成 + if (i==1){ + InsureProcessVO insureProcessVO = JSONObject.parseObject(warrantyVO.getInsuranceJson(), InsureProcessVO.class); + //有代理人 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getAgentId())){ + BigDecimal individualAgentRate = insureProcessVO.getInsuranceVO().getIndividualAgentRate(); + warrantyOrderVO.setAgentFee(warrantyVO.getPremium().multiply(individualAgentRate).divide(new BigDecimal(100))); + BigDecimal platformAgentRate = insureProcessVO.getInsuranceVO().getPlatformAgentRate(); + warrantyOrderVO.setPlatformFee(warrantyVO.getPremium().multiply(platformAgentRate).divide(new BigDecimal(100))); + //无代理人 + }else { + warrantyOrderVO.setAgentFee(BigDecimal.ZERO); + BigDecimal individualAgentRate = insureProcessVO.getInsuranceVO().getIndividualAgentRate(); + BigDecimal platformAgentRate = insureProcessVO.getInsuranceVO().getPlatformAgentRate().add(individualAgentRate); + warrantyOrderVO.setPlatformFee(warrantyVO.getPremium().multiply(platformAgentRate).divide(new BigDecimal(100))); + } + }else { + warrantyOrderVO.setAgentFee(BigDecimal.ZERO); + warrantyOrderVO.setPlatformFee(BigDecimal.ZERO); + } + LocalDateTime now = LocalDateTime.now(); + if (periods!=1){ + //计划执行时间 + LocalDateTime scheduleTime = null; + if (i!=1){ + if (now.getDayOfMonth()<=10){ + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 5, 0, 0); + }else if(now.getDayOfMonth()<=20){ + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 15, 0, 0); + }else { + scheduleTime = LocalDateTime.of(now.getYear(), now.getMonth(), 25, 0, 0); + } + switch (warrantyVO.getPeriodicUnit()){ + //按周 + case InsuranceConstant.WEEK: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i-1, ChronoUnit.WEEKS); + break; + //按月 + case InsuranceConstant.MONTH: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i-1, ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + scheduleTime = LocalDateTimeUtil.offset(scheduleTime, i-1, ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + }else { + scheduleTime = LocalDateTime.now(); + } + warrantyOrderVO.setScheduleTime(scheduleTime); + //宽限期截止时间 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getGraceUnit())){ + LocalDateTime graceTime = null ; + switch (warrantyVO.getGraceUnit()){ + //按周 + case InsuranceConstant.DAY: + graceTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getGrace(), ChronoUnit.WEEKS); + break; + //按月 + case InsuranceConstant.MONTH: + graceTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getGrace(), ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + graceTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getGrace(), ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + warrantyOrderVO.setGraceTime(graceTime); + } + //复效期截止时间 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getRevivalUnit())){ + LocalDateTime revivalTime = null; + switch (warrantyVO.getRevivalUnit()){ + //按周 + case InsuranceConstant.DAY: + revivalTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getRevival(), ChronoUnit.WEEKS); + break; + //按月 + case InsuranceConstant.MONTH: + revivalTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getRevival(), ChronoUnit.MONTHS); + break; + //按年 + case InsuranceConstant.YEAR: + revivalTime = LocalDateTimeUtil.offset(scheduleTime, warrantyVO.getRevival(), ChronoUnit.YEARS); + break; + default: + throw new RuntimeException("周期单位不符合"); + } + warrantyOrderVO.setRevivalTime(revivalTime); + } + }else { + warrantyOrderVO.setScheduleTime(now); + } + warrantyOrderVO.setApplicantName(warrantyVO.getApplicantName()); + warrantyOrderVO.setApplicantIdentityCard(warrantyVO.getApplicantIdentityCard()); + warrantyOrderVOs.add(warrantyOrderVO); + } + return warrantyOrderVOs; + } + + @Override + public String doPremium(DoInsureVo doInsureVo) { + //判断个险类 + if (doInsureVo.getCustomerRelationIds().size()>1){ + throw new RuntimeException("不支持团险"); + } + //个险类:不支持指定生效期 + if (!EmptyUtil.isNullOrEmpty(doInsureVo.getSafeguardStartTime())){ + throw new RuntimeException("不支持指定生效期"); + } + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //被投保人信息 + CustomerRelationVO insured = insureProcessHandler.buildInsured(doInsureVo.getCustomerRelationIds().get(0)); + //检测投保年龄 + Boolean flag = insureProcessHandler.checkAge(insuranceVO,insured); + if (!flag){ + return "-1"; + } + //检查系数唯一性 + flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //检测个险型必填系数 + flag = insureProcessHandler.checkSafeguard(coefficentVOs); + if (!flag){ + throw new RuntimeException("保障型保险缺少必填参数!"); + } + //投保年龄系数 + coefficentVOs = insureProcessHandler.ageHandler(coefficentVOs,insuranceVO.getId(),insured); + //保费计算 + return insureProcessHandler.premiumComputeSafeguard(insurancePlanVO,coefficentVOs); + } + + @Override + public EarningVO doEarnings(DoInsureVo doInsureVo) { + return null; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SevereIllnessInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SevereIllnessInsureHandler.java new file mode 100644 index 0000000..b17445b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/SevereIllnessInsureHandler.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.itheima.sfbx.insurance.handler.InsureHandler; +import org.springframework.stereotype.Service; + +/** + * @ClassName SevereIllnessInsureHandler.java + * @Description 重疾类:保险投保、创建订单、保费计算 + */ +@Service("severeIllnessInsureHandler") +public class SevereIllnessInsureHandler extends MedicalInsureHandler implements InsureHandler { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/TravelInsureHandler.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/TravelInsureHandler.java new file mode 100644 index 0000000..f3b41ae --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/handler/impl/TravelInsureHandler.java @@ -0,0 +1,121 @@ +package com.itheima.sfbx.insurance.handler.impl; + +import com.alibaba.fastjson.JSONObject; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @ClassName TravelInsureHandler.java + * @Description 旅游 + */ +@Service("travelInsureHandler") +public class TravelInsureHandler extends SafeguardInsureHandler implements InsureHandler { + + @Override + public WarrantyVO doInsure(DoInsureVo doInsureVo) { + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //投保人信息 + CustomerRelationVO applicant = insureProcessHandler.buildApplicant(); + //系数唯一性检查 + Boolean flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //旅游型保险必填参数检测 + flag = insureProcessHandler.checkTravel(coefficentVOs); + if (!flag){ + throw new RuntimeException("旅游型保险缺少必填参数!"); + } + //多位被投保人信息 + List customerRelationVOs = insureProcessHandler.buildInsureds(doInsureVo.getCustomerRelationIds()); + //投保人数系数 + coefficentVOs = insureProcessHandler.numberOfPeopleHandler(coefficentVOs,insuranceVO.getId(),customerRelationVOs); + //保费计算 + String price = insureProcessHandler.premiumComputeTravel(insurancePlanVO, coefficentVOs); + doInsureVo.setPrice(new BigDecimal(price)); + //总周期计算 + Integer periods = 1; + //犹豫期截止时间、等待期期截止时间、保障截止时间 + WarrantyTimeVO warrantyTimeVO = insureProcessHandler.timeSetup(doInsureVo,coefficentVOs, insuranceVO); + //是否自动续保 + String autoWarrantyExtension = "0"; + //周期单位 + String periodicUnit = ""; + //构建保障合同对象 + return WarrantyVO.builder() + .insuranceId(insuranceVO.getId()) + .insuranceName(insuranceVO.getInsuranceName()) + .insuranceJson(JSONObject.toJSONString(insureProcessVO)) + .warrantyNo(String.valueOf(identifierGenerator.nextId(insureProcessVO))) + .applicantName(applicant.getName()) + .applicantIdentityCard(applicant.getIdentityCard()) + .companyNo(insureProcessVO.getCompanyVO().getCompanyNo()) + .companyName(insureProcessVO.getCompanyVO().getCompanName()) + .safeguardStartTime(warrantyTimeVO.getSafeguardStartTime()) + .safeguardEndTime(warrantyTimeVO.getSafeguardEndTime()) + .premium(doInsureVo.getPrice()) + .premiums(doInsureVo.getPrice()) + .autoWarrantyExtension(autoWarrantyExtension) + .warrantyState(WarrantyConstant.STATE_NOT_PAY) + .underwritingState(WarrantyConstant.UNDERWRITING_STATE_1) + .periods(periods) + .dutyPeriod(0) + .hesitationTime(warrantyTimeVO.getHesitationTime()) + .waitTime(warrantyTimeVO.getWaitTime()) + .grace(insuranceVO.getGrace()) + .graceUnit(insuranceVO.getGraceUnit()) + .revival(insuranceVO.getRevival()) + .revivalUnit(insuranceVO.getRevivalUnit()) + .periodicUnit(periodicUnit) + .customerRelationVOs(customerRelationVOs) + .build(); + } + + @Override + public String doPremium(DoInsureVo doInsureVo) { + //投保对象信息 + InsureProcessVO insureProcessVO = insureProcessHandler.buildInsureProcessVO(doInsureVo.getInsuranceId(), + doInsureVo.getInsurancePlanId(), + doInsureVo.getCompanyNo(), + doInsureVo.getInsuranceCoefficentIds()); + //保险产品 + InsuranceVO insuranceVO = insureProcessVO.getInsuranceVO(); + //保险方案 + InsurancePlanVO insurancePlanVO = insureProcessVO.getInsurancePlanVO(); + //保险系数 + List coefficentVOs = insureProcessVO.getCoefficents(); + //多位被投保人信息 + List customerRelationVOs = insureProcessHandler.buildInsureds(doInsureVo.getCustomerRelationIds()); + //投保人信息 + CustomerRelationVO applicant = insureProcessHandler.buildApplicant(); + //系数唯一性检查 + Boolean flag = insureProcessHandler.checkBaseOnly(coefficentVOs); + if (!flag){ + throw new RuntimeException("相同系数多于2个!"); + } + //团险型保险必填参数检测 + flag = insureProcessHandler.checkTravel(coefficentVOs); + if (!flag){ + throw new RuntimeException("旅游型保险缺少必填参数!"); + } + //投保人数系数 + coefficentVOs = insureProcessHandler.numberOfPeopleHandler(coefficentVOs,insuranceVO.getId(),customerRelationVOs); + //保费计算 + return insureProcessHandler.premiumComputeTravel(insurancePlanVO, coefficentVOs); + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BannerMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BannerMapper.java new file mode 100644 index 0000000..565b184 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BannerMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Banner; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:Mapper接口 + */ +@Mapper +public interface BannerMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BrowsingHistoryMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BrowsingHistoryMapper.java new file mode 100644 index 0000000..d3f70a5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/BrowsingHistoryMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.BrowsingHistory; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:浏览记录Mapper接口 + */ +@Mapper +public interface BrowsingHistoryMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryCoefficentMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryCoefficentMapper.java new file mode 100644 index 0000000..dc3ac12 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryCoefficentMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CategoryCoefficent; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:分类系数项Mapper接口 + */ +@Mapper +public interface CategoryCoefficentMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryConditionMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryConditionMapper.java new file mode 100644 index 0000000..3855e5a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryConditionMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CategoryCondition; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:分类筛选项Mapper接口 + */ +@Mapper +public interface CategoryConditionMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryMapper.java new file mode 100644 index 0000000..5f34548 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategoryMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Category; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险分类Mapper接口 + */ +@Mapper +public interface CategoryMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategorySafeguardMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategorySafeguardMapper.java new file mode 100644 index 0000000..9ef3d2a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CategorySafeguardMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CategorySafeguard; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:分类保障项Mapper接口 + */ +@Mapper +public interface CategorySafeguardMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CoefficentMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CoefficentMapper.java new file mode 100644 index 0000000..9d6f556 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CoefficentMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Coefficent; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:系数项Mapper接口 + */ +@Mapper +public interface CoefficentMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationInsuranceMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationInsuranceMapper.java new file mode 100644 index 0000000..084a4c9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationInsuranceMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CombinationInsurance; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:组合保险Mapper接口 + */ +@Mapper +public interface CombinationInsuranceMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationMapper.java new file mode 100644 index 0000000..0f4b6a3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CombinationMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Combination; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:组合方案Mapper接口 + */ +@Mapper +public interface CombinationMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/ConditionMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/ConditionMapper.java new file mode 100644 index 0000000..8048ce6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/ConditionMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Condition; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:筛选项Mapper接口 + */ +@Mapper +public interface ConditionMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerCardMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerCardMapper.java new file mode 100644 index 0000000..54c3446 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerCardMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CustomerCard; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:绑卡信息Mapper接口 + */ +@Mapper +public interface CustomerCardMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerInfoMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerInfoMapper.java new file mode 100644 index 0000000..319aeba --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerInfoMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CustomerInfo; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:客户信息表Mapper接口 + */ +@Mapper +public interface CustomerInfoMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerRelationMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerRelationMapper.java new file mode 100644 index 0000000..b05726b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/CustomerRelationMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.CustomerRelation; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:客户关系表Mapper接口 + */ +@Mapper +public interface CustomerRelationMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/HealthAssessmentMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/HealthAssessmentMapper.java new file mode 100644 index 0000000..bbc49b0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/HealthAssessmentMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.HealthAssessment; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:评估类目Mapper接口 + */ +@Mapper +public interface HealthAssessmentMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveDetailMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveDetailMapper.java new file mode 100644 index 0000000..46ae474 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveDetailMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceApproveDetail; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保批信息Mapper接口 + */ +@Mapper +public interface InsuranceApproveDetailMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveMapper.java new file mode 100644 index 0000000..032fbc3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceApproveMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceApprove; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保批信息Mapper接口 + */ +@Mapper +public interface InsuranceApproveMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceCoefficentMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceCoefficentMapper.java new file mode 100644 index 0000000..9eaee45 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceCoefficentMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceCoefficent; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险系数项Mapper接口 + */ +@Mapper +public interface InsuranceCoefficentMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceConditionMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceConditionMapper.java new file mode 100644 index 0000000..333200f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceConditionMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceCondition; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险筛选项Mapper接口 + */ +@Mapper +public interface InsuranceConditionMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceMapper.java new file mode 100644 index 0000000..414c630 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Insurance; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险产品Mapper接口 + */ +@Mapper +public interface InsuranceMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsurancePlanMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsurancePlanMapper.java new file mode 100644 index 0000000..f3151f0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsurancePlanMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsurancePlan; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险方案Mapper接口 + */ +@Mapper +public interface InsurancePlanMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceRuleMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceRuleMapper.java new file mode 100644 index 0000000..539ca38 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceRuleMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceRule; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保险规则Mapper接口 + */ +@Mapper +public interface InsuranceRuleMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceSievingMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceSievingMapper.java new file mode 100644 index 0000000..8770f3a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceSievingMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceSieving; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:初筛结果Mapper接口 + */ +@Mapper +public interface InsuranceSievingMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceTopMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceTopMapper.java new file mode 100644 index 0000000..751e708 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/InsuranceTopMapper.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.InsuranceTop; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @Description:人气保险Mapper接口 + */ +@Mapper +public interface InsuranceTopMapper extends BaseMapper { + + + /** + * SELECT top.* FROM `tab_insurance_top` top LEFT JOIN `tab_insurance` insure ON insure.id = top.`insurance_id` WHERE insure.`data_state` = 0 AND top.`create_time`>= DATE_SUB(CURDATE(), INTERVAL 30 DAY) ORDER BY top.sales_volume DESC LIMIT 3; + * @param dataState 数据状态 + * @param num 查询条数 + * @param dateLimit 日期范围 + * @return + */ + @Select("SELECT top.* FROM tab_insurance_top top LEFT JOIN tab_insurance insure ON insure.id = top.`insurance_id` WHERE insure.`data_state` = #{dataState} AND top.`create_time`>= DATE_SUB(CURDATE(), INTERVAL ${dateLimit} DAY) ORDER BY top.sales_volume DESC LIMIT ${num}") + List findTopInsurance(@Param("dataState")String dataState, + @Param("num") Integer num, + @Param("dateLimit")Integer dateLimit); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanEarningsMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanEarningsMapper.java new file mode 100644 index 0000000..be4a241 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanEarningsMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.PlanEarnings; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:方案给付Mapper接口 + */ +@Mapper +public interface PlanEarningsMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanSafeguardMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanSafeguardMapper.java new file mode 100644 index 0000000..31cebff --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/PlanSafeguardMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.PlanSafeguard; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:方案保障项Mapper接口 + */ +@Mapper +public interface PlanSafeguardMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskAnalysisMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskAnalysisMapper.java new file mode 100644 index 0000000..67c7d65 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskAnalysisMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.RiskAnalysis; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:风险类目Mapper接口 + */ +@Mapper +public interface RiskAnalysisMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskMapper.java new file mode 100644 index 0000000..7bb2277 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/RiskMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Risk; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:风险表Mapper接口 + */ +@Mapper +public interface RiskMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SafeguardMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SafeguardMapper.java new file mode 100644 index 0000000..0da5278 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SafeguardMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.Safeguard; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:保障项Mapper接口 + */ +@Mapper +public interface SafeguardMapper extends BaseMapper{ + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SaleTopInsuranceMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SaleTopInsuranceMapper.java new file mode 100644 index 0000000..11c41a6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SaleTopInsuranceMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.SaleTopInsurance; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:Mapper接口 + */ +@Mapper +public interface SaleTopInsuranceMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SearchRecordMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SearchRecordMapper.java new file mode 100644 index 0000000..5eec14b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SearchRecordMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.SearchRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:搜索记录Mapper接口 + */ +@Mapper +public interface SearchRecordMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SelfSelectionMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SelfSelectionMapper.java new file mode 100644 index 0000000..db5363a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SelfSelectionMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.SelfSelection; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:自选保险Mapper接口 + */ +@Mapper +public interface SelfSelectionMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickMapper.java new file mode 100644 index 0000000..f65feb6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickMapper.java @@ -0,0 +1,18 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.dto.SickVO; +import com.itheima.sfbx.insurance.pojo.Sick; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @Description:疾病表Mapper接口 + */ +@Mapper +public interface SickMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickSearchRecordMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickSearchRecordMapper.java new file mode 100644 index 0000000..9b97cb1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/SickSearchRecordMapper.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.dto.SickVO; +import com.itheima.sfbx.insurance.pojo.SickSearchRecord; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @Description:疾病搜索记录Mapper接口 + */ +@Mapper +public interface SickSearchRecordMapper extends BaseMapper { + + @Select("SELECT ts.*" + + "FROM (" + + " SELECT DISTINCT content" + + " FROM tab_sick_search_record" + + " WHERE create_time >= #{begin} AND create_time <= #{end}" + + " GROUP BY content" + + " ORDER BY COUNT(content) DESC" + + " LIMIT 10" + + ") AS top_content " + + "JOIN tab_sick AS ts ON top_content.content = ts.sick_key") + List findSearchList(@Param("begin") String begin,@Param("end") String end); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyEarningsOrderMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyEarningsOrderMapper.java new file mode 100644 index 0000000..5a177c8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyEarningsOrderMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WarrantyEarningsOrder; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:给付计划订单Mapper接口 + */ +@Mapper +public interface WarrantyEarningsOrderMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyInsuredMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyInsuredMapper.java new file mode 100644 index 0000000..66106c9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyInsuredMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:合同被保人Mapper接口 + */ +@Mapper +public interface WarrantyInsuredMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyMapper.java new file mode 100644 index 0000000..b49022f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyMapper.java @@ -0,0 +1,36 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.dto.HomeSafeguardDTO; +import com.itheima.sfbx.insurance.pojo.Warranty; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @Description:合同信息Mapper接口 + */ +@Mapper +public interface WarrantyMapper extends BaseMapper { + + + @Select("SELECT " + + " war.warranty_no AS warrantyNo," + + " warIn.insured_identity_card AS idCard," + + " insu.id AS insuranceId," + + " insu.check_rule AS checkRule" + + " FROM" + + " tab_warranty_insured warIn" + + " LEFT JOIN tab_warranty war" + + " ON warIn.warranty_no = war.warranty_no" + + " LEFT JOIN tab_insurance insu " + + " ON insu.id = war.insurance_id" + + " WHERE warIn.insured_identity_card IN" + + " (${idCardList}) "+ + " AND war.data_state = #{dataState}" + + " AND war.warranty_state = #{warrantyState}") + List findHomeSafeInfo(@Param("idCardList") String idCard, @Param("dataState") String dataState, @Param("warrantyState") String warrantyState); + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyOrderMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyOrderMapper.java new file mode 100644 index 0000000..c9cdbfc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyOrderMapper.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.insurance.pojo.WarrantyOrder; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; + +import java.util.List; + +/** + * @Description:合同扣款计划Mapper接口 + */ +@Mapper +public interface WarrantyOrderMapper extends BaseMapper { + + /** + * 统计分析:统计昨日保费及保单数量 + * @param begin + * @param end + * @return + */ + @Select("SELECT IFNULL(SUM(premium),0) AS money,COUNT(DISTINCT(warranty_no)) AS insurance_nums FROM tab_warranty_order WHERE create_time >= #{begin} AND create_time <= #{end} AND data_state IN (1,4) AND data_state = 0") + AnalysisCustomerInsuranceDTO analysisInsurance(@Param("begin") String begin,@Param("end") String end); + + /** + * 统计分析:统计保险 + * @param begin + * @param end + * @return + */ + @Select("SELECT " + + " IFNULL(SUM(CASE WHEN SUBSTR(applicant_identity_card, 17, 1) % 2 = 0 THEN premiums ELSE 0 END), 0) AS sexManNums," + + " IFNULL(SUM(CASE WHEN SUBSTR(applicant_identity_card, 17, 1) % 2 = 1 THEN premiums ELSE 0 END), 0) AS sexWomanNums " + + "FROM " + + " `tab_warranty`" + + " WHERE " + + " `create_time` >= #{begin} " + + " AND " + + " `create_time` <= #{end} " + + " AND " + + " data_state = 0" + + " AND " + + " warranty_state IN (0,1,2)") + AnalysisCustomerSexDTO analysisWarrantySex(@Param("begin") String begin,@Param("end") String end); + + @Select("SELECT \n" + + " insure.`check_rule` AS insuranceTypeId,\n" + + " COUNT(DISTINCT(warr.warranty_no)) AS insuranceNums\n" + + "FROM\n" + + " `tab_warranty_order` warrOrder \n" + + " LEFT JOIN `tab_warranty` warr \n" + + " ON warrOrder.`warranty_no` = warr.`warranty_no`\n" + + " LEFT JOIN `tab_insurance` insure \n" + + " ON insure.id = warr.`insurance_id`\n" + + " WHERE \n" + + " warrOrder.`data_state` = 0\n" + + " AND\n" + + " warr.`warranty_state` != 0\n" + + " AND\n" + + " warr.create_time BETWEEN #{begin} AND #{end}\n" + + " GROUP BY insure.`check_rule`") + List analysisCustomerInsuranceType(@Param("begin") String begin,@Param("end") String end); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyRenewalMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyRenewalMapper.java new file mode 100644 index 0000000..24d7689 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyRenewalMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WarrantyRenewal; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:合同续期Mapper接口 + */ +@Mapper +public interface WarrantyRenewalMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyVerifyMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyVerifyMapper.java new file mode 100644 index 0000000..d789961 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WarrantyVerifyMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WarrantyVerify; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:合同核保Mapper接口 + */ +@Mapper +public interface WarrantyVerifyMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeFlowNodeMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeFlowNodeMapper.java new file mode 100644 index 0000000..7325ffd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeFlowNodeMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WorryFreeFlowNode; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:省心配流程节点记录Mapper接口 + */ +@Mapper +public interface WorryFreeFlowNodeMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeInsuranceMatchMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeInsuranceMatchMapper.java new file mode 100644 index 0000000..d576ca7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeInsuranceMatchMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WorryFreeInsuranceMatch; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:省心配保险推荐记录Mapper接口 + */ +@Mapper +public interface WorryFreeInsuranceMatchMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeRiskItemMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeRiskItemMapper.java new file mode 100644 index 0000000..e37c4e6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeRiskItemMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WorryFreeRiskItem; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:Mapper接口 + */ +@Mapper +public interface WorryFreeRiskItemMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeSafeguardQuotaMapper.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeSafeguardQuotaMapper.java new file mode 100644 index 0000000..2c964fc --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/mapper/WorryFreeSafeguardQuotaMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.mapper; + +import com.itheima.sfbx.insurance.pojo.WorryFreeSafeguardQuota; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:省心配流程保障配额记录Mapper接口 + */ +@Mapper +public interface WorryFreeSafeguardQuotaMapper extends BaseMapper { + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/matching/SafeguardMatching.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/matching/SafeguardMatching.java new file mode 100644 index 0000000..6a54cf9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/matching/SafeguardMatching.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.insurance.matching; + +/** + * SafeguardMatching + * + * @author: wgl + * @describe: 保障项匹配 + * @date: 2022/12/28 10:10 + */ +public class SafeguardMatching { + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Banner.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Banner.java new file mode 100644 index 0000000..47a81c9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Banner.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_banner") +@ApiModel(value="Banner对象", description="") +public class Banner extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Banner(String bannerType,Long id,String dataState,Integer sortNo,String url){ + super(id, dataState); + this.sortNo=sortNo; + this.url=url; + this.bannerType=bannerType; + } + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "调整路径") + private String url; + + @ApiModelProperty(value = "导航类型(0首页 1推荐)") + private String bannerType; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/BrowsingHistory.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/BrowsingHistory.java new file mode 100644 index 0000000..06dbbd0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/BrowsingHistory.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:浏览记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_browsing_history") +@ApiModel(value="BrowsingHistory对象", description="浏览记录") +public class BrowsingHistory extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public BrowsingHistory(Long id,String dataState,Long insuranceId,Integer sortNo){ + super(id, dataState); + this.insuranceId=insuranceId; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险ID") + private Long insuranceId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Category.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Category.java new file mode 100644 index 0000000..9ec5ef1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Category.java @@ -0,0 +1,69 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保险分类 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_category") +@ApiModel(value="Category对象", description="保险分类") +public class Category extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Category(Long id,String dataState,String parentCategoryNo,String categoryNo,String categoryName,String icon,String leafNode,String showIndex,String categoryType,Integer sortNo,String remake,String checkRule){ + super(id, dataState); + this.parentCategoryNo=parentCategoryNo; + this.categoryNo=categoryNo; + this.categoryName=categoryName; + this.icon=icon; + this.leafNode=leafNode; + this.showIndex=showIndex; + this.categoryType=categoryType; + this.sortNo=sortNo; + this.remake=remake; + this.checkRule=checkRule; + } + + @ApiModelProperty(value = "父分类编号") + private String parentCategoryNo; + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "图标") + private String icon; + + @ApiModelProperty(value = "是否叶子节点(0是 否1)") + private String leafNode; + + @ApiModelProperty(value = "是否显示在首页(0是 否1)") + private String showIndex; + + @ApiModelProperty(value = "分类类型:0推荐分类 1产品分类 ") + private String categoryType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "分类补充说明") + private String remake; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿") + private String checkRule; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCoefficent.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCoefficent.java new file mode 100644 index 0000000..59b17d8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCoefficent.java @@ -0,0 +1,49 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:分类系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_category_coefficent") +@ApiModel(value="CategoryCoefficent对象", description="分类系数项") +public class CategoryCoefficent extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CategoryCoefficent(String coefficentKeyNamem,Long id,String dataState,String categoryNo,String coefficentKey,Integer sortNo,String remake){ + super(id, dataState); + this.categoryNo=categoryNo; + this.coefficentKey=coefficentKey; + this.coefficentKeyName = coefficentKeyName; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "系数项key") + private String coefficentKey; + + @ApiModelProperty(value = "系数项名称:保障年限") + private String coefficentKeyName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCondition.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCondition.java new file mode 100644 index 0000000..01f67b0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategoryCondition.java @@ -0,0 +1,48 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:分类筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_category_condition") +@ApiModel(value="CategoryCondition对象", description="分类筛选项") +public class CategoryCondition extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CategoryCondition(String conditionKeyName,Long id,String dataState,String categoryNo,String conditionKey,Integer sortNo,String remake){ + super(id, dataState); + this.categoryNo=categoryNo; + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategorySafeguard.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategorySafeguard.java new file mode 100644 index 0000000..eef0746 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CategorySafeguard.java @@ -0,0 +1,49 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:分类保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_category_safeguard") +@ApiModel(value="CategorySafeguard对象", description="分类保障项") +public class CategorySafeguard extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CategorySafeguard(String safeguardKeyName,Long id,String dataState,String categoryNo,String safeguardKey,Integer sortNo,String remake){ + super(id, dataState); + this.categoryNo=categoryNo; + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "条例维度") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "补充说明") + private String remake; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Coefficent.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Coefficent.java new file mode 100644 index 0000000..aa2bc8c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Coefficent.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_coefficent") +@ApiModel(value="Coefficent对象", description="系数项") +public class Coefficent extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Coefficent(String coefficentType,Long id,String dataState,String coefficentKey,String coefficentKeyName,String coefficentVal,Integer sortNo,String remake){ + super(id, dataState); + this.coefficentKey=coefficentKey; + this.coefficentKeyName=coefficentKeyName; + this.coefficentVal=coefficentVal; + this.sortNo=sortNo; + this.remake=remake; + this.coefficentType=coefficentType; + } + + @ApiModelProperty(value = "系数项key:bznx") + private String coefficentKey; + + @ApiModelProperty(value = "系数项名称:保障年限") + private String coefficentKeyName; + + @ApiModelProperty(value = "系数项值") + private String coefficentVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + @ApiModelProperty(value = "系数项类型:0、选项系数1、范围类型") + private String coefficentType; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Combination.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Combination.java new file mode 100644 index 0000000..f2effcb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Combination.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:组合方案 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_combination") +@ApiModel(value="Combination对象", description="组合方案") +public class Combination extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Combination(Long id,String dataState,String combinationName,String riskAnalysis,String riskScenario){ + super(id, dataState); + this.combinationName=combinationName; + this.riskAnalysis=riskAnalysis; + this.riskScenario=riskScenario; + } + + @ApiModelProperty(value = "组合名称") + private String combinationName; + + @ApiModelProperty(value = "风险分析") + private String riskAnalysis; + + @ApiModelProperty(value = "主要分析场景json") + private String riskScenario; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CombinationInsurance.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CombinationInsurance.java new file mode 100644 index 0000000..59b8642 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CombinationInsurance.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:组合保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_combination_insurance") +@ApiModel(value="CombinationInsurance对象", description="组合保险") +public class CombinationInsurance extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CombinationInsurance(Long id,String dataState,Long combinationId,Long insuranceId,String suggest,String thinking,String priority){ + super(id, dataState); + this.combinationId=combinationId; + this.insuranceId=insuranceId; + this.suggest=suggest; + this.thinking=thinking; + this.priority=priority; + } + + @ApiModelProperty(value = "保险组合ID") + private Long combinationId; + + @ApiModelProperty(value = "保险ID") + private Long insuranceId; + + @ApiModelProperty(value = "建议") + private String suggest; + + @ApiModelProperty(value = "配置思路") + private String thinking; + + @ApiModelProperty(value = "优先级") + private String priority; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Condition.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Condition.java new file mode 100644 index 0000000..017003d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Condition.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_condition") +@ApiModel(value="Condition对象", description="筛选项") +public class Condition extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Condition(Long id,String dataState,String conditionKey,String conditionKeyName,String conditionVal,Integer sortNo,String remake){ + super(id, dataState); + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.conditionVal=conditionVal; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; + + @ApiModelProperty(value = "条件项值") + private String conditionVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerCard.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerCard.java new file mode 100644 index 0000000..7518887 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerCard.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:绑卡信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_customer_card") +@ApiModel(value="CustomerCard对象", description="绑卡信息") +public class CustomerCard extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CustomerCard(Long id,String dataState,String customerId,String bankName,String bankAddress,String bankCardNo,String isDefault,String bankReservedPhoneNum){ + super(id, dataState); + this.customerId=customerId; + this.bankName=bankName; + this.bankAddress=bankAddress; + this.bankCardNo=bankCardNo; + this.isDefault=isDefault; + this.bankReservedPhoneNum = bankReservedPhoneNum; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "银行名称") + private String bankName; + + @ApiModelProperty(value = "开户行地址") + private String bankAddress; + + @ApiModelProperty(value = "银行卡号") + private String bankCardNo; + + @ApiModelProperty(value = "是否默认(0是 1否)") + private String isDefault; + + @ApiModelProperty(value = "银行预留手机号") + private String bankReservedPhoneNum; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerInfo.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerInfo.java new file mode 100644 index 0000000..d561743 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerInfo.java @@ -0,0 +1,62 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * @Description:客户信息表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_customer_info") +@ApiModel(value="CustomerInfo对象", description="客户信息表") +public class CustomerInfo extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CustomerInfo(String identityCard,Long id,String dataState,String customerId,String remark,String cityName,BigDecimal income,BigDecimal liabilities,String realNameAuthentication,String bindingCard){ + super(id, dataState); + this.customerId=customerId; + this.remark=remark; + this.cityName=cityName; + this.income=income; + this.liabilities=liabilities; + this.realNameAuthentication=realNameAuthentication; + this.bindingCard=bindingCard; + this.identityCard = identityCard; + } + + @ApiModelProperty(value = "系统账号编号") + private String customerId; + + @ApiModelProperty(value = "备注") + private String remark; + + @ApiModelProperty(value = "常驻城市") + private String cityName; + + @ApiModelProperty(value = "收入") + private BigDecimal income; + + @ApiModelProperty(value = "负债") + private BigDecimal liabilities; + + @ApiModelProperty(value = "实名认证(0是 1否)") + private String realNameAuthentication; + + @ApiModelProperty(value = "绑卡(0是 1否)") + private String bindingCard; + + @ApiModelProperty(value = "身份证号码") + private String identityCard; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerRelation.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerRelation.java new file mode 100644 index 0000000..f20a08f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/CustomerRelation.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * @Description:客户关系表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_customer_relation") +@ApiModel(value="CustomerRelation对象", description="客户关系表") +public class CustomerRelation extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CustomerRelation(Long id,String dataState,String relation,String name,String identityCard,String companyNo,Integer sortNo,String socialSecurity,String customerId){ + super(id, dataState); + this.relation=relation; + this.name=name; + this.identityCard=identityCard; + this.companyNo=companyNo; + this.sortNo=sortNo; + this.socialSecurity=socialSecurity; + this.customerId = customerId; + } + + @ApiModelProperty(value = "关系") + private String relation; + + @ApiModelProperty(value = "名称") + private String name; + + @ApiModelProperty(value = "身份证号码") + private String identityCard; + + @ApiModelProperty(value = "城市编号") + private String cityNo; + + @ApiModelProperty(value = "收入") + private BigDecimal income; + + @ApiModelProperty(value = "公司") + private String companyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "社保状态(0有 1无)") + private String socialSecurity; + + @ApiModelProperty("系统账号编号") + private String customerId; + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/HealthAssessment.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/HealthAssessment.java new file mode 100644 index 0000000..d24de13 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/HealthAssessment.java @@ -0,0 +1,54 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:评估类目 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_health_assessment") +@ApiModel(value="HealthAssessment对象", description="评估类目") +public class HealthAssessment extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public HealthAssessment(Long id,String dataState,Long insuranceId,String assessmentKey,String assessmentKeyName,String assessmentVal,Integer sortNo,String remake){ + super(id, dataState); + this.insuranceId=insuranceId; + this.assessmentKey=assessmentKey; + this.assessmentKeyName=assessmentKeyName; + this.assessmentVal=assessmentVal; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保险产品id") + private Long insuranceId; + + @ApiModelProperty(value = "评估类目key") + private String assessmentKey; + + @ApiModelProperty(value = "评估类目名称") + private String assessmentKeyName; + + @ApiModelProperty(value = "评估类目值") + private String assessmentVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Insurance.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Insurance.java new file mode 100644 index 0000000..8283d73 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Insurance.java @@ -0,0 +1,155 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * @Description:保险产品 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance") +@ApiModel(value="Insurance对象", description="保险产品") +public class Insurance extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Insurance(BigDecimal operatingRate, BigDecimal individualAgentRate, BigDecimal platformAgentRate, String goldSelection, String carefree, Long id, String dataState, String publishNumber, Long categoryNo, Long recommendCategoryNo, String insuranceName, String insuranceLabel, String showIndex, String labelsJson, String remakeJson, Long timeStart, String timeStartUnit, Long timeEnd, String timeEndUnit, String relation, Integer sortNo, String multiple, Long continuousInsuranceAge, String checkRule, String companyNo, String insuranceState, Integer grace, String graceUnit, Integer revival, String revivalUnit, String comment, String remake, Integer hesitation, Integer waits){ + super(id, dataState); + this.publishNumber=publishNumber; + this.categoryNo=categoryNo; + this.recommendCategoryNo=recommendCategoryNo; + this.insuranceName=insuranceName; + this.goldSelection=goldSelection; + this.carefree=carefree; + this.showIndex=showIndex; + this.labelsJson=labelsJson; + this.remakeJson=remakeJson; + this.timeStart=timeStart; + this.timeStartUnit=timeStartUnit; + this.timeEnd=timeEnd; + this.timeEndUnit=timeEndUnit; + this.relation=relation; + this.sortNo=sortNo; + this.multiple=multiple; + this.continuousInsuranceAge=continuousInsuranceAge; + this.checkRule=checkRule; + this.companyNo=companyNo; + this.insuranceState=insuranceState; + this.grace=grace; + this.graceUnit=graceUnit; + this.revival=revival; + this.revivalUnit=revivalUnit; + this.comment=comment; + this.remake=remake; + this.hesitation=hesitation; + this.waits=waits; + this.operatingRate = operatingRate; + this.individualAgentRate = individualAgentRate; + this.platformAgentRate = platformAgentRate; + } + + @ApiModelProperty(value = "银保监备案号") + private String publishNumber; + + @ApiModelProperty(value = "分类编号") + private Long categoryNo; + + @ApiModelProperty(value = "推荐分类") + private Long recommendCategoryNo; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "金选:0是 1否") + private String goldSelection; + + @ApiModelProperty(value = "安心赔:0是 1否") + private String carefree; + + @ApiModelProperty(value = "首页热点显示(是0 否1)") + private String showIndex; + + @ApiModelProperty(value = "保险标签格式:[{key:200万医疗金,val:指定私立意义}]") + private String labelsJson; + + @ApiModelProperty(value = "补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]") + private String remakeJson; + + @ApiModelProperty(value = "可购买起始点") + private Long timeStart; + + @ApiModelProperty(value = "可购买起始点单位:天、年") + private String timeStartUnit; + + @ApiModelProperty(value = "可购买结束点") + private Long timeEnd; + + @ApiModelProperty(value = "可购买结束点单位:天、年") + private String timeEndUnit; + + @ApiModelProperty(value = "可投保关系:self,children:spouse,parents") + private String relation; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "团个险(0团 1个)") + private String multiple; + + @ApiModelProperty(value = "连续投保年龄") + private Long continuousInsuranceAge; + + @ApiModelProperty(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿") + private String checkRule; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "保险状态(上架0 下架1)") + private String insuranceState; + + @ApiModelProperty(value = "保单宽限") + private Integer grace; + + @ApiModelProperty(value = "宽限单位") + private String graceUnit; + + @ApiModelProperty(value = "保单复效") + private Integer revival; + + @ApiModelProperty(value = "复效单位") + private String revivalUnit; + + @ApiModelProperty(value = "产品点评") + private String comment; + + @ApiModelProperty(value = "产品描述") + private String remake; + + @ApiModelProperty(value = "犹豫期") + private Integer hesitation; + + @ApiModelProperty(value = "等待期") + private Integer waits; + + @ApiModelProperty(value = "运营费率") + private BigDecimal operatingRate; + + @ApiModelProperty(value = "个人代理费率") + private BigDecimal individualAgentRate; + + @ApiModelProperty(value = "收益年利率") + private BigDecimal platformAgentRate; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApprove.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApprove.java new file mode 100644 index 0000000..832eebb --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApprove.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保批信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_approve") +@ApiModel(value="InsuranceApprove对象", description="保批信息") +public class InsuranceApprove extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceApprove(Long id,String dataState,String companyNo,String warrantyNo,String approveState,Date approveTime,Integer sortNo){ + super(id, dataState); + this.companyNo=companyNo; + this.warrantyNo=warrantyNo; + this.approveState=approveState; + this.approveTime=approveTime; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "公司编号") + private String companyNo; + + @ApiModelProperty(value = "保险合同编号") + private String warrantyNo; + + @ApiModelProperty(value = "批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)") + private String approveState; + + @ApiModelProperty(value = "修改时间") + private Date approveTime; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApproveDetail.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApproveDetail.java new file mode 100644 index 0000000..74238bd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceApproveDetail.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保批信息 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_approve_detail") +@ApiModel(value="InsuranceApproveDetail对象", description="保批信息") +public class InsuranceApproveDetail extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceApproveDetail(Long id,String dataState,Long approveId,String type,String changeFieldKey,String title,String label,String modifyCont,String modifyReason,String approveTime,Integer sortNo){ + super(id, dataState); + this.approveId=approveId; + this.type=type; + this.changeFieldKey=changeFieldKey; + this.title=title; + this.label=label; + this.modifyCont=modifyCont; + this.modifyReason=modifyReason; + this.approveTime=approveTime; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "报批id") + private Long approveId; + + @ApiModelProperty(value = "投保人:0 被保人:1") + private String type; + + @ApiModelProperty(value = "修改字段键") + private String changeFieldKey; + + @ApiModelProperty(value = "修改字段名") + private String title; + + @ApiModelProperty(value = "修改前的内容") + private String label; + + @ApiModelProperty(value = "修改后的内容") + private String modifyCont; + + @ApiModelProperty(value = "原因") + private String modifyReason; + + @ApiModelProperty(value = "修改时间") + private String approveTime; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCoefficent.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCoefficent.java new file mode 100644 index 0000000..49be1b7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCoefficent.java @@ -0,0 +1,70 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保险系数项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_coefficent") +@ApiModel(value="InsuranceCoefficent对象", description="保险系数项") +public class InsuranceCoefficent extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceCoefficent(String isShow,String coefficentType, Long id, String dataState, Long insuranceId, String coefficentKey, String coefficentKeyName, String coefficentValue, BigDecimal score, String isDefault, Integer sortNo){ + super(id, dataState); + this.insuranceId=insuranceId; + this.coefficentKey=coefficentKey; + this.coefficentKeyName=coefficentKeyName; + this.coefficentValue=coefficentValue; + this.coefficentType=coefficentType; + this.score=score; + this.isDefault=isDefault; + this.isShow=isShow; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险产品id") + private Long insuranceId; + + @ApiModelProperty(value = "系数项key:bznx") + private String coefficentKey; + + @ApiModelProperty(value = "系数项名称:保障年限") + private String coefficentKeyName; + + @ApiModelProperty(value = "系数项value") + private String coefficentValue; + + @ApiModelProperty(value = "系数项类型:0、选项系数1、范围系数 2、年限系数") + private String coefficentType; + + @ApiModelProperty(value = "系数项别名") + private String coefficentAsName; + + @ApiModelProperty(value = "系数项试算值") + private BigDecimal score; + + @ApiModelProperty(value = "是否默认") + private String isDefault; + + @ApiModelProperty(value = "是否展示") + private String isShow; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCondition.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCondition.java new file mode 100644 index 0000000..14993f7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceCondition.java @@ -0,0 +1,54 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保险筛选项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_condition") +@ApiModel(value="InsuranceCondition对象", description="保险筛选项") +public class InsuranceCondition extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceCondition(Long id,String dataState,String insuranceId,String conditionKey,String conditionKeyName,String conditionVal,Integer sortNo,String remake){ + super(id, dataState); + this.insuranceId=insuranceId; + this.conditionKey=conditionKey; + this.conditionKeyName=conditionKeyName; + this.conditionVal=conditionVal; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保险产品ID") + private String insuranceId; + + @ApiModelProperty(value = "条件项key") + private String conditionKey; + + @ApiModelProperty(value = "条件项名称") + private String conditionKeyName; + + @ApiModelProperty(value = "条件项值") + private String conditionVal; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsurancePlan.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsurancePlan.java new file mode 100644 index 0000000..80d57ed --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsurancePlan.java @@ -0,0 +1,75 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保险方案 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_plan") +@ApiModel(value="InsurancePlan对象", description="保险方案") +public class InsurancePlan extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsurancePlan(Long planNo,BigDecimal maxPriceYear,BigDecimal maxPriceMonth,BigDecimal maxPriceWeek,BigDecimal maxPriceAllIn,Long id,String dataState,Long insuranceId,String palnName,String palnRemake,BigDecimal price,String priceUnit,Integer sortNo){ + super(id, dataState); + this.insuranceId=insuranceId; + this.palnName=palnName; + this.palnRemake=palnRemake; + this.price=price; + this.priceUnit=priceUnit; + this.sortNo=sortNo; + this.maxPriceYear =maxPriceYear; + this.maxPriceMonth =maxPriceMonth; + this.maxPriceWeek =maxPriceWeek; + this.maxPriceAllIn=maxPriceAllIn; + this.planNo=planNo; + } + + @ApiModelProperty(value = "保险商品id") + private Long insuranceId; + + @ApiModelProperty(value = "保险方案名称") + private String palnName; + + @ApiModelProperty(value = "保险方案编号") + private Long planNo; + + @ApiModelProperty(value = "保险方案名称补充") + private String palnRemake; + + @ApiModelProperty(value = "默认定价") + private BigDecimal price; + + @ApiModelProperty(value = "默认定价单位:y/d,y/m,y/y") + private String priceUnit; + + @ApiModelProperty(value = "每年最高") + private BigDecimal maxPriceYear; + + @ApiModelProperty(value = "每月最高") + private BigDecimal maxPriceMonth; + + @ApiModelProperty(value = "每周最高") + private BigDecimal maxPriceWeek; + + @ApiModelProperty(value = "一次性投入最高") + private BigDecimal maxPriceAllIn; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceRule.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceRule.java new file mode 100644 index 0000000..bda267e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceRule.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保险规则 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_rule") +@ApiModel(value="InsuranceRule对象", description="保险规则") +public class InsuranceRule extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceRule(Long id,String dataState,String rulesId,String insuranceId,String rulesType){ + super(id, dataState); + this.rulesId=rulesId; + this.insuranceId=insuranceId; + this.rulesType=rulesType; + } + + @ApiModelProperty(value = "规则ID") + private String rulesId; + + @ApiModelProperty(value = "保险ID") + private String insuranceId; + + @ApiModelProperty(value = "规则类型") + private String rulesType; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceSieving.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceSieving.java new file mode 100644 index 0000000..49f9064 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceSieving.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:初筛结果 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_sieving") +@ApiModel(value="InsuranceSieving对象", description="初筛结果") +public class InsuranceSieving extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceSieving(Long id,String dataState,String name,String sicksName,String sicksKey,Boolean result,Integer sortNo){ + super(id, dataState); + this.name=name; + this.sicksName=sicksName; + this.sicksKey=sicksKey; + this.result=result; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "姓名") + private String name; + + @ApiModelProperty(value = "疾病列表") + private String sicksName; + + @ApiModelProperty(value = "疾病key列表") + private String sicksKey; + + @ApiModelProperty(value = "初筛结果") + private Boolean result; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceTop.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceTop.java new file mode 100644 index 0000000..74da381 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/InsuranceTop.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:人气保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_insurance_top") +@ApiModel(value="InsuranceTop对象", description="人气保险") +public class InsuranceTop extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public InsuranceTop(Long id,String dataState,Long insuranceId,String insuranceName,String categoryNo,String categoryType,String categoryName,Long palnId,BigDecimal price,String priceUnit,Long salesVolume){ + super(id, dataState); + this.insuranceId=insuranceId; + this.insuranceName=insuranceName; + this.categoryNo=categoryNo; + this.categoryType=categoryType; + this.categoryName=categoryName; + this.palnId=palnId; + this.price=price; + this.priceUnit=priceUnit; + this.salesVolume=salesVolume; + } + + @ApiModelProperty(value = "保险ID") + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "分类编号") + private String categoryNo; + + @ApiModelProperty(value = "保障类型: 1推荐分类 2产品分类 ") + private String categoryType; + + @ApiModelProperty(value = "分类名称") + private String categoryName; + + @ApiModelProperty(value = "方案ID") + private Long palnId; + + @ApiModelProperty(value = "默认定价") + private BigDecimal price; + + @ApiModelProperty(value = "默认定价单位:y/d,y/m,y/y") + private String priceUnit; + + @ApiModelProperty(value = "销量") + private Long salesVolume; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanEarnings.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanEarnings.java new file mode 100644 index 0000000..fb90c7b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanEarnings.java @@ -0,0 +1,47 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:方案给付 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_plan_earnings") +@ApiModel(value="PlanEarnings对象", description="方案给付") +public class PlanEarnings extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public PlanEarnings(Long id,String dataState,Long palnId,String earningsType,Integer periods,String earningsJson){ + super(id, dataState); + this.palnId=palnId; + this.earningsType=earningsType; + this.periods=periods; + this.earningsJson=earningsJson; + } + + @ApiModelProperty(value = "保险方案id") + private Long palnId; + + @ApiModelProperty(value = "给付类型:0终身领取 1固定领取") + private String earningsType; + + @ApiModelProperty(value = "周期数") + private Integer periods; + + @ApiModelProperty(value = "领取计划") + private String earningsJson; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanSafeguard.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanSafeguard.java new file mode 100644 index 0000000..d2ba346 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/PlanSafeguard.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:方案保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_plan_safeguard") +@ApiModel(value="PlanSafeguard对象", description="方案保障项") +public class PlanSafeguard extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public PlanSafeguard(Long id,String dataState,Long planId,String safeguardKey,String safeguardKeyName,String safeguardValue,String safeguardAsName,String safeguardType,String position,String remake,Integer sortNo){ + super(id, dataState); + this.planId=planId; + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.safeguardValue=safeguardValue; + this.safeguardAsName=safeguardAsName; + this.safeguardType=safeguardType; + this.position=position; + this.remake=remake; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险方案ID") + private Long planId; + + @ApiModelProperty(value = "保障项key:mzyl") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "保障项值") + private String safeguardValue; + + @ApiModelProperty(value = "保障项别名:一般门诊费用") + private String safeguardAsName; + + @ApiModelProperty(value = "保障类型(0保障规则 1 保障信息)") + private String safeguardType; + + @ApiModelProperty(value = "显示位置:0 列表页 1 详情页") + private String position; + + @ApiModelProperty(value = "保障内容补充说明") + private String remake; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Risk.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Risk.java new file mode 100644 index 0000000..f48b125 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Risk.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:风险表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_risk") +@ApiModel(value="Risk对象", description="风险表") +public class Risk extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Risk(Long id,String dataState,String riskTypeKey,String riskTypeName,String riskKey,String riskName,Integer sortNo){ + super(id, dataState); + this.riskTypeKey=riskTypeKey; + this.riskTypeName=riskTypeName; + this.riskKey=riskKey; + this.riskName=riskName; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险项类型key") + private String riskTypeKey; + + @ApiModelProperty(value = "风险项类型name") + private String riskTypeName; + + @ApiModelProperty(value = "风险项key") + private String riskKey; + + @ApiModelProperty(value = "风险项名称") + private String riskName; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/RiskAnalysis.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/RiskAnalysis.java new file mode 100644 index 0000000..22905cd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/RiskAnalysis.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:风险类目 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_risk_analysis") +@ApiModel(value="RiskAnalysis对象", description="风险类目") +public class RiskAnalysis extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public RiskAnalysis(Long id,String dataState,Long insuranceId,String assessmentKey,String assessmentKeyName,String assessmentVal,String assessmentType,Integer sortNo,String remake){ + super(id, dataState); + this.insuranceId=insuranceId; + this.assessmentKey=assessmentKey; + this.assessmentKeyName=assessmentKeyName; + this.assessmentVal=assessmentVal; + this.assessmentType=assessmentType; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保险产品id") + private Long insuranceId; + + @ApiModelProperty(value = "风险项key") + private String assessmentKey; + + @ApiModelProperty(value = "风险项项名称") + private String assessmentKeyName; + + @ApiModelProperty(value = "风险项项值") + private String assessmentVal; + + @ApiModelProperty(value = "风险项类型: 0医疗风险 1重疾风险 2身故风险 3意外风险") + private String assessmentType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Safeguard.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Safeguard.java new file mode 100644 index 0000000..59d6862 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Safeguard.java @@ -0,0 +1,54 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:保障项 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_safeguard") +@ApiModel(value="Safeguard对象", description="保障项") +public class Safeguard extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Safeguard(Long id,String dataState,String safeguardKey,String safeguardKeyName,String safeguardVal,String safeguardType,Integer sortNo,String remake){ + super(id, dataState); + this.safeguardKey=safeguardKey; + this.safeguardKeyName=safeguardKeyName; + this.safeguardVal=safeguardVal; + this.safeguardType=safeguardType; + this.sortNo=sortNo; + this.remake=remake; + } + + @ApiModelProperty(value = "保障项key:mzyl") + private String safeguardKey; + + @ApiModelProperty(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @ApiModelProperty(value = "保障项值") + private String safeguardVal; + + @ApiModelProperty(value = "保障项分类:0保障规则 1保障信息") + private String safeguardType; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SaleTopInsurance.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SaleTopInsurance.java new file mode 100644 index 0000000..370cf94 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SaleTopInsurance.java @@ -0,0 +1,62 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_sale_top_insurance") +@ApiModel(value = "SaleTopInsurance对象", description = "") +public class SaleTopInsurance extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public SaleTopInsurance(Long id, String dataState, String checkRule, Long insuranceId, String insuranceName, String insuranceDetail, String comment, String remake, Long categoryNo, String companyNo) { + super(id, dataState); + this.checkRule = checkRule; + this.insuranceId = insuranceId; + this.insuranceName = insuranceName; + this.insuranceDetail = insuranceDetail; + this.comment = comment; + this.remake = remake; + this.categoryNo = categoryNo; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "保险类型") + private String checkRule; + + @ApiModelProperty(value = "保险id") + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "保险详情") + private String insuranceDetail; + + @ApiModelProperty(value = "产品点评") + private String comment; + + @ApiModelProperty(value = "产品描述") + private String remake; + + @ApiModelProperty(value = "分类编号") + private Long categoryNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SearchRecord.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SearchRecord.java new file mode 100644 index 0000000..2c03b63 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SearchRecord.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:搜索记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_search_record") +@ApiModel(value="SearchRecord对象", description="搜索记录") +public class SearchRecord extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public SearchRecord(Long id,String dataState,String content,Long createBy){ + super(id, dataState); + super.setCreateBy(createBy); + this.content=content; + } + + @ApiModelProperty(value = "搜索内容") + private String content; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SelfSelection.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SelfSelection.java new file mode 100644 index 0000000..98ba3ca --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SelfSelection.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:自选保险 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_self_selection") +@ApiModel(value="SelfSelection对象", description="自选保险") +public class SelfSelection extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public SelfSelection(Long id,String dataState,Long insuranceId,String relation,Integer sortNo){ + super(id, dataState); + this.insuranceId=insuranceId; + this.relation=relation; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "保险ID") + private Long insuranceId; + + @ApiModelProperty(value = "关系") + private String relation; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Sick.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Sick.java new file mode 100644 index 0000000..ffe6b1d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Sick.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:疾病表 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_sick") +@ApiModel(value="Sick对象", description="疾病表") +public class Sick extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Sick(Long id,String dataState,String sickKey,String sickKeyName,String sickVal,String remake,String sickType){ + super(id, dataState); + this.sickKey=sickKey; + this.sickKeyName=sickKeyName; + this.sickVal=sickVal; + this.remake=remake; + this.sickType=sickType; + } + + @ApiModelProperty(value = "疾病Key") + private String sickKey; + + @ApiModelProperty(value = "疾病类型") + private String sickType; + + @ApiModelProperty(value = "咨询问卷Json") + private String question; + + @ApiModelProperty(value = "疾病名称") + private String sickKeyName; + + @ApiModelProperty(value = "疾病项值") + private String sickVal; + + @ApiModelProperty(value = "备注") + private String remake; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SickSearchRecord.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SickSearchRecord.java new file mode 100644 index 0000000..83868b9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/SickSearchRecord.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:疾病搜索记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_sick_search_record") +@ApiModel(value="SickSearchRecord对象", description="疾病搜索记录") +public class SickSearchRecord extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public SickSearchRecord(Long id,String dataState,String content){ + super(id, dataState); + this.content=content; + } + + @ApiModelProperty(value = "搜索内容") + private String content; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Warranty.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Warranty.java new file mode 100644 index 0000000..eb05cf8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/Warranty.java @@ -0,0 +1,165 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDateTime; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:保险合同 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty") +@ApiModel(value="Warranty对象", description="保险合同") +public class Warranty extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Warranty(Long id, String dataState, Long insuranceId, String insuranceName, String insuranceJson, String warrantyNo, String applicantName, String applicantIdentityCard, String companyNo, String companyName, LocalDateTime safeguardStartTime, LocalDateTime safeguardEndTime, BigDecimal premium, BigDecimal premiums, String autoWarrantyExtension, String warrantyState, String underwritingState, Integer periods, Integer dutyPeriod, Integer sortNo, LocalDateTime hesitationTime, LocalDateTime waitTime, Integer grace, String graceUnit, Integer revival, String revivalUnit, String periodicUnit, String agentId, String agentName) { + super(id, dataState); + this.insuranceId = insuranceId; + this.insuranceName = insuranceName; + this.insuranceJson = insuranceJson; + this.warrantyNo = warrantyNo; + this.applicantName = applicantName; + this.applicantIdentityCard = applicantIdentityCard; + this.companyNo = companyNo; + this.companyName = companyName; + this.safeguardStartTime = safeguardStartTime; + this.safeguardEndTime = safeguardEndTime; + this.premium = premium; + this.premiums = premiums; + this.autoWarrantyExtension = autoWarrantyExtension; + this.warrantyState = warrantyState; + this.underwritingState = underwritingState; + this.periods = periods; + this.dutyPeriod = dutyPeriod; + this.sortNo = sortNo; + this.hesitationTime = hesitationTime; + this.waitTime = waitTime; + this.grace = grace; + this.graceUnit = graceUnit; + this.revival = revival; + this.revivalUnit = revivalUnit; + this.periodicUnit = periodicUnit; + this.agentId = agentId; + this.agentName = agentName; + } + + @ApiModelProperty(value = "保险ID") + private Long insuranceId; + + @ApiModelProperty(value = "保险名称") + private String insuranceName; + + @ApiModelProperty(value = "投保详情") + private String insuranceJson; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "企业名称") + private String companyName; + + @ApiModelProperty(value = "保障起始时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保障截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime safeguardEndTime; + + @ApiModelProperty(value = "保费") + private BigDecimal premium; + + @ApiModelProperty(value = "总保费") + private BigDecimal premiums; + + @ApiModelProperty(value = "自动延保(0是 1否)") + private String autoWarrantyExtension; + + @ApiModelProperty(value = "状态(0待付款 1待生效 2保障中 3 逾期中止 4理赔终止 5 复效中止 6 复效终止 6满期终止 7 拒保 8 犹豫期退保 9 协议退保 )") + private String warrantyState; + + @ApiModelProperty(value = "核保状态(0发送失败 1核保中 2核保失败 3核保成功 )") + private String underwritingState; + + @ApiModelProperty(value = "批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)") + private String approveState; + + @ApiModelProperty(value = "总期数") + private Integer periods; + + @ApiModelProperty(value = "已缴纳期数") + private Integer dutyPeriod; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "犹豫期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime hesitationTime; + + @ApiModelProperty(value = "等待期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime waitTime; + + @ApiModelProperty(value = "保单宽限") + private Integer grace; + + @ApiModelProperty(value = "宽限单位") + private String graceUnit; + + @ApiModelProperty(value = "保单复效") + private Integer revival; + + @ApiModelProperty(value = "复效单位") + private String revivalUnit; + + @ApiModelProperty(value = "周期单位") + private String periodicUnit; + + @ApiModelProperty(value = "代理人Id") + private String agentId; + + @ApiModelProperty(value = "代理人姓名") + private String agentName; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyEarningsOrder.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyEarningsOrder.java new file mode 100644 index 0000000..0a9ba2a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyEarningsOrder.java @@ -0,0 +1,88 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDateTime; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:给付计划订单 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty_earnings_order") +@ApiModel(value="WarrantyEarningsOrder对象", description="给付计划订单") +public class WarrantyEarningsOrder extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WarrantyEarningsOrder(Long id,String dataState,String orderNo,BigDecimal premium,String warrantyNo,String currentPeriod,LocalDateTime scheduleTime,LocalDateTime actualTime,String orderState,String applicantName,String applicantIdentityCard,Integer sortNo){ + super(id, dataState); + this.orderNo=orderNo; + this.premium=premium; + this.warrantyNo=warrantyNo; + this.currentPeriod=currentPeriod; + this.scheduleTime=scheduleTime; + this.actualTime=actualTime; + this.orderState=orderState; + this.applicantName=applicantName; + this.applicantIdentityCard=applicantIdentityCard; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "订单编号") + private String orderNo; + + @ApiModelProperty(value = "当期赔付") + private BigDecimal premium; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "当前期数") + private String currentPeriod; + + @ApiModelProperty(value = "计划时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime scheduleTime; + + @ApiModelProperty(value = "实际时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime actualTime; + + @ApiModelProperty(value = "状态(0未赔付 1已赔付 2 断保中止 3断保终止)") + private String orderState; + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyInsured.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyInsured.java new file mode 100644 index 0000000..3f20117 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyInsured.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.itheima.sfbx.framework.commons.utils.CustomerInfoUtil; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.insurance.dto.CustomerCardVO; +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import java.util.List; + +/** + * @Description:合同被保人 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty_insured") +@ApiModel(value="WarrantyInsured对象", description="合同被保人") +public class WarrantyInsured extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WarrantyInsured(String companyNo,Long id,String dataState,String warrantyNo,String insuredName,String insuredIdentityCard){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.insuredName=insuredName; + this.insuredIdentityCard=insuredIdentityCard; + this.companyNo = companyNo; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "被投保人姓名") + private String insuredName; + + @ApiModelProperty(value = "被投保人身份证号码") + private String insuredIdentityCard; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "年龄") + @TableField(exist = false) + private Integer age; + + @ApiModelProperty(value = "出生日期") + @TableField(exist = false) + private String birthday; + + @ApiModelProperty(value = "性别") + @TableField(exist = false) + private String sex; + + public WarrantyInsured(String warrantyNo, String insuredName, String insuredIdentityCard, String companyNo) { + this.warrantyNo = warrantyNo; + this.insuredName = insuredName; + this.insuredIdentityCard = insuredIdentityCard; + this.companyNo = companyNo; + this.sex = CustomerInfoUtil.setSexByIdCard(insuredIdentityCard); + this.age = CustomerInfoUtil.getAgeByIdCard(insuredIdentityCard); + this.birthday = CustomerInfoUtil.getBirthDateByIdCard(insuredIdentityCard); + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyOrder.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyOrder.java new file mode 100644 index 0000000..abd6520 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyOrder.java @@ -0,0 +1,142 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDateTime; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:合同订单 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty_order") +@ApiModel(value="WarrantyOrder对象", description="合同订单") +public class WarrantyOrder extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WarrantyOrder(String agreementNo,String applicantName,String applicantIdentityCard,Long id, String dataState, String orderNo, String warrantyNo, Integer periods, Integer currentPeriod, BigDecimal premium, BigDecimal premiums, String periodicUnit, LocalDateTime scheduleTime, LocalDateTime actualTime, LocalDateTime graceTime, LocalDateTime revivalTime, String orderState, Integer sortNo, String companyNo, String tradingChannel, String agentId, String agentName, BigDecimal agentFee, BigDecimal platformFee) { + super(id, dataState); + this.orderNo = orderNo; + this.warrantyNo = warrantyNo; + this.periods = periods; + this.currentPeriod = currentPeriod; + this.premium = premium; + this.premiums = premiums; + this.periodicUnit = periodicUnit; + this.scheduleTime = scheduleTime; + this.actualTime = actualTime; + this.graceTime = graceTime; + this.revivalTime = revivalTime; + this.orderState = orderState; + this.sortNo = sortNo; + this.companyNo = companyNo; + this.tradingChannel = tradingChannel; + this.agreementNo = agreementNo; + this.agentId = agentId; + this.agentName = agentName; + this.agentFee = agentFee; + this.platformFee = platformFee; + this.applicantName = applicantName; + this.applicantIdentityCard = applicantIdentityCard; + } + + @ApiModelProperty(value = "投保人姓名") + private String applicantName; + + @ApiModelProperty(value = "投保人身份证号码") + private String applicantIdentityCard; + + @ApiModelProperty(value = "订单编号") + private String orderNo; + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "总期数") + private Integer periods; + + @ApiModelProperty(value = "当前期数") + private Integer currentPeriod; + + @ApiModelProperty(value = "期交保费") + private BigDecimal premium; + + @ApiModelProperty(value = "总保费") + private BigDecimal premiums; + + @ApiModelProperty(value = "周期单位") + private String periodicUnit; + + @ApiModelProperty(value = "支付宝签约号:关联支付") + private String agreementNo; + + @ApiModelProperty(value = "计划时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime scheduleTime; + + @ApiModelProperty(value = "实际时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime actualTime; + + @ApiModelProperty(value = "宽限期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime graceTime; + + @ApiModelProperty(value = "复效期截止时间") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime revivalTime; + + @ApiModelProperty(value = "状态(0待付款 1已付款 2逾期 3补缴 4付款失败 5付款中)") + private String orderState; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "支付渠道【支付宝、微信、三方银行】") + private String tradingChannel; + + @ApiModelProperty(value = "代理人Id") + private String agentId; + + @ApiModelProperty(value = "代理人姓名") + private String agentName; + + @ApiModelProperty(value = "代理人费用") + private BigDecimal agentFee; + + @ApiModelProperty(value = "平台代理费用") + private BigDecimal platformFee; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyRenewal.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyRenewal.java new file mode 100644 index 0000000..472b8f8 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyRenewal.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDateTime; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:合同续期 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty_renewal") +@ApiModel(value="WarrantyRenewal对象", description="合同续期") +public class WarrantyRenewal extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WarrantyRenewal(Long id,String dataState,String warrantyNo,Integer sortNo,LocalDateTime safeguardStartTime,LocalDateTime safeguardEndTime,String companyNo){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.sortNo=sortNo; + this.safeguardStartTime=safeguardStartTime; + this.safeguardEndTime=safeguardEndTime; + this.companyNo=companyNo; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "保障起始时间") + private LocalDateTime safeguardStartTime; + + @ApiModelProperty(value = "保障截止时间") + private LocalDateTime safeguardEndTime; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyVerify.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyVerify.java new file mode 100644 index 0000000..4f4eb4d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WarrantyVerify.java @@ -0,0 +1,50 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:合同核保 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_warranty_verify") +@ApiModel(value="WarrantyVerify对象", description="合同核保") +public class WarrantyVerify extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WarrantyVerify(Long id,String dataState,String warrantyNo,String companyNo,Integer sortNo,String verifyCode,String verifyMsg){ + super(id, dataState); + this.warrantyNo=warrantyNo; + this.companyNo=companyNo; + this.sortNo=sortNo; + this.verifyCode=verifyCode; + this.verifyMsg=verifyMsg; + } + + @ApiModelProperty(value = "保单编号") + private String warrantyNo; + + @ApiModelProperty(value = "企业编号") + private String companyNo; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + @ApiModelProperty(value = "核保结果") + private String verifyCode; + + @ApiModelProperty(value = "核保信息") + private String verifyMsg; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeFlowNode.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeFlowNode.java new file mode 100644 index 0000000..77ccc60 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeFlowNode.java @@ -0,0 +1,42 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description:省心配流程节点记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_worry_free_flow_node") +@ApiModel(value="WorryFreeFlowNode对象", description="省心配流程节点记录") +public class WorryFreeFlowNode extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WorryFreeFlowNode(Long id,String dataState,String nodes,Long customerId,Integer sortNo){ + super(id, dataState); + this.nodes=nodes; + this.customerId=customerId; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险项名称列表 json") + private String nodes; + + @ApiModelProperty(value = "用户id") + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeInsuranceMatch.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeInsuranceMatch.java new file mode 100644 index 0000000..eb48f94 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeInsuranceMatch.java @@ -0,0 +1,71 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; + +/** + * @Description:省心配保险推荐记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_worry_free_insurance_match") +@ApiModel(value="WorryFreeInsuranceMatch对象", description="省心配保险推荐记录") +public class WorryFreeInsuranceMatch extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WorryFreeInsuranceMatch(BigDecimal price,Long id,String dataState,String type,String insuranceJson,String insurancePlan,Long amount,String solution,String planSuggest,Long customerId,Integer sortNo,String insuranceId){ + super(id, dataState); + this.type=type; + this.insuranceJson=insuranceJson; + this.insurancePlan=insurancePlan; + this.amount=amount; + this.solution=solution; + this.planSuggest=planSuggest; + this.customerId=customerId; + this.sortNo=sortNo; + this.insuranceId = insuranceId; + this.price = price; + } + + @ApiModelProperty(value = "风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)") + private String type; + + @ApiModelProperty(value = "保费") + private BigDecimal price; + + @ApiModelProperty(value = "保险id") + private String insuranceId; + @ApiModelProperty(value = "保险json") + private String insuranceJson; + + @ApiModelProperty(value = "保险方案") + private String insurancePlan; + + @ApiModelProperty(value = "分配的保额") + private Long amount; + + @ApiModelProperty(value = "解决方案") + private String solution; + + @ApiModelProperty(value = "方案建议") + private String planSuggest; + + @ApiModelProperty(value = "用户id") + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeRiskItem.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeRiskItem.java new file mode 100644 index 0000000..117ea9a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeRiskItem.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + +/** + * @Description: + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_worry_free_risk_item") +@ApiModel(value="WorryFreeRiskItem对象", description="") +public class WorryFreeRiskItem extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WorryFreeRiskItem(Long id,String dataState,String type,String names,Long customerId,Integer sortNo){ + super(id, dataState); + this.type=type; + this.names=names; + this.customerId=customerId; + this.sortNo=sortNo; + } + + @ApiModelProperty(value = "风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)") + private String type; + + @ApiModelProperty(value = "风险项名称列表 json") + private String names; + + @ApiModelProperty(value = "用户id") + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeSafeguardQuota.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeSafeguardQuota.java new file mode 100644 index 0000000..92d1088 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/pojo/WorryFreeSafeguardQuota.java @@ -0,0 +1,63 @@ +package com.itheima.sfbx.insurance.pojo; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + * @Description:省心配流程保障配额记录 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_worry_free_safeguard_quota") +@ApiModel(value = "WorryFreeSafeguardQuota对象", description = "省心配流程保障配额记录") +public class WorryFreeSafeguardQuota extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public WorryFreeSafeguardQuota(Long id, String dataState, String safeguards, Long medicalAmount, Long accidentAmount, Long dieAmount, Long seriousAmount, Long customerId, Integer sortNo) { + super(id, dataState); + this.safeguards = safeguards; + this.medicalAmount = medicalAmount; + this.accidentAmount = accidentAmount; + this.dieAmount = dieAmount; + this.seriousAmount = seriousAmount; + this.customerId = customerId; + this.sortNo = sortNo; + } + + @ApiModelProperty(value = "保障项列表 json") + private String safeguards; + + @ApiModelProperty(value = "医疗配额") + @TableField("medicalAmount") + private Long medicalAmount; + + @ApiModelProperty(value = "意外配额") + @TableField("accidentAmount") + private Long accidentAmount; + + @ApiModelProperty(value = "医疗配额") + @TableField("dieAmount") + private Long dieAmount; + + @ApiModelProperty(value = "重疾配额") + @TableField("seriousAmount") + private Long seriousAmount; + + @ApiModelProperty(value = "用户id") + private Long customerId; + + @ApiModelProperty(value = "排序") + private Integer sortNo; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/AccessRuleDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/AccessRuleDTO.java new file mode 100644 index 0000000..757464e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/AccessRuleDTO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import lombok.Data; + +/** + * AccessRuleDTO + * + * @author: wgl + * @describe: 准入规则DTO对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class AccessRuleDTO { + + /** + * 传入对象 + */ + private DoInsureVo data; + + /** + * 准入结论 + */ + private boolean falg; + + /** + * 额外新增的钱 + */ + private Double addMoney; + + /** + * 判断是否准入通过的方法 + * + * @return + */ + public boolean isAccess() { + return this.falg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ApplicantInfo.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ApplicantInfo.java new file mode 100644 index 0000000..09f2e01 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ApplicantInfo.java @@ -0,0 +1,82 @@ +package com.itheima.sfbx.insurance.rule; + +import cn.hutool.core.util.IdcardUtil; +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * ApplicantInfo + * + * @author: wgl + * @describe: 申请人信息 + * @date: 2022/12/28 10:10 + */ +@Data +public class ApplicantInfo { + + @Label("申请人姓名") + private String name; + + @Label("投保人与被投保人关系") + private String relation; + @Label("身份证号") + private String idCard; + + @Label("年龄") + private int age; + + @Label("收入") + private BigDecimal income; + + @Label("负债") + private BigDecimal liabilities; + + @Label("是否有房") + private boolean hasHouse; + + @Label("是否有车") + private boolean hasCar; + + @Label("声明疾病") + private List sicks; + + @Label("职业") + private String jobNo; + + @Label("常驻城市") + private String cityNo; + + @Label("子女数量") + private int childNum; + + @Label("赡养父母数量") + private int supportingParents; + + @Label("关联风险项") + private List risks; + + /** + * 设置身份证号 + */ + public void setIdCard(String idCard){ + this.idCard = idCard; + setAgeByIdcard(idCard); + } + + /** + * 设置年龄 + */ + public void setAgeByIdcard(String idCardNumber){ + // 获取年龄 + this.age = IdcardUtil.getAgeByIdCard(idCardNumber); + } + /** + * 设置年龄 + */ + public void setAge(Integer age){ + this.age = age; + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsuranceDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsuranceDTO.java new file mode 100644 index 0000000..ff505ba --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsuranceDTO.java @@ -0,0 +1,93 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +/** + * InsuranceDTO + * + * @author: wgl + * @describe: 保险基本信息 + * @date: 2022/12/28 10:10 + */ +@Data +public class InsuranceDTO { + + @Label(value = "银保监备案号") + private String publishNumber; + + @Label(value = "分类编号") + private Long categoryNo; + + @Label(value = "推荐分类") + private String recommendCategoryNo; + + @Label(value = "保险名称") + private String insuranceName; + + @Label(value = "保险标签 0金选 1安心培 2普通") + private String insuranceLabel; + + @Label(value = "首页热点显示(是0 否1)") + private String showIndex; + + @Label(value = "保险标签格式:[{key:200万医疗金,val:指定私立意义}]") + private String labelsJson; + + @Label(value = "补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]") + private String remakeJson; + + @Label(value = "可购买起始点") + private Integer timeStart; + + @Label(value = "可购买起始点单位:天、年") + private String timeStartUnit; + + @Label(value = "可购买结束点") + private Integer timeEnd; + + @Label(value = "可购买结束点单位:天、年") + private String timeEndUnit; + + @Label(value = "可投保关系:self,children:spouse,parents") + private String relation; + + @Label(value = "排序") + private Integer sortNo; + + @Label(value = "团个险(0团 1个)") + private String multiple; + + @Label(value = "连续投保年龄") + private Long continuousInsuranceAge; + + @Label(value = "企业编号") + private String companyNo; + + @Label(value = "保险状态(上架0 下架1)") + private String insuranceState; + + @Label(value = "保单宽限") + private Integer grace; + + @Label(value = "宽限单位") + private String graceUnit; + + @Label(value = "保单复效") + private String revival; + + @Label(value = "复效单位") + private String revivalUnit; + + @Label(value = "产品点评") + private String comment; + + @Label(value = "产品描述") + private String remake; + + @Label(value = "批量操作:主键ID") + private String[] checkedIds; + + @Label(value = "校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿") + private String checkRule; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsureParamDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsureParamDTO.java new file mode 100644 index 0000000..b3e9b2c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsureParamDTO.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.util.List; +import java.util.Map; + +/** + * InsureParamDTO + * + * @author: wgl + * @describe: 投保参数对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class InsureParamDTO { + + @Label("申请人信息") + private ApplicantInfo applicantInfo; + + @Label("保险基本信息") + private InsuranceDTO insuranceDTO; + + @Label("保险方案列表") + private List planDTOList; + + @Label("保险方案关联的保障项列表") + private Map safeItemDTO; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsurePlanDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsurePlanDTO.java new file mode 100644 index 0000000..a7e650b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/InsurePlanDTO.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * InsurePlanDTO + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Data +public class InsurePlanDTO { + + @Label(value = "保险商品id") + private Long insuranceId; + + @Label(value = "保险方案名称") + private String palnName; + + @Label(value = "保险方案名称补充") + private String palnRemake; + + @Label(value = "默认定价") + private BigDecimal price; + + @Label(value = "默认定价单位:y/d,y/m,y/y") + private String priceUnit; + + @Label(value = "高额利率") + private BigDecimal rateTopGrade; + + @Label(value = "上年利率") + private BigDecimal rateLastYear; + + @Label(value = "保障利率") + private BigDecimal rateGuarantee; + + @Label(value = "排序") + private Integer sortNo; + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/SafeItemDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/SafeItemDTO.java new file mode 100644 index 0000000..0fc845f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/SafeItemDTO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +/** + * SafeItemDTO + * + * @author: wgl + * @describe: 保障项 + * @date: 2022/12/28 10:10 + */ +@Data +public class SafeItemDTO { + + @Label(value = "保险方案ID") + private Long planId; + + @Label(value = "保障项key:mzyl") + private String safeguardKey; + + @Label(value = "保障项名称:门诊医疗") + private String safeguardKeyName; + + @Label(value = "保障项值") + private String safeguardValue; + + @Label(value = "保障项别名:一般门诊费用") + private String safeguardAsName; + + @Label(value = "保障类型(0保障规则 1 保障信息)") + private String sageguardType; + + @Label(value = "显示位置:0 列表页 1 详情页") + private String position; + + @Label(value = "保障内容补充说明") + private String remake; + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ScoreParams.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ScoreParams.java new file mode 100644 index 0000000..d78f900 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/ScoreParams.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.rule; + +import com.itheima.sfbx.framework.rule.model.Label; + +/** + * RuleParams + * + * @author: wgl + * @describe: 规则参数 + * @date: 2022/12/28 10:10 + */ +public class ScoreParams { + + @Label("得分") + private String score; + + + public ScoreParams() { + } + + public ScoreParams(String score) { + this.score = score; + } + + + public String getScore() { + return score; + } + + public void setScore(String score) { + this.score = score; + } + + @Override + public String toString() { + return "ScoreParams{" + + "score='" + score + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/action/InsuranceAction.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/action/InsuranceAction.java new file mode 100644 index 0000000..f2f1807 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/action/InsuranceAction.java @@ -0,0 +1,30 @@ +package com.itheima.sfbx.insurance.rule.action; + + + +import com.itheima.sfbx.framework.rule.action.ActionId; +import com.itheima.sfbx.framework.rule.model.ExposeAction; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +import lombok.extern.slf4j.Slf4j; + +import java.lang.reflect.Member; +import java.text.SimpleDateFormat; +import java.util.Date; +/** + * InsuranceAction + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Slf4j +public class InsuranceAction { + + + @ActionId("helloKey") + @ActionMethodParameter(names={"用户ID","key","value"}) + public String hello(String username){ + log.info("hello "+username); + return "hello"+username; + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/advice/AdviceHealthDTO.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/advice/AdviceHealthDTO.java new file mode 100644 index 0000000..8dea210 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/rule/advice/AdviceHealthDTO.java @@ -0,0 +1,39 @@ +package com.itheima.sfbx.insurance.rule.advice; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * AdviceHealthDTO + * + * @author: wgl + * @describe: 健康检查传输对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class AdviceHealthDTO { + + @Label("保险") + private String insuranceId; + + @Label("用户id") + private String userId; + + @Label("疾病列表") + private List sickKey = new ArrayList<>(); + + //key 问卷唯一标识 value 用户提交选项内容 + @Label("问卷列表") + private Map questions; + + @Label("问卷结果") + private List sicks = new ArrayList<>(); + + @Label("初筛结果") + private Boolean result = true; + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/DataExportService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/DataExportService.java new file mode 100644 index 0000000..9e15b82 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/DataExportService.java @@ -0,0 +1,8 @@ +package com.itheima.sfbx.insurance.service; + +public interface DataExportService { + + Object dataInport(); + + Object dataUpdate(); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBannerService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBannerService.java new file mode 100644 index 0000000..e137c02 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBannerService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.Banner; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.BannerVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:服务类 + */ +public interface IBannerService extends IService { + + /** + * @Description 多条件查询分页 + * @param bannerVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(BannerVO bannerVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询 + * @param bannerId 合同信息ID + * @return BannerVO + */ + BannerVO findById(String bannerId); + + /** + * @Description 新增 + * @param bannerVO 查询条件 + * @return BannerVO + */ + BannerVO save(BannerVO bannerVO); + + /** + * @Description 修改 + * @param bannerVO 对象 + * @return BannerVO + */ + Boolean update(BannerVO bannerVO); + + /** + * @Description 删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询列表 + * @param bannerVO 查询条件 + * @return: List + */ + List findList(BannerVO bannerVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBrowsingHistoryService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBrowsingHistoryService.java new file mode 100644 index 0000000..f5e6cf3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IBrowsingHistoryService.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.pojo.BrowsingHistory; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.BrowsingHistoryVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:浏览记录服务类 + */ +public interface IBrowsingHistoryService extends IService { + + /** + * @Description 多条件查询浏览记录分页 + * @param browsingHistoryVO 浏览记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(BrowsingHistoryVO browsingHistoryVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询浏览记录 + * @param browsingHistoryId 合同信息ID + * @return BrowsingHistoryVO + */ + BrowsingHistoryVO findById(String browsingHistoryId); + + /** + * @Description 浏览记录新增 + * @param browsingHistoryVO 浏览记录查询条件 + * @return BrowsingHistoryVO + */ + BrowsingHistoryVO save(BrowsingHistoryVO browsingHistoryVO); + + /** + * @Description 浏览记录修改 + * @param browsingHistoryVO 浏览记录对象 + * @return BrowsingHistoryVO + */ + Boolean update(BrowsingHistoryVO browsingHistoryVO); + + /** + * @Description 浏览记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询浏览记录列表 + * @param browsingHistoryVO 查询条件 + * @return: List + */ + List findList(BrowsingHistoryVO browsingHistoryVO); + + + /** + * 找到我近半年的历史记录 + * @return + */ + List findMyHistory(UserVO userVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryCoefficentService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryCoefficentService.java new file mode 100644 index 0000000..5f89f08 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryCoefficentService.java @@ -0,0 +1,80 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.CategoryCoefficent; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CategoryCoefficentVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; +import java.util.Set; + +/** + * @Description:分类系数项服务类 + */ +public interface ICategoryCoefficentService extends IService { + + /** + * @Description 多条件查询分类系数项分页 + * @param categoryCoefficentVO 分类系数项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CategoryCoefficentVO categoryCoefficentVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询分类系数项 + * @param categoryCoefficentId 合同信息ID + * @return CategoryCoefficentVO + */ + CategoryCoefficentVO findById(String categoryCoefficentId); + + /** + * @Description 分类系数项新增 + * @param categoryCoefficentVO 分类系数项查询条件 + * @return CategoryCoefficentVO + */ + CategoryCoefficentVO save(CategoryCoefficentVO categoryCoefficentVO); + + /** + * @Description 分类系数项修改 + * @param categoryCoefficentVO 分类系数项对象 + * @return CategoryCoefficentVO + */ + Boolean update(CategoryCoefficentVO categoryCoefficentVO); + + /** + * @Description 分类系数项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询分类系数项列表 + * @param categoryCoefficentVO 查询条件 + * @return: List + */ + List findList(CategoryCoefficentVO categoryCoefficentVO); + + /*** + * @description 删除分类下分类系数项 + * @param categoryNo + * @return + */ + Boolean deleteByCategoryNo(String categoryNo); + + /*** + * @description 分类集合下分类系数项 + * @param categoryNoSet + * @return + */ + List findListInCategoryNo(Set categoryNoSet); + + /*** + * @description 删除分类下分类系数项 + * @param categoryNos + * @return + */ + Boolean deleteByCategoryNos(List categoryNos); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryConditionService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryConditionService.java new file mode 100644 index 0000000..3858b7c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryConditionService.java @@ -0,0 +1,89 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.insurance.dto.CategoryConditionVO; +import com.itheima.sfbx.insurance.pojo.CategoryCondition; + +import java.util.List; +import java.util.Set; + +/** + * @Description:分类筛选项服务类 + */ +public interface ICategoryConditionService extends IService { + + /** + * @param categoryConditionVO 分类筛选项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + * @Description 多条件查询分类筛选项分页 + */ + Page findPage(CategoryConditionVO categoryConditionVO, int pageNum, int pageSize); + + /** + * @param categoryConditionId 合同信息ID + * @return CategoryConditionVO + * @Description 多条件查询分类筛选项 + */ + CategoryConditionVO findById(String categoryConditionId); + + /** + * @param categoryConditionVO 分类筛选项查询条件 + * @return CategoryConditionVO + * @Description 分类筛选项新增 + */ + CategoryConditionVO save(CategoryConditionVO categoryConditionVO); + + /** + * @param categoryConditionVO 分类筛选项对象 + * @return CategoryConditionVO + * @Description 分类筛选项修改 + */ + Boolean update(CategoryConditionVO categoryConditionVO); + + /** + * @param checkedIds 选择中对象Ids + * @return Boolean + * @Description 分类筛选项删除 + */ + Boolean delete(String[] checkedIds); + + /** + * @param categoryConditionVO 查询条件 + * @description 多条件查询分类筛选项列表 + * @return: List + */ + List findList(CategoryConditionVO categoryConditionVO); + + /** + * 根据分类查询出分类对应的筛选项 + * + * @param type + * @return + */ + List findConditionByType(String type); + + /*** + * @description 删除分类下分类筛选项 + * @param categoryNo + * @return + */ + Boolean deleteByCategoryNo(String categoryNo); + + /*** + * @description 分类集合下分类筛选项 + * @param categoryNoSet + * @return + */ + List findListInCategoryNo(Set categoryNoSet); + + /*** + * @description 删除分类下分类筛选项 + * @param categoryNos + * @return + */ + Boolean deleteByCategoryNos(List categoryNos); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategorySafeguardService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategorySafeguardService.java new file mode 100644 index 0000000..6e23b66 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategorySafeguardService.java @@ -0,0 +1,80 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.CategorySafeguard; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CategorySafeguardVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; +import java.util.Set; + +/** + * @Description:分类保障项服务类 + */ +public interface ICategorySafeguardService extends IService { + + /** + * @Description 多条件查询分类保障项分页 + * @param categorySafeguardVO 分类保障项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CategorySafeguardVO categorySafeguardVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询分类保障项 + * @param categorySafeguardId 合同信息ID + * @return CategorySafeguardVO + */ + CategorySafeguardVO findById(String categorySafeguardId); + + /** + * @Description 分类保障项新增 + * @param categorySafeguardVO 分类保障项查询条件 + * @return CategorySafeguardVO + */ + CategorySafeguardVO save(CategorySafeguardVO categorySafeguardVO); + + /** + * @Description 分类保障项修改 + * @param categorySafeguardVO 分类保障项对象 + * @return CategorySafeguardVO + */ + Boolean update(CategorySafeguardVO categorySafeguardVO); + + /** + * @Description 分类保障项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询分类保障项列表 + * @param categorySafeguardVO 查询条件 + * @return: List + */ + List findList(CategorySafeguardVO categorySafeguardVO); + + /*** + * @description 删除分类下分类系数项 + * @param categoryNo + * @return + */ + Boolean deleteByCategoryNo(String categoryNo); + + /*** + * @description 分类集合下分类系数项 + * @param categoryNoSet + * @return + */ + List findListInCategoryNo(Set categoryNoSet); + + /*** + * @description 删除分类下分类系数项 + * @param categoryNos + * @return + */ + Boolean deleteByCategoryNos(List categoryNos); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryService.java new file mode 100644 index 0000000..30e81ed --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICategoryService.java @@ -0,0 +1,78 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.insurance.dto.CategoryConditionVO; +import com.itheima.sfbx.insurance.pojo.Category; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:保险分类服务类 + */ +public interface ICategoryService extends IService { + + /** + * @Description 多条件查询保险分类分页 + * @param categoryVO 保险分类查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CategoryVO categoryVO, int pageNum, int pageSize); + + + /** + * @Description 保险分类新增 + * @param categoryVO 保险分类查询条件 + * @return CategoryVO + */ + CategoryVO save(CategoryVO categoryVO); + + /** + * @Description 保险分类修改 + * @param categoryVO 保险分类对象 + * @return CategoryVO + */ + Boolean update(CategoryVO categoryVO); + + /** + * @Description 保险分类删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保险分类列表 + * @param categoryVO 查询条件 + * @return: List + */ + List findList(CategoryVO categoryVO); + + + /** + * @description 分类树形 + * @param parentCategoryNo 根节点 + * @param categoryType 保障类型:0推荐分类 1产品分类 + * @param checkedCategoryNos 选择节点 + * @return: TreeVO + */ + TreeVO categoryTreeVO(String parentCategoryNo, String categoryType,String[] checkedCategoryNos); + + /** + * @Description 创建分类编号 + * @param parentCategoryNo 创建分类编号 + * @return + */ + String createCategoryNo(String parentCategoryNo); + + /** + * 获取险种榜分类和人种榜分类 + * @param type + */ + List categoryCheckRule(String type); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICoefficentService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICoefficentService.java new file mode 100644 index 0000000..c3c146d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICoefficentService.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.pojo.Coefficent; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CoefficentVO; + +import java.util.List; + +/** + * @Description:系数项服务类 + */ +public interface ICoefficentService extends IService { + + /** + * @param coefficentVO 系数项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + * @Description 多条件查询系数项分页 + */ + Page findPage(CoefficentVO coefficentVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询系数项 + * @param coefficentId 合同信息ID + * @return CoefficentVO + */ + CoefficentVO findById(String coefficentId); + + /** + * @Description 系数项新增 + * @param coefficentVO 系数项查询条件 + * @return CoefficentVO + */ + CoefficentVO save(CoefficentVO coefficentVO); + + /** + * @Description 系数项修改 + * @param coefficentVO 系数项对象 + * @return CoefficentVO + */ + Boolean update(CoefficentVO coefficentVO); + + /** + * @Description 系数项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询系数项列表 + * @param coefficentVO 查询条件 + * @return: List + */ + List findList(CoefficentVO coefficentVO); + + /*** + * @description 系数项key查询CoefficentVO + * @param coefficentKey 系数项key + * @return CoefficentVO + */ + CoefficentVO findByCoefficentKey(String coefficentKey); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationInsuranceService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationInsuranceService.java new file mode 100644 index 0000000..fce8f77 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationInsuranceService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.CombinationInsurance; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CombinationInsuranceVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:组合保险服务类 + */ +public interface ICombinationInsuranceService extends IService { + + /** + * @Description 多条件查询组合保险分页 + * @param combinationInsuranceVO 组合保险查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CombinationInsuranceVO combinationInsuranceVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询组合保险 + * @param combinationInsuranceId 合同信息ID + * @return CombinationInsuranceVO + */ + CombinationInsuranceVO findById(String combinationInsuranceId); + + /** + * @Description 组合保险新增 + * @param combinationInsuranceVO 组合保险查询条件 + * @return CombinationInsuranceVO + */ + CombinationInsuranceVO save(CombinationInsuranceVO combinationInsuranceVO); + + /** + * @Description 组合保险修改 + * @param combinationInsuranceVO 组合保险对象 + * @return CombinationInsuranceVO + */ + Boolean update(CombinationInsuranceVO combinationInsuranceVO); + + /** + * @Description 组合保险删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询组合保险列表 + * @param combinationInsuranceVO 查询条件 + * @return: List + */ + List findList(CombinationInsuranceVO combinationInsuranceVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationService.java new file mode 100644 index 0000000..ca05025 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICombinationService.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.CombinationDetailVO; +import com.itheima.sfbx.insurance.pojo.Combination; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CombinationVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:组合方案服务类 + */ +public interface ICombinationService extends IService { + + /** + * @Description 多条件查询组合方案分页 + * @param combinationVO 组合方案查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CombinationVO combinationVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询组合方案 + * @param combinationId 合同信息ID + * @return CombinationVO + */ + CombinationVO findById(String combinationId); + + /** + * @Description 组合方案新增 + * @param combinationVO 组合方案查询条件 + * @return CombinationVO + */ + CombinationVO save(CombinationVO combinationVO); + + /** + * @Description 组合方案修改 + * @param combinationVO 组合方案对象 + * @return CombinationVO + */ + Boolean update(CombinationVO combinationVO); + + /** + * @Description 组合方案删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询组合方案列表 + * @param combinationVO 查询条件 + * @return: List + */ + List findList(CombinationVO combinationVO); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IConditionService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IConditionService.java new file mode 100644 index 0000000..d9022e6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IConditionService.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.Condition; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.ConditionVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:筛选项服务类 + */ +public interface IConditionService extends IService { + + /** + * @Description 多条件查询筛选项分页 + * @param conditionVO 筛选项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(ConditionVO conditionVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询筛选项 + * @param conditionId 合同信息ID + * @return ConditionVO + */ + ConditionVO findById(String conditionId); + + /** + * @Description 筛选项新增 + * @param conditionVO 筛选项查询条件 + * @return ConditionVO + */ + ConditionVO save(ConditionVO conditionVO); + + /** + * @Description 筛选项修改 + * @param conditionVO 筛选项对象 + * @return ConditionVO + */ + Boolean update(ConditionVO conditionVO); + + /** + * @Description 筛选项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询筛选项列表 + * @param conditionVO 查询条件 + * @return: List + */ + List findList(ConditionVO conditionVO); + + /** + * @description 按conditionKeys查询筛选项列表 + * @param conditionKeys 查询条件 + * @return: List + */ + List findInConditionKeys(List conditionKeys); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerCardService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerCardService.java new file mode 100644 index 0000000..ad3c518 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerCardService.java @@ -0,0 +1,88 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import com.itheima.sfbx.insurance.pojo.CustomerCard; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CustomerCardVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:绑卡信息服务类 + */ +public interface ICustomerCardService extends IService { + + /** + * @Description 多条件查询绑卡信息分页 + * @param customerCardVO 绑卡信息查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CustomerCardVO customerCardVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询绑卡信息 + * @param customerCardId 合同信息ID + * @return CustomerCardVO + */ + CustomerCardVO findById(String customerCardId); + + /** + * @Description 绑卡信息新增 + * @param customerCardVO 绑卡信息查询条件 + * @return CustomerCardVO + */ + CustomerCardVO save(CustomerCardVO customerCardVO); + + /** + * @Description 绑卡信息修改 + * @param customerCardVO 绑卡信息对象 + * @return CustomerCardVO + */ + Boolean update(CustomerCardVO customerCardVO); + + /** + * @Description 绑卡信息删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询绑卡信息列表 + * @param customerCardVO 查询条件 + * @return: List + */ + List findList(CustomerCardVO customerCardVO); + + + /** + * @description 多条件查询绑卡信息列表 + * @param customerCardVO 查询条件 + * @return: List + */ + List bankCardList(CustomerCardVO customerCardVO); + + /** + * 报错银行卡 + * @param customerCardVO + * @return + */ + CustomerCardVO saveBankCard(CustomerCardVO customerCardVO); + + /** + * 默认银行卡设置 + * @param customerCardId + * @return + */ + CustomerCardVO defaultBankCard(String customerCardId); + + /** + * 解绑银行卡 + * @param customerCardVO + * @return + */ + CustomerCardVO removeBankCard(CustomerCardVO customerCardVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerInfoService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerInfoService.java new file mode 100644 index 0000000..2ca88b5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerInfoService.java @@ -0,0 +1,107 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.outinterface.dto.TokenDTO; +import com.itheima.sfbx.insurance.constant.CustomerInfoCacheConstant; +import com.itheima.sfbx.insurance.dto.BaiduCloudTokenVO; +import com.itheima.sfbx.insurance.dto.CustomerCardVO; +import com.itheima.sfbx.insurance.pojo.CustomerInfo; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; + +/** + * @Description:客户信息表服务类 + */ +public interface ICustomerInfoService extends IService { + + /** + * @Description 多条件查询客户信息表分页 + * @param customerInfoVO 客户信息表查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CustomerInfoVO customerInfoVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询客户信息表 + * @param customerInfoId 合同信息ID + * @return CustomerInfoVO + */ + CustomerInfoVO findById(String customerInfoId); + + /** + * @Description 客户信息表新增 + * @param customerInfoVO 客户信息表查询条件 + * @return CustomerInfoVO + */ + CustomerInfoVO save(CustomerInfoVO customerInfoVO); + + /** + * @Description 客户信息表修改 + * @param customerInfoVO 客户信息表对象 + * @return CustomerInfoVO + */ + Boolean update(CustomerInfoVO customerInfoVO); + + /** + * @Description 客户信息表删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询客户信息表列表 + * @param customerInfoVO 查询条件 + * @return: List + */ + List findList(CustomerInfoVO customerInfoVO); + + + /** + * 获取百度云的ocrtoken + * @param userVO + * @return + */ + BaiduCloudTokenVO getOcrToken(UserVO userVO); + + /** + * 重置密码 + * @return + */ + Boolean resetPassword(UserVO userVO); + + /*** + * @description 按身份证查询投保人信息 + * @param identityCard + * @return + * @return: com.itheima.sfbx.insurance.dto.CustomerInfoVO + */ + CustomerInfoVO findOneByIdentityCard(String identityCard); + + /** + * 人脸识别认证 + * @return + */ + Boolean faceCheck(); + + /** + * 身份证号 + * @param customerInfo + * @return + */ + CustomerInfoVO idCard(CustomerInfoVO customerInfo); + + /** + * 获取身份证信息 + * @return + */ + CustomerInfoVO idCardInfo(); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerRelationService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerRelationService.java new file mode 100644 index 0000000..bd62422 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ICustomerRelationService.java @@ -0,0 +1,95 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.pojo.CustomerRelation; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:客户关系表服务类 + */ +public interface ICustomerRelationService extends IService { + + /** + * @Description 多条件查询客户关系表分页 + * @param customerRelationVO 客户关系表查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(CustomerRelationVO customerRelationVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询客户关系表 + * @param customerRelationId 用户id + * @return CustomerRelationVO + */ + CustomerRelationVO findById(String customerRelationId); + + /** + * @Description 多条件查询客户关系表 + * @param customerRelationIds 用户ids + * @return CustomerRelationVO + */ + List findInId(List customerRelationIds); + + /** + * @Description 客户关系表新增 + * @param customerRelationVO 客户关系表查询条件 + * @return CustomerRelationVO + */ + CustomerRelationVO save(CustomerRelationVO customerRelationVO); + + /** + * @Description 客户关系表修改 + * @param customerRelationVO 客户关系表对象 + * @return CustomerRelationVO + */ + Boolean update(CustomerRelationVO customerRelationVO); + + /** + * @Description 客户关系表删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询客户关系表列表 + * @param customerRelationVO 查询条件 + * @return: List + */ + List findList(CustomerRelationVO customerRelationVO); + + + /** + * @description 多条件查询客户关系表列表 + * @param customerRelationVO 查询条件 + * @return: List + */ + List myRelation(CustomerRelationVO customerRelationVO); + + /** + * 获取当前用户的对象 + * @param userId + * @return + */ + CustomerRelationVO findOne(Long userId); + + /** + * 根据逗号截取关系字段 + * @param fields + * @return + */ + String[] getRelations(String fields); + + /** + * 获取所有家庭成员列表 + * @return + */ + List findHomeList(UserVO userVO); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IHealthAssessmentService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IHealthAssessmentService.java new file mode 100644 index 0000000..f645cd9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IHealthAssessmentService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.HealthAssessment; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.HealthAssessmentVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:评估类目服务类 + */ +public interface IHealthAssessmentService extends IService { + + /** + * @Description 多条件查询评估类目分页 + * @param healthAssessmentVO 评估类目查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(HealthAssessmentVO healthAssessmentVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询评估类目 + * @param healthAssessmentId 合同信息ID + * @return HealthAssessmentVO + */ + HealthAssessmentVO findById(String healthAssessmentId); + + /** + * @Description 评估类目新增 + * @param healthAssessmentVO 评估类目查询条件 + * @return HealthAssessmentVO + */ + HealthAssessmentVO save(HealthAssessmentVO healthAssessmentVO); + + /** + * @Description 评估类目修改 + * @param healthAssessmentVO 评估类目对象 + * @return HealthAssessmentVO + */ + Boolean update(HealthAssessmentVO healthAssessmentVO); + + /** + * @Description 评估类目删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询评估类目列表 + * @param healthAssessmentVO 查询条件 + * @return: List + */ + List findList(HealthAssessmentVO healthAssessmentVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveDetailService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveDetailService.java new file mode 100644 index 0000000..bfd5315 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveDetailService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.InsuranceApproveDetail; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceApproveDetailVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:保批信息服务类 + */ +public interface IInsuranceApproveDetailService extends IService { + + /** + * @Description 多条件查询保批信息分页 + * @param insuranceApproveDetailVO 保批信息查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceApproveDetailVO insuranceApproveDetailVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保批信息 + * @param insuranceApproveDetailId 合同信息ID + * @return InsuranceApproveDetailVO + */ + InsuranceApproveDetailVO findById(String insuranceApproveDetailId); + + /** + * @Description 保批信息新增 + * @param insuranceApproveDetailVO 保批信息查询条件 + * @return InsuranceApproveDetailVO + */ + InsuranceApproveDetailVO save(InsuranceApproveDetailVO insuranceApproveDetailVO); + + /** + * @Description 保批信息修改 + * @param insuranceApproveDetailVO 保批信息对象 + * @return InsuranceApproveDetailVO + */ + Boolean update(InsuranceApproveDetailVO insuranceApproveDetailVO); + + /** + * @Description 保批信息删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保批信息列表 + * @param insuranceApproveDetailVO 查询条件 + * @return: List + */ + List findList(InsuranceApproveDetailVO insuranceApproveDetailVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveService.java new file mode 100644 index 0000000..d6bec42 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceApproveService.java @@ -0,0 +1,65 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.InsuranceApprove; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceApproveVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:保批信息服务类 + */ +public interface IInsuranceApproveService extends IService { + + /** + * @Description 多条件查询保批信息分页 + * @param insuranceApproveVO 保批信息查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceApproveVO insuranceApproveVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保批信息 + * @param insuranceApproveId 合同信息ID + * @return InsuranceApproveVO + */ + InsuranceApproveVO findById(String insuranceApproveId); + + /** + * @Description 保批信息新增 + * @param insuranceApproveVO 保批信息查询条件 + * @return InsuranceApproveVO + */ + InsuranceApproveVO save(InsuranceApproveVO insuranceApproveVO); + + /** + * @Description 保批信息修改 + * @param insuranceApproveVO 保批信息对象 + * @return InsuranceApproveVO + */ + Boolean update(InsuranceApproveVO insuranceApproveVO); + + /** + * @Description 保批信息删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保批信息列表 + * @param insuranceApproveVO 查询条件 + * @return: List + */ + List findList(InsuranceApproveVO insuranceApproveVO); + + /** + * 根据合同编号获取报批信息 + * @param warrantyNo + * @return + */ + List findByWarrantyNo(String warrantyNo); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceCoefficentService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceCoefficentService.java new file mode 100644 index 0000000..0d1c051 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceCoefficentService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceCoefficentVO; +import com.itheima.sfbx.insurance.pojo.InsuranceCoefficent; + +import java.util.List; + +/** + * @Description:保险系数项服务类 + */ +public interface IInsuranceCoefficentService extends IService { + + /** + * @Description 多条件查询保险系数项分页 + * @param insuranceCoefficentVO 保险系数项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceCoefficentVO insuranceCoefficentVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保险系数项 + * @param insuranceCoefficentId 合同信息ID + * @return InsuranceCoefficentVO + */ + InsuranceCoefficentVO findById(String insuranceCoefficentId); + + /** + * @Description 保险系数项新增 + * @param insuranceCoefficentVOs 保险系数项 + * @return InsuranceCoefficentVO + */ + Boolean save(List insuranceCoefficentVOs); + + /** + * @Description 保险系数项修改 + * @param insuranceCoefficentVOs 保险系数项对象 + * @return InsuranceCoefficentVO + */ + Boolean update(List insuranceCoefficentVOs); + + /** + * @Description 保险系数项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保险系数项列表 + * @param insuranceCoefficentVO 查询条件 + * @return: List + */ + List findList(InsuranceCoefficentVO insuranceCoefficentVO); + + /** + * @description ids查询保险系数项列表 + * @param insuranceCoefficentIds 查询条件 + * @return: List + */ + List findListByIdsAndInsuranceId(List insuranceCoefficentIds,Long insuranceId ); + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceConditionService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceConditionService.java new file mode 100644 index 0000000..fd8e480 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceConditionService.java @@ -0,0 +1,59 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceConditionVO; +import com.itheima.sfbx.insurance.pojo.InsuranceCondition; + +import java.util.List; + +/** + * @Description:保险筛选项服务类 + */ +public interface IInsuranceConditionService extends IService { + + /** + * @Description 多条件查询保险筛选项分页 + * @param insuranceConditionVO 保险筛选项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceConditionVO insuranceConditionVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保险筛选项 + * @param insuranceConditionId 合同信息ID + * @return InsuranceConditionVO + */ + InsuranceConditionVO findById(String insuranceConditionId); + + /** + * @Description 保险筛选项新增 + * @param insuranceConditionListVOs 保险筛选项查询条件 + * @return InsuranceConditionVO + */ + Boolean save(List insuranceConditionListVOs); + + /** + * @Description 保险筛选项修改 + * @param insuranceConditionVOs 保险筛选项对象 + * @return InsuranceConditionVO + */ + Boolean update(List insuranceConditionVOs); + + /** + * @Description 保险筛选项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保险筛选项列表 + * @param insuranceConditionVO 查询条件 + * @return: List + */ + List findList(InsuranceConditionVO insuranceConditionVO); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsurancePlanService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsurancePlanService.java new file mode 100644 index 0000000..635b808 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsurancePlanService.java @@ -0,0 +1,60 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.InsurancePlan; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsurancePlanVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:保险方案服务类 + */ +public interface IInsurancePlanService extends IService { + + /** + * @Description 多条件查询保险方案分页 + * @param insurancePlanVO 保险方案查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsurancePlanVO insurancePlanVO, int pageNum, int pageSize); + + /** + * @Description 按产品ID和方案ID查找 + * @param insurancePlanId 方案ID + * @param insuranceId 产品ID + * @return InsurancePlanVO + */ + InsurancePlanVO findByIdAndInsuranceId(Long insurancePlanId,Long insuranceId); + + /** + * @Description 批量保险方案新增 + * @param insurancePlanVOs 保险方案 + * @return InsurancePlanVO + */ + Boolean save(List insurancePlanVOs); + + /** + * @Description 保险方案修改 + * @param insurancePlanVOs 保险方案对象 + * @return InsurancePlanVO + */ + Boolean update(List insurancePlanVOs); + + /** + * @Description 保险方案删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保险方案列表 + * @param insurancePlanVO 查询条件 + * @return: List + */ + List findList(InsurancePlanVO insurancePlanVO); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceRuleService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceRuleService.java new file mode 100644 index 0000000..9103b1f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceRuleService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.InsuranceRule; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceRuleVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:保险规则服务类 + */ +public interface IInsuranceRuleService extends IService { + + /** + * @Description 多条件查询保险规则分页 + * @param insuranceRuleVO 保险规则查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceRuleVO insuranceRuleVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保险规则 + * @param insuranceRuleId 合同信息ID + * @return InsuranceRuleVO + */ + InsuranceRuleVO findById(String insuranceRuleId); + + /** + * @Description 保险规则新增 + * @param insuranceRuleVO 保险规则查询条件 + * @return InsuranceRuleVO + */ + InsuranceRuleVO save(InsuranceRuleVO insuranceRuleVO); + + /** + * @Description 保险规则修改 + * @param insuranceRuleVO 保险规则对象 + * @return InsuranceRuleVO + */ + Boolean update(InsuranceRuleVO insuranceRuleVO); + + /** + * @Description 保险规则删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保险规则列表 + * @param insuranceRuleVO 查询条件 + * @return: List + */ + List findList(InsuranceRuleVO insuranceRuleVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceService.java new file mode 100644 index 0000000..865eace --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceService.java @@ -0,0 +1,74 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.pojo.Insurance; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.math.BigDecimal; +import java.util.List; + +/** + * @Description:保险产品服务类 + */ +public interface IInsuranceService extends IService { + + /** + * @param insuranceVO 保险产品查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + * @Description 多条件查询保险产品分页 + */ + Page findPage(InsuranceVO insuranceVO, int pageNum, int pageSize); + + /** + * @param insuranceId 保险产品信息ID + * @return InsuranceVO + * @Description 多条件查询保险产品 + */ + InsuranceVO findById(String insuranceId); + + /** + * @param insuranceVO 保险产品查询条件 + * @return InsuranceVO + * @Description 保险产品新增 + */ + InsuranceVO save(InsuranceVO insuranceVO); + + /** + * @param insuranceVO 保险产品对象 + * @return InsuranceVO + * @Description 保险产品修改 + */ + Boolean update(InsuranceVO insuranceVO); + + /** + * @param checkedIds 选择中对象Ids + * @return Boolean + * @Description 保险产品删除 + */ + Boolean delete(String[] checkedIds); + + /** + * @param insuranceVO 查询条件 + * @description 多条件查询保险产品列表 + * @return: List + */ + List findList(InsuranceVO insuranceVO); + + /*** + * @description 保费计算 + * @param doInsureVo + * @return 投入型:最终本期投保金额,如果为不可购买则返回:不符合条件,理财型:最终收益 + */ + String doPremium(DoInsureVo doInsureVo); + + /*** + * @description 收益计算 + * @param doInsureVo 投保试算对象 + * @return 理财型:最终收益,返回0则表示不符合条件 + */ + EarningVO doEarnings(DoInsureVo doInsureVo); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceSievingService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceSievingService.java new file mode 100644 index 0000000..a13b87f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceSievingService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.InsuranceSieving; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceSievingVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:初筛结果服务类 + */ +public interface IInsuranceSievingService extends IService { + + /** + * @Description 多条件查询初筛结果分页 + * @param insuranceSievingVO 初筛结果查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(InsuranceSievingVO insuranceSievingVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询初筛结果 + * @param insuranceSievingId 合同信息ID + * @return InsuranceSievingVO + */ + InsuranceSievingVO findById(String insuranceSievingId); + + /** + * @Description 初筛结果新增 + * @param insuranceSievingVO 初筛结果查询条件 + * @return InsuranceSievingVO + */ + InsuranceSievingVO save(InsuranceSievingVO insuranceSievingVO); + + /** + * @Description 初筛结果修改 + * @param insuranceSievingVO 初筛结果对象 + * @return InsuranceSievingVO + */ + Boolean update(InsuranceSievingVO insuranceSievingVO); + + /** + * @Description 初筛结果删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询初筛结果列表 + * @param insuranceSievingVO 查询条件 + * @return: List + */ + List findList(InsuranceSievingVO insuranceSievingVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceTopService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceTopService.java new file mode 100644 index 0000000..8660b3d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IInsuranceTopService.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.InsuranceTopVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.pojo.InsuranceTop; + +import java.util.List; + +/** + * @Description:人气保险服务类 + */ +public interface IInsuranceTopService extends IService { + + /** + * @param insuranceTopVO 人气保险查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + * @Description 多条件查询人气保险分页 + */ + Page findPage(InsuranceTopVO insuranceTopVO, int pageNum, int pageSize); + + /** + * @param insuranceTopId 合同信息ID + * @return InsuranceTopVO + * @Description 多条件查询人气保险 + */ + InsuranceTopVO findById(String insuranceTopId); + + /** + * @param insuranceTopVO 人气保险查询条件 + * @return InsuranceTopVO + * @Description 人气保险新增 + */ + InsuranceTopVO save(InsuranceTopVO insuranceTopVO); + + /** + * @param insuranceTopVO 人气保险对象 + * @return InsuranceTopVO + * @Description 人气保险修改 + */ + Boolean update(InsuranceTopVO insuranceTopVO); + + /** + * @param checkedIds 选择中对象Ids + * @return Boolean + * @Description 人气保险删除 + */ + Boolean delete(String[] checkedIds); + + /** + * @param insuranceTopVO 查询条件 + * @description 多条件查询人气保险列表 + * @return: List + */ + List findList(InsuranceTopVO insuranceTopVO); + + /** + * 查询排名前10的榜单列表 + * + * @return + */ + List findTopInsurance(Integer num, Integer dateLimit); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanEarningsService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanEarningsService.java new file mode 100644 index 0000000..472b7ac --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanEarningsService.java @@ -0,0 +1,87 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.PlanEarnings; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.PlanEarningsVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; +import java.util.Set; + +/** + * @Description:方案给付服务类 + */ +public interface IPlanEarningsService extends IService { + + /** + * @Description 多条件查询方案给付分页 + * @param planEarningsVO 方案给付查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(PlanEarningsVO planEarningsVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询方案给付 + * @param planEarningsId 合同信息ID + * @return PlanEarningsVO + */ + PlanEarningsVO findById(String planEarningsId); + + /** + * @Description 方案给付新增 + * @param planEarningsVO 方案给付查询条件 + * @return PlanEarningsVO + */ + PlanEarningsVO save(PlanEarningsVO planEarningsVO); + + /** + * @Description 方案给付修改 + * @param planEarningsVO 方案给付对象 + * @return PlanEarningsVO + */ + Boolean update(PlanEarningsVO planEarningsVO); + + /** + * @Description 方案给付删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询方案给付列表 + * @param planEarningsVO 查询条件 + * @return: List + */ + List findList(PlanEarningsVO planEarningsVO); + + /** + * @description 按PlanId查找方案给付计划 + * @param planId 方案IDs + * @return: PlanEarningsVO + */ + PlanEarningsVO findByPlanId(Long planId); + + /** + * @description 按PlanId删除方案给付计划 + * @param planIds 方案IDs + * @return: PlanEarningsVO + */ + boolean deleteInPlanIds(List planIds); + + /** + * @description 按PlanIds删除方案给付计划 + * @param planIds 方案IDs + * @return: PlanEarningsVO + */ + boolean deleteInPlanId(List planIds); + + /** + * @description 按PlanIds查找方案给付计划 + * @param planIds 方案IDs + * @return: PlanEarningsVO + */ + List findInPlanId(Set planIds); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanSafeguardService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanSafeguardService.java new file mode 100644 index 0000000..dbb672d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IPlanSafeguardService.java @@ -0,0 +1,90 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.pojo.PlanSafeguard; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.PlanSafeguardVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; +import java.util.Set; + +/** + * @Description:方案保障项服务类 + */ +public interface IPlanSafeguardService extends IService { + + /** + * @Description 多条件查询方案保障项分页 + * @param planSafeguardVO 方案保障项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(PlanSafeguardVO planSafeguardVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询方案保障项 + * @param planSafeguardId 合同信息ID + * @return PlanSafeguardVO + */ + PlanSafeguardVO findById(String planSafeguardId); + + /** + * @Description 方案保障项新增 + * @param planSafeguardVO 方案保障项查询条件 + * @return PlanSafeguardVO + */ + PlanSafeguardVO save(PlanSafeguardVO planSafeguardVO); + + /** + * @Description 方案保障项修改 + * @param planSafeguardVO 方案保障项对象 + * @return PlanSafeguardVO + */ + Boolean update(PlanSafeguardVO planSafeguardVO); + + /** + * @Description 方案保障项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询方案保障项列表 + * @param planSafeguardVO 查询条件 + * @return: List + */ + List findList(PlanSafeguardVO planSafeguardVO); + + /** + * @description 按PlanId删除方案规格 + * @param planIds 方案IDS + * @return: List + */ + boolean deleteInPlanIds(List planIds); + + /** + * @description 按PlanId删除方案规格 + * @param planIds 方案IDs + * @return: List + */ + boolean deleteInPlanId(List planIds); + + /** + * @description 按PlanIds查找方案规格 + * @param planIds 方案IDs + * @return: List + */ + List findInPlanId(Set planIds); + + /** + * @description 按PlanIds查找方案规格 + * @param planId 方案IDs + * @return: List + */ + List findByPlanId(Long planId); + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskAnalysisService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskAnalysisService.java new file mode 100644 index 0000000..09711c7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskAnalysisService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.RiskAnalysis; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.RiskAnalysisVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:风险类目服务类 + */ +public interface IRiskAnalysisService extends IService { + + /** + * @Description 多条件查询风险类目分页 + * @param riskAnalysisVO 风险类目查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(RiskAnalysisVO riskAnalysisVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询风险类目 + * @param riskAnalysisId 合同信息ID + * @return RiskAnalysisVO + */ + RiskAnalysisVO findById(String riskAnalysisId); + + /** + * @Description 风险类目新增 + * @param riskAnalysisVO 风险类目查询条件 + * @return RiskAnalysisVO + */ + RiskAnalysisVO save(RiskAnalysisVO riskAnalysisVO); + + /** + * @Description 风险类目修改 + * @param riskAnalysisVO 风险类目对象 + * @return RiskAnalysisVO + */ + Boolean update(RiskAnalysisVO riskAnalysisVO); + + /** + * @Description 风险类目删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询风险类目列表 + * @param riskAnalysisVO 查询条件 + * @return: List + */ + List findList(RiskAnalysisVO riskAnalysisVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskService.java new file mode 100644 index 0000000..2776121 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRiskService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.Risk; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.RiskVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:风险表服务类 + */ +public interface IRiskService extends IService { + + /** + * @Description 多条件查询风险表分页 + * @param riskVO 风险表查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(RiskVO riskVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询风险表 + * @param riskId 合同信息ID + * @return RiskVO + */ + RiskVO findById(String riskId); + + /** + * @Description 风险表新增 + * @param riskVO 风险表查询条件 + * @return RiskVO + */ + RiskVO save(RiskVO riskVO); + + /** + * @Description 风险表修改 + * @param riskVO 风险表对象 + * @return RiskVO + */ + Boolean update(RiskVO riskVO); + + /** + * @Description 风险表删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询风险表列表 + * @param riskVO 查询条件 + * @return: List + */ + List findList(RiskVO riskVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRuleService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRuleService.java new file mode 100644 index 0000000..95b3781 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IRuleService.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import com.itheima.sfbx.insurance.dto.InsureProcessVO; +import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO; +import com.itheima.sfbx.insurance.rule.AccessRuleDTO; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; + +/** + * IRuleService + * + * @author: wgl + * @describe: 规则引擎service + * @date: 2022/12/28 10:10 + */ +public interface IRuleService { + + + /** + * 省心配规则 + * @param customerInfoVO + */ + WorryFreeCustomerInfoVO worryFreePairing(WorryFreeCustomerInfoVO customerInfoVO); + + + void testRule(String id); + + void testRuleTable(String id); + + /** + * 保险初筛 + * @param adviceHealthDTO + * @return + */ + AdviceHealthDTO submitQuestionChoose(AdviceHealthDTO adviceHealthDTO); + + /** + * 设置基本属性 + * @param worryFreeCustomerInfoVO + */ + void buildBaseParams(WorryFreeCustomerInfoVO worryFreeCustomerInfoVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISafeguardService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISafeguardService.java new file mode 100644 index 0000000..efb4528 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISafeguardService.java @@ -0,0 +1,74 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.Safeguard; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; +import java.util.Set; + +/** + * @Description:保障项服务类 + */ +public interface ISafeguardService extends IService { + + /** + * @Description 多条件查询保障项分页 + * @param safeguardVO 保障项查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(SafeguardVO safeguardVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询保障项 + * @param safeguardId 合同信息ID + * @return SafeguardVO + */ + SafeguardVO findById(String safeguardId); + + /** + * @Description 保障项新增 + * @param safeguardVO 保障项查询条件 + * @return SafeguardVO + */ + SafeguardVO save(SafeguardVO safeguardVO); + + /** + * @Description 保障项修改 + * @param safeguardVO 保障项对象 + * @return SafeguardVO + */ + Boolean update(SafeguardVO safeguardVO); + + /** + * @Description 保障项删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询保障项列表 + * @param safeguardVO 查询条件 + * @return: List + */ + List findList(SafeguardVO safeguardVO); + + /** + * 根据保障项key找到所有可在首页展示的保障项 + * @param safeguardKeyList + * @return + */ + List findShowPageItemByKey(List safeguardKeyList); + + /*** + * @description 按safeguardKey查询SafeguardVO + * @param safeguardKey 保障项key + * @return SafeguardVO + */ + SafeguardVO findBySafeguardKey(String safeguardKey); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISaleTopInsuranceService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISaleTopInsuranceService.java new file mode 100644 index 0000000..56688d4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISaleTopInsuranceService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.SaleTopInsurance; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.SaleTopInsuranceVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:服务类 + */ +public interface ISaleTopInsuranceService extends IService { + + /** + * @Description 多条件查询分页 + * @param saleTopInsuranceVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(SaleTopInsuranceVO saleTopInsuranceVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询 + * @param saleTopInsuranceId 合同信息ID + * @return SaleTopInsuranceVO + */ + SaleTopInsuranceVO findById(String saleTopInsuranceId); + + /** + * @Description 新增 + * @param saleTopInsuranceVO 查询条件 + * @return SaleTopInsuranceVO + */ + SaleTopInsuranceVO save(SaleTopInsuranceVO saleTopInsuranceVO); + + /** + * @Description 修改 + * @param saleTopInsuranceVO 对象 + * @return SaleTopInsuranceVO + */ + Boolean update(SaleTopInsuranceVO saleTopInsuranceVO); + + /** + * @Description 删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询列表 + * @param saleTopInsuranceVO 查询条件 + * @return: List + */ + List findList(SaleTopInsuranceVO saleTopInsuranceVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISearchRecordService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISearchRecordService.java new file mode 100644 index 0000000..d97a422 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISearchRecordService.java @@ -0,0 +1,81 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.dto.InsuranceTypeInfoVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.pojo.SearchRecord; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.SearchRecordVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:搜索记录服务类 + */ +public interface ISearchRecordService extends IService { + + /** + * @Description 多条件查询搜索记录分页 + * @param searchRecordVO 搜索记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(SearchRecordVO searchRecordVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询搜索记录 + * @param searchRecordId 合同信息ID + * @return SearchRecordVO + */ + SearchRecordVO findById(String searchRecordId); + + /** + * @Description 搜索记录新增 + * @param searchRecordVO 搜索记录查询条件 + * @return SearchRecordVO + */ + SearchRecordVO save(SearchRecordVO searchRecordVO); + + /** + * @Description 搜索记录修改 + * @param searchRecordVO 搜索记录对象 + * @return SearchRecordVO + */ + Boolean update(SearchRecordVO searchRecordVO); + + /** + * @Description 搜索记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询搜索记录列表 + * @param searchRecordVO 查询条件 + * @return: List + */ + List findList(SearchRecordVO searchRecordVO); + + /** + * 查询热搜榜排名前10的数据 + * @param limit + * @return + */ + List tindTopRecord(int limit); + + /** + * 清空历史记录 + * @return + */ + Boolean cleanSearchRecord(); + + /** + * 搜索我的历史保险 + * @param userVO + * @return + */ + List findMyHistory(UserVO userVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISelfSelectionService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISelfSelectionService.java new file mode 100644 index 0000000..7a01f09 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISelfSelectionService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.dto.InsuranceTypeInfoVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.dto.SelfSelectionVO; +import com.itheima.sfbx.insurance.pojo.SelfSelection; + +import java.util.List; + +/** + * @Description:自选保险服务类 + */ +public interface ISelfSelectionService extends IService { + + /** + * @param selfSelectionVO 自选保险查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + * @Description 多条件查询自选保险分页 + */ + Page findPage(SelfSelectionVO selfSelectionVO, int pageNum, int pageSize); + + /** + * @param selfSelectionId 合同信息ID + * @return SelfSelectionVO + * @Description 多条件查询自选保险 + */ + SelfSelectionVO findById(String selfSelectionId); + + /** + * @param selfSelectionVO 自选保险查询条件 + * @return SelfSelectionVO + * @Description 自选保险新增 + */ + SelfSelectionVO save(SelfSelectionVO selfSelectionVO); + + /** + * @param selfSelectionVO 自选保险对象 + * @return SelfSelectionVO + * @Description 自选保险修改 + */ + Boolean update(SelfSelectionVO selfSelectionVO); + + /** + * @param checkedIds 选择中对象Ids + * @return Boolean + * @Description 自选保险删除 + */ + Boolean delete(String[] checkedIds); + + /** + * @param selfSelectionVO 查询条件 + * @description 多条件查询自选保险列表 + * @return: List + */ + List findList(SelfSelectionVO selfSelectionVO); + + /** + * 查询我的自选列表方法 + */ + List findMySelection(UserVO userVO); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickSearchRecordService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickSearchRecordService.java new file mode 100644 index 0000000..7233b26 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickSearchRecordService.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.SearchRecordVO; +import com.itheima.sfbx.insurance.dto.SickVO; +import com.itheima.sfbx.insurance.pojo.SickSearchRecord; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.SickSearchRecordVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:疾病搜索记录服务类 + */ +public interface ISickSearchRecordService extends IService { + + /** + * @Description 多条件查询疾病搜索记录分页 + * @param sickSearchRecordVO 疾病搜索记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(SickSearchRecordVO sickSearchRecordVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询疾病搜索记录 + * @param sickSearchRecordId 合同信息ID + * @return SickSearchRecordVO + */ + SickSearchRecordVO findById(String sickSearchRecordId); + + /** + * @Description 疾病搜索记录新增 + * @param sickSearchRecordVO 疾病搜索记录查询条件 + * @return SickSearchRecordVO + */ + SickSearchRecordVO save(SickSearchRecordVO sickSearchRecordVO); + + /** + * @Description 疾病搜索记录修改 + * @param sickSearchRecordVO 疾病搜索记录对象 + * @return SickSearchRecordVO + */ + Boolean update(SickSearchRecordVO sickSearchRecordVO); + + /** + * @Description 疾病搜索记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询疾病搜索记录列表 + * @param sickSearchRecordVO 查询条件 + * @return: List + */ + List findList(SickSearchRecordVO sickSearchRecordVO); + + /** + * 批量插入搜索记录 + * @param searchRecordVOList + */ + Boolean saveRecord(List searchRecordVOList); + + /** + * 疾病热搜榜 + * @return + */ + List hotSickList(); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickService.java new file mode 100644 index 0000000..d3f35d7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/ISickService.java @@ -0,0 +1,96 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.dto.QuestionTemplateVO; +import com.itheima.sfbx.insurance.dto.SeekAdviceVO; +import com.itheima.sfbx.insurance.pojo.Sick; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.SickVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; + +import java.util.List; + +/** + * @Description:疾病表服务类 + */ +public interface ISickService extends IService{ + + /** + * @Description 多条件查询疾病表分页 + * @param sickVO 疾病表查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(SickVO sickVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询疾病表 + * @param sickId 合同信息ID + * @return SickVO + */ + SickVO findById(String sickId); + + /** + * @Description 疾病表新增 + * @param sickVO 疾病表查询条件 + * @return SickVO + */ + SickVO save(SickVO sickVO); + + /** + * @Description 疾病表修改 + * @param sickVO 疾病表对象 + * @return SickVO + */ + Boolean update(SickVO sickVO); + + /** + * @Description 疾病表删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询疾病表列表 + * @param sickVO 查询条件 + * @return: List + */ + List findList(SickVO sickVO); + + /** + * 获取所有的疾病类型 + * @return + */ + List findSickType(); + + /** + * 搜索疾病 + * @param sickName + * @return + */ + List searchSick(String sickName, UserVO userVO); + + /** + * 健康咨询的方法 + * @param seekAdviceVO + */ + QuestionTemplateVO seekAdviceHealth(SeekAdviceVO seekAdviceVO); + + /** + * 用户提交答案 + * @param seekAdviceVO + * @return + */ + AdviceHealthDTO submitQuestionChoose(AdviceHealthDTO seekAdviceVO); + + /** + * 常见疾病 + * @return + */ + List commonDiseases(); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyCustomerService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyCustomerService.java new file mode 100644 index 0000000..0656aaa --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyCustomerService.java @@ -0,0 +1,28 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.WarrantyApplicantVO; +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @ClassName WarrantyApplicantService.java + * @Description 合同客户相关 + */ +public interface IWarrantyCustomerService { + + /*** + * @description 按保单号查询投保人信息 + * @param warrantyNo + * @return + */ + WarrantyApplicantVO findWarrantyApplicant(String warrantyNo); + + /*** + * @description 按保单号查询被投保人信息 + * @param warrantyNo + * @return + */ + List findWarrantyInsured(String warrantyNo); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyEarningsOrderService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyEarningsOrderService.java new file mode 100644 index 0000000..53bf06f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyEarningsOrderService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WarrantyEarningsOrder; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WarrantyEarningsOrderVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:给付计划订单服务类 + */ +public interface IWarrantyEarningsOrderService extends IService { + + /** + * @Description 多条件查询给付计划订单分页 + * @param warrantyEarningsOrderVO 给付计划订单查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyEarningsOrderVO warrantyEarningsOrderVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询给付计划订单 + * @param warrantyEarningsOrderId 合同信息ID + * @return WarrantyEarningsOrderVO + */ + WarrantyEarningsOrderVO findById(String warrantyEarningsOrderId); + + /** + * @Description 给付计划订单新增 + * @param warrantyEarningsOrderVO 给付计划订单查询条件 + * @return WarrantyEarningsOrderVO + */ + WarrantyEarningsOrderVO save(WarrantyEarningsOrderVO warrantyEarningsOrderVO); + + /** + * @Description 给付计划订单修改 + * @param warrantyEarningsOrderVO 给付计划订单对象 + * @return WarrantyEarningsOrderVO + */ + Boolean update(WarrantyEarningsOrderVO warrantyEarningsOrderVO); + + /** + * @Description 给付计划订单删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询给付计划订单列表 + * @param warrantyEarningsOrderVO 查询条件 + * @return: List + */ + List findList(WarrantyEarningsOrderVO warrantyEarningsOrderVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyInsuredService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyInsuredService.java new file mode 100644 index 0000000..a1f939c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyInsuredService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WarrantyInsuredVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:合同被保人服务类 + */ +public interface IWarrantyInsuredService extends IService { + + /** + * @Description 多条件查询合同被保人分页 + * @param warrantyInsuredVO 合同被保人查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyInsuredVO warrantyInsuredVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询合同被保人 + * @param warrantyInsuredId 合同信息ID + * @return WarrantyInsuredVO + */ + WarrantyInsuredVO findById(String warrantyInsuredId); + + /** + * @Description 合同被保人新增 + * @param warrantyInsuredVO 合同被保人查询条件 + * @return WarrantyInsuredVO + */ + WarrantyInsuredVO save(WarrantyInsuredVO warrantyInsuredVO); + + /** + * @Description 合同被保人修改 + * @param warrantyInsuredVO 合同被保人对象 + * @return WarrantyInsuredVO + */ + Boolean update(WarrantyInsuredVO warrantyInsuredVO); + + /** + * @Description 合同被保人删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询合同被保人列表 + * @param warrantyInsuredVO 查询条件 + * @return: List + */ + List findList(WarrantyInsuredVO warrantyInsuredVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyOrderService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyOrderService.java new file mode 100644 index 0000000..7e0b67f --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyOrderService.java @@ -0,0 +1,146 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.framework.commons.dto.trade.TradeVO; +import com.itheima.sfbx.insurance.dto.SelfWarrantyVO; +import com.itheima.sfbx.insurance.pojo.WarrantyOrder; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WarrantyOrderVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:合同扣款计划服务类 + */ +public interface IWarrantyOrderService extends IService{ + + /** + * @Description 多条件查询合同扣款计划分页 + * @param warrantyOrderVO 合同扣款计划查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyOrderVO warrantyOrderVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询合同扣款计划 + * @param warrantyOrderId 合同信息ID + * @return WarrantyOrderVO + */ + WarrantyOrderVO findById(String warrantyOrderId); + + /** + * @Description 查询合同扣款计划 + * @param warrantyOrderId 合同信息ID + * @return WarrantyOrderVO + */ + WarrantyOrderVO findByIdAndOrderState(String warrantyOrderId,String OrderState); + + /** + * @Description 合同扣款计划新增 + * @param warrantyOrderVO 合同扣款计划查询条件 + * @return WarrantyOrderVO + */ + WarrantyOrderVO save(WarrantyOrderVO warrantyOrderVO); + + /** + * @Description 合同扣款计划修改 + * @param warrantyOrderVO 合同扣款计划对象 + * @return WarrantyOrderVO + */ + Boolean update(WarrantyOrderVO warrantyOrderVO); + + /** + * @Description 合同扣款计划删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询合同扣款计划列表 + * @param warrantyOrderVO 查询条件 + * @return: List + */ + List findList(WarrantyOrderVO warrantyOrderVO); + + /*** + * @description 一次性支付 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return 支付会话签名 + */ + TradeVO doPayment(String warrantyOrderId, String tradingChannel); + + + /*** + * @description 关闭支付 + * @param tradeOrderNo 交易订单号 + * @param tradingChannel 支付渠道 + * @return 支付会话签名 + */ + TradeVO doClose(String tradeOrderNo, String tradingChannel); + + /*** + * @description 独立签约 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return 签约唤醒签名 + */ + String signContract(String warrantyOrderId, String tradingChannel); + + /*** + * @description 签约同步 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @param agreementNo 支付签约号 + * @return + */ + Boolean signContractSync(String warrantyOrderId, String tradingChannel, String agreementNo); + + /*** + * @description 关闭签约 + * @param warrantyOrderId 合同订单Id + * @param tradingChannel 支付渠道 + * @return + */ + Boolean doCloseSignContract(String warrantyOrderId, String tradingChannel); + + /*** + * @description 计划任务:周期代扣 + * @return + */ + Boolean periodicPay(); + + /** + * 统计分析: 统计保险数量及金额数量 + * @return + */ + AnalysisCustomerInsuranceDTO analysisInsurance(); + + /** + * 统计分析:投保人性别统计 + * @return + */ + AnalysisCustomerSexDTO analysisWarrantySex(); + + /** + * 统计分析:统计投保人投保保单类型和对应类型的保单数量 + * @return + */ + List analysisCustomerInsuranceType(); + + /** + * description 同步合同支付结果 + * @param orderNo 合同订单编号 + * @param tradeState 交易状态 + * @return + */ + Boolean syncPayment(String orderNo,String tradeState); + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyRenewalService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyRenewalService.java new file mode 100644 index 0000000..0f918cd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyRenewalService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WarrantyRenewal; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WarrantyRenewalVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:合同续期服务类 + */ +public interface IWarrantyRenewalService extends IService { + + /** + * @Description 多条件查询合同续期分页 + * @param warrantyRenewalVO 合同续期查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyRenewalVO warrantyRenewalVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询合同续期 + * @param warrantyRenewalId 合同信息ID + * @return WarrantyRenewalVO + */ + WarrantyRenewalVO findById(String warrantyRenewalId); + + /** + * @Description 合同续期新增 + * @param warrantyRenewalVO 合同续期查询条件 + * @return WarrantyRenewalVO + */ + WarrantyRenewalVO save(WarrantyRenewalVO warrantyRenewalVO); + + /** + * @Description 合同续期修改 + * @param warrantyRenewalVO 合同续期对象 + * @return WarrantyRenewalVO + */ + Boolean update(WarrantyRenewalVO warrantyRenewalVO); + + /** + * @Description 合同续期删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询合同续期列表 + * @param warrantyRenewalVO 查询条件 + * @return: List + */ + List findList(WarrantyRenewalVO warrantyRenewalVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyService.java new file mode 100644 index 0000000..e584d5a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyService.java @@ -0,0 +1,143 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.pojo.Warranty; +import com.baomidou.mybatisplus.extension.service.IService; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.springframework.transaction.annotation.Transactional; + +import java.util.List; + +/** + * @Description:合同信息服务类 + */ +public interface IWarrantyService extends IService { + + /** + * @Description 多条件查询合同信息分页 + * @param warrantyVO 合同信息查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyVO warrantyVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询合同信息 + * @param warrantyId 合同信息ID + * @return WarrantyVO + */ + WarrantyVO findById(String warrantyId); + + /** + * @Description 合同信息新增 + * @param warrantyVO 合同信息查询条件 + * @return WarrantyVO + */ + WarrantyVO save(WarrantyVO warrantyVO); + + /** + * @Description 合同信息修改 + * @param warrantyVO 合同信息对象 + * @return WarrantyVO + */ + Boolean update(WarrantyVO warrantyVO); + + /** + * @Description 合同信息删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询合同信息列表 + * @param warrantyVO 查询条件 + * @return: List + */ + List findList(WarrantyVO warrantyVO); + + /** + * 查询我的保险数量 + * @return + */ + SelfWarrantyVO findMyWarrantyNums(UserVO userVO) ; + + /** + * 获取家庭人身保障 + * @return + */ + List findHomeSafeInfo(UserVO userVO); + + /*** + * @description 保险投保 + * @param doInsureVo 保险产品VO对象 + * @return 保险合同 + */ + WarrantyVO doInsure(DoInsureVo doInsureVo); + + /*** + * @description 我的保单 + * @param userVO 投保人 + * @return 保险合同 + */ + List myWarrantyVOs(UserVO userVO,CustomerRelationVO customerRelationVO); + + /** + * 我的保单数量 + * @param userVO + * @return + */ + MyWarrantyInfoVO myWarrantyNums(UserVO userVO); + + /*** + * @description 核保补发 + * @return + */ + void sendCheckInfo(); + + /*** + * @description 保批补发 + * @return + */ + void sendApproveInfo(); + + /*** + * @description 查询合同及合同为支付订单 + * @param warrantyId + * @return + */ + WarrantyVO findWarranty(String warrantyId); + + /** + * description 根据合同编号查询合同信息 + * @param warrantyNo + * @return + */ + WarrantyVO findByWarrantyNo(String warrantyNo); + + /*** + * @description 清理合同保单 + * @param warrantyNo + * @return + */ + Boolean cleanWarranty(String warrantyNo); + + /** + * 计划任务:日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + SaleReportDTO doInsureDetailDay(String reportTime); + + /** + * 计划任务:统计日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + List doInsureCategory(String reportTime); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyVerifyService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyVerifyService.java new file mode 100644 index 0000000..223f2b6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWarrantyVerifyService.java @@ -0,0 +1,58 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WarrantyVerify; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WarrantyVerifyVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:合同核保服务类 + */ +public interface IWarrantyVerifyService extends IService { + + /** + * @Description 多条件查询合同核保分页 + * @param warrantyVerifyVO 合同核保查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WarrantyVerifyVO warrantyVerifyVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询合同核保 + * @param warrantyVerifyId 合同信息ID + * @return WarrantyVerifyVO + */ + WarrantyVerifyVO findById(String warrantyVerifyId); + + /** + * @Description 合同核保新增 + * @param warrantyVerifyVO 合同核保查询条件 + * @return WarrantyVerifyVO + */ + WarrantyVerifyVO save(WarrantyVerifyVO warrantyVerifyVO); + + /** + * @Description 合同核保修改 + * @param warrantyVerifyVO 合同核保对象 + * @return WarrantyVerifyVO + */ + Boolean update(WarrantyVerifyVO warrantyVerifyVO); + + /** + * @Description 合同核保删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询合同核保列表 + * @param warrantyVerifyVO 查询条件 + * @return: List + */ + List findList(WarrantyVerifyVO warrantyVerifyVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeFlowNodeService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeFlowNodeService.java new file mode 100644 index 0000000..4aaaad7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeFlowNodeService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WorryFreeFlowNode; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WorryFreeFlowNodeVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:省心配流程节点记录服务类 + */ +public interface IWorryFreeFlowNodeService extends IService { + + /** + * @Description 多条件查询省心配流程节点记录分页 + * @param worryFreeFlowNodeVO 省心配流程节点记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WorryFreeFlowNodeVO worryFreeFlowNodeVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询省心配流程节点记录 + * @param worryFreeFlowNodeId 合同信息ID + * @return WorryFreeFlowNodeVO + */ + WorryFreeFlowNodeVO findById(String worryFreeFlowNodeId); + + /** + * @Description 省心配流程节点记录新增 + * @param worryFreeFlowNodeVO 省心配流程节点记录查询条件 + * @return WorryFreeFlowNodeVO + */ + WorryFreeFlowNodeVO save(WorryFreeFlowNodeVO worryFreeFlowNodeVO); + + /** + * @Description 省心配流程节点记录修改 + * @param worryFreeFlowNodeVO 省心配流程节点记录对象 + * @return WorryFreeFlowNodeVO + */ + Boolean update(WorryFreeFlowNodeVO worryFreeFlowNodeVO); + + /** + * @Description 省心配流程节点记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询省心配流程节点记录列表 + * @param worryFreeFlowNodeVO 查询条件 + * @return: List + */ + List findList(WorryFreeFlowNodeVO worryFreeFlowNodeVO); + + /** + * 根据登录用户id查询流程节点 + * @param id + * @return + */ + List flowNode(Long id); + + void cleanCustomerHistry(String id); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceMatchService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceMatchService.java new file mode 100644 index 0000000..ebe51d7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceMatchService.java @@ -0,0 +1,68 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO; +import com.itheima.sfbx.insurance.pojo.WorryFreeInsuranceMatch; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WorryFreeInsuranceMatchVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:省心配保险推荐记录服务类 + */ +public interface IWorryFreeInsuranceMatchService extends IService { + + /** + * @Description 多条件查询省心配保险推荐记录分页 + * @param worryFreeInsuranceMatchVO 省心配保险推荐记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询省心配保险推荐记录 + * @param worryFreeInsuranceMatchId 合同信息ID + * @return WorryFreeInsuranceMatchVO + */ + WorryFreeInsuranceMatchVO findById(String worryFreeInsuranceMatchId); + + /** + * @Description 省心配保险推荐记录新增 + * @param worryFreeInsuranceMatchVO 省心配保险推荐记录查询条件 + * @return WorryFreeInsuranceMatchVO + */ + WorryFreeInsuranceMatchVO save(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO); + + /** + * @Description 省心配保险推荐记录修改 + * @param worryFreeInsuranceMatchVO 省心配保险推荐记录对象 + * @return WorryFreeInsuranceMatchVO + */ + Boolean update(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO); + + /** + * @Description 省心配保险推荐记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询省心配保险推荐记录列表 + * @param worryFreeInsuranceMatchVO 查询条件 + * @return: List + */ + List findList(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO); + + /** + * 根据当前登录用户获取对应的推荐产品列表 + * @param id + * @return + */ + List productList(Long id); + + void cleanCustomerHistry(String id); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceService.java new file mode 100644 index 0000000..e37efd5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeInsuranceService.java @@ -0,0 +1,4 @@ +package com.itheima.sfbx.insurance.service; + +public interface IWorryFreeInsuranceService { +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeRiskItemService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeRiskItemService.java new file mode 100644 index 0000000..4f1f0f2 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeRiskItemService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WorryFreeRiskItem; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WorryFreeRiskItemVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:服务类 + */ +public interface IWorryFreeRiskItemService extends IService { + + /** + * @Description 多条件查询分页 + * @param worryFreeRiskItemVO 查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WorryFreeRiskItemVO worryFreeRiskItemVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询 + * @param worryFreeRiskItemId 合同信息ID + * @return WorryFreeRiskItemVO + */ + WorryFreeRiskItemVO findById(String worryFreeRiskItemId); + + /** + * @Description 新增 + * @param worryFreeRiskItemVO 查询条件 + * @return WorryFreeRiskItemVO + */ + WorryFreeRiskItemVO save(WorryFreeRiskItemVO worryFreeRiskItemVO); + + /** + * @Description 修改 + * @param worryFreeRiskItemVO 对象 + * @return WorryFreeRiskItemVO + */ + Boolean update(WorryFreeRiskItemVO worryFreeRiskItemVO); + + /** + * @Description 删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询列表 + * @param worryFreeRiskItemVO 查询条件 + * @return: List + */ + List findList(WorryFreeRiskItemVO worryFreeRiskItemVO); + + /** + * 根据当前登录人获取对应的风险项 + * @param id + * @return + */ + List findMyRiskItem(Long id); + + void cleanCustomerHistry(String id); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeSafeguardQuotaService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeSafeguardQuotaService.java new file mode 100644 index 0000000..fe0d53c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/IWorryFreeSafeguardQuotaService.java @@ -0,0 +1,67 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.insurance.pojo.WorryFreeSafeguardQuota; +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.insurance.dto.WorryFreeSafeguardQuotaVO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:省心配流程保障配额记录服务类 + */ +public interface IWorryFreeSafeguardQuotaService extends IService { + + /** + * @Description 多条件查询省心配流程保障配额记录分页 + * @param worryFreeSafeguardQuotaVO 省心配流程保障配额记录查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page + */ + Page findPage(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO, int pageNum, int pageSize); + + /** + * @Description 多条件查询省心配流程保障配额记录 + * @param worryFreeSafeguardQuotaId 合同信息ID + * @return WorryFreeSafeguardQuotaVO + */ + WorryFreeSafeguardQuotaVO findById(String worryFreeSafeguardQuotaId); + + /** + * @Description 省心配流程保障配额记录新增 + * @param worryFreeSafeguardQuotaVO 省心配流程保障配额记录查询条件 + * @return WorryFreeSafeguardQuotaVO + */ + WorryFreeSafeguardQuotaVO save(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO); + + /** + * @Description 省心配流程保障配额记录修改 + * @param worryFreeSafeguardQuotaVO 省心配流程保障配额记录对象 + * @return WorryFreeSafeguardQuotaVO + */ + Boolean update(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO); + + /** + * @Description 省心配流程保障配额记录删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询省心配流程保障配额记录列表 + * @param worryFreeSafeguardQuotaVO 查询条件 + * @return: List + */ + List findList(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO); + + /** + * 获取保险配额 + * @param customerId 用户信息ID + * @return + */ + WorryFreeSafeguardQuotaVO findSaferQuota(Long customerId); + + void cleanCustomerHistry(String id); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/TripartiteInsureService.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/TripartiteInsureService.java new file mode 100644 index 0000000..51a4aad --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/TripartiteInsureService.java @@ -0,0 +1,19 @@ +package com.itheima.sfbx.insurance.service; + +import com.itheima.sfbx.dto.ResponseDTO; +import com.itheima.sfbx.framework.commons.dto.external.TripartiteInsureDTO; +import com.itheima.sfbx.insurance.dto.WarrantyVO; + +/** + * 三方接口提供的Service + */ +public interface TripartiteInsureService { + + /*** + * @description 三方投保接口 + * + * @param warrantyVO + * @return + */ + ResponseDTO insure(WarrantyVO warrantyVO); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BannerServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BannerServiceImpl.java new file mode 100644 index 0000000..91a008e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BannerServiceImpl.java @@ -0,0 +1,238 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.Banner; +import com.itheima.sfbx.insurance.mapper.BannerMapper; +import com.itheima.sfbx.insurance.service.IBannerService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.seata.spring.annotation.GlobalTransactional; +import com.itheima.sfbx.insurance.constant.BannerCacheConstant; +import com.itheima.sfbx.insurance.dto.BannerVO; +import com.itheima.sfbx.insurance.enums.BannerEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:服务实现类 + */ +@Slf4j +@Service +public class BannerServiceImpl extends ServiceImpl implements IBannerService { + + @Autowired + FileBusinessFeign fileBusinessFeign; + + /*** + * @description 多条件组合 + * @param bannerVO + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(BannerVO bannerVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //排序查询 + if (!EmptyUtil.isNullOrEmpty(bannerVO.getSortNo())) { + queryWrapper.lambda().eq(Banner::getSortNo,bannerVO.getSortNo()); + } + //调整路径查询 + if (!EmptyUtil.isNullOrEmpty(bannerVO.getUrl())) { + queryWrapper.lambda().likeRight(Banner::getUrl,bannerVO.getUrl()); + } + //导航类型(0首页 1推荐) + if (!EmptyUtil.isNullOrEmpty(bannerVO.getBannerType())) { + queryWrapper.lambda().eq(Banner::getBannerType,bannerVO.getBannerType()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(bannerVO.getDataState())) { + queryWrapper.lambda().eq(Banner::getDataState,bannerVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Banner::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = BannerCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#bannerVO.hashCode()") + public Page findPage(BannerVO bannerVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page BannerPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(bannerVO); + //执行分页查询 + Page bannerVOPage = BeanConv.toPage( + page(BannerPage, queryWrapper), BannerVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(bannerVOPage)&& + !EmptyUtil.isNullOrEmpty(bannerVOPage.getRecords())){ + //获得所有业务主键ID + List bannerIds = bannerVOPage.getRecords() + .stream().map(BannerVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(bannerIds)); + bannerVOPage.getRecords().forEach(bannerVOHandler->{ + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + fileVOs.forEach(fileVO -> { + if (bannerVOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + bannerVOHandler.setFileVOs(fileVOsHandler); + }); + } + //返回结果 + return bannerVOPage; + }catch (Exception e){ + log.error("分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = BannerCacheConstant.BASIC,key ="#bannerId") + public BannerVO findById(String bannerId) { + try { + //执行查询 + return BeanConv.toBean(getById(bannerId),BannerVO.class); + }catch (Exception e){ + log.error("单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.FIND_ONE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = BannerCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BannerCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =BannerCacheConstant.BASIC,key = "#result.id")}) + public BannerVO save(BannerVO bannerVO) { + try { + //转换BannerVO为Banner + Banner banner = BeanConv.toBean(bannerVO, Banner.class); + boolean flag = save(banner); + if (!flag){ + throw new RuntimeException("保存失败"); + } + //保存附件信息 + if (EmptyUtil.isNullOrEmpty(bannerVO.getFileVOs())){ + throw new RuntimeException("合同附件为空"); + } + //构建附件对象 + bannerVO.getFileVOs().forEach(fileVO -> { + fileVO.setBusinessId(banner.getId()); + }); + //调用附件接口 + List fileVOs = fileBusinessFeign.bindBatchFile(Lists.newArrayList(bannerVO.getFileVOs())); + if (EmptyUtil.isNullOrEmpty(fileVOs)){ + throw new RuntimeException("合同附件绑定失败"); + } + //转换返回对象BannerVO + BannerVO bannerVOHandler = BeanConv.toBean(banner, BannerVO.class); + bannerVOHandler.setFileVOs(fileVOs); + return bannerVOHandler; + }catch (Exception e){ + log.error("保存异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.SAVE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = BannerCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BannerCacheConstant.LIST,allEntries = true), + @CacheEvict(value = BannerCacheConstant.BASIC,key = "#bannerVO.id")}) + public Boolean update(BannerVO bannerVO) { + try { + //转换BannerVO为Banner + Banner banner = BeanConv.toBean(bannerVO, Banner.class); + boolean flag = updateById(banner); + if (!flag){ + throw new RuntimeException("修改失败"); + } + //替换附件信息 + flag = fileBusinessFeign.replaceBindBatchFile(Lists.newArrayList(bannerVO.getFileVOs())); + if (!flag){ + throw new RuntimeException("移除附件失败"); + } + return flag; + }catch (Exception e){ + log.error("修改异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.UPDATE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = BannerCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BannerCacheConstant.LIST,allEntries = true), + @CacheEvict(value = BannerCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除失败"); + } + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag){ + throw new RuntimeException("删除附件失败"); + } + return flag; + }catch (Exception e){ + log.error("删除异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = BannerCacheConstant.LIST,key ="#bannerVO.hashCode()") + public List findList(BannerVO bannerVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(bannerVO); + //执行列表查询 + List bannerVOs = BeanConv.toBeanList(list(queryWrapper),BannerVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(bannerVOs)){ + //获得所有业务主键ID + List bannerIds = bannerVOs.stream().map(BannerVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(bannerIds)); + bannerVOs.forEach(bannerVOHandler->{ + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + fileVOs.forEach(fileVO -> { + if (bannerVOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + bannerVOHandler.setFileVOs(fileVOsHandler); + }); + } + return bannerVOs; + }catch (Exception e){ + log.error("列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BannerEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BrowsingHistoryServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BrowsingHistoryServiceImpl.java new file mode 100644 index 0000000..e0b3f5c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/BrowsingHistoryServiceImpl.java @@ -0,0 +1,188 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.insurance.pojo.BrowsingHistory; +import com.itheima.sfbx.insurance.mapper.BrowsingHistoryMapper; +import com.itheima.sfbx.insurance.service.IBrowsingHistoryService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.BrowsingHistoryCacheConstant; +import com.itheima.sfbx.insurance.dto.BrowsingHistoryVO; +import com.itheima.sfbx.insurance.enums.BrowsingHistoryEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; + +/** + * @Description:浏览记录服务实现类 + */ +@Slf4j +@Service +public class BrowsingHistoryServiceImpl extends ServiceImpl implements IBrowsingHistoryService { + + + /*** + * @description 浏览记录多条件组合 + * @param browsingHistoryVO 浏览记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(BrowsingHistoryVO browsingHistoryVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险ID查询 + if (!EmptyUtil.isNullOrEmpty(browsingHistoryVO.getInsuranceId())) { + queryWrapper.lambda().eq(BrowsingHistory::getInsuranceId,browsingHistoryVO.getInsuranceId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(browsingHistoryVO.getSortNo())) { + queryWrapper.lambda().eq(BrowsingHistory::getSortNo,browsingHistoryVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(browsingHistoryVO.getDataState())) { + queryWrapper.lambda().eq(BrowsingHistory::getDataState,browsingHistoryVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(BrowsingHistory::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = BrowsingHistoryCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#browsingHistoryVO.hashCode()") + public Page findPage(BrowsingHistoryVO browsingHistoryVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page BrowsingHistoryPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(browsingHistoryVO); + //执行分页查询 + Page browsingHistoryVOPage = BeanConv.toPage( + page(BrowsingHistoryPage, queryWrapper), BrowsingHistoryVO.class); + //返回结果 + return browsingHistoryVOPage; + }catch (Exception e){ + log.error("浏览记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = BrowsingHistoryCacheConstant.BASIC,key ="#browsingHistoryId") + public BrowsingHistoryVO findById(String browsingHistoryId) { + try { + //执行查询 + return BeanConv.toBean(getById(browsingHistoryId),BrowsingHistoryVO.class); + }catch (Exception e){ + log.error("浏览记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = BrowsingHistoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BrowsingHistoryCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =BrowsingHistoryCacheConstant.BASIC,key = "#result.id")}) + public BrowsingHistoryVO save(BrowsingHistoryVO browsingHistoryVO) { + try { + //转换BrowsingHistoryVO为BrowsingHistory + BrowsingHistory browsingHistory = BeanConv.toBean(browsingHistoryVO, BrowsingHistory.class); + boolean flag = save(browsingHistory); + if (!flag){ + throw new RuntimeException("保存浏览记录失败"); + } + //转换返回对象BrowsingHistoryVO + BrowsingHistoryVO browsingHistoryVOHandler = BeanConv.toBean(browsingHistory, BrowsingHistoryVO.class); + return browsingHistoryVOHandler; + }catch (Exception e){ + log.error("保存浏览记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = BrowsingHistoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BrowsingHistoryCacheConstant.LIST,allEntries = true), + @CacheEvict(value = BrowsingHistoryCacheConstant.BASIC,key = "#browsingHistoryVO.id")}) + public Boolean update(BrowsingHistoryVO browsingHistoryVO) { + try { + //转换BrowsingHistoryVO为BrowsingHistory + BrowsingHistory browsingHistory = BeanConv.toBean(browsingHistoryVO, BrowsingHistory.class); + boolean flag = updateById(browsingHistory); + if (!flag){ + throw new RuntimeException("修改浏览记录失败"); + } + return flag; + }catch (Exception e){ + log.error("修改浏览记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = BrowsingHistoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = BrowsingHistoryCacheConstant.LIST,allEntries = true), + @CacheEvict(value = BrowsingHistoryCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除浏览记录失败"); + } + return flag; + }catch (Exception e){ + log.error("删除浏览记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = BrowsingHistoryCacheConstant.LIST,key ="#browsingHistoryVO.hashCode()") + public List findList(BrowsingHistoryVO browsingHistoryVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(browsingHistoryVO); + //执行列表查询 + List browsingHistoryVOs = BeanConv.toBeanList(list(queryWrapper),BrowsingHistoryVO.class); + return browsingHistoryVOs; + }catch (Exception e){ + log.error("浏览记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.LIST_FAIL); + } + } + + /** + * 找到我近半年的历史记录 + * @return + */ + @Cacheable(value = BrowsingHistoryCacheConstant.LIST,key ="#userVO.getId()") + @Override + public List findMyHistory(UserVO userVO) { + try { + BrowsingHistoryVO browsingHistoryVO = BrowsingHistoryVO.builder().createBy(userVO.getId()).dataState(SuperConstant.DATA_STATE_0).build(); + QueryWrapper queryWrapper = queryWrapper(browsingHistoryVO); + queryWrapper.last("limit 0, 10"); + List browsingHistoryVOs = BeanConv.toBeanList(list(queryWrapper), BrowsingHistoryVO.class); + return browsingHistoryVOs; + }catch (Exception e){ + log.error("浏览记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(BrowsingHistoryEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryCoefficentServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryCoefficentServiceImpl.java new file mode 100644 index 0000000..896be44 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryCoefficentServiceImpl.java @@ -0,0 +1,217 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.itheima.sfbx.insurance.enums.CategoryConditionEnum; +import com.itheima.sfbx.insurance.pojo.CategoryCoefficent; +import com.itheima.sfbx.insurance.mapper.CategoryCoefficentMapper; +import com.itheima.sfbx.insurance.pojo.CategoryCondition; +import com.itheima.sfbx.insurance.service.ICategoryCoefficentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.CategoryCoefficentCacheConstant; +import com.itheima.sfbx.insurance.dto.CategoryCoefficentVO; +import com.itheima.sfbx.insurance.enums.CategoryCoefficentEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:分类系数项服务实现类 + */ +@Slf4j +@Service +public class CategoryCoefficentServiceImpl extends ServiceImpl implements ICategoryCoefficentService { + + + /*** + * @description 分类系数项多条件组合 + * @param categoryCoefficentVO 分类系数项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CategoryCoefficentVO categoryCoefficentVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(categoryCoefficentVO.getCategoryNo())) { + queryWrapper.lambda().eq(CategoryCoefficent::getCategoryNo,categoryCoefficentVO.getCategoryNo()); + } + //系数key查询 + if (!EmptyUtil.isNullOrEmpty(categoryCoefficentVO.getCoefficentKey())) { + queryWrapper.lambda().eq(CategoryCoefficent::getCoefficentKey,categoryCoefficentVO.getCoefficentKey()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(categoryCoefficentVO.getSortNo())) { + queryWrapper.lambda().eq(CategoryCoefficent::getSortNo,categoryCoefficentVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(categoryCoefficentVO.getRemake())) { + queryWrapper.lambda().eq(CategoryCoefficent::getRemake,categoryCoefficentVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(categoryCoefficentVO.getDataState())) { + queryWrapper.lambda().eq(CategoryCoefficent::getDataState,categoryCoefficentVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CategoryCoefficent::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = CategoryCoefficentCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#categoryCoefficentVO.hashCode()") + public Page findPage(CategoryCoefficentVO categoryCoefficentVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CategoryCoefficentPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryCoefficentVO); + //执行分页查询 + Page categoryCoefficentVOPage = BeanConv.toPage( + page(CategoryCoefficentPage, queryWrapper), CategoryCoefficentVO.class); + //返回结果 + return categoryCoefficentVOPage; + }catch (Exception e){ + log.error("分类系数项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = CategoryCoefficentCacheConstant.BASIC,key ="#categoryCoefficentId") + public CategoryCoefficentVO findById(String categoryCoefficentId) { + try { + //执行查询 + return BeanConv.toBean(getById(categoryCoefficentId),CategoryCoefficentVO.class); + }catch (Exception e){ + log.error("分类系数项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCoefficentCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CategoryCoefficentCacheConstant.BASIC,key = "#result.id")}) + public CategoryCoefficentVO save(CategoryCoefficentVO categoryCoefficentVO) { + try { + //转换CategoryCoefficentVO为CategoryCoefficent + CategoryCoefficent categoryCoefficent = BeanConv.toBean(categoryCoefficentVO, CategoryCoefficent.class); + boolean flag = save(categoryCoefficent); + if (!flag){ + throw new RuntimeException("保存分类系数项失败"); + } + //转换返回对象CategoryCoefficentVO + CategoryCoefficentVO categoryCoefficentVOHandler = BeanConv.toBean(categoryCoefficent, CategoryCoefficentVO.class); + return categoryCoefficentVOHandler; + }catch (Exception e){ + log.error("保存分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCoefficentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryCoefficentCacheConstant.BASIC,key = "#categoryCoefficentVO.id")}) + public Boolean update(CategoryCoefficentVO categoryCoefficentVO) { + try { + //转换CategoryCoefficentVO为CategoryCoefficent + CategoryCoefficent categoryCoefficent = BeanConv.toBean(categoryCoefficentVO, CategoryCoefficent.class); + boolean flag = updateById(categoryCoefficent); + if (!flag){ + throw new RuntimeException("修改分类系数项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCoefficentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryCoefficentCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除分类系数项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CategoryCoefficentCacheConstant.LIST,key ="#categoryCoefficentVO.hashCode()") + public List findList(CategoryCoefficentVO categoryCoefficentVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryCoefficentVO); + //执行列表查询 + List categoryCoefficentVOs = BeanConv.toBeanList(list(queryWrapper),CategoryCoefficentVO.class); + return categoryCoefficentVOs; + }catch (Exception e){ + log.error("分类系数项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNo(String categoryNo) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().eq(CategoryCoefficent::getCategoryNo,categoryNo); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.DEL_FAIL); + } + } + + @Override + public List findListInCategoryNo(Set categoryNoSet) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(CategoryCoefficent::getCategoryNo,categoryNoSet); + return BeanConv.toBeanList(list(queryWrapper),CategoryCoefficentVO.class); + }catch (Exception e){ + log.error("删除分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNos(List categoryNos) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(CategoryCoefficent::getCategoryNo,categoryNos); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除分类系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryCoefficentEnum.DEL_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryConditionServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryConditionServiceImpl.java new file mode 100644 index 0000000..784f449 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryConditionServiceImpl.java @@ -0,0 +1,271 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.CategoryConditionCacheConstant; +import com.itheima.sfbx.insurance.dto.CategoryConditionVO; +import com.itheima.sfbx.insurance.dto.ConditionVO; +import com.itheima.sfbx.insurance.enums.CategoryConditionEnum; +import com.itheima.sfbx.insurance.mapper.CategoryConditionMapper; +import com.itheima.sfbx.insurance.pojo.CategoryCondition; +import com.itheima.sfbx.insurance.service.ICategoryConditionService; +import com.itheima.sfbx.insurance.service.IConditionService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +/** + * @Description:分类筛选项服务实现类 + */ +@Slf4j +@Service +public class CategoryConditionServiceImpl extends ServiceImpl implements ICategoryConditionService { + + @Autowired + private IConditionService conditionService; + + + /*** + * @description 分类筛选项多条件组合 + * @param categoryConditionVO 分类筛选项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CategoryConditionVO categoryConditionVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(categoryConditionVO.getCategoryNo())) { + queryWrapper.lambda().eq(CategoryCondition::getCategoryNo,categoryConditionVO.getCategoryNo()); + } + //条件key查询 + if (!EmptyUtil.isNullOrEmpty(categoryConditionVO.getConditionKey())) { + queryWrapper.lambda().eq(CategoryCondition::getConditionKey,categoryConditionVO.getConditionKey()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(categoryConditionVO.getSortNo())) { + queryWrapper.lambda().eq(CategoryCondition::getSortNo,categoryConditionVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(categoryConditionVO.getRemake())) { + queryWrapper.lambda().eq(CategoryCondition::getRemake,categoryConditionVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(categoryConditionVO.getDataState())) { + queryWrapper.lambda().eq(CategoryCondition::getDataState,categoryConditionVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CategoryCondition::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = CategoryConditionCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#categoryConditionVO.hashCode()") + public Page findPage(CategoryConditionVO categoryConditionVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CategoryConditionPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryConditionVO); + //执行分页查询 + Page categoryConditionVOPage = BeanConv.toPage( + page(CategoryConditionPage, queryWrapper), CategoryConditionVO.class); + //返回结果 + return categoryConditionVOPage; + }catch (Exception e){ + log.error("分类筛选项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = CategoryConditionCacheConstant.BASIC,key ="#categoryConditionId") + public CategoryConditionVO findById(String categoryConditionId) { + try { + //执行查询 + return BeanConv.toBean(getById(categoryConditionId),CategoryConditionVO.class); + }catch (Exception e){ + log.error("分类筛选项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryConditionCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CategoryConditionCacheConstant.BASIC,key = "#result.id")}) + public CategoryConditionVO save(CategoryConditionVO categoryConditionVO) { + try { + //转换CategoryConditionVO为CategoryCondition + CategoryCondition categoryCondition = BeanConv.toBean(categoryConditionVO, CategoryCondition.class); + boolean flag = save(categoryCondition); + if (!flag){ + throw new RuntimeException("保存分类筛选项失败"); + } + //转换返回对象CategoryConditionVO + CategoryConditionVO categoryConditionVOHandler = BeanConv.toBean(categoryCondition, CategoryConditionVO.class); + return categoryConditionVOHandler; + }catch (Exception e){ + log.error("保存分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryConditionCacheConstant.BASIC,key = "#categoryConditionVO.id")}) + public Boolean update(CategoryConditionVO categoryConditionVO) { + try { + //转换CategoryConditionVO为CategoryCondition + CategoryCondition categoryCondition = BeanConv.toBean(categoryConditionVO, CategoryCondition.class); + boolean flag = updateById(categoryCondition); + if (!flag){ + throw new RuntimeException("修改分类筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryConditionCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除分类筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CategoryConditionCacheConstant.LIST,key ="#categoryConditionVO.hashCode()") + public List findList(CategoryConditionVO categoryConditionVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryConditionVO); + List categoryConditions = list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(categoryConditions)){ + throw new RuntimeException("分类未定义筛选项目"); + } + List categoryConditionVOs = BeanConv.toBeanList(categoryConditions,CategoryConditionVO.class); + List conditionKeys = categoryConditions.stream().map(CategoryCondition::getConditionKey).collect(Collectors.toList()); + List conditionVOs = conditionService.findInConditionKeys(conditionKeys); + categoryConditionVOs.forEach(n->{ + conditionVOs.forEach(k->{ + if (n.getConditionKey().equals(k.getConditionKey())){ + n.setConditionVal(k.getConditionVal()); + } + }); + }); + return categoryConditionVOs; + }catch (Exception e){ + log.error("分类筛选项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.LIST_FAIL); + } + } + + /** + * 根据分类查询出对应的筛选项 + * @param categoryNo 分类编号 + * @return + */ + @Override + public List findConditionByType(String categoryNo) { + try { + //拿到所有的分类筛选项 + CategoryConditionVO categoryConditionVO = CategoryConditionVO.builder().dataState(SuperConstant.DATA_STATE_0).build(); + if(StrUtil.isNotEmpty(categoryNo)){ + categoryConditionVO.setCategoryNo(categoryNo); + } + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryConditionVO); + //执行列表查询 + List categoryConditionVOs = BeanConv.toBeanList(list(queryWrapper),CategoryConditionVO.class); + if (!EmptyUtil.isNullOrEmpty(categoryConditionVOs)){ + //所有的筛选项的key + List conditionKeys = categoryConditionVOs.stream().map(CategoryConditionVO::getConditionKey).collect(Collectors.toList()); + List inConditionKeys = conditionService.findInConditionKeys(conditionKeys); + categoryConditionVOs.forEach(n->{ + inConditionKeys.forEach(k->{ + if (n.getConditionKey().equals(k.getConditionKey())) + n.setConditionVal(k.getConditionVal()); + }); + }); + } + return categoryConditionVOs; + }catch (Exception e){ + log.error("分类筛选项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNo(String categoryNo) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().eq(CategoryCondition::getCategoryNo,categoryNo); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.DEL_FAIL); + } + + } + + @Override + public List findListInCategoryNo(Set categoryNoSet) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(CategoryCondition::getCategoryNo,categoryNoSet); + return BeanConv.toBeanList(list(queryWrapper),CategoryConditionVO.class); + }catch (Exception e){ + log.error("查询分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNos(List categoryNos) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(CategoryCondition::getCategoryNo,categoryNos); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除分类筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryConditionEnum.DEL_FAIL); + } + } + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategorySafeguardServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategorySafeguardServiceImpl.java new file mode 100644 index 0000000..ee65297 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategorySafeguardServiceImpl.java @@ -0,0 +1,217 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.itheima.sfbx.insurance.enums.CategoryCoefficentEnum; +import com.itheima.sfbx.insurance.pojo.CategoryCoefficent; +import com.itheima.sfbx.insurance.pojo.CategorySafeguard; +import com.itheima.sfbx.insurance.mapper.CategorySafeguardMapper; +import com.itheima.sfbx.insurance.service.ICategorySafeguardService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.CategorySafeguardCacheConstant; +import com.itheima.sfbx.insurance.dto.CategorySafeguardVO; +import com.itheima.sfbx.insurance.enums.CategorySafeguardEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:分类保障项服务实现类 + */ +@Slf4j +@Service +public class CategorySafeguardServiceImpl extends ServiceImpl implements ICategorySafeguardService { + + + /*** + * @description 分类保障项多条件组合 + * @param categorySafeguardVO 分类保障项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CategorySafeguardVO categorySafeguardVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(categorySafeguardVO.getCategoryNo())) { + queryWrapper.lambda().eq(CategorySafeguard::getCategoryNo,categorySafeguardVO.getCategoryNo()); + } + //条例维度查询 + if (!EmptyUtil.isNullOrEmpty(categorySafeguardVO.getSafeguardKey())) { + queryWrapper.lambda().eq(CategorySafeguard::getSafeguardKey,categorySafeguardVO.getSafeguardKey()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(categorySafeguardVO.getSortNo())) { + queryWrapper.lambda().eq(CategorySafeguard::getSortNo,categorySafeguardVO.getSortNo()); + } + //补充说明查询 + if (!EmptyUtil.isNullOrEmpty(categorySafeguardVO.getRemake())) { + queryWrapper.lambda().eq(CategorySafeguard::getRemake,categorySafeguardVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(categorySafeguardVO.getDataState())) { + queryWrapper.lambda().eq(CategorySafeguard::getDataState,categorySafeguardVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CategorySafeguard::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = CategorySafeguardCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#categorySafeguardVO.hashCode()") + public Page findPage(CategorySafeguardVO categorySafeguardVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CategorySafeguardPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categorySafeguardVO); + //执行分页查询 + Page categorySafeguardVOPage = BeanConv.toPage( + page(CategorySafeguardPage, queryWrapper), CategorySafeguardVO.class); + //返回结果 + return categorySafeguardVOPage; + }catch (Exception e){ + log.error("分类保障项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = CategorySafeguardCacheConstant.BASIC,key ="#categorySafeguardId") + public CategorySafeguardVO findById(String categorySafeguardId) { + try { + //执行查询 + return BeanConv.toBean(getById(categorySafeguardId),CategorySafeguardVO.class); + }catch (Exception e){ + log.error("分类保障项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategorySafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategorySafeguardCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CategorySafeguardCacheConstant.BASIC,key = "#result.id")}) + public CategorySafeguardVO save(CategorySafeguardVO categorySafeguardVO) { + try { + //转换CategorySafeguardVO为CategorySafeguard + CategorySafeguard categorySafeguard = BeanConv.toBean(categorySafeguardVO, CategorySafeguard.class); + boolean flag = save(categorySafeguard); + if (!flag){ + throw new RuntimeException("保存分类保障项失败"); + } + //转换返回对象CategorySafeguardVO + CategorySafeguardVO categorySafeguardVOHandler = BeanConv.toBean(categorySafeguard, CategorySafeguardVO.class); + return categorySafeguardVOHandler; + }catch (Exception e){ + log.error("保存分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategorySafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategorySafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategorySafeguardCacheConstant.BASIC,key = "#categorySafeguardVO.id")}) + public Boolean update(CategorySafeguardVO categorySafeguardVO) { + try { + //转换CategorySafeguardVO为CategorySafeguard + CategorySafeguard categorySafeguard = BeanConv.toBean(categorySafeguardVO, CategorySafeguard.class); + boolean flag = updateById(categorySafeguard); + if (!flag){ + throw new RuntimeException("修改分类保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategorySafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategorySafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategorySafeguardCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除分类保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CategorySafeguardCacheConstant.LIST,key ="#categorySafeguardVO.hashCode()") + public List findList(CategorySafeguardVO categorySafeguardVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categorySafeguardVO); + //执行列表查询 + List categorySafeguardVOs = BeanConv.toBeanList(list(queryWrapper),CategorySafeguardVO.class); + return categorySafeguardVOs; + }catch (Exception e){ + log.error("分类保障项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNo(String categoryNo) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().eq(CategorySafeguard::getCategoryNo,categoryNo); + return remove(updateWrapper); + }catch (Exception e){ + log.error("根据分类no 删除分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.DEL_FAIL); + } + } + + @Override + public List findListInCategoryNo(Set categoryNoSet) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(CategorySafeguard::getCategoryNo,categoryNoSet); + return BeanConv.toBeanList(list(queryWrapper),CategorySafeguardVO.class); + }catch (Exception e){ + log.error("根据分类no 查询分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.LIST_FAIL); + } + } + + @Override + public Boolean deleteByCategoryNos(List categoryNos) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(CategorySafeguard::getCategoryNo,categoryNos); + return remove(updateWrapper); + }catch (Exception e){ + log.error("根据分类no 删除分类保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategorySafeguardEnum.DEL_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryServiceImpl.java new file mode 100644 index 0000000..3438385 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CategoryServiceImpl.java @@ -0,0 +1,470 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.basic.TreeItemVO; +import com.itheima.sfbx.framework.commons.dto.basic.TreeVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.NoProcessing; +import com.itheima.sfbx.insurance.constant.CategoryCacheConstant; +import com.itheima.sfbx.insurance.dto.CategoryCoefficentVO; +import com.itheima.sfbx.insurance.dto.CategoryConditionVO; +import com.itheima.sfbx.insurance.dto.CategorySafeguardVO; +import com.itheima.sfbx.insurance.dto.CategoryVO; +import com.itheima.sfbx.insurance.enums.CategoryEnum; +import com.itheima.sfbx.insurance.mapper.CategoryMapper; +import com.itheima.sfbx.insurance.pojo.Category; +import com.itheima.sfbx.insurance.pojo.CategoryCoefficent; +import com.itheima.sfbx.insurance.pojo.CategoryCondition; +import com.itheima.sfbx.insurance.pojo.CategorySafeguard; +import com.itheima.sfbx.insurance.service.ICategoryCoefficentService; +import com.itheima.sfbx.insurance.service.ICategoryConditionService; +import com.itheima.sfbx.insurance.service.ICategorySafeguardService; +import com.itheima.sfbx.insurance.service.ICategoryService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @Description:保险分类服务实现类 + */ +@Slf4j +@Service +public class CategoryServiceImpl extends ServiceImpl implements ICategoryService { + + @Autowired + ICategoryConditionService categoryConditionService; + + @Autowired + ICategoryCoefficentService categoryCoefficentService; + + @Autowired + ICategorySafeguardService categorySafeguardService; + + /*** + * @description 保险分类多条件组合 + * @param categoryVO 保险分类 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CategoryVO categoryVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //父分类编号查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getParentCategoryNo())) { + queryWrapper.lambda().eq(Category::getParentCategoryNo,categoryVO.getParentCategoryNo()); + } + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getCategoryNo())) { + queryWrapper.lambda().eq(Category::getCategoryNo,categoryVO.getCategoryNo()); + } + //分类名称查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getCategoryName())) { + queryWrapper.lambda().eq(Category::getCategoryName,categoryVO.getCategoryName()); + } + //图标查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getIcon())) { + queryWrapper.lambda().eq(Category::getIcon,categoryVO.getIcon()); + } + //是否叶子节点(0是 否1)查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getLeafNode())) { + queryWrapper.lambda().eq(Category::getLeafNode,categoryVO.getLeafNode()); + } + //是否显示在首页(0是 否1)查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getShowIndex())) { + queryWrapper.lambda().eq(Category::getShowIndex,categoryVO.getShowIndex()); + } + //校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getCheckRule())) { + queryWrapper.lambda().eq(Category::getCheckRule,categoryVO.getCheckRule()); + } + //分类类型:0推荐分类 1产品分类 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getCategoryType())) { + queryWrapper.lambda().eq(Category::getCategoryType,categoryVO.getCategoryType()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getSortNo())) { + queryWrapper.lambda().eq(Category::getSortNo,categoryVO.getSortNo()); + } + //分类补充说明查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getRemake())) { + queryWrapper.lambda().eq(Category::getRemake,categoryVO.getRemake()); + } + //校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getCheckRule())) { + queryWrapper.lambda().eq(Category::getCheckRule,categoryVO.getCheckRule()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getDataState())) { + queryWrapper.lambda().eq(Category::getDataState,categoryVO.getDataState()); + } + //按排序字段升序 + queryWrapper.lambda().orderByAsc(Category::getSortNo); + return queryWrapper; + } + + @Override + @Cacheable(value = CategoryCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#categoryVO.hashCode()") + public Page findPage(CategoryVO categoryVO, int pageNum, int pageSize) { + try { + // 1、创建分类查询条件对象; + QueryWrapper queriedWrapper = queryWrapper(categoryVO); + // 2、分页查询分类列表;page 中获取分类列表 + Page page = this.page(new Page<>(pageNum, pageSize), queriedWrapper); + // 2.1、将VO换成实体类 + Page voPage = BeanConv.toPage(page, CategoryVO.class); + // 2.3、判断当前的分类列表是否为空 + //getRecords:获取分页对象中的记录列表 + if (!EmptyUtil.isNullOrEmpty(voPage.getRecords())) { + return null; + } + // 2.1、获取当前的分类列表中的所有分类id;放置到一个集合set + Set categoryNoSet = voPage.getRecords().stream().map(CategoryVO::getCategoryNo).collect(Collectors.toSet()); + + // 处理分类保障项 + // ①、根据分类no 集合查询这些分类对应的分类保障项 ---> 1次数据库查询 + // ②、将上述的分类保障项根据分类no 进行分组放置到一个map 中;map<分类no, 分类保障项vo 列表> + // ③、遍历分类列表;逐个根据分类no 从上面的map 中获取到 分类保障项vo 列表 设置到分类中 + List categorySafeguardVOList = categorySafeguardService.findListInCategoryNo(categoryNoSet); + Map> categorySafeguardVOMap = categorySafeguardVOList.stream().collect(Collectors.groupingBy(CategorySafeguardVO::getCategoryNo)); + //循环遍历分类列表,根据分类no 从map 中获取到 分类保障项vo 列表 设置到分类中 + for (CategoryVO record : voPage.getRecords()) { + List list = categorySafeguardVOMap.get(record.getCategoryNo()); + record.setCategorySafeguardVOs(list); + } + + + // 处理分类系数项 + + + // ①、根据分类no 集合查询这些分类对应的分类系数项 ---> 1次数据库查询 + List categoryCoefficentVOList = categoryCoefficentService.findListInCategoryNo(categoryNoSet); + // ②、将上述的分类系数项根据分类no 进行分组放置到一个map 中;map<分类no, 分类保障项vo 列表> + Map> categoryCoefficentVOMap = categoryCoefficentVOList.stream().collect(Collectors.groupingBy(CategoryCoefficentVO::getCategoryNo)); + + // ③、遍历分类列表;逐个根据分类no 从上面的map 中获取到 分类系数项vo 列表 设置到分类中 + for (CategoryVO record : voPage.getRecords()) { + List list = categoryCoefficentVOMap.get(record.getCategoryNo()); + record.setCategoryCoefficentVOs(list); + } + // 处理分类筛选项 + + + // ①、根据分类no 集合查询这些分类对应的分类筛选项 ---> 1次数据库查询 + List categoryConditionVOList = categoryConditionService.findListInCategoryNo(categoryNoSet); + + // ②、将上述的分类筛选项根据分类no 进行分组放置到一个map 中;map<分类no, 分类筛选项vo 列表> + Map> categoryConditionVOMap = categoryConditionVOList.stream().collect(Collectors.groupingBy(CategoryConditionVO::getCategoryNo)); + + + // ③、遍历分类列表;逐个根据分类no 从上面的map 中获取到 分类筛选项vo 列表 设置到分类中 + for (CategoryVO record : voPage.getRecords()) { + List categoryConditionVOS = categoryConditionVOMap.get(record.getCategoryNo()); + record.setCategoryConditionVOs(categoryConditionVOS); + } + return voPage; + // 3、返回分页对象Page + }catch (Exception e){ + log.error("保险分类分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.PAGE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CategoryCacheConstant.BASIC,key = "#result.id")}) + public CategoryVO save(CategoryVO categoryVO) { + try { + //转换CategoryVO为Category + Category category = BeanConv.toBean(categoryVO, Category.class); + category.setCategoryNo(this.createCategoryNo(category.getParentCategoryNo())); + boolean flag = save(category); + if (!flag){ + throw new RuntimeException("保存保险分类失败"); + } + //转换返回对象CategoryVO + return BeanConv.toBean(category, CategoryVO.class); + }catch (Exception e){ + log.error("保存保险分类异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryCacheConstant.BASIC,key = "#categoryVO.id")}) + public Boolean update(CategoryVO categoryVO) { + try { + + //- 更新分类数据 + Category category = BeanConv.toBean(categoryVO, Category.class); + boolean flag = updateById(category); + if (!flag) { + throw new RuntimeException("更新保险分类失败"); + } + //- + //- 根据分类编号删除保障项 + categorySafeguardService.deleteByCategoryNo(categoryVO.getCategoryNo()); + //- 根据前端传递的保障项列表(没有分类编号),保存到对应的分类保障项表 + if (CollectionUtil.isNotEmpty(categoryVO.getCategorySafeguardVOs())) { + List categorySafeguardList = categoryVO.getCategorySafeguardVOs().stream() + .map(categorySafeguardVO -> + {categorySafeguardVO.setCategoryNo(category.getCategoryNo()); + return BeanConv.toBean(categorySafeguardVO, CategorySafeguard.class); + }).collect(Collectors.toList()); + categorySafeguardService.saveBatch(categorySafeguardList); + } + //- + //- 根据分类编号删除系数项 + categoryCoefficentService.deleteByCategoryNo(categoryVO.getCategoryNo()); + //- 根据前端传递的系数项列表(没有分类编号),保存到对应的分类系数项表 + if (CollectionUtil.isNotEmpty(categoryVO.getCategoryCoefficentVOs())) { + categoryVO.getCategoryCoefficentVOs().stream().map(categoryCoefficentVO ->{ + categoryCoefficentVO.setCategoryNo(category.getCategoryNo()); + return BeanConv.toBean(categoryCoefficentVO, CategoryCoefficent.class); + }).collect(Collectors.toList()); + } + //- + //- 根据分类编号删除筛选项 + categoryConditionService.deleteByCategoryNo(categoryVO.getCategoryNo()); + // - 根据前端传递的筛选项列表(没有分类编号),保存到对应的分类筛选项表 + if (CollectionUtil.isNotEmpty(categoryVO.getCategoryConditionVOs())) { + categoryVO.getCategoryConditionVOs().stream().map(categoryConditionVO ->{ + categoryConditionVO.setCategoryNo(category.getCategoryNo()); + return BeanConv.toBean(categoryConditionVO, CategoryCondition.class); + }).collect(Collectors.toList()); + } + return flag; + }catch (Exception e){ + log.error("修改保险分类异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.UPDATE_FAIL); + } + + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CategoryCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CategoryCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CategoryCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds).stream().map(Long::new).collect(Collectors.toList()); + List categories = listByIds(idsLong); + //删除关联的分类保障项、分类筛选项、分类系数项信息 + if (EmptyUtil.isNullOrEmpty(categories)){ + List categoryNos = categories.stream().map(Category::getCategoryNo).collect(Collectors.toList()); + categoryConditionService.deleteByCategoryNos(categoryNos); + categoryCoefficentService.deleteByCategoryNos(categoryNos); + categorySafeguardService.deleteByCategoryNos(categoryNos); + } + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险分类失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险分类异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CategoryCacheConstant.LIST,key ="#categoryVO.hashCode()") + public List findList(CategoryVO categoryVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(categoryVO); + List categorys = list(queryWrapper); + List categorysHandler = Lists.newArrayList(); + //显示指定节点层 + if (!EmptyUtil.isNullOrEmpty(categoryVO.getNodeFloors())){ + categorys.forEach(n->{ + if (categoryVO.getNodeFloors().contains(Long.valueOf(NoProcessing.processString(n.getCategoryNo()).length()/3-1))){ + categorysHandler.add(n); + } + }); + }else { + categorysHandler.addAll(categorys); + } + //执行列表查询 + List categoryVOs = BeanConv.toBeanList(categorysHandler,CategoryVO.class); + if (!EmptyUtil.isNullOrEmpty(categoryVOs)){ + Set categoryNoSet = categoryVOs.stream().map(CategoryVO::getCategoryNo).collect(Collectors.toSet()); + //查询分类筛选项 + List categoryConditionVOs = categoryConditionService.findListInCategoryNo(categoryNoSet); + //查询分类保障项 + List categorySafeguardVOs = categorySafeguardService.findListInCategoryNo(categoryNoSet); + //查询分类系数项 + List categoryCoefficentVOs = categoryCoefficentService.findListInCategoryNo(categoryNoSet); + //组合表单 + categoryVOs.forEach(n->{ + List categoryConditionVOsHandler = Lists.newArrayList(); + List categorySafeguardVOsHandler = Lists.newArrayList(); + List categoryCoefficentVOsHandler = Lists.newArrayList(); + categoryConditionVOs.forEach(y->{ + if (n.getCategoryNo().equals(y.getCategoryNo())) { + categoryConditionVOsHandler.add(y); + } + }); + categorySafeguardVOs.forEach(z->{ + if (n.getCategoryNo().equals(z.getCategoryNo())) { + categorySafeguardVOsHandler.add(z); + } + }); + categoryCoefficentVOs.forEach(e->{ + if (n.getCategoryNo().equals(e.getCategoryNo())) { + categoryCoefficentVOsHandler.add(e); + } + }); + n.setCategoryConditionVOs(categoryConditionVOsHandler); + n.setCategorySafeguardVOs(categorySafeguardVOsHandler); + n.setCategoryCoefficentVOs(categoryCoefficentVOsHandler); + }); + } + return categoryVOs; + }catch (Exception e){ + log.error("保险分类列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.LIST_FAIL); + } + } + + + + @Override + @Cacheable(value = CategoryCacheConstant.TREE,key ="#parentCategoryNo+'-'+#categoryType+'-'+#checkedCategoryNos") + public TreeVO categoryTreeVO(String parentCategoryNo, String categoryType,String[] checkedCategoryNos) { + try { + //起始节点确定 + String parentCategoryNoHandler = EmptyUtil.isNullOrEmpty(parentCategoryNo)? + SuperConstant.ROOT_PARENT_ID:parentCategoryNo; + //起始节点子节点 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda() + .eq(Category::getDataState, SuperConstant.DATA_STATE_0) + .likeRight(Category::getParentCategoryNo,NoProcessing.processString(parentCategoryNoHandler)) + .orderByAsc(Category::getCategoryNo); + if (!EmptyUtil.isNullOrEmpty(categoryType)){ + queryWrapper.lambda().eq(Category::getCategoryType,categoryType); + } + List categoryList = list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(categoryList)){ + throw new RuntimeException("分类信息未定义!"); + } + //构建展开节点 + List expandedIds = new ArrayList<>(); + //构建选中节点 + List checkedCategoryNosHandler = !EmptyUtil.isNullOrEmpty(checkedCategoryNos)? + Lists.newArrayList(checkedCategoryNos):null; + //构建List对象 + List treeItemVOs = categoryList.stream() + .map(category->{ + //构建当前节点 + TreeItemVO treeItemVO = TreeItemVO.builder() + .id(category.getCategoryNo()) + .parentId(category.getParentCategoryNo()) + .label(category.getCategoryName()) + .build(); + //当前节点是否选择 + if (!EmptyUtil.isNullOrEmpty(checkedCategoryNosHandler) + &&checkedCategoryNosHandler.contains(category.getCategoryNo())){ + treeItemVO.setIsChecked(true); + }else { + treeItemVO.setIsChecked(false); + } + //当前节点展开处理 + if(NoProcessing.processString(category.getCategoryNo()).length()/3==3){ + expandedIds.add(category.getCategoryNo()); + } + return treeItemVO;}).collect(Collectors.toList()); + //数据进行分组(key-->parentId:val-->List) + Map> parentParentIdMap = treeItemVOs.stream() + .collect(Collectors.groupingBy(TreeItemVO::getParentId)); + //遍历回填子节点 + treeItemVOs.forEach(treeItemVO -> { + //根据父编号到map中查找是否包含子菜单,如果包含则设置为当前菜单的子菜单 + List menuVos = parentParentIdMap.get(treeItemVO.getId()); + if(!EmptyUtil.isNullOrEmpty(menuVos)){ + treeItemVO.setChildren(menuVos); + } + }); + //构建treeItemVOResult + List treeItemVOResult= parentParentIdMap.get(parentCategoryNoHandler); + //返回TreeVO + return TreeVO.builder() + .items(treeItemVOResult) + .checkedIds(checkedCategoryNosHandler) + .expandedIds(expandedIds) + .build(); + } catch (Exception e) { + log.error("查询分类表TREE异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CategoryEnum.TREE_FAIL); + } + } + + @Override + public String createCategoryNo(String parentCategoryNo) { + CategoryVO categoryVO = CategoryVO.builder() + .parentCategoryNo(parentCategoryNo) + .build(); + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Category::getParentCategoryNo,parentCategoryNo); + List categoryList = list(queryWrapper); + //无下属节点则创建下属节点 + if (EmptyUtil.isNullOrEmpty(categoryList)){ + return NoProcessing.createNo(parentCategoryNo,false); + //有下属节点则累加下属节点 + }else { + Long categoryNo = categoryList.stream() + .map(category -> { return Long.valueOf(category.getCategoryNo());}) + .max(Comparator.comparing(i -> i)).get(); + return NoProcessing.createNo(String.valueOf(categoryNo),true); + } + } + + /** + * 人种榜险种榜分类 + * @param type + */ + @Override + public List categoryCheckRule(String type) { + //判断是否是险种榜 + if(InsureConstant.checkIsInsureType(type)){ + List res = new ArrayList<>(); + //获取所有的险种榜 + List allCheckRule = InsureConstant.getAllCheckRule(); + allCheckRule.forEach(e->{ + CategoryVO categoryVO = CategoryVO.builder().categoryNo(e).categoryName(InsureConstant.getRuleNameById(e)).build(); + res.add(categoryVO); + }); + return res; + }else{ + //说明是人种榜 + List categoryNames = Arrays.asList("成年人", "少儿", "老人"); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(Category::getCategoryName,categoryNames); + queryWrapper.eq(Category::getDataState,SuperConstant.DATA_STATE_0); + List res = BeanConv.toBeanList(list(queryWrapper), CategoryVO.class); + return res; + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CoefficentServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CoefficentServiceImpl.java index 91a21ae..149a77b 100644 --- a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CoefficentServiceImpl.java +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CoefficentServiceImpl.java @@ -1,4 +1,173 @@ package com.itheima.sfbx.insurance.service.impl; -public class CoefficentServiceImpl { + +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.CoefficentCacheConstant; +import com.itheima.sfbx.insurance.dto.CoefficentVO; +import com.itheima.sfbx.insurance.enums.CoefficentEnum; +import com.itheima.sfbx.insurance.mapper.CoefficentMapper; +import com.itheima.sfbx.insurance.pojo.Coefficent; +import com.itheima.sfbx.insurance.service.ICoefficentService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class CoefficentServiceImpl extends ServiceImpl implements ICoefficentService { + + /*** + * 系数项多条件组合 + * @param coefficentVO 系数项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CoefficentVO coefficentVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //系数键名称查询 + queryWrapper.lambda().eq(!EmptyUtil.isNullOrEmpty(coefficentVO.getCoefficentKeyName()), + Coefficent::getCoefficentKeyName, coefficentVO.getCoefficentKeyName()); + //系数键查询 + queryWrapper.lambda().eq(!EmptyUtil.isNullOrEmpty(coefficentVO.getCoefficentKey()), + Coefficent::getCoefficentKey, coefficentVO.getCoefficentKey()); + //状态查询 + if (!EmptyUtil.isNullOrEmpty(coefficentVO.getDataState())) { + queryWrapper.lambda().eq(Coefficent::getDataState,coefficentVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Coefficent::getCreateTime); + return queryWrapper; + } + + @Override +// @Cacheable(value = CoefficentCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#coefficentVO.hashCode()") + public Page findPage(CoefficentVO coefficentVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page coefficentPage = new Page<>(pageNum, pageSize); + + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(coefficentVO); + + //执行分页查询 + Page page = page(coefficentPage, queryWrapper); + + //返回结果 + return BeanConv.toPage(page,CoefficentVO.class); + }catch (Exception e){ + log.error("系数项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CoefficentEnum.PAGE_FAIL); + } + } + @Override + public CoefficentVO findById(String coefficentId) { + return null; + } + + @Override + public CoefficentVO save(CoefficentVO coefficentVO) { + try { + Coefficent coefficent = BeanConv.toBean(coefficentVO, Coefficent.class); + boolean flag = save(coefficent); + if (!flag) { + throw new RuntimeException("新建系数失败"); + } + return null; + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + @Override + public Boolean update(CoefficentVO coefficentVO) { + try { + Coefficent coefficent = BeanConv.toBean(coefficentVO, Coefficent.class); + boolean flag = updateById(coefficent); + if (!flag) { + throw new RuntimeException("更新系数项失败"); + } + return flag; + } catch (Exception e) { + log.error("修改保障项失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CoefficentEnum.UPDATE_FAIL); + } + } + + @Override + public Boolean delete(String[] checkedIds) { + try { + List idsList = Arrays.asList(checkedIds).stream().map(Long::valueOf).collect(Collectors.toList()); + Boolean flag = removeByIds(idsList); + if (!flag) { + throw new RuntimeException("删除系数项失败"); + } + return flag; + } catch (Exception e) { + log.error("删除系数项失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CoefficentEnum.DEL_FAIL); + } + } + + @Override + public List findList(CoefficentVO coefficentVO) { + return List.of(); + } + + @Override + public CoefficentVO findByCoefficentKey(String coefficentKey) { + return null; + } + + @Override + public boolean saveBatch(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean saveOrUpdateBatch(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean updateBatchById(Collection entityList, int batchSize) { + return false; + } + + @Override + public boolean saveOrUpdate(Coefficent entity) { + return false; + } + + @Override + public Coefficent getOne(Wrapper queryWrapper, boolean throwEx) { + return null; + } + + @Override + public Map getMap(Wrapper queryWrapper) { + return Map.of(); + } + + @Override + public V getObj(Wrapper queryWrapper, Function mapper) { + return null; + } + +// @Override +// public BaseMapper getBaseMapper() { +// return null; +// } } diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationInsuranceServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationInsuranceServiceImpl.java new file mode 100644 index 0000000..5c42c8d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationInsuranceServiceImpl.java @@ -0,0 +1,214 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.itheima.sfbx.insurance.dto.InsuranceCoefficentVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.pojo.CombinationInsurance; +import com.itheima.sfbx.insurance.mapper.CombinationInsuranceMapper; +import com.itheima.sfbx.insurance.pojo.Insurance; +import com.itheima.sfbx.insurance.service.ICombinationInsuranceService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.CombinationInsuranceCacheConstant; +import com.itheima.sfbx.insurance.dto.CombinationInsuranceVO; +import com.itheima.sfbx.insurance.enums.CombinationInsuranceEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:组合保险服务实现类 + */ +@Slf4j +@Service +public class CombinationInsuranceServiceImpl extends ServiceImpl implements ICombinationInsuranceService { + + @Autowired + private IInsuranceService insuranceService; + + + /*** + * @description 组合保险多条件组合 + * @param combinationInsuranceVO 组合保险 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CombinationInsuranceVO combinationInsuranceVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险组合ID查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getCombinationId())) { + queryWrapper.lambda().eq(CombinationInsurance::getCombinationId,combinationInsuranceVO.getCombinationId()); + } + //保险ID查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getInsuranceId())) { + queryWrapper.lambda().eq(CombinationInsurance::getInsuranceId,combinationInsuranceVO.getInsuranceId()); + } + //建议查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getSuggest())) { + queryWrapper.lambda().eq(CombinationInsurance::getSuggest,combinationInsuranceVO.getSuggest()); + } + //配置思路查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getThinking())) { + queryWrapper.lambda().eq(CombinationInsurance::getThinking,combinationInsuranceVO.getThinking()); + } + //优先级查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getPriority())) { + queryWrapper.lambda().eq(CombinationInsurance::getPriority,combinationInsuranceVO.getPriority()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(combinationInsuranceVO.getDataState())) { + queryWrapper.lambda().eq(CombinationInsurance::getDataState,combinationInsuranceVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CombinationInsurance::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = CombinationInsuranceCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#combinationInsuranceVO.hashCode()") + public Page findPage(CombinationInsuranceVO combinationInsuranceVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CombinationInsurancePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(combinationInsuranceVO); + //执行分页查询 + Page combinationInsuranceVOPage = BeanConv.toPage( + page(CombinationInsurancePage, queryWrapper), CombinationInsuranceVO.class); + //返回结果 + buildResult(combinationInsuranceVOPage.getRecords()); + return combinationInsuranceVOPage; + }catch (Exception e){ + log.error("组合保险分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.PAGE_FAIL); + } + } + + /** + * 构建保险方案结果集 + * @param combinationInsuranceVOs + */ + private void buildResult(List combinationInsuranceVOs) { + if(CollectionUtil.isNotEmpty(combinationInsuranceVOs)){ + List instanceId = combinationInsuranceVOs. + stream(). + map(CombinationInsuranceVO::getInsuranceId). + collect(Collectors.toList()); + InsuranceVO insuranceVO = InsuranceVO.builder().checkedIds(instanceId.toArray(String[]::new)).build(); + List insuranceVOs = insuranceService.findList(insuranceVO); + // 封装保险系数项到InsuranceVO的coefficents属性 + combinationInsuranceVOs.forEach(combinationHandler -> { + //过滤出同一个保险id下的数据 + List insuranceVOsResult = insuranceVOs.stream() + .filter(index -> index.getId().equals(combinationHandler.getInsuranceId())) + .collect(Collectors.toList()); + combinationHandler.setInsurances(insuranceVOsResult); + }); + } + //如果为空直接丢弃 + } + + @Override + @Cacheable(value = CombinationInsuranceCacheConstant.BASIC,key ="#combinationInsuranceId") + public CombinationInsuranceVO findById(String combinationInsuranceId) { + try { + //执行查询 + return BeanConv.toBean(getById(combinationInsuranceId),CombinationInsuranceVO.class); + }catch (Exception e){ + log.error("组合保险单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CombinationInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationInsuranceCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CombinationInsuranceCacheConstant.BASIC,key = "#result.id")}) + public CombinationInsuranceVO save(CombinationInsuranceVO combinationInsuranceVO) { + try { + //转换CombinationInsuranceVO为CombinationInsurance + CombinationInsurance combinationInsurance = BeanConv.toBean(combinationInsuranceVO, CombinationInsurance.class); + boolean flag = save(combinationInsurance); + if (!flag){ + throw new RuntimeException("保存组合保险失败"); + } + //转换返回对象CombinationInsuranceVO + CombinationInsuranceVO combinationInsuranceVOHandler = BeanConv.toBean(combinationInsurance, CombinationInsuranceVO.class); + return combinationInsuranceVOHandler; + }catch (Exception e){ + log.error("保存组合保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CombinationInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationInsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CombinationInsuranceCacheConstant.BASIC,key = "#combinationInsuranceVO.id")}) + public Boolean update(CombinationInsuranceVO combinationInsuranceVO) { + try { + //转换CombinationInsuranceVO为CombinationInsurance + CombinationInsurance combinationInsurance = BeanConv.toBean(combinationInsuranceVO, CombinationInsurance.class); + boolean flag = updateById(combinationInsurance); + if (!flag){ + throw new RuntimeException("修改组合保险失败"); + } + return flag; + }catch (Exception e){ + log.error("修改组合保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = CombinationInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationInsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CombinationInsuranceCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除组合保险失败"); + } + return flag; + }catch (Exception e){ + log.error("删除组合保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CombinationInsuranceCacheConstant.LIST,key ="#combinationInsuranceVO.hashCode()") + public List findList(CombinationInsuranceVO combinationInsuranceVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(combinationInsuranceVO); + //执行列表查询 + List combinationInsuranceVOs = BeanConv.toBeanList(list(queryWrapper),CombinationInsuranceVO.class); + return combinationInsuranceVOs; + }catch (Exception e){ + log.error("组合保险列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationInsuranceEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationServiceImpl.java new file mode 100644 index 0000000..34fa66e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CombinationServiceImpl.java @@ -0,0 +1,315 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.pojo.Combination; +import com.itheima.sfbx.insurance.mapper.CombinationMapper; +import com.itheima.sfbx.insurance.service.ICombinationInsuranceService; +import com.itheima.sfbx.insurance.service.ICombinationService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.seata.spring.annotation.GlobalTransactional; +import com.itheima.sfbx.insurance.constant.CombinationCacheConstant; +import com.itheima.sfbx.insurance.enums.CombinationEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; + +import java.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:组合方案服务实现类 + */ +@Slf4j +@Service +public class CombinationServiceImpl extends ServiceImpl implements ICombinationService { + + @Autowired + private ICombinationInsuranceService combinationInsuranceService; + + @Autowired + private IInsuranceService insuranceService; + + @Autowired + FileBusinessFeign fileBusinessFeign; + + + + /*** + * @description 组合方案多条件组合 + * @param combinationVO 组合方案 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CombinationVO combinationVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //组合名称查询 + if (!EmptyUtil.isNullOrEmpty(combinationVO.getCombinationName())) { + queryWrapper.lambda().eq(Combination::getCombinationName,combinationVO.getCombinationName()); + } + //风险分析查询 + if (!EmptyUtil.isNullOrEmpty(combinationVO.getRiskAnalysis())) { + queryWrapper.lambda().eq(Combination::getRiskAnalysis,combinationVO.getRiskAnalysis()); + } + //主要分析场景json查询 + if (!EmptyUtil.isNullOrEmpty(combinationVO.getRiskScenario())) { + queryWrapper.lambda().eq(Combination::getRiskScenario,combinationVO.getRiskScenario()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(combinationVO.getDataState())) { + queryWrapper.lambda().eq(Combination::getDataState,combinationVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Combination::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = CombinationCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#combinationVO.hashCode()") + public Page findPage(CombinationVO combinationVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CombinationPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(combinationVO); + //执行分页查询 + Page combinationVOPage = BeanConv.toPage( + page(CombinationPage, queryWrapper), CombinationVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(combinationVOPage)&& + !EmptyUtil.isNullOrEmpty(combinationVOPage.getRecords())){ + List records = combinationVOPage.getRecords(); + buildResult(records); + combinationVOPage.setRecords(records); + } + //返回结果 + return combinationVOPage; + }catch (Exception e){ + log.error("组合方案分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.PAGE_FAIL); + } + } + + /** + * 构建结果集对象 + * @param records + * @return + */ + private void buildResult(List records) { + try { + //获得所有业务主键ID + List combinationIds = records.stream(). + map(CombinationVO::getId). + collect(Collectors.toList()); + //===================================找到对应的保险组合================================== + + //=====================================封装附件信息===================================== + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(combinationIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + records.forEach(combinationVOHandler->{ + fileVOs.forEach(fileVO -> { + if (combinationVOHandler.getId().equals(fileVO.getBusinessId())) { + fileVOsHandler.add(fileVO); + } + }); + //补全附件信息 + combinationVOHandler.setFileVOs(fileVOsHandler); + }); + //===================================================================================== + }catch (Exception e){ + + } + } + + @Override + @Cacheable(value = CombinationCacheConstant.BASIC,key ="#combinationId") + public CombinationVO findById(String combinationId) { + try { + //执行查询 + return BeanConv.toBean(getById(combinationId),CombinationVO.class); + }catch (Exception e){ + log.error("组合方案单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.FIND_ONE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = CombinationCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =CombinationCacheConstant.BASIC,key = "#result.id")}) + public CombinationVO save(CombinationVO combinationVO) { + try { + //转换CombinationVO为Combination + Combination combination = BeanConv.toBean(combinationVO, Combination.class); + boolean flag = save(combination); + if (!flag){ + throw new RuntimeException("保存组合方案失败"); + } + //保存附件信息 + if (EmptyUtil.isNullOrEmpty(combinationVO.getFileVOs())){ + throw new RuntimeException("合同附件为空"); + } + //构建附件对象 + combinationVO.getFileVOs().forEach(fileVO -> { + fileVO.setBusinessId(combination.getId()); + }); + //调用附件接口 + List fileVOs = fileBusinessFeign.bindBatchFile(Lists.newArrayList(combinationVO.getFileVOs())); + if (EmptyUtil.isNullOrEmpty(fileVOs)){ + throw new RuntimeException("合同附件绑定失败"); + } + //转换返回对象CombinationVO + CombinationVO combinationVOHandler = BeanConv.toBean(combination, CombinationVO.class); + combinationVOHandler.setFileVOs(fileVOs); + return combinationVOHandler; + }catch (Exception e){ + log.error("保存组合方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.SAVE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = CombinationCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CombinationCacheConstant.BASIC,key = "#combinationVO.id")}) + public Boolean update(CombinationVO combinationVO) { + try { + //转换CombinationVO为Combination + Combination combination = BeanConv.toBean(combinationVO, Combination.class); + boolean flag = updateById(combination); + if (!flag){ + throw new RuntimeException("修改组合方案失败"); + } + //替换附件信息 + flag = fileBusinessFeign.replaceBindBatchFile(Lists.newArrayList(combinationVO.getFileVOs())); + if (!flag){ + throw new RuntimeException("移除组合方案附件失败"); + } + return flag; + }catch (Exception e){ + log.error("修改组合方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.UPDATE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = CombinationCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = CombinationCacheConstant.LIST,allEntries = true), + @CacheEvict(value = CombinationCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除组合方案失败"); + } + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag){ + throw new RuntimeException("删除组合方案附件失败"); + } + return flag; + }catch (Exception e){ + log.error("删除组合方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = CombinationCacheConstant.LIST,key ="#combinationVO.hashCode()") + public List findList(CombinationVO combinationVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(combinationVO); + //执行列表查询 + List combinationVOs = BeanConv.toBeanList(list(queryWrapper),CombinationVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(combinationVOs)){ + //获得所有业务主键ID + List combinationIds = combinationVOs.stream().map(CombinationVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(combinationIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + combinationVOs.forEach(combinationVOHandler->{ + fileVOs.forEach(fileVO -> { + if (combinationVOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + combinationVOHandler.setFileVOs(fileVOsHandler); + }); + } + return combinationVOs; + }catch (Exception e){ + log.error("组合方案列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CombinationEnum.LIST_FAIL); + } + } + +// /** +// * 获取保险方案详情信息 +// * @param id +// * @return +// */ +// @Override +// public CombinationDetailVO findCombination(String id) { +// try{ +// CombinationDetailVO res = new CombinationDetailVO(); +// //1.获取对应的方案信息 +// CombinationVO combination = findById(id); +// if(combination.getDataState() != SuperConstant.DATA_STATE_0){ +// log.error("组合方案查询异常:当前方案被禁用"); +// throw new ProjectException(CombinationEnum.FIND_ONE_FAIL); +// } +// //2.获取包含的保险列表 +// List combinationList = combinationInsuranceService.findList(CombinationInsuranceVO.builder().combinationId(combination.getId()).build()); +// List inusranceInfoList = insuranceService.getInusranceInfoByIds(combinationList.stream().map(CombinationInsuranceVO::getInsuranceId).collect(Collectors.toList())); +// //开始封装结果集 +// res.setInsuranceList(inusranceInfoList.stream().map(InsuranceInfoVO::getInsuranceVO).collect(Collectors.toList())); +// Map> safes = new HashMap<>(); +// Map plans = new HashMap<>(); +// inusranceInfoList.stream().forEach(e->{ +// InsuranceVO insuranceVO = e.getInsuranceVO(); +// safes.put(String.valueOf(insuranceVO.getId()),e.getSafeguardVOs()); +// plans.put(String.valueOf(insuranceVO.getId()),e.getInsurancePlanVO()); +// }); +// //封装对应的最低保障项信息 +// res.setSafes(safes); +// //封装保险计划 +// res.setPlans(plans); +// //计算总金额 +// BigDecimal totalPrice = BigDecimal.ZERO; +// for (InsurancePlanVO index : plans.values()) { +// BigDecimal monthPrice = insuranceService.getMonthPrice(index); +// totalPrice = totalPrice.add(monthPrice); +// } +// res.setTotalMoney(totalPrice.toPlainString()); +// return res; +// }catch (Exception e){ +// log.error("组合方案查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); +// throw new ProjectException(CombinationEnum.FIND_ONE_FAIL); +// } +// } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/ConditionServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/ConditionServiceImpl.java new file mode 100644 index 0000000..1266f21 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/ConditionServiceImpl.java @@ -0,0 +1,201 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.Condition; +import com.itheima.sfbx.insurance.mapper.ConditionMapper; +import com.itheima.sfbx.insurance.service.IConditionService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.ConditionCacheConstant; +import com.itheima.sfbx.insurance.dto.ConditionVO; +import com.itheima.sfbx.insurance.enums.ConditionEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:筛选项服务实现类 + */ +@Slf4j +@Service +public class ConditionServiceImpl extends ServiceImpl implements IConditionService { + + + /*** + * @description 筛选项多条件组合 + * @param conditionVO 筛选项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(ConditionVO conditionVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //条件键查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getConditionKey())) { + queryWrapper.lambda().eq(Condition::getConditionKey,conditionVO.getConditionKey()); + } + //条件键名查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getConditionKeyName())) { + queryWrapper.lambda().eq(Condition::getConditionKeyName,conditionVO.getConditionKeyName()); + } + //条件值查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getConditionVal())) { + queryWrapper.lambda().eq(Condition::getConditionVal,conditionVO.getConditionVal()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getSortNo())) { + queryWrapper.lambda().eq(Condition::getSortNo,conditionVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getRemake())) { + queryWrapper.lambda().eq(Condition::getRemake,conditionVO.getRemake()); + } + //ConditionKeys + if (!EmptyUtil.isNullOrEmpty(conditionVO.getConditionKeys())) { + queryWrapper.lambda().in(Condition::getConditionKey,conditionVO.getConditionKeys()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(conditionVO.getDataState())) { + queryWrapper.lambda().eq(Condition::getDataState,conditionVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Condition::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = ConditionCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#conditionVO.hashCode()") + public Page findPage(ConditionVO conditionVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page ConditionPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(conditionVO); + //执行分页查询 + Page conditionVOPage = BeanConv.toPage( + page(ConditionPage, queryWrapper), ConditionVO.class); + //返回结果 + return conditionVOPage; + }catch (Exception e){ + log.error("筛选项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = ConditionCacheConstant.BASIC,key ="#conditionId") + public ConditionVO findById(String conditionId) { + try { + //执行查询 + return BeanConv.toBean(getById(conditionId),ConditionVO.class); + }catch (Exception e){ + log.error("筛选项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = ConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ConditionCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =ConditionCacheConstant.BASIC,key = "#result.id")}) + public ConditionVO save(ConditionVO conditionVO) { + try { + //转换ConditionVO为Condition + Condition condition = BeanConv.toBean(conditionVO, Condition.class); + boolean flag = save(condition); + if (!flag){ + throw new RuntimeException("保存筛选项失败"); + } + //转换返回对象ConditionVO + ConditionVO conditionVOHandler = BeanConv.toBean(condition, ConditionVO.class); + return conditionVOHandler; + }catch (Exception e){ + log.error("保存筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = ConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = ConditionCacheConstant.BASIC,key = "#conditionVO.id")}) + public Boolean update(ConditionVO conditionVO) { + try { + //转换ConditionVO为Condition + Condition condition = BeanConv.toBean(conditionVO, Condition.class); + boolean flag = updateById(condition); + if (!flag){ + throw new RuntimeException("修改筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = ConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = ConditionCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = ConditionCacheConstant.LIST,key ="#conditionVO.hashCode()") + public List findList(ConditionVO conditionVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(conditionVO); + //执行列表查询 + List conditionVOs = BeanConv.toBeanList(list(queryWrapper),ConditionVO.class); + return conditionVOs; + }catch (Exception e){ + log.error("筛选项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.LIST_FAIL); + } + } + + @Override + @Cacheable(value = ConditionCacheConstant.LIST,key ="#conditionKeys.hashCode()") + public List findInConditionKeys(List conditionKeys) { + try { + //构建查询条件 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(Condition::getConditionKey,conditionKeys); + //执行列表查询 + List conditionVOs = BeanConv.toBeanList(list(queryWrapper),ConditionVO.class); + return conditionVOs; + }catch (Exception e){ + log.error("筛选项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(ConditionEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerCardServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerCardServiceImpl.java new file mode 100644 index 0000000..40ae8cd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerCardServiceImpl.java @@ -0,0 +1,322 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.constant.CustomerCardCacheConstant; +import com.itheima.sfbx.insurance.dto.CustomerCardVO; +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import com.itheima.sfbx.insurance.enums.CustomerCardEnum; +import com.itheima.sfbx.insurance.enums.CustomerInfoEnum; +import com.itheima.sfbx.insurance.mapper.CustomerCardMapper; +import com.itheima.sfbx.insurance.pojo.CustomerCard; +import com.itheima.sfbx.insurance.service.ICustomerCardService; +import io.seata.spring.annotation.GlobalTransactional; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +/** + * @Description:绑卡信息服务实现类 + */ +@Slf4j +@Service +public class CustomerCardServiceImpl extends ServiceImpl implements ICustomerCardService { + + @Autowired + FileBusinessFeign fileBusinessFeign; + + /*** + * @description 绑卡信息多条件组合 + * @param customerCardVO 绑卡信息 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CustomerCardVO customerCardVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //银行名称查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getBankName())) { + queryWrapper.lambda().eq(CustomerCard::getBankName, customerCardVO.getBankName()); + } + //开户行地址查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getBankAddress())) { + queryWrapper.lambda().eq(CustomerCard::getBankAddress, customerCardVO.getBankAddress()); + } + //银行卡号查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getBankCardNo())) { + queryWrapper.lambda().eq(CustomerCard::getBankCardNo, customerCardVO.getBankCardNo()); + } + //是否默认(0是 1否)查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getIsDefault())) { + queryWrapper.lambda().eq(CustomerCard::getIsDefault, customerCardVO.getIsDefault()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getDataState())) { + queryWrapper.lambda().eq(CustomerCard::getDataState, customerCardVO.getDataState()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(customerCardVO.getCustomerId())) { + queryWrapper.lambda().eq(CustomerCard::getCustomerId, customerCardVO.getCustomerId()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CustomerCard::getCreateTime); + return queryWrapper; + } + + @Override + public Page findPage(CustomerCardVO customerCardVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CustomerCardPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerCardVO); + //执行分页查询 + Page customerCardVOPage = BeanConv.toPage( + page(CustomerCardPage, queryWrapper), CustomerCardVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(customerCardVOPage) && + !EmptyUtil.isNullOrEmpty(customerCardVOPage.getRecords())) { + //获得所有业务主键ID + List customerCardIds = customerCardVOPage.getRecords() + .stream().map(CustomerCardVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(customerCardIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + customerCardVOPage.getRecords().forEach(customerCardVOHandler -> { + fileVOs.forEach(fileVO -> { + if (customerCardVOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + customerCardVOHandler.setFileVOs(fileVOsHandler); + }); + } + //返回结果 + return customerCardVOPage; + } catch (Exception e) { + log.error("绑卡信息分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.PAGE_FAIL); + } + } + + @Override + public CustomerCardVO findById(String customerCardId) { + try { + //执行查询 + return BeanConv.toBean(getById(customerCardId), CustomerCardVO.class); + } catch (Exception e) { + log.error("绑卡信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.FIND_ONE_FAIL); + } + } + + @Override + @GlobalTransactional + public CustomerCardVO save(CustomerCardVO customerCardVO) { + try { + //转换CustomerCardVO为CustomerCard + CustomerCard customerCard = BeanConv.toBean(customerCardVO, CustomerCard.class); + boolean flag = save(customerCard); + if (!flag) { + throw new RuntimeException("保存绑卡信息失败"); + } + //转换返回对象CustomerCardVO + CustomerCardVO customerCardVOHandler = BeanConv.toBean(customerCard, CustomerCardVO.class); + return customerCardVOHandler; + } catch (Exception e) { + log.error("添加银行卡信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.SAVE_FAIL); + } + } + + @Override + @GlobalTransactional + public Boolean update(CustomerCardVO customerCardVO) { + try { + //转换CustomerCardVO为CustomerCard + CustomerCard customerCard = BeanConv.toBean(customerCardVO, CustomerCard.class); + boolean flag = updateById(customerCard); + if (!flag) { + throw new RuntimeException("修改绑卡信息失败"); + } + return flag; + } catch (Exception e) { + log.error("修改绑卡信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.UPDATE_FAIL); + } + } + + @Override + @GlobalTransactional + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除绑卡信息失败"); + } + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag) { + throw new RuntimeException("删除绑卡信息附件失败"); + } + return flag; + } catch (Exception e) { + log.error("删除绑卡信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.DEL_FAIL); + } + } + + @Override + public List findList(CustomerCardVO customerCardVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerCardVO); + //执行列表查询 + List customerCardVOs = BeanConv.toBeanList(list(queryWrapper), CustomerCardVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(customerCardVOs)) { + //获得所有业务主键ID + List customerCardIds = customerCardVOs.stream().map(CustomerCardVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(customerCardIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + customerCardVOs.forEach(customerCardVOHandler -> { + fileVOs.forEach(fileVO -> { + if (customerCardVOHandler.getId().equals(fileVO.getBusinessId())) { + fileVOsHandler.add(fileVO); + } + }); + //补全附件信息 + customerCardVOHandler.setFileVOs(fileVOsHandler); + }); + } + return customerCardVOs; + } catch (Exception e) { + log.error("绑卡信息列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.LIST_FAIL); + } + } + + @Override + @SensitiveResponse + public List bankCardList(CustomerCardVO customerCardVO) { + return this.findList(customerCardVO); + } + + /** + * 添加银行卡 + * @param customerCardVO + * @return + */ + @Override + public CustomerCardVO saveBankCard(CustomerCardVO customerCardVO) { + try { + Long userId = SubjectContent.getUserVO().getId(); + customerCardVO.setCustomerId(String.valueOf(userId)); + //先查询当前登录人是否已经绑定过银行卡 + List customerCardVOS = findList(customerCardVO); + if (CollectionUtil.isNotEmpty(customerCardVOS)) { + customerCardVOS.forEach(e->e.setIsDefault(SuperConstant.DATA_STATE_1)); + updateBatchById(BeanConv.toBeanList(customerCardVOS, CustomerCard.class)); + } + customerCardVO.setIsDefault(SuperConstant.DATA_STATE_0); + save(customerCardVO); + return customerCardVO; + }catch (Exception e){ + log.error("添加银行卡异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerCardEnum.SAVE_FAIL); + } + } + + /** + * 默认银行卡设置 + * @param customerCardId + * @return + */ + @Override + @Transactional + public CustomerCardVO defaultBankCard(String customerCardId) { + try { + //首先查询当前登录人--所有的银行卡 + LambdaUpdateWrapper lambdaUpdateWrapper = new LambdaUpdateWrapper<>(); + lambdaUpdateWrapper.eq(CustomerCard::getCustomerId, SubjectContent.getUserVO().getId()); + lambdaUpdateWrapper.eq(CustomerCard::getDataState, SuperConstant.DATA_STATE_0); + lambdaUpdateWrapper.set(CustomerCard::getIsDefault,SuperConstant.DATA_STATE_1); + update(lambdaUpdateWrapper); + //修改默认银行卡 + CustomerCardVO customerCard = findById(String.valueOf(customerCardId)); + customerCard.setIsDefault(SuperConstant.DATA_STATE_0); + update(customerCard); + return customerCard; + } catch (Exception e) { + log.error("身份证信息获取失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + /** + * 解绑银行卡 + * @param customerCardVO + * @return + */ + @Override + public CustomerCardVO removeBankCard(CustomerCardVO customerCardVO) { + try { + //先查询当前登录人--所有的银行卡 + List customerCardVOS = findList(customerCardVO); + if (CollectionUtil.isEmpty(customerCardVOS)) { + throw new ProjectException(CustomerCardEnum.LIST_FAIL); + } else if (customerCardVOS.size() == 1) { + throw new ProjectException(CustomerCardEnum.ONLY_ONE); + } + //删除绑卡信息 + removeById(String.valueOf(customerCardVO.getId())); + //如果没有默认绑卡,则将第一个绑卡设置为默认 + CustomerCardVO customerCardQuery = CustomerCardVO.builder(). + customerId(String.valueOf(SubjectContent.getUserVO().getId())). + isDefault(SuperConstant.DATA_STATE_0). + build(); + List customerCardVOs = findList(customerCardQuery); + //找到默认使用的银行卡 + Optional first = customerCardVOs.stream().filter(e -> SuperConstant.DATA_STATE_0.equals(e.getIsDefault())).findFirst(); + if(first.isPresent()){ + //如果找到了,什么都不做 + return customerCardVO; + }else{ + //如果没找到,则将第一个设置为默认 + CustomerCardVO updateCard = customerCardVOs.get(0); + updateCard.setIsDefault(SuperConstant.DATA_STATE_0); + update(updateCard); + return updateCard; + } + } catch (Exception e) { + log.error("身份证信息获取失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerInfoServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerInfoServiceImpl.java new file mode 100644 index 0000000..910ceda --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerInfoServiceImpl.java @@ -0,0 +1,391 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.framework.outinterface.dto.TokenDTO; +import com.itheima.sfbx.framework.outinterface.service.BankCardService; +import com.itheima.sfbx.framework.outinterface.service.TokenService; +import com.itheima.sfbx.insurance.constant.CustomerInfoCacheConstant; +import com.itheima.sfbx.insurance.dto.BaiduCloudTokenVO; +import com.itheima.sfbx.insurance.dto.CustomerCardVO; +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import com.itheima.sfbx.insurance.enums.CustomerInfoEnum; +import com.itheima.sfbx.insurance.enums.OutDataInfoOcrEnum; +import com.itheima.sfbx.insurance.mapper.CustomerInfoMapper; +import com.itheima.sfbx.insurance.pojo.CustomerCard; +import com.itheima.sfbx.insurance.pojo.CustomerInfo; +import com.itheima.sfbx.insurance.service.ICustomerInfoService; +import com.itheima.sfbx.security.feign.CustomerFeign; +import io.seata.spring.annotation.GlobalTransactional; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description:客户信息表服务实现类 + */ +@Slf4j +@Service +public class CustomerInfoServiceImpl extends ServiceImpl implements ICustomerInfoService { + + @Autowired + FileBusinessFeign fileBusinessFeign; + + @Autowired + BankCardService bankCardService; + + @Autowired + TokenService tokenService; + + @Autowired + private CustomerFeign customerFeign; + + /*** + * @description 客户信息表多条件组合 + * @param customerInfoVO 客户信息表 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CustomerInfoVO customerInfoVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //系统账号编号查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getCustomerId())) { + queryWrapper.lambda().eq(CustomerInfo::getCustomerId, customerInfoVO.getCustomerId()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getRemark())) { + queryWrapper.lambda().eq(CustomerInfo::getRemark, customerInfoVO.getRemark()); + } + //常驻城市查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getCityName())) { + queryWrapper.lambda().eq(CustomerInfo::getCityName, customerInfoVO.getCityName()); + } + //收入查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getIncome())) { + queryWrapper.lambda().eq(CustomerInfo::getIncome, customerInfoVO.getIncome()); + } + //负债查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getLiabilities())) { + queryWrapper.lambda().eq(CustomerInfo::getLiabilities, customerInfoVO.getLiabilities()); + } + //实名认证(0是 1否)查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getRealNameAuthentication())) { + queryWrapper.lambda().eq(CustomerInfo::getRealNameAuthentication, customerInfoVO.getRealNameAuthentication()); + } + //绑卡(0是 1否)查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getBindingCard())) { + queryWrapper.lambda().eq(CustomerInfo::getBindingCard, customerInfoVO.getBindingCard()); + } + //身份证号码查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getIdentityCard())) { + queryWrapper.lambda().eq(CustomerInfo::getIdentityCard, customerInfoVO.getIdentityCard()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(customerInfoVO.getDataState())) { + queryWrapper.lambda().eq(CustomerInfo::getDataState, customerInfoVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(CustomerInfo::getCreateTime); + return queryWrapper; + } + + @Override + public Page findPage(CustomerInfoVO customerInfoVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CustomerInfoPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerInfoVO); + //执行分页查询 + Page customerInfoVOPage = BeanConv.toPage( + page(CustomerInfoPage, queryWrapper), CustomerInfoVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(customerInfoVOPage) && + !EmptyUtil.isNullOrEmpty(customerInfoVOPage.getRecords())) { + //获得所有业务主键ID + List customerInfoIds = customerInfoVOPage.getRecords() + .stream().map(CustomerInfoVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(customerInfoIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + customerInfoVOPage.getRecords().forEach(customerInfoVOHandler -> { + fileVOs.forEach(fileVO -> { + if (customerInfoVOHandler.getId().equals(fileVO.getBusinessId())) { + fileVOsHandler.add(fileVO); + } + }); + //补全附件信息 + customerInfoVOHandler.setFileVOs(fileVOsHandler); + }); + } + //返回结果 + return customerInfoVOPage; + } catch (Exception e) { + log.error("客户信息表分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.PAGE_FAIL); + } + } + + @Override + public CustomerInfoVO findById(String customerInfoId) { + try { + //执行查询 + return BeanConv.toBean(getById(customerInfoId), CustomerInfoVO.class); + } catch (Exception e) { + log.error("客户信息表单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + @Override + @GlobalTransactional + public CustomerInfoVO save(CustomerInfoVO customerInfoVO) { + try { + //转换CustomerInfoVO为CustomerInfo + CustomerInfo customerInfo = BeanConv.toBean(customerInfoVO, CustomerInfo.class); + boolean flag = save(customerInfo); + if (!flag) { + throw new RuntimeException("保存客户信息表失败"); + } + //保存附件信息 + if (EmptyUtil.isNullOrEmpty(customerInfoVO.getFileVOs())) { + throw new RuntimeException("合同附件为空"); + } + //构建附件对象 + customerInfoVO.getFileVOs().forEach(fileVO -> { + fileVO.setBusinessId(customerInfo.getId()); + }); + //调用附件接口 + List fileVOs = fileBusinessFeign.bindBatchFile(Lists.newArrayList(customerInfoVO.getFileVOs())); + if (EmptyUtil.isNullOrEmpty(fileVOs)) { + throw new RuntimeException("合同附件绑定失败"); + } + //转换返回对象CustomerInfoVO + CustomerInfoVO customerInfoVOHandler = BeanConv.toBean(customerInfo, CustomerInfoVO.class); + customerInfoVOHandler.setFileVOs(fileVOs); + return customerInfoVOHandler; + } catch (Exception e) { + log.error("保存客户信息表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.SAVE_FAIL); + } + } + + @Override + @GlobalTransactional + public Boolean update(CustomerInfoVO customerInfoVO) { + try { + //转换CustomerInfoVO为CustomerInfo + CustomerInfo customerInfo = BeanConv.toBean(customerInfoVO, CustomerInfo.class); + boolean flag = updateById(customerInfo); + if (!flag) { + throw new RuntimeException("修改客户信息表失败"); + } + //替换附件信息 + flag = fileBusinessFeign.replaceBindBatchFile(Lists.newArrayList(customerInfoVO.getFileVOs())); + if (!flag) { + throw new RuntimeException("移除客户信息表附件失败"); + } + return flag; + } catch (Exception e) { + log.error("修改客户信息表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.UPDATE_FAIL); + } + } + + @Override + @GlobalTransactional + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除客户信息表失败"); + } + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag) { + throw new RuntimeException("删除客户信息表附件失败"); + } + return flag; + } catch (Exception e) { + log.error("删除客户信息表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.DEL_FAIL); + } + } + + @Override + public List findList(CustomerInfoVO customerInfoVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerInfoVO); + //执行列表查询 + List customerInfoVOs = BeanConv.toBeanList(list(queryWrapper), CustomerInfoVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(customerInfoVOs)) { + //获得所有业务主键ID + List customerInfoIds = customerInfoVOs.stream().map(CustomerInfoVO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(customerInfoIds)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + customerInfoVOs.forEach(customerInfoVOHandler -> { + fileVOs.forEach(fileVO -> { + if (customerInfoVOHandler.getId().equals(fileVO.getBusinessId())) { + fileVOsHandler.add(fileVO); + } + }); + //补全附件信息 + customerInfoVOHandler.setFileVOs(fileVOsHandler); + }); + } + return customerInfoVOs; + } catch (Exception e) { + log.error("客户信息表列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.LIST_FAIL); + } + } + + + @Override + public BaiduCloudTokenVO getOcrToken(UserVO userVO) { + try { + if (ObjectUtil.isNull(userVO)) { + log.error("获取OCRToken必须先登录"); + throw new ProjectException(OutDataInfoOcrEnum.LOGIN_FAIL); + } + TokenDTO token = tokenService.getToken(); + BaiduCloudTokenVO res = BaiduCloudTokenVO.builder(). + dataState(SuperConstant.DATA_STATE_0). + refreshToken(token.getRefresh_token()). + accessToken(token.getAccess_token()). + expiresIn(token.getExpires_in()). + sessionKey(token.getSession_key()). + sessionSecret(token.getSession_secret()). + scope(token.getScope()). + build(); + return res; + } catch (ProjectException projectException) { + throw projectException; + } catch (Exception e) { + log.error("百度云OCRToken获取失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(OutDataInfoOcrEnum.TOKEN_ERROR); + } + } + + @Override + public Boolean resetPassword(UserVO userVO) { + //todo wgl 发送邮件 + return customerFeign.resetPasswords(String.valueOf(userVO.getId())); + } + + @Override + public CustomerInfoVO findOneByIdentityCard(String identityCard) { + try { + //构建查询条件 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(CustomerInfo::getIdentityCard, identityCard); + return BeanConv.toBean(getOne(queryWrapper), CustomerInfoVO.class); + } catch (Exception e) { + log.error("按身份证查询用户失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + /** + * 人脸识别认证 + * + * @return + */ + @Override + public Boolean faceCheck() { + try { + //首先查询当前登录人 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CustomerInfo::getCustomerId, SubjectContent.getUserVO().getId()); + lambdaQueryWrapper.eq(CustomerInfo::getDataState, SuperConstant.DATA_STATE_0); + CustomerInfo customerInfo = getOne(lambdaQueryWrapper); + customerInfo.setRealNameAuthentication(SuperConstant.DATA_STATE_0); + updateById(customerInfo); + return true; + } catch (Exception e) { + log.error("人脸识别修改失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + /** + * 身份证号认证 + * + * @param customerInfoVO + * @return + */ + @Override + @SensitiveResponse + public CustomerInfoVO idCard(CustomerInfoVO customerInfoVO) { + try { + //首先查询当前登录人 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CustomerInfo::getCustomerId, SubjectContent.getUserVO().getId()); + lambdaQueryWrapper.eq(CustomerInfo::getDataState, SuperConstant.DATA_STATE_0); + CustomerInfo customerInfo = getOne(lambdaQueryWrapper); + customerInfo.setIdentityCard(customerInfoVO.getIdentityCard()); + updateById(customerInfo); + //修改姓名 + customerFeign.updateRealName(String.valueOf(customerInfoVO.getId()), customerInfoVO.getName()); + return customerInfoVO; + } catch (Exception e) { + log.error("身份证号修改失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + /** + * 身份证信息 + * @return + */ + @Override + @SensitiveResponse + public CustomerInfoVO idCardInfo() { + try { + //首先查询当前登录人 + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.eq(CustomerInfo::getId, SubjectContent.getUserVO().getId()); + lambdaQueryWrapper.eq(CustomerInfo::getDataState, SuperConstant.DATA_STATE_0); + CustomerInfoVO res = BeanConv.toBean(getOne(lambdaQueryWrapper), CustomerInfoVO.class); + if(ObjectUtil.isNull(res)){ + return null; + } + res.setName(SubjectContent.getUserVO().getRealName()); + return res; + } catch (Exception e) { + log.error("身份证信息获取失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerRelationServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerRelationServiceImpl.java new file mode 100644 index 0000000..44e47a1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/CustomerRelationServiceImpl.java @@ -0,0 +1,308 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.util.IdcardUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.enums.relations.RelationEnum; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.pojo.CustomerRelation; +import com.itheima.sfbx.insurance.mapper.CustomerRelationMapper; +import com.itheima.sfbx.insurance.service.ICustomerRelationService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.CustomerRelationCacheConstant; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.enums.CustomerRelationEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; + +/** + * @Description:客户关系表服务实现类 + */ +@Slf4j +@Service +public class CustomerRelationServiceImpl extends ServiceImpl implements ICustomerRelationService { + + + /*** + * @description 客户关系表多条件组合 + * @param customerRelationVO 客户关系表 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(CustomerRelationVO customerRelationVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //关系查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getRelation())) { + queryWrapper.lambda().eq(CustomerRelation::getRelation,customerRelationVO.getRelation()); + } + //名称查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getName())) { + queryWrapper.lambda().eq(CustomerRelation::getName,customerRelationVO.getName()); + } + //身份证号码查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getIdentityCard())) { + queryWrapper.lambda().eq(CustomerRelation::getIdentityCard,customerRelationVO.getIdentityCard()); + } + //公司查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getCompanyNo())) { + queryWrapper.lambda().eq(CustomerRelation::getCompanyNo,customerRelationVO.getCompanyNo()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getSortNo())) { + queryWrapper.lambda().eq(CustomerRelation::getSortNo,customerRelationVO.getSortNo()); + } + //社保状态(0有 1无)查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getSocialSecurity())) { + queryWrapper.lambda().eq(CustomerRelation::getSocialSecurity,customerRelationVO.getSocialSecurity()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getDataState())) { + queryWrapper.lambda().eq(CustomerRelation::getDataState,customerRelationVO.getDataState()); + } + //关系查询 + if(!EmptyUtil.isNullOrEmpty(customerRelationVO.getRelations())){ + queryWrapper.lambda().in(CustomerRelation::getRelation,customerRelationVO.getRelations()); + } + //关系查询 + if (!EmptyUtil.isNullOrEmpty(customerRelationVO.getCustomerId())) { + queryWrapper.lambda().eq(CustomerRelation::getCustomerId,customerRelationVO.getCustomerId()); + } + //按创建时间降序 + queryWrapper.lambda().orderByAsc(CustomerRelation::getRelation); + return queryWrapper; + } + + @Override + public Page findPage(CustomerRelationVO customerRelationVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page CustomerRelationPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerRelationVO); + //执行分页查询 + Page customerRelationVOPage = BeanConv.toPage( + page(CustomerRelationPage, queryWrapper), CustomerRelationVO.class); + //返回结果 + return customerRelationVOPage; + }catch (Exception e){ + log.error("客户关系表分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.PAGE_FAIL); + } + } + + @Override + public CustomerRelationVO findById(String customerRelationId) { + try { + //执行查询 + return BeanConv.toBean(getById(customerRelationId),CustomerRelationVO.class); + }catch (Exception e){ + log.error("客户关系表单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.FIND_ONE_FAIL); + } + } + + @Override + public List findInId(List customerRelationIds) { + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(CustomerRelation::getId,customerRelationIds); + return BeanConv.toBeanList(list(queryWrapper),CustomerRelationVO.class); + }catch (Exception e){ + log.error("客户关系表单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.LIST_FAIL); + } + } + + @Override + @Transactional + public CustomerRelationVO save(CustomerRelationVO customerRelationVO) { + try { + //转换CustomerRelationVO为CustomerRelation + CustomerRelation customerRelation = BeanConv.toBean(customerRelationVO, CustomerRelation.class); + customerRelation.setCustomerId(String.valueOf(SubjectContent.getUserVO().getId())); + //如果关系为u说明前端传错了,一个是0 + //customerRelation.get/set:获取/设置客户关系表的客户ID + if("u".equals(customerRelation.getCustomerId())) { + customerRelation.setRelation("0"); + } + boolean flag = save(customerRelation); + if (!flag){ + throw new RuntimeException("保存客户关系表失败"); + } + //转换返回对象CustomerRelationVO + CustomerRelationVO customerRelationVOHandler = BeanConv.toBean(customerRelation, CustomerRelationVO.class); + return customerRelationVOHandler; + }catch (Exception e){ + log.error("保存客户关系表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + public Boolean update(CustomerRelationVO customerRelationVO) { + try { + CustomerRelation existingCustomerRelation = getById(customerRelationVO.getId()); + if (existingCustomerRelation == null) { + throw new RuntimeException("未找到相应的客户关系记录"); + } + // 检查哪些字段需要更新 + if (customerRelationVO.getName() != null) { + existingCustomerRelation.setName(customerRelationVO.getName()); + } + if (customerRelationVO.getIdentityCard() != null) { + existingCustomerRelation.setIdentityCard(customerRelationVO.getIdentityCard()); + } + + if (customerRelationVO.getRelation() != null) { + existingCustomerRelation.setRelation(customerRelationVO.getRelation()); + } + + if (customerRelationVO.getSocialSecurity() != null) { + existingCustomerRelation.setSocialSecurity(customerRelationVO.getSocialSecurity()); + } + if (customerRelationVO.getCityNo() != null) { + existingCustomerRelation.setCityNo(customerRelationVO.getCityNo()); + } + if (customerRelationVO.getIncome() != null) { + existingCustomerRelation.setIncome(customerRelationVO.getIncome()); + } + + boolean flag = updateById(existingCustomerRelation); + + if (!flag) { + throw new RuntimeException("修改客户关系表失败"); + } + return flag; + }catch (Exception e){ + log.error("修改客户关系表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除客户关系表失败"); + } + return flag; + }catch (Exception e){ + log.error("删除客户关系表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.DEL_FAIL); + } + } + + @Override + public List findList(CustomerRelationVO customerRelationVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(customerRelationVO); + //执行列表查询 + List customerRelationVOs = BeanConv.toBeanList(list(queryWrapper),CustomerRelationVO.class); + for (CustomerRelationVO index : customerRelationVOs) { + index.setSexByIdCard(); + index.setAge(IdcardUtil.getAgeByIdCard(index.getIdentityCard())); + } + return customerRelationVOs; + }catch (Exception e){ + log.error("客户关系表列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.LIST_FAIL); + } + } + + + @Override + @SensitiveResponse + public List myRelation(CustomerRelationVO customerRelationVO) { + return this.findList(customerRelationVO); + } + + /** + * 根据用户id查询当前的用户敏感信息 + * @param userId + * @return + */ + @Override + public CustomerRelationVO findOne(Long userId) { + try { + CustomerRelationVO customerRelationVO = CustomerRelationVO.builder(). + customerId(userId). + relation(RelationEnum.SELF.getRelation()). + dataState(SuperConstant.DATA_STATE_0). + build(); + QueryWrapper queryWrapper = queryWrapper(customerRelationVO); + CustomerRelationVO relationVO = BeanConv.toBean(getOne(queryWrapper), CustomerRelationVO.class); + if (!EmptyUtil.isNullOrEmpty(relationVO)){ + relationVO.setSexByIdCard(); + } + return relationVO; + }catch (Exception e){ + log.error("根据用户id查询当前的用户敏感信息:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.FIND_ONE_FAIL); + } + } + + /** + * 根据关系字段获取亲人关系网 + * @param fields + * @return + */ + @Override + public String[] getRelations(String fields){ + String[] relations = fields.split(SuperConstant.COMMA); + for (String indexRelation : relations) { + if(ObjectUtil.isNull(RelationEnum.valueOf(indexRelation))){ + throw new ProjectException(CustomerRelationEnum.RELATION_FIELD_ERROR); + } + } + return relations; + } + + /** + * 获取家庭成员列表 + * @return + */ + @Override + public List findHomeList(UserVO userVO) { + try { + //拿到所有的家庭情况信息 + CustomerRelationVO customerRelation = CustomerRelationVO.builder() + .customerId(userVO.getId()) + .dataState(SuperConstant.DATA_STATE_0) + .build(); + QueryWrapper queryWrapper = queryWrapper(customerRelation); + List customerRelationVOs = BeanConv.toBeanList(list(queryWrapper), CustomerRelationVO.class); + for (CustomerRelationVO index : customerRelationVOs) { + index.setSexByIdCard(); + } + return customerRelationVOs; + }catch (Exception e){ + log.error("客户关系表列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerRelationEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/HealthAssessmentServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/HealthAssessmentServiceImpl.java new file mode 100644 index 0000000..0565173 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/HealthAssessmentServiceImpl.java @@ -0,0 +1,185 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.HealthAssessment; +import com.itheima.sfbx.insurance.mapper.HealthAssessmentMapper; +import com.itheima.sfbx.insurance.service.IHealthAssessmentService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.HealthAssessmentCacheConstant; +import com.itheima.sfbx.insurance.dto.HealthAssessmentVO; +import com.itheima.sfbx.insurance.enums.HealthAssessmentEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:评估类目服务实现类 + */ +@Slf4j +@Service +public class HealthAssessmentServiceImpl extends ServiceImpl implements IHealthAssessmentService { + + + /*** + * @description 评估类目多条件组合 + * @param healthAssessmentVO 评估类目 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(HealthAssessmentVO healthAssessmentVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险产品id查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getInsuranceId())) { + queryWrapper.lambda().eq(HealthAssessment::getInsuranceId,healthAssessmentVO.getInsuranceId()); + } + //评估类目key查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getAssessmentKey())) { + queryWrapper.lambda().eq(HealthAssessment::getAssessmentKey,healthAssessmentVO.getAssessmentKey()); + } + //评估类目名称查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getAssessmentKeyName())) { + queryWrapper.lambda().eq(HealthAssessment::getAssessmentKeyName,healthAssessmentVO.getAssessmentKeyName()); + } + //评估类目值查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getAssessmentVal())) { + queryWrapper.lambda().eq(HealthAssessment::getAssessmentVal,healthAssessmentVO.getAssessmentVal()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getSortNo())) { + queryWrapper.lambda().eq(HealthAssessment::getSortNo,healthAssessmentVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getRemake())) { + queryWrapper.lambda().eq(HealthAssessment::getRemake,healthAssessmentVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(healthAssessmentVO.getDataState())) { + queryWrapper.lambda().eq(HealthAssessment::getDataState,healthAssessmentVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(HealthAssessment::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = HealthAssessmentCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#healthAssessmentVO.hashCode()") + public Page findPage(HealthAssessmentVO healthAssessmentVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page HealthAssessmentPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(healthAssessmentVO); + //执行分页查询 + Page healthAssessmentVOPage = BeanConv.toPage( + page(HealthAssessmentPage, queryWrapper), HealthAssessmentVO.class); + //返回结果 + return healthAssessmentVOPage; + }catch (Exception e){ + log.error("评估类目分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = HealthAssessmentCacheConstant.BASIC,key ="#healthAssessmentId") + public HealthAssessmentVO findById(String healthAssessmentId) { + try { + //执行查询 + return BeanConv.toBean(getById(healthAssessmentId),HealthAssessmentVO.class); + }catch (Exception e){ + log.error("评估类目单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = HealthAssessmentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = HealthAssessmentCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =HealthAssessmentCacheConstant.BASIC,key = "#result.id")}) + public HealthAssessmentVO save(HealthAssessmentVO healthAssessmentVO) { + try { + //转换HealthAssessmentVO为HealthAssessment + HealthAssessment healthAssessment = BeanConv.toBean(healthAssessmentVO, HealthAssessment.class); + boolean flag = save(healthAssessment); + if (!flag){ + throw new RuntimeException("保存评估类目失败"); + } + //转换返回对象HealthAssessmentVO + HealthAssessmentVO healthAssessmentVOHandler = BeanConv.toBean(healthAssessment, HealthAssessmentVO.class); + return healthAssessmentVOHandler; + }catch (Exception e){ + log.error("保存评估类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = HealthAssessmentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = HealthAssessmentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = HealthAssessmentCacheConstant.BASIC,key = "#healthAssessmentVO.id")}) + public Boolean update(HealthAssessmentVO healthAssessmentVO) { + try { + //转换HealthAssessmentVO为HealthAssessment + HealthAssessment healthAssessment = BeanConv.toBean(healthAssessmentVO, HealthAssessment.class); + boolean flag = updateById(healthAssessment); + if (!flag){ + throw new RuntimeException("修改评估类目失败"); + } + return flag; + }catch (Exception e){ + log.error("修改评估类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = HealthAssessmentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = HealthAssessmentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = HealthAssessmentCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除评估类目失败"); + } + return flag; + }catch (Exception e){ + log.error("删除评估类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = HealthAssessmentCacheConstant.LIST,key ="#healthAssessmentVO.hashCode()") + public List findList(HealthAssessmentVO healthAssessmentVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(healthAssessmentVO); + //执行列表查询 + List healthAssessmentVOs = BeanConv.toBeanList(list(queryWrapper),HealthAssessmentVO.class); + return healthAssessmentVOs; + }catch (Exception e){ + log.error("评估类目列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(HealthAssessmentEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveDetailServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveDetailServiceImpl.java new file mode 100644 index 0000000..0a6ec07 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveDetailServiceImpl.java @@ -0,0 +1,197 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.InsuranceApproveDetail; +import com.itheima.sfbx.insurance.mapper.InsuranceApproveDetailMapper; +import com.itheima.sfbx.insurance.service.IInsuranceApproveDetailService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.InsuranceApproveDetailCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceApproveDetailVO; +import com.itheima.sfbx.insurance.enums.InsuranceApproveDetailEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:保批信息服务实现类 + */ +@Slf4j +@Service +public class InsuranceApproveDetailServiceImpl extends ServiceImpl implements IInsuranceApproveDetailService { + + + /*** + * @description 保批信息多条件组合 + * @param insuranceApproveDetailVO 保批信息 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceApproveDetailVO insuranceApproveDetailVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //报批id查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getApproveId())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getApproveId,insuranceApproveDetailVO.getApproveId()); + } + //投保人:0 被保人:1查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getType())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getType,insuranceApproveDetailVO.getType()); + } + //修改字段键查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getChangeFieldKey())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getChangeFieldKey,insuranceApproveDetailVO.getChangeFieldKey()); + } + //修改字段名查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getTitle())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getTitle,insuranceApproveDetailVO.getTitle()); + } + //修改前的内容查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getLabel())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getLabel,insuranceApproveDetailVO.getLabel()); + } + //修改后的内容查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getModifyCont())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getModifyCont,insuranceApproveDetailVO.getModifyCont()); + } + //原因查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getModifyReason())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getModifyReason,insuranceApproveDetailVO.getModifyReason()); + } + //修改时间查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getApproveTime())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getApproveTime,insuranceApproveDetailVO.getApproveTime()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getSortNo())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getSortNo,insuranceApproveDetailVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveDetailVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceApproveDetail::getDataState,insuranceApproveDetailVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceApproveDetail::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceApproveDetailCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceApproveDetailVO.hashCode()") + public Page findPage(InsuranceApproveDetailVO insuranceApproveDetailVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceApproveDetailPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceApproveDetailVO); + //执行分页查询 + Page insuranceApproveDetailVOPage = BeanConv.toPage( + page(InsuranceApproveDetailPage, queryWrapper), InsuranceApproveDetailVO.class); + //返回结果 + return insuranceApproveDetailVOPage; + }catch (Exception e){ + log.error("保批信息分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceApproveDetailCacheConstant.BASIC,key ="#insuranceApproveDetailId") + public InsuranceApproveDetailVO findById(String insuranceApproveDetailId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceApproveDetailId),InsuranceApproveDetailVO.class); + }catch (Exception e){ + log.error("保批信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveDetailCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveDetailCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =InsuranceApproveDetailCacheConstant.BASIC,key = "#result.id")}) + public InsuranceApproveDetailVO save(InsuranceApproveDetailVO insuranceApproveDetailVO) { + try { + //转换InsuranceApproveDetailVO为InsuranceApproveDetail + InsuranceApproveDetail insuranceApproveDetail = BeanConv.toBean(insuranceApproveDetailVO, InsuranceApproveDetail.class); + boolean flag = save(insuranceApproveDetail); + if (!flag){ + throw new RuntimeException("保存保批信息失败"); + } + //转换返回对象InsuranceApproveDetailVO + InsuranceApproveDetailVO insuranceApproveDetailVOHandler = BeanConv.toBean(insuranceApproveDetail, InsuranceApproveDetailVO.class); + return insuranceApproveDetailVOHandler; + }catch (Exception e){ + log.error("保存保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveDetailCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveDetailCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceApproveDetailCacheConstant.BASIC,key = "#insuranceApproveDetailVO.id")}) + public Boolean update(InsuranceApproveDetailVO insuranceApproveDetailVO) { + try { + //转换InsuranceApproveDetailVO为InsuranceApproveDetail + InsuranceApproveDetail insuranceApproveDetail = BeanConv.toBean(insuranceApproveDetailVO, InsuranceApproveDetail.class); + boolean flag = updateById(insuranceApproveDetail); + if (!flag){ + throw new RuntimeException("修改保批信息失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveDetailCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveDetailCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceApproveDetailCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保批信息失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceApproveDetailCacheConstant.LIST,key ="#insuranceApproveDetailVO.hashCode()") + public List findList(InsuranceApproveDetailVO insuranceApproveDetailVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceApproveDetailVO); + //执行列表查询 + List insuranceApproveDetailVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceApproveDetailVO.class); + return insuranceApproveDetailVOs; + }catch (Exception e){ + log.error("保批信息列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveDetailEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveServiceImpl.java new file mode 100644 index 0000000..85da04e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceApproveServiceImpl.java @@ -0,0 +1,313 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.itheima.sfbx.RequestTemplate; +import com.itheima.sfbx.dto.ResponseDTO; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.security.AuthChannelConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import com.itheima.sfbx.framework.commons.dto.security.AuthChannelVO; +import com.itheima.sfbx.insurance.dto.InsuranceApproveDetailVO; +import com.itheima.sfbx.insurance.dto.WarrantyInsuredVO; +import com.itheima.sfbx.insurance.dto.WarrantyVerifyVO; +import com.itheima.sfbx.insurance.pojo.InsuranceApprove; +import com.itheima.sfbx.insurance.mapper.InsuranceApproveMapper; +import com.itheima.sfbx.insurance.pojo.InsuranceApproveDetail; +import com.itheima.sfbx.insurance.service.IInsuranceApproveDetailService; +import com.itheima.sfbx.insurance.service.IInsuranceApproveService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.insurance.service.IWarrantyInsuredService; +import com.itheima.sfbx.security.feign.AuthChannelFeign; +import org.apache.http.client.utils.URIBuilder; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.InsuranceApproveCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceApproveVO; +import com.itheima.sfbx.insurance.enums.InsuranceApproveEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; + +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Executor; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Resource; + +/** + * @Description:保批信息服务实现类 + */ +@Slf4j +@Service +public class InsuranceApproveServiceImpl extends ServiceImpl implements IInsuranceApproveService { + + + @Autowired + private IInsuranceApproveDetailService insuranceApproveDetailService; + + @Autowired + private IWarrantyInsuredService warrantyInsuredService; + + @Resource(name = "approveExecutor") + private Executor approveExecutor; + + @Autowired + private AuthChannelFeign authChannelFeign; + + + /*** + * @description 保批信息多条件组合 + * @param insuranceApproveVO 保批信息 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceApproveVO insuranceApproveVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //公司编号查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getCompanyNo())) { + queryWrapper.lambda().eq(InsuranceApprove::getCompanyNo,insuranceApproveVO.getCompanyNo()); + } + //保险合同编号查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getWarrantyNo())) { + queryWrapper.lambda().eq(InsuranceApprove::getWarrantyNo,insuranceApproveVO.getWarrantyNo()); + } + //批保状态(0未批保 1批保发送失败 2批保中 3批保通过 4.保批不通过)查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getApproveState())) { + queryWrapper.lambda().eq(InsuranceApprove::getApproveState,insuranceApproveVO.getApproveState()); + } + //修改时间查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getApproveTime())) { + queryWrapper.lambda().eq(InsuranceApprove::getApproveTime,insuranceApproveVO.getApproveTime()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getSortNo())) { + queryWrapper.lambda().eq(InsuranceApprove::getSortNo,insuranceApproveVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceApproveVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceApprove::getDataState,insuranceApproveVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceApprove::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceApproveCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceApproveVO.hashCode()") + public Page findPage(InsuranceApproveVO insuranceApproveVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceApprovePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceApproveVO); + //执行分页查询 + Page insuranceApproveVOPage = BeanConv.toPage( + page(InsuranceApprovePage, queryWrapper), InsuranceApproveVO.class); + //返回结果 + return insuranceApproveVOPage; + }catch (Exception e){ + log.error("保批信息分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceApproveCacheConstant.BASIC,key ="#insuranceApproveId") + public InsuranceApproveVO findById(String insuranceApproveId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceApproveId),InsuranceApproveVO.class); + }catch (Exception e){ + log.error("保批信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =InsuranceApproveCacheConstant.BASIC,key = "#result.id")}) + public InsuranceApproveVO save(InsuranceApproveVO insuranceApproveVO) { + try { + //转换InsuranceApproveVO为InsuranceApprove + InsuranceApprove insuranceApprove = BeanConv.toBean(insuranceApproveVO, InsuranceApprove.class); + insuranceApproveVO.setApproveState(WarrantyConstant.APPROVE_STATE_APPROVEING); + boolean flag = save(insuranceApprove); + insuranceApproveVO.setId(insuranceApprove.getId()); + if (!flag){ + throw new RuntimeException("保存保批信息失败"); + } + List approveDetails = insuranceApproveVO.getApproveDetails(); + List details = BeanConv.toBeanList(approveDetails, InsuranceApproveDetail.class); + //设置id + for (InsuranceApproveDetail index : details) { + index.setApproveId(insuranceApprove.getId()); + } + insuranceApproveDetailService.saveBatch(details); + + approveExecutor.execute(new Runnable() { + @Override + public void run() { + //查询三方接口配置信息 + AuthChannelVO authChannelVO = authChannelFeign.findAuthChannelByCompanyNoAndChannelLabel( + insuranceApproveVO.getCompanyNo(), + AuthChannelConstant.CHANNEL_LABEL_INSURE); + List otherConfigVOs = JSONArray.parseArray(authChannelVO.getOtherConfig(), OtherConfigVO.class); + List otherConfigVOsHandler = otherConfigVOs.stream().filter(n -> { + return n.getConfigKey().equals(AuthChannelConstant.PUBLICKEY); + }).collect(Collectors.toList()); + //获取所有保单的id + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost(authChannelVO.getDomain()) + .setPath("/approve-info"); + RequestTemplate requestTemplate = RequestTemplate.builder() + .appId(authChannelVO.getAppId()) + .privateKey(authChannelVO.getAppSecret()) + .publicKey(otherConfigVOsHandler.get(0).getConfigValue()) + .uriBuilder(urlBuilder) + .build(); + try { + ResponseDTO responseDTO = requestTemplate.doRequest(insuranceApproveVO, ResponseDTO.class); + if("2000".equals(responseDTO.getCode())){ + //修改被保人信息 + //查询出当前合同所有的被保人信息 + insuranceApproveVO.setApproveState(WarrantyConstant.APPROVE_STATE_APPROVE); + //修改投保人被保人信息 + for (InsuranceApproveDetail index : details) { + boolean insuredChange = false; + boolean approveChange = false; + WarrantyInsuredVO warrantyInsuredVO = new WarrantyInsuredVO(); + //如果是被保人 + if(WarrantyConstant.isInsured(index.getType())){ + insuredChange = true; + WarrantyInsuredVO.builder().warrantyNo(insuranceApproveVO.getWarrantyNo()).build(); + //如果是被保人 + String changeFieldKey = index.getChangeFieldKey(); + Field field = warrantyInsuredVO.getClass().getDeclaredField(changeFieldKey); + field.setAccessible(true); + Object fieldValue = field.get(index.getChangeFieldKey()); + field.set(warrantyInsuredVO, index.getModifyCont()); + }else{ + //一定是投保人 + approveChange = false; + } + } + }else{ + insuranceApproveVO.setApproveState(WarrantyConstant.APPROVE_STATE_REFUSE); + } + update(insuranceApproveVO); + + } catch (Exception e) { + log.error("核保补发异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + insuranceApproveVO.setApproveState(WarrantyConstant.APPROVE_STATE_REFUSE); + update(insuranceApproveVO); + } + } + }); + //转换返回对象InsuranceApproveVO + InsuranceApproveVO insuranceApproveVOHandler = BeanConv.toBean(insuranceApprove, InsuranceApproveVO.class); + return insuranceApproveVOHandler; + }catch (Exception e){ + log.error("保存保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceApproveCacheConstant.BASIC,key = "#insuranceApproveVO.id")}) + public Boolean update(InsuranceApproveVO insuranceApproveVO) { + try { + //转换InsuranceApproveVO为InsuranceApprove + InsuranceApprove insuranceApprove = BeanConv.toBean(insuranceApproveVO, InsuranceApprove.class); + boolean flag = updateById(insuranceApprove); + if (!flag){ + throw new RuntimeException("修改保批信息失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceApproveCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceApproveCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceApproveCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保批信息失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保批信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceApproveCacheConstant.LIST,key ="#insuranceApproveVO.hashCode()") + public List findList(InsuranceApproveVO insuranceApproveVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceApproveVO); + //执行列表查询 + List insuranceApproveVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceApproveVO.class); + return insuranceApproveVOs; + }catch (Exception e){ + log.error("保批信息列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.LIST_FAIL); + } + } + + /** + * 根据合同编号获取保批信息 + * @param warrantyNo + * @return + */ + @Override + public List findByWarrantyNo(String warrantyNo) { + try{ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(InsuranceApprove::getWarrantyNo,warrantyNo); + List insuranceApproveList = list(queryWrapper); + List res = BeanConv.toBeanList(insuranceApproveList, InsuranceApproveVO.class); + for (InsuranceApproveVO index : res) { + Long id = index.getId(); + InsuranceApproveDetailVO insuranceApproveDetailVO = InsuranceApproveDetailVO.builder().approveId(id).dataState(SuperConstant.DATA_STATE_0).build(); + List data = insuranceApproveDetailService.findList(insuranceApproveDetailVO); + index.setApproveDetails(data); + } + return res; + }catch (Exception e){ + log.error("保批信息列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceApproveEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceCoefficentServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceCoefficentServiceImpl.java new file mode 100644 index 0000000..e64f4c7 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceCoefficentServiceImpl.java @@ -0,0 +1,228 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.InsuranceCacheConstant; +import com.itheima.sfbx.insurance.constant.InsuranceCoefficentCacheConstant; +import com.itheima.sfbx.insurance.dto.CoefficentVO; +import com.itheima.sfbx.insurance.dto.InsuranceCoefficentVO; +import com.itheima.sfbx.insurance.enums.InsuranceCoefficentEnum; +import com.itheima.sfbx.insurance.mapper.InsuranceCoefficentMapper; +import com.itheima.sfbx.insurance.pojo.InsuranceCoefficent; +import com.itheima.sfbx.insurance.service.ICoefficentService; +import com.itheima.sfbx.insurance.service.IInsuranceCoefficentService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description:保险系数项服务实现类 + */ +@Slf4j +@Service +public class InsuranceCoefficentServiceImpl extends ServiceImpl implements IInsuranceCoefficentService { + + @Autowired + private ICoefficentService coefficentService; + + /*** + * @description 保险系数项多条件组合 + * @param insuranceCoefficentVO 保险系数项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceCoefficentVO insuranceCoefficentVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险商品id查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getInsuranceId())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getInsuranceId,insuranceCoefficentVO.getInsuranceId()); + } + //保险商品ids批量查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getInstanceIds())) { + queryWrapper.lambda().in(InsuranceCoefficent::getInsuranceId,insuranceCoefficentVO.getInstanceIds()); + } + //系数维度key查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getCoefficentKey())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getCoefficentKey,insuranceCoefficentVO.getCoefficentKey()); + } + //系数维度value查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getCoefficentValue())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getCoefficentValue,insuranceCoefficentVO.getCoefficentValue()); + } + //系数维度数值查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getScore())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getScore,insuranceCoefficentVO.getScore()); + } + //是否默认查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getIsDefault())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getIsDefault,insuranceCoefficentVO.getIsDefault()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getSortNo())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getSortNo,insuranceCoefficentVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceCoefficentVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceCoefficent::getDataState,insuranceCoefficentVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByAsc(InsuranceCoefficent::getSortNo); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceCoefficentCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceCoefficentVO.hashCode()") + public Page findPage(InsuranceCoefficentVO insuranceCoefficentVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceCoefficentPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceCoefficentVO); + //执行分页查询 + Page insuranceCoefficentVOPage = BeanConv.toPage( + page(InsuranceCoefficentPage, queryWrapper), InsuranceCoefficentVO.class); + //返回结果 + return insuranceCoefficentVOPage; + }catch (Exception e){ + log.error("保险系数项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceCoefficentCacheConstant.BASIC,key ="#insuranceCoefficentId") + public InsuranceCoefficentVO findById(String insuranceCoefficentId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceCoefficentId),InsuranceCoefficentVO.class); + }catch (Exception e){ + log.error("保险系数项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCoefficentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.PAGE,allEntries = true)}) + public Boolean save(List insuranceCoefficentVOs) { + try { + //转换InsuranceCoefficentVO为InsuranceCoefficent + List insuranceCoefficents = BeanConv.toBeanList(insuranceCoefficentVOs, InsuranceCoefficent.class); + boolean flag = saveBatch(insuranceCoefficents); + if (!flag){ + throw new RuntimeException("保存保险系数项失败"); + } + return flag; + }catch (Exception e){ + log.error("保存保险系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCoefficentCacheConstant.LIST,allEntries = true)}) + public Boolean update(List insuranceCoefficentVOs) { + try { + //删除所有的保险系数 + Boolean flagRemove = deleteByInsuranceId(insuranceCoefficentVOs.get(0).getInsuranceId()); + if(!flagRemove){ + throw new RuntimeException("保险系数项删除失败"); + } + //转换InsuranceCoefficentVO为InsuranceCoefficent + List insuranceCoefficents = BeanConv.toBeanList(insuranceCoefficentVOs, InsuranceCoefficent.class); + boolean flag = saveBatch(insuranceCoefficents); + if (!flag){ + throw new RuntimeException("修改保险系数项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保险系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.UPDATE_FAIL); + } + } + + /** + * + * @param insuranceId + * @return + */ + private Boolean deleteByInsuranceId(Long insuranceId) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().eq(InsuranceCoefficent::getInsuranceId,insuranceId); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除保险系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.DEL_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceCoefficentCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCoefficentCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCoefficentCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险系数项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险系数项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceCoefficentCacheConstant.LIST,key ="#insuranceCoefficentVO.hashCode()") + public List findList(InsuranceCoefficentVO insuranceCoefficentVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceCoefficentVO); + //执行列表查询 + List insuranceCoefficentVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceCoefficentVO.class); + return insuranceCoefficentVOs; + }catch (Exception e){ + log.error("保险系数项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.LIST_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceCoefficentCacheConstant.LIST,key ="#insuranceCoefficentIds.hashCode()") + public List findListByIdsAndInsuranceId(List insuranceCoefficentIds,Long insuranceId ) { + try { + //执行列表查询 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(InsuranceCoefficent::getId,insuranceCoefficentIds).eq(InsuranceCoefficent::getInsuranceId,insuranceId); + return BeanConv.toBeanList(list(queryWrapper),InsuranceCoefficentVO.class); + }catch (Exception e){ + log.error("保险系数项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceCoefficentEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceConditionServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceConditionServiceImpl.java new file mode 100644 index 0000000..5023b60 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceConditionServiceImpl.java @@ -0,0 +1,196 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.InsuranceCacheConstant; +import com.itheima.sfbx.insurance.constant.InsuranceConditionCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceConditionVO; +import com.itheima.sfbx.insurance.enums.InsuranceConditionEnum; +import com.itheima.sfbx.insurance.mapper.InsuranceConditionMapper; +import com.itheima.sfbx.insurance.pojo.InsuranceCondition; +import com.itheima.sfbx.insurance.pojo.InsurancePlan; +import com.itheima.sfbx.insurance.service.IInsuranceConditionService; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description:保险筛选项服务实现类 + */ +@Slf4j +@Service +public class InsuranceConditionServiceImpl extends ServiceImpl implements IInsuranceConditionService { + + @Autowired + private IInsuranceService insuranceService; + + /*** + * @description 保险筛选项多条件组合 + * @param insuranceConditionVO 保险筛选项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceConditionVO insuranceConditionVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险产品ID查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getInsuranceId())) { + queryWrapper.lambda().eq(InsuranceCondition::getInsuranceId,insuranceConditionVO.getInsuranceId()); + } + //保险商品ids列表查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getInsuranceIds())) { + queryWrapper.lambda().in(InsuranceCondition::getInsuranceId,insuranceConditionVO.getInsuranceIds()); + } + //条件key查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getConditionKey())) { + queryWrapper.lambda().eq(InsuranceCondition::getConditionKey,insuranceConditionVO.getConditionKey()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getSortNo())) { + queryWrapper.lambda().eq(InsuranceCondition::getSortNo,insuranceConditionVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getRemake())) { + queryWrapper.lambda().eq(InsuranceCondition::getRemake,insuranceConditionVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceConditionVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceCondition::getDataState,insuranceConditionVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceCondition::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceConditionCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceConditionVO.hashCode()") + public Page findPage(InsuranceConditionVO insuranceConditionVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceConditionPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceConditionVO); + //执行分页查询 + Page insuranceConditionVOPage = BeanConv.toPage( + page(InsuranceConditionPage, queryWrapper), InsuranceConditionVO.class); + //返回结果 + return insuranceConditionVOPage; + }catch (Exception e){ + log.error("保险筛选项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceConditionCacheConstant.BASIC,key ="#insuranceConditionId") + public InsuranceConditionVO findById(String insuranceConditionId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceConditionId),InsuranceConditionVO.class); + }catch (Exception e){ + log.error("保险筛选项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceConditionCacheConstant.LIST,allEntries = true)}) + public Boolean save(List insuranceConditionListVOs) { + try { + //转换InsuranceConditionVO为InsuranceCondition + List insuranceConditions = BeanConv.toBeanList(insuranceConditionListVOs, InsuranceCondition.class); + boolean flag = saveBatch(insuranceConditions); + if (!flag){ + throw new RuntimeException("保存保险筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("保存保险筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.PAGE,allEntries = true)}) + public Boolean update(List insuranceConditionVOs) { + try { + //删除保险下所有的筛选项 + deleteByInsuranceId(insuranceConditionVOs.get(0).getInsuranceId()); + //转换InsuranceConditionVO为InsuranceCondition + List insuranceConditions = BeanConv.toBeanList(insuranceConditionVOs, InsuranceCondition.class); + boolean flag = saveBatch(insuranceConditions); + if (!flag){ + throw new RuntimeException("修改保险筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保险筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.UPDATE_FAIL); + } + } + + /** + * 根据保险id删除保险筛选项中所有的筛选项 + * @param insuranceId + */ + private Boolean deleteByInsuranceId(String insuranceId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(InsuranceCondition::getInsuranceId,insuranceId); + return this.remove(queryWrapper); + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceConditionCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceConditionCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceConditionCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险筛选项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险筛选项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceConditionCacheConstant.LIST,key ="#insuranceConditionVO.hashCode()") + public List findList(InsuranceConditionVO insuranceConditionVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceConditionVO); + //执行列表查询 + List insuranceConditionVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceConditionVO.class); + return insuranceConditionVOs; + }catch (Exception e){ + log.error("保险筛选项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceConditionEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsurancePlanServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsurancePlanServiceImpl.java new file mode 100644 index 0000000..a7e3444 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsurancePlanServiceImpl.java @@ -0,0 +1,310 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.InsurancePlanCacheConstant; +import com.itheima.sfbx.insurance.dto.InsurancePlanVO; +import com.itheima.sfbx.insurance.dto.PlanEarningsVO; +import com.itheima.sfbx.insurance.dto.PlanSafeguardVO; +import com.itheima.sfbx.insurance.enums.InsurancePlanEnum; +import com.itheima.sfbx.insurance.mapper.InsurancePlanMapper; +import com.itheima.sfbx.insurance.pojo.InsurancePlan; +import com.itheima.sfbx.insurance.pojo.PlanEarnings; +import com.itheima.sfbx.insurance.pojo.PlanSafeguard; +import com.itheima.sfbx.insurance.service.IInsurancePlanService; +import com.itheima.sfbx.insurance.service.IPlanEarningsService; +import com.itheima.sfbx.insurance.service.IPlanSafeguardService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +/** + * @Description:保险方案服务实现类 + */ +@Slf4j +@Service +public class InsurancePlanServiceImpl extends ServiceImpl implements IInsurancePlanService { + + @Autowired + IPlanSafeguardService planSafeguardService; + + @Autowired + IPlanEarningsService planEarningsService; + + @Autowired + IdentifierGenerator identifierGenerator; + + + /*** + * @description 保险方案多条件组合 + * @param insurancePlanVO 保险方案 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsurancePlanVO insurancePlanVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险商品id查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getInsuranceId())) { + queryWrapper.lambda().eq(InsurancePlan::getInsuranceId,insurancePlanVO.getInsuranceId()); + } + //保险商品ids列表查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getInsuranceIds())) { + queryWrapper.lambda().in(InsurancePlan::getInsuranceId,insurancePlanVO.getInsuranceIds()); + } + //保险计划名称查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getPalnName())) { + queryWrapper.lambda().eq(InsurancePlan::getPalnName,insurancePlanVO.getPalnName()); + } + //默认定价查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getPrice())) { + queryWrapper.lambda().eq(InsurancePlan::getPrice,insurancePlanVO.getPrice()); + } + //默认定价单位:y/d,y/m,y/y查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getPriceUnit())) { + queryWrapper.lambda().eq(InsurancePlan::getPriceUnit,insurancePlanVO.getPriceUnit()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getSortNo())) { + queryWrapper.lambda().eq(InsurancePlan::getSortNo,insurancePlanVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insurancePlanVO.getDataState())) { + queryWrapper.lambda().eq(InsurancePlan::getDataState,insurancePlanVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsurancePlan::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsurancePlanCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insurancePlanVO.hashCode()") + public Page findPage(InsurancePlanVO insurancePlanVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsurancePlanPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insurancePlanVO); + //执行分页查询 + Page insurancePlanVOPage = BeanConv.toPage(page(InsurancePlanPage, queryWrapper), InsurancePlanVO.class); + if (!EmptyUtil.isNullOrEmpty(insurancePlanVOPage.getRecords())){ + //补全方案保障项、给付计划 + Set planIds = insurancePlanVOPage.getRecords().stream().map(InsurancePlanVO::getId).collect(Collectors.toSet()); + //保障项 + List planSafeguardVOs = planSafeguardService.findInPlanId(planIds); + List planSafeguardVOsHandler = Lists.newArrayList(); + //给付计划 + List planEarningsVOs = planEarningsService.findInPlanId(planIds); + insurancePlanVOPage.getRecords().forEach(n->{ + planSafeguardVOs.forEach(i->{ + if (n.getId().equals(i.getPlanId())) { + planSafeguardVOsHandler.add(i); + } + }); + n.setPlanSafeguardVOs(planSafeguardVOsHandler); + planEarningsVOs.forEach(j->{ + if (n.getId().equals(j.getPalnId())) { + n.setPlanEarningsVO(j); + } + }); + }); + } + //返回结果 + return insurancePlanVOPage; + }catch (Exception e){ + log.error("保险方案分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsurancePlanCacheConstant.BASIC,key ="#insurancePlanId") + public InsurancePlanVO findByIdAndInsuranceId(Long insurancePlanId,Long insuranceId){ + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(InsurancePlan::getId,insurancePlanId).eq(InsurancePlan::getInsuranceId,insuranceId); + InsurancePlanVO insurancePlanVO = BeanConv.toBean(getOne(queryWrapper), InsurancePlanVO.class); + //方案保障项 + List planSafeguardVOs = planSafeguardService.findByPlanId(insurancePlanVO.getId()); + insurancePlanVO.setPlanSafeguardVOs(planSafeguardVOs); + //方案给付计划 + PlanEarningsVO planEarningsVO =planEarningsService.findByPlanId(insurancePlanVO.getId()); + insurancePlanVO.setPlanEarningsVO(planEarningsVO); + return insurancePlanVO; + }catch (Exception e){ + log.error("保险方案单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsurancePlanCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsurancePlanCacheConstant.LIST,allEntries = true)}) + public Boolean save(List insurancePlanVOs) { + try { + //创建方案编号 + insurancePlanVOs.forEach(n->n.setPlanNo(identifierGenerator.nextId(insurancePlanVOs).longValue())); + //保存产品方案 + List insurancePlans = BeanConv.toBeanList(insurancePlanVOs, InsurancePlan.class); + boolean flag = saveBatch(insurancePlans); + if (!flag){ + throw new RuntimeException("保存保险方案失败"); + } + //构建方案保障项List对象 + List planSafeguardVOs = Lists.newArrayList(); + //构建方案给付计划List对象 + List planEarningsVOs = Lists.newArrayList(); + //回填产品方案ID + insurancePlanVOs.forEach(ipv->{ + insurancePlans.forEach(ip->{ + //产品保障项:回填产品方案ID + if (ipv.getPlanNo().equals(ip.getPlanNo())){ + ipv.getPlanSafeguardVOs().forEach(y->{ + y.setPlanId(ip.getId()); + }); + } + //产品给付计划:回填产品方案ID + if (ipv.getPlanNo().equals(ip.getPlanNo())&& + !EmptyUtil.isNullOrEmpty(ipv.getPlanEarningsVO())){ + ipv.getPlanEarningsVO().setPalnId(ip.getId()); + } + }); + planEarningsVOs.add(ipv.getPlanEarningsVO()); + planSafeguardVOs.addAll(ipv.getPlanSafeguardVOs()); + }); + //保存方案保障项 + flag = planSafeguardService.saveBatch(BeanConv.toBeanList(planSafeguardVOs,PlanSafeguard.class)); + if (!flag){ + throw new RuntimeException("保存保险方案保障项失败"); + } + //保存方案给付计划 + if (!EmptyUtil.isNullOrEmpty(planEarningsVOs)){ + flag =planEarningsService.saveBatch(BeanConv.toBeanList(planEarningsVOs,PlanEarnings.class)); + if (!flag){ + throw new RuntimeException("保存保险方案给付失败"); + } + } + return flag; + }catch (Exception e){ + log.error("保存保险方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsurancePlanCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsurancePlanCacheConstant.LIST,allEntries = true)}) + public Boolean update(List insurancePlanVOs) { + try { + //查询原产品方案 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(InsurancePlan::getInsuranceId,insurancePlanVOs.get(0).getInsuranceId()); + List insurancePlans = list(queryWrapper); + //删除原产品方案 + List insurancePlanIds = insurancePlans.stream().map(InsurancePlan::getId).collect(Collectors.toList()); + boolean flag = removeByIds(insurancePlanIds); + if (!flag){ + throw new RuntimeException("删除保险方案失败"); + } + //删除原产品方案保障项 + flag = planSafeguardService.deleteInPlanIds(insurancePlanIds); + if (!flag){ + throw new RuntimeException("删除方案保障项失败"); + } + //删除原产品方案给付计划 + planEarningsService.deleteInPlanIds(insurancePlanIds); + if (!flag){ + throw new RuntimeException("删除方案给付计划失败"); + } + //清空产品方案ID + insurancePlanVOs.forEach(n->n.setId(null)); + //再次重新保存 + return this.save(insurancePlanVOs); + }catch (Exception e){ + log.error("修改保险方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsurancePlanCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsurancePlanCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsurancePlanCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险方案失败"); + } + flag = planSafeguardService.deleteInPlanId(idsLong); + if (!flag){ + throw new RuntimeException("删除保险方案保障项失败"); + } + flag = planEarningsService.deleteInPlanId(idsLong); + if (!flag){ + throw new RuntimeException("删除保险方案给付计划失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险方案异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsurancePlanCacheConstant.LIST,key ="#insurancePlanVO.hashCode()") + public List findList(InsurancePlanVO insurancePlanVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insurancePlanVO); + //执行列表查询 + List insurancePlanVOs = BeanConv.toBeanList(list(queryWrapper),InsurancePlanVO.class); + if (!EmptyUtil.isNullOrEmpty(insurancePlanVOs)){ + //补全方案保障项、给付计划 + Set planIds = insurancePlanVOs.stream().map(InsurancePlanVO::getId).collect(Collectors.toSet()); + //保障项 + List planSafeguardVOs = planSafeguardService.findInPlanId(planIds); + //给付计划 + List planEarningsVOs = planEarningsService.findInPlanId(planIds); + insurancePlanVOs.forEach(n->{ + List planSafeguardVOsHandler = Lists.newArrayList(); + planSafeguardVOs.forEach(i->{ + if (n.getId().equals(i.getPlanId())) { + planSafeguardVOsHandler.add(i); + } + }); + n.setPlanSafeguardVOs(planSafeguardVOsHandler); + planEarningsVOs.forEach(j->{ + if (n.getId().equals(j.getPalnId())) { + n.setPlanEarningsVO(j); + } + }); + }); + } + return insurancePlanVOs; + }catch (Exception e){ + log.error("保险方案列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsurancePlanEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceRuleServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceRuleServiceImpl.java new file mode 100644 index 0000000..d6f5fd1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceRuleServiceImpl.java @@ -0,0 +1,169 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.InsuranceRule; +import com.itheima.sfbx.insurance.mapper.InsuranceRuleMapper; +import com.itheima.sfbx.insurance.service.IInsuranceRuleService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.InsuranceRuleCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceRuleVO; +import com.itheima.sfbx.insurance.enums.InsuranceRuleEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:保险规则服务实现类 + */ +@Slf4j +@Service +public class InsuranceRuleServiceImpl extends ServiceImpl implements IInsuranceRuleService { + + + /*** + * @description 保险规则多条件组合 + * @param insuranceRuleVO 保险规则 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceRuleVO insuranceRuleVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //规则ID查询 + if (!EmptyUtil.isNullOrEmpty(insuranceRuleVO.getRulesId())) { + queryWrapper.lambda().eq(InsuranceRule::getRulesId,insuranceRuleVO.getRulesId()); + } + //条例键名称查询 + if (!EmptyUtil.isNullOrEmpty(insuranceRuleVO.getInsuranceId())) { + queryWrapper.lambda().eq(InsuranceRule::getInsuranceId,insuranceRuleVO.getInsuranceId()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceRuleVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceRule::getDataState,insuranceRuleVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceRule::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceRuleCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceRuleVO.hashCode()") + public Page findPage(InsuranceRuleVO insuranceRuleVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceRulePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceRuleVO); + //执行分页查询 + Page insuranceRuleVOPage = BeanConv.toPage( + page(InsuranceRulePage, queryWrapper), InsuranceRuleVO.class); + //返回结果 + return insuranceRuleVOPage; + }catch (Exception e){ + log.error("保险规则分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceRuleCacheConstant.BASIC,key ="#insuranceRuleId") + public InsuranceRuleVO findById(String insuranceRuleId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceRuleId),InsuranceRuleVO.class); + }catch (Exception e){ + log.error("保险规则单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceRuleCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceRuleCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =InsuranceRuleCacheConstant.BASIC,key = "#result.id")}) + public InsuranceRuleVO save(InsuranceRuleVO insuranceRuleVO) { + try { + //转换InsuranceRuleVO为InsuranceRule + InsuranceRule insuranceRule = BeanConv.toBean(insuranceRuleVO, InsuranceRule.class); + boolean flag = save(insuranceRule); + if (!flag){ + throw new RuntimeException("保存保险规则失败"); + } + //转换返回对象InsuranceRuleVO + InsuranceRuleVO insuranceRuleVOHandler = BeanConv.toBean(insuranceRule, InsuranceRuleVO.class); + return insuranceRuleVOHandler; + }catch (Exception e){ + log.error("保存保险规则异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceRuleCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceRuleCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceRuleCacheConstant.BASIC,key = "#insuranceRuleVO.id")}) + public Boolean update(InsuranceRuleVO insuranceRuleVO) { + try { + //转换InsuranceRuleVO为InsuranceRule + InsuranceRule insuranceRule = BeanConv.toBean(insuranceRuleVO, InsuranceRule.class); + boolean flag = updateById(insuranceRule); + if (!flag){ + throw new RuntimeException("修改保险规则失败"); + } + return flag; + }catch (Exception e){ + log.error("修改保险规则异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceRuleCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceRuleCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceRuleCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险规则失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险规则异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceRuleCacheConstant.LIST,key ="#insuranceRuleVO.hashCode()") + public List findList(InsuranceRuleVO insuranceRuleVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceRuleVO); + //执行列表查询 + List insuranceRuleVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceRuleVO.class); + return insuranceRuleVOs; + }catch (Exception e){ + log.error("保险规则列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceRuleEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceServiceImpl.java new file mode 100644 index 0000000..bb910d4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceServiceImpl.java @@ -0,0 +1,478 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.json.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import com.itheima.sfbx.framework.commons.dto.security.CompanyVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.*; +import com.itheima.sfbx.insurance.constant.InsuranceCacheConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.enums.InsuranceEnum; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import com.itheima.sfbx.insurance.mapper.InsuranceMapper; +import com.itheima.sfbx.insurance.pojo.Insurance; +import com.itheima.sfbx.insurance.pojo.InsuranceCondition; +import com.itheima.sfbx.insurance.pojo.SearchRecord; +import com.itheima.sfbx.insurance.service.*; +import com.itheima.sfbx.security.feign.CompanyFeign; +import io.seata.spring.annotation.GlobalTransactional; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; +import java.util.concurrent.Executor; +import java.util.stream.Collectors; + +/** + * @Description:保险产品服务实现类 + */ +@Slf4j +@Service +public class InsuranceServiceImpl extends ServiceImpl implements IInsuranceService { + + @Autowired + private FileBusinessFeign fileBusinessFeign; + + @Autowired + private IInsurancePlanService insurancePlanService; + + @Autowired + private CompanyFeign companyFeign; + + @Autowired + private IInsuranceConditionService insuranceConditionService; + + @Autowired + private IInsuranceCoefficentService insuranceCoefficentService; + + @Autowired + private ICustomerRelationService customerRelationService; + + @Autowired + private ISearchRecordService searchRecordService; + + @Resource(name = "searchRecordExecutor") + private Executor searchRecordExecutor; + + /*** + * @description 保险产品多条件组合 + * @param insuranceVO 保险产品 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceVO insuranceVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //二级分类编号查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getCategoryNo())) { + queryWrapper.lambda().eq(Insurance::getCategoryNo,insuranceVO.getCategoryNo()); + } + //推荐分类查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRecommendCategoryNo())) { + queryWrapper.lambda().eq(Insurance::getRecommendCategoryNo,insuranceVO.getRecommendCategoryNo()); + } + //保险名称查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getInsuranceName())) { + queryWrapper.lambda().like(Insurance::getInsuranceName,insuranceVO.getInsuranceName()); + } + //金选:0是 1否 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getGoldSelection())) { + queryWrapper.lambda().eq(Insurance::getGoldSelection,insuranceVO.getGoldSelection()); + } + //安心赔:0是 1否 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getCarefree())) { + queryWrapper.lambda().eq(Insurance::getCarefree,insuranceVO.getCarefree()); + } + //首页热点显示(是0 否1)查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getShowIndex())) { + queryWrapper.lambda().eq(Insurance::getShowIndex,insuranceVO.getShowIndex()); + } + //保险标签格式:[{key:200万医疗金,val:指定私立意义}]查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getLabelsJson())) { + queryWrapper.lambda().eq(Insurance::getLabelsJson,insuranceVO.getLabelsJson()); + } + //补充说明格式[{key:失去保障,val:断保将失去相应保障,不能理赔}]查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRemakeJson())) { + queryWrapper.lambda().eq(Insurance::getRemakeJson,insuranceVO.getRemakeJson()); + } + //可购买起始点查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getTimeStart())) { + queryWrapper.lambda().eq(Insurance::getTimeStart,insuranceVO.getTimeStart()); + } + //可购买起始点单位:天、年查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getTimeStartUnit())) { + queryWrapper.lambda().eq(Insurance::getTimeStartUnit,insuranceVO.getTimeStartUnit()); + } + //可购买结束点查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getTimeEnd())) { + queryWrapper.lambda().eq(Insurance::getTimeEnd,insuranceVO.getTimeEnd()); + } + //可购买结束点单位:天、年查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getTimeEndUnit())) { + queryWrapper.lambda().eq(Insurance::getTimeEndUnit,insuranceVO.getTimeEndUnit()); + } + //可投保关系:self,children:spouse,parents查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRelation())) { + queryWrapper.lambda().eq(Insurance::getRelation,insuranceVO.getRelation()); + } + //投保人多选(0是 1否)查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getMultiple())) { + queryWrapper.lambda().eq(Insurance::getMultiple,insuranceVO.getMultiple()); + } + //连续投保年龄查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getContinuousInsuranceAge())) { + queryWrapper.lambda().eq(Insurance::getContinuousInsuranceAge,insuranceVO.getContinuousInsuranceAge()); + } + //校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getCheckRule())) { + queryWrapper.lambda().eq(Insurance::getCheckRule,insuranceVO.getCheckRule()); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getCompanyNo())) { + queryWrapper.lambda().eq(Insurance::getCompanyNo,insuranceVO.getCompanyNo()); + } + //保险状态(上架0 下架1)查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getInsuranceState())) { + queryWrapper.lambda().eq(Insurance::getInsuranceState,insuranceVO.getInsuranceState()); + } + //保单宽限查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getGrace())) { + queryWrapper.lambda().eq(Insurance::getGrace,insuranceVO.getGrace()); + } + //宽限单位查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getGraceUnit())) { + queryWrapper.lambda().eq(Insurance::getGraceUnit,insuranceVO.getGraceUnit()); + } + //保单复效查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRevival())) { + queryWrapper.lambda().eq(Insurance::getRevival,insuranceVO.getRevival()); + } + //复效单位查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRevivalUnit())) { + queryWrapper.lambda().eq(Insurance::getRevivalUnit,insuranceVO.getRevivalUnit()); + } + //产品点评查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getComment())) { + queryWrapper.lambda().eq(Insurance::getComment,insuranceVO.getComment()); + } + //产品描述查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getRemake())) { + queryWrapper.lambda().eq(Insurance::getRemake,insuranceVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getDataState())) { + queryWrapper.lambda().eq(Insurance::getDataState,insuranceVO.getDataState()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getCheckedIds())) { + queryWrapper.lambda().in(Insurance::getId,insuranceVO.getCheckedIds()); + } + //金牌保险优先展示 按创建时间降序 + queryWrapper.lambda().orderByAsc(Insurance::getGoldSelection).orderByDesc(Insurance::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceVO.hashCode()") + public Page findPage(InsuranceVO insuranceVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsurancePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceVO); + Page page = page(InsurancePage, queryWrapper); + //执行分页查询 + Page insuranceVOPage = BeanConv.toPage( page , InsuranceVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(insuranceVOPage)&& + !EmptyUtil.isNullOrEmpty(insuranceVOPage.getRecords())){ + List records = insuranceVOPage.getRecords(); + insuranceVOPage.setRecords(buildResult(records)); + } + //返回结果 + return insuranceVOPage; + }catch (Exception e){ + log.error("保险产品分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceCacheConstant.BASIC,key ="#insuranceId") + public InsuranceVO findById(String insuranceId) { + try { + //查询产品基本信息 + InsuranceVO insuranceVO = BeanConv.toBean(getById(insuranceId), InsuranceVO.class); + if(!EmptyUtil.isNullOrEmpty(insuranceVO)){ + //补全产品从属性 + insuranceVO = buildResult(Lists.newArrayList(insuranceVO)).get(0); + //异步保存保险搜索记录 + createSearchContent(Lists.newArrayList(insuranceVO), SubjectContent.getUserVO()); + } + return insuranceVO; + }catch (Exception e){ + log.error("保险产品单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.FIND_ONE_FAIL); + } + } + + + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = InsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =InsuranceCacheConstant.BASIC,key = "#result.id")}) + public InsuranceVO save(InsuranceVO insuranceVO) { + try { + //转换InsuranceVO为Insurance + Insurance insurance = BeanConv.toBean(insuranceVO, Insurance.class); + boolean flag = save(insurance); + if (!flag){ + throw new RuntimeException("保存保险产品失败"); + } + //转换返回对象InsuranceVO + return BeanConv.toBean(insurance, InsuranceVO.class); + }catch (Exception e){ + log.error("保存保险产品异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.SAVE_FAIL); + } + } + + @Override + @GlobalTransactional + @Caching(evict = {@CacheEvict(value = InsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.BASIC,key = "#insuranceVO.id")}) + public Boolean update(InsuranceVO insuranceVO) { + try { + //转换InsuranceVO为Insurance + Insurance insurance = BeanConv.toBean(insuranceVO, Insurance.class); + return updateById(insurance); + }catch (Exception e){ + log.error("修改保险产品异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除保险产品失败"); + } + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag){ + throw new RuntimeException("删除保险产品附件失败"); + } + return flag; + }catch (Exception e){ + log.error("删除保险产品异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceCacheConstant.LIST,key ="#insuranceVO.hashCode()") + public List findList(InsuranceVO insuranceVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceVO); + //筛选条件组合 + if (!EmptyUtil.isNullOrEmpty(insuranceVO.getConditionVals())){ + String conditionVals = com.alibaba.fastjson.JSONObject + .toJSONString(insuranceVO.getConditionVals()) + .replace("[","") + .replace("]",""); + QueryWrapper queryWrapperInsuranceCondition = new QueryWrapper<>(); + queryWrapperInsuranceCondition.lambda().apply(true, + "JSON_CONTAINS(condition_val, JSON_ARRAY("+conditionVals+"))"); + List insuranceConditionList = insuranceConditionService.list(queryWrapperInsuranceCondition); + if (EmptyUtil.isNullOrEmpty(insuranceConditionList)){ + return Lists.newArrayList(); + } + List insuranceIds = insuranceConditionList.stream() + .map(InsuranceCondition::getInsuranceId) + .collect(Collectors.toList()); + queryWrapper.lambda().in(Insurance::getId,insuranceIds); + } + List insuranceList = list(queryWrapper); + //执行列表查询 + List insuranceVOs = BeanConv.toBeanList(insuranceList,InsuranceVO.class); + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(insuranceVOs)){ + return buildResult(insuranceVOs); + } + //异步添加保险搜索记录 + createSearchContent(insuranceVOs,SubjectContent.getUserVO()); + return insuranceVOs; + }catch (Exception e){ + log.error("保险产品列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.LIST_FAIL); + } + } + + /** + * 封装结果集 + * 基于查询的基础数据,补全其他业务数据的方法 (核心方法) + * @param insuranceVOs + * @return + */ + private List buildResult(List insuranceVOs){ + //构建产品ID + List insuranceIds = insuranceVOs.stream().map(InsuranceVO::getId).collect(Collectors.toList()); + //=======================================封装产品系数项======================================= + InsuranceCoefficentVO insuranceCoefficentVO = InsuranceCoefficentVO.builder(). + instanceIds(insuranceIds.toArray(Long[]::new)). + dataState(SuperConstant.DATA_STATE_0). + build(); + List insuranceCoefficentList = insuranceCoefficentService.findList(insuranceCoefficentVO); + if(!EmptyUtil.isNullOrEmpty(insuranceCoefficentList)) { + // 封装保险系数项到InsuranceVO的coefficents属性 + insuranceVOs.forEach(insuranceVOHandler -> { + //过滤出同一个保险id下的数据 + List matchingCoefficents = insuranceCoefficentList.stream() + .filter(coefficent -> coefficent.getInsuranceId().equals(insuranceVOHandler.getId())) + .collect(Collectors.toList()); + insuranceVOHandler.setInsuranceCoefficentVOs(matchingCoefficents); + }); + } + //=======================================封装产品方案======================================= + InsurancePlanVO insurancePlanVO = InsurancePlanVO.builder(). + insuranceIds(insuranceIds.toArray(Long[]::new)). + dataState(SuperConstant.DATA_STATE_0). + build(); + List insurancePlanVOList = insurancePlanService.findList(insurancePlanVO); + if(!EmptyUtil.isNullOrEmpty(insurancePlanVOList)) { + // 封装保险系数项到InsuranceVO的insurancePlan属性 + insuranceVOs.forEach(insuranceVOHandler -> { + List insurancePlanVOs = insurancePlanVOList.stream() + .filter(insurancePlanIndex -> insurancePlanIndex.getInsuranceId().equals(insuranceVOHandler.getId())) + .collect(Collectors.toList()); + insuranceVOHandler.setInsurancePlanVOs(insurancePlanVOs); + }); + } + //=======================================封装产品筛选项======================================= + InsuranceConditionVO insuranceConditionVO = InsuranceConditionVO.builder() + .insuranceIds(insuranceIds.toArray(Long[]::new)) + .dataState(SuperConstant.DATA_STATE_0) + .build(); + List insuranceConditionList = insuranceConditionService.findList(insuranceConditionVO); + if(!EmptyUtil.isNullOrEmpty(insuranceConditionList)) { + // 封装保险系数项到InsuranceVO的insurancePlan属性 + insuranceVOs.forEach(insuranceVOHandler -> { + List insuranceConditionVOS = insuranceConditionList.stream() + .filter(insuranceConditionItem -> String.valueOf(insuranceVOHandler.getId()).equals(insuranceConditionItem.getInsuranceId())) + .collect(Collectors.toList()); + insuranceVOHandler.setInsuranceConditionVOs(insuranceConditionVOS); + }); + } + //=======================================封装附件============================================= + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(insuranceIds); + if(!EmptyUtil.isNullOrEmpty(fileVOs)) { + insuranceVOs.forEach(insuranceVOHandler -> { + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + fileVOs.forEach(fileVO -> { + if (insuranceVOHandler.getId().equals(fileVO.getBusinessId())) { + fileVOsHandler.add(fileVO); + } + }); + insuranceVOHandler.setFileVOs(fileVOsHandler); + }); + } + //==================================================================================== + return insuranceVOs; + } + + public static Map insuranceTypeMap = new HashMap<>(); + + static { + //校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 + insuranceTypeMap.put(InsureConstant.CHECK_RULE_0,"medicalInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_1,"severeIllnessInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_2,"accidentInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_3,"agedInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_4,"annuityInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_5,"travelInsureHandler"); + //算法可后续扩展 + } + + @Autowired + RegisterBeanHandler registerBeanHandler; + + @Override + public String doPremium(DoInsureVo doInsureVo) { + try { + //传入checkRule参数从insuranceTypeMap中依据K值找到V值,也就是拿到处理类的bean名称 + String checkRule = insuranceTypeMap.get(doInsureVo.getCheckRule()); + //依据bean名称通过IOC容器工具类从IOC中获得具体的保处理接口的某个实现类去处理具体的业务 + InsureHandler insureHandler = registerBeanHandler.getBean(checkRule, InsureHandler.class); + return insureHandler.doPremium(doInsureVo); + }catch (Exception e){ + log.error("保费计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.CALCULATION_FAIL); + } + } + + @Override + public EarningVO doEarnings(DoInsureVo doInsureVo) { + try { + String checkRule = insuranceTypeMap.get(doInsureVo.getCheckRule()); + InsureHandler insureHandler = registerBeanHandler.getBean(checkRule, InsureHandler.class); + return insureHandler.doEarnings(doInsureVo); + }catch (Exception e){ + log.error("收益计算异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceEnum.INCOME_FAIL); + } + } + + /** + * 异步添加保险搜索记录 + * @param insuranceVOs + * @return + */ + private void createSearchContent(List insuranceVOs, UserVO userVO) { + searchRecordExecutor.execute(new Runnable() { + @Override + public void run() { + ArrayList searchRecordList = new ArrayList<>(); + for (InsuranceVO insuranceVO: insuranceVOs) { + JSONObject jsonObject = new JSONObject(); + jsonObject.set("insuranceId",insuranceVO.getId()); + jsonObject.set("insuranceName",insuranceVO.getInsuranceName()); + SearchRecord searchRecord = SearchRecord.builder() + .dataState(SuperConstant.DATA_STATE_0) + .content(jsonObject.toString()) + .createBy(userVO.getId()). + build(); + searchRecordList.add(searchRecord); + } + searchRecordService.saveBatch(searchRecordList); + } + }); + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceSievingServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceSievingServiceImpl.java new file mode 100644 index 0000000..1eb50b5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceSievingServiceImpl.java @@ -0,0 +1,181 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.InsuranceSieving; +import com.itheima.sfbx.insurance.mapper.InsuranceSievingMapper; +import com.itheima.sfbx.insurance.service.IInsuranceSievingService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.InsuranceSievingCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceSievingVO; +import com.itheima.sfbx.insurance.enums.InsuranceSievingEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:初筛结果服务实现类 + */ +@Slf4j +@Service +public class InsuranceSievingServiceImpl extends ServiceImpl implements IInsuranceSievingService { + + + /*** + * @description 初筛结果多条件组合 + * @param insuranceSievingVO 初筛结果 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceSievingVO insuranceSievingVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //姓名查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getName())) { + queryWrapper.lambda().eq(InsuranceSieving::getName,insuranceSievingVO.getName()); + } + //疾病列表查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getSicksName())) { + queryWrapper.lambda().eq(InsuranceSieving::getSicksName,insuranceSievingVO.getSicksName()); + } + //疾病key列表查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getSicksKey())) { + queryWrapper.lambda().eq(InsuranceSieving::getSicksKey,insuranceSievingVO.getSicksKey()); + } + //初筛结果查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getResult())) { + queryWrapper.lambda().eq(InsuranceSieving::getResult,insuranceSievingVO.getResult()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getSortNo())) { + queryWrapper.lambda().eq(InsuranceSieving::getSortNo,insuranceSievingVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceSievingVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceSieving::getDataState,insuranceSievingVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceSieving::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceSievingCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#insuranceSievingVO.hashCode()") + public Page findPage(InsuranceSievingVO insuranceSievingVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceSievingPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceSievingVO); + //执行分页查询 + Page insuranceSievingVOPage = BeanConv.toPage( + page(InsuranceSievingPage, queryWrapper), InsuranceSievingVO.class); + //返回结果 + return insuranceSievingVOPage; + }catch (Exception e){ + log.error("初筛结果分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceSievingCacheConstant.BASIC,key ="#insuranceSievingId") + public InsuranceSievingVO findById(String insuranceSievingId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceSievingId),InsuranceSievingVO.class); + }catch (Exception e){ + log.error("初筛结果单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceSievingCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceSievingCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =InsuranceSievingCacheConstant.BASIC,key = "#result.id")}) + public InsuranceSievingVO save(InsuranceSievingVO insuranceSievingVO) { + try { + //转换InsuranceSievingVO为InsuranceSieving + InsuranceSieving insuranceSieving = BeanConv.toBean(insuranceSievingVO, InsuranceSieving.class); + boolean flag = save(insuranceSieving); + if (!flag){ + throw new RuntimeException("保存初筛结果失败"); + } + //转换返回对象InsuranceSievingVO + InsuranceSievingVO insuranceSievingVOHandler = BeanConv.toBean(insuranceSieving, InsuranceSievingVO.class); + return insuranceSievingVOHandler; + }catch (Exception e){ + log.error("保存初筛结果异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceSievingCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceSievingCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceSievingCacheConstant.BASIC,key = "#insuranceSievingVO.id")}) + public Boolean update(InsuranceSievingVO insuranceSievingVO) { + try { + //转换InsuranceSievingVO为InsuranceSieving + InsuranceSieving insuranceSieving = BeanConv.toBean(insuranceSievingVO, InsuranceSieving.class); + boolean flag = updateById(insuranceSieving); + if (!flag){ + throw new RuntimeException("修改初筛结果失败"); + } + return flag; + }catch (Exception e){ + log.error("修改初筛结果异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceSievingCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = InsuranceSievingCacheConstant.LIST,allEntries = true), + @CacheEvict(value = InsuranceSievingCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除初筛结果失败"); + } + return flag; + }catch (Exception e){ + log.error("删除初筛结果异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceSievingCacheConstant.LIST,key ="#insuranceSievingVO.hashCode()") + public List findList(InsuranceSievingVO insuranceSievingVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceSievingVO); + //执行列表查询 + List insuranceSievingVOs = BeanConv.toBeanList(list(queryWrapper),InsuranceSievingVO.class); + return insuranceSievingVOs; + }catch (Exception e){ + log.error("初筛结果列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceSievingEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceTopServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceTopServiceImpl.java new file mode 100644 index 0000000..4058b89 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/InsuranceTopServiceImpl.java @@ -0,0 +1,241 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.constant.InsuranceTopCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceTopVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.enums.InsuranceTopEnum; +import com.itheima.sfbx.insurance.mapper.InsuranceTopMapper; +import com.itheima.sfbx.insurance.pojo.InsuranceTop; +import com.itheima.sfbx.insurance.service.IInsurancePlanService; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.IInsuranceTopService; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @Description:人气保险服务实现类 + */ +@Slf4j +@Service +public class InsuranceTopServiceImpl extends ServiceImpl implements IInsuranceTopService { + + @Autowired + private InsuranceTopMapper insuranceTopMapper; + + @Autowired + private IInsuranceService insuranceService; + + @Autowired + private IInsurancePlanService insurancePlanService; + + + @Autowired + private IWarrantyService iWarrantyService; + + /*** + * @description 人气保险多条件组合 + * @param insuranceTopVO 人气保险 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(InsuranceTopVO insuranceTopVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险ID查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getInsuranceId())) { + queryWrapper.lambda().eq(InsuranceTop::getInsuranceId, insuranceTopVO.getInsuranceId()); + } + //保险名称查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getInsuranceName())) { + queryWrapper.lambda().eq(InsuranceTop::getInsuranceName, insuranceTopVO.getInsuranceName()); + } + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getCategoryNo())) { + queryWrapper.lambda().eq(InsuranceTop::getCategoryNo, insuranceTopVO.getCategoryNo()); + } + //保障类型: 1推荐分类 2产品分类 查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getCategoryType())) { + queryWrapper.lambda().eq(InsuranceTop::getCategoryType, insuranceTopVO.getCategoryType()); + } + //分类名称查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getCategoryName())) { + queryWrapper.lambda().eq(InsuranceTop::getCategoryName, insuranceTopVO.getCategoryName()); + } + //方案ID查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getPalnId())) { + queryWrapper.lambda().eq(InsuranceTop::getPalnId, insuranceTopVO.getPalnId()); + } + //默认定价查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getPrice())) { + queryWrapper.lambda().eq(InsuranceTop::getPrice, insuranceTopVO.getPrice()); + } + //默认定价单位:y/d,y/m,y/y查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getPriceUnit())) { + queryWrapper.lambda().eq(InsuranceTop::getPriceUnit, insuranceTopVO.getPriceUnit()); + } + //销量查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getSalesVolume())) { + queryWrapper.lambda().eq(InsuranceTop::getSalesVolume, insuranceTopVO.getSalesVolume()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(insuranceTopVO.getDataState())) { + queryWrapper.lambda().eq(InsuranceTop::getDataState, insuranceTopVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(InsuranceTop::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = InsuranceTopCacheConstant.PAGE, key = "#pageNum+'-'+#pageSize+'-'+#insuranceTopVO.hashCode()") + public Page findPage(InsuranceTopVO insuranceTopVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page InsuranceTopPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceTopVO); + //执行分页查询 + Page insuranceTopVOPage = BeanConv.toPage( + page(InsuranceTopPage, queryWrapper), InsuranceTopVO.class); + //返回结果 + return insuranceTopVOPage; + } catch (Exception e) { + log.error("人气保险分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceTopCacheConstant.BASIC, key = "#insuranceTopId") + public InsuranceTopVO findById(String insuranceTopId) { + try { + //执行查询 + return BeanConv.toBean(getById(insuranceTopId), InsuranceTopVO.class); + } catch (Exception e) { + log.error("人气保险单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceTopCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = InsuranceTopCacheConstant.LIST, allEntries = true)}, + put = {@CachePut(value = InsuranceTopCacheConstant.BASIC, key = "#result.id")}) + public InsuranceTopVO save(InsuranceTopVO insuranceTopVO) { + try { + //转换InsuranceTopVO为InsuranceTop + InsuranceTop insuranceTop = BeanConv.toBean(insuranceTopVO, InsuranceTop.class); + boolean flag = save(insuranceTop); + if (!flag) { + throw new RuntimeException("保存人气保险失败"); + } + //转换返回对象InsuranceTopVO + InsuranceTopVO insuranceTopVOHandler = BeanConv.toBean(insuranceTop, InsuranceTopVO.class); + return insuranceTopVOHandler; + } catch (Exception e) { + log.error("保存人气保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceTopCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = InsuranceTopCacheConstant.LIST, allEntries = true), + @CacheEvict(value = InsuranceTopCacheConstant.BASIC, key = "#insuranceTopVO.id")}) + public Boolean update(InsuranceTopVO insuranceTopVO) { + try { + //转换InsuranceTopVO为InsuranceTop + InsuranceTop insuranceTop = BeanConv.toBean(insuranceTopVO, InsuranceTop.class); + boolean flag = updateById(insuranceTop); + if (!flag) { + throw new RuntimeException("修改人气保险失败"); + } + return flag; + } catch (Exception e) { + log.error("修改人气保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = InsuranceTopCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = InsuranceTopCacheConstant.LIST, allEntries = true), + @CacheEvict(value = InsuranceTopCacheConstant.BASIC, allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除人气保险失败"); + } + return flag; + } catch (Exception e) { + log.error("删除人气保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = InsuranceTopCacheConstant.LIST, key = "#insuranceTopVO.hashCode()") + public List findList(InsuranceTopVO insuranceTopVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(insuranceTopVO); + //执行列表查询 + List insuranceTopVOs = BeanConv.toBeanList(list(queryWrapper), InsuranceTopVO.class); + return insuranceTopVOs; + } catch (Exception e) { + log.error("人气保险列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.LIST_FAIL); + } + } + + + /** + * 查询保险销售top榜内容 + * + * @param num 展示条数 + * @param dateLimit top榜时间范围(默认一周) + * @return + */ + @Override + public List findTopInsurance(Integer num, Integer dateLimit) { + try { + //查询top榜中dateLimit天内有效的num条保险产品数据,并按照销量进行排序 + List pojoList = insuranceTopMapper.findTopInsurance(SuperConstant.DATA_STATE_0, num, dateLimit); + if(CollectionUtil.isNotEmpty(pojoList)){ + List insuranceIds = pojoList.stream().map(InsuranceTop::getInsuranceId).collect(Collectors.toList()); + InsuranceVO insuranceVO = InsuranceVO.builder().checkedIds(insuranceIds.toArray(String[]::new)).build(); + List res = insuranceService.findList(insuranceVO); + return res; + } + return Arrays.asList(); + } catch (Exception e) { + log.error("保险销售top榜查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(InsuranceTopEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanEarningsServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanEarningsServiceImpl.java new file mode 100644 index 0000000..44a3a32 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanEarningsServiceImpl.java @@ -0,0 +1,232 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.itheima.sfbx.insurance.pojo.PlanEarnings; +import com.itheima.sfbx.insurance.mapper.PlanEarningsMapper; +import com.itheima.sfbx.insurance.service.IPlanEarningsService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.PlanEarningsCacheConstant; +import com.itheima.sfbx.insurance.dto.PlanEarningsVO; +import com.itheima.sfbx.insurance.enums.PlanEarningsEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:方案给付服务实现类 + */ +@Slf4j +@Service +public class PlanEarningsServiceImpl extends ServiceImpl implements IPlanEarningsService { + + + /*** + * @description 方案给付多条件组合 + * @param planEarningsVO 方案给付 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(PlanEarningsVO planEarningsVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险方案id查询 + if (!EmptyUtil.isNullOrEmpty(planEarningsVO.getPalnId())) { + queryWrapper.lambda().eq(PlanEarnings::getPalnId,planEarningsVO.getPalnId()); + } + //给付类型:0终身领取 1固定领取查询 + if (!EmptyUtil.isNullOrEmpty(planEarningsVO.getEarningsType())) { + queryWrapper.lambda().eq(PlanEarnings::getEarningsType,planEarningsVO.getEarningsType()); + } + //周期数查询 + if (!EmptyUtil.isNullOrEmpty(planEarningsVO.getPeriods())) { + queryWrapper.lambda().eq(PlanEarnings::getPeriods,planEarningsVO.getPeriods()); + } + //领取计划查询 + if (!EmptyUtil.isNullOrEmpty(planEarningsVO.getEarningsJson())) { + queryWrapper.lambda().eq(PlanEarnings::getEarningsJson,planEarningsVO.getEarningsJson()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(planEarningsVO.getDataState())) { + queryWrapper.lambda().eq(PlanEarnings::getDataState,planEarningsVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(PlanEarnings::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = PlanEarningsCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#planEarningsVO.hashCode()") + public Page findPage(PlanEarningsVO planEarningsVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page PlanEarningsPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(planEarningsVO); + //执行分页查询 + Page planEarningsVOPage = BeanConv.toPage( + page(PlanEarningsPage, queryWrapper), PlanEarningsVO.class); + //返回结果 + return planEarningsVOPage; + }catch (Exception e){ + log.error("方案给付分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = PlanEarningsCacheConstant.BASIC,key ="#planEarningsId") + public PlanEarningsVO findById(String planEarningsId) { + try { + //执行查询 + return BeanConv.toBean(getById(planEarningsId),PlanEarningsVO.class); + }catch (Exception e){ + log.error("方案给付单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanEarningsCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanEarningsCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =PlanEarningsCacheConstant.BASIC,key = "#result.id")}) + public PlanEarningsVO save(PlanEarningsVO planEarningsVO) { + try { + //转换PlanEarningsVO为PlanEarnings + PlanEarnings planEarnings = BeanConv.toBean(planEarningsVO, PlanEarnings.class); + boolean flag = save(planEarnings); + if (!flag){ + throw new RuntimeException("保存方案给付失败"); + } + //转换返回对象PlanEarningsVO + PlanEarningsVO planEarningsVOHandler = BeanConv.toBean(planEarnings, PlanEarningsVO.class); + return planEarningsVOHandler; + }catch (Exception e){ + log.error("保存方案给付异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanEarningsCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanEarningsCacheConstant.LIST,allEntries = true), + @CacheEvict(value = PlanEarningsCacheConstant.BASIC,key = "#planEarningsVO.id")}) + public Boolean update(PlanEarningsVO planEarningsVO) { + try { + //转换PlanEarningsVO为PlanEarnings + PlanEarnings planEarnings = BeanConv.toBean(planEarningsVO, PlanEarnings.class); + boolean flag = updateById(planEarnings); + if (!flag){ + throw new RuntimeException("修改方案给付失败"); + } + return flag; + }catch (Exception e){ + log.error("修改方案给付异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanEarningsCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanEarningsCacheConstant.LIST,allEntries = true), + @CacheEvict(value = PlanEarningsCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除方案给付失败"); + } + return flag; + }catch (Exception e){ + log.error("删除方案给付异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = PlanEarningsCacheConstant.LIST,key ="#planEarningsVO.hashCode()") + public List findList(PlanEarningsVO planEarningsVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(planEarningsVO); + //执行列表查询 + List planEarningsVOs = BeanConv.toBeanList(list(queryWrapper),PlanEarningsVO.class); + return planEarningsVOs; + }catch (Exception e){ + log.error("方案给付列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.LIST_FAIL); + } + } + + @Override + @Cacheable(value = PlanEarningsCacheConstant.BASIC,key ="#planId") + public PlanEarningsVO findByPlanId(Long planId) { + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(PlanEarnings::getPalnId,planId); + return BeanConv.toBean(getOne(queryWrapper),PlanEarningsVO.class); + }catch (Exception e){ + log.error("方案给付单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.FIND_ONE_FAIL); + } + } + + @Override + public boolean deleteInPlanIds(List planIds) { + try { + //执行查询 + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(PlanEarnings::getPalnId,planIds); + return remove(updateWrapper); + }catch (Exception e){ + log.error("方案给付单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.DEL_FAIL); + } + } + + @Override + public boolean deleteInPlanId(List planIds) { + try { + //执行查询 + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(PlanEarnings::getPalnId,planIds); + return remove(updateWrapper); + }catch (Exception e){ + log.error("方案给付单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.DEL_FAIL); + } + } + + @Override + public List findInPlanId(Set planIds) { + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(PlanEarnings::getPalnId,planIds); + return BeanConv.toBeanList(list(queryWrapper),PlanEarningsVO.class); + }catch (Exception e){ + log.error("方案给付单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanEarningsEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanSafeguardServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanSafeguardServiceImpl.java new file mode 100644 index 0000000..97dda59 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/PlanSafeguardServiceImpl.java @@ -0,0 +1,246 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.safeguard.SafeguardConstant; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.pojo.PlanSafeguard; +import com.itheima.sfbx.insurance.mapper.PlanSafeguardMapper; +import com.itheima.sfbx.insurance.service.IPlanSafeguardService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.PlanSafeguardCacheConstant; +import com.itheima.sfbx.insurance.dto.PlanSafeguardVO; +import com.itheima.sfbx.insurance.enums.PlanSafeguardEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:方案保障项服务实现类 + */ +@Slf4j +@Service +public class PlanSafeguardServiceImpl extends ServiceImpl implements IPlanSafeguardService { + + @Autowired + private ISafeguardService safeguardService; + + /*** + * @description 方案保障项多条件组合 + * @param planSafeguardVO 方案保障项 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(PlanSafeguardVO planSafeguardVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险方案ID查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getPlanId())) { + queryWrapper.lambda().eq(PlanSafeguard::getPlanId,planSafeguardVO.getPlanId()); + } + //条款维度key查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getSafeguardKey())) { + queryWrapper.lambda().eq(PlanSafeguard::getSafeguardKey,planSafeguardVO.getSafeguardKey()); + } + //条款维度value查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getSafeguardValue())) { + queryWrapper.lambda().eq(PlanSafeguard::getSafeguardValue,planSafeguardVO.getSafeguardValue()); + } + //显示位置:0 列表页 1 详情页查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getPosition())) { + queryWrapper.lambda().eq(PlanSafeguard::getPosition,planSafeguardVO.getPosition()); + } + //保障内容补充说明查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getRemake())) { + queryWrapper.lambda().eq(PlanSafeguard::getRemake,planSafeguardVO.getRemake()); + } + //保障类型(0保障规则 1 保障信息)查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getSafeguardType())) { + queryWrapper.lambda().eq(PlanSafeguard::getSafeguardType,planSafeguardVO.getSafeguardType()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getSortNo())) { + queryWrapper.lambda().eq(PlanSafeguard::getSortNo,planSafeguardVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(planSafeguardVO.getDataState())) { + queryWrapper.lambda().eq(PlanSafeguard::getDataState,planSafeguardVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(PlanSafeguard::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = PlanSafeguardCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#planSafeguardVO.hashCode()") + public Page findPage(PlanSafeguardVO planSafeguardVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page PlanSafeguardPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(planSafeguardVO); + //执行分页查询 + Page planSafeguardVOPage = BeanConv.toPage( + page(PlanSafeguardPage, queryWrapper), PlanSafeguardVO.class); + //返回结果 + return planSafeguardVOPage; + }catch (Exception e){ + log.error("方案保障项分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = PlanSafeguardCacheConstant.BASIC,key ="#planSafeguardId") + public PlanSafeguardVO findById(String planSafeguardId) { + try { + //执行查询 + return BeanConv.toBean(getById(planSafeguardId),PlanSafeguardVO.class); + }catch (Exception e){ + log.error("方案保障项单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanSafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanSafeguardCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =PlanSafeguardCacheConstant.BASIC,key = "#result.id")}) + public PlanSafeguardVO save(PlanSafeguardVO planSafeguardVO) { + try { + //转换PlanSafeguardVO为PlanSafeguard + PlanSafeguard planSafeguard = BeanConv.toBean(planSafeguardVO, PlanSafeguard.class); + boolean flag = save(planSafeguard); + if (!flag){ + throw new RuntimeException("保存方案保障项失败"); + } + //转换返回对象PlanSafeguardVO + PlanSafeguardVO planSafeguardVOHandler = BeanConv.toBean(planSafeguard, PlanSafeguardVO.class); + return planSafeguardVOHandler; + }catch (Exception e){ + log.error("保存方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanSafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanSafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = PlanSafeguardCacheConstant.BASIC,key = "#planSafeguardVO.id")}) + public Boolean update(PlanSafeguardVO planSafeguardVO) { + try { + //转换PlanSafeguardVO为PlanSafeguard + PlanSafeguard planSafeguard = BeanConv.toBean(planSafeguardVO, PlanSafeguard.class); + boolean flag = updateById(planSafeguard); + if (!flag){ + throw new RuntimeException("修改方案保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("修改方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = PlanSafeguardCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = PlanSafeguardCacheConstant.LIST,allEntries = true), + @CacheEvict(value = PlanSafeguardCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除方案保障项失败"); + } + return flag; + }catch (Exception e){ + log.error("删除方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = PlanSafeguardCacheConstant.LIST,key ="#planSafeguardVO.hashCode()") + public List findList(PlanSafeguardVO planSafeguardVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(planSafeguardVO); + //执行列表查询 + List planSafeguardVOs = BeanConv.toBeanList(list(queryWrapper),PlanSafeguardVO.class); + return planSafeguardVOs; + }catch (Exception e){ + log.error("方案保障项列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.LIST_FAIL); + } + } + + @Override + public boolean deleteInPlanIds(List planIds) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(PlanSafeguard::getPlanId,planIds); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.DEL_FAIL); + } + } + + @Override + public boolean deleteInPlanId(List planIds) { + try { + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().in(PlanSafeguard::getPlanId,planIds); + return remove(updateWrapper); + }catch (Exception e){ + log.error("删除方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.DEL_FAIL); + } + } + + @Override + public List findInPlanId(Set planIds) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().in(PlanSafeguard::getPlanId,planIds); + return BeanConv.toBeanList(list(queryWrapper),PlanSafeguardVO.class); + }catch (Exception e){ + log.error("查询方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.LIST_FAIL); + } + } + + @Override + public List findByPlanId(Long planId) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(PlanSafeguard::getPlanId,planId); + return BeanConv.toBeanList(list(queryWrapper),PlanSafeguardVO.class); + }catch (Exception e){ + log.error("查询方案保障项异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(PlanSafeguardEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskAnalysisServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskAnalysisServiceImpl.java new file mode 100644 index 0000000..27d5256 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskAnalysisServiceImpl.java @@ -0,0 +1,189 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.RiskAnalysis; +import com.itheima.sfbx.insurance.mapper.RiskAnalysisMapper; +import com.itheima.sfbx.insurance.service.IRiskAnalysisService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.RiskAnalysisCacheConstant; +import com.itheima.sfbx.insurance.dto.RiskAnalysisVO; +import com.itheima.sfbx.insurance.enums.RiskAnalysisEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:风险类目服务实现类 + */ +@Slf4j +@Service +public class RiskAnalysisServiceImpl extends ServiceImpl implements IRiskAnalysisService { + + + /*** + * @description 风险类目多条件组合 + * @param riskAnalysisVO 风险类目 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(RiskAnalysisVO riskAnalysisVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险产品id查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getInsuranceId())) { + queryWrapper.lambda().eq(RiskAnalysis::getInsuranceId,riskAnalysisVO.getInsuranceId()); + } + //风险项key查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getAssessmentKey())) { + queryWrapper.lambda().eq(RiskAnalysis::getAssessmentKey,riskAnalysisVO.getAssessmentKey()); + } + //风险项项名称查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getAssessmentKeyName())) { + queryWrapper.lambda().eq(RiskAnalysis::getAssessmentKeyName,riskAnalysisVO.getAssessmentKeyName()); + } + //风险项项值查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getAssessmentVal())) { + queryWrapper.lambda().eq(RiskAnalysis::getAssessmentVal,riskAnalysisVO.getAssessmentVal()); + } + //风险项类型: 0医疗风险 1重疾风险 2身故风险 3意外风险查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getAssessmentType())) { + queryWrapper.lambda().eq(RiskAnalysis::getAssessmentType,riskAnalysisVO.getAssessmentType()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getSortNo())) { + queryWrapper.lambda().eq(RiskAnalysis::getSortNo,riskAnalysisVO.getSortNo()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getRemake())) { + queryWrapper.lambda().eq(RiskAnalysis::getRemake,riskAnalysisVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(riskAnalysisVO.getDataState())) { + queryWrapper.lambda().eq(RiskAnalysis::getDataState,riskAnalysisVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(RiskAnalysis::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = RiskAnalysisCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#riskAnalysisVO.hashCode()") + public Page findPage(RiskAnalysisVO riskAnalysisVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page RiskAnalysisPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(riskAnalysisVO); + //执行分页查询 + Page riskAnalysisVOPage = BeanConv.toPage( + page(RiskAnalysisPage, queryWrapper), RiskAnalysisVO.class); + //返回结果 + return riskAnalysisVOPage; + }catch (Exception e){ + log.error("风险类目分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = RiskAnalysisCacheConstant.BASIC,key ="#riskAnalysisId") + public RiskAnalysisVO findById(String riskAnalysisId) { + try { + //执行查询 + return BeanConv.toBean(getById(riskAnalysisId),RiskAnalysisVO.class); + }catch (Exception e){ + log.error("风险类目单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskAnalysisCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskAnalysisCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =RiskAnalysisCacheConstant.BASIC,key = "#result.id")}) + public RiskAnalysisVO save(RiskAnalysisVO riskAnalysisVO) { + try { + //转换RiskAnalysisVO为RiskAnalysis + RiskAnalysis riskAnalysis = BeanConv.toBean(riskAnalysisVO, RiskAnalysis.class); + boolean flag = save(riskAnalysis); + if (!flag){ + throw new RuntimeException("保存风险类目失败"); + } + //转换返回对象RiskAnalysisVO + RiskAnalysisVO riskAnalysisVOHandler = BeanConv.toBean(riskAnalysis, RiskAnalysisVO.class); + return riskAnalysisVOHandler; + }catch (Exception e){ + log.error("保存风险类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskAnalysisCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskAnalysisCacheConstant.LIST,allEntries = true), + @CacheEvict(value = RiskAnalysisCacheConstant.BASIC,key = "#riskAnalysisVO.id")}) + public Boolean update(RiskAnalysisVO riskAnalysisVO) { + try { + //转换RiskAnalysisVO为RiskAnalysis + RiskAnalysis riskAnalysis = BeanConv.toBean(riskAnalysisVO, RiskAnalysis.class); + boolean flag = updateById(riskAnalysis); + if (!flag){ + throw new RuntimeException("修改风险类目失败"); + } + return flag; + }catch (Exception e){ + log.error("修改风险类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskAnalysisCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskAnalysisCacheConstant.LIST,allEntries = true), + @CacheEvict(value = RiskAnalysisCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除风险类目失败"); + } + return flag; + }catch (Exception e){ + log.error("删除风险类目异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = RiskAnalysisCacheConstant.LIST,key ="#riskAnalysisVO.hashCode()") + public List findList(RiskAnalysisVO riskAnalysisVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(riskAnalysisVO); + //执行列表查询 + List riskAnalysisVOs = BeanConv.toBeanList(list(queryWrapper),RiskAnalysisVO.class); + return riskAnalysisVOs; + }catch (Exception e){ + log.error("风险类目列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskAnalysisEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskServiceImpl.java new file mode 100644 index 0000000..9415b97 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RiskServiceImpl.java @@ -0,0 +1,181 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.Risk; +import com.itheima.sfbx.insurance.mapper.RiskMapper; +import com.itheima.sfbx.insurance.service.IRiskService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.RiskCacheConstant; +import com.itheima.sfbx.insurance.dto.RiskVO; +import com.itheima.sfbx.insurance.enums.RiskEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:风险表服务实现类 + */ +@Slf4j +@Service +public class RiskServiceImpl extends ServiceImpl implements IRiskService { + + + /*** + * @description 风险表多条件组合 + * @param riskVO 风险表 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(RiskVO riskVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //风险项类型key查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getRiskTypeKey())) { + queryWrapper.lambda().eq(Risk::getRiskTypeKey,riskVO.getRiskTypeKey()); + } + //风险项类型name查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getRiskTypeName())) { + queryWrapper.lambda().eq(Risk::getRiskTypeName,riskVO.getRiskTypeName()); + } + //风险项key查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getRiskKey())) { + queryWrapper.lambda().eq(Risk::getRiskKey,riskVO.getRiskKey()); + } + //风险项名称查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getRiskName())) { + queryWrapper.lambda().eq(Risk::getRiskName,riskVO.getRiskName()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getSortNo())) { + queryWrapper.lambda().eq(Risk::getSortNo,riskVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(riskVO.getDataState())) { + queryWrapper.lambda().eq(Risk::getDataState,riskVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Risk::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = RiskCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#riskVO.hashCode()") + public Page findPage(RiskVO riskVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page RiskPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(riskVO); + //执行分页查询 + Page riskVOPage = BeanConv.toPage( + page(RiskPage, queryWrapper), RiskVO.class); + //返回结果 + return riskVOPage; + }catch (Exception e){ + log.error("风险表分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = RiskCacheConstant.BASIC,key ="#riskId") + public RiskVO findById(String riskId) { + try { + //执行查询 + return BeanConv.toBean(getById(riskId),RiskVO.class); + }catch (Exception e){ + log.error("风险表单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =RiskCacheConstant.BASIC,key = "#result.id")}) + public RiskVO save(RiskVO riskVO) { + try { + //转换RiskVO为Risk + Risk risk = BeanConv.toBean(riskVO, Risk.class); + boolean flag = save(risk); + if (!flag){ + throw new RuntimeException("保存风险表失败"); + } + //转换返回对象RiskVO + RiskVO riskVOHandler = BeanConv.toBean(risk, RiskVO.class); + return riskVOHandler; + }catch (Exception e){ + log.error("保存风险表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskCacheConstant.LIST,allEntries = true), + @CacheEvict(value = RiskCacheConstant.BASIC,key = "#riskVO.id")}) + public Boolean update(RiskVO riskVO) { + try { + //转换RiskVO为Risk + Risk risk = BeanConv.toBean(riskVO, Risk.class); + boolean flag = updateById(risk); + if (!flag){ + throw new RuntimeException("修改风险表失败"); + } + return flag; + }catch (Exception e){ + log.error("修改风险表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = RiskCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = RiskCacheConstant.LIST,allEntries = true), + @CacheEvict(value = RiskCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除风险表失败"); + } + return flag; + }catch (Exception e){ + log.error("删除风险表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = RiskCacheConstant.LIST,key ="#riskVO.hashCode()") + public List findList(RiskVO riskVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(riskVO); + //执行列表查询 + List riskVOs = BeanConv.toBeanList(list(queryWrapper),RiskVO.class); + return riskVOs; + }catch (Exception e){ + log.error("风险表列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(RiskEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RuleServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RuleServiceImpl.java new file mode 100644 index 0000000..774504c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/RuleServiceImpl.java @@ -0,0 +1,427 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.dict.DataDictCacheConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.model.Label; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.response.FlowExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.response.RuleExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgeService; +import com.itheima.sfbx.insurance.constant.CustomerRelationConstant; +import com.itheima.sfbx.insurance.constant.RuleConstant; +import com.itheima.sfbx.insurance.dto.CustomerInfoVO; +import com.itheima.sfbx.insurance.dto.CustomerRelationVO; +import com.itheima.sfbx.insurance.dto.DoInsureVo; +import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO; +import com.itheima.sfbx.insurance.enums.CustomerInfoEnum; +import com.itheima.sfbx.insurance.enums.RuleEnum; +import com.itheima.sfbx.insurance.rule.AccessRuleDTO; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import com.itheima.sfbx.insurance.service.*; +import lombok.Data; +import lombok.extern.slf4j.Slf4j; +import org.redisson.api.RKeys; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * RuleServiceImpl + * + * @author: wgl + * @describe: 规则引擎业务层 + * @date: 2022/12/28 10:10 + */ +@Service +@Slf4j +public class RuleServiceImpl implements IRuleService { + + @Autowired + private ICustomerInfoService customerInfoService; + + @Autowired + private ICustomerRelationService customerRelationService; + + @Autowired + private RedissonClient redissonClient; + + @Autowired + private IWorryFreeFlowNodeService flowNodeService; + + @Autowired + private IWorryFreeInsuranceMatchService insuranceMatchService; + + @Autowired + private IWorryFreeRiskItemService riskItemService; + + @Autowired + private IWorryFreeSafeguardQuotaService safeguardQuotaService; + + + + /** + * 获取投保人信息 + * @param worryFreeCustomerInfoVO + * @return + */ + @Override + public void buildBaseParams(WorryFreeCustomerInfoVO worryFreeCustomerInfoVO){ + try { + CustomerRelationVO customerRelationVQueryVO = CustomerRelationVO.builder(). + customerId(SubjectContent.getUserVO().getId()). + dataState(SuperConstant.DATA_STATE_0). + build(); + //获取当前申请人 + List customerRelationVOList = customerRelationService.findList(customerRelationVQueryVO); + Map> groupMap = customerRelationVOList.stream().collect(Collectors.groupingBy(CustomerRelationVO::getRelation)); + Optional selfDTOOptional = groupMap.get(CustomerRelationConstant.SELF).stream().findFirst(); + if(selfDTOOptional.isPresent()){ + CustomerRelationVO selfDTO = selfDTOOptional.get(); + worryFreeCustomerInfoVO.setIdCard(selfDTO.getIdentityCard()); + worryFreeCustomerInfoVO.setName(selfDTO.getName()); + }else{ + throw new ProjectException(RuleEnum.DATA_ERROR_PER_ERROR); + } + //子女数量 + List childerList = groupMap.get(CustomerRelationConstant.CHILDREN); + if(CollectionUtil.isNotEmpty(childerList)){ + //封装子女数 + worryFreeCustomerInfoVO.setChildNum(childerList.size()); + } + //双亲数量 + List parentList = groupMap.get(CustomerRelationConstant.PARENTS); + if(CollectionUtil.isNotEmpty(parentList)){ + //封装赡养父母数 + worryFreeCustomerInfoVO.setParentNum(parentList.size()); + } + }catch (Exception e){ + e.printStackTrace(); + log.error("投保人你基本信息查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(CustomerInfoEnum.FIND_ONE_FAIL); + } + } + + /** + * 省心配 + * @param costomerInfo + */ + @Override + public WorryFreeCustomerInfoVO worryFreePairing(WorryFreeCustomerInfoVO costomerInfo) { + RLock lock = redissonClient.getLock(WorryFreeConstant.getLockKey(costomerInfo.getId())); + try { + boolean locked = lock.tryLock(30, 60, TimeUnit.SECONDS); + cleanHistorry(costomerInfo.getId()); + if (locked) { + //获取uruleService + KnowledgeService knowledgeService = (KnowledgeService) Utils.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + //根据银保监编号获取对应的知识包 + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge("四方保险销售平台/" + "worry_free_stream_0011_a"); + //获取交互Session + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + Map requestParam = objectToMap(costomerInfo); + log.info("省心配模块传入参数:" + requestParam); + session.startProcess("worry_free_stream_0002", requestParam); + Map parameters = session.getParameters(); + log.info("规则引擎的返回结果:" + JSONUtil.parse(parameters).toString()); + //将返回的map结果转换成WorryFreeCustomerInfoVO类型 + WorryFreeCustomerInfoVO res = JSONUtil.toBean(JSONUtil.parseObj(parameters), WorryFreeCustomerInfoVO.class); + return res; + } else { + // 未能获取锁,可能是其他线程正在执行 + // 可以选择等待一段时间后重试或者执行其他逻辑 + throw new ProjectException(RuleEnum.LOCK_NOT_ACQUIRED_ERROR); + } + }catch (Exception e){ + e.printStackTrace(); + throw new ProjectException(RuleEnum.WORRRY_FREE_INSURANCE_ERROR); + }finally { + // 无论如何都要释放锁 + lock.unlock(); + } + } + + /** + * 清空当前登录人的历史记录 + * @param id + */ + private void cleanHistorry(String id) { + flowNodeService.cleanCustomerHistry(id); + insuranceMatchService.cleanCustomerHistry(id); + riskItemService.cleanCustomerHistry(id); + safeguardQuotaService.cleanCustomerHistry(id); + } + + + /** + * 提交问卷信息到规则引擎 + * @param adviceHealthDTO + * @return + */ + @Cacheable(value = DataDictCacheConstant.QUESTION,key ="#adviceHealthDTO.hashCode()") + @Override + public AdviceHealthDTO submitQuestionChoose(AdviceHealthDTO adviceHealthDTO) { + try { + //获取uruleService + KnowledgeService knowledgeService = (KnowledgeService) Utils.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + //根据健康咨询对应的知识包 + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge(RuleConstant.sickAdviceAdviceKnowledge()); + //获取交互Session + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + Map requestParam = objectToMap(adviceHealthDTO); + log.info("问卷信息为:"+requestParam); + session.startProcess(RuleConstant.sickAdviceProcessId(),requestParam); + Map parameters = session.getParameters(); + log.info("规则引擎的返回结果:"+parameters); + log.info("规则的执行结果集合为:"+parameters.get("sicks")+""); + List sicks = (List) parameters.get("sicks"); + if (EmptyUtil.isNullOrEmpty(sicks)){ + parameters.put("result",true); + } + return BeanConv.toBean(parameters,AdviceHealthDTO.class); + }catch (Exception e){ + e.printStackTrace(); + throw new ProjectException(RuleEnum.SICK_ERROR_INSURANCE_ERROR); + } + } + + //==================================RuleDemo=============================== + + @Override + public void testRule(String id) { + try { + //获取uruleService + KnowledgeService knowledgeService = (KnowledgeService) Utils.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + //根据银保监编号获取对应的知识包 + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge("urule学习/" + id); + //获取交互Session + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + Map requestParam = buildParams(); + log.info("贷款申请人信息为:"+requestParam); + session.fireRules(requestParam); + Map parameters = session.getParameters(); + log.info("规则引擎的返回结果:"+parameters); + log.info("规则的执行结果集合为:"+parameters.get("checkList")+""); + }catch (Exception e){ + e.printStackTrace(); + } + } + + private Map buildParams() throws IllegalAccessException { + ApplicantInfo applicantInfo = new ApplicantInfo(); + applicantInfo.setId("1234564878"); + //设置姓名 + applicantInfo.setName("张三"); + //设置年龄 + applicantInfo.setAge(21); + //设置性别 + applicantInfo.setSex("男"); + //设置身份证号 + applicantInfo.setIdCard("430203199206251018"); + //设置收入 + applicantInfo.setIncome(BigDecimal.valueOf(6000)); + //设置负债金额 + applicantInfo.setLiabilities(BigDecimal.valueOf(25000)); + //设置平均每月支出 + applicantInfo.setExpensesMonth(BigDecimal.valueOf(5000)); + //设置存款金额 + applicantInfo.setDeposit(BigDecimal.valueOf(20000)); + //设置自女数量 + applicantInfo.setChildNum(1); + //设置还款周期 + applicantInfo.setRepaymentCycle(2); + //设置学历编号 + applicantInfo.setEduNo(3); + //设置城市编号 + applicantInfo.setCityNo("1"); + //设置贷款申请金额 + applicantInfo.setApplicationAmount(BigDecimal.valueOf(250000)); + //设置校验结果列表 + applicantInfo.setCheckList(new ArrayList()); + + applicantInfo.setDieScore(0); + applicantInfo.setSeriousScore(0); + applicantInfo.setAccidentScore(0); + applicantInfo.setMedicalScore(0); + return objectToMap(applicantInfo); + } + + + /** + * 将Object对象里面的属性和值转化成Map对象 + * + * @param obj + * @return + * @throws IllegalAccessException + */ + public static Map objectToMap(Object obj) throws IllegalAccessException { + Map map = new HashMap(); + Class clazz = obj.getClass(); + for (Field field : clazz.getDeclaredFields()) { + field.setAccessible(true); + String fieldName = field.getName(); + Object value = field.get(obj); + map.put(fieldName, value); + } + return map; + } + /** + * ApplicantInfo + * + * @author: wgl + * @describe: 申请人信息 + * @date: 2022/12/28 10:10 + */ + @Data + public class ApplicantInfo { + + @Label("用户id") + private String id; + + @Label("申请人姓名") + private String name; + + @Label("年龄") + private int age; + + @Label("性别") + private String sex; + + @Label("身份证号") + private String idCard; + + @Label("每月收入") + private BigDecimal income; + + @Label("负债金额") + private BigDecimal liabilities; + + @Label("平均每月支出") + private BigDecimal expensesMonth; + + @Label("存款金额") + private BigDecimal deposit; + + @Label("子女数量") + private int childNum; + + @Label("还款周期") + private int repaymentCycle; + + @Label("学历编号") + private int eduNo; + + @Label("城市编号") + private String cityNo; + + @Label("申请金额") + private BigDecimal applicationAmount; + + @Label("校验结果") + private List checkList; + + @Label("医疗风险总分") + private Integer medicalScore; + + @Label("意外风险总分") + private Integer accidentScore; + + @Label("身故风险总分") + private Integer dieScore; + + @Label("重疾风险总分") + private Integer seriousScore; + + } + + @Override + public void testRuleTable(String id) { + try { + //获取uruleService + KnowledgeService knowledgeService = (KnowledgeService) Utils.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + //根据银保监编号获取对应的知识包 + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge("urule学习/" + id); + //获取交互Session + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + Map requestParam = buildTableParamss(); + RuleExecutionResponse ruleExecutionResponse = session.fireRules(requestParam); + Map parameters = session.getParameters(); + System.out.println(parameters); + List firedRules = ruleExecutionResponse.getFiredRules(); + System.out.println(firedRules); + List flowExecutionResponses = ruleExecutionResponse.getFlowExecutionResponses(); + System.out.println(flowExecutionResponses); + }catch (Exception e){ + e.printStackTrace(); + } + } + + + /** + * ApplicantInfo + * + * @author: wgl + * @describe: 申请人信息 + * @date: 2022/12/28 10:10 + */ + @Data + public class StudentScore { + + @Label("学员id") + private String id; + + @Label("姓名") + private String name; + + @Label("语文成绩") + private BigDecimal score_chinese; + + @Label("数学成绩") + private BigDecimal score_math; + + @Label("英语成绩") + private BigDecimal score_english; + + @Label("分班结果") + private String class_level; + + } + /** + * + * @return + */ + private Map buildTableParamss() { + try { + StudentScore studentScore = new StudentScore(); + studentScore.setName("李四"); + studentScore.setScore_chinese(BigDecimal.valueOf(87)); + studentScore.setScore_english(BigDecimal.valueOf(90)); + studentScore.setScore_math(BigDecimal.valueOf(90)); + return objectToMap(studentScore); + }catch (Exception e){ + e.printStackTrace(); + } + return null; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java new file mode 100644 index 0000000..4861bc4 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SafeguardServiceImpl.java @@ -0,0 +1,143 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.dto.SafeguardVO; +import com.itheima.sfbx.insurance.enums.SafeguardEnum; +import com.itheima.sfbx.insurance.mapper.SafeguardMapper; +import com.itheima.sfbx.insurance.pojo.Safeguard; +import com.itheima.sfbx.insurance.service.ISafeguardService; +import kotlin.jvm.internal.Lambda; +import lombok.extern.slf4j.Slf4j; +import org.jetbrains.annotations.NotNull; +import org.springframework.stereotype.Service; + +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; + +@Slf4j +@Service +public class SafeguardServiceImpl extends ServiceImpl implements ISafeguardService { + + @Override + public Page findPage(SafeguardVO safeguardVO, int pageNum, int pageSize) { + try { + LambdaQueryWrapper queryWrapper = queryWrapper(safeguardVO); + + //2、查询 + Page page = new Page<>(pageNum, pageSize); + Page safeguardPage = page(page, queryWrapper); + + //3、返回 + return BeanConv.toPage(safeguardPage, SafeguardVO.class); + } catch (Exception e) { + log.error("查询保障项分页列表失败", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.PAGE_FAIL); + } + } + + @NotNull + private static LambdaQueryWrapper queryWrapper(SafeguardVO safeguardVO) { + //1、 构造查询条件对象 + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + + queryWrapper.eq(!EmptyUtil.isNullOrEmpty(safeguardVO.getSafeguardKey()),Safeguard::getSafeguardKey, safeguardVO.getSafeguardKey()); + + queryWrapper.like(!EmptyUtil.isNullOrEmpty(safeguardVO.getSafeguardKeyName()),Safeguard::getSafeguardKeyName, safeguardVO.getSafeguardKeyName()); + + queryWrapper.eq(!EmptyUtil.isNullOrEmpty(safeguardVO.getDataState()),Safeguard::getDataState, safeguardVO.getDataState()); + //根据创建时间降序排序 + queryWrapper.orderByDesc(Safeguard::getCreateTime); + //上述查询条件对象中对应的sql的where条件:where safeguard_key = safeguardVO.getSafeguardKey() and safeguard_key_name like ? and data_state =? order by create_time desc + return queryWrapper; + } + + @Override + public SafeguardVO findById(String safeguardId) { + return null; + } + + @Override + public SafeguardVO save(SafeguardVO safeguardVO) { + try { + //转换为实体类不是VO + Safeguard safeguard = BeanConv.toBean(safeguardVO, Safeguard.class); + //保存数据;mp会将新增的id进行回填 + boolean flag = save(safeguard); + if (!flag) { + throw new RuntimeException("新建保障项失败!"); + } + + //判断是否操作成功,不成功则抛出异常 + return BeanConv.toBean(safeguard, SafeguardVO.class); + } catch (Exception e) { + log.error("新建保障项失败{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.SAVE_FAIL); + } + } + + @Override + public Boolean update(SafeguardVO safeguardVO) { + try { + Safeguard safeguard = BeanConv.toBean(safeguardVO, Safeguard.class); + //根据id更新数据 + boolean flag = updateById(safeguard); + if (!flag) { + throw new RuntimeException("修改保障项失败!"); + } + //返回操作结果 + return flag; + } catch (RuntimeException e) { + log.error("修改保障项失败:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.UPDATE_FAIL); + } + } + + @Override + public Boolean delete(String[] checkedIds) { + try { + //将String数组转Long数组 + //Arrays.asList:将数组转换为List集合 + //.map:将List集合中的每个元素都转换为Long类型 + //.collect(Collectors.toList()):将转换后的元素收集到一个新的List集合中 + List idsList = Arrays.asList(checkedIds).stream().map(Long::valueOf).collect(Collectors.toList()); + Boolean flag =removeByIds(idsList); + if (!flag) { + throw new RuntimeException("删除保障项失败!"); + } + return flag; + } catch (Exception e) { + log.error("删除保障项失败:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SafeguardEnum.DEL_FAIL); + } + } + + @Override + public List findList(SafeguardVO safeguardVO) { + try { + //1、创建查询全部保障项 + LambdaQueryWrapper queryWrapper = queryWrapper(safeguardVO); + //2、查询列表 + List list =list(queryWrapper); + return BeanConv.toBeanList(list, SafeguardVO.class); + } catch (Exception e) { + throw new ProjectException(SafeguardEnum.LIST_FAIL); + } + } + + @Override + public List findShowPageItemByKey(List safeguardKeyList) { + return List.of(); + } + + @Override + public SafeguardVO findBySafeguardKey(String safeguardKey) { + return null; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SaleTopInsuranceServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SaleTopInsuranceServiceImpl.java new file mode 100644 index 0000000..adecc99 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SaleTopInsuranceServiceImpl.java @@ -0,0 +1,194 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.SaleTopInsurance; +import com.itheima.sfbx.insurance.mapper.SaleTopInsuranceMapper; +import com.itheima.sfbx.insurance.service.ISaleTopInsuranceService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.SaleTopInsuranceCacheConstant; +import com.itheima.sfbx.insurance.dto.SaleTopInsuranceVO; +import com.itheima.sfbx.insurance.enums.SaleTopInsuranceEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:服务实现类 + */ +@Slf4j +@Service +public class SaleTopInsuranceServiceImpl extends ServiceImpl implements ISaleTopInsuranceService { + + + /*** + * @description 多条件组合 + * @param saleTopInsuranceVO + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SaleTopInsuranceVO saleTopInsuranceVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险类型查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getCheckRule())) { + queryWrapper.lambda().eq(SaleTopInsurance::getCheckRule,saleTopInsuranceVO.getCheckRule()); + } + //保险id查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getInsuranceId())) { + queryWrapper.lambda().eq(SaleTopInsurance::getInsuranceId,saleTopInsuranceVO.getInsuranceId()); + } + //保险名称查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getInsuranceName())) { + queryWrapper.lambda().eq(SaleTopInsurance::getInsuranceName,saleTopInsuranceVO.getInsuranceName()); + } + //保险详情查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getInsuranceDetail())) { + queryWrapper.lambda().eq(SaleTopInsurance::getInsuranceDetail,saleTopInsuranceVO.getInsuranceDetail()); + } + //产品点评查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getComment())) { + queryWrapper.lambda().eq(SaleTopInsurance::getComment,saleTopInsuranceVO.getComment()); + } + //产品描述查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getRemake())) { + queryWrapper.lambda().eq(SaleTopInsurance::getRemake,saleTopInsuranceVO.getRemake()); + } + //分类编号查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getCategoryNo())) { + String categoryStr = String.valueOf(saleTopInsuranceVO.getCategoryNo()).substring(0, 9); + queryWrapper.lambda().likeRight(SaleTopInsurance::getCategoryNo,Long.valueOf(categoryStr)); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getCompanyNo())) { + queryWrapper.lambda().eq(SaleTopInsurance::getCompanyNo,saleTopInsuranceVO.getCompanyNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(saleTopInsuranceVO.getDataState())) { + queryWrapper.lambda().eq(SaleTopInsurance::getDataState,saleTopInsuranceVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(SaleTopInsurance::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SaleTopInsuranceCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#saleTopInsuranceVO.hashCode()") + public Page findPage(SaleTopInsuranceVO saleTopInsuranceVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SaleTopInsurancePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(saleTopInsuranceVO); + //执行分页查询 + Page saleTopInsuranceVOPage = BeanConv.toPage( + page(SaleTopInsurancePage, queryWrapper), SaleTopInsuranceVO.class); + //返回结果 + return saleTopInsuranceVOPage; + }catch (Exception e){ + log.error("分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SaleTopInsuranceCacheConstant.BASIC,key ="#saleTopInsuranceId") + public SaleTopInsuranceVO findById(String saleTopInsuranceId) { + try { + //执行查询 + return BeanConv.toBean(getById(saleTopInsuranceId),SaleTopInsuranceVO.class); + }catch (Exception e){ + log.error("单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SaleTopInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SaleTopInsuranceCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =SaleTopInsuranceCacheConstant.BASIC,key = "#result.id")}) + public SaleTopInsuranceVO save(SaleTopInsuranceVO saleTopInsuranceVO) { + try { + //转换SaleTopInsuranceVO为SaleTopInsurance + SaleTopInsurance saleTopInsurance = BeanConv.toBean(saleTopInsuranceVO, SaleTopInsurance.class); + boolean flag = save(saleTopInsurance); + if (!flag){ + throw new RuntimeException("保存失败"); + } + //转换返回对象SaleTopInsuranceVO + SaleTopInsuranceVO saleTopInsuranceVOHandler = BeanConv.toBean(saleTopInsurance, SaleTopInsuranceVO.class); + return saleTopInsuranceVOHandler; + }catch (Exception e){ + log.error("保存异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SaleTopInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SaleTopInsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SaleTopInsuranceCacheConstant.BASIC,key = "#saleTopInsuranceVO.id")}) + public Boolean update(SaleTopInsuranceVO saleTopInsuranceVO) { + try { + //转换SaleTopInsuranceVO为SaleTopInsurance + SaleTopInsurance saleTopInsurance = BeanConv.toBean(saleTopInsuranceVO, SaleTopInsurance.class); + boolean flag = updateById(saleTopInsurance); + if (!flag){ + throw new RuntimeException("修改失败"); + } + return flag; + }catch (Exception e){ + log.error("修改异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SaleTopInsuranceCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SaleTopInsuranceCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SaleTopInsuranceCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除失败"); + } + return flag; + }catch (Exception e){ + log.error("删除异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SaleTopInsuranceCacheConstant.LIST,key ="#saleTopInsuranceVO.hashCode()") + public List findList(SaleTopInsuranceVO saleTopInsuranceVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(saleTopInsuranceVO); + //执行列表查询 + List saleTopInsuranceVOs = BeanConv.toBeanList(list(queryWrapper),SaleTopInsuranceVO.class); + return saleTopInsuranceVOs; + }catch (Exception e){ + log.error("列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SaleTopInsuranceEnum.LIST_FAIL); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SearchRecordServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SearchRecordServiceImpl.java new file mode 100644 index 0000000..3cc9b29 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SearchRecordServiceImpl.java @@ -0,0 +1,257 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.constant.SearchRecordCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceTypeInfoVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.dto.SearchRecordVO; +import com.itheima.sfbx.insurance.enums.SearchRecordEnum; +import com.itheima.sfbx.insurance.mapper.SearchRecordMapper; +import com.itheima.sfbx.insurance.pojo.SearchRecord; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.ISearchRecordService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @Description:搜索记录服务实现类 + */ +@Slf4j +@Service +public class SearchRecordServiceImpl extends ServiceImpl implements ISearchRecordService { + + + @Autowired + private IInsuranceService insuranceService; + + /*** + * @description 搜索记录多条件组合 + * @param searchRecordVO 搜索记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SearchRecordVO searchRecordVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //搜索内容查询 + if (!EmptyUtil.isNullOrEmpty(searchRecordVO.getContent())) { + queryWrapper.lambda().eq(SearchRecord::getContent, searchRecordVO.getContent()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(searchRecordVO.getDataState())) { + queryWrapper.lambda().eq(SearchRecord::getDataState, searchRecordVO.getDataState()); + } + if (!EmptyUtil.isNullOrEmpty(searchRecordVO.getCreateBy())) { + queryWrapper.lambda().eq(SearchRecord::getCreateBy, searchRecordVO.getCreateBy()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(SearchRecord::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SearchRecordCacheConstant.PAGE, key = "#pageNum+'-'+#pageSize+'-'+#searchRecordVO.hashCode()") + public Page findPage(SearchRecordVO searchRecordVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SearchRecordPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(searchRecordVO); + //执行分页查询 + Page searchRecordVOPage = BeanConv.toPage( + page(SearchRecordPage, queryWrapper), SearchRecordVO.class); + //返回结果 + return searchRecordVOPage; + } catch (Exception e) { + log.error("搜索记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SearchRecordCacheConstant.BASIC, key = "#searchRecordId") + public SearchRecordVO findById(String searchRecordId) { + try { + //执行查询 + return BeanConv.toBean(getById(searchRecordId), SearchRecordVO.class); + } catch (Exception e) { + log.error("搜索记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SearchRecordCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SearchRecordCacheConstant.LIST, allEntries = true)}, + put = {@CachePut(value = SearchRecordCacheConstant.BASIC, key = "#result.id")}) + public SearchRecordVO save(SearchRecordVO searchRecordVO) { + try { + //转换SearchRecordVO为SearchRecord + SearchRecord searchRecord = BeanConv.toBean(searchRecordVO, SearchRecord.class); + boolean flag = save(searchRecord); + if (!flag) { + throw new RuntimeException("保存搜索记录失败"); + } + //转换返回对象SearchRecordVO + SearchRecordVO searchRecordVOHandler = BeanConv.toBean(searchRecord, SearchRecordVO.class); + return searchRecordVOHandler; + } catch (Exception e) { + log.error("保存搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SearchRecordCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SearchRecordCacheConstant.LIST, allEntries = true), + @CacheEvict(value = SearchRecordCacheConstant.BASIC, key = "#searchRecordVO.id")}) + public Boolean update(SearchRecordVO searchRecordVO) { + try { + //转换SearchRecordVO为SearchRecord + SearchRecord searchRecord = BeanConv.toBean(searchRecordVO, SearchRecord.class); + boolean flag = updateById(searchRecord); + if (!flag) { + throw new RuntimeException("修改搜索记录失败"); + } + return flag; + } catch (Exception e) { + log.error("修改搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SearchRecordCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SearchRecordCacheConstant.LIST, allEntries = true), + @CacheEvict(value = SearchRecordCacheConstant.BASIC, allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除搜索记录失败"); + } + return flag; + } catch (Exception e) { + log.error("删除搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SearchRecordCacheConstant.LIST, key = "#searchRecordVO.hashCode()") + public List findList(SearchRecordVO searchRecordVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(searchRecordVO); + //执行列表查询 + List searchRecordVOs = BeanConv.toBeanList(list(queryWrapper), SearchRecordVO.class); + return searchRecordVOs; + } catch (Exception e) { + log.error("搜索记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.LIST_FAIL); + } + } + + + /** + * 查询排名前10的记录 + * + * @param limit + * @return + */ + @Override + public List tindTopRecord(int limit) { + try { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.select("IFNULL(COUNT(*) ,0) as id,content"); + queryWrapper.lambda(). + eq(SearchRecord::getDataState, SuperConstant.DATA_STATE_0). + groupBy(SearchRecord::getContent). + orderByDesc(SearchRecord::getId). + last("limit " + limit); + List searchRecordVOs = BeanConv.toBeanList(list(queryWrapper), SearchRecordVO.class); + return searchRecordVOs; + } catch (Exception e) { + log.error("搜索记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.LIST_FAIL); + } + } + + /** + * ‘ + * 清空历史记录 + * + * @return + */ + @Override + public Boolean cleanSearchRecord() { + try { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(SearchRecord::getCreateBy, SubjectContent.getUserVO().getId()); + boolean remove = this.remove(queryWrapper); + return remove; + } catch (Exception e) { + log.error("搜索记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.LIST_FAIL); + } + } + + /** + * 搜索我的搜索历史保险 + * + * @param userVO + * @return + */ + @Override + public List findMyHistory(UserVO userVO) { + try { + SearchRecordVO searchVO = SearchRecordVO.builder(). + createBy(SubjectContent.getUserVO().getId()). + dataState(SuperConstant.DATA_STATE_0). + build(); + List records = findPage(searchVO, 0, 6).getRecords(); + List contentList = records.stream().map(SearchRecordVO::getContent).collect(Collectors.toList()); + //获取所有的保险id + List insuranceIds = new ArrayList<>(); + for (String indexContent : contentList) { + JsonObject jsonObject = JsonParser.parseString(indexContent).getAsJsonObject(); + // 提取insuranceId的内容 + insuranceIds.add(jsonObject.get("insuranceId").getAsString()); + } + //查询保险id内容 + InsuranceVO insuranceVO = InsuranceVO.builder().dataState(SuperConstant.DATA_STATE_0).checkedIds(insuranceIds.toArray(String[]::new)).build(); + return insuranceService.findList(insuranceVO); + } catch (Exception e) { + log.error("搜索记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SearchRecordEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SelfSelectionServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SelfSelectionServiceImpl.java new file mode 100644 index 0000000..7bbee15 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SelfSelectionServiceImpl.java @@ -0,0 +1,226 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.constant.SelfSelectionCacheConstant; +import com.itheima.sfbx.insurance.dto.InsuranceTypeInfoVO; +import com.itheima.sfbx.insurance.dto.InsuranceVO; +import com.itheima.sfbx.insurance.dto.SelfSelectionVO; +import com.itheima.sfbx.insurance.enums.SelfSelectionEnum; +import com.itheima.sfbx.insurance.mapper.SelfSelectionMapper; +import com.itheima.sfbx.insurance.pojo.SelfSelection; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.ISelfSelectionService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * @Description:自选保险服务实现类 + */ +@Slf4j +@Service +public class SelfSelectionServiceImpl extends ServiceImpl implements ISelfSelectionService { + + @Autowired + private IInsuranceService insuranceService; + + /*** + * @description 自选保险多条件组合 + * @param selfSelectionVO 自选保险 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SelfSelectionVO selfSelectionVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险ID查询 + if (!EmptyUtil.isNullOrEmpty(selfSelectionVO.getInsuranceId())) { + queryWrapper.lambda().eq(SelfSelection::getInsuranceId, selfSelectionVO.getInsuranceId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(selfSelectionVO.getSortNo())) { + queryWrapper.lambda().eq(SelfSelection::getSortNo, selfSelectionVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(selfSelectionVO.getDataState())) { + queryWrapper.lambda().eq(SelfSelection::getDataState, selfSelectionVO.getDataState()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(selfSelectionVO.getCreateBy())) { + queryWrapper.lambda().eq(SelfSelection::getCreateBy, selfSelectionVO.getCreateBy()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(SelfSelection::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SelfSelectionCacheConstant.PAGE, key = "#pageNum+'-'+#pageSize+'-'+#selfSelectionVO.hashCode()") + public Page findPage(SelfSelectionVO selfSelectionVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SelfSelectionPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(selfSelectionVO); + //执行分页查询 + Page selfSelectionVOPage = BeanConv.toPage( + page(SelfSelectionPage, queryWrapper), SelfSelectionVO.class); + //返回结果 + return selfSelectionVOPage; + } catch (Exception e) { + log.error("自选保险分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SelfSelectionCacheConstant.BASIC, key = "#selfSelectionId") + public SelfSelectionVO findById(String selfSelectionId) { + try { + //执行查询 + return BeanConv.toBean(getById(selfSelectionId), SelfSelectionVO.class); + } catch (Exception e) { + log.error("自选保险单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SelfSelectionCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SelfSelectionCacheConstant.LIST, allEntries = true)}, + put = {@CachePut(value = SelfSelectionCacheConstant.BASIC, key = "#result.id")}) + public SelfSelectionVO save(SelfSelectionVO selfSelectionVO) { + try { + //首先查询当前登录人是否已经添加了当前保险,不能重复添加 + QueryWrapper selfSelectionQueryWrapper = queryWrapper(selfSelectionVO); + int count = count(selfSelectionQueryWrapper); + if(count>0){ + log.error("保存自选保险异常:重复添加重复的自选保险,用户:{},用户id:{},添加重复的保险为:{}", SubjectContent.getUserVO().getUsername(),SubjectContent.getUserVO().getId(),selfSelectionVO.getInsuranceId()); + throw new ProjectException(SelfSelectionEnum.EXIST_FAIL); + } + //转换SelfSelectionVO为SelfSelection + SelfSelection selfSelection = BeanConv.toBean(selfSelectionVO, SelfSelection.class); + boolean flag = save(selfSelection); + if (!flag) { + throw new RuntimeException("保存自选保险失败"); + } + //转换返回对象SelfSelectionVO + SelfSelectionVO selfSelectionVOHandler = BeanConv.toBean(selfSelection, SelfSelectionVO.class); + return selfSelectionVOHandler; + } catch (Exception e) { + log.error("保存自选保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.SAVE_FAIL); + } + } + + + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SelfSelectionCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SelfSelectionCacheConstant.LIST, allEntries = true), + @CacheEvict(value = SelfSelectionCacheConstant.BASIC, key = "#selfSelectionVO.id")}) + public Boolean update(SelfSelectionVO selfSelectionVO) { + try { + //转换SelfSelectionVO为SelfSelection + SelfSelection selfSelection = BeanConv.toBean(selfSelectionVO, SelfSelection.class); + boolean flag = updateById(selfSelection); + if (!flag) { + throw new RuntimeException("修改自选保险失败"); + } + return flag; + } catch (Exception e) { + log.error("修改自选保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SelfSelectionCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = SelfSelectionCacheConstant.LIST, allEntries = true), + @CacheEvict(value = SelfSelectionCacheConstant.BASIC, allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除自选保险失败"); + } + return flag; + } catch (Exception e) { + log.error("删除自选保险异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SelfSelectionCacheConstant.LIST, key = "#selfSelectionVO.hashCode()") + public List findList(SelfSelectionVO selfSelectionVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(selfSelectionVO); + //执行列表查询 + List selfSelectionVOs = BeanConv.toBeanList(list(queryWrapper), SelfSelectionVO.class); + return selfSelectionVOs; + } catch (Exception e) { + log.error("自选保险列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.LIST_FAIL); + } + } + + + /** + * 查询我的自选列表方法 + * 自选列表:已经添加的自选保险【添加过的保险将不出现在为你推荐的热门保险】-->tab_self_selection-->tab_insurance-->tab_insurance_plan + */ + @Override + @Cacheable(value = SelfSelectionCacheConstant.LIST, key = "#userVO.getId()") + public List findMySelection(UserVO userVO) { + try { + SelfSelectionVO selfSelect = SelfSelectionVO.builder().dataState(SuperConstant.DATA_STATE_0).build(); + selfSelect.setCreateBy(userVO.getId()); + //查询当前登录人的所有保险 + List selfSelectList = findList(selfSelect); + if (!EmptyUtil.isNullOrEmpty(selfSelectList)){ + //获取所有的保险ID集合 + List insuranceIds = selfSelectList.stream().map(SelfSelectionVO::getInsuranceId).collect(Collectors.toList()); + String[] stringInsuranceIds = insuranceIds.stream().map(Object::toString).toArray(String[]::new); + InsuranceVO insuranceVO = InsuranceVO.builder().checkedIds(stringInsuranceIds).build(); + List insuranceList = insuranceService.findList(insuranceVO); + //按照checkRule进行分组 + Map> groupedByCheckRule = insuranceList.stream() + .collect(Collectors.groupingBy(InsuranceVO::getCheckRule)); + //构建结果集返回内容 + return groupedByCheckRule.entrySet().stream() + .map(entry -> new InsuranceTypeInfoVO(InsureConstant.getRuleNameById(entry.getKey()), entry.getValue())) + .collect(Collectors.toList()); + } + return new ArrayList<>(); + } catch (Exception e) { + log.error("自选保险列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SelfSelectionEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickSearchRecordServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickSearchRecordServiceImpl.java new file mode 100644 index 0000000..e8a0b7a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickSearchRecordServiceImpl.java @@ -0,0 +1,211 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.dto.SickVO; +import com.itheima.sfbx.insurance.pojo.SickSearchRecord; +import com.itheima.sfbx.insurance.mapper.SickSearchRecordMapper; +import com.itheima.sfbx.insurance.service.ISickSearchRecordService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.SickSearchRecordCacheConstant; +import com.itheima.sfbx.insurance.dto.SickSearchRecordVO; +import com.itheima.sfbx.insurance.enums.SickSearchRecordEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; + +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; + +/** + * @Description:疾病搜索记录服务实现类 + */ +@Slf4j +@Service +public class SickSearchRecordServiceImpl extends ServiceImpl implements ISickSearchRecordService { + + @Autowired + SickSearchRecordMapper sickSearchRecordMapper; + + /*** + * @description 疾病搜索记录多条件组合 + * @param sickSearchRecordVO 疾病搜索记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SickSearchRecordVO sickSearchRecordVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //搜索内容查询 + if (!EmptyUtil.isNullOrEmpty(sickSearchRecordVO.getContent())) { + queryWrapper.lambda().eq(SickSearchRecord::getContent,sickSearchRecordVO.getContent()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(sickSearchRecordVO.getDataState())) { + queryWrapper.lambda().eq(SickSearchRecord::getDataState,sickSearchRecordVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(SickSearchRecord::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SickSearchRecordCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#sickSearchRecordVO.hashCode()") + public Page findPage(SickSearchRecordVO sickSearchRecordVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SickSearchRecordPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(sickSearchRecordVO); + //执行分页查询 + Page sickSearchRecordVOPage = BeanConv.toPage( + page(SickSearchRecordPage, queryWrapper), SickSearchRecordVO.class); + //返回结果 + return sickSearchRecordVOPage; + }catch (Exception e){ + log.error("疾病搜索记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SickSearchRecordCacheConstant.BASIC,key ="#sickSearchRecordId") + public SickSearchRecordVO findById(String sickSearchRecordId) { + try { + //执行查询 + return BeanConv.toBean(getById(sickSearchRecordId),SickSearchRecordVO.class); + }catch (Exception e){ + log.error("疾病搜索记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickSearchRecordCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickSearchRecordCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =SickSearchRecordCacheConstant.BASIC,key = "#result.id")}) + public SickSearchRecordVO save(SickSearchRecordVO sickSearchRecordVO) { + try { + //转换SickSearchRecordVO为SickSearchRecord + SickSearchRecord sickSearchRecord = BeanConv.toBean(sickSearchRecordVO, SickSearchRecord.class); + boolean flag = save(sickSearchRecord); + if (!flag){ + throw new RuntimeException("保存疾病搜索记录失败"); + } + //转换返回对象SickSearchRecordVO + SickSearchRecordVO sickSearchRecordVOHandler = BeanConv.toBean(sickSearchRecord, SickSearchRecordVO.class); + return sickSearchRecordVOHandler; + }catch (Exception e){ + log.error("保存疾病搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickSearchRecordCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickSearchRecordCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SickSearchRecordCacheConstant.BASIC,key = "#sickSearchRecordVO.id")}) + public Boolean update(SickSearchRecordVO sickSearchRecordVO) { + try { + //转换SickSearchRecordVO为SickSearchRecord + SickSearchRecord sickSearchRecord = BeanConv.toBean(sickSearchRecordVO, SickSearchRecord.class); + boolean flag = updateById(sickSearchRecord); + if (!flag){ + throw new RuntimeException("修改疾病搜索记录失败"); + } + return flag; + }catch (Exception e){ + log.error("修改疾病搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickSearchRecordCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickSearchRecordCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SickSearchRecordCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除疾病搜索记录失败"); + } + return flag; + }catch (Exception e){ + log.error("删除疾病搜索记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SickSearchRecordCacheConstant.LIST,key ="#sickSearchRecordVO.hashCode()") + public List findList(SickSearchRecordVO sickSearchRecordVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(sickSearchRecordVO); + //执行列表查询 + List sickSearchRecordVOs = BeanConv.toBeanList(list(queryWrapper),SickSearchRecordVO.class); + return sickSearchRecordVOs; + }catch (Exception e){ + log.error("疾病搜索记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.LIST_FAIL); + } + } + + /** + * 批量插入搜索记录 + * @param searchRecordVOList + * @return + */ + @Override + public Boolean saveRecord(List searchRecordVOList) { + try { + List searchRecords = BeanConv.toBeanList(searchRecordVOList, SickSearchRecord.class); + saveBatch(searchRecords); + return true; + }catch (Exception e){ + log.error("疾病搜索记录列表保存异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.SAVE_FAIL); + } + } + + /** + * 疾病热搜榜 + * 默认查询30天内的疾病 + * @return + */ + @Override + public List hotSickList() { + try{ + //开始查询这个月内搜索次数最多的疾病 + DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + LocalDateTime now = LocalDateTime.now().plusMonths(-1L); + LocalDateTime maxTime = LocalDateTime.of(LocalDateTime.now().toLocalDate(), LocalTime.MAX); + LocalDateTime minTime = LocalDateTime.of(now.toLocalDate(), LocalTime.MIN); + String begin = dtf.format(minTime); + String end = dtf.format(maxTime); + List res = sickSearchRecordMapper.findSearchList(begin,end); + return res; + }catch (Exception e){ + log.error("热搜榜搜索异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.SAVE_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickServiceImpl.java new file mode 100644 index 0000000..7f4f7f0 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/SickServiceImpl.java @@ -0,0 +1,393 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.io.resource.FileObjectResource; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.itheima.sfbx.dict.feign.DataDictFeign; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.sick.SickConstant; +import com.itheima.sfbx.framework.commons.dto.dict.DataDictVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.enums.SickSearchRecordEnum; +import com.itheima.sfbx.insurance.pojo.SearchRecord; +import com.itheima.sfbx.insurance.pojo.Sick; +import com.itheima.sfbx.insurance.mapper.SickMapper; +import com.itheima.sfbx.insurance.rule.advice.AdviceHealthDTO; +import com.itheima.sfbx.insurance.service.IInsuranceSievingService; +import com.itheima.sfbx.insurance.service.IRuleService; +import com.itheima.sfbx.insurance.service.ISickSearchRecordService; +import com.itheima.sfbx.insurance.service.ISickService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.security.feign.CustomerFeign; +import com.itheima.sfbx.security.feign.UserFeign; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.SickCacheConstant; +import com.itheima.sfbx.insurance.enums.SickEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; + +import java.util.*; +import java.util.concurrent.Executor; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; + +import javax.annotation.Resource; + +/** + * @Description:疾病表服务实现类 + */ +@Slf4j +@Service +public class SickServiceImpl extends ServiceImpl implements ISickService { + + @Autowired + private SickMapper sickMapper; + + @Autowired + private DataDictFeign dataDictFeign; + + @Autowired + private ISickSearchRecordService sickSearchRecordService; + + @Resource(name = "searchRecordExecutor") + private Executor searchRecordExecutor; + + @Autowired + private IRuleService ruleService; + + @Autowired + private IInsuranceSievingService insuranceSievingService; + + + /*** + * @description 疾病表多条件组合 + * @param sickVO 疾病表 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(SickVO sickVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //疾病Key查询 + if (!EmptyUtil.isNullOrEmpty(sickVO.getSickKey())) { + queryWrapper.lambda().eq(Sick::getSickKey,sickVO.getSickKey()); + } + //疾病名称查询 + if (!EmptyUtil.isNullOrEmpty(sickVO.getSickKeyName())) { + queryWrapper.lambda().like(Sick::getSickKeyName,sickVO.getSickKeyName()); + } + //疾病项值查询 + if (!EmptyUtil.isNullOrEmpty(sickVO.getSickVal())) { + queryWrapper.lambda().eq(Sick::getSickVal,sickVO.getSickVal()); + } + //备注查询 + if (!EmptyUtil.isNullOrEmpty(sickVO.getRemake())) { + queryWrapper.lambda().eq(Sick::getRemake,sickVO.getRemake()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(sickVO.getDataState())) { + queryWrapper.lambda().eq(Sick::getDataState,sickVO.getDataState()); + } + if (!EmptyUtil.isNullOrEmpty(sickVO.getSickType())) { + queryWrapper.lambda().eq(Sick::getSickType,sickVO.getSickType()); + } + if (!EmptyUtil.isNullOrEmpty(sickVO.getQuestion())) { + queryWrapper.lambda().eq(Sick::getQuestion,sickVO.getQuestion()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Sick::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = SickCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#sickVO.hashCode()") + public Page findPage(SickVO sickVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page SickPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(sickVO); + //执行分页查询 + Page sickVOPage = BeanConv.toPage( + page(SickPage, queryWrapper), SickVO.class); + //返回结果 + return sickVOPage; + }catch (Exception e){ + log.error("疾病表分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = SickCacheConstant.BASIC,key ="#sickId") + public SickVO findById(String sickId) { + try { + //执行查询 + return BeanConv.toBean(getById(sickId),SickVO.class); + }catch (Exception e){ + log.error("疾病表单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =SickCacheConstant.BASIC,key = "#result.id")}) + public SickVO save(SickVO sickVO) { + try { + //转换SickVO为Sick + Sick sick = BeanConv.toBean(sickVO, Sick.class); + boolean flag = save(sick); + if (!flag){ + throw new RuntimeException("保存疾病表失败"); + } + //转换返回对象SickVO + SickVO sickVOHandler = BeanConv.toBean(sick, SickVO.class); + return sickVOHandler; + }catch (Exception e){ + log.error("保存疾病表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SickCacheConstant.BASIC,key = "#sickVO.id")}) + public Boolean update(SickVO sickVO) { + try { + //转换SickVO为Sick + Sick sick = BeanConv.toBean(sickVO, Sick.class); + boolean flag = updateById(sick); + if (!flag){ + throw new RuntimeException("修改疾病表失败"); + } + return flag; + }catch (Exception e){ + log.error("修改疾病表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = SickCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = SickCacheConstant.LIST,allEntries = true), + @CacheEvict(value = SickCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除疾病表失败"); + } + return flag; + }catch (Exception e){ + log.error("删除疾病表异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = SickCacheConstant.LIST,key ="#sickVO.hashCode()") + public List findList(SickVO sickVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(sickVO); + //执行列表查询 + List sickVOs = BeanConv.toBeanList(list(queryWrapper),SickVO.class); + return sickVOs; + }catch (Exception e){ + log.error("疾病表列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.LIST_FAIL); + } + } + + /** + * 获取所有的疾病类型 + * @return + */ + @Override + public List findSickType() { + try{ + List res = dataDictFeign.findDataDictVOByParentKey(SickConstant.SICK_TYPE); + return res; + }catch (Exception e){ + log.error("疾病类型查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.SICK_TYPE_FAIL); + } + } + + /** + * 搜索疾病 + * @param sickName + * @return + */ + @Override + public List searchSick(String sickName,UserVO userVO) { + try{ + SickVO sickVO = SickVO.builder(). + dataState(SuperConstant.DATA_STATE_0). + sickKeyName(sickName). + build(); + //疾病名称 + if(StrUtil.isNotEmpty(sickName)){ + sickVO.setSickKeyName(sickName); + } + List res = findList(sickVO); + //疾病搜索 + if(CollectionUtil.isNotEmpty(res)&&StrUtil.isNotEmpty(sickName)){ + //异步插入搜索记录 + searchRecordExecutor.execute( + new Runnable() { + @Override + public void run() { + List searchRecordVOList = new ArrayList<>(); + for (SickVO index :res) { + SickSearchRecordVO sickSearchRecordVO = SickSearchRecordVO.builder(). + content(index.getSickKey()). + dataState(SuperConstant.DATA_STATE_0). + build(); + searchRecordVOList.add(sickSearchRecordVO); + } + sickSearchRecordService.saveRecord(searchRecordVOList); + } + } + ); + } + return res; + }catch (Exception e){ + log.error("疾病搜索异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.SICK_TYPE_FAIL); + } + } + + /** + * 健康咨询 + * @param seekAdviceVO + * @return + */ + @Override + public QuestionTemplateVO seekAdviceHealth(SeekAdviceVO seekAdviceVO) { + try{ + QuestionTemplateVO res = new QuestionTemplateVO(); + Map> questions = new HashMap<>(); + if(ObjectUtil.isNull(seekAdviceVO)){ + throw new ProjectException(SickEnum.ADVICE_SICK_DATA_FAIL); + } + if(CollectionUtil.isEmpty(seekAdviceVO.getSickList())){ + throw new ProjectException(SickEnum.ADVICE_SICK_DATA_FAIL); + } + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(Sick::getSickKey,seekAdviceVO.getSickList()); + queryWrapper.eq(Sick::getDataState,SuperConstant.DATA_STATE_0); + //查询所有的疾病项 + List sickVOs = BeanConv.toBeanList(list(queryWrapper),SickVO.class); + //根据疾病项中的内容构建问卷信息 + for (SickVO sickIndex: sickVOs) { + List questionVO = null; + if(StrUtil.isNotEmpty(sickIndex.getQuestion())){ + questionVO = JSONUtil.toBean(sickIndex.getQuestion(), List.class); + } + questions.put(sickIndex.getSickKey(),questionVO); + } + res.setSicks(sickVOs); + res.setQuestions(questions); + return res; + }catch (ProjectException e){ + throw e; + }catch (Exception e){ + log.error("疾病搜索异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.SICK_TYPE_FAIL); + } + } + + + /** + * 提交答案 + * 提交数据到规则引擎 + * @param adviceHealthDTO + * @return + */ + @Override + public AdviceHealthDTO submitQuestionChoose(AdviceHealthDTO adviceHealthDTO) { + try{ + AdviceHealthDTO res = ruleService.submitQuestionChoose(adviceHealthDTO); + //疾病名称替换 + List sicks = new ArrayList<>(); + if(CollectionUtil.isNotEmpty(res.getSicks())){ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.in(Sick::getSickKey, res.getSicks()); + queryWrapper.eq(Sick::getDataState, SuperConstant.DATA_STATE_0); + //查询所有的疾病项 + List sickVOs = BeanConv.toBeanList(list(queryWrapper), SickVO.class); + sicks = sickVOs.stream().map(SickVO::getSickKeyName).collect(Collectors.toList()); + res.setSicks(sicks); + } + UserVO userVO = SubjectContent.getUserVO(); + //异步插入保险初筛记录 + List finalSicks = sicks; + searchRecordExecutor.execute( + new Runnable() { + @Override + public void run() { + InsuranceSievingVO insuranceSievingVO = new InsuranceSievingVO(); + //根据结果返回 + insuranceSievingVO.setResult(res.getResult()); + insuranceSievingVO.setName(userVO.getRealName()); + insuranceSievingVO.setSicksName(String.join(",", finalSicks)); + insuranceSievingVO.setSicksKey(String.join(",", res.getSicks())); + insuranceSievingService.save(insuranceSievingVO); + } + } + ); + //记录健康咨询日志 + + return res; + }catch (Exception e){ + log.error("保险问卷问答异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickEnum.SICK_TYPE_FAIL); + } + } + + /** + * 常见疾病: + * 脂肪肝, 肝硬化, 乙肝, 糖尿病, 甲状腺结节, 骨折, 急性肺炎, 新型冠状病毒肺炎,哮喘 + * disease_04_10,disease_04_11,disease_04_12,disease_03_06,disease_01_01,disease_02_01,disease_06_01,disease_06_03,disease_06_12 + * + * @return + */ + @Override + public List commonDiseases() { + try{ + List sickNames = Arrays.asList("disease_04_10","disease_04_11","disease_04_12","disease_03_06","disease_01_01","disease_02_01","disease_06_01","disease_06_03","disease_06_12"); + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper(); + queryWrapper.in(Sick::getSickKey,sickNames); + List res = list(queryWrapper); + return res; + }catch (Exception e){ + log.error("常见疾病搜索异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(SickSearchRecordEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/TripartiteInsureServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/TripartiteInsureServiceImpl.java new file mode 100644 index 0000000..1306f79 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/TripartiteInsureServiceImpl.java @@ -0,0 +1,80 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.alibaba.fastjson.JSONArray; +import com.itheima.sfbx.RequestTemplate; +import com.itheima.sfbx.dto.ResponseDTO; +import com.itheima.sfbx.framework.commons.constant.security.AuthChannelConstant; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import com.itheima.sfbx.framework.commons.dto.external.TripartiteInsureDTO; +import com.itheima.sfbx.framework.commons.dto.security.AuthChannelVO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.insurance.dto.WarrantyVO; +import com.itheima.sfbx.insurance.dto.WarrantyVerifyVO; +import com.itheima.sfbx.insurance.service.IWarrantyVerifyService; +import com.itheima.sfbx.insurance.service.TripartiteInsureService; +import com.itheima.sfbx.security.feign.AuthChannelFeign; +import org.apache.http.client.utils.URIBuilder; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; +import java.util.stream.Collectors; + +/** + * TripartiteInsureServiceImpl + * + * @author: wgl + * @describe: 三方公司:投保接口 + * @date: 2022/12/28 10:10 + */ +@Service +public class TripartiteInsureServiceImpl implements TripartiteInsureService { + + @Autowired + AuthChannelFeign authChannelFeign; + + @Autowired + IWarrantyVerifyService warrantyVerifyService; + + @Override + public ResponseDTO insure(WarrantyVO warrantyVO) { + try { + //查询三方接口配置信息 + AuthChannelVO authChannelVO = authChannelFeign.findAuthChannelByCompanyNoAndChannelLabel( + warrantyVO.getCompanyNo(), + AuthChannelConstant.CHANNEL_LABEL_INSURE); + if (EmptyUtil.isNullOrEmpty(authChannelVO)){ + throw new RuntimeException("尚未配置三方秘钥"); + } + List otherConfigVOs = JSONArray.parseArray(authChannelVO.getOtherConfig(), OtherConfigVO.class); + List otherConfigVOsHandler = otherConfigVOs.stream().filter(n -> { + return n.getConfigKey().equals(AuthChannelConstant.PUBLICKEY); + }).collect(Collectors.toList()); + if (EmptyUtil.isNullOrEmpty(otherConfigVOsHandler)){ + throw new RuntimeException("尚未配置三方公钥"); + } + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost(authChannelVO.getDomain()) + .setPath("/insure"); + RequestTemplate requestTemplate = RequestTemplate.builder() + .appId(authChannelVO.getAppId()) + .privateKey(authChannelVO.getAppSecret()) + .publicKey(otherConfigVOsHandler.get(0).getConfigValue()) + .uriBuilder(urlBuilder) + .build(); + ResponseDTO responseDTO = requestTemplate.doRequest(warrantyVO, ResponseDTO.class); + //保存审核信息 + WarrantyVerifyVO warrantyVerifyVO = WarrantyVerifyVO.builder() + .warrantyNo(warrantyVO.getWarrantyNo()) + .companyNo(warrantyVO.getCompanyNo()) + .verifyCode(responseDTO.getCode()) + .verifyMsg(responseDTO.getMsg()) + .build(); + warrantyVerifyService.save(warrantyVerifyVO); + return responseDTO; + }catch (Exception e){ + throw new RuntimeException("调用三方接口失败"); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/UruleDataExportServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/UruleDataExportServiceImpl.java new file mode 100644 index 0000000..559cc40 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/UruleDataExportServiceImpl.java @@ -0,0 +1,174 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSON; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; +import com.itheima.sfbx.insurance.pojo.Sick; +import com.itheima.sfbx.insurance.service.DataExportService; +import com.itheima.sfbx.insurance.service.ISickService; +import lombok.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + * UruleDataExportServiceImpl + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +@Service +public class UruleDataExportServiceImpl implements DataExportService { + + @Autowired + private ISickService sickService; + + /** + * 数据导入 + * + * @return + */ + @Override + public Object dataInport() { + String ss = "[{\"typeName\":\"disease_01\",\"typeTitle\":\"甲状腺疾病\",\"fielldName\":\"disease_01_01\",\"fielldTitle\":\"甲状腺结节\",\"sickQuestion\":\"问卷:甲状腺结节\",\"question_a\":\"怀疑恶性活存在TI-RADS≥4级\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"针对该结果,是否有相应甲状腺结节/肿块的病理结果(包括穿刺活检)\",\"answer_b1\":\"是\",\"answer_b2\":\"否\",\"question_c\":\"病理结果是否均为良性\",\"answer_c1\":\"是\",\"answer_c2\":\"否\"},{\"typeName\":\"disease_01\",\"typeTitle\":\"甲状腺疾病\",\"fielldName\":\"disease_01_02\",\"fielldTitle\":\"甲状腺功能减退\",\"sickQuestion\":\"问卷:甲状腺功能减退\",\"question_a\":\"最近一次检查,甲状腺功能正常,未曾有过甲状腺眼病、心脏肥大、房颤、心动过速、心包积液、肢体水肿、痴呆或智力下降\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_01\",\"typeTitle\":\"甲状腺疾病\",\"fielldName\":\"disease_01_03\",\"fielldTitle\":\"甲状腺功能亢进\",\"sickQuestion\":\"问卷:甲状腺功能亢进\",\"question_a\":\"最近一次检查,甲状腺功能正常,未曾有过甲状腺眼病、心脏肥大、房颤、心动过速、心包积液、肢体水肿、痴呆或智力下降\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_02\",\"typeTitle\":\"骨科、受伤类疾病\",\"fielldName\":\"disease_02_01\",\"fielldTitle\":\"骨折\",\"sickQuestion\":\"问卷:骨折\",\"question_a\":\"是否为病理性骨折 (主要因疾病引起的骨折),或骨折部位位于颅骨 (即头部)、脊柱 (颈椎、胸椎、腰椎) 、骨盆或伴有心、肝、肾等脏器损伤\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"(否)已基本治愈,骨折部位功能已恢复\",\"answer_b1\":\"是\",\"answer_b2\":\"否\"},{\"typeName\":\"disease_02\",\"typeTitle\":\"骨科、受伤类疾病\",\"fielldName\":\"disease_02_02\",\"fielldTitle\":\"肩周炎\",\"sickQuestion\":\"问卷:肩周炎\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_02\",\"typeTitle\":\"骨科、受伤类疾病\",\"fielldName\":\"disease_02_03\",\"fielldTitle\":\"骨质疏松\",\"sickQuestion\":\"问卷:骨质疏松\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_02\",\"typeTitle\":\"骨科、受伤类疾病\",\"fielldName\":\"disease_02_04\",\"fielldTitle\":\"腰间盘突出\",\"sickQuestion\":\"问卷:腰间盘突出\",\"question_a\":\"是否有下肢肌肉萎缩、肌力下降、尿潴留/失禁、马尾神经综合征、瘫痪\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_01\",\"fielldTitle\":\"糖尿病足\",\"sickQuestion\":\"问卷:糖尿病足\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_02\",\"fielldTitle\":\"室间隔缺损\",\"sickQuestion\":\"问卷:室间隔缺损\",\"question_a\":\"是否已手术治疗\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"已治愈满1年,不需要再进行治疗;且最近一次复查心脏超声未见异常,不存在心功能不全、心律失常或肺动脉高压\",\"answer_b1\":\"是\",\"answer_b2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_03\",\"fielldTitle\":\"心绞痛\",\"sickQuestion\":\"问卷:心绞痛\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_04\",\"fielldTitle\":\"冠心病\",\"sickQuestion\":\"问卷:冠心病\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_05\",\"fielldTitle\":\"高血压\",\"sickQuestion\":\"问卷:高血压\",\"question_a\":\"曾经或目前,无论是否服用降压药,存在收缩压≥160mmHg或舒张压≥100mmHg的情况\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_06\",\"fielldTitle\":\"糖尿病\",\"sickQuestion\":\"问卷:糖尿病\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_07\",\"fielldTitle\":\"心肌梗死\",\"sickQuestion\":\"问卷:心肌梗死\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_03\",\"typeTitle\":\"三高、心血管病\",\"fielldName\":\"disease_03_08\",\"fielldTitle\":\"先天性心脏病\",\"sickQuestion\":\"问卷:先天性心脏病\",\"question_a\":\"是否已手术治疗\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"已治愈满1年,不需要再进行治疗;且最近一次复查心脏超声未见异常,不存在心功能不全、心律失常或肺动脉高压\",\"answer_b1\":\"是\",\"answer_b2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_01\",\"fielldTitle\":\"肠胃炎\",\"sickQuestion\":\"问卷:肠胃炎\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_02\",\"fielldTitle\":\"肠道肿物或息肉\",\"sickQuestion\":\"问卷:肠道肿物或息肉\",\"question_a\":\"是否已手术切除全部息肉\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"病理结果是否均为良性\",\"answer_b1\":\"是\",\"answer_b2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_03\",\"fielldTitle\":\"胃息肉\",\"sickQuestion\":\"问卷:胃息肉\",\"question_a\":\"是否已手术切除全部息肉\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"病理结果是否均为良性\",\"answer_b1\":\"是\",\"answer_b2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_04\",\"fielldTitle\":\"胆囊息肉\",\"sickQuestion\":\"问卷:胆囊息肉\",\"question_a\":\"是否被怀疑胆囊癌\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"是否已手术切除\",\"answer_b1\":\"是\",\"answer_b2\":\"否\",\"question_c\":\"最大直径超过5cm\",\"answer_c1\":\"是\",\"answer_c2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_05\",\"fielldTitle\":\"胃肠功能紊乱\",\"sickQuestion\":\"问卷:胃肠功能紊乱\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_06\",\"fielldTitle\":\"肝血管瘤\",\"sickQuestion\":\"问卷:肝血管瘤\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_07\",\"fielldTitle\":\"十二指肠溃疡\",\"sickQuestion\":\"问卷:十二指肠溃疡\",\"question_a\":\"仅药物治疗,治疗结束距今已满1年,目前幽门螺旋杆菌阴性,且未曾有出血、穿孔、幽门狭窄或梗阻、癌变或怀疑癌变\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_08\",\"fielldTitle\":\"肝囊肿\",\"sickQuestion\":\"问卷:肝囊肿\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_09\",\"fielldTitle\":\"胆囊炎\",\"sickQuestion\":\"问卷:胆囊炎\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_10\",\"fielldTitle\":\"脂肪肝\",\"sickQuestion\":\"问卷:脂肪肝\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_11\",\"fielldTitle\":\"肝硬化\",\"sickQuestion\":\"问卷:肝硬化\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_04\",\"typeTitle\":\"食管、胃肠、肝胆胰疾病\",\"fielldName\":\"disease_04_12\",\"fielldTitle\":\"乙肝\",\"sickQuestion\":\"问卷:乙肝\",\"question_a\":\"最近一次检查,表面抗原(HBsAg)是否为阴性\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"(是)最近一次肝脏超声检查正常,或仅提示为肝囊肿、肝血管瘤、脂肪肝等\",\"answer_b1\":\"是\",\"answer_b2\":\"否\",\"question_c\":\"(否)最近一检查,e抗原(HBeAg)是否为阴性\",\"answer_c1\":\"是\",\"answer_c2\":\"否\"},{\"typeName\":\"disease_05\",\"typeTitle\":\"脑部、神经疾病\",\"fielldName\":\"disease_05_01\",\"fielldTitle\":\"脑膜炎\",\"sickQuestion\":\"问卷:脑膜炎\",\"question_a\":\"(脑膜炎) 尚未治愈或治愈不满半年,\\n或存在癫痛、瘫痪、脑积水、尿失禁、精神障碍等\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"fielldName\":\"disease_05_02\",\"fielldTitle\":\"脑炎\",\"sickQuestion\":\"问卷:脑炎\",\"question_a\":\"(脑炎) 尚未治愈或治愈不满半年,或\\n存在癫痛、瘫痪、脑积水、尿失禁、\\n精神障碍等\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"fielldName\":\"disease_05_03\",\"fielldTitle\":\"脑出血\",\"sickQuestion\":\"问卷:脑出血\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_01\",\"fielldTitle\":\"急性肺炎\",\"sickQuestion\":\"问卷:急性肺炎\",\"question_a\":\"是否已经治愈\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_02\",\"fielldTitle\":\"急性支气管炎\",\"sickQuestion\":\"问卷:急性支气管炎\",\"question_a\":\"是否已经治愈\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_03\",\"fielldTitle\":\"新型冠状病毒肺炎\",\"sickQuestion\":\"问卷:新型冠状病毒肺炎\",\"question_a\":\"新型冠状病毒肺炎,是否已经治愈\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_04\",\"fielldTitle\":\"声带息肉\",\"sickQuestion\":\"问卷:声带息肉\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_05\",\"fielldTitle\":\"肺气肿\",\"sickQuestion\":\"问卷:肺气肿\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_06\",\"fielldTitle\":\"肺结核\",\"sickQuestion\":\"问卷:肺结核\",\"question_a\":\"(肺结核) 尚未治愈或停药不满半年,\\n或有肺以外部位的结核,或为粟粒性\\n或播散性肺结核,或肺功能受损\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_07\",\"fielldTitle\":\"流感\",\"sickQuestion\":\"问卷:流感\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_08\",\"fielldTitle\":\"气胸\",\"sickQuestion\":\"问卷:气胸\",\"question_a\":\"(气胸) 存在慢性阻塞性肺病 (包括慢性支气管炎、肺气肿)、肺纤维化等疾病\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_09\",\"fielldTitle\":\"上呼吸道感染\",\"sickQuestion\":\"问卷:上呼吸道感染\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_10\",\"fielldTitle\":\"肺部肿物或结节\",\"sickQuestion\":\"问卷:肺部肿物或结节\",\"question_a\":\"是否已手术治疗\",\"answer_a1\":\"是\",\"answer_a2\":\"否\",\"question_b\":\"有全部病灶的病理结果,均为良性\",\"answer_b1\":\"是\",\"answer_b2\":\"否\",\"question_c\":\"目前是否已经手术彻底切除\",\"answer_c1\":\"是\",\"answer_c2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_11\",\"fielldTitle\":\"支气管肺炎\",\"sickQuestion\":\"问卷:支气管肺炎\",\"question_a\":\"(支气管炎) 尚未治愈,或被诊断为\\n慢性支气管炎\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_12\",\"fielldTitle\":\"哮喘\",\"sickQuestion\":\"问卷:哮喘\",\"question_a\":\"(哮喘) 目前是否吸烟,或曾经及目前\\n患有慢性支气管炎、肺气肿、慢性阻\\n塞性肺病肺源性心脏病或心功能不全\\n等疾病\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_06\",\"typeTitle\":\"呼吸系统疾病\",\"fielldName\":\"disease_06_13\",\"fielldTitle\":\"支气管扩张\",\"sickQuestion\":\"问卷:支气管扩张\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_07\",\"typeTitle\":\"肿瘤\",\"fielldName\":\"disease_07_01\",\"fielldTitle\":\"胰腺癌\",\"sickQuestion\":\"问卷:胰腺癌\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_07\",\"typeTitle\":\"肿瘤\",\"fielldName\":\"disease_07_02\",\"fielldTitle\":\"肺癌\",\"sickQuestion\":\"问卷:肺癌\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_07\",\"typeTitle\":\"肿瘤\",\"fielldName\":\"disease_07_03\",\"fielldTitle\":\"肾癌\",\"sickQuestion\":\"问卷:肾癌\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_07\",\"typeTitle\":\"肿瘤\",\"fielldName\":\"disease_07_04\",\"fielldTitle\":\"食管癌\",\"sickQuestion\":\"问卷:食管癌\",\"question_a\":\"请确认以上问题选项无误并已如实回答\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"},{\"typeName\":\"disease_07\",\"typeTitle\":\"肿瘤\",\"fielldName\":\"disease_07_05\",\"fielldTitle\":\"甲状腺癌\",\"sickQuestion\":\"问卷:甲状腺癌\",\"question_a\":\"(甲状腺癌) 是否同时满足以下两个条件:\\nD有病理结果,并且结果仅为乳,头状癌\\n或滤泡状癌;2没有远处转移 (说明: 远\\n处转移是指肿瘤TNM分期中M分期为M1\\n的情况\",\"answer_a1\":\"是\",\"answer_a2\":\"否\"}]"; + List list = JSONUtil.toList(ss, SickData.class); + System.out.println(list); + System.out.println(list.size()); + ArrayList sicks = new ArrayList<>(); + list.stream().forEach(e->{ + Sick sick = new Sick(); + String typeName = e.getTypeName(); + sick.setSickType(typeName); + String fielldName = e.getFielldName(); + sick.setSickKey(fielldName); + sick.setSickKeyName(e.getFielldTitle()); + Template template = new Template(); + template.setQuestionnaireName(e.getSickQuestion()); + List questions = new ArrayList<>(); + if(ObjectUtil.isNotNull(e.getQuestion_a())){ + Question question = new Question(); + question.setQuestionKey(fielldName+"_01"); + question.setQuestion(e.getQuestion_a().replaceAll("\r","")); + question.setQuestion(question.getQuestion().replaceAll("\n","")); + question.setAnswer(Arrays.asList(true,false)); + questions.add(question); + } + + if(ObjectUtil.isNotNull(e.getQuestion_b())){ + Question question = new Question(); + question.setQuestion(e.getQuestion_b().replaceAll("\r","")); + question.setQuestion(question.getQuestion().replaceAll("\n","")); + question.setQuestionKey(fielldName+"_02"); + question.setAnswer(Arrays.asList(true,false)); + questions.add(question); + } + if(ObjectUtil.isNotNull(e.getQuestion_c())){ + Question question = new Question(); + question.setQuestion(e.getQuestion_c().replaceAll("\r","")); + question.setQuestion(question.getQuestion().replaceAll("\n","")); + question.setQuestionKey(fielldName+"_03"); + question.setAnswer(Arrays.asList(true,false)); + questions.add(question); + } + template.setQuestion(questions); + sick.setQuestion(JSONUtil.toJsonStr(template)); + sick.setSickVal(e.getFielldName()); + sicks.add(sick); + }); + System.out.println(sicks); + sickService.saveBatch(sicks); + return null; + } + + /** + * SickData + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ + @Getter + @Setter + @EqualsAndHashCode + @ToString + public class SickData { + + private String typeName; + + private String typeTitle; + + private String fielldName; + + private String fielldTitle; + + private String sickQuestion; + + private String question_a; + + private String answer_a1; + + private String answer_a2; + + private String question_b; + + private String answer_b1; + + private String answer_b2; + + private String question_c; + + private String answer_c1; + + private String answer_c2; + } + + @Data + class Question { + + private String question; + + private String questionKey; + + private List answer; + + } + + @Data + class Template { + //问卷名称 + private String questionnaireName; + + private List question; + } + + /** + * 数据修改 + * @return + */ + @Override + public Object dataUpdate() { + LambdaQueryWrapper query = new LambdaQueryWrapper<>(); + query.like(Sick::getQuestion, "请确认以上问题选项无误并已如实回答"); + List list = sickService.list(query); + System.out.println(list); + for (Sick index: list) { + String question = index.getQuestion(); + Template template = JSONUtil.toBean(question, Template.class); + for (Question indexQuestion : template.getQuestion()) { + if(indexQuestion.getQuestion().equals("请确认以上问题选项无误并已如实回答")){ + indexQuestion.setQuestionKey("disease_00_00_01"); + } + } + JSON parse = JSONUtil.parse(template); + index.setQuestion(parse.toString()); + } + sickService.updateBatchById(list); + return null; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyCustomerServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyCustomerServiceImpl.java new file mode 100644 index 0000000..7183034 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyCustomerServiceImpl.java @@ -0,0 +1,87 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.enums.WarrantyApplicantEnum; +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import com.itheima.sfbx.insurance.service.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; +import java.util.stream.Collectors; + +/** + * @ClassName WarrantyCustomerServiceImpl.java + * @Description 合同客户相关 + */ +@Service("warrantyCustomerService") +@Slf4j +public class WarrantyCustomerServiceImpl implements IWarrantyCustomerService { + + @Autowired + IWarrantyService warrantyService; + + @Autowired + IWarrantyInsuredService warrantyInsuredService; + + @Autowired + ICustomerCardService customerCardService; + + @Autowired + ICustomerInfoService customerInfoService; + + /** + * 获取投保人信息 + * + * @param warrantyNo + * @return + */ + @Override + public WarrantyApplicantVO findWarrantyApplicant(String warrantyNo) { + try { + WarrantyVO warranty = warrantyService.findByWarrantyNo(warrantyNo); + CustomerInfoVO customerInfo = customerInfoService.findOneByIdentityCard(warranty.getApplicantIdentityCard()); + CustomerCardVO customerCardVO = CustomerCardVO.builder().customerId(customerInfo.getCustomerId()).dataState(SuperConstant.DATA_STATE_0).build(); + List customerCardList = customerCardService.findList(customerCardVO); + WarrantyApplicantVO res = WarrantyApplicantVO.buildApplicantInfo(customerInfo, customerCardList, warranty.getApplicantName()); + //查询合同 + return res; + } catch (Exception e) { + log.error("投保人信息构建错误:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyApplicantEnum.APPLICANT_ERROR); + } + } + + /** + * 获取被保人信息 + * + * @param warrantyNo + * @return + */ + @Override + public List findWarrantyInsured(String warrantyNo) { + try { + WarrantyInsuredVO warrantyInsuredVO = WarrantyInsuredVO.builder().warrantyNo(warrantyNo).dataState(SuperConstant.DATA_STATE_0).build(); + List warrantyInsuredVOS = warrantyInsuredService.findList(warrantyInsuredVO); + //获取合同投保信息后 + List warrantyInsureds = BeanConv.toBeanList(warrantyInsuredVOS, WarrantyInsured.class); + + List res = new ArrayList<>(); + //属性替换 + for (WarrantyInsured index : warrantyInsureds) { + WarrantyInsured warrantyInsured = new WarrantyInsured(index.getWarrantyNo(),index.getInsuredName(),index.getInsuredIdentityCard(),index.getCompanyNo()); + res.add(warrantyInsured); + } + return res; + } catch (Exception e) { + log.error("被投保人信息构建失败:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyApplicantEnum.INSURED_ERROR); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyEarningsOrderServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyEarningsOrderServiceImpl.java new file mode 100644 index 0000000..6b4ba6a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyEarningsOrderServiceImpl.java @@ -0,0 +1,201 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.WarrantyEarningsOrder; +import com.itheima.sfbx.insurance.mapper.WarrantyEarningsOrderMapper; +import com.itheima.sfbx.insurance.service.IWarrantyEarningsOrderService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WarrantyEarningsOrderCacheConstant; +import com.itheima.sfbx.insurance.dto.WarrantyEarningsOrderVO; +import com.itheima.sfbx.insurance.enums.WarrantyEarningsOrderEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:给付计划订单服务实现类 + */ +@Slf4j +@Service +public class WarrantyEarningsOrderServiceImpl extends ServiceImpl implements IWarrantyEarningsOrderService { + + + /*** + * @description 给付计划订单多条件组合 + * @param warrantyEarningsOrderVO 给付计划订单 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyEarningsOrderVO warrantyEarningsOrderVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //订单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getOrderNo())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getOrderNo,warrantyEarningsOrderVO.getOrderNo()); + } + //当期赔付查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getPremium())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getPremium,warrantyEarningsOrderVO.getPremium()); + } + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getWarrantyNo())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getWarrantyNo,warrantyEarningsOrderVO.getWarrantyNo()); + } + //当前期数查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getCurrentPeriod())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getCurrentPeriod,warrantyEarningsOrderVO.getCurrentPeriod()); + } + //计划时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getScheduleTime())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getScheduleTime,warrantyEarningsOrderVO.getScheduleTime()); + } + //实际时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getActualTime())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getActualTime,warrantyEarningsOrderVO.getActualTime()); + } + //状态(0未赔付 1已赔付 2 断保中止 3断保终止)查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getOrderState())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getOrderState,warrantyEarningsOrderVO.getOrderState()); + } + //投保人姓名查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getApplicantName())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getApplicantName,warrantyEarningsOrderVO.getApplicantName()); + } + //投保人身份证号码查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getApplicantIdentityCard())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getApplicantIdentityCard,warrantyEarningsOrderVO.getApplicantIdentityCard()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getSortNo())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getSortNo,warrantyEarningsOrderVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyEarningsOrderVO.getDataState())) { + queryWrapper.lambda().eq(WarrantyEarningsOrder::getDataState,warrantyEarningsOrderVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WarrantyEarningsOrder::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyEarningsOrderCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#warrantyEarningsOrderVO.hashCode()") + public Page findPage(WarrantyEarningsOrderVO warrantyEarningsOrderVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyEarningsOrderPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyEarningsOrderVO); + //执行分页查询 + Page warrantyEarningsOrderVOPage = BeanConv.toPage( + page(WarrantyEarningsOrderPage, queryWrapper), WarrantyEarningsOrderVO.class); + //返回结果 + return warrantyEarningsOrderVOPage; + }catch (Exception e){ + log.error("给付计划订单分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyEarningsOrderCacheConstant.BASIC,key ="#warrantyEarningsOrderId") + public WarrantyEarningsOrderVO findById(String warrantyEarningsOrderId) { + try { + //执行查询 + return BeanConv.toBean(getById(warrantyEarningsOrderId),WarrantyEarningsOrderVO.class); + }catch (Exception e){ + log.error("给付计划订单单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyEarningsOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyEarningsOrderCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WarrantyEarningsOrderCacheConstant.BASIC,key = "#result.id")}) + public WarrantyEarningsOrderVO save(WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + try { + //转换WarrantyEarningsOrderVO为WarrantyEarningsOrder + WarrantyEarningsOrder warrantyEarningsOrder = BeanConv.toBean(warrantyEarningsOrderVO, WarrantyEarningsOrder.class); + boolean flag = save(warrantyEarningsOrder); + if (!flag){ + throw new RuntimeException("保存给付计划订单失败"); + } + //转换返回对象WarrantyEarningsOrderVO + WarrantyEarningsOrderVO warrantyEarningsOrderVOHandler = BeanConv.toBean(warrantyEarningsOrder, WarrantyEarningsOrderVO.class); + return warrantyEarningsOrderVOHandler; + }catch (Exception e){ + log.error("保存给付计划订单异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyEarningsOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyEarningsOrderCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyEarningsOrderCacheConstant.BASIC,key = "#warrantyEarningsOrderVO.id")}) + public Boolean update(WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + try { + //转换WarrantyEarningsOrderVO为WarrantyEarningsOrder + WarrantyEarningsOrder warrantyEarningsOrder = BeanConv.toBean(warrantyEarningsOrderVO, WarrantyEarningsOrder.class); + boolean flag = updateById(warrantyEarningsOrder); + if (!flag){ + throw new RuntimeException("修改给付计划订单失败"); + } + return flag; + }catch (Exception e){ + log.error("修改给付计划订单异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyEarningsOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyEarningsOrderCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyEarningsOrderCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除给付计划订单失败"); + } + return flag; + }catch (Exception e){ + log.error("删除给付计划订单异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyEarningsOrderCacheConstant.LIST,key ="#warrantyEarningsOrderVO.hashCode()") + public List findList(WarrantyEarningsOrderVO warrantyEarningsOrderVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyEarningsOrderVO); + //执行列表查询 + List warrantyEarningsOrderVOs = BeanConv.toBeanList(list(queryWrapper),WarrantyEarningsOrderVO.class); + return warrantyEarningsOrderVOs; + }catch (Exception e){ + log.error("给付计划订单列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEarningsOrderEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyInsuredServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyInsuredServiceImpl.java new file mode 100644 index 0000000..db002c1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyInsuredServiceImpl.java @@ -0,0 +1,177 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.WarrantyInsured; +import com.itheima.sfbx.insurance.mapper.WarrantyInsuredMapper; +import com.itheima.sfbx.insurance.service.IWarrantyInsuredService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WarrantyInsuredCacheConstant; +import com.itheima.sfbx.insurance.dto.WarrantyInsuredVO; +import com.itheima.sfbx.insurance.enums.WarrantyInsuredEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:合同被保人服务实现类 + */ +@Slf4j +@Service +public class WarrantyInsuredServiceImpl extends ServiceImpl implements IWarrantyInsuredService { + + + /*** + * @description 合同被保人多条件组合 + * @param warrantyInsuredVO 合同被保人 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyInsuredVO warrantyInsuredVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyInsuredVO.getWarrantyNo())) { + queryWrapper.lambda().eq(WarrantyInsured::getWarrantyNo,warrantyInsuredVO.getWarrantyNo()); + } + //被投保人姓名查询 + if (!EmptyUtil.isNullOrEmpty(warrantyInsuredVO.getInsuredName())) { + queryWrapper.lambda().eq(WarrantyInsured::getInsuredName,warrantyInsuredVO.getInsuredName()); + } + //被投保人身份证号码查询 + if (!EmptyUtil.isNullOrEmpty(warrantyInsuredVO.getInsuredIdentityCard())) { + queryWrapper.lambda().eq(WarrantyInsured::getInsuredIdentityCard,warrantyInsuredVO.getInsuredIdentityCard()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyInsuredVO.getDataState())) { + queryWrapper.lambda().eq(WarrantyInsured::getDataState,warrantyInsuredVO.getDataState()); + } + //批量查询保险合同 + if (!EmptyUtil.isNullOrEmpty(warrantyInsuredVO.getWarrantyNos())){ + queryWrapper.lambda().in(WarrantyInsured::getWarrantyNo,warrantyInsuredVO.getWarrantyNos()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WarrantyInsured::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyInsuredCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#warrantyInsuredVO.hashCode()") + public Page findPage(WarrantyInsuredVO warrantyInsuredVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyInsuredPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyInsuredVO); + //执行分页查询 + Page warrantyInsuredVOPage = BeanConv.toPage( + page(WarrantyInsuredPage, queryWrapper), WarrantyInsuredVO.class); + //返回结果 + return warrantyInsuredVOPage; + }catch (Exception e){ + log.error("合同被保人分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyInsuredCacheConstant.BASIC,key ="#warrantyInsuredId") + public WarrantyInsuredVO findById(String warrantyInsuredId) { + try { + //执行查询 + return BeanConv.toBean(getById(warrantyInsuredId),WarrantyInsuredVO.class); + }catch (Exception e){ + log.error("合同被保人单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyInsuredCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyInsuredCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WarrantyInsuredCacheConstant.BASIC,key = "#result.id")}) + public WarrantyInsuredVO save(WarrantyInsuredVO warrantyInsuredVO) { + try { + //转换WarrantyInsuredVO为WarrantyInsured + WarrantyInsured warrantyInsured = BeanConv.toBean(warrantyInsuredVO, WarrantyInsured.class); + boolean flag = save(warrantyInsured); + if (!flag){ + throw new RuntimeException("保存合同被保人失败"); + } + //转换返回对象WarrantyInsuredVO + WarrantyInsuredVO warrantyInsuredVOHandler = BeanConv.toBean(warrantyInsured, WarrantyInsuredVO.class); + return warrantyInsuredVOHandler; + }catch (Exception e){ + log.error("保存合同被保人异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyInsuredCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyInsuredCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyInsuredCacheConstant.BASIC,key = "#warrantyInsuredVO.id")}) + public Boolean update(WarrantyInsuredVO warrantyInsuredVO) { + try { + //转换WarrantyInsuredVO为WarrantyInsured + WarrantyInsured warrantyInsured = BeanConv.toBean(warrantyInsuredVO, WarrantyInsured.class); + boolean flag = updateById(warrantyInsured); + if (!flag){ + throw new RuntimeException("修改合同被保人失败"); + } + return flag; + }catch (Exception e){ + log.error("修改合同被保人异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyInsuredCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyInsuredCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyInsuredCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除合同被保人失败"); + } + return flag; + }catch (Exception e){ + log.error("删除合同被保人异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyInsuredCacheConstant.LIST,key ="#warrantyInsuredVO.hashCode()") + public List findList(WarrantyInsuredVO warrantyInsuredVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyInsuredVO); + //执行列表查询 + List warrantyInsuredVOs = BeanConv.toBeanList(list(queryWrapper),WarrantyInsuredVO.class); + return warrantyInsuredVOs; + }catch (Exception e){ + log.error("合同被保人列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyInsuredEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyOrderServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyOrderServiceImpl.java new file mode 100644 index 0000000..2207efe --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyOrderServiceImpl.java @@ -0,0 +1,600 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerInsuranceDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisCustomerSexDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.AnalysisInsuranceTypeDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.constant.trade.TradeConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyOrderConstant; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.enums.analysis.AnalysisEnum; +import com.itheima.sfbx.framework.commons.utils.TimeHandlerUtils; +import com.itheima.sfbx.framework.commons.dto.trade.AliPeriodicVO; +import com.itheima.sfbx.framework.commons.dto.trade.TradeVO; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.constant.InsuranceConstant; +import com.itheima.sfbx.insurance.enums.WarrantyEnum; +import com.itheima.sfbx.insurance.pojo.*; +import com.itheima.sfbx.insurance.mapper.WarrantyOrderMapper; +import com.itheima.sfbx.insurance.service.IWarrantyOrderService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.insurance.service.IWarrantyService; +import com.itheima.sfbx.trade.feign.PeriodicPayFeign; +import com.itheima.sfbx.trade.feign.WapPayFeign; +import io.seata.spring.annotation.GlobalTransactional; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WarrantyOrderCacheConstant; +import com.itheima.sfbx.insurance.dto.WarrantyOrderVO; +import com.itheima.sfbx.insurance.enums.WarrantyOrderEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.time.LocalTime; +import java.time.format.DateTimeFormatter; +import java.util.Arrays; +import java.util.List; +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; + +import javax.annotation.Resource; + +/** + * @Description:合同扣款计划服务实现类 + */ +@Slf4j +@Service +public class WarrantyOrderServiceImpl extends ServiceImpl implements IWarrantyOrderService { + + @Autowired + WarrantyOrderMapper warrantyOrderMapper; + + @Autowired + WapPayFeign wapPayFeign; + + @Autowired + PeriodicPayFeign periodicPayFeign; + + @Autowired + IdentifierGenerator identifierGenerator; + + @Resource(name = "periodicPayExecutor") + Executor periodicPayExecutor; + + /*** + * @description 合同扣款计划多条件组合 + * @param warrantyOrderVO 合同扣款计划 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyOrderVO warrantyOrderVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //订单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getOrderNo())) { + queryWrapper.lambda().eq(WarrantyOrder::getOrderNo,warrantyOrderVO.getOrderNo()); + } + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getWarrantyNo())) { + queryWrapper.lambda().eq(WarrantyOrder::getWarrantyNo,warrantyOrderVO.getWarrantyNo()); + } + //总期数查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getPeriods())) { + queryWrapper.lambda().eq(WarrantyOrder::getPeriods,warrantyOrderVO.getPeriods()); + } + //当前期数查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getCurrentPeriod())) { + queryWrapper.lambda().eq(WarrantyOrder::getCurrentPeriod,warrantyOrderVO.getCurrentPeriod()); + } + //期交保费查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getPremium())) { + queryWrapper.lambda().eq(WarrantyOrder::getPremium,warrantyOrderVO.getPremium()); + } + //计划扣除时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getScheduleTime())) { + queryWrapper.lambda().eq(WarrantyOrder::getScheduleTime,warrantyOrderVO.getScheduleTime()); + } + //实际扣除时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getActualTime())) { + queryWrapper.lambda().eq(WarrantyOrder::getActualTime,warrantyOrderVO.getActualTime()); + } + //宽限期截止时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getGraceTime())) { + queryWrapper.lambda().eq(WarrantyOrder::getGraceTime,warrantyOrderVO.getGraceTime()); + } + //状态(0待付款 1已付款 3 逾期 4 补缴 5 付款失败 6 付款中) + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getOrderState())) { + queryWrapper.lambda().eq(WarrantyOrder::getOrderState,warrantyOrderVO.getOrderState()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getSortNo())) { + queryWrapper.lambda().eq(WarrantyOrder::getSortNo,warrantyOrderVO.getSortNo()); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getCompanyNo())) { + queryWrapper.lambda().eq(WarrantyOrder::getCompanyNo,warrantyOrderVO.getCompanyNo()); + } + //支付渠道【支付宝、微信、三方银行】查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getTradingChannel())) { + queryWrapper.lambda().eq(WarrantyOrder::getTradingChannel,warrantyOrderVO.getTradingChannel()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getDataState())) { + queryWrapper.lambda().eq(WarrantyOrder::getDataState,warrantyOrderVO.getDataState()); + } + //代理人ID + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getAgentId())) { + queryWrapper.lambda().eq(WarrantyOrder::getAgentId,warrantyOrderVO.getAgentId()); + } + //代理人姓名 + if (!EmptyUtil.isNullOrEmpty(warrantyOrderVO.getAgentName())) { + queryWrapper.lambda().likeRight(WarrantyOrder::getAgentName,warrantyOrderVO.getAgentName()); + } + //按创建时间降序 + queryWrapper.lambda().orderByAsc(WarrantyOrder::getCurrentPeriod); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyOrderCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#warrantyOrderVO.hashCode()") + public Page findPage(WarrantyOrderVO warrantyOrderVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyOrderPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyOrderVO); + //执行分页查询 + Page warrantyOrderVOPage = BeanConv.toPage( + page(WarrantyOrderPage, queryWrapper), WarrantyOrderVO.class); + //返回结果 + return warrantyOrderVOPage; + }catch (Exception e){ + log.error("合同扣款计划分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyOrderCacheConstant.BASIC,key ="#warrantyOrderId") + public WarrantyOrderVO findById(String warrantyOrderId) { + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WarrantyOrder::getId,warrantyOrderId); + return BeanConv.toBean(getOne(queryWrapper),WarrantyOrderVO.class); + }catch (Exception e){ + log.error("合同扣款计划单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.FIND_ONE_FAIL); + } + } + + @Override + public WarrantyOrderVO findByIdAndOrderState(String warrantyOrderId, String OrderState) { + try { + //执行查询 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WarrantyOrder::getId,warrantyOrderId) + .eq(WarrantyOrder::getDataState,SuperConstant.DATA_STATE_0) + .eq(WarrantyOrder::getOrderState, OrderState); + return BeanConv.toBean(getOne(queryWrapper),WarrantyOrderVO.class); + }catch (Exception e){ + log.error("合同扣款计划单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyOrderCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WarrantyOrderCacheConstant.BASIC,key = "#result.id")}) + public WarrantyOrderVO save(WarrantyOrderVO warrantyOrderVO) { + try { + //转换WarrantyOrderVO为WarrantyOrder + WarrantyOrder warrantyOrder = BeanConv.toBean(warrantyOrderVO, WarrantyOrder.class); + boolean flag = save(warrantyOrder); + if (!flag){ + throw new RuntimeException("保存合同扣款计划失败"); + } + //转换返回对象WarrantyOrderVO + WarrantyOrderVO warrantyOrderVOHandler = BeanConv.toBean(warrantyOrder, WarrantyOrderVO.class); + return warrantyOrderVOHandler; + }catch (Exception e){ + log.error("保存合同扣款计划异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyOrderCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyOrderCacheConstant.BASIC,key = "#warrantyOrderVO.id")}) + public Boolean update(WarrantyOrderVO warrantyOrderVO) { + try { + //转换WarrantyOrderVO为WarrantyOrder + WarrantyOrder warrantyOrder = BeanConv.toBean(warrantyOrderVO, WarrantyOrder.class); + boolean flag = updateById(warrantyOrder); + if (!flag){ + throw new RuntimeException("修改合同扣款计划失败"); + } + return flag; + }catch (Exception e){ + log.error("修改合同扣款计划异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyOrderCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyOrderCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyOrderCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除合同扣款计划失败"); + } + return flag; + }catch (Exception e){ + log.error("删除合同扣款计划异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyOrderCacheConstant.LIST,key ="#warrantyOrderVO.hashCode()") + public List findList(WarrantyOrderVO warrantyOrderVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyOrderVO); + //执行列表查询 + List warrantyOrderVOs = BeanConv.toBeanList(list(queryWrapper),WarrantyOrderVO.class); + return warrantyOrderVOs; + }catch (Exception e){ + log.error("合同扣款计划列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.LIST_FAIL); + } + } + + @Override + public TradeVO doPayment(String warrantyOrderId, String tradingChannel) { + //重新查询合同订单信息 + WarrantyOrderVO warrantyOrderVO = findById(warrantyOrderId); + if (EmptyUtil.isNullOrEmpty(warrantyOrderVO)){ + throw new RuntimeException("合同订单查询异常"); + } + //用户信息 + UserVO userVO = SubjectContent.getUserVO(); + //订单支付 + TradeVO tradeVO = TradeVO.builder() + .productOrderNo(Long.valueOf(warrantyOrderVO.getOrderNo())) + .tradeChannel(tradingChannel) + .payerId(userVO.getId()) + .companyNo(warrantyOrderVO.getCompanyNo()) + .payerName(userVO.getRealName()) + .tradeAmount(warrantyOrderVO.getPremium()) + .refund(BigDecimal.ZERO) + .isRefund(SuperConstant.NO) + .memo("保单"+warrantyOrderVO.getWarrantyNo()+"第"+warrantyOrderVO.getCurrentPeriod()+"期") + .build(); + TradeVO tradeVOResult = wapPayFeign.wapTrade(tradeVO); + return tradeVOResult; + } + + @Override + public TradeVO doClose(String tradeOrderNo, String tradingChannel) { + //订单支付 + TradeVO tradeVO = TradeVO.builder() + .tradeOrderNo(Long.valueOf(tradeOrderNo)) + .tradeChannel(tradingChannel) + .build(); + return wapPayFeign.closeTrade(tradeVO); + } + + @Override + @Transactional + public String signContract(String warrantyOrderId, String tradingChannel) { + //复核合同订单信息 + WarrantyOrderVO warrantyOrderVO = findByIdAndOrderState(warrantyOrderId,WarrantyOrderConstant.ORDER_STATE_0); + if (EmptyUtil.isNullOrEmpty(warrantyOrderVO)){ + throw new RuntimeException("合同订单查询异常"); + } + UserVO userVO = SubjectContent.getUserVO(); + //签约交易对象 + TradeVO tradeVO = TradeVO.builder() + .productOrderNo(Long.valueOf(warrantyOrderVO.getOrderNo())) + .tradeChannel(tradingChannel) + .payerId(userVO.getId()) + .companyNo(warrantyOrderVO.getCompanyNo()) + .payerName(userVO.getRealName()) + .notifyUrl("http://www.eeho.cn") + .returnUrl("http://www.eeho.cn") + .tradeAmount(BigDecimal.ZERO) + .refund(BigDecimal.ZERO) + .isRefund(SuperConstant.NO) + .memo("保单"+warrantyOrderVO.getWarrantyNo()+"第"+warrantyOrderVO.getCurrentPeriod()+"期") + .build(); + //支付宝周期扣款对象 + if (TradeConstant.TRADE_CHANNEL_ALI_PAY.equals(tradingChannel)){ + AliPeriodicVO aliPeriodicVO = AliPeriodicVO.builder() + .signScene("INDUSTRY|REPAYMENT") + .ruleTotalAmount(String.valueOf(warrantyOrderVO.getPremiums())) + .ruleSingleAmount(String.valueOf(warrantyOrderVO.getPremium())) + .ruleTotalPayments(String.valueOf(warrantyOrderVO.getPeriods())) + .externalAgreementNo(String.valueOf(identifierGenerator.nextId(warrantyOrderVO))) + .accessChannel("ALIPAYAPP") + .contractNo(warrantyOrderVO.getWarrantyNo()) + .build(); + //签约扣款:周期数、周期类型、下次扣款時間 + String rulePeriod = null; + String rulePeriodType = null; + if (InsuranceConstant.WEEK.equals(warrantyOrderVO.getPeriodicUnit())){ + rulePeriodType = InsuranceConstant.DAY; + rulePeriod ="7"; + }else if (InsuranceConstant.MONTH.equals(warrantyOrderVO.getPeriodicUnit())){ + rulePeriodType = InsuranceConstant.MONTH; + rulePeriod ="1"; + }else if (InsuranceConstant.YEAR.equals(warrantyOrderVO.getPeriodicUnit())){ + rulePeriodType = InsuranceConstant.MONTH; + rulePeriod ="12"; + } + aliPeriodicVO.setRulePeriod(rulePeriod); + aliPeriodicVO.setRulePeriodType(rulePeriodType); + aliPeriodicVO.setRuleExecuteTime(warrantyOrderVO.getScheduleTime() + .format(DateTimeFormatter.ofPattern("yyyy-MM-dd"))); + tradeVO.setAliPeriodicVO(aliPeriodicVO); + //微信周期扣款对象 + }else if(TradeConstant.TRADE_CHANNEL_WECHAT_PAY.equals(tradingChannel)){ + throw new RuntimeException("微信周期扣款未开发"); + //未定义周期扣款 + }else { + throw new RuntimeException("未定义的周期性扣款"); + } + //发起签约 + TradeVO tradeVOResult = periodicPayFeign.h5SignContract(tradeVO); + //返回签约签名 + return tradeVOResult.getPlaceOrderJson(); + } + + @Autowired + IWarrantyService warrantyService; + + @Autowired + RedissonClient redissonClient; + + @Override + @GlobalTransactional + public Boolean signContractSync(String warrantyOrderId, String tradingChannel, String agreementNo) { + //合同订单信息 + WarrantyOrderVO warrantyOrderVO = findById(warrantyOrderId); + if (EmptyUtil.isNullOrEmpty(warrantyOrderVO)){ + throw new RuntimeException("合同订单不存在"); + } + //保险合同加锁:防止删除同时,计划任务在进行周期性扣款 + String key = "lock_warranty:"+warrantyOrderVO.getWarrantyNo(); + RLock fairLock = redissonClient.getFairLock(key); + try { + if (fairLock.tryLock(CacheConstant.REDIS_WAIT_TIME, TimeUnit.SECONDS)){ + //合同订单关联支付签约号 + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda() + .set(WarrantyOrder::getAgreementNo,agreementNo) + .set(WarrantyOrder::getTradingChannel,tradingChannel) + .eq(WarrantyOrder::getWarrantyNo,warrantyOrderVO.getWarrantyNo()); + boolean flag = update(updateWrapper); + if (!flag){ + throw new RuntimeException("合同订单关联支付签约号异常"); + } + //支付平台同步签约结果 + warrantyOrderVO.setAgreementNo(agreementNo); + warrantyOrderVO.setTradingChannel(tradingChannel); + flag = periodicPayFeign.signContractSync(warrantyOrderVO.getWarrantyNo(),tradingChannel,agreementNo); + if (!flag){ + throw new RuntimeException("签约合同关联支付签约号异常"); + } + //扣除首期款项 + flag = this.installmentDeduction(BeanConv.toBean(warrantyOrderVO,WarrantyOrder.class)); + if (!flag){ + throw new RuntimeException("合同订单关联支付签约号异常"); + } + //修改保险合同状态 + UpdateWrapper warrantyUpdateWrapper = new UpdateWrapper<>(); + warrantyUpdateWrapper.lambda() + .set(Warranty::getWarrantyState,WarrantyConstant.STATE_SAFEING) + .eq(Warranty::getWarrantyNo,warrantyOrderVO.getWarrantyNo()); + return warrantyService.update(warrantyUpdateWrapper); + } + }catch (Exception e){ + log.error("保险合同加锁失败:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.DEL_FAIL); + }finally { + fairLock.unlock(); + } + return false; + + } + + /*** + * @description 扣款操作 + * @param warrantyOrder + * @return + */ + private Boolean installmentDeduction(WarrantyOrder warrantyOrder){ + //签约信息 + TradeVO tradeVO = TradeVO.builder() + .productOrderNo(Long.valueOf(warrantyOrder.getOrderNo())) + .tradeChannel(warrantyOrder.getTradingChannel()) + .payerId(Long.valueOf(warrantyOrder.getApplicantIdentityCard())) + .companyNo(warrantyOrder.getCompanyNo()) + .payerName(warrantyOrder.getApplicantName()) + .tradeAmount(warrantyOrder.getPremium()) + .refund(BigDecimal.ZERO) + .isRefund(SuperConstant.NO) + .memo("保单"+warrantyOrder.getWarrantyNo()+"第"+warrantyOrder.getCurrentPeriod()+"期") + .build(); + if (TradeConstant.TRADE_CHANNEL_ALI_PAY.equals(warrantyOrder.getTradingChannel())){ + AliPeriodicVO aliPeriodicVO = AliPeriodicVO.builder() + .agreementNo(warrantyOrder.getAgreementNo()).build(); + tradeVO.setAliPeriodicVO(aliPeriodicVO); + } + TradeVO tradeVOResult = periodicPayFeign.h5PeriodicPay(tradeVO); + //周期扣款成功 + if (TradeConstant.TRADE_SUCCESS.equals(tradeVOResult.getTradeState())){ + //修改合同订单状态 + warrantyOrder.setOrderState(WarrantyOrderConstant.ORDER_STATE_1); + warrantyOrder.setActualTime(LocalDateTime.now()); + return updateById(warrantyOrder); + //周期扣款失败 + }else { + //修改合同订单状态 + warrantyOrder.setOrderState(WarrantyOrderConstant.ORDER_STATE_4); + warrantyOrder.setActualTime(LocalDateTime.now()); + return updateById(warrantyOrder); + } + } + @Override + @GlobalTransactional + public Boolean doCloseSignContract(String warrantyOrderId, String tradingChannel) { + //重新查询合同订单信息 + WarrantyOrderVO warrantyOrderVO = findById(warrantyOrderId); + if (EmptyUtil.isNullOrEmpty(warrantyOrderVO)){ + throw new RuntimeException("合同订单查询异常"); + } + //废弃支付签约号 + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + updateWrapper.lambda().set(WarrantyOrder::getAgreementNo,null) + .eq(WarrantyOrder::getWarrantyNo,warrantyOrderVO.getWarrantyNo()); + boolean flag =update(updateWrapper); + if (!flag){ + return flag; + } + return periodicPayFeign.h5CloseSignContract(warrantyOrderVO.getWarrantyNo(),tradingChannel); + } + + @Override + public Boolean periodicPay() { + //查询当天应该支付订单 + LocalDateTime localDateTime = LocalDateTime.now(); + String minTime = localDateTime.with(LocalTime.MIN).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + String maxTime = localDateTime.with(LocalTime.MAX).format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"));; + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda() + .between(WarrantyOrder::getScheduleTime, minTime,maxTime) + .gt(WarrantyOrder::getPeriods,1); + List warrantyOrderList = list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(warrantyOrderList)){ + return true; + } + //线程处周期性扣款 + for (WarrantyOrder warrantyOrder: warrantyOrderList) { + periodicPayExecutor.execute(new Runnable() { + @Override + public void run() { + installmentDeduction(warrantyOrder); + } + }); + } + return true; + } + + /** + * 统计分析:统计昨日投保保单类型对应的保单数量 + * @return + */ + @Override + public List analysisCustomerInsuranceType() { + try { + TimeDTO yesterdayTime = TimeHandlerUtils.getYesterdayTime(); + return warrantyOrderMapper.analysisCustomerInsuranceType(yesterdayTime.getBegin(),yesterdayTime.getEnd()); + }catch (Exception e){ + log.error("合同扣款计划列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.LIST_FAIL); + } + } + + @Override + public Boolean syncPayment(String orderNo,String tradeState) { + try { + //修改合同订单状态 + UpdateWrapper updateWrapper = new UpdateWrapper<>(); + if (TradeConstant.TRADE_SUCCESS.equals(tradeState)){ + updateWrapper.lambda() + .set(WarrantyOrder::getOrderState,WarrantyOrderConstant.ORDER_STATE_1) + .eq(WarrantyOrder::getOrderNo,orderNo); + }else { + updateWrapper.lambda() + .set(WarrantyOrder::getOrderState,WarrantyOrderConstant.ORDER_STATE_4) + .eq(WarrantyOrder::getOrderNo,orderNo); + } + Boolean flag = update(updateWrapper); + if(!flag) { + return flag; + } + //查询保险合同订单 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WarrantyOrder::getOrderNo,orderNo); + WarrantyOrder warrantyOrder = getOne(queryWrapper); + //修改保险合同状态 + UpdateWrapper warrantyUpdateWrapper = new UpdateWrapper<>(); + warrantyUpdateWrapper.lambda() + .set(Warranty::getWarrantyState,WarrantyConstant.STATE_SAFEING) + .eq(Warranty::getWarrantyNo,warrantyOrder.getWarrantyNo()); + return warrantyService.update(warrantyUpdateWrapper); + }catch (Exception e){ + log.error("合同同步结果异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyOrderEnum.SYNC_PAYMENT_FAIL); + } + } + + /** + * 统计保险数量及保险金额 + * @return + */ + @Override + public AnalysisCustomerInsuranceDTO analysisInsurance() { + try { + TimeDTO yesterdayTime = TimeHandlerUtils.getYesterdayTime(); + return warrantyOrderMapper.analysisInsurance(yesterdayTime.getBegin(),yesterdayTime.getEnd()); + }catch (Exception e){ + log.error("统计保险数量及保险金额异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(AnalysisEnum.ANALYSIS_CUSTOMER_CITY); + } + } + + /** + * 统计投保人性别数据 + * @return + */ + @Override + public AnalysisCustomerSexDTO analysisWarrantySex() { + try { + TimeDTO yesterdayTime = TimeHandlerUtils.getYesterdayTime(); + return warrantyOrderMapper.analysisWarrantySex(yesterdayTime.getBegin(),yesterdayTime.getEnd()); + }catch (Exception e){ + log.error("统计投保人性别异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(AnalysisEnum.ANALYSIS_CUSTOMER_SEX); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyRenewalServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyRenewalServiceImpl.java new file mode 100644 index 0000000..9ea0933 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyRenewalServiceImpl.java @@ -0,0 +1,181 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.WarrantyRenewal; +import com.itheima.sfbx.insurance.mapper.WarrantyRenewalMapper; +import com.itheima.sfbx.insurance.service.IWarrantyRenewalService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WarrantyRenewalCacheConstant; +import com.itheima.sfbx.insurance.dto.WarrantyRenewalVO; +import com.itheima.sfbx.insurance.enums.WarrantyRenewalEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:合同续期服务实现类 + */ +@Slf4j +@Service +public class WarrantyRenewalServiceImpl extends ServiceImpl implements IWarrantyRenewalService { + + + /*** + * @description 合同续期多条件组合 + * @param warrantyRenewalVO 合同续期 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyRenewalVO warrantyRenewalVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getWarrantyNo())) { + queryWrapper.lambda().eq(WarrantyRenewal::getWarrantyNo,warrantyRenewalVO.getWarrantyNo()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getSortNo())) { + queryWrapper.lambda().eq(WarrantyRenewal::getSortNo,warrantyRenewalVO.getSortNo()); + } + //保障起始时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getSafeguardStartTime())) { + queryWrapper.lambda().eq(WarrantyRenewal::getSafeguardStartTime,warrantyRenewalVO.getSafeguardStartTime()); + } + //保障截止时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getSafeguardEndTime())) { + queryWrapper.lambda().eq(WarrantyRenewal::getSafeguardEndTime,warrantyRenewalVO.getSafeguardEndTime()); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getCompanyNo())) { + queryWrapper.lambda().eq(WarrantyRenewal::getCompanyNo,warrantyRenewalVO.getCompanyNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyRenewalVO.getDataState())) { + queryWrapper.lambda().eq(WarrantyRenewal::getDataState,warrantyRenewalVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WarrantyRenewal::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyRenewalCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#warrantyRenewalVO.hashCode()") + public Page findPage(WarrantyRenewalVO warrantyRenewalVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyRenewalPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyRenewalVO); + //执行分页查询 + Page warrantyRenewalVOPage = BeanConv.toPage( + page(WarrantyRenewalPage, queryWrapper), WarrantyRenewalVO.class); + //返回结果 + return warrantyRenewalVOPage; + }catch (Exception e){ + log.error("合同续期分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyRenewalCacheConstant.BASIC,key ="#warrantyRenewalId") + public WarrantyRenewalVO findById(String warrantyRenewalId) { + try { + //执行查询 + return BeanConv.toBean(getById(warrantyRenewalId),WarrantyRenewalVO.class); + }catch (Exception e){ + log.error("合同续期单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyRenewalCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyRenewalCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WarrantyRenewalCacheConstant.BASIC,key = "#result.id")}) + public WarrantyRenewalVO save(WarrantyRenewalVO warrantyRenewalVO) { + try { + //转换WarrantyRenewalVO为WarrantyRenewal + WarrantyRenewal warrantyRenewal = BeanConv.toBean(warrantyRenewalVO, WarrantyRenewal.class); + boolean flag = save(warrantyRenewal); + if (!flag){ + throw new RuntimeException("保存合同续期失败"); + } + //转换返回对象WarrantyRenewalVO + WarrantyRenewalVO warrantyRenewalVOHandler = BeanConv.toBean(warrantyRenewal, WarrantyRenewalVO.class); + return warrantyRenewalVOHandler; + }catch (Exception e){ + log.error("保存合同续期异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyRenewalCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyRenewalCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyRenewalCacheConstant.BASIC,key = "#warrantyRenewalVO.id")}) + public Boolean update(WarrantyRenewalVO warrantyRenewalVO) { + try { + //转换WarrantyRenewalVO为WarrantyRenewal + WarrantyRenewal warrantyRenewal = BeanConv.toBean(warrantyRenewalVO, WarrantyRenewal.class); + boolean flag = updateById(warrantyRenewal); + if (!flag){ + throw new RuntimeException("修改合同续期失败"); + } + return flag; + }catch (Exception e){ + log.error("修改合同续期异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyRenewalCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyRenewalCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyRenewalCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除合同续期失败"); + } + return flag; + }catch (Exception e){ + log.error("删除合同续期异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyRenewalCacheConstant.LIST,key ="#warrantyRenewalVO.hashCode()") + public List findList(WarrantyRenewalVO warrantyRenewalVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyRenewalVO); + //执行列表查询 + List warrantyRenewalVOs = BeanConv.toBeanList(list(queryWrapper),WarrantyRenewalVO.class); + return warrantyRenewalVOs; + }catch (Exception e){ + log.error("合同续期列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyRenewalEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyServiceImpl.java new file mode 100644 index 0000000..60fe9e5 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyServiceImpl.java @@ -0,0 +1,1014 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.date.LocalDateTimeUtil; +import cn.hutool.core.util.ObjectUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.collect.Lists; +import com.itheima.sfbx.RequestTemplate; +import com.itheima.sfbx.dto.ResponseDTO; +import com.itheima.sfbx.framework.anno.SensitiveResponse; +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.constant.security.AuthChannelConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyConstant; +import com.itheima.sfbx.framework.commons.constant.warranty.WarrantyOrderConstant; +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.dto.basic.OtherConfigVO; +import com.itheima.sfbx.framework.commons.dto.security.AuthChannelVO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.*; +import com.itheima.sfbx.framework.rabbitmq.pojo.MqMessage; +import com.itheima.sfbx.framework.rabbitmq.source.WarrantySource; +import com.itheima.sfbx.insurance.constant.WarrantyCacheConstant; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.enums.WarrantyEnum; +import com.itheima.sfbx.insurance.handler.InsureHandler; +import com.itheima.sfbx.insurance.handler.InsureProcessHandler; +import com.itheima.sfbx.insurance.mapper.WarrantyMapper; +import com.itheima.sfbx.insurance.pojo.*; +import com.itheima.sfbx.insurance.service.*; +import com.itheima.sfbx.security.feign.AuthChannelFeign; +import com.itheima.sfbx.security.feign.CompanyFeign; +import com.itheima.sfbx.security.feign.UserFeign; +import io.seata.spring.annotation.GlobalTransactional; +import lombok.extern.slf4j.Slf4j; +import org.apache.http.client.utils.URIBuilder; +import org.redisson.api.RLock; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import org.springframework.messaging.Message; +import org.springframework.messaging.support.MessageBuilder; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.time.temporal.ChronoUnit; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @Description:合同信息服务实现类 + */ +@Slf4j +@Service +public class WarrantyServiceImpl extends ServiceImpl implements IWarrantyService { + + @Autowired + private ICustomerRelationService customerRelationService; + + @Autowired + private UserFeign userFeign; + + @Autowired + private IInsuranceService insuranceService; + + @Autowired + private IdentifierGenerator identifierGenerator; + + @Autowired + private IPlanSafeguardService planSafeguardService; + + @Autowired + private IInsurancePlanService insurancePlanService; + + @Autowired + private CompanyFeign companyFeign; + + @Autowired + private IInsuranceCoefficentService insuranceCoefficentService; + + @Autowired + private InsureHandler earningsInsureHandler; + + @Autowired + private IWarrantyOrderService warrantyOrderService; + + @Autowired + private WarrantyMapper warrantyMapper; + + @Autowired + private IInsuranceApproveService insuranceApproveService; + + @Autowired + private IWarrantyInsuredService warrantyInsuredService; + + @Autowired + AuthChannelFeign authChannelFeign; + + @Autowired + IWarrantyVerifyService warrantyVerifyService; + + @Autowired + IWarrantyEarningsOrderService warrantyEarningsOrderService; + + /*** + * @description 合同信息多条件组合 + * @param warrantyVO 合同信息 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyVO warrantyVO) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保险ID查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getInsuranceId())) { + queryWrapper.lambda().eq(Warranty::getInsuranceId, warrantyVO.getInsuranceId()); + } + //保险名称查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getInsuranceName())) { + queryWrapper.lambda().eq(Warranty::getInsuranceName, warrantyVO.getInsuranceName()); + } + //投保详情查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getInsuranceJson())) { + queryWrapper.lambda().eq(Warranty::getInsuranceJson, warrantyVO.getInsuranceJson()); + } + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getWarrantyNo())) { + queryWrapper.lambda().eq(Warranty::getWarrantyNo, warrantyVO.getWarrantyNo()); + } + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getWarrantyNos())) { + queryWrapper.lambda().in(Warranty::getWarrantyNo, warrantyVO.getWarrantyNos()); + } + //投保人姓名查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getApplicantName())) { + queryWrapper.lambda().eq(Warranty::getApplicantName, warrantyVO.getApplicantName()); + } + //投保人身份证号码查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getApplicantIdentityCard())) { + queryWrapper.lambda().eq(Warranty::getApplicantIdentityCard, warrantyVO.getApplicantIdentityCard()); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getCompanyNo())) { + queryWrapper.lambda().eq(Warranty::getCompanyNo, warrantyVO.getCompanyNo()); + } + //企业名称查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getCompanyName())) { + queryWrapper.lambda().eq(Warranty::getCompanyName, warrantyVO.getCompanyName()); + } + //保障起始时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getSafeguardStartTime())) { + queryWrapper.lambda().eq(Warranty::getSafeguardStartTime, warrantyVO.getSafeguardStartTime()); + } + //保障截止时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getSafeguardEndTime())) { + queryWrapper.lambda().eq(Warranty::getSafeguardEndTime, warrantyVO.getSafeguardEndTime()); + } + //保费查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getPremium())) { + queryWrapper.lambda().eq(Warranty::getPremium, warrantyVO.getPremium()); + } + //自动延保(0是 1否)查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getAutoWarrantyExtension())) { + queryWrapper.lambda().eq(Warranty::getAutoWarrantyExtension, warrantyVO.getAutoWarrantyExtension()); + } + //状态(0待付款 1待生效 2保障中 3已失效 4 宽限期 5效力终止 )查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getWarrantyState())) { + queryWrapper.lambda().eq(Warranty::getWarrantyState, warrantyVO.getWarrantyState()); + } + //in状态(0待付款 1待生效 2保障中 3已失效 4 宽限期 5效力终止 )查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getWarrantyStates())) { + queryWrapper.lambda().in(Warranty::getWarrantyState, warrantyVO.getWarrantyStates()); + } + //状态(0待付款 1待生效 2保障中 3已失效 4 宽限期 5效力终止 )查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getApproveState())) { + queryWrapper.lambda().eq(Warranty::getApproveState, warrantyVO.getApproveState()); + } + //总期数查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getPeriods())) { + queryWrapper.lambda().eq(Warranty::getPeriods, warrantyVO.getPeriods()); + } + //已缴纳期数查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getDutyPeriod())) { + queryWrapper.lambda().eq(Warranty::getDutyPeriod, warrantyVO.getDutyPeriod()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getSortNo())) { + queryWrapper.lambda().eq(Warranty::getSortNo, warrantyVO.getSortNo()); + } + //犹豫期截止时间查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getHesitationTime())) { + queryWrapper.lambda().eq(Warranty::getHesitationTime, warrantyVO.getHesitationTime()); + } + //保单宽限查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getGrace())) { + queryWrapper.lambda().eq(Warranty::getGrace, warrantyVO.getGrace()); + } + //宽限单位查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getGraceUnit())) { + queryWrapper.lambda().eq(Warranty::getGraceUnit, warrantyVO.getGraceUnit()); + } + //保单复效查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getRevival())) { + queryWrapper.lambda().eq(Warranty::getRevival, warrantyVO.getRevival()); + } + //复效单位查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getRevivalUnit())) { + queryWrapper.lambda().eq(Warranty::getRevivalUnit, warrantyVO.getRevivalUnit()); + } + //代理人ID + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getAgentId())) { + queryWrapper.lambda().eq(Warranty::getAgentId, warrantyVO.getAgentId()); + } + //代理人姓名 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getAgentName())) { + queryWrapper.lambda().likeRight(Warranty::getAgentName, warrantyVO.getAgentName()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getDataState())) { + queryWrapper.lambda().eq(Warranty::getDataState, warrantyVO.getDataState()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVO.getUnderwritingState())) { + queryWrapper.lambda().eq(Warranty::getUnderwritingState, warrantyVO.getUnderwritingState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(Warranty::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyCacheConstant.PAGE, key = "#pageNum+'-'+#pageSize+'-'+#warrantyVO.hashCode()") + public Page findPage(WarrantyVO warrantyVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyPage = new Page<>(pageNum, pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyVO); + //执行分页查询 + Page warrantyVOPage = BeanConv.toPage( + page(WarrantyPage, queryWrapper), WarrantyVO.class); + //返回结果 + return warrantyVOPage; + } catch (Exception e) { + log.error("合同信息分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.PAGE_FAIL); + } + } + + + + @Override + @Cacheable(value = WarrantyCacheConstant.BASIC, key = "#warrantyId") + public WarrantyVO findById(String warrantyId) { + try { + //执行查询 + WarrantyVO warrantyVO = BeanConv.toBean(getById(warrantyId), WarrantyVO.class); + WarrantyOrderVO warrantyOrderVO = WarrantyOrderVO.builder() + .warrantyNo(warrantyVO.getWarrantyNo()) + .build(); + List list = warrantyOrderService.findList(warrantyOrderVO); + warrantyVO.setWarrantyOrderVOList(list); + return warrantyVO; + } catch (Exception e) { + log.error("合同信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = WarrantyCacheConstant.LIST, allEntries = true)}, + put = {@CachePut(value = WarrantyCacheConstant.BASIC, key = "#result.id")}) + public WarrantyVO save(WarrantyVO warrantyVO) { + try { + //转换WarrantyVO为Warranty + Warranty warranty = BeanConv.toBean(warrantyVO, Warranty.class); + boolean flag = save(warranty); + if (!flag) { + throw new RuntimeException("保存合同信息失败"); + } + //转换返回对象WarrantyVO + WarrantyVO warrantyVOHandler = BeanConv.toBean(warranty, WarrantyVO.class); + return warrantyVOHandler; + } catch (Exception e) { + log.error("保存合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = WarrantyCacheConstant.LIST, allEntries = true), + @CacheEvict(value = WarrantyCacheConstant.BASIC, key = "#warrantyVO.id")}) + public Boolean update(WarrantyVO warrantyVO) { + try { + //转换WarrantyVO为Warranty + Warranty warranty = BeanConv.toBean(warrantyVO, Warranty.class); + boolean flag = updateById(warranty); + if (!flag) { + throw new RuntimeException("修改合同信息失败"); + } + return flag; + } catch (Exception e) { + log.error("修改合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyCacheConstant.PAGE, allEntries = true), + @CacheEvict(value = WarrantyCacheConstant.LIST, allEntries = true), + @CacheEvict(value = WarrantyCacheConstant.BASIC, allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag) { + throw new RuntimeException("删除合同信息失败"); + } + return flag; + } catch (Exception e) { + log.error("删除合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyCacheConstant.LIST, key = "#warrantyVO.hashCode()") + public List findList(WarrantyVO warrantyVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyVO); + //执行列表查询 + List warrantyVOs = BeanConv.toBeanList(list(queryWrapper), WarrantyVO.class); + if (!EmptyUtil.isNullOrEmpty(warrantyVOs)){ + //获取合同合同编号 + List warrantyNo = warrantyVOs.stream().map(WarrantyVO::getWarrantyNo).collect(Collectors.toList()); + LambdaQueryWrapper insuredLambdaQueryWrapper = new LambdaQueryWrapper<>(); + insuredLambdaQueryWrapper.in(WarrantyInsured::getWarrantyNo, warrantyNo); + insuredLambdaQueryWrapper.eq(WarrantyInsured::getDataState, SuperConstant.DATA_STATE_0); + //查询被投保人信息 + List warrantyInsureds = warrantyInsuredService.list(insuredLambdaQueryWrapper); + //按照合同编号进行分组 + Map> warrantyNoByInsured = warrantyInsureds.stream().collect(Collectors.groupingBy(WarrantyInsured::getWarrantyNo)); + //查询客户的所有关系网 + List homeList = customerRelationService.findHomeList(SubjectContent.getUserVO()); + //封装被投保人信息 + warrantyVOs.stream().forEach(e->{ + ArrayList customerRelationVOS = new ArrayList<>(); + List insureds = warrantyNoByInsured.get(e.getWarrantyNo()); + insureds.stream().forEach(warrantyInsured -> { + //根据合同中的被保人身份证号获取客户关系 + Optional first = homeList.stream().filter(y -> y.getIdentityCard().equals(warrantyInsured.getInsuredIdentityCard())).findFirst(); + if(first.isPresent()){ + customerRelationVOS.add(first.get()); + } + }); + e.setCustomerRelationVOs(customerRelationVOS); + }); + } + //封装被投保人信息 + return warrantyVOs; + } catch (Exception e) { + log.error("合同信息列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.LIST_FAIL); + } + } + + /** + * 获取我的保险数量 + * 进行中的保险数量 + * + * @return + */ + @Override + @Cacheable(value = WarrantyCacheConstant.LIST, key = "#userVO.getId()") + public SelfWarrantyVO findMyWarrantyNums(UserVO userVO) { + try { + CustomerRelationVO customerRelationVO = customerRelationService.findOne(userVO.getId()); + if (ObjectUtil.isNull(customerRelationVO)) { + return null; + } + //获取身份证号 + String idCard = customerRelationVO.getIdentityCard(); + //保险对象 + WarrantyVO warrantyVO = WarrantyVO.builder(). + applicantIdentityCard(idCard). + dataState(SuperConstant.DATA_STATE_0). + warrantyStates(new String[]{ + WarrantyConstant.STATE_NOT_PAY, + WarrantyConstant.STATE_TO_BE_WORK, + WarrantyConstant.STATE_SAFEING + }). + build(); + //保险对象 + List warrantyVOList = findList(warrantyVO); + //使用stream统计 + List ingWarrantList = warrantyVOList.stream() + .filter(warrantyIndex -> WarrantyConstant.STATE_SAFEING.equals(warrantyIndex.getWarrantyState())) + .collect(Collectors.toList()); + LocalDateTime overTimes = LocalDateTimeUtil.offset(LocalDateTime.now(), 1, ChronoUnit.MONTHS); + List insureNumsList = ingWarrantList.stream() + .filter(warrantyIndex -> { + if (!EmptyUtil.isNullOrEmpty(warrantyIndex.getSafeguardEndTime())){ + return warrantyIndex.getSafeguardEndTime().isAfter(overTimes); + }else { + return true; + } + }) + .collect(Collectors.toList()); + return SelfWarrantyVO.builder(). + insureIngNums(ingWarrantList.size()). + insureNums(warrantyVOList.size()). + notRenewalNums(insureNumsList.size()). + build(); + } catch (Exception e) { + log.error("获取我的保险,和在保保险数量查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.FIND_ONE_FAIL); + } + } + + /** + * 获取家庭人身保障 + * + * @return + */ + @Override + @SensitiveResponse + public List findHomeSafeInfo(UserVO loginUser) { + try { + List res = new ArrayList<>(); + List customerRelationList = customerRelationService.findHomeList(loginUser); + //拿到家庭所有人员的身份证号 + List idCardList = customerRelationList.stream().map(CustomerRelationVO::getIdentityCard).collect(Collectors.toList()); + //转sql中字符串 + String idCard = idCardList.stream() + .map(s -> "'" + s + "'") + .collect(Collectors.joining(",")); + //拿到所有家庭人员的身份证号对应保险的保障类型 + List homeSafeInfo = warrantyMapper.findHomeSafeInfo(idCard, SuperConstant.DATA_STATE_0, WarrantyConstant.STATE_SAFEING); + List allCheckRule = InsureConstant.getAllCheckRule(); + if (CollectionUtil.isEmpty(homeSafeInfo)) { + for (CustomerRelationVO relation : customerRelationList) { + HomePeopleVO label = new HomePeopleVO(); + List value = new ArrayList<>(); + for (String index : allCheckRule) { + InsureTypeOnHomePeopleVO insureIndex = new InsureTypeOnHomePeopleVO(); + insureIndex.setValue(false); + insureIndex.setCheckRule(InsureConstant.getRuleNameById(index)); + value.add(insureIndex); + } + label.setName(relation.getName()); + label.setType(value); + label.setRelation(relation.getRelation()); + label.setSex(CustomerInfoUtil.setSexByIdCard(relation.getIdentityCard())); + res.add(label); + } + } else { + for (CustomerRelationVO relation : customerRelationList) { + HomePeopleVO label = new HomePeopleVO(); + List value = new ArrayList<>(); + for (String index : allCheckRule) { + InsureTypeOnHomePeopleVO insureIndex = new InsureTypeOnHomePeopleVO(); + Optional first = homeSafeInfo.stream().filter(e -> e.getCheckRule().equals(index)).findFirst(); + if (first.isPresent()) { + insureIndex.setValue(true); + } else { + insureIndex.setValue(false); + } + insureIndex.setCheckRule(InsureConstant.getRuleNameById(index)); + value.add(insureIndex); + } + label.setName(relation.getName()); + label.setType(value); + label.setRelation(relation.getRelation()); + label.setSex(CustomerInfoUtil.setSexByIdCard(relation.getIdentityCard())); + res.add(label); + } + } + return res; + } catch (Exception e) { + log.error("获取我的保险,和在保保险数量查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.FIND_ONE_FAIL); + } + } + + public static Map insuranceTypeMap = new HashMap<>(); + + static { + //校验规则:0医疗 1重疾 2意外 3养老 4储蓄 5旅游 6宠物 7定寿 + insuranceTypeMap.put(InsureConstant.CHECK_RULE_0, "medicalInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_1, "severeIllnessInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_2, "accidentInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_3, "agedInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_4, "annuityInsureHandler"); + insuranceTypeMap.put(InsureConstant.CHECK_RULE_5, "travelInsureHandler"); + //算法可后续扩展 + } + + @Autowired + RegisterBeanHandler registerBeanHandler; + + @Autowired + TripartiteInsureService tripartiteInsureService; + + @Autowired + InsureProcessHandler insureProcessHandler; + + @Value("${warranty-delay-time}") + String warrantyDelayTime; + + @Autowired + WarrantySource warrantySource; + + @Override + @GlobalTransactional + public WarrantyVO doInsure(DoInsureVo doInsureVo) { + try { + //投保路由 + InsureHandler insureHandler = registerBeanHandler + .getBean(insuranceTypeMap.get(doInsureVo.getCheckRule()), InsureHandler.class); + //保险合同生成 + WarrantyVO warrantyVOHandler = insureHandler.doInsure(doInsureVo); + WarrantyVO warrantyVO = save(warrantyVOHandler); + //保司承保 + ResponseDTO responseDTO = tripartiteInsureService.insure(warrantyVOHandler); + if (!"2000".equals(responseDTO.getCode())){ + throw new RuntimeException("核保不通过!"); + } + warrantyVO.setUnderwritingState(WarrantyConstant.UNDERWRITING_STATE_3); + //同步合同状态 + update(warrantyVO); + //合同订单生成 + List warrantyOrderVO = insureHandler.createWarrantyOrderVO(warrantyVO); + warrantyOrderService.saveBatch(BeanConv.toBeanList(warrantyOrderVO, WarrantyOrder.class)); + //保存被保人 + List customerRelationVOs = insureProcessHandler.buildInsureds(doInsureVo.getCustomerRelationIds()); + List warrantyInsureds = Lists.newArrayList(); + customerRelationVOs.forEach(n->{ + WarrantyInsured warrantyInsured = WarrantyInsured.builder() + .companyNo(warrantyVO.getCompanyNo()) + .warrantyNo(warrantyVO.getWarrantyNo()) + .insuredName(n.getName()) + .insuredIdentityCard(n.getIdentityCard()) + .build(); + warrantyInsureds.add(warrantyInsured); + }); + warrantyInsuredService.saveBatch(warrantyInsureds); + //发送队列信息:合同如果超过10分钟不进行支付处理,则会被消息队列清空 + Long messageId = (Long) identifierGenerator.nextId(doInsureVo); + MqMessage mqMessage = MqMessage.builder() + .id(messageId) + .title("warranty-message") + .content(warrantyVO.getWarrantyNo()) + .messageType("warranty-request") + .produceTime(Timestamp.valueOf(LocalDateTime.now())) + .sender("system") + .build(); + Message message = MessageBuilder.withPayload(mqMessage).setHeader("x-delay", warrantyDelayTime).build(); + boolean send = warrantySource.warrantyOutput().send(message); + return warrantyVO; + }catch (Exception e){ + log.error("保存合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.SAVE_FAIL); + } + } + + @Override + public List myWarrantyVOs(UserVO userVO,CustomerRelationVO userRelationVO) { + try { + List warrantyInsuredVOS = new ArrayList<>(); + //如果查询的是用户的某一个关系用户,则查询该关系用户 + if(ObjectUtil.isNotNull(userRelationVO.getId())){ + //如果查询的是用户的某一个关系用户,则查询该关系用户 + //查询被保人身份证号 + CustomerRelationVO customerRelationVO = customerRelationService.findById(String.valueOf(userRelationVO.getId())); + //根据对应的身份证号查询被保人合同编号 + warrantyInsuredVOS = warrantyInsuredService.findList(WarrantyInsuredVO.builder().insuredIdentityCard(customerRelationVO.getIdentityCard()).build()); + } + CustomerRelationVO customerRelationVO = customerRelationService.findOne(userVO.getId()); + //获取身份证号 + if (ObjectUtil.isNull(customerRelationVO)) { + return null; + } + String idCard = customerRelationVO.getIdentityCard(); + //保险对象 + WarrantyVO warrantyVO = WarrantyVO.builder(). + applicantIdentityCard(idCard). + dataState(SuperConstant.DATA_STATE_0). + warrantyStates(new String[]{ + WarrantyConstant.STATE_NOT_PAY, + WarrantyConstant.STATE_TO_BE_WORK, + WarrantyConstant.STATE_SAFEING + }). + build(); + //保险投保数据 + if(CollectionUtil.isNotEmpty(warrantyInsuredVOS)){ + //查询被保人合同编号 + warrantyVO.setWarrantyNos(warrantyInsuredVOS.stream().map(WarrantyInsuredVO::getWarrantyNo).collect(Collectors.toList())); + } + //保险对象 + List warrantyVOList = findList(warrantyVO); + //封装保单订单 + if (!EmptyUtil.isNullOrEmpty(warrantyVOList)){ + //执行查询 + List warrantyOrderVOS = BeanConv.toBeanList(warrantyVOList, WarrantyOrderVO.class); + List warrantyNos = warrantyOrderVOS.stream().map(e -> e.getWarrantyNo()).collect(Collectors.toList()); + LambdaQueryWrapper lambdaQueryWrapper = new LambdaQueryWrapper<>(); + lambdaQueryWrapper.in(WarrantyOrder::getWarrantyNo, warrantyNos); + lambdaQueryWrapper.eq(WarrantyOrder::getDataState, SuperConstant.DATA_STATE_0); + List warrantyOrders = BeanConv.toBeanList(warrantyOrderService.list(lambdaQueryWrapper), WarrantyOrderVO.class); + Map> collect = warrantyOrders.stream().collect(Collectors.groupingBy(WarrantyOrderVO::getWarrantyNo)); + warrantyVOList.forEach(e->{ + e.setWarrantyOrderVOList(collect.get(e.getWarrantyNo())); + }); + } + return warrantyVOList; + } catch (Exception e) { + log.error("查询合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.LIST_FAIL); + } + } + + /** + * 我的保单数量 + * + * @param userVO + * @return + */ + @Override + public MyWarrantyInfoVO myWarrantyNums(UserVO userVO) { + try { + CustomerRelationVO customerRelationVO = customerRelationService.findOne(userVO.getId()); + //获取身份证号 + if (EmptyUtil.isNullOrEmpty(customerRelationVO)) { + return new MyWarrantyInfoVO(); + } + String idCard = customerRelationVO.getIdentityCard(); + //保险对象 + WarrantyVO warrantyVO = WarrantyVO.builder(). + applicantIdentityCard(idCard). + dataState(SuperConstant.DATA_STATE_0). + warrantyStates(new String[]{ + WarrantyConstant.STATE_NOT_PAY, + WarrantyConstant.STATE_TO_BE_WORK, + WarrantyConstant.STATE_SAFEING + }). + build(); + List warrantyVOS = findList(warrantyVO); + MyWarrantyInfoVO res = MyWarrantyInfoVO.builder().nums(warrantyVOS.size()).build(); + if (warrantyVOS.size() <= 0) { + ArrayList items = new ArrayList<>(); + List allCheckRule = InsureConstant.getAllCheckRule(); + for (String type : allCheckRule) { + MyWarrantyInfoItemVO warrantyInfoItemVO = new MyWarrantyInfoItemVO(); + warrantyInfoItemVO.setWarrantyType(type); + warrantyInfoItemVO.setNums(0); + items.add(warrantyInfoItemVO); + } + res.setData(items); + return res; + } + List items = new ArrayList(); + List insuranceId = warrantyVOS.stream().map(WarrantyVO::getInsuranceId).collect(Collectors.toList()); + //insuranceId转String[] + String[] insuranceIdArr = insuranceId.stream().map(Object::toString).toArray(String[]::new); + //拿到各个保险的id后查询对应保险的保障类型 + InsuranceVO insuranceVO = InsuranceVO.builder().checkedIds(insuranceIdArr).dataState(SuperConstant.DATA_STATE_0).build(); + List insuranceList = insuranceService.findList(insuranceVO); + List checkRuleList = insuranceList.stream().map(InsuranceVO::getCheckRule).collect(Collectors.toList()); + Set cheRuleSet = insuranceList.stream().map(InsuranceVO::getCheckRule).collect(Collectors.toSet()); + for (String type : cheRuleSet) { + //判断当前类型在checkRuleList中出现了几次 + int i = 0; + for (String index : checkRuleList) { + if (index.equals(type)) { + i++; + } + } + MyWarrantyInfoItemVO warrantyInfoItemVO = MyWarrantyInfoItemVO.builder().warrantyType(type).nums(i).build(); + items.add(warrantyInfoItemVO); + } + //将处理完成的数据添加到结果集中 + res.setData(items); + return res; + } catch (Exception e) { + log.error("查询合同信息异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.LIST_FAIL); + } + } + + /** + * 核保补发 + */ + @Override + public void sendCheckInfo() { + //查询所有状态时未核保的保单 + WarrantyVO warrantyVO = WarrantyVO.builder(). + underwritingState(WarrantyConstant.UNDERWRITING_STATE_0). + dataState(SuperConstant.DATA_STATE_0). + build(); + List warrantyVOS = findList(warrantyVO); + if (warrantyVOS.size() <= 0) { + return; + } else { + for (WarrantyVO index : warrantyVOS) { + //查询三方接口配置信息 + AuthChannelVO authChannelVO = authChannelFeign.findAuthChannelByCompanyNoAndChannelLabel( + warrantyVO.getCompanyNo(), + AuthChannelConstant.CHANNEL_LABEL_INSURE); + List otherConfigVOs = JSONArray.parseArray(authChannelVO.getOtherConfig(), OtherConfigVO.class); + List otherConfigVOsHandler = otherConfigVOs.stream().filter(n -> { + return n.getConfigKey().equals(AuthChannelConstant.PUBLICKEY); + }).collect(Collectors.toList()); + //获取所有保单的id + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost(authChannelVO.getDomain()) + .setPath("/insure"); + RequestTemplate requestTemplate = RequestTemplate.builder() + .appId(authChannelVO.getAppId()) + .privateKey(authChannelVO.getAppSecret()) + .publicKey(otherConfigVOsHandler.get(0).getConfigValue()) + .uriBuilder(urlBuilder) + .build(); + try { + ResponseDTO responseDTO = requestTemplate.doRequest(index, ResponseDTO.class); + //保存审核信息 + WarrantyVerifyVO warrantyVerifyVO = WarrantyVerifyVO.builder() + .warrantyNo(warrantyVO.getWarrantyNo()) + .companyNo(warrantyVO.getCompanyNo()) + .verifyCode(responseDTO.getCode()) + .verifyMsg(responseDTO.getMsg()) + .build(); + warrantyVerifyService.save(warrantyVerifyVO); + index.setUnderwritingState(WarrantyConstant.UNDERWRITING_STATE_3); + this.update(index); + } catch (Exception e) { + log.error("核保补发异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + index.setUnderwritingState(WarrantyConstant.UNDERWRITING_STATE_2); + this.update(index); + } + } + } + } + + /** + * 保批补发 + */ + @Override + public void sendApproveInfo() { + //查询所有状态时未核保的保单 + InsuranceApproveVO insuranceApproveVO = InsuranceApproveVO.builder(). + approveState(WarrantyConstant.APPROVE_STATE_SEND_ERROR). + dataState(SuperConstant.DATA_STATE_0). + build(); + List approveVOS = insuranceApproveService.findList(insuranceApproveVO); + if (approveVOS.size() <= 0) { + return; + } else { + for (InsuranceApproveVO index : approveVOS) { + //查询三方接口配置信息 + AuthChannelVO authChannelVO = authChannelFeign.findAuthChannelByCompanyNoAndChannelLabel( + index.getCompanyNo(), + AuthChannelConstant.CHANNEL_LABEL_INSURE); + List otherConfigVOs = JSONArray.parseArray(authChannelVO.getOtherConfig(), OtherConfigVO.class); + List otherConfigVOsHandler = otherConfigVOs.stream().filter(n -> { + return n.getConfigKey().equals(AuthChannelConstant.PUBLICKEY); + }).collect(Collectors.toList()); + //获取所有保单的id + URIBuilder urlBuilder = new URIBuilder() + .setScheme("http") + .setHost(authChannelVO.getDomain()) + .setPath("/approve-info"); + RequestTemplate requestTemplate = RequestTemplate.builder() + .appId(authChannelVO.getAppId()) + .privateKey(authChannelVO.getAppSecret()) + .publicKey(otherConfigVOsHandler.get(0).getConfigValue()) + .uriBuilder(urlBuilder) + .build(); + try { + ResponseDTO responseDTO = requestTemplate.doRequest(index, ResponseDTO.class); + if(responseDTO.getCode().equals("2000")){ + //说明保批成功 + insuranceApproveVO.setApproveState(WarrantyConstant.APPROVE_STATE_APPROVE); + insuranceApproveService.update(insuranceApproveVO); + //保存审核信息 + String warrantyNo = index.getWarrantyNo(); + WarrantyVO warrantyVO = WarrantyVO.builder().warrantyNo(warrantyNo).dataState(SuperConstant.DATA_STATE_0).build(); + QueryWrapper warrantyQueryWrapper = queryWrapper(warrantyVO); + WarrantyVO warranty = BeanConv.toBean(getOne(warrantyQueryWrapper), WarrantyVO.class); + warranty.setApproveState(WarrantyConstant.APPROVE_STATE_APPROVE); + update(warranty); + } + } catch (Exception e) { + log.error("报批补发异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + } + } + } + } + + @Override + public WarrantyVO findWarranty(String warrantyId) { + try { + //执行查询 + WarrantyVO warrantyVO = BeanConv.toBean(getById(warrantyId), WarrantyVO.class); + WarrantyOrderVO warrantyOrderVO = WarrantyOrderVO.builder() + .orderState(WarrantyOrderConstant.ORDER_STATE_0) + .warrantyNo(warrantyVO.getWarrantyNo()) + .build(); + List list = warrantyOrderService.findList(warrantyOrderVO); + warrantyVO.setWarrantyOrderVOList(list); + return warrantyVO; + } catch (Exception e) { + log.error("合同信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.FIND_ONE_FAIL); + } + } + + /** + * 根据合同编号获取合同信息 + * @param warrantyNo + * @return + */ + @Override + public WarrantyVO findByWarrantyNo(String warrantyNo) { + try { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(Warranty::getWarrantyNo, warrantyNo); + //执行查询 + WarrantyVO warrantyVO = BeanConv.toBean(getOne(queryWrapper), WarrantyVO.class); + WarrantyOrderVO warrantyOrderVO = WarrantyOrderVO.builder() + .orderState(WarrantyOrderConstant.ORDER_STATE_0) + .warrantyNo(warrantyVO.getWarrantyNo()) + .build(); + List list = warrantyOrderService.findList(warrantyOrderVO); + warrantyVO.setWarrantyOrderVOList(list); + return warrantyVO; + } catch (Exception e) { + log.error("合同信息单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.FIND_ONE_FAIL); + } + } + + @Autowired + RedissonClient redissonClient; + + @Override + @Transactional + public Boolean cleanWarranty(String warrantyNo) { + //注意保险合同加锁:防止删除同时,计划任务在进行周期性扣款 + String key = "lock_warranty:"+warrantyNo; + RLock fairLock = redissonClient.getFairLock(key); + try { + if (fairLock.tryLock(CacheConstant.REDIS_WAIT_TIME, TimeUnit.SECONDS)){ + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(Warranty::getWarrantyNo, warrantyNo) + .eq(Warranty::getWarrantyState,WarrantyConstant.STATE_NOT_PAY); + Warranty warranty = getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(warranty)){ + //删除保险合同 + UpdateWrapper warrantyUpdateWrapper = new UpdateWrapper<>(); + warrantyUpdateWrapper.lambda().eq(Warranty::getWarrantyNo, warrantyNo) + .eq(Warranty::getWarrantyState,WarrantyOrderConstant.ORDER_STATE_0); + this.remove(warrantyUpdateWrapper); + //删除合同给付计划 + UpdateWrapper warrantyEarningsOrderUpdateWrapper = new UpdateWrapper<>(); + warrantyEarningsOrderUpdateWrapper.lambda().eq(WarrantyEarningsOrder::getWarrantyNo, warrantyNo); + warrantyEarningsOrderService.remove(warrantyEarningsOrderUpdateWrapper); + //删除合同被保人 + UpdateWrapper warrantyInsuredUpdateWrapper = new UpdateWrapper<>(); + warrantyInsuredUpdateWrapper.lambda().eq(WarrantyInsured::getWarrantyNo, warrantyNo); + warrantyInsuredService.remove(warrantyInsuredUpdateWrapper); + //删除合同订单 + UpdateWrapper warrantyOrderUpdateWrapper = new UpdateWrapper<>(); + warrantyOrderUpdateWrapper.lambda().eq(WarrantyOrder::getWarrantyNo, warrantyNo); + warrantyOrderService.remove(warrantyOrderUpdateWrapper); + //删除合同核保 + UpdateWrapper warrantyVerifyUpdateWrapper = new UpdateWrapper<>(); + warrantyVerifyUpdateWrapper.lambda().eq(WarrantyVerify::getWarrantyNo, warrantyNo); + warrantyVerifyService.remove(warrantyVerifyUpdateWrapper); + } + } + }catch (Exception e){ + log.error("保险合同加锁失败:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.DEL_FAIL); + }finally { + fairLock.unlock(); + } + return true; + } + + @Override + public SaleReportDTO doInsureDetailDay(String reportTime) { + try { + //目标日期 + TimeDTO yesterdayTime = TimeHandlerUtils.getYesterdayTime(reportTime); + //查询合同不为待付款状态的订单 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda() + .between(Warranty::getCreateTime,yesterdayTime.getBeginTime(),yesterdayTime.getEndTime()) + .ne(Warranty::getWarrantyState,WarrantyConstant.STATE_NOT_PAY); + List listHandler = list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(listHandler)){ + return SaleReportDTO.builder() + .totalAmountDay(BigDecimal.ZERO) + .totalWarrantyDay(0L) + .avgPieceAmountDay(BigDecimal.ZERO) + .avgPersonAmountDay(BigDecimal.ZERO) + .persons(Long.valueOf(0L)) + .reportTime(yesterdayTime.getTargetDate()) + .build(); + } + //日投保总额度 + BigDecimal totalAmountDay = listHandler.stream().map(Warranty::getPremiums).reduce(BigDecimal.ZERO, BigDecimal::add); + //日总合同数 + Integer totalWarrantyDay = listHandler.size(); + //投保人数 + Integer persons = listHandler.stream().collect(Collectors.groupingBy(Warranty::getApplicantIdentityCard)).size(); + //日投保件均额度 + BigDecimal avgPieceAmountDay = totalAmountDay.divide(new BigDecimal(totalWarrantyDay),BigDecimal.ROUND_HALF_UP); + //日投保人均额度 + BigDecimal avgPersonAmountDay = totalAmountDay.divide(new BigDecimal(persons),BigDecimal.ROUND_HALF_UP); + //构建返回 + return SaleReportDTO.builder() + .totalAmountDay(totalAmountDay) + .totalWarrantyDay(Long.valueOf(totalWarrantyDay)) + .avgPieceAmountDay(avgPieceAmountDay) + .avgPersonAmountDay(avgPersonAmountDay) + .persons(Long.valueOf(persons)) + .reportTime(yesterdayTime.getTargetDate()) + .build(); + }catch (Exception e){ + log.error("查询指定时间保单出错:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.LIST_FAIL); + } + } + + @Autowired + ICategoryService categoryService; + + @Override + public List doInsureCategory(String reportTime) { + try { + //目标日期 + TimeDTO yesterdayTime = TimeHandlerUtils.getYesterdayTime(reportTime); + //查询合同不为待付款状态的订单 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda() + .between(Warranty::getCreateTime,yesterdayTime.getBeginTime(),yesterdayTime.getEndTime()) + .ne(Warranty::getWarrantyState,WarrantyConstant.STATE_NOT_PAY); + List listHandler = list(queryWrapper); + //无保单则返回空 + if (EmptyUtil.isNullOrEmpty(listHandler)){ + return null; + } + //处理订单分类情况 + List warrantyVOs = BeanConv.toBeanList(listHandler, WarrantyVO.class); + for (WarrantyVO warrantyVO : warrantyVOs) { + InsureProcessVO insureProcessVO = JSONObject.parseObject(warrantyVO.getInsuranceJson(), InsureProcessVO.class); + warrantyVO.setCategoryNo(insureProcessVO.getInsuranceVO().getCategoryNo()); + } + //按照分类编号进行分组 + Map> mapWarrantyVOs = warrantyVOs.stream().collect(Collectors.groupingBy(WarrantyVO::getCategoryNo)); + //获得所有二级分类 + List categoryReportVOs = categoryService + .findList(CategoryVO.builder().nodeFloors(Lists.newArrayList(2L)).build()); + //无分类直接返回空 + if (EmptyUtil.isNullOrEmpty(categoryReportVOs)){ + return null; + } + //补全分类名称返回结果 + List insureCategoryDTOs = Lists.newArrayList(); + for (CategoryVO c : categoryReportVOs) { + for (Map.Entry> e : mapWarrantyVOs.entrySet()) { + if (NoProcessing.isParent(c.getCategoryNo(),String.valueOf(e.getKey()))){ + insureCategoryDTOs.add(InsureCategoryDTO.builder() + .categoryName(c.getCategoryName()) + .doInsureNums(Long.valueOf(e.getValue().size())) + .reportTime(yesterdayTime.getTargetDate()) + .build()); + } + } + } + return insureCategoryDTOs; + }catch (Exception e){ + log.error("查询指定时间保单出错:{}",ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyEnum.LIST_FAIL); + } + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyVerifyServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyVerifyServiceImpl.java new file mode 100644 index 0000000..d184c18 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WarrantyVerifyServiceImpl.java @@ -0,0 +1,181 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.pojo.WarrantyVerify; +import com.itheima.sfbx.insurance.mapper.WarrantyVerifyMapper; +import com.itheima.sfbx.insurance.service.IWarrantyVerifyService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WarrantyVerifyCacheConstant; +import com.itheima.sfbx.insurance.dto.WarrantyVerifyVO; +import com.itheima.sfbx.insurance.enums.WarrantyVerifyEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:合同核保服务实现类 + */ +@Slf4j +@Service +public class WarrantyVerifyServiceImpl extends ServiceImpl implements IWarrantyVerifyService { + + + /*** + * @description 合同核保多条件组合 + * @param warrantyVerifyVO 合同核保 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WarrantyVerifyVO warrantyVerifyVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保单编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getWarrantyNo())) { + queryWrapper.lambda().eq(WarrantyVerify::getWarrantyNo,warrantyVerifyVO.getWarrantyNo()); + } + //企业编号查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getCompanyNo())) { + queryWrapper.lambda().eq(WarrantyVerify::getCompanyNo,warrantyVerifyVO.getCompanyNo()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getSortNo())) { + queryWrapper.lambda().eq(WarrantyVerify::getSortNo,warrantyVerifyVO.getSortNo()); + } + //核保结果查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getVerifyCode())) { + queryWrapper.lambda().eq(WarrantyVerify::getVerifyCode,warrantyVerifyVO.getVerifyCode()); + } + //核保信息查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getVerifyMsg())) { + queryWrapper.lambda().eq(WarrantyVerify::getVerifyMsg,warrantyVerifyVO.getVerifyMsg()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(warrantyVerifyVO.getDataState())) { + queryWrapper.lambda().eq(WarrantyVerify::getDataState,warrantyVerifyVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WarrantyVerify::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WarrantyVerifyCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#warrantyVerifyVO.hashCode()") + public Page findPage(WarrantyVerifyVO warrantyVerifyVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WarrantyVerifyPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyVerifyVO); + //执行分页查询 + Page warrantyVerifyVOPage = BeanConv.toPage( + page(WarrantyVerifyPage, queryWrapper), WarrantyVerifyVO.class); + //返回结果 + return warrantyVerifyVOPage; + }catch (Exception e){ + log.error("合同核保分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyVerifyCacheConstant.BASIC,key ="#warrantyVerifyId") + public WarrantyVerifyVO findById(String warrantyVerifyId) { + try { + //执行查询 + return BeanConv.toBean(getById(warrantyVerifyId),WarrantyVerifyVO.class); + }catch (Exception e){ + log.error("合同核保单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyVerifyCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyVerifyCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WarrantyVerifyCacheConstant.BASIC,key = "#result.id")}) + public WarrantyVerifyVO save(WarrantyVerifyVO warrantyVerifyVO) { + try { + //转换WarrantyVerifyVO为WarrantyVerify + WarrantyVerify warrantyVerify = BeanConv.toBean(warrantyVerifyVO, WarrantyVerify.class); + boolean flag = save(warrantyVerify); + if (!flag){ + throw new RuntimeException("保存合同核保失败"); + } + //转换返回对象WarrantyVerifyVO + WarrantyVerifyVO warrantyVerifyVOHandler = BeanConv.toBean(warrantyVerify, WarrantyVerifyVO.class); + return warrantyVerifyVOHandler; + }catch (Exception e){ + log.error("保存合同核保异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyVerifyCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyVerifyCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyVerifyCacheConstant.BASIC,key = "#warrantyVerifyVO.id")}) + public Boolean update(WarrantyVerifyVO warrantyVerifyVO) { + try { + //转换WarrantyVerifyVO为WarrantyVerify + WarrantyVerify warrantyVerify = BeanConv.toBean(warrantyVerifyVO, WarrantyVerify.class); + boolean flag = updateById(warrantyVerify); + if (!flag){ + throw new RuntimeException("修改合同核保失败"); + } + return flag; + }catch (Exception e){ + log.error("修改合同核保异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WarrantyVerifyCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WarrantyVerifyCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WarrantyVerifyCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除合同核保失败"); + } + return flag; + }catch (Exception e){ + log.error("删除合同核保异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WarrantyVerifyCacheConstant.LIST,key ="#warrantyVerifyVO.hashCode()") + public List findList(WarrantyVerifyVO warrantyVerifyVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(warrantyVerifyVO); + //执行列表查询 + List warrantyVerifyVOs = BeanConv.toBeanList(list(queryWrapper),WarrantyVerifyVO.class); + return warrantyVerifyVOs; + }catch (Exception e){ + log.error("合同核保列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WarrantyVerifyEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeFlowNodeServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeFlowNodeServiceImpl.java new file mode 100644 index 0000000..443d38c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeFlowNodeServiceImpl.java @@ -0,0 +1,234 @@ +package com.itheima.sfbx.insurance.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.commons.utils.SubjectContent; +import com.itheima.sfbx.insurance.pojo.WorryFreeFlowNode; +import com.itheima.sfbx.insurance.mapper.WorryFreeFlowNodeMapper; +import com.itheima.sfbx.insurance.service.IWorryFreeFlowNodeService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.redisson.api.RList; +import org.redisson.api.RedissonClient; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WorryFreeFlowNodeCacheConstant; +import com.itheima.sfbx.insurance.dto.WorryFreeFlowNodeVO; +import com.itheima.sfbx.insurance.enums.WorryFreeFlowNodeEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:省心配流程节点记录服务实现类 + */ +@Slf4j +@Service +public class WorryFreeFlowNodeServiceImpl extends ServiceImpl implements IWorryFreeFlowNodeService { + + @Autowired + RedissonClient redissonClient; + + /*** + * @description 省心配流程节点记录多条件组合 + * @param worryFreeFlowNodeVO 省心配流程节点记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WorryFreeFlowNodeVO worryFreeFlowNodeVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //风险项名称列表 json查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeFlowNodeVO.getNodes())) { + queryWrapper.lambda().eq(WorryFreeFlowNode::getNodes,worryFreeFlowNodeVO.getNodes()); + } + //用户id查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeFlowNodeVO.getCustomerId())) { + queryWrapper.lambda().eq(WorryFreeFlowNode::getCustomerId,worryFreeFlowNodeVO.getCustomerId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeFlowNodeVO.getSortNo())) { + queryWrapper.lambda().eq(WorryFreeFlowNode::getSortNo,worryFreeFlowNodeVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeFlowNodeVO.getDataState())) { + queryWrapper.lambda().eq(WorryFreeFlowNode::getDataState,worryFreeFlowNodeVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WorryFreeFlowNode::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WorryFreeFlowNodeCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#worryFreeFlowNodeVO.hashCode()") + public Page findPage(WorryFreeFlowNodeVO worryFreeFlowNodeVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WorryFreeFlowNodePage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeFlowNodeVO); + //执行分页查询 + Page worryFreeFlowNodeVOPage = BeanConv.toPage( + page(WorryFreeFlowNodePage, queryWrapper), WorryFreeFlowNodeVO.class); + //返回结果 + return worryFreeFlowNodeVOPage; + }catch (Exception e){ + log.error("省心配流程节点记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeFlowNodeCacheConstant.BASIC,key ="#worryFreeFlowNodeId") + public WorryFreeFlowNodeVO findById(String worryFreeFlowNodeId) { + try { + //执行查询 + return BeanConv.toBean(getById(worryFreeFlowNodeId),WorryFreeFlowNodeVO.class); + }catch (Exception e){ + log.error("省心配流程节点记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeFlowNodeCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeFlowNodeCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WorryFreeFlowNodeCacheConstant.BASIC,key = "#result.id")}) + public WorryFreeFlowNodeVO save(WorryFreeFlowNodeVO worryFreeFlowNodeVO) { + try { + //转换WorryFreeFlowNodeVO为WorryFreeFlowNode + WorryFreeFlowNode worryFreeFlowNode = BeanConv.toBean(worryFreeFlowNodeVO, WorryFreeFlowNode.class); + boolean flag = save(worryFreeFlowNode); + if (!flag){ + throw new RuntimeException("保存省心配流程节点记录失败"); + } + //转换返回对象WorryFreeFlowNodeVO + WorryFreeFlowNodeVO worryFreeFlowNodeVOHandler = BeanConv.toBean(worryFreeFlowNode, WorryFreeFlowNodeVO.class); + return worryFreeFlowNodeVOHandler; + }catch (Exception e){ + log.error("保存省心配流程节点记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeFlowNodeCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeFlowNodeCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeFlowNodeCacheConstant.BASIC,key = "#worryFreeFlowNodeVO.id")}) + public Boolean update(WorryFreeFlowNodeVO worryFreeFlowNodeVO) { + try { + //转换WorryFreeFlowNodeVO为WorryFreeFlowNode + WorryFreeFlowNode worryFreeFlowNode = BeanConv.toBean(worryFreeFlowNodeVO, WorryFreeFlowNode.class); + boolean flag = updateById(worryFreeFlowNode); + if (!flag){ + throw new RuntimeException("修改省心配流程节点记录失败"); + } + return flag; + }catch (Exception e){ + log.error("修改省心配流程节点记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeFlowNodeCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeFlowNodeCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeFlowNodeCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除省心配流程节点记录失败"); + } + return flag; + }catch (Exception e){ + log.error("删除省心配流程节点记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeFlowNodeCacheConstant.LIST,key ="#worryFreeFlowNodeVO.hashCode()") + public List findList(WorryFreeFlowNodeVO worryFreeFlowNodeVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeFlowNodeVO); + //执行列表查询 + List worryFreeFlowNodeVOs = BeanConv.toBeanList(list(queryWrapper),WorryFreeFlowNodeVO.class); + return worryFreeFlowNodeVOs; + }catch (Exception e){ + log.error("省心配流程节点记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.LIST_FAIL); + } + } + + /** + * 根据登录用户id查询当前登录用户的流程节点 + * @param id + * @return + */ + @Override + public List flowNode(Long id) { + try{ + //先查询缓存中的流程节点 + String userId = String.valueOf(SubjectContent.getUserVO().getId()); + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + RList list = redissonClient.getList(listKey); + //如果查询出的节点为空,查询数据库中的流程节点 + List res = list.stream().collect(Collectors.toList()); + if(CollectionUtil.isNotEmpty(res)) { + return res; + } + //否则根据当前登录人查询数据库 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WorryFreeFlowNode::getCustomerId, id); + WorryFreeFlowNode worryFreeFlowNodes = getOne(queryWrapper); + if(worryFreeFlowNodes != null) { + List strings = JSONUtil.toList(worryFreeFlowNodes.getNodes(), String.class); + return strings; + } + //如果数据库中也没有 + //直接返回空 + return null; + }catch (Exception e){ + log.error("省心配流程节点记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.FIND_ONE_FAIL); + } + } + + /** + * 清空当前登录人的历史记录 + * @param id + */ + @Override + public void cleanCustomerHistry(String id) { + try { + QueryWrapper worryFreeFlowNodeQueryWrapper = new QueryWrapper<>(); + worryFreeFlowNodeQueryWrapper.lambda().eq(WorryFreeFlowNode::getCustomerId, id); + remove(worryFreeFlowNodeQueryWrapper); + }catch (Exception e){ + log.error("删除省心配流程节点记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeFlowNodeEnum.DEL_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceImpl.java new file mode 100644 index 0000000..6cc7381 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceImpl.java @@ -0,0 +1,15 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.service.IWorryFreeInsuranceService; +import org.springframework.stereotype.Service; + +/** + * WorryFreeInsuranceImpl + * + * @author: wgl + * @describe: 省心配业务层 + * @date: 2022/12/28 10:10 + */ +@Service +public class WorryFreeInsuranceImpl implements IWorryFreeInsuranceService { +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceMatchServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceMatchServiceImpl.java new file mode 100644 index 0000000..99805ec --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeInsuranceMatchServiceImpl.java @@ -0,0 +1,228 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.insurance.dto.WorryFreeCustomerInfoVO; +import com.itheima.sfbx.insurance.pojo.WorryFreeInsuranceMatch; +import com.itheima.sfbx.insurance.mapper.WorryFreeInsuranceMatchMapper; +import com.itheima.sfbx.insurance.service.IWorryFreeInsuranceMatchService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WorryFreeInsuranceMatchCacheConstant; +import com.itheima.sfbx.insurance.dto.WorryFreeInsuranceMatchVO; +import com.itheima.sfbx.insurance.enums.WorryFreeInsuranceMatchEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:省心配保险推荐记录服务实现类 + */ +@Slf4j +@Service +public class WorryFreeInsuranceMatchServiceImpl extends ServiceImpl implements IWorryFreeInsuranceMatchService { + + + /*** + * @description 省心配保险推荐记录多条件组合 + * @param worryFreeInsuranceMatchVO 省心配保险推荐记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getType())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getType,worryFreeInsuranceMatchVO.getType()); + } + //保险json查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getInsuranceJson())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getInsuranceJson,worryFreeInsuranceMatchVO.getInsuranceJson()); + } + //保险方案查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getInsurancePlan())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getInsurancePlan,worryFreeInsuranceMatchVO.getInsurancePlan()); + } + //分配的保额查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getAmount())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getAmount,worryFreeInsuranceMatchVO.getAmount()); + } + //解决方案查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getSolution())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getSolution,worryFreeInsuranceMatchVO.getSolution()); + } + //方案建议查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getPlanSuggest())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getPlanSuggest,worryFreeInsuranceMatchVO.getPlanSuggest()); + } + //用户id查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getCustomerId())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getCustomerId,worryFreeInsuranceMatchVO.getCustomerId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getSortNo())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getSortNo,worryFreeInsuranceMatchVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeInsuranceMatchVO.getDataState())) { + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getDataState,worryFreeInsuranceMatchVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WorryFreeInsuranceMatch::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WorryFreeInsuranceMatchCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#worryFreeInsuranceMatchVO.hashCode()") + public Page findPage(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WorryFreeInsuranceMatchPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeInsuranceMatchVO); + //执行分页查询 + Page worryFreeInsuranceMatchVOPage = BeanConv.toPage( + page(WorryFreeInsuranceMatchPage, queryWrapper), WorryFreeInsuranceMatchVO.class); + //返回结果 + return worryFreeInsuranceMatchVOPage; + }catch (Exception e){ + log.error("省心配保险推荐记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeInsuranceMatchCacheConstant.BASIC,key ="#worryFreeInsuranceMatchId") + public WorryFreeInsuranceMatchVO findById(String worryFreeInsuranceMatchId) { + try { + //执行查询 + return BeanConv.toBean(getById(worryFreeInsuranceMatchId),WorryFreeInsuranceMatchVO.class); + }catch (Exception e){ + log.error("省心配保险推荐记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WorryFreeInsuranceMatchCacheConstant.BASIC,key = "#result.id")}) + public WorryFreeInsuranceMatchVO save(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO) { + try { + //转换WorryFreeInsuranceMatchVO为WorryFreeInsuranceMatch + WorryFreeInsuranceMatch worryFreeInsuranceMatch = BeanConv.toBean(worryFreeInsuranceMatchVO, WorryFreeInsuranceMatch.class); + boolean flag = save(worryFreeInsuranceMatch); + if (!flag){ + throw new RuntimeException("保存省心配保险推荐记录失败"); + } + //转换返回对象WorryFreeInsuranceMatchVO + WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVOHandler = BeanConv.toBean(worryFreeInsuranceMatch, WorryFreeInsuranceMatchVO.class); + return worryFreeInsuranceMatchVOHandler; + }catch (Exception e){ + log.error("保存省心配保险推荐记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.BASIC,key = "#worryFreeInsuranceMatchVO.id")}) + public Boolean update(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO) { + try { + //转换WorryFreeInsuranceMatchVO为WorryFreeInsuranceMatch + WorryFreeInsuranceMatch worryFreeInsuranceMatch = BeanConv.toBean(worryFreeInsuranceMatchVO, WorryFreeInsuranceMatch.class); + boolean flag = updateById(worryFreeInsuranceMatch); + if (!flag){ + throw new RuntimeException("修改省心配保险推荐记录失败"); + } + return flag; + }catch (Exception e){ + log.error("修改省心配保险推荐记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeInsuranceMatchCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除省心配保险推荐记录失败"); + } + return flag; + }catch (Exception e){ + log.error("删除省心配保险推荐记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeInsuranceMatchCacheConstant.LIST,key ="#worryFreeInsuranceMatchVO.hashCode()") + public List findList(WorryFreeInsuranceMatchVO worryFreeInsuranceMatchVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeInsuranceMatchVO); + //执行列表查询 + List worryFreeInsuranceMatchVOs = BeanConv.toBeanList(list(queryWrapper),WorryFreeInsuranceMatchVO.class); + return worryFreeInsuranceMatchVOs; + }catch (Exception e){ + log.error("省心配保险推荐记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.LIST_FAIL); + } + } + + /** + * 构建查询条件 + * @param id + * @return + */ + @Override + public List productList(Long id) { + try{ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getCustomerId,id); + List list = list(queryWrapper); + return BeanConv.toBeanList(list,WorryFreeInsuranceMatchVO.class); + }catch (Exception e){ + log.error("省心配保险推荐记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.LIST_FAIL); + } + } + + /** + * + * @param id + */ + @Override + public void cleanCustomerHistry(String id) { + try{ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WorryFreeInsuranceMatch::getCustomerId,id); + remove(queryWrapper); + }catch (Exception e){ + log.error("省心配保险推荐记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeInsuranceMatchEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeRiskItemServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeRiskItemServiceImpl.java new file mode 100644 index 0000000..d836efe --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeRiskItemServiceImpl.java @@ -0,0 +1,209 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.insurance.pojo.WorryFreeRiskItem; +import com.itheima.sfbx.insurance.mapper.WorryFreeRiskItemMapper; +import com.itheima.sfbx.insurance.service.IWorryFreeRiskItemService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WorryFreeRiskItemCacheConstant; +import com.itheima.sfbx.insurance.dto.WorryFreeRiskItemVO; +import com.itheima.sfbx.insurance.enums.WorryFreeRiskItemEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:服务实现类 + */ +@Slf4j +@Service +public class WorryFreeRiskItemServiceImpl extends ServiceImpl implements IWorryFreeRiskItemService { + + + /*** + * @description 多条件组合 + * @param worryFreeRiskItemVO + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WorryFreeRiskItemVO worryFreeRiskItemVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //风险类型(意外:accident 医疗:medical 重疾:serious 身故:die 用户标签:person_title)查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeRiskItemVO.getType())) { + queryWrapper.lambda().eq(WorryFreeRiskItem::getType,worryFreeRiskItemVO.getType()); + } + //风险项名称列表 json查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeRiskItemVO.getNames())) { + queryWrapper.lambda().eq(WorryFreeRiskItem::getNames,worryFreeRiskItemVO.getNames()); + } + //用户id查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeRiskItemVO.getCustomerId())) { + queryWrapper.lambda().eq(WorryFreeRiskItem::getCustomerId,worryFreeRiskItemVO.getCustomerId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeRiskItemVO.getSortNo())) { + queryWrapper.lambda().eq(WorryFreeRiskItem::getSortNo,worryFreeRiskItemVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeRiskItemVO.getDataState())) { + queryWrapper.lambda().eq(WorryFreeRiskItem::getDataState,worryFreeRiskItemVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WorryFreeRiskItem::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WorryFreeRiskItemCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#worryFreeRiskItemVO.hashCode()") + public Page findPage(WorryFreeRiskItemVO worryFreeRiskItemVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WorryFreeRiskItemPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeRiskItemVO); + //执行分页查询 + Page worryFreeRiskItemVOPage = BeanConv.toPage( + page(WorryFreeRiskItemPage, queryWrapper), WorryFreeRiskItemVO.class); + //返回结果 + return worryFreeRiskItemVOPage; + }catch (Exception e){ + log.error("分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeRiskItemCacheConstant.BASIC,key ="#worryFreeRiskItemId") + public WorryFreeRiskItemVO findById(String worryFreeRiskItemId) { + try { + //执行查询 + return BeanConv.toBean(getById(worryFreeRiskItemId),WorryFreeRiskItemVO.class); + }catch (Exception e){ + log.error("单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeRiskItemCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeRiskItemCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WorryFreeRiskItemCacheConstant.BASIC,key = "#result.id")}) + public WorryFreeRiskItemVO save(WorryFreeRiskItemVO worryFreeRiskItemVO) { + try { + //转换WorryFreeRiskItemVO为WorryFreeRiskItem + WorryFreeRiskItem worryFreeRiskItem = BeanConv.toBean(worryFreeRiskItemVO, WorryFreeRiskItem.class); + boolean flag = save(worryFreeRiskItem); + if (!flag){ + throw new RuntimeException("保存失败"); + } + //转换返回对象WorryFreeRiskItemVO + WorryFreeRiskItemVO worryFreeRiskItemVOHandler = BeanConv.toBean(worryFreeRiskItem, WorryFreeRiskItemVO.class); + return worryFreeRiskItemVOHandler; + }catch (Exception e){ + log.error("保存异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeRiskItemCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeRiskItemCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeRiskItemCacheConstant.BASIC,key = "#worryFreeRiskItemVO.id")}) + public Boolean update(WorryFreeRiskItemVO worryFreeRiskItemVO) { + try { + //转换WorryFreeRiskItemVO为WorryFreeRiskItem + WorryFreeRiskItem worryFreeRiskItem = BeanConv.toBean(worryFreeRiskItemVO, WorryFreeRiskItem.class); + boolean flag = updateById(worryFreeRiskItem); + if (!flag){ + throw new RuntimeException("修改失败"); + } + return flag; + }catch (Exception e){ + log.error("修改异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeRiskItemCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeRiskItemCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeRiskItemCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除失败"); + } + return flag; + }catch (Exception e){ + log.error("删除异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeRiskItemCacheConstant.LIST,key ="#worryFreeRiskItemVO.hashCode()") + public List findList(WorryFreeRiskItemVO worryFreeRiskItemVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeRiskItemVO); + //执行列表查询 + List worryFreeRiskItemVOs = BeanConv.toBeanList(list(queryWrapper),WorryFreeRiskItemVO.class); + return worryFreeRiskItemVOs; + }catch (Exception e){ + log.error("列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.LIST_FAIL); + } + } + + /** + * 获取我的风险项 + * @param id + * @return + */ + @Override + public List findMyRiskItem(Long id) { + try{ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WorryFreeRiskItem::getCustomerId,id); + queryWrapper.lambda().eq(WorryFreeRiskItem::getDataState, SuperConstant.DATA_STATE_0); + List res = BeanConv.toBeanList(list(queryWrapper),WorryFreeRiskItemVO.class); + return res; + }catch (Exception e){ + log.error("列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.LIST_FAIL); + } + } + + @Override + public void cleanCustomerHistry(String id) { + try{ + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(WorryFreeRiskItem::getCustomerId,id); + remove(queryWrapper); + }catch (Exception e){ + log.error("列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeRiskItemEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeSafeguardQuotaServiceImpl.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeSafeguardQuotaServiceImpl.java new file mode 100644 index 0000000..43f96d1 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/service/impl/WorryFreeSafeguardQuotaServiceImpl.java @@ -0,0 +1,223 @@ +package com.itheima.sfbx.insurance.service.impl; + +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.insurance.pojo.WorryFreeSafeguardQuota; +import com.itheima.sfbx.insurance.mapper.WorryFreeSafeguardQuotaMapper; +import com.itheima.sfbx.insurance.service.IWorryFreeSafeguardQuotaService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +import com.itheima.sfbx.insurance.constant.WorryFreeSafeguardQuotaCacheConstant; +import com.itheima.sfbx.insurance.dto.WorryFreeSafeguardQuotaVO; +import com.itheima.sfbx.insurance.enums.WorryFreeSafeguardQuotaEnum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:省心配流程保障配额记录服务实现类 + */ +@Slf4j +@Service +public class WorryFreeSafeguardQuotaServiceImpl extends ServiceImpl implements IWorryFreeSafeguardQuotaService { + + + /*** + * @description 省心配流程保障配额记录多条件组合 + * @param worryFreeSafeguardQuotaVO 省心配流程保障配额记录 + * @return QueryWrapper查询条件 + */ + private QueryWrapper queryWrapper(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO){ + QueryWrapper queryWrapper = new QueryWrapper<>(); + //保障项列表 json查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getSafeguards())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getSafeguards,worryFreeSafeguardQuotaVO.getSafeguards()); + } + //医疗配额查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getMedicalAmount())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getMedicalAmount,worryFreeSafeguardQuotaVO.getMedicalAmount()); + } + //意外配额查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getAccidentAmount())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getAccidentAmount,worryFreeSafeguardQuotaVO.getAccidentAmount()); + } + //医疗配额查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getDieAmount())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getDieAmount,worryFreeSafeguardQuotaVO.getDieAmount()); + } + //重疾配额查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getSeriousAmount())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getSeriousAmount,worryFreeSafeguardQuotaVO.getSeriousAmount()); + } + //用户id查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getCustomerId())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getCustomerId,worryFreeSafeguardQuotaVO.getCustomerId()); + } + //排序查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getSortNo())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getSortNo,worryFreeSafeguardQuotaVO.getSortNo()); + } + //状态查询 + if (!EmptyUtil.isNullOrEmpty(worryFreeSafeguardQuotaVO.getDataState())) { + queryWrapper.lambda().eq(WorryFreeSafeguardQuota::getDataState,worryFreeSafeguardQuotaVO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(WorryFreeSafeguardQuota::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = WorryFreeSafeguardQuotaCacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#worryFreeSafeguardQuotaVO.hashCode()") + public Page findPage(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page WorryFreeSafeguardQuotaPage = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeSafeguardQuotaVO); + //执行分页查询 + Page worryFreeSafeguardQuotaVOPage = BeanConv.toPage( + page(WorryFreeSafeguardQuotaPage, queryWrapper), WorryFreeSafeguardQuotaVO.class); + //返回结果 + return worryFreeSafeguardQuotaVOPage; + }catch (Exception e){ + log.error("省心配流程保障配额记录分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeSafeguardQuotaCacheConstant.BASIC,key ="#worryFreeSafeguardQuotaId") + public WorryFreeSafeguardQuotaVO findById(String worryFreeSafeguardQuotaId) { + try { + //执行查询 + return BeanConv.toBean(getById(worryFreeSafeguardQuotaId),WorryFreeSafeguardQuotaVO.class); + }catch (Exception e){ + log.error("省心配流程保障配额记录单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.FIND_ONE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =WorryFreeSafeguardQuotaCacheConstant.BASIC,key = "#result.id")}) + public WorryFreeSafeguardQuotaVO save(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO) { + try { + //转换WorryFreeSafeguardQuotaVO为WorryFreeSafeguardQuota + WorryFreeSafeguardQuota worryFreeSafeguardQuota = BeanConv.toBean(worryFreeSafeguardQuotaVO, WorryFreeSafeguardQuota.class); + boolean flag = save(worryFreeSafeguardQuota); + if (!flag){ + throw new RuntimeException("保存省心配流程保障配额记录失败"); + } + //转换返回对象WorryFreeSafeguardQuotaVO + WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVOHandler = BeanConv.toBean(worryFreeSafeguardQuota, WorryFreeSafeguardQuotaVO.class); + return worryFreeSafeguardQuotaVOHandler; + }catch (Exception e){ + log.error("保存省心配流程保障配额记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.SAVE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.BASIC,key = "#worryFreeSafeguardQuotaVO.id")}) + public Boolean update(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO) { + try { + //转换WorryFreeSafeguardQuotaVO为WorryFreeSafeguardQuota + WorryFreeSafeguardQuota worryFreeSafeguardQuota = BeanConv.toBean(worryFreeSafeguardQuotaVO, WorryFreeSafeguardQuota.class); + boolean flag = updateById(worryFreeSafeguardQuota); + if (!flag){ + throw new RuntimeException("修改省心配流程保障配额记录失败"); + } + return flag; + }catch (Exception e){ + log.error("修改省心配流程保障配额记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.UPDATE_FAIL); + } + } + + @Override + @Transactional + @Caching(evict = {@CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.PAGE,allEntries = true), + @CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.LIST,allEntries = true), + @CacheEvict(value = WorryFreeSafeguardQuotaCacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除省心配流程保障配额记录失败"); + } + return flag; + }catch (Exception e){ + log.error("删除省心配流程保障配额记录异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = WorryFreeSafeguardQuotaCacheConstant.LIST,key ="#worryFreeSafeguardQuotaVO.hashCode()") + public List findList(WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO) { + try { + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeSafeguardQuotaVO); + //执行列表查询 + List worryFreeSafeguardQuotaVOs = BeanConv.toBeanList(list(queryWrapper),WorryFreeSafeguardQuotaVO.class); + return worryFreeSafeguardQuotaVOs; + }catch (Exception e){ + log.error("省心配流程保障配额记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.LIST_FAIL); + } + } + + /** + * 获取保险配额 + * @param customerId + * @return + */ + @Override + public WorryFreeSafeguardQuotaVO findSaferQuota(Long customerId) { + try { + WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO = WorryFreeSafeguardQuotaVO.builder() + .dataState(SuperConstant.DATA_STATE_0) + .customerId(customerId).build(); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeSafeguardQuotaVO); + return BeanConv.toBean(getOne(queryWrapper), WorryFreeSafeguardQuotaVO.class); + }catch (Exception e){ + log.error("省心配流程保障配额记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.LIST_FAIL); + } + } + + @Override + public void cleanCustomerHistry(String id) { + try { + WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO = WorryFreeSafeguardQuotaVO.builder().customerId(Long.valueOf(id)).build(); + //构建查询条件 + QueryWrapper queryWrapper = queryWrapper(worryFreeSafeguardQuotaVO); + remove(queryWrapper); + }catch (Exception e){ + log.error("省心配流程保障配额记录列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(WorryFreeSafeguardQuotaEnum.LIST_FAIL); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/RiskScore.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/RiskScore.java new file mode 100644 index 0000000..e4f2703 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/RiskScore.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.insurance.urule.action; + +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +import lombok.extern.slf4j.Slf4j; +import org.redisson.Redisson; +import org.redisson.api.RScoredSortedSet; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.stereotype.Component; + +import java.util.Map; + +/** + * RiskScore + * + * @author: wgl + * @describe: 风险打分 + * @date: 2022/12/28 10:10 + */ +@ActionBean(name = "打分") +@Component +@Slf4j +public class RiskScore { + + @Autowired + RedissonClient redissonClient; + + @ActionMethod(name = "风险打分") + @ActionMethodParameter(names = {"用户id","风险名称", "得分","风险类型"}) + public void setScore(String userId,String riskName, String score,String riskType) { + // 创建不同用户的ZSet键 + String userZSetKey = "user_risk_scores:" +riskType+":"+ userId; + // 获取RScoredSortedSet对象,它代表了ZSet + RScoredSortedSet zset = redissonClient.getScoredSortedSet(userZSetKey); + // 获取当前用户的风险分数 + Double currentScore = zset.getScore(riskName); + if (currentScore == null || Double.parseDouble(score) > currentScore) { + // 如果分数不存在或新分数更高,更新分数 + zset.add(Double.parseDouble(score), riskName); + System.out.println("分数更新成功"); + } else { + System.out.println("分数未更新"); + } + } + + @ActionMethod(name = "追加打分") + @ActionMethodParameter(names = {"用户id","风险名称", "得分","风险类型"}) + public void appendScore(String userId,String riskName, String score,String riskType) { + try { + // 创建不同用户的ZSet键 + String userZSetKey = "user_risk_scores:" + riskType + ":" + userId; + // 获取RScoredSortedSet对象,它代表了ZSet + RScoredSortedSet zset = redissonClient.getScoredSortedSet(userZSetKey); + // 获取当前用户的风险分数 + Double currentScore = zset.getScore(riskName); + // 如果分数不存在或新分数更高,更新分数 + zset.add(Double.parseDouble(score) + currentScore, riskName); + System.out.println("分数更新成功"); + }catch (Exception e) { + e.printStackTrace(); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/SickLogAction.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/SickLogAction.java new file mode 100644 index 0000000..2ccbbec --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/SickLogAction.java @@ -0,0 +1,29 @@ +package com.itheima.sfbx.insurance.urule.action; + +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * SickLogAction + * + * @author: wgl + * @describe: 动作库:疾病日志 + * @date: 2022/12/28 10:10 + */ +@ActionBean(name = "疾病日志") +@Component +@Slf4j +public class SickLogAction { + + + @ActionMethod(name = "记录规审核疾病") + @ActionMethodParameter(names = {"疾病列表"}) + public void saveSickLog(List sicks) { + log.info("当前疾病为" +sicks); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/WorryFreeFlow.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/WorryFreeFlow.java new file mode 100644 index 0000000..4914863 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/action/WorryFreeFlow.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.insurance.urule.action; + +import cn.hutool.core.util.ObjectUtil; +import com.itheima.sfbx.framework.rule.model.flow.ActionNode; +import com.itheima.sfbx.framework.rule.model.flow.FlowAction; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.framework.rule.model.flow.ins.ProcessInstance; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import com.itheima.sfbx.insurance.urule.worrypay.HandlerManage; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Component; + +/** + * WorryFreeFlow + * + * @author: wgl + * @describe: 流程节点执行器 + * @date: 2022/12/28 10:10 + */ +@Component +@Slf4j +public class WorryFreeFlow implements FlowAction { + + @Override + public void execute(ActionNode node, FlowContext context, ProcessInstance instance) { + String name = node.getName(); + log.info("执行节点:{}", name); + FlowNodeAction handler = HandlerManage.getHandler(name); + if(ObjectUtil.isNotNull(handler)){ + handler.execute(context); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/anno/FlowName.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/anno/FlowName.java new file mode 100644 index 0000000..780ad92 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/anno/FlowName.java @@ -0,0 +1,21 @@ +package com.itheima.sfbx.insurance.urule.anno; + + +import org.springframework.stereotype.Component; + +import java.lang.annotation.*; + +/** + * FlowName + * @author: wgl + * @describe: 流程名称注解 + * @date: 2023/10/30 15:31 + **/ +@Target({ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Component +@Documented +public @interface FlowName { + + String value(); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/FlowNodeAction.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/FlowNodeAction.java new file mode 100644 index 0000000..65209bd --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/FlowNodeAction.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.insurance.urule.worrypay; + + +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; + + +/** + * 流程节点动作接口 + */ +public interface FlowNodeAction { + + + public void execute(FlowContext flowContext); +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/HandlerManage.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/HandlerManage.java new file mode 100644 index 0000000..b8a0915 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/HandlerManage.java @@ -0,0 +1,53 @@ +package com.itheima.sfbx.insurance.urule.worrypay; + +import com.itheima.sfbx.framework.rule.model.flow.FlowAction; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +import java.util.HashMap; +import java.util.Map; + +/** + * HandlerManage + * + * @author: wgl + * @describe: 省心配流程节点管理器 + * @date: 2022/12/28 10:10 + */ +@Component +public class HandlerManage implements ApplicationContextAware { + + //策略Map + private static Map strategyMap = new HashMap<>(); + + + /** + * 策略类初始化 key为自定义注解中的value value为对应的策略类 + * @param applicationContext + * @throws BeansException + */ + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + //获取所有的Handler + Map beans = applicationContext.getBeansOfType(FlowNodeAction.class); + beans.values().forEach(e->{ + FlowName flowName = e.getClass().getAnnotation(FlowName.class); + if(flowName != null){ + //将注解中的value作为key,策略类作为value + strategyMap.put(flowName.value(),e); + } + }); + } + + /** + * 获取Handler的方法 + * @param name + * @return + */ + public static FlowNodeAction getHandler(String name) { + return strategyMap.get(name); + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchEnd.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchEnd.java new file mode 100644 index 0000000..6ec2f23 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchEnd.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import cn.hutool.json.JSONUtil; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.dto.WorryFreeFlowNodeVO; +import com.itheima.sfbx.insurance.pojo.WorryFreeFlowNode; +import com.itheima.sfbx.insurance.service.IWorryFreeFlowNodeService; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import org.redisson.api.RKeys; +import org.redisson.api.RList; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * InsuranceMatchEnd + * + * @author: wgl + * @describe: 产品匹配结束 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_PRODUCT_MATCH_END) +public class InsuranceMatchEnd implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Autowired + private IWorryFreeFlowNodeService worryFreeFlowNodeService; + + @Override + public void execute(FlowContext flowContext) { + + String userId = String.valueOf(flowContext.getVariable("id")); + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + redissonClient.getList(listKey).add(WorryFreeConstant.FLOW_NAME_PRODUCT_MATCH_END); + //将缓存中的数据添加到数据库中并删除缓存 + RList list = redissonClient.getList(listKey); + WorryFreeFlowNodeVO node = WorryFreeFlowNodeVO.builder() + .customerId(Long.valueOf(userId)) + .nodes(JSONUtil.parse(list).toString()) + .dataState(SuperConstant.DATA_STATE_0). + build(); + worryFreeFlowNodeService.save(node); + //清理缓存 + RKeys keys = redissonClient.getKeys(); + keys.deleteByPattern("user_risk_scores:accident:"+userId); + keys.deleteByPattern("user_risk_scores:medical:"+userId); + keys.deleteByPattern("worryfree:"+userId); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchIng.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchIng.java new file mode 100644 index 0000000..6083559 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchIng.java @@ -0,0 +1,213 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.json.JSONUtil; +import com.alibaba.fastjson.JSONObject; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.insure.InsureConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.ProductTypeDTO; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.commons.utils.NoProcessing; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.dto.*; +import com.itheima.sfbx.insurance.pojo.WorryFreeInsuranceMatch; +import com.itheima.sfbx.insurance.service.ICategorySafeguardService; +import com.itheima.sfbx.insurance.service.IInsuranceService; +import com.itheima.sfbx.insurance.service.IWorryFreeInsuranceMatchService; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import com.itheima.sfbx.wenxin.WenXinService; +import lombok.extern.slf4j.Slf4j; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * InsuranceMatchStart + * + * @author: wgl + * @describe: 产品匹配逻辑处理节点 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_PRODUCT_MATCH_ING) +@Slf4j +public class InsuranceMatchIng implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Autowired + private IInsuranceService insuranceService; + + @Autowired + private WenXinService wenXinService; + + @Autowired + private ICategorySafeguardService categorySafeguardService; + + @Autowired + private IWorryFreeInsuranceMatchService worryFreeInsuranceMatchService; + + + //进行产品匹配 + @Override + public void execute(FlowContext flowContext) { + String userId = String.valueOf(flowContext.getVariable("id")); + //查询出系统中所有的保险数据 + InsuranceVO insuranceVO = InsuranceVO.builder(). + dataState(InsureConstant.DATA_STATE_0). + build(); + //需要为当前的用户匹配保险产品 + List insuranceVOS = insuranceService.findList(insuranceVO); + + List safeguardByMedical = categorySafeguardService.findList(CategorySafeguardVO.builder().dataState(SuperConstant.DATA_STATE_0).build()); + Map> safeguardTyepMap = safeguardByMedical.stream().collect(Collectors.groupingBy(e -> e.getCategoryNo())); + + Map> categoryByInsurance = insuranceVOS.stream().collect(Collectors.groupingBy(e -> e.getCategoryNo())); + + //获取配额节点分配的保障项和对应的医疗,意外,身故,重疾的配额 + List safeguardList = (List) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_SAFEGUARD); + + List res = new ArrayList(); + //拿到对应分类的保险 + for (ProductTypeDTO category : WorryFreeConstant.getProductTypeCategoryList()) { + //构建当前产品类目的保险列表--未来需要从这个列表中找到最合适的保险 + List categoryTypeByInsurance = new ArrayList<>(); + List categoryNos = new ArrayList<>(); + for (Long indexId : categoryByInsurance.keySet()) { + //判断是否是医疗分类 + if (NoProcessing.isParent(category.getCategoryNo(), String.valueOf(indexId))) { + //匹配医疗保险 + categoryTypeByInsurance.addAll(categoryByInsurance.get(indexId)); + categoryNos.add(String.valueOf(indexId)); + } + } + //找到分类对应分类下的保障项 + List categorySafeguardVOS = new ArrayList<>(); + for (String indexCategory : categoryNos) { + categorySafeguardVOS.addAll(safeguardTyepMap.get(indexCategory)); + } + + //在对应分类中找到规则引擎匹配的保障项的键 + List medicalKeys = categorySafeguardVOS.stream(). + filter(e -> safeguardList.contains(e.getSafeguardKey())). + map(e -> e.getSafeguardKey()). + collect(Collectors.toList()); + + BigDecimal amount = (BigDecimal) flowContext.getVariable(category.getCategoryKey()); + //根据保额,保障项,找到分类下最合适的保险及其方案 + InsurancePlanTimeDTO bestInsurancePlan = getBestInsurance(categoryTypeByInsurance, medicalKeys, amount, category.getCategoryKey()); + //暂时不添加gpt -- 仅记录保险计划方案 + if(ObjectUtil.isNotNull(bestInsurancePlan)){ + res.add(WorryFreeInsuranceMatch.builder(). + dataState(SuperConstant.DATA_STATE_0). + amount(bestInsurancePlan.getAmount().longValue()). + type(bestInsurancePlan.getType()). + insuranceJson(JSONUtil.parseObj(bestInsurancePlan.getInsuranceVO()).toString()). + insurancePlan(JSONUtil.parseObj(bestInsurancePlan.getInsurancePlanVO()).toString()). + customerId(Long.valueOf(userId)). + price(bestInsurancePlan.getInsurancePlanVO().getPrice()). + insuranceId(String.valueOf(bestInsurancePlan.getInsuranceVO().getId())). + build()); + } + } + //数据入库 + if(CollectionUtil.isNotEmpty(res)){ + worryFreeInsuranceMatchService.saveBatch(res); + } + } + + /** + * 获取最匹配的保险 + * + * @param insurances 当前分类下的保险 + * @param medicalKeys 当前分类下匹配的保障项 + * @param amount 期望的保额 + * @param categoryKey 分类 意外,重疾,医疗 + * @return + */ + private InsurancePlanTimeDTO getBestInsurance(List insurances, List medicalKeys, BigDecimal amount, String categoryKey) { + //开始构建保障项map key为保障项出现次数,value为对应的保险方案 + List timesInsurancePlans = new ArrayList(); + for (InsuranceVO index : insurances) { + List insurancePlanVOs = index.getInsurancePlanVOs(); + for (InsurancePlanVO planVO : insurancePlanVOs) { + int count = 0; + BigDecimal safeguardTotalAmount = BigDecimal.ZERO; + List safeGuardVOS = planVO.getPlanSafeguardVOs().stream().map(PlanSafeguardVO::getSafeguardKey).collect(Collectors.toList()); + for (String indexSafeGuard : safeGuardVOS) { + if (medicalKeys.contains(indexSafeGuard)) { + count++; + } + } + List safeguard = planVO.getPlanSafeguardVOs().stream().map(PlanSafeguardVO::getSafeguardValue).collect(Collectors.toList()); + for (String indexSafeGuard : safeguard) { + //{"val": "1000", "name": "1000元", "score": "1000"} + String val = JSONObject.parseObject(indexSafeGuard, JsonScoreAttribute.class).getVal(); + if (val.contains("-")) { + String[] split = val.split("-"); + val = split[0]; + } + //求和所有的保障项的保障金额 + try { + long valNum = Long.parseLong(val); + safeguardTotalAmount = safeguardTotalAmount.add(BigDecimal.valueOf(valNum)); + }catch (Exception e){ + //由于存在一些时间格式的保障项,暂时忽略 + continue; + } + } + InsurancePlanTimeDTO insurancePlanTimeDTO = new InsurancePlanTimeDTO(); + insurancePlanTimeDTO.setTimes(count); + insurancePlanTimeDTO.setInsuranceVO(index); + insurancePlanTimeDTO.setInsurancePlanVO(planVO); + insurancePlanTimeDTO.setAmount(safeguardTotalAmount); + insurancePlanTimeDTO.setType(categoryKey); + timesInsurancePlans.add(insurancePlanTimeDTO); + } + } + //按照统计次数排序 + timesInsurancePlans.sort(Comparator.comparingInt(e -> e.getTimes())); + InsurancePlanTimeDTO bestMatch = findBestMatch(timesInsurancePlans, amount); + return bestMatch; + } + + /** + * 获取最匹配的保险方案 + * + * @param plans + * @param targetAmount + * @return + */ + public InsurancePlanTimeDTO findBestMatch(List plans, BigDecimal targetAmount) { + //找到最匹配的保险方案 + InsurancePlanTimeDTO bestMatch = null; + //最小差距 + BigDecimal closestAmountDifference = BigDecimal.ZERO; + //最高次数 + Integer highestTimes = BigDecimal.ZERO.intValue(); + + //遍历所有保险方案,找到最匹配的方案 + for (InsurancePlanTimeDTO plan : plans) { + //获取当前保险方案的总保额 + BigDecimal currentAmount = plan.getAmount(); + //期望保额和当前保额的差额 + BigDecimal amountDifference = currentAmount.subtract(targetAmount).abs(); + //找到当前方案和期望保额差距最小的方案 + if (plan.getTimes() >= highestTimes || + (plan.getTimes() == highestTimes && amountDifference.compareTo(closestAmountDifference) < 0)) { + highestTimes = plan.getTimes(); + closestAmountDifference = amountDifference; + bestMatch = plan; + } + } + return bestMatch; + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchStart.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchStart.java new file mode 100644 index 0000000..ac84ab3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/InsuranceMatchStart.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * InsuranceMatchStart + * + * @author: wgl + * @describe: 产品匹配开始 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_PRODUCT_MATCH_START) +public class InsuranceMatchStart implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Override + public void execute(FlowContext flowContext) { + String userId = String.valueOf(flowContext.getVariable("id")); + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + for (String index : WorryFreeConstant.getProductMatchFlowList()) { + redissonClient.getList(listKey).add(index); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisEnd.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisEnd.java new file mode 100644 index 0000000..5ccfe18 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisEnd.java @@ -0,0 +1,80 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.dto.WorryFreeRiskItemVO; +import com.itheima.sfbx.insurance.pojo.Risk; +import com.itheima.sfbx.insurance.pojo.WorryFreeRiskItem; +import com.itheima.sfbx.insurance.service.IRiskService; +import com.itheima.sfbx.insurance.service.IWorryFreeRiskItemService; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import org.redisson.api.RScoredSortedSet; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +/** + * RiskAnalysisEnd + * + * @author: wgl + * @describe: 风险分析结束 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_RISK_END) +public class RiskAnalysisEnd implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Autowired + private IWorryFreeRiskItemService worryFreeRiskItemService; + + @Autowired + private IRiskService riskService; + + @Override + public void execute(FlowContext flowContext) { + String userId = String.valueOf(flowContext.getVariable("id")); + //首先往redis中写入状态--风险分析流程结束 + List worryFreeRiskItems = new ArrayList<>(); + for (String index : WorryFreeConstant.getAllRiskTypeList()) { + //风险项key + String userZSetKey = "user_risk_scores:" + index + ":" + userId; + //获取redis中的风险项 通过 zset分数进行排序 + RScoredSortedSet riskTypeByZset = redissonClient.getScoredSortedSet(userZSetKey); + Collection riskNames = riskTypeByZset.valueRangeReversed(0, 5); + if(CollectionUtil.isNotEmpty(riskNames)){ + //获取风险项名称 + LambdaQueryWrapper riskQueryWrapper = new LambdaQueryWrapper<>(); + riskQueryWrapper.in(Risk::getRiskKey, riskNames); + List riskList = riskService.list(riskQueryWrapper); + //构建风险项记录并添加到mysql中 + worryFreeRiskItems.add(WorryFreeRiskItem.builder(). + customerId(Long.valueOf(userId)). + dataState(SuperConstant.DATA_STATE_0). + names(JSONUtil.parse(riskList.stream().map(Risk::getRiskName).collect(Collectors.toList())).toString()). + type(index). + build()); + } + } + worryFreeRiskItemService.saveBatch(worryFreeRiskItems); + //获取风险项结果,存入mysql中 + //更新流程节点状态为风险分析流程结束 + //从redis中获取风险项结果,存入mysql中 + String endNode = WorryFreeConstant.FLOW_NAME_RISK_END; + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + redissonClient.getList(listKey).add(endNode); + } + +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisStart.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisStart.java new file mode 100644 index 0000000..5fb8244 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/RiskAnalysisStart.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +import java.util.Map; + +/** + * RiskAnalysisStart + * + * @author: wgl + * @describe: 风险分析开始 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_RISK_START) +public class RiskAnalysisStart implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + /** + * 风险分析 + * + * @param flowContext + */ + @Override + public void execute(FlowContext flowContext) { + String userId = String.valueOf(flowContext.getVariable("id")); + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + for (String index : WorryFreeConstant.getRiskFlowList()) { + redissonClient.getList(listKey).add(index); + } + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisEnd.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisEnd.java new file mode 100644 index 0000000..d3797f6 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisEnd.java @@ -0,0 +1,77 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import cn.hutool.core.collection.CollectionUtil; +import cn.hutool.json.JSONUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.dto.WorryFreeSafeguardQuotaVO; +import com.itheima.sfbx.insurance.pojo.Risk; +import com.itheima.sfbx.insurance.pojo.WorryFreeRiskItem; +import com.itheima.sfbx.insurance.service.IRiskService; +import com.itheima.sfbx.insurance.service.IWorryFreeRiskItemService; +import com.itheima.sfbx.insurance.service.IWorryFreeSafeguardQuotaService; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import org.redisson.api.RScoredSortedSet; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; + +/** + * SafeguardAnalysisEnd + * + * @author: wgl + * @describe: 评估保障结束 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_SAFEGUARD_ANALYSIS_END) +public class SafeguardAnalysisEnd implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Autowired + private IRiskService riskService; + + @Autowired + private IWorryFreeSafeguardQuotaService worryFreeSafeguardQuotaService; + + + + @Override + public void execute(FlowContext flowContext) { + //=============================配额记录入库=============================== + String userId = String.valueOf(flowContext.getVariable("id")); + //首先往redis中写入状态--风险分析流程结束 + List worryFreeRiskItems = new ArrayList<>(); + List safeguardList =(List) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_SAFEGUARD); + BigDecimal medicalAmount = (BigDecimal) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_MEDICAL_AMOUNT); + BigDecimal accidentAmount = (BigDecimal) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_ACCIDENT_AMOUNT); + BigDecimal dieAmount = (BigDecimal) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_DIE_AMOUNT); + BigDecimal seriousAmount = (BigDecimal) flowContext.getVariable(WorryFreeConstant.VARIABLE_KEY_SERIOUS_AMOUNT); + WorryFreeSafeguardQuotaVO worryFreeSafeguardQuotaVO = WorryFreeSafeguardQuotaVO.builder(). + safeguards(JSONUtil.parse(safeguardList).toString()). + customerId(Long.valueOf(userId)). + medicalAmount(medicalAmount.longValue()). + accidentAmount(accidentAmount.longValue()). + dieAmount(dieAmount.longValue()). + seriousAmount(seriousAmount.longValue()). + dataState(SuperConstant.DATA_STATE_0). + build(); + worryFreeSafeguardQuotaService.save(worryFreeSafeguardQuotaVO); + //=============================修改进度条状态=============================== + //从redis中获取风险项结果,存入mysql中 + String endNode = WorryFreeConstant.FLOW_NAME_SAFEGUARD_ANALYSIS_END; + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + redissonClient.getList(listKey).add(endNode); + } +} \ No newline at end of file diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisStart.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisStart.java new file mode 100644 index 0000000..9c6212d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/urule/worrypay/handler/SafeguardAnalysisStart.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.insurance.urule.worrypay.handler; + +import com.itheima.sfbx.framework.commons.constant.worryfree.WorryFreeConstant; +import com.itheima.sfbx.framework.rule.model.flow.ins.FlowContext; +import com.itheima.sfbx.insurance.urule.anno.FlowName; +import com.itheima.sfbx.insurance.urule.worrypay.FlowNodeAction; +import lombok.extern.slf4j.Slf4j; +import org.redisson.api.RedissonClient; +import org.springframework.beans.factory.annotation.Autowired; + +/** + * SafeguardAnalysisStart + * + * @author: wgl + * @describe: 评估保障开始 + * @date: 2022/12/28 10:10 + */ +@FlowName(WorryFreeConstant.FLOW_NAME_SAFEGUARD_ANALYSIS_START) +@Slf4j +public class SafeguardAnalysisStart implements FlowNodeAction { + + @Autowired + RedissonClient redissonClient; + + @Override + public void execute(FlowContext flowContext) { + String userId = String.valueOf(flowContext.getVariable("id")); + // redis队列的key + String listKey = WorryFreeConstant.WORRYFREE_PREFIX + userId; + // 往队列中添加数据 + for (String index : WorryFreeConstant.getSafeguardFlowList()) { + redissonClient.getList(listKey).add(index); + } + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/IdentityCardValidator.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/IdentityCardValidator.java new file mode 100644 index 0000000..64b9337 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/IdentityCardValidator.java @@ -0,0 +1,103 @@ +package com.itheima.sfbx.insurance.validator; + +/** + * IdentityCardValidator + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +import com.itheima.sfbx.insurance.validator.anno.IdentityCard; + +import javax.validation.ConstraintValidator; +import javax.validation.ConstraintValidatorContext; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.regex.Pattern; + +public class IdentityCardValidator implements ConstraintValidator { + + @Override + public void initialize(IdentityCard constraintAnnotation) { + } + + @Override + public boolean isValid(String value, ConstraintValidatorContext context) { + if (value == null) { + return true; // 允许为空 + } + int length = value.length(); + if (length != 15 && length != 18) { + return false; // 身份证号位数必须为15位或18位 + } + // 检查年月日是否合法,根据具体需求实现 + if (!isValidDate(value)) { + return false; + } + return true; + } + + /** + * 实现日期验证逻辑,需要根据具体身份证号规范来编写 + */ + private boolean isValidDate(String value) { + if (value.length() == 15) { + // 15位身份证号的年份使用19XX格式 + String year = "19" + value.substring(6, 8); + String month = value.substring(8, 10); + String day = value.substring(10, 12); + + int yearInt = Integer.parseInt(year); + int monthInt = Integer.parseInt(month); + int dayInt = Integer.parseInt(day); + + // 获取当前日期 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + Date currentDate = new Date(); + String currentDateString = sdf.format(currentDate); + int currentYear = Integer.parseInt(currentDateString.substring(0, 4)); + int currentMonth = Integer.parseInt(currentDateString.substring(4, 6)); + int currentDay = Integer.parseInt(currentDateString.substring(6, 8)); + + if (yearInt < 1900 || yearInt > currentYear) { + return false; // 年份不合法 + } + if (yearInt == currentYear && monthInt > currentMonth) { + return false; // 月份不合法 + } + if (yearInt == currentYear && monthInt == currentMonth && dayInt > currentDay) { + return false; // 日期不合法 + } + } else if (value.length() == 18) { + // 18位身份证号的年份使用20XX格式 + String year = value.substring(6, 10); + String month = value.substring(10, 12); + String day = value.substring(12, 14); + + int yearInt = Integer.parseInt(year); + int monthInt = Integer.parseInt(month); + int dayInt = Integer.parseInt(day); + + // 获取当前日期 + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); + Date currentDate = new Date(); + String currentDateString = sdf.format(currentDate); + int currentYear = Integer.parseInt(currentDateString.substring(0, 4)); + int currentMonth = Integer.parseInt(currentDateString.substring(4, 6)); + int currentDay = Integer.parseInt(currentDateString.substring(6, 8)); + + if (yearInt < 1900 || yearInt > currentYear) { + return false; // 年份不合法 + } + if (yearInt == currentYear && monthInt > currentMonth) { + return false; // 月份不合法 + } + if (yearInt == currentYear && monthInt == currentMonth && dayInt > currentDay) { + return false; // 日期不合法 + } + } else { + return false; // 非法位数 + } + return true; // 日期合法 + } +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/anno/IdentityCard.java b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/anno/IdentityCard.java new file mode 100644 index 0000000..07d5a90 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/java/com/itheima/sfbx/insurance/validator/anno/IdentityCard.java @@ -0,0 +1,25 @@ +package com.itheima.sfbx.insurance.validator.anno; + +/** + * IdentityCard + * + * @author: wgl + * @describe: TODO + * @date: 2022/12/28 10:10 + */ +import com.itheima.sfbx.insurance.validator.IdentityCardValidator; + +import javax.validation.Constraint; +import javax.validation.Payload; +import java.lang.annotation.*; + +@Target({ElementType.FIELD}) +@Retention(RetentionPolicy.RUNTIME) +@Constraint(validatedBy = IdentityCardValidator.class) +@Documented +public @interface IdentityCard { + String message() default "错误的身份证号类型"; + Class[] groups() default {}; + Class[] payload() default {}; +} + diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/banner.txt b/day02/sfbx-insurance/insurance-service/src/main/resources/banner.txt new file mode 100644 index 0000000..a8ff8c3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 传智教育---献给可爱的传智人 :: diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/generrator.properties b/day02/sfbx-insurance/insurance-service/src/main/resources/generrator.properties new file mode 100644 index 0000000..0eba47e --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/generrator.properties @@ -0,0 +1,45 @@ +#\u6570\u636E\u5E93\u5730\u5740 +url=jdbc:mysql://192.168.12.129:3306/sfbx-insurance?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&tinyInt1isBit=false +#\u6570\u636E\u5E93\u8D26\u53F7 +userName=root +#\u6570\u636E\u5E93\u5BC6\u7801 +password=pass +#services\u7684src\u8DEF\u5F84 +serviceProjectPath=D:/sfbx-cloud/sfbx-insurance/insurance-service +#VO\u7684src\u8DEF\u5F84 +dtoOProjectPath=D:/sfbx-cloud/sfbx-insurance/insurance-service +#\u4F5C\u8005 +author=Admin +#\u5305\u540D\u79F0 +parent=com.itheima.sfbx +#\u6A21\u5757\u540D\u79F0 +moduleName=insurance +#\u6570\u636E\u5E93\u8868\u524D\u7F00 +tablePrefix =tab_ +#\u9700\u8981\u751F\u6210\u7684\u8868\u540D\uFF0C\u4F7F\u7528\uFF0C\u5206\u5272 +#tableName=tab_browsing_history,tab_category,tab_category_claim,tab_category_coefficent,tab_category_condition,tab_category_safeguard,tab_claim,tab_coefficent,tab_combination,tab_combination_insurance,tab_condition,tab_customer_card,tab_customer_info,tab_customer_relation,tab_health_assessment,tab_insurance,tab_insurance,tab_insurance_coefficent,tab_insurance_condition,tab_insurance_plan,tab_insurance_rule,tab_insurance_top,tab_plan_safeguard,tab_risk_analysis,tab_safeguard,tab_search_record,tab_self_selection,tab_warranty,tab_warranty_order,tab_warranty_renewal,tab_warranty_verify +tableName=tab_warranty_earnings_order +#\u9700\u8981\u751F\u6210\u9644\u4EF6\u76F8\u5173\u7684\u8868 +#tablesFile =tab_category,tab_combination,tab_customer_card,tab_customer_info,tab_customer_relation,tab_insurance +tablesFile = +#pojo\u7684\u7236\u7C7B +SuperEntityClass = com.itheima.sfbx.framework.mybatisplus.basic.BasePojo +#pojo\u7684\u901A\u7528\u5B57\u6BB5 +superEntityColumns = id,create_time,update_time,create_by,update_by,data_state +#\u751F\u6210\u89C4\u5219 +constant=true +constant.ftl.path=/templates/constant.java +enums=true +enums.ftl.path=/templates/enums.java +dto=true +dto.ftl.path=/templates/dto.java +entity=true +entity.ftl.path=/templates/entity.java +mapper=true +mapper.ftl.path=/templates/mapper.java +service=true +service.ftl.path=/templates/service.java +serviceImpl=true +serviceImpl.ftl.path=/templates/serviceImpl.java +controller=true +controller.ftl.path=/templates/controller.java diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/constant.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/constant.java.ftl new file mode 100644 index 0000000..7931cd3 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/constant.java.ftl @@ -0,0 +1,26 @@ +package com.itheima.sfbx.insurance.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:${table.comment!}缓存常量 +*/ +public class ${entity}CacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "${controllerMappingHyphen}:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/controller.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/controller.java.ftl new file mode 100644 index 0000000..7a4b68d --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/controller.java.ftl @@ -0,0 +1,133 @@ +package ${package.Controller}; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.insurance.enums.${entity}Enum; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.itheima.sfbx.insurance.service.I${entity}Service; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +<#if restControllerStyle> +import org.springframework.web.bind.annotation.RestController; +<#else> +import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> +import ${superControllerClassPackage}; + + +/** + * @Description:${table.comment!}响应接口 + */ +@Slf4j +@Api(tags = "${table.comment!}") +<#if restControllerStyle> +@RestController +<#else> +@Controller + +@RequestMapping("<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> +class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> +<#if superControllerClass??> +public class ${table.controllerName} extends ${superControllerClass} { +<#else> +public class ${table.controllerName} { + + + @Autowired + I${entity}Service ${entity?uncap_first}Service; + + /*** + * @description 多条件查询${table.comment!}分页 + * @param ${entity?uncap_first}VO ${table.comment!}VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page<${entity}VO> + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "${table.comment!}分页",notes = "${table.comment!}分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult> find${entity}VOPage( + @RequestBody ${entity}VO ${entity?uncap_first}VO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page<${entity}VO> ${entity?uncap_first}VOPage = ${entity?uncap_first}Service.findPage(${entity?uncap_first}VO, pageNum, pageSize); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOPage); + } + + /** + * @Description 保存${table.comment!} + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return ${entity}VO + */ + @PutMapping + @ApiOperation(value = "保存${entity}",notes = "添加${entity}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.dataState",<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult<${entity}VO> create${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + ${entity}VO ${entity?uncap_first}VOResult = ${entity?uncap_first}Service.save(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOResult); + } + + /** + * @Description 修改${table.comment!} + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改${table.comment!}",notes = "修改${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.id","${entity?uncap_first}VO.dataState",<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult update${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + Boolean flag = ${entity?uncap_first}Service.update(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除${table.comment!} + * @param ${entity?uncap_first}VO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除${table.comment!}",notes = "删除${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.checkedIds"}) + public ResponseResult delete${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + Boolean flag = ${entity?uncap_first}Service.delete(${entity?uncap_first}VO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return List<${entity}VO> + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询${table.comment!}列表",notes = "多条件查询${table.comment!}列表") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult> ${entity?uncap_first}List(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + List<${entity}VO> ${entity?uncap_first}VOList = ${entity?uncap_first}Service.findList(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOList); + } + +} + diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/dto.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/dto.java.ftl new file mode 100644 index 0000000..d915e2b --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/dto.java.ftl @@ -0,0 +1,92 @@ +package com.itheima.sfbx.insurance.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +public class ${entity}VO extends BaseVO { + + @Builder + public ${entity}VO(Long id,String dataState,<#list cfg.tablesFile as tableFiile><#if tableFiile==table.name>List fileVOs,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id, dataState); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + <#list cfg.tablesFile as tableFiile><#if tableFiile==table.name> + this.fileVOs=fileVOs; + + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.propertyType=='Long'> + @JsonFormat(shape = JsonFormat.Shape.STRING) + + <#if field.propertyType=='Date'> + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + <#if swagger2> + @ApiModelProperty(value = "文件VO对象") + + private List fileVOs; + + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/entity.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/entity.java.ftl new file mode 100644 index 0000000..a1f860a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> +import ${pkg}; + +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +<#if superEntityClass??> +@EqualsAndHashCode(callSuper = true) + <#else> +@EqualsAndHashCode(callSuper = false) + + +<#if table.convert> +@TableName("${table.name}") + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> +public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> +public class ${entity} extends Model<${entity}> { +<#else> +public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + + + @Builder + public ${entity}(Long id,String dataState,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id, dataState); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.name}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.name}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.name}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.name}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.name}") + + <#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + + <#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if entityBuilderModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if entityBuilderModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/enums.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/enums.java.ftl new file mode 100644 index 0000000..8407ac9 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/enums.java.ftl @@ -0,0 +1,37 @@ +package com.itheima.sfbx.insurance.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName ${entity}Enum.java +* @Description ${table.comment!}枚举 +*/ + +public enum ${entity}Enum implements IBaseEnum { + + PAGE_FAIL(53001, "查询${table.comment!}分页失败"), + LIST_FAIL(53002, "查询${table.comment!}列表失败"), + FIND_ONE_FAIL(53003, "查询${table.comment!}对象失败"), + SAVE_FAIL(53004, "保存${table.comment!}失败"), + UPDATE_FAIL(53005, "修改${table.comment!}失败"), + DEL_FAIL(53006, "删除${table.comment!}失败") + ; + + private Integer code; + + private String msg; + + ${entity}Enum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.java.ftl new file mode 100644 index 0000000..71b3a31 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.java.ftl @@ -0,0 +1,17 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:${table.comment!}Mapper接口 + */ +<#if kotlin> +interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> +@Mapper +public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + +} + diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.xml.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..d9ca71c --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + +<#if enableCache> + + + + +<#if baseResultMap> + + +<#list table.fields as field> +<#if field.keyFlag><#--生成主键排在第一位--> + + + +<#list table.commonFields as field><#--生成公共字段 --> + + +<#list table.fields as field> +<#if !field.keyFlag><#--生成普通字段 --> + + + + + + +<#if baseColumnList> + + +<#list table.commonFields as field> + ${field.name}, + + ${table.fieldNames} + + + + diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/service.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/service.java.ftl new file mode 100644 index 0000000..d3fae6a --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/service.java.ftl @@ -0,0 +1,62 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:${table.comment!}服务类 + */ +<#if kotlin> +interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> +public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + + /** + * @Description 多条件查询${table.comment!}分页 + * @param ${entity?uncap_first}VO ${table.comment!}查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page<${entity}VO> + */ + Page<${entity}VO> findPage(${entity}VO ${entity?uncap_first}VO, int pageNum, int pageSize); + + /** + * @Description 多条件查询${table.comment!} + * @param ${entity?uncap_first}Id 合同信息ID + * @return ${entity}VO + */ + ${entity}VO findById(String ${entity?uncap_first}Id); + + /** + * @Description ${table.comment!}新增 + * @param ${entity?uncap_first}VO ${table.comment!}查询条件 + * @return ${entity}VO + */ + ${entity}VO save(${entity}VO ${entity?uncap_first}VO); + + /** + * @Description ${table.comment!}修改 + * @param ${entity?uncap_first}VO ${table.comment!}对象 + * @return ${entity}VO + */ + Boolean update(${entity}VO ${entity?uncap_first}VO); + + /** + * @Description ${table.comment!}删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}VO 查询条件 + * @return: List<${entity}VO> + */ + List<${entity}VO> findList(${entity}VO ${entity?uncap_first}VO); +} + diff --git a/day02/sfbx-insurance/insurance-service/src/main/resources/templates/serviceImpl.java.ftl b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..e8bea25 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/main/resources/templates/serviceImpl.java.ftl @@ -0,0 +1,294 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.seata.spring.annotation.GlobalTransactional; + + +import com.itheima.sfbx.insurance.constant.${entity}CacheConstant; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.itheima.sfbx.insurance.enums.${entity}Enum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:${table.comment!}服务实现类 + */ +@Slf4j +@Service +<#if kotlin> +open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + +} +<#else> +public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @Autowired + FileBusinessFeign fileBusinessFeign; + + + + /*** + * @description ${table.comment!}多条件组合 + * @param ${entity?uncap_first}VO ${table.comment!} + * @return QueryWrapper查询条件 + */ + private QueryWrapper<${entity}> queryWrapper(${entity}VO ${entity?uncap_first}VO){ + QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>(); + <#list table.fields as field> + //${field.comment}查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.get${field.propertyName?cap_first}())) { + queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}VO.get${field.propertyName?cap_first}()); + } + + //状态查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.getDataState())) { + queryWrapper.lambda().eq(${entity}::getDataState,${entity?uncap_first}VO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(${entity}::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = ${entity}CacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#${entity?uncap_first}VO.hashCode()") + public Page<${entity}VO> findPage(${entity}VO ${entity?uncap_first}VO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page<${entity}> ${entity}Page = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = queryWrapper(${entity?uncap_first}VO); + //执行分页查询 + Page<${entity}VO> ${entity?uncap_first}VOPage = BeanConv.toPage( + page(${entity}Page, queryWrapper), ${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOPage)&& + !EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOPage.getRecords())){ + //获得所有业务主键ID + List ${entity?uncap_first}Ids = ${entity?uncap_first}VOPage.getRecords() + .stream().map(${entity}VO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(${entity?uncap_first}Ids)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + ${entity?uncap_first}VOPage.getRecords().forEach(${entity?uncap_first}VOHandler->{ + fileVOs.forEach(fileVO -> { + if (${entity?uncap_first}VOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + ${entity?uncap_first}VOHandler.setFileVOs(fileVOsHandler); + }); + } + + + //返回结果 + return ${entity?uncap_first}VOPage; + }catch (Exception e){ + log.error("${table.comment!}分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = ${entity}CacheConstant.BASIC,key ="#${entity?uncap_first}Id") + public ${entity}VO findById(String ${entity?uncap_first}Id) { + try { + //执行查询 + return BeanConv.toBean(getById(${entity?uncap_first}Id),${entity}VO.class); + }catch (Exception e){ + log.error("${table.comment!}单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.FIND_ONE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =${entity}CacheConstant.BASIC,key = "#result.id")}) + public ${entity}VO save(${entity}VO ${entity?uncap_first}VO) { + try { + //转换${entity}VO为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}VO, ${entity}.class); + boolean flag = save(${entity?uncap_first}); + if (!flag){ + throw new RuntimeException("保存${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //保存附件信息 + if (EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.getFileVOs())){ + throw new RuntimeException("合同附件为空"); + } + //构建附件对象 + ${entity?uncap_first}VO.getFileVOs().forEach(fileVO -> { + fileVO.setBusinessId(${entity?uncap_first}.getId()); + }); + //调用附件接口 + List fileVOs = fileBusinessFeign.bindBatchFile(Lists.newArrayList(${entity?uncap_first}VO.getFileVOs())); + if (EmptyUtil.isNullOrEmpty(fileVOs)){ + throw new RuntimeException("合同附件绑定失败"); + } + + + //转换返回对象${entity}VO + ${entity}VO ${entity?uncap_first}VOHandler = BeanConv.toBean(${entity?uncap_first}, ${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + ${entity?uncap_first}VOHandler.setFileVOs(fileVOs); + + + return ${entity?uncap_first}VOHandler; + }catch (Exception e){ + log.error("保存${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.SAVE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.BASIC,key = "#${entity?uncap_first}VO.id")}) + public Boolean update(${entity}VO ${entity?uncap_first}VO) { + try { + //转换${entity}VO为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}VO, ${entity}.class); + boolean flag = updateById(${entity?uncap_first}); + if (!flag){ + throw new RuntimeException("修改${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //替换附件信息 + flag = fileBusinessFeign.replaceBindBatchFile(Lists.newArrayList(${entity?uncap_first}VO.getFileVOs())); + if (!flag){ + throw new RuntimeException("移除${table.comment!}附件失败"); + } + + + return flag; + }catch (Exception e){ + log.error("修改${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.UPDATE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag){ + throw new RuntimeException("删除${table.comment!}附件失败"); + } + + + return flag; + }catch (Exception e){ + log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = ${entity}CacheConstant.LIST,key ="#${entity?uncap_first}VO.hashCode()") + public List<${entity}VO> findList(${entity}VO ${entity?uncap_first}VO) { + try { + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = queryWrapper(${entity?uncap_first}VO); + //执行列表查询 + List<${entity}VO> ${entity?uncap_first}VOs = BeanConv.toBeanList(list(queryWrapper),${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOs)){ + //获得所有业务主键ID + List ${entity?uncap_first}Ids = ${entity?uncap_first}VOs.stream().map(${entity}VO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(${entity?uncap_first}Ids)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + ${entity?uncap_first}VOs.forEach(${entity?uncap_first}VOHandler->{ + fileVOs.forEach(fileVO -> { + if (${entity?uncap_first}VOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + ${entity?uncap_first}VOHandler.setFileVOs(fileVOsHandler); + }); + } + + + return ${entity?uncap_first}VOs; + }catch (Exception e){ + log.error("${table.comment!}列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.LIST_FAIL); + } + } +} + diff --git a/day02/sfbx-insurance/insurance-service/src/test/java/com/itheima/sfbx/insurance/InsuranceGenerator.java b/day02/sfbx-insurance/insurance-service/src/test/java/com/itheima/sfbx/insurance/InsuranceGenerator.java new file mode 100644 index 0000000..3c95d79 --- /dev/null +++ b/day02/sfbx-insurance/insurance-service/src/test/java/com/itheima/sfbx/insurance/InsuranceGenerator.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.insurance; + + +import com.itheima.sfbx.framework.mybatisplus.generator.CodeGenerator; +import org.junit.Test; + +/** + * @Description:代码生成器 + */ +public class InsuranceGenerator { + + @Test + public void test(){ + CodeGenerator.autoGenerator(); + } +} diff --git a/day02/sfbx-insurance/pom.xml b/day02/sfbx-insurance/pom.xml new file mode 100644 index 0000000..55ac468 --- /dev/null +++ b/day02/sfbx-insurance/pom.xml @@ -0,0 +1,26 @@ + + + 4.0.0 + + + insurance-mgt + + insurance-service + + insurance-app + insurance-interface + + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-insurance + sfbx-insurance + pom + + http://www.example.com + + diff --git a/day02/sfbx-points/points-interface/pom.xml b/day02/sfbx-points/points-interface/pom.xml new file mode 100644 index 0000000..39f8588 --- /dev/null +++ b/day02/sfbx-points/points-interface/pom.xml @@ -0,0 +1,24 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-points + 2.0-SNAPSHOT + + + points-interface + points-interface + + http://www.example.com + + + + com.itheima.sfbx + framework-feign + + + + diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/config/LogBusinessFeignConfig.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/config/LogBusinessFeignConfig.java new file mode 100644 index 0000000..0082190 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/config/LogBusinessFeignConfig.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.config; + +import org.springframework.cloud.openfeign.EnableFeignClients; +import org.springframework.context.annotation.Configuration; + +/** + * @ClassName DictFenginConfig.java + * @Description feign的最优化配置 + */ +@EnableFeignClients(basePackages = "com.itheima.sfbx.points.feign") +@Configuration +public class LogBusinessFeignConfig { +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeign.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeign.java new file mode 100644 index 0000000..9069bb4 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeign.java @@ -0,0 +1,25 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.points.hystrix.BusinessLogHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * @ClassName BusinessLogFeign.java + * @Description 业务统计 + */ +@FeignClient(value = "points-web",fallback = BusinessLogHystrix.class) +public interface BusinessLogFeign { + + + /** + * 持久化日志信息 + * @param logBusinessVO 日志对象 + * @return 是否执行成功 + */ + @PostMapping("business-log-feign/create-business-log") + public Boolean createBusinessLog(@RequestBody LogBusinessVO logBusinessVO); + +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeign.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeign.java new file mode 100644 index 0000000..da45362 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeign.java @@ -0,0 +1,72 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.hystrix.BusinessLogHystrix; +import com.itheima.sfbx.points.hystrix.BusinessReportHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * @ClassName BusinessReportFeign.java + * @Description 业务统计 + */ +@FeignClient(value = "points-web",fallback = BusinessReportHystrix.class) +public interface BusinessReportFeign { + + /** + * 日投保访页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-dpv-job/{reportTime}") + Boolean doInsureDpvJob(@PathVariable("reportTime") String reportTime); + + /** + * 日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-duv-job/{reportTime}") + Boolean doInsureDuvJob(@PathVariable("reportTime") String reportTime); + + /** + * 日保险分类访问页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/category-dpv-job/{reportTime}") + Boolean categoryDpvJob(@PathVariable("reportTime") String reportTime); + + /** + * 性别日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-gender-duv-job/{reportTime}") + Boolean doInsureGenderDuvJob(@PathVariable("reportTime") String reportTime); + + /** + * 城市日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-city-duv-job/{reportTime}") + Boolean doInsureCityDuvJob(@PathVariable("reportTime") String reportTime); + + /** + * 投保转换率 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-conversion-dpv-job/{reportTime}") + Boolean doInsureConversionDpvJob(@PathVariable("reportTime") String reportTime); + + /** + * 日投保访问失败页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("business-report-feign/do-insure-fail-dpv-job/{reportTime}") + Boolean doInsureFailDpvJob(@PathVariable("reportTime") String reportTime); + +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeign.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeign.java new file mode 100644 index 0000000..cf3e1ed --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeign.java @@ -0,0 +1,72 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.hystrix.CustomerReportHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * @ClassName CustomerReportFeign.java + * @Description 用户统计 + */ +@FeignClient(value = "points-web",fallback = CustomerReportHystrix.class) +public interface CustomerReportFeign { + + + /** + * 日新增用户数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dnu-job/{reportTime}") + Boolean dnuJob(@PathVariable("reportTime") String reportTime); + + + /** + * 日新增注册用户归属城市 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dnu-city-job/{reportTime}") + Boolean dnuCityJob(@PathVariable("reportTime") String reportTime); + + /** + * 用户日活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dau-job/{reportTime}") + Boolean dauJob(@PathVariable("reportTime") String reportTime); + + /** + * 用户每时活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dau-time-job/{reportTime}") + Boolean dauTimeJob(@PathVariable("reportTime") String reportTime); + + /** + * 日访问量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dpv-job/{reportTime}") + Boolean dpvJob(@PathVariable("reportTime") String reportTime); + + /** + * 日用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/duv-job/{reportTime}") + Boolean duvJob(@PathVariable("reportTime") String reportTime); + + /** + * 用户日活跃数范围 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("customer-report-feign/dau-range-job/{reportTime}") + Boolean dauRangeJob(@PathVariable("reportTime") String reportTime); +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeign.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeign.java new file mode 100644 index 0000000..0def32c --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeign.java @@ -0,0 +1,32 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.hystrix.SaleReportFeignHystrix; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; + +/** + * @ClassName SaleReportFeign.java + * @Description 销售统计 + */ +@FeignClient(value = "points-web",fallback = SaleReportFeignHystrix.class) +public interface SaleReportFeign { + + + /** + * 日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("sale-report-feign/do-insure-details-day-job/{reportTime}") + public Boolean doInsureDetailsDayJob(@PathVariable("reportTime") String reportTime); + + /** + * 日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("sale-report-feign/doInsure-category-job/{reportTime}") + public Boolean doInsureCategoryJob(@PathVariable("reportTime") String reportTime); + +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessLogHystrix.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessLogHystrix.java new file mode 100644 index 0000000..64ba942 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessLogHystrix.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.hystrix; + +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.points.feign.BusinessLogFeign; + +/** + * @ClassName BusinessLogHystrix.java + * @Description TODO + */ +public class BusinessLogHystrix implements BusinessLogFeign { + + @Override + public Boolean createBusinessLog(LogBusinessVO logBusinessVO) { + return null; + } +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessReportHystrix.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessReportHystrix.java new file mode 100644 index 0000000..1ee4921 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/BusinessReportHystrix.java @@ -0,0 +1,46 @@ +package com.itheima.sfbx.points.hystrix; + +import com.itheima.sfbx.points.feign.BusinessReportFeign; + +/** + * @ClassName BusinessLogHystrix.java + * @Description TODO + */ +public class BusinessReportHystrix implements BusinessReportFeign { + + + @Override + public Boolean doInsureDpvJob(String reportTime) { + return null; + } + + @Override + public Boolean doInsureDuvJob(String reportTime) { + return null; + } + + @Override + public Boolean categoryDpvJob(String reportTime) { + return null; + } + + @Override + public Boolean doInsureGenderDuvJob(String reportTime) { + return null; + } + + @Override + public Boolean doInsureCityDuvJob(String reportTime) { + return null; + } + + @Override + public Boolean doInsureConversionDpvJob(String reportTime) { + return null; + } + + @Override + public Boolean doInsureFailDpvJob(String reportTime) { + return null; + } +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/CustomerReportHystrix.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/CustomerReportHystrix.java new file mode 100644 index 0000000..3c855af --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/CustomerReportHystrix.java @@ -0,0 +1,45 @@ +package com.itheima.sfbx.points.hystrix; + +import com.itheima.sfbx.points.feign.CustomerReportFeign; + +/** + * @ClassName CustomerReportHystrix.java + * @Description TODO + */ +public class CustomerReportHystrix implements CustomerReportFeign { + + @Override + public Boolean dnuJob(String reportTime) { + return null; + } + + @Override + public Boolean dnuCityJob(String reportTime) { + return null; + } + + @Override + public Boolean dauJob(String reportTime) { + return null; + } + + @Override + public Boolean dauTimeJob(String reportTime) { + return null; + } + + @Override + public Boolean dpvJob(String reportTime) { + return null; + } + + @Override + public Boolean duvJob(String reportTime) { + return null; + } + + @Override + public Boolean dauRangeJob(String reportTime) { + return null; + } +} diff --git a/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/SaleReportFeignHystrix.java b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/SaleReportFeignHystrix.java new file mode 100644 index 0000000..1c28726 --- /dev/null +++ b/day02/sfbx-points/points-interface/src/main/java/com/itheima/sfbx/points/hystrix/SaleReportFeignHystrix.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.hystrix; + +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.points.feign.BusinessLogFeign; + +/** + * @ClassName SaleReportFeignHystrix.java + * @Description TODO + */ +public class SaleReportFeignHystrix implements BusinessLogFeign { + + + @Override + public Boolean createBusinessLog(LogBusinessVO logBusinessVO) { + return null; + } +} diff --git a/day02/sfbx-points/points-web/pom.xml b/day02/sfbx-points/points-web/pom.xml new file mode 100644 index 0000000..170a47c --- /dev/null +++ b/day02/sfbx-points/points-web/pom.xml @@ -0,0 +1,110 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-points + 2.0-SNAPSHOT + + points-web + 2.0-SNAPSHOT + + points-web + + http://www.example.com + + + + org.springframework.boot + spring-boot-starter-test + test + + + junit + junit + test + + + org.springframework.cloud + spring-cloud-starter-bootstrap + + + + com.itheima.sfbx + framework-mybatis-plus + + + + com.itheima.sfbx + framework-task-executor + + + + com.itheima.sfbx + framework-redis + + + + com.itheima.sfbx + framework-seata + + + + com.itheima.sfbx + framework-web + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + org.springframework.cloud + spring-cloud-starter-loadbalancer + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + com.itheima.sfbx + framework-knife4j-web + + + + com.itheima.sfbx + framework-influxdb + + + + com.itheima.sfbx + insurance-interface + + + + com.squareup.okhttp3 + okhttp + + + + points-web + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/PointsWebStart.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/PointsWebStart.java new file mode 100644 index 0000000..5db6e91 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/PointsWebStart.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 数据采集埋点启动类(当前端登录、查看产品等时需要采集数据的话需要启动) + */ +@SpringBootApplication(scanBasePackages = {"com.itheima.sfbx","com.itheima.sfbx.points.mapper"}) +public class PointsWebStart { + + public static void main(String[] args) { + + SpringApplication.run(PointsWebStart.class, args); + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/CategoryDpvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/CategoryDpvCacheConstant.java new file mode 100644 index 0000000..0cd1802 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/CategoryDpvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日保险分类访问页面量缓存常量 +*/ +public class CategoryDpvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "category-dpv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauCacheConstant.java new file mode 100644 index 0000000..e61d598 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:用户日活跃数缓存常量 +*/ +public class DauCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dau:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauRangeCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauRangeCacheConstant.java new file mode 100644 index 0000000..e8b524d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauRangeCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:用户日活跃数范围缓存常量 +*/ +public class DauRangeCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dau-range:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauTimeCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauTimeCacheConstant.java new file mode 100644 index 0000000..858e945 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DauTimeCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:用户活跃数时段缓存常量 +*/ +public class DauTimeCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dau-time:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCacheConstant.java new file mode 100644 index 0000000..ee0546e --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日新增用户数缓存常量 +*/ +public class DnuCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dnu:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCityCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCityCacheConstant.java new file mode 100644 index 0000000..a487b8d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DnuCityCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:新增用户所属城市缓存常量 +*/ +public class DnuCityCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dnu-city:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCategoryCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCategoryCacheConstant.java new file mode 100644 index 0000000..2478b8c --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCategoryCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日投保分类明细缓存常量 +*/ +public class DoInsureCategoryCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-category:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCityDuvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCityDuvCacheConstant.java new file mode 100644 index 0000000..f8fd8f0 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureCityDuvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:城市日投保用户访问数缓存常量 +*/ +public class DoInsureCityDuvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-city-duv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureConversionDpvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureConversionDpvCacheConstant.java new file mode 100644 index 0000000..1f4f231 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureConversionDpvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:投保转换率缓存常量 +*/ +public class DoInsureConversionDpvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-conversion-dpv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDetailDayCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDetailDayCacheConstant.java new file mode 100644 index 0000000..c8725c0 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDetailDayCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日投保明细缓存常量 +*/ +public class DoInsureDetailDayCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-detail-day:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDpvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDpvCacheConstant.java new file mode 100644 index 0000000..74181a3 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDpvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日投保访问页面量缓存常量 +*/ +public class DoInsureDpvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-dpv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDuvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDuvCacheConstant.java new file mode 100644 index 0000000..87ff5b6 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureDuvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日投保用户访问数缓存常量 +*/ +public class DoInsureDuvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-duv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureFailDpvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureFailDpvCacheConstant.java new file mode 100644 index 0000000..1bd81f8 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureFailDpvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日投保访问失败页面量缓存常量 +*/ +public class DoInsureFailDpvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-fail-dpv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureGenderDuvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureGenderDuvCacheConstant.java new file mode 100644 index 0000000..04e7b8e --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DoInsureGenderDuvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:性别日投保用户访问数缓存常量 +*/ +public class DoInsureGenderDuvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "do-insure-gender-duv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DpvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DpvCacheConstant.java new file mode 100644 index 0000000..e3ae6e7 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DpvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日访问页面量缓存常量 +*/ +public class DpvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "dpv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DuvCacheConstant.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DuvCacheConstant.java new file mode 100644 index 0000000..fde5968 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/constant/DuvCacheConstant.java @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:日唯一访问量缓存常量 +*/ +public class DuvCacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "duv:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/CategoryDpvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/CategoryDpvEnum.java new file mode 100644 index 0000000..cf2679d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/CategoryDpvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName CategoryDpvEnum.java +* @Description 日保险分类访问页面量枚举 +*/ + +public enum CategoryDpvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日保险分类访问页面量分页失败"), + LIST_FAIL(53002, "查询日保险分类访问页面量列表失败"), + FIND_ONE_FAIL(53003, "查询日保险分类访问页面量对象失败"), + SAVE_FAIL(53004, "保存日保险分类访问页面量失败"), + UPDATE_FAIL(53005, "修改日保险分类访问页面量失败"), + DEL_FAIL(53006, "删除日保险分类访问页面量失败") + ; + + private Integer code; + + private String msg; + + CategoryDpvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauEnum.java new file mode 100644 index 0000000..552d233 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DauEnum.java +* @Description 用户日活跃数枚举 +*/ + +public enum DauEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询用户日活跃数分页失败"), + LIST_FAIL(53002, "查询用户日活跃数列表失败"), + FIND_ONE_FAIL(53003, "查询用户日活跃数对象失败"), + SAVE_FAIL(53004, "保存用户日活跃数失败"), + UPDATE_FAIL(53005, "修改用户日活跃数失败"), + DEL_FAIL(53006, "删除用户日活跃数失败") + ; + + private Integer code; + + private String msg; + + DauEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauRangeEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauRangeEnum.java new file mode 100644 index 0000000..d27870d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauRangeEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DauRangeEnum.java +* @Description 用户日活跃数范围枚举 +*/ + +public enum DauRangeEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询用户日活跃数范围分页失败"), + LIST_FAIL(53002, "查询用户日活跃数范围列表失败"), + FIND_ONE_FAIL(53003, "查询用户日活跃数范围对象失败"), + SAVE_FAIL(53004, "保存用户日活跃数范围失败"), + UPDATE_FAIL(53005, "修改用户日活跃数范围失败"), + DEL_FAIL(53006, "删除用户日活跃数范围失败") + ; + + private Integer code; + + private String msg; + + DauRangeEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauTimeEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauTimeEnum.java new file mode 100644 index 0000000..ff53da4 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DauTimeEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DauTimeEnum.java +* @Description 用户活跃数时段枚举 +*/ + +public enum DauTimeEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询用户活跃数时段分页失败"), + LIST_FAIL(53002, "查询用户活跃数时段列表失败"), + FIND_ONE_FAIL(53003, "查询用户活跃数时段对象失败"), + SAVE_FAIL(53004, "保存用户活跃数时段失败"), + UPDATE_FAIL(53005, "修改用户活跃数时段失败"), + DEL_FAIL(53006, "删除用户活跃数时段失败") + ; + + private Integer code; + + private String msg; + + DauTimeEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuCityEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuCityEnum.java new file mode 100644 index 0000000..a0908e4 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuCityEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DnuCityEnum.java +* @Description 新增用户所属城市枚举 +*/ + +public enum DnuCityEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询新增用户所属城市分页失败"), + LIST_FAIL(53002, "查询新增用户所属城市列表失败"), + FIND_ONE_FAIL(53003, "查询新增用户所属城市对象失败"), + SAVE_FAIL(53004, "保存新增用户所属城市失败"), + UPDATE_FAIL(53005, "修改新增用户所属城市失败"), + DEL_FAIL(53006, "删除新增用户所属城市失败") + ; + + private Integer code; + + private String msg; + + DnuCityEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuEnum.java new file mode 100644 index 0000000..fd07a2f --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DnuEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DnuEnum.java +* @Description 日新增用户数枚举 +*/ + +public enum DnuEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日新增用户数分页失败"), + LIST_FAIL(53002, "查询日新增用户数列表失败"), + FIND_ONE_FAIL(53003, "查询日新增用户数对象失败"), + SAVE_FAIL(53004, "保存日新增用户数失败"), + UPDATE_FAIL(53005, "修改日新增用户数失败"), + DEL_FAIL(53006, "删除日新增用户数失败") + ; + + private Integer code; + + private String msg; + + DnuEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCategoryEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCategoryEnum.java new file mode 100644 index 0000000..2d87915 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCategoryEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureCategoryEnum.java +* @Description 日投保分类明细枚举 +*/ + +public enum DoInsureCategoryEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日投保分类明细分页失败"), + LIST_FAIL(53002, "查询日投保分类明细列表失败"), + FIND_ONE_FAIL(53003, "查询日投保分类明细对象失败"), + SAVE_FAIL(53004, "保存日投保分类明细失败"), + UPDATE_FAIL(53005, "修改日投保分类明细失败"), + DEL_FAIL(53006, "删除日投保分类明细失败") + ; + + private Integer code; + + private String msg; + + DoInsureCategoryEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCityDuvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCityDuvEnum.java new file mode 100644 index 0000000..81b28b5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureCityDuvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureCityDuvEnum.java +* @Description 城市日投保用户访问数枚举 +*/ + +public enum DoInsureCityDuvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询城市日投保用户访问数分页失败"), + LIST_FAIL(53002, "查询城市日投保用户访问数列表失败"), + FIND_ONE_FAIL(53003, "查询城市日投保用户访问数对象失败"), + SAVE_FAIL(53004, "保存城市日投保用户访问数失败"), + UPDATE_FAIL(53005, "修改城市日投保用户访问数失败"), + DEL_FAIL(53006, "删除城市日投保用户访问数失败") + ; + + private Integer code; + + private String msg; + + DoInsureCityDuvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureConversionDpvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureConversionDpvEnum.java new file mode 100644 index 0000000..48a28be --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureConversionDpvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureConversionDpvEnum.java +* @Description 投保转换率枚举 +*/ + +public enum DoInsureConversionDpvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询投保转换率分页失败"), + LIST_FAIL(53002, "查询投保转换率列表失败"), + FIND_ONE_FAIL(53003, "查询投保转换率对象失败"), + SAVE_FAIL(53004, "保存投保转换率失败"), + UPDATE_FAIL(53005, "修改投保转换率失败"), + DEL_FAIL(53006, "删除投保转换率失败") + ; + + private Integer code; + + private String msg; + + DoInsureConversionDpvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDetailDayEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDetailDayEnum.java new file mode 100644 index 0000000..4e5a0cb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDetailDayEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureDetailDayEnum.java +* @Description 日投保明细枚举 +*/ + +public enum DoInsureDetailDayEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日投保明细分页失败"), + LIST_FAIL(53002, "查询日投保明细列表失败"), + FIND_ONE_FAIL(53003, "查询日投保明细对象失败"), + SAVE_FAIL(53004, "保存日投保明细失败"), + UPDATE_FAIL(53005, "修改日投保明细失败"), + DEL_FAIL(53006, "删除日投保明细失败") + ; + + private Integer code; + + private String msg; + + DoInsureDetailDayEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDpvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDpvEnum.java new file mode 100644 index 0000000..6d9eb17 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDpvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureDpvEnum.java +* @Description 日投保访问页面量枚举 +*/ + +public enum DoInsureDpvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日投保访问页面量分页失败"), + LIST_FAIL(53002, "查询日投保访问页面量列表失败"), + FIND_ONE_FAIL(53003, "查询日投保访问页面量对象失败"), + SAVE_FAIL(53004, "保存日投保访问页面量失败"), + UPDATE_FAIL(53005, "修改日投保访问页面量失败"), + DEL_FAIL(53006, "删除日投保访问页面量失败") + ; + + private Integer code; + + private String msg; + + DoInsureDpvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDuvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDuvEnum.java new file mode 100644 index 0000000..c29cf6a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureDuvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureDuvEnum.java +* @Description 日投保用户访问数枚举 +*/ + +public enum DoInsureDuvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日投保用户访问数分页失败"), + LIST_FAIL(53002, "查询日投保用户访问数列表失败"), + FIND_ONE_FAIL(53003, "查询日投保用户访问数对象失败"), + SAVE_FAIL(53004, "保存日投保用户访问数失败"), + UPDATE_FAIL(53005, "修改日投保用户访问数失败"), + DEL_FAIL(53006, "删除日投保用户访问数失败") + ; + + private Integer code; + + private String msg; + + DoInsureDuvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureFailDpvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureFailDpvEnum.java new file mode 100644 index 0000000..42f76e1 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureFailDpvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureFailDpvEnum.java +* @Description 日投保访问失败页面量枚举 +*/ + +public enum DoInsureFailDpvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日投保访问失败页面量分页失败"), + LIST_FAIL(53002, "查询日投保访问失败页面量列表失败"), + FIND_ONE_FAIL(53003, "查询日投保访问失败页面量对象失败"), + SAVE_FAIL(53004, "保存日投保访问失败页面量失败"), + UPDATE_FAIL(53005, "修改日投保访问失败页面量失败"), + DEL_FAIL(53006, "删除日投保访问失败页面量失败") + ; + + private Integer code; + + private String msg; + + DoInsureFailDpvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureGenderDuvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureGenderDuvEnum.java new file mode 100644 index 0000000..2b6d7b2 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DoInsureGenderDuvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DoInsureGenderDuvEnum.java +* @Description 性别日投保用户访问数枚举 +*/ + +public enum DoInsureGenderDuvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询性别日投保用户访问数分页失败"), + LIST_FAIL(53002, "查询性别日投保用户访问数列表失败"), + FIND_ONE_FAIL(53003, "查询性别日投保用户访问数对象失败"), + SAVE_FAIL(53004, "保存性别日投保用户访问数失败"), + UPDATE_FAIL(53005, "修改性别日投保用户访问数失败"), + DEL_FAIL(53006, "删除性别日投保用户访问数失败") + ; + + private Integer code; + + private String msg; + + DoInsureGenderDuvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DpvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DpvEnum.java new file mode 100644 index 0000000..4915f8a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DpvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DpvEnum.java +* @Description 日访问页面量枚举 +*/ + +public enum DpvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日访问页面量分页失败"), + LIST_FAIL(53002, "查询日访问页面量列表失败"), + FIND_ONE_FAIL(53003, "查询日访问页面量对象失败"), + SAVE_FAIL(53004, "保存日访问页面量失败"), + UPDATE_FAIL(53005, "修改日访问页面量失败"), + DEL_FAIL(53006, "删除日访问页面量失败") + ; + + private Integer code; + + private String msg; + + DpvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DuvEnum.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DuvEnum.java new file mode 100644 index 0000000..954fa9a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/enums/DuvEnum.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName DuvEnum.java +* @Description 日唯一访问量枚举 +*/ + +public enum DuvEnum implements IBaseEnum { + + PAGE_FAIL(53001, "查询日唯一访问量分页失败"), + LIST_FAIL(53002, "查询日唯一访问量列表失败"), + FIND_ONE_FAIL(53003, "查询日唯一访问量对象失败"), + SAVE_FAIL(53004, "保存日唯一访问量失败"), + UPDATE_FAIL(53005, "修改日唯一访问量失败"), + DEL_FAIL(53006, "删除日唯一访问量失败") + ; + + private Integer code; + + private String msg; + + DuvEnum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeignController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeignController.java new file mode 100644 index 0000000..40e11b7 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessLogFeignController.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.framework.commons.dto.log.LogBusinessVO; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.points.pojo.BusinessLog; +import com.itheima.sfbx.points.service.IBusinessLogService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * @ClassName BusinessReportFeignController.java + * @Description 业务统计 + */ +@Slf4j +@Api(tags = "持久化:业务收集") +@RestController +@RequestMapping("business-log-feign") +public class BusinessLogFeignController { + + @Autowired + IBusinessLogService businessLogService; + + /** + * 持久化:日志信息 + * @param logBusinessVO 日志对象 + * @return 是否执行成功 + */ + @PostMapping("create-business-log") + @ApiOperation(value = "日志信息", notes = "日志信息") + @ApiImplicitParam(name = "logBusinessVO", value = "日志对象", required = true, dataType = "LogBusinessVO") + public Boolean createBusinessLog(@RequestBody LogBusinessVO logBusinessVO) { + return businessLogService.createBusinessLog(BeanConv.toBean(logBusinessVO, BusinessLog.class)); + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeignController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeignController.java new file mode 100644 index 0000000..03bbc70 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/BusinessReportFeignController.java @@ -0,0 +1,111 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.service.IBusinessReportService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName BusinessReportFeignController.java + * @Description 业务统计 + */ +@Slf4j +@Api(tags = "计划任务:业务统计") +@RestController +@RequestMapping("business-report-feign") +public class BusinessReportFeignController { + + @Autowired + IBusinessReportService businessReportService; + + /** + * 日投保访页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-dpv-job/{reportTime}") + @ApiOperation(value = "日投保访问页面量", notes = "日投保访问页面量") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureDpvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureDpvJob(reportTime); + } + + /** + * 日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-duv-job/{reportTime}") + @ApiOperation(value = "日投保用户访问数", notes = "日投保用户访问数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureDuvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureDuvJob(reportTime); + } + + /** + * 日保险分类访问页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("category-dpv-job/{reportTime}") + @ApiOperation(value = "日保险分类访问页面量", notes = "日保险分类访问页面量") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean categoryDpvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.categoryDpvJob(reportTime); + } + + /** + * 性别日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-gender-duv-job/{reportTime}") + @ApiOperation(value = "性别日投保用户访问数", notes = "性别日投保用户访问数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureGenderDuvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureGenderDuvJob(reportTime); + } + + /** + * 城市日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-city-duv-job/{reportTime}") + @ApiOperation(value = "城市日投保用户访问数", notes = "城市日投保用户访问数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureCityDuvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureCityDuvJob(reportTime); + } + + /** + * 投保转换率 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-conversion-dpv-job/{reportTime}") + @ApiOperation(value = "投保转换率", notes = "投保转换率") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureConversionDpvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureConversionDpvJob(reportTime); + } + + /** + * 日投保访问失败页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-fail-dpv-job/{reportTime}") + @ApiOperation(value = "日投保访问失败页面量", notes = "日投保访问失败页面量") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureFailDpvJob(@PathVariable("reportTime") String reportTime) { + return businessReportService.doInsureFailDpvJob(reportTime); + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeignController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeignController.java new file mode 100644 index 0000000..7578ad5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/CustomerReportFeignController.java @@ -0,0 +1,111 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.service.ICustomerReportService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName CustomerReportFeignController.java + * @Description 用户统计 + */ +@Slf4j +@Api(tags = "计划任务:用户统计") +@RestController +@RequestMapping("customer-report-feign") +public class CustomerReportFeignController { + + @Autowired + ICustomerReportService customerReportService; + + /** + * 日新增用户数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dnu-job/{reportTime}") + @ApiOperation(value = "日新增用户数", notes = "日新增用户数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dnuJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dnuJob(reportTime); + } + + + /** + * 日新增注册用户归属城市 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dnu-city-job/{reportTime}") + @ApiOperation(value = "日新增注册用户归属城市", notes = "日新增注册用户归属城市") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dnuCityJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dnuCityJob(reportTime); + } + + /** + * 用户日活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dau-job/{reportTime}") + @ApiOperation(value = "用户日活跃数", notes = "用户日活跃数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dauJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dauJob(reportTime); + } + + /** + * 用户每时活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dau-time-job/{reportTime}") + @ApiOperation(value = "用户每时活跃数", notes = "用户每时活跃数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dauTimeJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dauTimeJob(reportTime); + } + + /** + * 日访问量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dpv-job/{reportTime}") + @ApiOperation(value = "日访问量", notes = "日访问量") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dpvJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dpvJob(reportTime); + } + + /** + * 日用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("duv-job/{reportTime}") + @ApiOperation(value = "日用户访问数", notes = "日用户访问数") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean duvJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.duvJob(reportTime); + } + + /** + * 用户日活跃数范围 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("dau-range-job/{reportTime}") + @ApiOperation(value = "用户日活跃数范围", notes = "用户日活跃数范围") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean dauRangeJob(@PathVariable("reportTime") String reportTime) { + return customerReportService.dauRangeJob(reportTime); + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeignController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeignController.java new file mode 100644 index 0000000..e0a9b95 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/feign/SaleReportFeignController.java @@ -0,0 +1,52 @@ +package com.itheima.sfbx.points.feign; + +import com.itheima.sfbx.points.service.IBusinessReportService; +import com.itheima.sfbx.points.service.ISaleReportService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName SaleReportFeignController.java + * @Description 销售统计 + */ +@Slf4j +@Api(tags = "计划任务:销售统计") +@RestController +@RequestMapping("sale-report-feign") +public class SaleReportFeignController { + + @Autowired + ISaleReportService saleReportService; + + /** + * 日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("do-insure-details-day-job/{reportTime}") + @ApiOperation(value = "日投保额度明细", notes = "日投保额度明细") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureDetailsDayJob(@PathVariable("reportTime") String reportTime) { + return saleReportService.doInsureDetailDayJob(reportTime); + } + + /** + * 日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + @PostMapping("doInsure-category-job/{reportTime}") + @ApiOperation(value = "日投保分类明细", notes = "日投保分类明细") + @ApiImplicitParam(name = "reportTime", value = "统计时间", required = true, dataType = "String") + public Boolean doInsureCategoryJob(@PathVariable("reportTime") String reportTime) { + return saleReportService.doInsureCategoryJob(reportTime); + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/BusinessLogMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/BusinessLogMapper.java new file mode 100644 index 0000000..ea17ff2 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/BusinessLogMapper.java @@ -0,0 +1,145 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.framework.influxdb.InfluxDBBaseMapper; +import com.itheima.sfbx.framework.influxdb.anno.Param; +import com.itheima.sfbx.framework.influxdb.anno.Select; +import com.itheima.sfbx.points.pojo.BusinessLog; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * BusinessLogMapper + * + * @describe: 数据埋点日志持久层(influxDB) + * @date: 2022/12/28 10:10 + */ +@Mapper +public interface BusinessLogMapper extends InfluxDBBaseMapper { + + /** + * 每日新注册用户 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT * FROM log WHERE response_code = '200' and time > #{begin} and time < #{end} and request_uri =~/register-user/",resultType = BusinessLog.class,database = "point_data") + List dnu(@Param("begin")String begin, @Param("end")String end); + + /** + * 每日所有活跃用户userIds + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(DISTINCT(user_id)) as user_id FROM log WHERE time > #{begin} and time < #{end} ",resultType = String.class,database = "point_data") + List allDauForUserId(@Param("begin")String begin, @Param("end")String end); + + /** + * 每日新注册用户request_body + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT response_body FROM log WHERE response_code = '200' and time > #{begin} and time < #{end} and request_uri =~/register-user/",resultType = String.class,database = "point_data") + List newDnuForResponseBody(@Param("begin")String begin, @Param("end")String end); + + /** + * 日访问量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(request_id) FROM log WHERE time > #{begin} and time < #{end} ",resultType = Integer.class,database = "point_data") + Integer dpv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日用户访问量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(DISTINCT(user_id)) FROM log WHERE time > #{begin} and time < #{end} ",resultType = Integer.class,database = "point_data") + Integer duv(@Param("begin")String begin, @Param("end")String end); + + /** + * 每日点击首页业务记录 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT * FROM log WHERE response_code = '200' and time > #{begin} and time < #{end} and request_uri =~/find-index-category-product/",resultType = BusinessLog.class,database = "point_data") + List dpvForIndex(@Param("begin")String begin, @Param("end")String end); + + /** + * 日投保访问失败页面量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(request_id) FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/do-insure/ and response_code != 200 ",resultType = Integer.class,database = "point_data") + Integer doInsureFailDpv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日投保访问页面量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(request_id) FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/do-insure/",resultType = Integer.class,database = "point_data") + Integer doInsureDpv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日保险浏览页面量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(request_id) FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/.*find-insurance\\/.*/",resultType = Integer.class,database = "point_data") + Integer doBrowseDpv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日投保试算次数 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(request_id) FROM log WHERE time > #{begin} and time < #{end} and (request_uri =~/do-premium/ or request_uri =~/do-earnings/ )",resultType = Integer.class,database = "point_data") + Integer doTrialDpv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日投保用户访问数 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(DISTINCT(user_id)) FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/do-insure/",resultType = Integer.class,database = "point_data") + Integer doInsureDuv(@Param("begin")String begin, @Param("end")String end); + + /** + * 日保险分类访问记录 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT response_body FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/.*find-insurance\\/.*/",resultType = String.class,database = "point_data") + List categoryDpvForResponseBody(@Param("begin")String begin, @Param("end")String end); + + /** + * 性别日投保访问页面量 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT COUNT(DISTINCT(user_id)) FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/do-insure/ and sex =#{sex}",resultType = Integer.class,database = "point_data") + Integer doInsureGenderDuv(@Param("begin")String begin, @Param("end")String end, @Param("sex")String sex); + + /** + * 计划任务:城市日投保用户访问数 + * @param begin + * @param end + * @return + */ + @Select(value = "SELECT * FROM log WHERE time > #{begin} and time < #{end} and request_uri =~/do-insure/ ",resultType = BusinessLog.class,database = "point_data") + List doInsureCityDuv(@Param("begin")String begin, @Param("end")String end); +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/CategoryDpvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/CategoryDpvMapper.java new file mode 100644 index 0000000..b42a7bb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/CategoryDpvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.CategoryDpv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日保险分类访问页面量Mapper接口 + */ +@Mapper +public interface CategoryDpvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauMapper.java new file mode 100644 index 0000000..9964199 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.Dau; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:用户日活跃数Mapper接口 + */ +@Mapper +public interface DauMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauRangeMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauRangeMapper.java new file mode 100644 index 0000000..6da0471 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauRangeMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DauRange; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:用户日活跃数范围Mapper接口 + */ +@Mapper +public interface DauRangeMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauTimeMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauTimeMapper.java new file mode 100644 index 0000000..40b99aa --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DauTimeMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DauTime; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:用户活跃数时段Mapper接口 + */ +@Mapper +public interface DauTimeMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuCityMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuCityMapper.java new file mode 100644 index 0000000..47e5969 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuCityMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DnuCity; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:新增用户所属城市Mapper接口 + */ +@Mapper +public interface DnuCityMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuMapper.java new file mode 100644 index 0000000..b471b96 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DnuMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.Dnu; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日新增用户数Mapper接口 + */ +@Mapper +public interface DnuMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCategoryMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCategoryMapper.java new file mode 100644 index 0000000..127b1b5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCategoryMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureCategory; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日投保分类明细Mapper接口 + */ +@Mapper +public interface DoInsureCategoryMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCityDuvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCityDuvMapper.java new file mode 100644 index 0000000..a9fea2d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureCityDuvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureCityDuv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:城市日投保用户访问数Mapper接口 + */ +@Mapper +public interface DoInsureCityDuvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureConversionDpvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureConversionDpvMapper.java new file mode 100644 index 0000000..7efefbd --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureConversionDpvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureConversionDpv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:投保转换率Mapper接口 + */ +@Mapper +public interface DoInsureConversionDpvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDetailDayMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDetailDayMapper.java new file mode 100644 index 0000000..c22e527 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDetailDayMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureDetailDay; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日投保明细Mapper接口 + */ +@Mapper +public interface DoInsureDetailDayMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDpvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDpvMapper.java new file mode 100644 index 0000000..e332579 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDpvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureDpv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日投保访问页面量Mapper接口 + */ +@Mapper +public interface DoInsureDpvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDuvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDuvMapper.java new file mode 100644 index 0000000..6af5f53 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureDuvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureDuv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日投保用户访问数Mapper接口 + */ +@Mapper +public interface DoInsureDuvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureFailDpvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureFailDpvMapper.java new file mode 100644 index 0000000..dd6209f --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureFailDpvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureFailDpv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日投保访问失败页面量Mapper接口 + */ +@Mapper +public interface DoInsureFailDpvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureGenderDuvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureGenderDuvMapper.java new file mode 100644 index 0000000..2a0162a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DoInsureGenderDuvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.DoInsureGenderDuv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:性别日投保用户访问数Mapper接口 + */ +@Mapper +public interface DoInsureGenderDuvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DpvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DpvMapper.java new file mode 100644 index 0000000..5bff521 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DpvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.Dpv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日访问页面量Mapper接口 + */ +@Mapper +public interface DpvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DuvMapper.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DuvMapper.java new file mode 100644 index 0000000..ca63061 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/mapper/DuvMapper.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.mapper; + +import com.itheima.sfbx.points.pojo.Duv; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:日唯一访问量Mapper接口 + */ +@Mapper +public interface DuvMapper extends BaseMapper { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/BusinessLog.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/BusinessLog.java new file mode 100644 index 0000000..a31eeeb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/BusinessLog.java @@ -0,0 +1,97 @@ +package com.itheima.sfbx.points.pojo; + + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.influxdb.annotation.Column; +import org.influxdb.annotation.Measurement; + +/** + * BusinessLog.java + * @describe: 数据埋点实体类--入库时间序列数据库 + */ +@Data +@Measurement(database = "point_data", name = "log") +public class BusinessLog { + + @ApiModelProperty(value = "请求id") + @Column(name = "request_id") + public String requestId; + + @ApiModelProperty(value = "域名") + @Column(name = "host") + public String host; + + @ApiModelProperty(value = "ip地址") + @Column(name = "host_address") + public String hostAddress; + + @ApiModelProperty(value = "请求路径") + @Column(name = "request_uri", tag = true) + public String requestUri; + + @ApiModelProperty(value = "请求方式") + @Column(name = "request_method", tag = true) + public String requestMethod; + + @ApiModelProperty(value = "请求body") + @Column(name = "request_body") + public String requestBody; + + @ApiModelProperty(value = "应答body") + @Column(name = "response_body") + public String responseBody; + + @ApiModelProperty(value = "应答code") + @Column(name = "response_code", tag = true) + public String responseCode; + + @ApiModelProperty(value = "应答msg") + @Column(name = "response_msg") + public String responseMsg; + + @ApiModelProperty(value = "用户") + @Column(name = "user_id") + public String userId; + + @ApiModelProperty(value = "用户名称") + @Column(name = "user_name") + public String userName; + + @ApiModelProperty(value = "业务类型") + @Column(name = "business_type") + public String businessType; + + @ApiModelProperty(value = "设备号") + @Column(name = "device_number") + public String deviceNumber; + + @ApiModelProperty(value = "企业编号") + @Column(name = "company_no") + public String companyNO; + + @ApiModelProperty(value = "性别") + @Column(name = "sex") + public String sex; + + @ApiModelProperty(value = "修改时间") + @Column(name = "create_by") + public Long createBy; + + @ApiModelProperty(value = "修改时间") + @Column(name = "update_by") + public Long updateBy; + + @ApiModelProperty(value = "数据标志位") + @Column(name = "data_state", tag = true) + public String dataState ="0"; + + @ApiModelProperty(value = "省") + @Column(name = "province") + public String province; + + @ApiModelProperty(value = "市") + @Column(name = "city") + public String city; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/CategoryDpv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/CategoryDpv.java new file mode 100644 index 0000000..e691f61 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/CategoryDpv.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日保险分类访问页面量 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_category_dpv") +@ApiModel(value="CategoryDpv对象", description="日保险分类访问页面量") +public class CategoryDpv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public CategoryDpv(Long id, String dataState, Long categoryDpv, String categoryName, LocalDate reportTime){ + super(id, dataState); + this.categoryDpv=categoryDpv; + this.categoryName=categoryName; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日保险分类访问页面量") + private Long categoryDpv; + + @ApiModelProperty(value = "保险分类名称") + private String categoryName; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dau.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dau.java new file mode 100644 index 0000000..d5e2ed5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dau.java @@ -0,0 +1,61 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:用户日活跃数 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dau") +@ApiModel(value="Dau对象", description="用户日活跃数") +public class Dau extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Dau(Long id,String dataState,Long allDau,Long newDau,Long oldDau,LocalDate reportTime){ + super(id, dataState); + this.allDau=allDau; + this.newDau=newDau; + this.oldDau=oldDau; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "总用户活跃数") + private Long allDau; + + @ApiModelProperty(value = "老用户活跃数") + private Long newDau; + + @ApiModelProperty(value = "新用户活跃数") + private Long oldDau; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauRange.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauRange.java new file mode 100644 index 0000000..b242d03 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauRange.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:用户日活跃数范围 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dau_range") +@ApiModel(value="DauRange对象", description="用户日活跃数范围") +public class DauRange extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DauRange(Long id, String dataState, String dauRang, Long userNum, LocalDate reportTime){ + super(id, dataState); + this.dauRang=dauRang; + this.userNum=userNum; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "活跃数区间") + private String dauRang; + + @ApiModelProperty(value = "用户数") + private Long userNum; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauTime.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauTime.java new file mode 100644 index 0000000..d2fa18e --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DauTime.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDateTime; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:用户活跃数时段 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dau_time") +@ApiModel(value="DauTime对象", description="用户活跃数时段") +public class DauTime extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DauTime(Long id,String dataState,Long dau,LocalDateTime reportTime){ + super(id, dataState); + this.dau=dau; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "活跃用户数") + private Long dau; + + @ApiModelProperty(value = "统计时间【精确到时分秒】") + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//set + private LocalDateTime reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dnu.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dnu.java new file mode 100644 index 0000000..050ee0f --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dnu.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日新增用户数 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dnu") +@ApiModel(value="Dnu对象", description="日新增用户数") +public class Dnu extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Dnu(Long id,String dataState,Long dnu,LocalDate reportTime){ + super(id, dataState); + this.dnu=dnu; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日新增用户数") + private Long dnu; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DnuCity.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DnuCity.java new file mode 100644 index 0000000..3d9af7a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DnuCity.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:新增用户所属城市 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dnu_city") +@ApiModel(value="DnuCity对象", description="新增用户所属城市") +public class DnuCity extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DnuCity(Long id,String dataState,Long dnu,String city,LocalDate reportTime){ + super(id, dataState); + this.dnu=dnu; + this.city=city; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "新增用户数") + private Long dnu; + + @ApiModelProperty(value = "市") + private String city; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCategory.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCategory.java new file mode 100644 index 0000000..2bdfd6b --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCategory.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日投保分类明细 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_category") +@ApiModel(value="DoInsureCategory对象", description="日投保分类明细") +public class DoInsureCategory extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureCategory(Long id, String dataState, String categoryName, Long doInsureNums, LocalDate reportTime){ + super(id, dataState); + this.categoryName=categoryName; + this.doInsureNums=doInsureNums; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "保险分类名称") + private String categoryName; + + @ApiModelProperty(value = "投保次数") + private Long doInsureNums; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCityDuv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCityDuv.java new file mode 100644 index 0000000..8db0e74 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureCityDuv.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:城市日投保用户访问数 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_city_duv") +@ApiModel(value="DoInsureCityDuv对象", description="城市日投保用户访问数") +public class DoInsureCityDuv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureCityDuv(Long id,String dataState,String cityName,Long doInsureCityDuv,LocalDate reportTime){ + super(id, dataState); + this.cityName=cityName; + this.doInsureCityDuv=doInsureCityDuv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "城市") + private String cityName; + + @ApiModelProperty(value = "城市日投保唯一访问量") + private Long doInsureCityDuv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureConversionDpv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureConversionDpv.java new file mode 100644 index 0000000..05d6deb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureConversionDpv.java @@ -0,0 +1,59 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:投保转换率 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_conversion_dpv") +@ApiModel(value="DoInsureConversionDpv对象", description="投保转换率") +public class DoInsureConversionDpv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureConversionDpv(Long id, String dataState, Long doBrowseDpv, Long doTrialDpv, Long doInsureDpv, LocalDate reportTime){ + super(id, dataState); + this.doBrowseDpv=doBrowseDpv; + this.doTrialDpv=doTrialDpv; + this.doInsureDpv=doInsureDpv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "投保浏览次数") + private Long doBrowseDpv; + + @ApiModelProperty(value = "投保试算次数") + private Long doTrialDpv; + + @ApiModelProperty(value = "投保提交次数") + private Long doInsureDpv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDetailDay.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDetailDay.java new file mode 100644 index 0000000..e060a87 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDetailDay.java @@ -0,0 +1,68 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日投保明细 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_detail_day") +@ApiModel(value="DoInsureDetailDay对象", description="日投保明细") +public class DoInsureDetailDay extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureDetailDay(Long persons,Long id, String dataState, BigDecimal totalAmountDay, BigDecimal avgPieceAmountDay, BigDecimal avgPersonAmountDay, Long totalWarrantyDay, LocalDate reportTime) { + super(id, dataState); + this.totalAmountDay = totalAmountDay; + this.avgPieceAmountDay = avgPieceAmountDay; + this.avgPersonAmountDay = avgPersonAmountDay; + this.totalWarrantyDay = totalWarrantyDay; + this.persons = persons; + this.reportTime = reportTime; + } + + @ApiModelProperty(value = "日投保总额度") + private BigDecimal totalAmountDay; + + @ApiModelProperty(value = "日投保件均额度") + private BigDecimal avgPieceAmountDay; + + @ApiModelProperty(value = "日投保人均额度") + private BigDecimal avgPersonAmountDay; + + @ApiModelProperty(value = "日总合同数") + private Long totalWarrantyDay; + + @ApiModelProperty(value = "投保人数") + private Long persons; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDpv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDpv.java new file mode 100644 index 0000000..44dec9b --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDpv.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日投保访问页面量 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_dpv") +@ApiModel(value="DoInsureDpv对象", description="日投保访问页面量") +public class DoInsureDpv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureDpv(Long id,String dataState,Long doInsureDpv,LocalDate reportTime){ + super(id, dataState); + this.doInsureDpv=doInsureDpv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日投保访问页面量") + private Long doInsureDpv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDuv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDuv.java new file mode 100644 index 0000000..4c8b14f --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureDuv.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日投保用户访问数 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_duv") +@ApiModel(value="DoInsureDuv对象", description="日投保用户访问数") +public class DoInsureDuv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureDuv(Long id,String dataState,Long doInsureDuv,LocalDate reportTime){ + super(id, dataState); + this.doInsureDuv=doInsureDuv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日投保唯一访问量") + private Long doInsureDuv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureFailDpv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureFailDpv.java new file mode 100644 index 0000000..2c282cc --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureFailDpv.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日投保访问失败页面量 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_fail_dpv") +@ApiModel(value="DoInsureFailDpv对象", description="日投保访问失败页面量") +public class DoInsureFailDpv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureFailDpv(Long id, String dataState, Long doInsureFailDpv, LocalDate reportTime){ + super(id, dataState); + this.doInsureFailDpv=doInsureFailDpv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日投保访页失败面问量") + private Long doInsureFailDpv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureGenderDuv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureGenderDuv.java new file mode 100644 index 0000000..e3cf19b --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/DoInsureGenderDuv.java @@ -0,0 +1,55 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:性别日投保用户访问数 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_do_insure_gender_duv") +@ApiModel(value="DoInsureGenderDuv对象", description="性别日投保用户访问数") +public class DoInsureGenderDuv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public DoInsureGenderDuv(Long id, String dataState, Long manDpv, Long womanDpv, LocalDate reportTime){ + super(id, dataState); + this.manDpv=manDpv; + this.womanDpv=womanDpv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "男:日投保访页面问量") + private Long manDpv; + + @ApiModelProperty(value = "女:日投保访页面问量") + private Long womanDpv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dpv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dpv.java new file mode 100644 index 0000000..230a6cf --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Dpv.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日访问页面量 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_dpv") +@ApiModel(value="Dpv对象", description="日访问页面量") +public class Dpv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Dpv(Long id,String dataState,Long dpv,LocalDate reportTime){ + super(id, dataState); + this.dpv=dpv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日访问页面量") + private Long dpv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Duv.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Duv.java new file mode 100644 index 0000000..fbe37f5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/pojo/Duv.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.pojo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.itheima.sfbx.framework.mybatisplus.basic.BasePojo; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.time.LocalDate; +import java.util.Date; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; +import org.springframework.format.annotation.DateTimeFormat; + +/** + * @Description:日唯一访问量 + */ +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@TableName("tab_duv") +@ApiModel(value="Duv对象", description="日唯一访问量") +public class Duv extends BasePojo { + + private static final long serialVersionUID = 1L; + + @Builder + public Duv(Long id,String dataState,Long duv,LocalDate reportTime){ + super(id, dataState); + this.duv=duv; + this.reportTime=reportTime; + } + + @ApiModelProperty(value = "日唯一访问量") + private Long duv; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessLogService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessLogService.java new file mode 100644 index 0000000..19d404f --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessLogService.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service; + +import com.itheima.sfbx.points.pojo.BusinessLog; + +/** + * @ClassName IBusinessLogService.java + * @Description 日志服务接口 + */ +public interface IBusinessLogService { + + /** + * 持久化日志信息 + * @param businessLog 日志对象 + * @return 是否执行成功 + */ + Boolean createBusinessLog(BusinessLog businessLog); +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessReportService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessReportService.java new file mode 100644 index 0000000..0077661 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IBusinessReportService.java @@ -0,0 +1,109 @@ +package com.itheima.sfbx.points.service; + +import com.itheima.sfbx.points.vo.analysis.DoInsureFailDpvVO; +import com.itheima.sfbx.points.vo.table.FunnelPlotChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; + +/** + * @ClassName IBusinessReportService.java + * @Description 业务统计接口 + */ +public interface IBusinessReportService { + + /** + * 计划任务:日投保访问页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureDpvJob(String reportTime); + + /** + * 计划任务:日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureDuvJob(String reportTime); + + /** + * 计划任务:日保险分类访问页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean categoryDpvJob(String reportTime); + + /** + * 计划任务:性别日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureGenderDuvJob(String reportTime); + + /** + * 计划任务:城市日投保用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureCityDuvJob(String reportTime); + + /** + * 计划任务:投保转换率 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureConversionDpvJob(String reportTime); + + /** + * 计划任务:日投保访问失败页面量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureFailDpvJob(String reportTime); + + /** + * 数据展示:7日|点击立即投保用户数/次数 + * @param startTime + * @param endTime + * @return + */ + StackingChartsVO doInsureDpvDuv(String startTime, String endTime); + + /** + * 数据展示:7日|各险种点击率 + * @param startTime + * @param endTime + * @return + */ + StackingChartsVO categoryDpv(String startTime, String endTime); + + /** + * 数据展示:30日|投保用户性别分布 + * @param startTime + * @param endTime + * @return + */ + StackingChartsVO doInsureGenderDuv(String startTime, String endTime); + + /** + * 数据展示:30日|投保用户城市分布 + * @param startTime + * @param endTime + * @return + */ + StackingChartsVO doInsureCityDuv(String startTime, String endTime); + + /** + * 数据展示:投保流程转换漏斗 + * @param startTime + * @param endTime + * @return + */ + FunnelPlotChartsVO doInsureConversionDpv(String startTime, String endTime); + + /** + * 数据展示:30日|投保提交失败次数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + DoInsureFailDpvVO doInsureFailDpv(String startTime, String endTime); +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICategoryDpvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICategoryDpvService.java new file mode 100644 index 0000000..1598daa --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICategoryDpvService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.CategoryDpv; + +/** + * @Description:日保险分类访问页面量服务类 + */ +public interface ICategoryDpvService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICustomerReportService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICustomerReportService.java new file mode 100644 index 0000000..f207ec7 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ICustomerReportService.java @@ -0,0 +1,116 @@ +package com.itheima.sfbx.points.service; + +import com.itheima.sfbx.points.vo.analysis.DauTimeVO; +import com.itheima.sfbx.points.vo.analysis.DauVO; +import com.itheima.sfbx.points.vo.analysis.DnuVO; +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import com.itheima.sfbx.points.vo.table.PiChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @ClassName ICustomerReport.java + * @Description 用户统计接口 + */ +public interface ICustomerReportService { + + + /** + * 计划任务:日新增用户数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dnuJob(String reportTime); + + /** + * 计划任务:日新增注册用户归属城市 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dnuCityJob(String reportTime); + + /** + * 计划任务:用户日活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dauJob(String reportTime); + + /** + * 计划任务:用户每时活跃数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dauTimeJob(String reportTime); + + /** + * 计划任务:日访问量 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dpvJob(String reportTime); + + /** + * 计划任务:日用户访问数 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean duvJob(String reportTime); + + /** + * 计划任务:用户日活跃数范围 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean dauRangeJob(String reportTime); + + /** + * 数据展示:日新增用户数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DnuVO + */ + DnuVO dnu(String startTime,String endTime); + + /** + * 数据展示:日新增用户所属城市 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DnuVO + */ + List dnuCity(String startTime, String endTime); + + /** + * 数据展示:30日|活跃用户数趋势 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + DauVO dau(String startTime, String endTime); + + /** + * 数据展示:30日|新老活跃用户结构 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + StackingChartsVO newOldDau(String startTime, String endTime); + + /** + * 数据展示:30日|每天活跃次数分布 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + LineChartsVO dauRange(String startTime, String endTime); + + /** + * 数据展示:7日|活跃时段分布 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + DauTimeVO dauTime(String startTime, String endTime); +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauRangeService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauRangeService.java new file mode 100644 index 0000000..f4ceddb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauRangeService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DauRange; + +/** + * @Description:用户日活跃数范围服务类 + */ +public interface IDauRangeService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauService.java new file mode 100644 index 0000000..ec9538b --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauService.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dau; +import com.itheima.sfbx.points.pojo.Dnu; + +/** + * @Description:用户日活跃数 + */ +public interface IDauService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauTimeService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauTimeService.java new file mode 100644 index 0000000..507231d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDauTimeService.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dau; +import com.itheima.sfbx.points.pojo.DauTime; + +/** + * @Description:用户活跃数时段服务接口 + */ +public interface IDauTimeService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuCityService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuCityService.java new file mode 100644 index 0000000..4935e4c --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuCityService.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dnu; +import com.itheima.sfbx.points.pojo.DnuCity; + +/** + * @Description:新增用户所属城市服务类接口 + */ +public interface IDnuCityService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuService.java new file mode 100644 index 0000000..f15b862 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDnuService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dnu; + +/** + * @Description:用户日活跃数服务类接口 + */ +public interface IDnuService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCategoryService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCategoryService.java new file mode 100644 index 0000000..a00d56c --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCategoryService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureCategory; + +/** + * @Description:日投保分类明细服务类 + */ +public interface IDoInsureCategoryService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCityDuvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCityDuvService.java new file mode 100644 index 0000000..86e2683 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureCityDuvService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureCityDuv; + +/** + * @Description:城市日投保用户访问数服务类 + */ +public interface IDoInsureCityDuvService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureConversionDpvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureConversionDpvService.java new file mode 100644 index 0000000..1fe2afb --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureConversionDpvService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureConversionDpv; + +/** + * @Description:投保转换率服务类 + */ +public interface IDoInsureConversionDpvService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDetailDayService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDetailDayService.java new file mode 100644 index 0000000..4d1090a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDetailDayService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureDetailDay; + +/** + * @Description:日投保明细服务类 + */ +public interface IDoInsureDetailDayService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDpvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDpvService.java new file mode 100644 index 0000000..c21f927 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDpvService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureDpv; + +/** + * @Description:日投保访问页面量服务类 + */ +public interface IDoInsureDpvService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDuvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDuvService.java new file mode 100644 index 0000000..0c50e79 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureDuvService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureDuv; + +/** + * @Description:日投保用户访问数服务类 + */ +public interface IDoInsureDuvService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureFailDpvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureFailDpvService.java new file mode 100644 index 0000000..7a8c905 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureFailDpvService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureFailDpv; + +/** + * @Description:日投保访问失败页面量服务类 + */ +public interface IDoInsureFailDpvService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureGenderDuvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureGenderDuvService.java new file mode 100644 index 0000000..9ea217e --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDoInsureGenderDuvService.java @@ -0,0 +1,11 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.DoInsureGenderDuv; + +/** + * @Description:性别日投保用户访问数服务类 + */ +public interface IDoInsureGenderDuvService extends IService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDpvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDpvService.java new file mode 100644 index 0000000..d8c4927 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDpvService.java @@ -0,0 +1,12 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dpv; + +/** + * @Description:日访问量服务类接口 + */ +public interface IDpvService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDuvService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDuvService.java new file mode 100644 index 0000000..8d595e8 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/IDuvService.java @@ -0,0 +1,13 @@ +package com.itheima.sfbx.points.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.itheima.sfbx.points.pojo.Dpv; +import com.itheima.sfbx.points.pojo.Duv; + +/** + * @Description:日用户访问数接口 + */ +public interface IDuvService extends IService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ISaleReportService.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ISaleReportService.java new file mode 100644 index 0000000..722a755 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/ISaleReportService.java @@ -0,0 +1,68 @@ +package com.itheima.sfbx.points.service; + +import com.itheima.sfbx.points.vo.analysis.AvgPersonAmountVO; +import com.itheima.sfbx.points.vo.analysis.CcnVO; +import com.itheima.sfbx.points.vo.analysis.SaleTopVO; +import com.itheima.sfbx.points.vo.analysis.WarrantyNumVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; + +/** + * @ClassName ISaleReportService.java + * @Description 日投保明细服务接口 + */ +public interface ISaleReportService { + + /** + * 计划任务:日投保额度明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureDetailDayJob(String reportTime); + + /** + * 计划任务:日投保分类明细 + * @param reportTime 统计时间 + * @return 是否执行成功 + */ + Boolean doInsureCategoryJob(String reportTime); + + /** + * 数据展示:销售顶部统计 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return SaleTopVO + */ + SaleTopVO saleTop(String startTime, String endTime); + + /** + * 数据展示:累计保单客户数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return CcnVO + */ + CcnVO ccn(String startTime, String endTime); + + /** + * 数据展示:7日|保单数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return WarrantyNumVO + */ + WarrantyNumVO warrantyNum(String startTime, String endTime); + + /** + * 数据展示:7日|各分类投保保单 + * @param startTime + * @param endTime + * @return StackingChartsVO + */ + StackingChartsVO doInsureCategory(String startTime, String endTime); + + /** + * 数据展示:7日|人均保费 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return WarrantyNumVO + */ + AvgPersonAmountVO avgPersonAmount(String startTime, String endTime); +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessLogServiceImple.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessLogServiceImple.java new file mode 100644 index 0000000..9f43c4a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessLogServiceImple.java @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.service.impl; + +import com.itheima.sfbx.framework.commons.enums.log.LogBusinessEnum; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.points.mapper.BusinessLogMapper; +import com.itheima.sfbx.points.pojo.BusinessLog; +import com.itheima.sfbx.points.service.IBusinessLogService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; + +/** + * @ClassName BusinessLogServiceImple.java + * @Description 日志服务接口 + */ +@Slf4j +@Service +public class BusinessLogServiceImple implements IBusinessLogService { + + @Autowired + private BusinessLogMapper businessLogMapper; + + @Override + public Boolean createBusinessLog(BusinessLog businessLog) { + try { + //插入到influxDB中 + businessLogMapper.insertOne(businessLog); + return true; + } catch (Exception e) { + log.error("数据埋点日志插入异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(LogBusinessEnum.SAVE_FAIL); + } + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessReportServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessReportServiceImpl.java new file mode 100644 index 0000000..e5501d5 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/BusinessReportServiceImpl.java @@ -0,0 +1,618 @@ +package com.itheima.sfbx.points.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.constant.basic.SuperConstant; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.dto.report.CategoryReportVO; +import com.itheima.sfbx.framework.commons.dto.report.InsuranceReportVO; +import com.itheima.sfbx.framework.commons.utils.CityUtil; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.NoProcessing; +import com.itheima.sfbx.framework.commons.utils.TimeHandlerUtils; +import com.itheima.sfbx.instance.feign.CategoryFeign; +import com.itheima.sfbx.points.mapper.BusinessLogMapper; +import com.itheima.sfbx.points.pojo.*; +import com.itheima.sfbx.points.service.*; +import com.itheima.sfbx.points.vo.analysis.DoInsureFailDpvVO; +import com.itheima.sfbx.points.vo.analysis.DoInsureFailDpvVO; +import com.itheima.sfbx.points.vo.table.*; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @ClassName BusinessReportServiceImpl.java + * @Description 业务统计接口实现 + */ +@Slf4j +@Service +public class BusinessReportServiceImpl implements IBusinessReportService { + + @Autowired + BusinessLogMapper businessLogMapper; + + @Autowired + IDoInsureDpvService doInsureDpvService; + + @Autowired + IDoInsureDuvService doInsureDuvService; + + @Autowired + IDoInsureGenderDuvService doInsureGenderDuvService; + + @Autowired + IDoInsureCityDuvService doInsureCityDuvService; + + @Autowired + IDoInsureConversionDpvService doInsureConversionDpvService; + + @Autowired + IDoInsureFailDpvService doInsureFailDpvService; + + @Autowired + ICategoryDpvService categoryDpvService; + + @Autowired + CategoryFeign categoryFeign; + + @Override + public Boolean doInsureDpvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureDpv::getReportTime,targetTime.getTargetDate()); + DoInsureDpv doInsureDpv = doInsureDpvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureDpv)){ + doInsureDpvService.remove(queryWrapper); + } + //统计日投保访问页面量 + Integer doInsureDpvNums = businessLogMapper.doInsureDpv(targetTime.getBegin(), targetTime.getEnd()); + doInsureDpvService.save(DoInsureDpv.builder() + .reportTime(targetTime.getTargetDate()) + .doInsureDpv(Long.valueOf(doInsureDpvNums)) + .build()); + return true; + } + + @Override + public Boolean doInsureDuvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureDuv::getReportTime,targetTime.getTargetDate()); + DoInsureDuv doInsureDuv = doInsureDuvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureDuv)){ + doInsureDuvService.remove(queryWrapper); + } + //统计日投保用户访问数 + Integer doInsureDuvNums = businessLogMapper.doInsureDuv(targetTime.getBegin(), targetTime.getEnd()); + doInsureDuvService.save(DoInsureDuv.builder() + .reportTime(targetTime.getTargetDate()) + .doInsureDuv(Long.valueOf(doInsureDuvNums)) + .build()); + return true; + } + + @Override + public Boolean categoryDpvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(CategoryDpv::getReportTime,targetTime.getTargetDate()); + List categoryDpvs = categoryDpvService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(categoryDpvs)){ + categoryDpvService.remove(queryWrapper); + } + //统计日保险分类访问记录 + List categoryDpvBusinessLog = businessLogMapper + .categoryDpvForResponseBody(targetTime.getBegin(), targetTime.getEnd()); + //无数据直接返回空 + if (EmptyUtil.isNullOrEmpty(categoryDpvBusinessLog)){ + return true; + } + List insuranceReportVOs = Lists.newArrayList(); + categoryDpvBusinessLog.forEach(n->{ + insuranceReportVOs.add(JSONObject.parseObject(n, InsuranceReportVO.class)); + }); + //获得所有二级分类 + List categoryReportVOs = categoryFeign + .categoryList(CategoryReportVO.builder().nodeFloors(Lists.newArrayList(2L)).build()); + //无分类直接返回空 + if (EmptyUtil.isNullOrEmpty(categoryReportVOs)){ + return true; + } + //补全分类名称 + insuranceReportVOs.forEach(n->{ + categoryReportVOs.forEach(k->{ + if (NoProcessing.isParent(k.getCategoryNo(),String.valueOf(n.getCategoryNo()))){ + n.setCategoryName(k.getCategoryName()); + } + }); + }); + //按保险分类名称进行分组 + Map> mapHandler = insuranceReportVOs.stream() + .collect(Collectors.groupingBy(InsuranceReportVO::getCategoryName)); + List categoryDpvList = Lists.newArrayList(); + for (Map.Entry> entry : mapHandler.entrySet()) { + categoryDpvList.add(CategoryDpv.builder().categoryDpv(Long.valueOf(entry.getValue().size())) + .categoryName(entry.getKey()) + .reportTime(targetTime.getTargetDate()) + .build()); + } + categoryDpvService.saveBatch(categoryDpvList); + return true; + } + + @Override + public Boolean doInsureGenderDuvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureGenderDuv::getReportTime,targetTime.getTargetDate()); + DoInsureGenderDuv doInsureGenderDuv = doInsureGenderDuvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureGenderDuv)){ + doInsureGenderDuvService.remove(queryWrapper); + } + //统计男性日投保用户访问数 + Integer manDpv = businessLogMapper.doInsureGenderDuv(targetTime.getBegin(), targetTime.getEnd(), SuperConstant.MAN); + //统计女性日投保用户访问数 + Integer womanDuv = businessLogMapper.doInsureGenderDuv(targetTime.getBegin(), targetTime.getEnd(), SuperConstant.WOMAN); + doInsureGenderDuvService.save(DoInsureGenderDuv.builder().manDpv(Long.valueOf(manDpv)) + .womanDpv(Long.valueOf(womanDuv)) + .reportTime(targetTime.getTargetDate()) + .build()); + return true; + } + + @Override + public Boolean doInsureCityDuvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureCityDuv::getReportTime,targetTime.getTargetDate()); + List list = doInsureCityDuvService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(list)){ + doInsureCityDuvService.remove(queryWrapper); + } + //统计城市日投保用户访问数 + List businessLogList= businessLogMapper.doInsureCityDuv(targetTime.getBegin(), targetTime.getEnd()); + //统计结果为空则不处理 + if (EmptyUtil.isNullOrEmpty(businessLogList)){ + return true; + } + //按照用户id分组,然后循环取第一条【去重】 + Map> mapUserIdHandler = businessLogList.stream().collect( + Collectors.groupingBy(BusinessLog::getUserId)); + List listHandler = Lists.newArrayList(); + for (Map.Entry> entry : mapUserIdHandler.entrySet()) { + listHandler.add(entry.getValue().get(0)); + } + //按照城市名称分组 + Map> mapCityHandler = listHandler.stream().collect(Collectors.groupingBy(BusinessLog::getCity)); + List doInsureCityDuvs = Lists.newArrayList(); + //保存城市日投保用户访问数 + for (Map.Entry> entry : mapCityHandler.entrySet()) { + doInsureCityDuvs.add(DoInsureCityDuv.builder() + .cityName(entry.getKey()) + .doInsureCityDuv(Long.valueOf(entry.getValue().size())) + .reportTime(targetTime.getTargetDate()) + .build()); + } + doInsureCityDuvService.saveBatch(doInsureCityDuvs); + return true; + } + + @Override + public Boolean doInsureConversionDpvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureConversionDpv::getReportTime,targetTime.getTargetDate()); + DoInsureConversionDpv doInsureConversionDpv = doInsureConversionDpvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureConversionDpv)){ + doInsureConversionDpvService.remove(queryWrapper); + } + //投保浏览次数 + Integer doBrowseDpv = businessLogMapper.doBrowseDpv(targetTime.getBegin(), targetTime.getEnd()); + //投保试算次数 + Integer doTrialDpv = businessLogMapper.doTrialDpv(targetTime.getBegin(), targetTime.getEnd()); + //投保提交次数 + Integer doInsureDpv = businessLogMapper.doInsureDpv(targetTime.getBegin(), targetTime.getEnd()); + + doInsureConversionDpvService.save( + DoInsureConversionDpv.builder() + .doBrowseDpv(Long.valueOf(doBrowseDpv)) + .doTrialDpv(Long.valueOf(doTrialDpv)) + .doInsureDpv(Long.valueOf(doInsureDpv)) + .reportTime(targetTime.getTargetDate()) + .build() + ); + return true; + } + + @Override + public Boolean doInsureFailDpvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureFailDpv::getReportTime,targetTime.getTargetDate()); + DoInsureFailDpv doInsureFailDpv = doInsureFailDpvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureFailDpv)){ + doInsureFailDpvService.remove(queryWrapper); + } + //日投保提交失败页面量 + Integer doInsureFailDpvs = businessLogMapper.doInsureFailDpv(targetTime.getBegin(), targetTime.getEnd()); + doInsureFailDpvService.save(DoInsureFailDpv.builder() + .doInsureFailDpv(Long.valueOf(doInsureFailDpvs)) + .reportTime(targetTime.getTargetDate()) + .build()); + return true; + } + + @Override + public StackingChartsVO doInsureDpvDuv(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapperDpv = new QueryWrapper<>(); + queryWrapperDpv.lambda().between(DoInsureDpv::getReportTime,startTime,endTime); + List dauRangesDpvs = doInsureDpvService.list(queryWrapperDpv); + QueryWrapper queryWrapperDuv = new QueryWrapper<>(); + queryWrapperDuv.lambda().between(DoInsureDuv::getReportTime,startTime,endTime); + List dauRangesDuvs = doInsureDuvService.list(queryWrapperDuv); + if (EmptyUtil.isNullOrEmpty(dauRangesDpvs)&&EmptyUtil.isNullOrEmpty(dauRangesDuvs)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴:点击立即投保次数 + List valueDataDoInsureDpv = dateRanges.stream() + .map(date -> { + return dauRangesDpvs.stream() + .filter(dto -> date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(DoInsureDpv::getDoInsureDpv).sum(); + }).collect(Collectors.toList()); + StackingIndexVO stackingIndexVODoInsureDpv = new StackingIndexVO(); + stackingIndexVODoInsureDpv.setName("投保 点击立即投保的总次数"); + stackingIndexVODoInsureDpv.setData(valueDataDoInsureDpv); + //Y轴:点击立即投保用户数 + List valueDataDoInsureDuv = dateRanges.stream() + .map(date -> { + return dauRangesDuvs.stream() + .filter(dto -> date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(DoInsureDuv::getDoInsureDuv).sum(); + }).collect(Collectors.toList()); + StackingIndexVO stackingIndexVODoInsureDuv = new StackingIndexVO(); + stackingIndexVODoInsureDuv.setName("投保 点击立即投保的用户数"); + stackingIndexVODoInsureDuv.setData(valueDataDoInsureDuv); + //构建元素对象 + List stackingIndexVOs = new ArrayList(); + stackingIndexVOs.add(stackingIndexVODoInsureDpv); + stackingIndexVOs.add(stackingIndexVODoInsureDuv); + //返回最终结果 + return StackingChartsVO.builder() + .label(dateRanges) + .value(stackingIndexVOs) + .build(); + } + + @Override + public StackingChartsVO categoryDpv(String startTime, String endTime) { + + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(CategoryDpv::getReportTime,startTime,endTime); + List categoryDpvs = categoryDpvService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(categoryDpvs)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //按照分类进行分组 + Map> categoryDpvMapByCategoryName = categoryDpvs.stream().collect(Collectors.groupingBy(CategoryDpv::getCategoryName)); + //构建饼状图 + List stackingIndexVOs = Lists.newArrayList(); + //分类名称 + Set categoryNames = categoryDpvMapByCategoryName.keySet(); + categoryNames.forEach(n->{ + StackingIndexVO stackingIndexVO = StackingIndexVO.builder().name(n).build(); + List categoryDpvsHandler = categoryDpvMapByCategoryName.get(n); + List data = Lists.newArrayList(); + dateRanges.forEach(d->{ + CategoryDpv categoryDpv = categoryDpvsHandler.stream() + .filter(dto -> d.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst() + .orElse(null); + if (!EmptyUtil.isNullOrEmpty(categoryDpv)){ + data.add(categoryDpv.getCategoryDpv()); + }else { + data.add(0L); + } + + }); + stackingIndexVO.setData(data); + stackingIndexVOs.add(stackingIndexVO); + }); + return new StackingChartsVO(dateRanges,stackingIndexVOs); + } + + @Override + public StackingChartsVO doInsureGenderDuv(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureGenderDuv::getReportTime,startTime,endTime).orderByAsc(DoInsureGenderDuv::getReportTime); + List doInsureGenderDuvs = doInsureGenderDuvService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureGenderDuvs)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //y轴 + List value = Lists.newArrayList(); + StackingIndexVO manStackingIndexVO = StackingIndexVO.builder().name("男").build(); + StackingIndexVO womanStackingIndexVO = StackingIndexVO.builder().name("女").build(); + List manData = Lists.newArrayList(); + List womanData = Lists.newArrayList(); + dateRanges.forEach(d->{ + DoInsureGenderDuv doInsureGenderDuv = doInsureGenderDuvs.stream() + .filter(dto -> d.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst() + .orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureGenderDuv)){ + manData.add(doInsureGenderDuv.getManDpv()); + womanData.add(doInsureGenderDuv.getWomanDpv()); + }else { + manData.add(0L); + womanData.add(0L); + } + }); + manStackingIndexVO.setData(manData); + womanStackingIndexVO.setData(womanData); + value.add(manStackingIndexVO); + value.add(womanStackingIndexVO); + return new StackingChartsVO(dateRanges,value); + } + + @Override + public StackingChartsVO doInsureCityDuv(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureCityDuv::getReportTime,startTime,endTime).orderByAsc(DoInsureCityDuv::getReportTime); + List doInsureCityDuvs = doInsureCityDuvService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureCityDuvs)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //y轴 + List value = Lists.newArrayList(); + //一线城市 + StackingIndexVO firstTierCity = StackingIndexVO.builder().name("一线城市").build(); + //二线城市 + StackingIndexVO secondTierCity = StackingIndexVO.builder().name("二线城市").build(); + //三、四线城市 + StackingIndexVO otherTierCity = StackingIndexVO.builder().name("三、四线城市").build(); + //元素数据 + List firstTierCityData = Lists.newArrayList(); + List secondTierCityData = Lists.newArrayList(); + List otherTierCityData = Lists.newArrayList(); + //构建数据 + dateRanges.forEach(d->{ + List doInsureCityDuvHandler = doInsureCityDuvs.stream() + .filter(dto -> d.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .collect(Collectors.toList()); + //当前时间无注册城市 + if (EmptyUtil.isNullOrEmpty(doInsureCityDuvHandler)){ + firstTierCityData.add(0L); + secondTierCityData.add(0L); + otherTierCityData.add(0L); + //当前时间有注册城市,判断城市类型,并求和 + }else { + Long firstTierCityCount = doInsureCityDuvHandler.stream() + .filter(dto->CityUtil.isFirstTierCity(dto.getCityName())) + .mapToLong(DoInsureCityDuv::getDoInsureCityDuv).sum(); + Long secondTierCityDataCount = doInsureCityDuvHandler.stream() + .filter(dto->CityUtil.isSecondTierCity(dto.getCityName())) + .mapToLong(DoInsureCityDuv::getDoInsureCityDuv).sum(); + Long otherTierCityDataCount = doInsureCityDuvHandler.stream() + .filter(dto->CityUtil.isOtherCity(dto.getCityName())) + .mapToLong(DoInsureCityDuv::getDoInsureCityDuv).sum(); + firstTierCityData.add(firstTierCityCount); + secondTierCityData.add(secondTierCityDataCount); + otherTierCityData.add(otherTierCityDataCount); + } + }); + //设置元素数据 + firstTierCity.setData(firstTierCityData); + secondTierCity.setData(secondTierCityData); + otherTierCity.setData(otherTierCityData); + //报表对象 + value.add(firstTierCity); + value.add(secondTierCity); + value.add(otherTierCity); + return new StackingChartsVO(dateRanges,value); + } + + @Override + public FunnelPlotChartsVO doInsureConversionDpv(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new FunnelPlotChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureConversionDpv::getReportTime,startTime,endTime).orderByAsc(DoInsureConversionDpv::getReportTime); + List doInsureConversionDpvs = doInsureConversionDpvService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureConversionDpvs)){ + return new FunnelPlotChartsVO(); + } + //X轴 + FunnelPlotChartsVO funnelPlotChartsVO = new FunnelPlotChartsVO(); + funnelPlotChartsVO.setLabel(Arrays.asList("投保浏览次数", "投保试算次数", "投保提交次数")); + //合计投保浏览次数 + long sumDoBrowseDpv = doInsureConversionDpvs.stream().mapToLong(DoInsureConversionDpv::getDoBrowseDpv).sum(); + FunnelPlotChartsIndexVO sumDoBrowseDpvIndexVO = FunnelPlotChartsIndexVO.builder() + .name("投保浏览次数").value(sumDoBrowseDpv).build(); + //合计投保试算次数 + long sumDoTrialDpv = doInsureConversionDpvs.stream().mapToLong(DoInsureConversionDpv::getDoTrialDpv).sum(); + FunnelPlotChartsIndexVO sumDoTrialDpvIndexVO = FunnelPlotChartsIndexVO.builder() + .name("投保试算次数").value(sumDoTrialDpv).build(); + //合计投保提交次数 + long sumDoInsureDpv = doInsureConversionDpvs.stream().mapToLong(DoInsureConversionDpv::getDoInsureDpv).sum(); + FunnelPlotChartsIndexVO sumDoInsureDpvIndexVO = FunnelPlotChartsIndexVO.builder() + .name("投保提交次数").value(sumDoInsureDpv).build(); + List value = new ArrayList<>(); + value.add(sumDoBrowseDpvIndexVO); + value.add(sumDoTrialDpvIndexVO); + value.add(sumDoInsureDpvIndexVO); + funnelPlotChartsVO.setValue(value); + return funnelPlotChartsVO; + } + + @Override + public DoInsureFailDpvVO doInsureFailDpv(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new DoInsureFailDpvVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureFailDpv::getReportTime,startTime,endTime).orderByAsc(DoInsureFailDpv::getReportTime); + List doInsureFailDpvs = doInsureFailDpvService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureFailDpvs)){ + return new DoInsureFailDpvVO(); + } + DoInsureFailDpvVO doInsureFailDpvVO = new DoInsureFailDpvVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData =doInsureFailDpvs.stream().map(DoInsureFailDpv::getDoInsureFailDpv).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + doInsureFailDpvVO.setTable(lineChartsVO); + //合计 + Long total = doInsureFailDpvs.stream().mapToLong(DoInsureFailDpv::getDoInsureFailDpv).sum(); + doInsureFailDpvVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + doInsureFailDpvVO.setAverage(new BigDecimal(total).divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2, RoundingMode.HALF_UP)); + //环比上周=本日注册/7日前注册 + DoInsureFailDpv doInsureFailDpvToday = doInsureFailDpvs.stream().filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + BigDecimal doInsureFailDpvTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(doInsureFailDpvToday)){ + doInsureFailDpvTodayBigDecimal = new BigDecimal(doInsureFailDpvToday.getDoInsureFailDpv()); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureFailDpv doInsureFailDpvTodayEarlier7 = doInsureFailDpvs.stream().filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureFailDpvTodayEarlier7)&&!doInsureFailDpvTodayEarlier7.getDoInsureFailDpv().equals(0L)) { + BigDecimal qoqLastWeek = doInsureFailDpvTodayBigDecimal + .divide(new BigDecimal(doInsureFailDpvTodayEarlier7.getDoInsureFailDpv()), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + doInsureFailDpvVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日注册/昨日前注册 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureFailDpv doInsureFailDpvYesterday = doInsureFailDpvs.stream().filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureFailDpvYesterday)&&!doInsureFailDpvYesterday.getDoInsureFailDpv().equals(0L)) { + BigDecimal qoq = doInsureFailDpvTodayBigDecimal + .divide(new BigDecimal(doInsureFailDpvYesterday.getDoInsureFailDpv()), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + doInsureFailDpvVO.setQoq(qoq); + } + //当日总人数 + Long perNums = doInsureFailDpvTodayBigDecimal.longValue(); + doInsureFailDpvVO.setPerNums(perNums); + return doInsureFailDpvVO; + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CategoryDpvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CategoryDpvServiceImpl.java new file mode 100644 index 0000000..2e4da34 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CategoryDpvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.CategoryDpvMapper; +import com.itheima.sfbx.points.pojo.CategoryDpv; +import com.itheima.sfbx.points.service.ICategoryDpvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日保险分类访问页面量服务实现类 + */ +@Slf4j +@Service +public class CategoryDpvServiceImpl extends ServiceImpl implements ICategoryDpvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CustomerReportServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CustomerReportServiceImpl.java new file mode 100644 index 0000000..86ce778 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/CustomerReportServiceImpl.java @@ -0,0 +1,681 @@ +package com.itheima.sfbx.points.service.impl; + +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.google.common.collect.Lists; +import com.google.common.collect.Maps; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.dto.security.UserVO; +import com.itheima.sfbx.framework.commons.utils.DateAvgUtil; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.TimeHandlerUtils; +import com.itheima.sfbx.points.mapper.BusinessLogMapper; +import com.itheima.sfbx.points.pojo.*; +import com.itheima.sfbx.points.service.*; +import com.itheima.sfbx.points.vo.analysis.DauTimeVO; +import com.itheima.sfbx.points.vo.analysis.DauVO; +import com.itheima.sfbx.points.vo.analysis.DnuVO; +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import com.itheima.sfbx.points.vo.table.PiChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import com.itheima.sfbx.points.vo.table.StackingIndexVO; +import io.swagger.annotations.ApiModelProperty; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.swing.text.StyledEditorKit; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @ClassName CustomerReportServiceImpl.java + * @Description 用户统计接口实现 + */ +@Service +public class CustomerReportServiceImpl implements ICustomerReportService { + + @Autowired + BusinessLogMapper businessLogMapper; + + @Autowired + IDnuService dnuService; + + @Autowired + IDnuCityService dnuCityService; + + @Autowired + IDauService dauService; + + @Autowired + IDauTimeService dauTimeService; + + @Autowired + IDpvService dpvService; + + @Autowired + IDuvService duvService; + + @Autowired + IDauRangeService dauRangeService; + + @Override + public Boolean dnuJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Dnu::getReportTime,targetTime.getTargetDate()); + Dnu dnu = dnuService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dnu)){ + dnuService.remove(queryWrapper); + } + //从influxdb中统计当天所有注册用户 + List dnuHandler = businessLogMapper.dnu(targetTime.getBegin(), targetTime.getEnd()); + if (!EmptyUtil.isNullOrEmpty(dnuHandler)){ + dnuService.save(Dnu.builder() + .reportTime(targetTime.getTargetDate()) + .dnu(Long.valueOf(dnuHandler.size())) + .build()); + }else { + dnuService.save(Dnu.builder() + .reportTime(targetTime.getTargetDate()) + .dnu(0L) + .build()); + } + return true; + } + + @Override + public Boolean dnuCityJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DnuCity::getReportTime,targetTime.getTargetDate()); + List dnuCity = dnuCityService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dnuCity)){ + dnuCityService.remove(queryWrapper); + } + //从influxdb中统计当天所有注册用户 + List dnuHandler = businessLogMapper.dnu(targetTime.getBegin(), targetTime.getEnd()); + if (!EmptyUtil.isNullOrEmpty(dnuHandler)){ + //进行分组处理 + Map> mapHandler = dnuHandler.stream().collect(Collectors.groupingBy(BusinessLog::getCity)); + List list = Lists.newArrayList(); + for (String key : mapHandler.keySet()) { + DnuCity dnuCityHandler = DnuCity.builder() + .city(key) + .dnu(Long.valueOf(mapHandler.get(key).size())) + .reportTime(targetTime.getTargetDate()) + .build(); + list.add(dnuCityHandler); + } + dnuCityService.saveBatch(list); + } + return true; + } + + @Override + public Boolean dauJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Dau::getReportTime,targetTime.getTargetDate()); + Dau dau = dauService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dau)){ + dauService.remove(queryWrapper); + } + //统计当天所有活跃用户userIds + List allDauForUserId = businessLogMapper.allDauForUserId(targetTime.getBegin(), targetTime.getEnd()); + //所有活跃用户数 + Integer allDau = allDauForUserId.size(); + //统计当天所有注册用户 + List dnu = businessLogMapper.dnu(targetTime.getBegin(), targetTime.getEnd()); + //所有活跃新用户数 + Integer newDau = dnu.size(); + //所有活跃老用户数 + Integer oldDau = allDau-newDau; + dauService.save(Dau.builder() + .allDau(Long.valueOf(allDau)) + .newDau(Long.valueOf(newDau)) + .oldDau(Long.valueOf(oldDau)) + .reportTime(targetTime.getTargetDate()) + .build()); + return true; + } + + @Override + public Boolean dauTimeJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + if (flag){ + reportTime = LocalDate.parse(reportTime).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().likeRight(DauTime::getReportTime,reportTime); + List dauTimeList = dauTimeService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dauTimeList)){ + dauTimeService.remove(queryWrapper); + } + //目标日期24个时间段 + List targetTimes = TimeHandlerUtils.getToday24Time(reportTime); + if (flag){ + targetTimes = TimeHandlerUtils.getYesterday24Time(reportTime); + } + List dauTimes = Lists.newArrayList(); + //分时段查询用户活跃数 + for (TimeDTO timeDTO : targetTimes) { + List allDauForUserId = businessLogMapper.allDauForUserId(timeDTO.getBegin(), timeDTO.getEnd()); + dauTimes.add(DauTime.builder() + .dau(Long.valueOf(allDauForUserId.size())) + .reportTime(timeDTO.getTargetDateTime()) + .build()); + } + dauTimeService.saveBatch(dauTimes); + return true; + } + + @Override + public Boolean dpvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Dpv::getReportTime,targetTime.getTargetDate()); + Dpv dpv = dpvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dpv)){ + dpvService.remove(queryWrapper); + } + //统计日访问量 + Integer dpvNums = businessLogMapper.dpv(targetTime.getBegin(), targetTime.getEnd()); + dpvService.save(Dpv.builder() + .dpv(Long.valueOf(dpvNums)) + .reportTime(targetTime.getTargetDate()) + .build()); + return true; + } + + @Override + public Boolean duvJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(Duv::getReportTime,targetTime.getTargetDate()); + Duv duv = duvService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(duv)){ + duvService.remove(queryWrapper); + } + //统计日访问量 + Integer duvNums = businessLogMapper.duv(targetTime.getBegin(), targetTime.getEnd()); + duvService.save(Duv.builder() + .duv(Long.valueOf(duvNums)) + .reportTime(targetTime.getTargetDate()) + .build()); + return true; + } + + @Override + public Boolean dauRangeJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DauRange::getReportTime,targetTime.getTargetDate()); + List dauRanges = dauRangeService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(dauRanges)){ + dauRangeService.remove(queryWrapper); + } + //统计每日点击首页业务记录 + List dpvForIndex = businessLogMapper.dpvForIndex(targetTime.getBegin(), targetTime.getEnd()); + //对每日点击首页业务记录按用户进行分组处理 + Map> userRangMap = dpvForIndex.stream().collect(Collectors.groupingBy(BusinessLog::getUserId)); + //创建分布范围 + Map rangeMap = Maps.newLinkedHashMap(); + rangeMap.put("1-5",0L); + rangeMap.put("5-10",0L); + rangeMap.put("10-20",0L); + rangeMap.put("20-40",0L); + rangeMap.put("40-80",0L); + rangeMap.put("80以上",0L); + for (Map.Entry range : rangeMap.entrySet()) { + List rangeListHandler = Lists.newArrayList(); + String[] Keys = range.getKey().split("-"); + for (String key : Keys) { + rangeListHandler.add(key.replace("以上","")); + } + if (rangeListHandler.size()==2){ + Long rangeStart = Long.valueOf(rangeListHandler.get(0)); + Long rangeEnd = Long.valueOf(rangeListHandler.get(1)); + for (Map.Entry> entry : userRangMap.entrySet()) { + Long userNum = Long.valueOf(entry.getValue().size()); + if (rangeStart<=userNum&&userNum> entry : userRangMap.entrySet()) { + Long userNum = Long.valueOf(entry.getValue().size()); + if (rangeStart<=userNum){ + long targetLong = range.getValue()+1L; + rangeMap.put(range.getKey(),targetLong); + } + } + } + } + List dauRangesHandler = Lists.newArrayList(); + for (Map.Entry range : rangeMap.entrySet()) { + dauRangesHandler.add(DauRange.builder() + .dauRang(range.getKey()) + .userNum(range.getValue()) + .reportTime(targetTime.getTargetDate()) + .build()); + } + dauRangeService.saveBatch(dauRangesHandler); + return true; + } + + @Override + public DnuVO dnu(String startTime,String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new DnuVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(Dnu::getReportTime,startTime,endTime).orderByAsc(Dnu::getReportTime); + List dnus = dnuService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(dnus)){ + return new DnuVO(); + } + DnuVO dnuVO = new DnuVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData = dnus.stream().map(Dnu::getDnu).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + dnuVO.setTable(lineChartsVO); + //合计 + Long total = dnus.stream().mapToLong(Dnu::getDnu).sum(); + dnuVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + dnuVO.setAverage(new BigDecimal(total).divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2,RoundingMode.HALF_UP)); + //环比上周=本日注册/7日前注册 + Dnu dnuToday = dnus.stream().filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + BigDecimal dnuTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(dnuToday)){ + dnuTodayBigDecimal = new BigDecimal(dnuToday.getDnu()); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + Dnu dnuEarlier7 = dnus.stream().filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(dnuEarlier7)&&!dnuEarlier7.getDnu().equals(0L)){ + BigDecimal qoqLastWeek =dnuTodayBigDecimal.divide(new BigDecimal(dnuEarlier7.getDnu()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + dnuVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日注册/昨日前注册 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + Dnu dnuYesterday = dnus.stream().filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(dnuYesterday)&&!dnuYesterday.getDnu().equals(0L)) { + BigDecimal qoq = dnuTodayBigDecimal.divide(new BigDecimal(dnuYesterday.getDnu()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + dnuVO.setQoq(qoq); + } + //当日总注册人数 + Long perNums = dnuTodayBigDecimal.longValue(); + dnuVO.setPerNums(perNums); + return dnuVO; + } + + @Override + public List dnuCity(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return Lists.newArrayList(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DnuCity::getReportTime,startTime,endTime); + List dnuCitys = dnuCityService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(dnuCitys)){ + return Lists.newArrayList(); + } + //按照城市进行分组 + Map> dnuCityMap = dnuCitys.stream().collect(Collectors.groupingBy(DnuCity::getCity)); + Map dnuCityMapHandler = Maps.newHashMap(); + BigDecimal total = BigDecimal.ZERO; + //城市注册分布Map + for (Map.Entry> entry : dnuCityMap.entrySet()) { + dnuCityMapHandler.put(entry.getKey(),entry.getValue().stream().mapToLong(DnuCity::getDnu).sum()); + total = total.add(new BigDecimal(entry.getValue().stream().mapToLong(DnuCity::getDnu).sum())); + } + //超过10个:构建饼状图 + if (Long.valueOf(dnuCityMapHandler.size())>10L){ + LinkedHashMap longLinkedHashMap = dnuCityMapHandler.entrySet().stream() + .sorted((entry1,entry2)->{return entry2.getValue().compareTo(entry1.getValue());}).limit(10) + .collect(Collectors.toMap(Map.Entry::getKey,Map.Entry::getValue,(oldVal,newVal)->oldVal,LinkedHashMap::new)); + List piChartsVOs = Lists.newArrayList(); + for (Map.Entry entry : longLinkedHashMap.entrySet()) { + piChartsVOs.add(PiChartsVO.builder() + .name(entry.getKey()) + .value(new BigDecimal(entry.getValue()).divide(total,2, RoundingMode.HALF_UP).multiply(new BigDecimal(100))) + .build()); + } + //构建其他城市 + BigDecimal otherTotal = BigDecimal.ZERO; + BigDecimal topTotal = BigDecimal.ZERO; + for (Map.Entry entry : longLinkedHashMap.entrySet()) { + dnuCityMapHandler.put(entry.getKey(),entry.getValue()); + topTotal = topTotal.add(new BigDecimal(entry.getValue())); + } + otherTotal = total.subtract(topTotal); + piChartsVOs.add(PiChartsVO.builder() + .name("其他") + .value(otherTotal.divide(total,2, RoundingMode.HALF_UP).multiply(new BigDecimal(100))) + .build()); + return piChartsVOs; + } + //未超过10个:构建饼状图 + List piChartsVOs = Lists.newArrayList(); + for (Map.Entry entry : dnuCityMapHandler.entrySet()) { + piChartsVOs.add(PiChartsVO.builder() + .name(entry.getKey()) + .value(new BigDecimal(entry.getValue()).divide(total,2, RoundingMode.HALF_UP).multiply(new BigDecimal(100))) + .build()); + } + return piChartsVOs; + } + + @Override + public DauVO dau(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new DauVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(Dau::getReportTime,startTime,endTime).orderByAsc(Dau::getReportTime); + List daus = dauService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(daus)){ + return new DauVO(); + } + DauVO dauVO = new DauVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData = dateRange.stream() + .map(date -> { + return daus.stream() + .filter(dto -> date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(Dau::getAllDau).sum(); + }).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + dauVO.setTable(lineChartsVO); + //合计 + Long total = daus.stream().mapToLong(Dau::getAllDau).sum(); + dauVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + dauVO.setAverage(new BigDecimal(total) + .divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2,RoundingMode.HALF_UP)); + //环比上周=本日/7日前 + Dau dauToday = daus.stream() + .filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst().orElse(null); + BigDecimal dauTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(dauToday)){ + dauTodayBigDecimal = new BigDecimal(dauToday.getAllDau()); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")) + .plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + Dau dauEarlier7 = daus.stream() + .filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(dauEarlier7)&&!dauEarlier7.getAllDau().equals(0L)) { + BigDecimal qoqLastWeek = dauTodayBigDecimal + .divide(new BigDecimal(dauEarlier7.getAllDau()), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + dauVO.setQoqLastWeek(qoqLastWeek); + } + //环比上期=本日/昨日 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")) + .plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + Dau dauYesterday = daus.stream() + .filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(dauYesterday)&&!dauYesterday.getAllDau().equals(0L)) { + BigDecimal qoq = dauTodayBigDecimal + .divide(new BigDecimal(dauYesterday.getAllDau()), 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + dauVO.setQoq(qoq); + } + //当日总活跃人数 + Long perNums = dauTodayBigDecimal.longValue(); + dauVO.setPerNums(perNums); + return dauVO; + } + + @Override + public StackingChartsVO newOldDau(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(Dau::getReportTime,startTime,endTime); + List daus = dauService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(daus)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //新用户活跃 + List newDauValues = Lists.newArrayList(); + //老用户活跃 + List oldDauValues = Lists.newArrayList(); + for (String date : dateRanges) { + Dau dau = daus.stream() + .filter(dto -> date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst() + .orElse(null); + if (!EmptyUtil.isNullOrEmpty(dau)){ + newDauValues.add(dau.getNewDau()); + oldDauValues.add(dau.getOldDau()); + }else { + newDauValues.add(0L); + oldDauValues.add(0L); + } + } + List valueData = Lists.newArrayList(); + valueData.add(new StackingIndexVO(newDauValues, "新用户")); + valueData.add(new StackingIndexVO(oldDauValues, "老用户")); + return new StackingChartsVO(dateRanges, valueData); + } + + @Override + public LineChartsVO dauRange(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new LineChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DauRange::getReportTime,startTime,endTime); + List dauRanges = dauRangeService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(dauRanges)){ + return new LineChartsVO(); + } + // 创建x轴和y轴数据 + List xLabels = new ArrayList<>(); + //填充x轴内容 + xLabels.add("1-5"); + xLabels.add("5-10"); + xLabels.add("10-20"); + xLabels.add("20-40"); + xLabels.add("40-80"); + xLabels.add("80以上"); + List yValues = new ArrayList<>(); + //按照活跃数区间分组 + Map> dauRangeMap = dauRanges.stream().collect(Collectors.groupingBy(DauRange::getDauRang)); + //构建y轴内容 + for (Map.Entry> entry : dauRangeMap.entrySet()) { + xLabels.stream().forEach(x->{ + if (x.equals(entry.getKey())){ + yValues.add(entry.getValue().stream().mapToLong(DauRange::getUserNum).sum()); + } + }); + } + return new LineChartsVO(xLabels, yValues); + } + + @Override + public DauTimeVO dauTime(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new DauTimeVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DauTime::getReportTime,startTime,endTime); + List dauTimes = dauTimeService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(dauTimes)){ + return new DauTimeVO(); + } + DauTimeVO dauTimeVO = new DauTimeVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.HOURS); + //Y轴 + List valueData = dateRange.stream() + .map(date -> { + return dauTimes.stream() + .filter(dto -> date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")))) + .mapToLong(DauTime::getDau).sum(); + }).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + dauTimeVO.setTable(lineChartsVO); + //合计 + Long total = dauTimes.stream().mapToLong(DauTime::getDau).sum(); + dauTimeVO.setTotal(total); + //均值 + LocalDateTime LocalDateTimeStartTime = LocalDateTime.parse(startTime,DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + LocalDateTime LocalDateTimeEndTime = LocalDateTime.parse(endTime,DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + dauTimeVO.setAverage(new BigDecimal(total) + .divide(new BigDecimal(LocalDateTimeStartTime.until(LocalDateTimeEndTime, ChronoUnit.DAYS)),2,RoundingMode.HALF_UP)); + //环比上周=本日注册/7日前注册 + String endTimeHandler = endTime.substring(0,10); + List dauTimeTodays = dauTimes.stream() + .filter(dto -> endTimeHandler.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .collect(Collectors.toList()); + BigDecimal dauTimeTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(dauTimeTodays)){ + dauTimeTodayBigDecimal = new BigDecimal(dauTimeTodays.stream().mapToLong(DauTime::getDau).sum()); + } + String earlier7Time = LocalDate + .parse(endTimeHandler, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7) + .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + List dauTimeEarliers7 = dauTimes.stream() + .filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .collect(Collectors.toList()); + BigDecimal dauTimeEarliers7BigDecimal = new BigDecimal(dauTimeEarliers7.stream().mapToLong(DauTime::getDau).sum()); + if (dauTimeEarliers7BigDecimal.compareTo(BigDecimal.ZERO)!=0) { + BigDecimal qoqLastWeek = dauTimeTodayBigDecimal + .divide(dauTimeEarliers7BigDecimal, 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + dauTimeVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日注册/昨日前注册 + String yesterdayTime = LocalDate + .parse(endTimeHandler, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1) + .format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + List dauTimeYesterdays = dauTimes.stream() + .filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .collect(Collectors.toList()); + BigDecimal dauTimeYesterdaysBigDecimal = new BigDecimal(dauTimeYesterdays.stream().mapToLong(DauTime::getDau).sum()); + if (dauTimeYesterdaysBigDecimal.compareTo(BigDecimal.ZERO)!=0) { + BigDecimal qoq = dauTimeEarliers7BigDecimal + .divide(dauTimeYesterdaysBigDecimal, 2, RoundingMode.HALF_UP) + .multiply(new BigDecimal(100)); + dauTimeVO.setQoq(qoq); + } + //当日总活跃人数 + Long perNums = dauTimeTodayBigDecimal.longValue(); + dauTimeVO.setPerNums(perNums); + return dauTimeVO; + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauRangeServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauRangeServiceImpl.java new file mode 100644 index 0000000..725956b --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauRangeServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DauRangeMapper; +import com.itheima.sfbx.points.pojo.DauRange; +import com.itheima.sfbx.points.service.IDauRangeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:用户日活跃数范围服务实现类 + */ +@Slf4j +@Service +public class DauRangeServiceImpl extends ServiceImpl implements IDauRangeService { + + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauServiceImpl.java new file mode 100644 index 0000000..391b369 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DauMapper; +import com.itheima.sfbx.points.pojo.Dau; +import com.itheima.sfbx.points.service.IDauService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:用户日活跃数服务实现类 + */ +@Slf4j +@Service +public class DauServiceImpl extends ServiceImpl implements IDauService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauTimeServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauTimeServiceImpl.java new file mode 100644 index 0000000..e9424c1 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DauTimeServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DauTimeMapper; +import com.itheima.sfbx.points.pojo.DauTime; +import com.itheima.sfbx.points.service.IDauTimeService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:用户活跃数时段服务接口实现类 + */ +@Slf4j +@Service +public class DauTimeServiceImpl extends ServiceImpl implements IDauTimeService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuCityServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuCityServiceImpl.java new file mode 100644 index 0000000..261fe2a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuCityServiceImpl.java @@ -0,0 +1,20 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DnuCityMapper; +import com.itheima.sfbx.points.mapper.DnuMapper; +import com.itheima.sfbx.points.pojo.Dnu; +import com.itheima.sfbx.points.pojo.DnuCity; +import com.itheima.sfbx.points.service.IDnuCityService; +import com.itheima.sfbx.points.service.IDnuService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:新增用户所属城市服务类接口实现 + */ +@Slf4j +@Service +public class DnuCityServiceImpl extends ServiceImpl implements IDnuCityService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuServiceImpl.java new file mode 100644 index 0000000..42c0124 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DnuServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DnuMapper; +import com.itheima.sfbx.points.pojo.Dnu; +import com.itheima.sfbx.points.service.IDnuService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:用户日活跃数服务实现类 + */ +@Slf4j +@Service +public class DnuServiceImpl extends ServiceImpl implements IDnuService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCategoryServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCategoryServiceImpl.java new file mode 100644 index 0000000..be9e151 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCategoryServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureCategoryMapper; +import com.itheima.sfbx.points.pojo.DoInsureCategory; +import com.itheima.sfbx.points.service.IDoInsureCategoryService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日投保分类明细服务实现类 + */ +@Slf4j +@Service +public class DoInsureCategoryServiceImpl extends ServiceImpl implements IDoInsureCategoryService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCityDuvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCityDuvServiceImpl.java new file mode 100644 index 0000000..35bc078 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureCityDuvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureCityDuvMapper; +import com.itheima.sfbx.points.pojo.DoInsureCityDuv; +import com.itheima.sfbx.points.service.IDoInsureCityDuvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:城市日投保用户访问数服务实现类 + */ +@Slf4j +@Service +public class DoInsureCityDuvServiceImpl extends ServiceImpl implements IDoInsureCityDuvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureConversionDpvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureConversionDpvServiceImpl.java new file mode 100644 index 0000000..61a3aa8 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureConversionDpvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureConversionDpvMapper; +import com.itheima.sfbx.points.pojo.DoInsureConversionDpv; +import com.itheima.sfbx.points.service.IDoInsureConversionDpvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:投保转换率服务实现类 + */ +@Slf4j +@Service +public class DoInsureConversionDpvServiceImpl extends ServiceImpl implements IDoInsureConversionDpvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDetailDayServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDetailDayServiceImpl.java new file mode 100644 index 0000000..ec2dc5c --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDetailDayServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureDetailDayMapper; +import com.itheima.sfbx.points.pojo.DoInsureDetailDay; +import com.itheima.sfbx.points.service.IDoInsureDetailDayService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日投保明细服务实现类 + */ +@Slf4j +@Service +public class DoInsureDetailDayServiceImpl extends ServiceImpl implements IDoInsureDetailDayService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDpvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDpvServiceImpl.java new file mode 100644 index 0000000..288f1e4 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDpvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureDpvMapper; +import com.itheima.sfbx.points.pojo.DoInsureDpv; +import com.itheima.sfbx.points.service.IDoInsureDpvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日投保访问页面量服务实现类 + */ +@Slf4j +@Service +public class DoInsureDpvServiceImpl extends ServiceImpl implements IDoInsureDpvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDuvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDuvServiceImpl.java new file mode 100644 index 0000000..3bbea71 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureDuvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureDuvMapper; +import com.itheima.sfbx.points.pojo.DoInsureDuv; +import com.itheima.sfbx.points.service.IDoInsureDuvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日投保用户访问数服务实现类 + */ +@Slf4j +@Service +public class DoInsureDuvServiceImpl extends ServiceImpl implements IDoInsureDuvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureFailDpvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureFailDpvServiceImpl.java new file mode 100644 index 0000000..50ea202 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureFailDpvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureFailDpvMapper; +import com.itheima.sfbx.points.pojo.DoInsureFailDpv; +import com.itheima.sfbx.points.service.IDoInsureFailDpvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:日投保提交失败页面量服务实现类 + */ +@Slf4j +@Service +public class DoInsureFailDpvServiceImpl extends ServiceImpl implements IDoInsureFailDpvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureGenderDuvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureGenderDuvServiceImpl.java new file mode 100644 index 0000000..939c717 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DoInsureGenderDuvServiceImpl.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DoInsureGenderDuvMapper; +import com.itheima.sfbx.points.pojo.DoInsureGenderDuv; +import com.itheima.sfbx.points.service.IDoInsureGenderDuvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +/** + * @Description:性别日投保用户访问数服务实现类 + */ +@Slf4j +@Service +public class DoInsureGenderDuvServiceImpl extends ServiceImpl implements IDoInsureGenderDuvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DpvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DpvServiceImpl.java new file mode 100644 index 0000000..9c818c9 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DpvServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DpvMapper; +import com.itheima.sfbx.points.pojo.Dpv; +import com.itheima.sfbx.points.service.IDpvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:用户日活跃数服务实现类 + */ +@Slf4j +@Service +public class DpvServiceImpl extends ServiceImpl implements IDpvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DuvServiceImpl.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DuvServiceImpl.java new file mode 100644 index 0000000..c8a3dd7 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/DuvServiceImpl.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.itheima.sfbx.points.mapper.DuvMapper; +import com.itheima.sfbx.points.pojo.Duv; +import com.itheima.sfbx.points.service.IDuvService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; + +/** + * @Description:日用户访问数接口实现类 + */ +@Slf4j +@Service +public class DuvServiceImpl extends ServiceImpl implements IDuvService { + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/SaleReportServiceImple.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/SaleReportServiceImple.java new file mode 100644 index 0000000..0cdf924 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/service/impl/SaleReportServiceImple.java @@ -0,0 +1,389 @@ +package com.itheima.sfbx.points.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.google.common.collect.Lists; +import com.itheima.sfbx.framework.commons.dto.analysis.InsureCategoryDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.SaleReportDTO; +import com.itheima.sfbx.framework.commons.dto.analysis.TimeDTO; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.TimeHandlerUtils; +import com.itheima.sfbx.instance.feign.SaleReportFeign; +import com.itheima.sfbx.points.pojo.DoInsureCategory; +import com.itheima.sfbx.points.pojo.DoInsureDetailDay; +import com.itheima.sfbx.points.pojo.DoInsureCategory; +import com.itheima.sfbx.points.pojo.DoInsureDetailDay; +import com.itheima.sfbx.points.service.IDoInsureCategoryService; +import com.itheima.sfbx.points.service.IDoInsureDetailDayService; +import com.itheima.sfbx.points.service.ISaleReportService; +import com.itheima.sfbx.points.vo.analysis.*; +import com.itheima.sfbx.points.vo.analysis.CcnVO; +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import com.itheima.sfbx.points.vo.table.StackingIndexVO; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.time.LocalDate; +import java.time.format.DateTimeFormatter; +import java.time.temporal.ChronoUnit; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + +/** + * @ClassName SaleReportServiceImple.java + * @Description 日投保明细服务接口实现 + */ +@Slf4j +@Service +public class SaleReportServiceImple implements ISaleReportService { + + @Autowired + SaleReportFeign saleReportFeign; + + @Autowired + IDoInsureDetailDayService doInsureDetailDayService; + + @Autowired + IDoInsureCategoryService doInsureCategoryService; + + @Override + public Boolean doInsureDetailDayJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureDetailDay::getReportTime,targetTime.getTargetDate()); + DoInsureDetailDay doInsureDetailDay = doInsureDetailDayService.getOne(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDay)){ + doInsureDetailDayService.remove(queryWrapper); + } + //统计日投保明细 + SaleReportDTO saleReportDTO = saleReportFeign.doInsureDetailDay(reportTime); + //保存结果 + doInsureDetailDayService.save( + DoInsureDetailDay.builder() + .totalAmountDay(saleReportDTO.getTotalAmountDay()) + .totalWarrantyDay(Long.valueOf(saleReportDTO.getTotalWarrantyDay())) + .avgPieceAmountDay(saleReportDTO.getAvgPieceAmountDay()) + .avgPersonAmountDay(saleReportDTO.getAvgPersonAmountDay()) + .persons(saleReportDTO.getPersons()) + .reportTime(saleReportDTO.getReportTime()) + .build() + ); + return true; + } + + @Override + public Boolean doInsureCategoryJob(String reportTime) { + //判断报表时间是否指定,未指定则使用当前时间 + if (EmptyUtil.isNullOrEmpty(reportTime)){ + reportTime = LocalDate.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + } + //判断统计时间是否为00:00到06:00 + boolean flag = TimeHandlerUtils.isTimeInRange(); + //目标日期 + TimeDTO targetTime = TimeHandlerUtils.getTodayTime(reportTime); + if (flag){ + targetTime = TimeHandlerUtils.getYesterdayTime(reportTime); + } + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().eq(DoInsureCategory::getReportTime,targetTime.getTargetDate()); + List doInsureCategories = doInsureCategoryService.list(queryWrapper); + if (!EmptyUtil.isNullOrEmpty(doInsureCategories)){ + doInsureCategoryService.remove(queryWrapper); + } + //统计日投保分类明细 + List insureCategoryDTOs = saleReportFeign.doInsureCategory(reportTime); + if (EmptyUtil.isNullOrEmpty(insureCategoryDTOs)){ + return true; + } + List doInsureCategorys = Lists.newArrayList(); + for (InsureCategoryDTO insureCategoryDTO : insureCategoryDTOs) { + doInsureCategorys.add(DoInsureCategory.builder() + .categoryName(insureCategoryDTO.getCategoryName()) + .doInsureNums(insureCategoryDTO.getDoInsureNums()) + .reportTime(insureCategoryDTO.getReportTime()) + .build()); + } + doInsureCategoryService.saveBatch(doInsureCategorys); + return true; + } + + @Override + public SaleTopVO saleTop(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new SaleTopVO(); + } + //范围时间内数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureDetailDay::getReportTime,startTime,endTime); + List doInsureDetailDays = doInsureDetailDayService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureDetailDays)){ + return new SaleTopVO(); + } + //投保总保费 + BigDecimal totalInsurance = doInsureDetailDays.stream().map(DoInsureDetailDay::getTotalAmountDay).reduce(BigDecimal.ZERO,BigDecimal::add); + //投保总保单 + Long totalInsuranceNum = doInsureDetailDays.stream().mapToLong(DoInsureDetailDay::getTotalWarrantyDay).sum(); + //投保件均保费 + BigDecimal insuranceAvgMoney = BigDecimal.ZERO; + DoInsureDetailDay doInsureDetailDay = doInsureDetailDays.stream() + .filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDay)){ + insuranceAvgMoney = doInsureDetailDay.getAvgPieceAmountDay(); + } + //投保人均保费 + BigDecimal avgPersonAmountDay = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDay)){ + insuranceAvgMoney = doInsureDetailDay.getAvgPersonAmountDay(); + } + return SaleTopVO.builder() + .totalInsurance(totalInsurance) + .totalInsuranceNum(totalInsuranceNum) + .insuranceAvgMoney(insuranceAvgMoney) + .insuranceAvgPerson(avgPersonAmountDay) + .build(); + } + + @Override + public CcnVO ccn(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new CcnVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureDetailDay::getReportTime,startTime,endTime).orderByAsc(DoInsureDetailDay::getReportTime); + List doInsureDetailDays = doInsureDetailDayService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureDetailDays)){ + return new CcnVO(); + } + CcnVO ccnVO = new CcnVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData = dateRange.stream() + .map(date->{ + return doInsureDetailDays.stream() + .filter(dto->date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(DoInsureDetailDay::getPersons).sum(); + }).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + ccnVO.setTable(lineChartsVO); + //合计 + Long total = doInsureDetailDays.stream().mapToLong(DoInsureDetailDay::getPersons).sum(); + ccnVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + ccnVO.setAverage(new BigDecimal(total).divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2, RoundingMode.HALF_UP)); + //环比上周=本日保单用户数/7日保单用户数 + DoInsureDetailDay doInsureDetailDayToday = doInsureDetailDays.stream().filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + BigDecimal doInsureDetailDayTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayToday)){ + doInsureDetailDayTodayBigDecimal = new BigDecimal(doInsureDetailDayToday.getPersons()); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayEarlier7 = doInsureDetailDays.stream().filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayEarlier7)&&!doInsureDetailDayEarlier7.getPersons().equals(0L)){ + BigDecimal qoqLastWeek =doInsureDetailDayTodayBigDecimal.divide(new BigDecimal(doInsureDetailDayEarlier7.getPersons()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + ccnVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日保单用户数/昨日保单用户数 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayYesterday = doInsureDetailDays.stream().filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayYesterday)&&!doInsureDetailDayYesterday.getPersons().equals(0L)) { + BigDecimal qoq = doInsureDetailDayTodayBigDecimal.divide(new BigDecimal(doInsureDetailDayYesterday.getPersons()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + ccnVO.setQoq(qoq); + } + //当日总人数 + Long perNums = doInsureDetailDayTodayBigDecimal.longValue(); + ccnVO.setPerNums(perNums); + return ccnVO; + } + + @Override + public WarrantyNumVO warrantyNum(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new WarrantyNumVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureDetailDay::getReportTime,startTime,endTime).orderByAsc(DoInsureDetailDay::getReportTime); + List doInsureDetailDays = doInsureDetailDayService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureDetailDays)){ + return new WarrantyNumVO(); + } + WarrantyNumVO warrantyNumVO = new WarrantyNumVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData = dateRange.stream() + .map(date->{ + return doInsureDetailDays.stream() + .filter(dto->date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(DoInsureDetailDay::getTotalWarrantyDay).sum(); + }).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + warrantyNumVO.setTable(lineChartsVO); + //合计 + Long total = doInsureDetailDays.stream().mapToLong(DoInsureDetailDay::getTotalWarrantyDay).sum(); + warrantyNumVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + warrantyNumVO.setAverage(new BigDecimal(total).divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2, RoundingMode.HALF_UP)); + //环比上周=本日保单用户数/7日保单用户数 + DoInsureDetailDay doInsureDetailDayToday = doInsureDetailDays.stream().filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + BigDecimal doInsureDetailDayTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayToday)){ + doInsureDetailDayTodayBigDecimal = new BigDecimal(doInsureDetailDayToday.getTotalWarrantyDay()); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayEarlier7 = doInsureDetailDays.stream().filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayEarlier7)&&!doInsureDetailDayEarlier7.getTotalWarrantyDay().equals(0L)){ + BigDecimal qoqLastWeek =doInsureDetailDayTodayBigDecimal.divide(new BigDecimal(doInsureDetailDayEarlier7.getTotalWarrantyDay()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + warrantyNumVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日保单数/昨日保单数 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayYesterday = doInsureDetailDays.stream().filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayYesterday)&&!doInsureDetailDayYesterday.getTotalWarrantyDay().equals(0L)) { + BigDecimal qoq = doInsureDetailDayTodayBigDecimal.divide(new BigDecimal(doInsureDetailDayYesterday.getTotalWarrantyDay()), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + warrantyNumVO.setQoq(qoq); + } + //当日保单 + Long perNums = doInsureDetailDayTodayBigDecimal.longValue(); + warrantyNumVO.setWarrantyNums(perNums); + return warrantyNumVO; + } + + @Override + public StackingChartsVO doInsureCategory(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new StackingChartsVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureCategory::getReportTime,startTime,endTime); + List doInsureCategorys = doInsureCategoryService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureCategorys)){ + return new StackingChartsVO(); + } + //X轴 + List dateRanges = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //按照分类进行分组 + Map> doInsureCategoryMapByCategoryName = doInsureCategorys.stream() + .collect(Collectors.groupingBy(DoInsureCategory::getCategoryName)); + //构建饼状图 + List stackingIndexVOs = Lists.newArrayList(); + //分类名称 + Set categoryNames = doInsureCategoryMapByCategoryName.keySet(); + categoryNames.forEach(n->{ + StackingIndexVO stackingIndexVO = StackingIndexVO.builder().name(n).build(); + List doInsureCategorysHandler = doInsureCategoryMapByCategoryName.get(n); + List data = Lists.newArrayList(); + dateRanges.forEach(d->{ + DoInsureCategory doInsureCategory = doInsureCategorysHandler.stream() + .filter(dto -> d.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .findFirst() + .orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureCategory)){ + data.add(doInsureCategory.getDoInsureNums()); + }else { + data.add(0L); + } + + }); + stackingIndexVO.setData(data); + stackingIndexVOs.add(stackingIndexVO); + }); + return new StackingChartsVO(dateRanges,stackingIndexVOs); + } + + @Override + public AvgPersonAmountVO avgPersonAmount(String startTime, String endTime) { + //起始或结束时间为空则返回空结果 + if (EmptyUtil.isNullOrEmpty(startTime)||EmptyUtil.isNullOrEmpty(endTime)){ + return new AvgPersonAmountVO(); + } + //查询时间范围数据 + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.lambda().between(DoInsureDetailDay::getReportTime,startTime,endTime).orderByAsc(DoInsureDetailDay::getReportTime); + List doInsureDetailDays = doInsureDetailDayService.list(queryWrapper); + if (EmptyUtil.isNullOrEmpty(doInsureDetailDays)){ + return new AvgPersonAmountVO(); + } + AvgPersonAmountVO avgPersonAmountVO = new AvgPersonAmountVO(); + //X轴 + List dateRange = TimeHandlerUtils.getGraduallys(startTime, endTime, TimeUnit.DAYS); + //Y轴 + List valueData = dateRange.stream() + .map(date->{ + return doInsureDetailDays.stream() + .filter(dto->date.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))) + .mapToLong(DoInsureDetailDay::getTotalWarrantyDay).sum(); + }).collect(Collectors.toList()); + //折线表格数据 + LineChartsVO lineChartsVO = new LineChartsVO(); + lineChartsVO.setLabel(dateRange); + lineChartsVO.setValue(valueData); + avgPersonAmountVO.setTable(lineChartsVO); + //合计 + BigDecimal total = doInsureDetailDays.stream().map(DoInsureDetailDay::getAvgPersonAmountDay).reduce(BigDecimal.ZERO,BigDecimal::add); + avgPersonAmountVO.setTotal(total); + //均值 + LocalDate localDateStartTime = LocalDate.parse(startTime); + LocalDate localDateEndTime = LocalDate.parse(endTime); + avgPersonAmountVO.setAverage(total.divide(new BigDecimal(localDateStartTime.until(localDateEndTime, ChronoUnit.DAYS)),2, RoundingMode.HALF_UP)); + //环比上周=本日保费/7日前保费 + DoInsureDetailDay doInsureDetailDayToday = doInsureDetailDays.stream().filter(dto -> endTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + BigDecimal doInsureDetailDayTodayBigDecimal = BigDecimal.ZERO; + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayToday)){ + doInsureDetailDayTodayBigDecimal = doInsureDetailDayToday.getAvgPersonAmountDay(); + } + String earlier7Time = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-7).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayEarlier7 = doInsureDetailDays.stream().filter(dto -> earlier7Time.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayEarlier7) + &&doInsureDetailDayEarlier7.getAvgPersonAmountDay().compareTo(BigDecimal.ZERO)!=0){ + BigDecimal qoqLastWeek =doInsureDetailDayTodayBigDecimal.divide(doInsureDetailDayEarlier7.getAvgPersonAmountDay(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + avgPersonAmountVO.setQoqLastWeek(qoqLastWeek); + } + //同比昨日=本日保费/昨日保费 + String yesterdayTime = LocalDate.parse(endTime, DateTimeFormatter.ofPattern("yyyy-MM-dd")).plusDays(-1).format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); + DoInsureDetailDay doInsureDetailDayYesterday = doInsureDetailDays.stream().filter(dto -> yesterdayTime.equals(dto.getReportTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd")))).findFirst().orElse(null); + if (!EmptyUtil.isNullOrEmpty(doInsureDetailDayYesterday)&& + doInsureDetailDayYesterday.getAvgPersonAmountDay().compareTo(BigDecimal.ZERO)!=0) { + BigDecimal qoq = doInsureDetailDayTodayBigDecimal.divide(doInsureDetailDayYesterday.getAvgPersonAmountDay(), 2, RoundingMode.HALF_UP).multiply(new BigDecimal(100)); + avgPersonAmountVO.setQoq(qoq); + } + //当日保费 + avgPersonAmountVO.setPersonAmount(doInsureDetailDayTodayBigDecimal); + return avgPersonAmountVO; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/AvgPersonAmountVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/AvgPersonAmountVO.java new file mode 100644 index 0000000..2dedf46 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/AvgPersonAmountVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 累计保单客户数 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "CcnVO对象", description = "累计保单客户数") +public class AvgPersonAmountVO { + + + @Builder + public AvgPersonAmountVO(BigDecimal personAmount, BigDecimal qoq, BigDecimal qoqLastWeek, BigDecimal total, BigDecimal average, LineChartsVO table) { + this.personAmount = personAmount; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日保费") + private BigDecimal personAmount = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private BigDecimal total = BigDecimal.ZERO; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/CcnVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/CcnVO.java new file mode 100644 index 0000000..2f2d536 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/CcnVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 累计保单客户数 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "CcnVO对象", description = "累计保单客户数") +public class CcnVO { + + + @Builder + public CcnVO(Long perNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.perNums = perNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日总人数") + private Long perNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauTimeVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauTimeVO.java new file mode 100644 index 0000000..66d4a0a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauTimeVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 7日|活跃时段分布 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "DauTimeVO对象", description = "7日|活跃时段分布") +public class DauTimeVO { + + + @Builder + public DauTimeVO(Long perNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.perNums = perNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日总活跃人数") + private Long perNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = new BigDecimal(100); + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = new BigDecimal(100); + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauVO.java new file mode 100644 index 0000000..04a5d80 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DauVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 30日|活跃用户数趋势 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "DnuVO对象", description = "30日|活跃用户数趋势") +public class DauVO { + + + @Builder + public DauVO(Long perNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.perNums = perNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日总活跃人数") + private Long perNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DnuVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DnuVO.java new file mode 100644 index 0000000..d76b5ac --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DnuVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 日新增用户数 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "DnuVO对象", description = "日新增用户数") +public class DnuVO { + + + @Builder + public DnuVO(Long perNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.perNums = perNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日总注册人数") + private Long perNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DoInsureFailDpvVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DoInsureFailDpvVO.java new file mode 100644 index 0000000..6511e50 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/DoInsureFailDpvVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 30日|活跃用户数趋势 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "DoInsureFailDpvVO对象", description = "30日|投保提交失败次数") +public class DoInsureFailDpvVO { + + + @Builder + public DoInsureFailDpvVO(Long perNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.perNums = perNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日人数") + private Long perNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/SaleTopVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/SaleTopVO.java new file mode 100644 index 0000000..359be52 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/SaleTopVO.java @@ -0,0 +1,71 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDate; + +/** + * SaleTopVO + * + * @author: wgl + * @describe: 销售榜单顶部数据VO + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="SaleTopVO投保顶部对象", description="统计分析:投保顶部对象") +public class SaleTopVO { + + @Builder + public SaleTopVO(BigDecimal totalInsurance, Long totalInsuranceNum, BigDecimal insuranceAvgMoney, + BigDecimal insuranceAvgPerson,LocalDate reportTime) { + this.totalInsurance = totalInsurance; + this.totalInsuranceNum = totalInsuranceNum; + this.insuranceAvgMoney = insuranceAvgMoney; + this.insuranceAvgPerson = insuranceAvgPerson; + this.reportTime = reportTime; + } + + /** + * 投保总保费 + */ + @ApiModelProperty(value = "投保总保费") + private BigDecimal totalInsurance= BigDecimal.ZERO; + + /** + * 投保总保单 + */ + @ApiModelProperty(value = "投保总保单") + private Long totalInsuranceNum=0L; + + /** + * 投保件均保费 + */ + @ApiModelProperty(value = "投保件均保费") + private BigDecimal insuranceAvgMoney= BigDecimal.ZERO; + + /** + * 投保人均保费 + */ + @ApiModelProperty(value = "投保人均保费") + private BigDecimal insuranceAvgPerson= BigDecimal.ZERO; + + @ApiModelProperty(value = "统计时间") + @JsonDeserialize(using = LocalDateDeserializer.class) + @JsonSerialize(using = LocalDateSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd") + private LocalDate reportTime; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/WarrantyNumVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/WarrantyNumVO.java new file mode 100644 index 0000000..275c2c2 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/analysis/WarrantyNumVO.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.points.vo.analysis; + +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * DnuVO + * @describe: 累计保单客户数 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "CcnVO对象", description = "累计保单客户数") +public class WarrantyNumVO { + + + @Builder + public WarrantyNumVO(Long warrantyNums, BigDecimal qoq, BigDecimal qoqLastWeek, Long total, BigDecimal average, LineChartsVO table) { + this.warrantyNums = warrantyNums; + this.qoq = qoq; + this.qoqLastWeek = qoqLastWeek; + this.total = total; + this.average = average; + this.table = table; + } + + @ApiModelProperty(value = "当日保单") + private Long warrantyNums = 0L; + + @ApiModelProperty(value = "环比上期") + private BigDecimal qoq = BigDecimal.ZERO; + + @ApiModelProperty(value = "环比上周") + private BigDecimal qoqLastWeek = BigDecimal.ZERO; + + @ApiModelProperty(value = "合计") + private Long total = 0L; + + @ApiModelProperty(value = "均值") + private BigDecimal average = BigDecimal.ZERO; + + @ApiModelProperty(value = "折线表格数据") + private LineChartsVO table; + +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsIndexVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsIndexVO.java new file mode 100644 index 0000000..09369ff --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsIndexVO.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * FunnelPlotGraphIndexVO + * + * @author: wgl + * @describe: 漏斗图每个元素VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="FunnelPlotGraphVO对象", description="统计分析:漏斗图元素VO类") +public class FunnelPlotChartsIndexVO { + + @Builder + public FunnelPlotChartsIndexVO(String name, Long value) { + this.name = name; + this.value = value; + } + + @ApiModelProperty(value = "阶段名") + private String name; + + @ApiModelProperty(value = "阶段对应的值") + private Long value; +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsVO.java new file mode 100644 index 0000000..ba914b4 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/FunnelPlotChartsVO.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * FunnelPlotGraphVO + * + * @author: wgl + * @describe: 漏斗图VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="FunnelPlotGraphVO对象", description="统计分析:漏斗图VO类") +public class FunnelPlotChartsVO { + + @Builder + public FunnelPlotChartsVO(List label, List value){ + this.value=value; + this.label=label; + } + + @ApiModelProperty(value = "阶段名") + private List label; + + @ApiModelProperty(value = "每个具体阶段") + private List value; + +} \ No newline at end of file diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/LineChartsVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/LineChartsVO.java new file mode 100644 index 0000000..6847574 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/LineChartsVO.java @@ -0,0 +1,33 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * LineGraphVO + * + * @author: wgl + * @describe: 直线图,柱状图VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value="LineGraphVO对象", description="统计分析:直线图,柱状图VO类") +public class LineChartsVO { + + @Builder + public LineChartsVO(List label, List value){ + this.value=value; + this.label=label; + } + @ApiModelProperty(value = "x轴横坐标") + private List label; + + @ApiModelProperty(value = "y轴纵坐标") + private List value; +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/PiChartsVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/PiChartsVO.java new file mode 100644 index 0000000..2d76fbf --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/PiChartsVO.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + * PiGraphVO + * + * @author: wgl + * @describe: PiGraphVO对象--饼图VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "PiGraphVO对象", description = "统计分析:饼图VO类") +public class PiChartsVO { + + @Builder + public PiChartsVO(BigDecimal value, String name){ + this.value=value; + this.name=name; + } + + @ApiModelProperty(value = "分块比例") + private BigDecimal value; + + @ApiModelProperty(value = "分块名") + private String name; +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingChartsVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingChartsVO.java new file mode 100644 index 0000000..eef100a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingChartsVO.java @@ -0,0 +1,34 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +/** + * StackingChartsVO + * + * @author: wgl + * @describe: StackingChartsVO对象--堆叠图VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "StackingChartsVO对象", description = "统计分析:堆叠图VO类") +public class StackingChartsVO { + + @Builder + public StackingChartsVO(List label, List value){ + this.value=value; + this.label=label; + } + + @ApiModelProperty(value = "x轴") + private List label; + + @ApiModelProperty(value = "y轴数据") + private List value; +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingIndexVO.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingIndexVO.java new file mode 100644 index 0000000..7d38774 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/vo/table/StackingIndexVO.java @@ -0,0 +1,35 @@ +package com.itheima.sfbx.points.vo.table; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; +import java.util.List; + +/** + * StackingIndexVO + * + * @author: wgl + * @describe: 堆叠元素VO类 + * @date: 2022/12/28 10:10 + */ +@Data +@NoArgsConstructor +@ApiModel(value = "StackingIndexVO对象", description = "统计分析:堆叠元素VO类") +public class StackingIndexVO { + + @Builder + public StackingIndexVO(List data, String name){ + this.data=data; + this.name=name; + } + + @ApiModelProperty(value = "元素名称") + private String name; + + @ApiModelProperty(value = "元素值") + private List data; +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/BusinessReportController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/BusinessReportController.java new file mode 100644 index 0000000..6b2fbc0 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/BusinessReportController.java @@ -0,0 +1,137 @@ +package com.itheima.sfbx.points.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.points.service.IBusinessReportService; +import com.itheima.sfbx.points.vo.analysis.DauVO; +import com.itheima.sfbx.points.vo.analysis.DoInsureFailDpvVO; +import com.itheima.sfbx.points.vo.table.FunnelPlotChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName BusinessReportFeignController.java + * @Description 数据展示:业务统计 + */ +@Slf4j +@Api(tags = "数据展示:业务统计") +@RestController +@RequestMapping("business-report") +public class BusinessReportController { + + @Autowired + IBusinessReportService businessReportService; + + /** + * 数据展示:7日|点击立即投保用户数|次数 + * @param startTime + * @param endTime + * @return + */ + @PostMapping("do-insure-dpv-duv/{startTime}/{endTime}") + @ApiOperation(value = "7日|点击立即投保用户数|次数", notes = "7日|点击立即投保用户数|次数") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureDpvDuv(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = businessReportService.doInsureDpvDuv(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:7日|各险种点击率 + * @param startTime + * @param endTime + * @return + */ + @PostMapping("category-dpv/{startTime}/{endTime}") + @ApiOperation(value = "7日|各险种点击率", notes = "7日|各险种点击率") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult categoryDpv(@PathVariable("startTime") String startTime,@PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = businessReportService.categoryDpv(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:30日|投保用户性别分布 + * @param startTime + * @param endTime + * @return + */ + @PostMapping("do-insure-gender-duv/{startTime}/{endTime}") + @ApiOperation(value = "30日|投保用户性别分布", notes = "30日|投保用户性别分布") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureGenderDuv(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = businessReportService.doInsureGenderDuv(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:30日|投保用户城市分布 + * @param startTime + * @param endTime + * @return + */ + @PostMapping("do-insure-city-duv/{startTime}/{endTime}") + @ApiOperation(value = "30日|投保用户城市分布", notes = "30日|投保用户城市分布") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureCityDuv(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = businessReportService.doInsureCityDuv(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:投保流程转换漏斗 + * @param startTime + * @param endTime + * @return + */ + @PostMapping("do-insure-conversion-dpv/{startTime}/{endTime}") + @ApiOperation(value = "投保流程转换漏斗", notes = "投保流程转换漏斗") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureConversionDpv(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + FunnelPlotChartsVO funnelPlotChartsVO = businessReportService.doInsureConversionDpv(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,funnelPlotChartsVO); + } + + + /** + * 数据展示:30日|投保提交失败次数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + @PostMapping("do-insure-fail-dpv/{startTime}/{endTime}") + @ApiOperation(value = "30日|投保提交失败次数", notes = "30日|投保提交失败次数") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureFailDpv(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + DoInsureFailDpvVO doInsureFailDpvVO = businessReportService.doInsureFailDpv(startTime,endTime); + return ResponseResultBuild.successBuild(doInsureFailDpvVO); + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/CustomerReportController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/CustomerReportController.java new file mode 100644 index 0000000..6689b31 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/CustomerReportController.java @@ -0,0 +1,140 @@ +package com.itheima.sfbx.points.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.points.service.ICustomerReportService; +import com.itheima.sfbx.points.vo.analysis.DauTimeVO; +import com.itheima.sfbx.points.vo.analysis.DauVO; +import com.itheima.sfbx.points.vo.analysis.DnuVO; +import com.itheima.sfbx.points.vo.table.LineChartsVO; +import com.itheima.sfbx.points.vo.table.PiChartsVO; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +/** + * @ClassName CustomerReportFeignController.java + * @Description 用户统计 + */ +@Slf4j +@Api(tags = "数据展示:用户统计") +@RestController +@RequestMapping("customer-report") +public class CustomerReportController { + + @Autowired + ICustomerReportService customerReportService; + + /** + * 数据展示:30日|每日新增用户数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DnuVO + */ + @PostMapping("dnu/{startTime}/{endTime}") + @ApiOperation(value = "30日|每日新增用户数", notes = "30日|每日新增用户数") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult dnu(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + DnuVO dnuVO = customerReportService.dnu(startTime,endTime); + return ResponseResultBuild.successBuild(dnuVO); + } + + /** + * 数据展示:新增注册用户城市分布 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DnuVO + */ + @PostMapping("dnu-city/{startTime}/{endTime}") + @ApiOperation(value = "新增注册用户城市分布", notes = "新增注册用户城市分布") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult> dnuCity(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + List piChartsVOs = customerReportService.dnuCity(startTime,endTime); + return ResponseResultBuild.successBuild(piChartsVOs); + } + + /** + * 数据展示:30日|活跃用户数趋势 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + @PostMapping("dau/{startTime}/{endTime}") + @ApiOperation(value = "30日|活跃用户数趋势", notes = "30日|活跃用户数趋势") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult dau(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + DauVO dauVO = customerReportService.dau(startTime,endTime); + return ResponseResultBuild.successBuild(dauVO); + } + + /** + * 数据展示:30日|新老活跃用户结构 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + @PostMapping("new-old-dau/{startTime}/{endTime}") + @ApiOperation(value = "30日|新老活跃用户结构", notes = "30日|新老活跃用户结构") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult newOldDau(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = customerReportService.newOldDau(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:30日|每天活跃次数分布 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + @PostMapping("dau-range/{startTime}/{endTime}") + @ApiOperation(value = "30日|每天活跃次数分布", notes = "30日|每天活跃次数分布") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult dauRange(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + LineChartsVO lineChartsVO = customerReportService.dauRange(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,lineChartsVO); + } + + /** + * 数据展示:7日|活跃时段分布 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return DauVO + */ + @PostMapping("dau-time/{startTime}/{endTime}") + @ApiOperation(value = "7日|活跃时段分布", notes = "7日|活跃时段分布") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间格式:yyyy-MM-dd HH:mm:ss", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间:yyyy-MM-dd HH:mm:ss", required = true, dataType = "String") + }) + public ResponseResult dauTime(@PathVariable("startTime") String startTime,@PathVariable("endTime") String endTime) { + DauTimeVO dauTimeVO = customerReportService.dauTime(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,dauTimeVO); + } +} diff --git a/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/SaleReportController.java b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/SaleReportController.java new file mode 100644 index 0000000..c57d0e7 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/java/com/itheima/sfbx/points/web/SaleReportController.java @@ -0,0 +1,118 @@ +package com.itheima.sfbx.points.web; + +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.enums.basic.BaseEnum; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import com.itheima.sfbx.points.service.ISaleReportService; +import com.itheima.sfbx.points.vo.analysis.*; +import com.itheima.sfbx.points.vo.table.StackingChartsVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @ClassName SaleReportFeignController.java + * @Description 销售统计 + */ +@Slf4j +@Api(tags = "数据展示:销售统计") +@RestController +@RequestMapping("sale-report") +public class SaleReportController { + + @Autowired + ISaleReportService saleReportService; + + /** + * 数据展示:销售顶部统计 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return SaleTopVO + */ + @PostMapping("sale-top/{startTime}/{endTime}") + @ApiOperation(value = "销售顶部统计", notes = "销售顶部统计") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult saleTop(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + SaleTopVO saleTopVO = saleReportService.saleTop(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,saleTopVO); + } + + /** + * 数据展示:累计保单客户数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return CcnVO + */ + @PostMapping("ccn/{startTime}/{endTime}") + @ApiOperation(value = "累计保单客户数", notes = "累计保单客户数") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult ccn(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + CcnVO ccnVO = saleReportService.ccn(startTime,endTime); + return ResponseResultBuild.successBuild(ccnVO); + } + + /** + * 数据展示:7日|保单数 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return WarrantyNumVO + */ + @PostMapping("warranty-num/{startTime}/{endTime}") + @ApiOperation(value = "7日|保单数", notes = "7日|保单数") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult warrantyNum(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + WarrantyNumVO warrantyNum = saleReportService.warrantyNum(startTime,endTime); + return ResponseResultBuild.successBuild(warrantyNum); + } + + /** + * 数据展示:7日|各分类投保保单 + * @param startTime + * @param endTime + * @return StackingChartsVO + */ + @PostMapping("do-insure-category/{startTime}/{endTime}") + @ApiOperation(value = "7日|各分类投保保单", notes = "7日|各分类投保保单") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult doInsureCategory(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + StackingChartsVO stackingChartsVO = saleReportService.doInsureCategory(startTime,endTime); + return ResponseResultBuild.build(BaseEnum.SUCCEED,stackingChartsVO); + } + + /** + * 数据展示:7日|人均保费 + * @param startTime 开始时间 + * @param endTime 结束时间 + * @return WarrantyNumVO + */ + @PostMapping("avg-person-amount/{startTime}/{endTime}") + @ApiOperation(value = "7日|人均保费", notes = "7日|人均保费") + @ApiImplicitParams({ + @ApiImplicitParam(name = "startTime", value = "开始时间", required = true, dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", required = true, dataType = "String") + }) + public ResponseResult avgPersonAmount(@PathVariable("startTime") String startTime, @PathVariable("endTime") String endTime) { + AvgPersonAmountVO avgPersonAmount = saleReportService.avgPersonAmount(startTime,endTime); + return ResponseResultBuild.successBuild(avgPersonAmount); + } + +} diff --git a/day02/sfbx-points/points-web/src/main/resources/banner.txt b/day02/sfbx-points/points-web/src/main/resources/banner.txt new file mode 100644 index 0000000..065e5dd --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/banner.txt @@ -0,0 +1,10 @@ + _ __ __ + (_) /__________ ______/ /_ + / / __/ ___/ __ `/ ___/ __/ + / / /_/ /__/ /_/ (__ ) /_ +/_/\__/\___/\__,_/____/\__/ + :: Spring Boot :: (v-2.7.10) + :: Spring Cloud :: (v-2021.0.6) + :: Spring Cloud Alibaba :: (v-2021.0.1.0) + :: sfbx Cloud :: (v-2.0-SNAPSHOT) + :: 献给可爱的传智人 :: diff --git a/day02/sfbx-points/points-web/src/main/resources/bootstrap-test.yml b/day02/sfbx-points/points-web/src/main/resources/bootstrap-test.yml new file mode 100644 index 0000000..26f13c6 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/bootstrap-test.yml @@ -0,0 +1,51 @@ +#服务配置 +server: + #端口 + port: 7074 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + config: + activate: + on-profile: + - test + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: points-web + cloud: + nacos: + discovery: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} + config: + server-addr: ${NACOS_ADDRESS:nacos-service.yjy-public-sfbx-java.svc.cluster.local:20015} # nacos注册中心 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + username: ${NACOS_USERNAME:nacos} + password: ${NACOS_PASSWORD:PKsf*bxQ4;yP3a+} +logging: + config: classpath:logback.xml diff --git a/day02/sfbx-points/points-web/src/main/resources/bootstrap.yml b/day02/sfbx-points/points-web/src/main/resources/bootstrap.yml new file mode 100644 index 0000000..c06bef9 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/bootstrap.yml @@ -0,0 +1,51 @@ +#服务配置 +server: + #端口 + port: 7080 + #服务编码 + tomcat: + uri-encoding: UTF-8 +spring: + influx: + url: http://192.168.12.129:8086 + password: 123456 + user: admin + mapper-location: com.itheima.sfbx.points.mapper + profiles: + active: dev + main: + allow-circular-references: true + allow-bean-definition-overriding: true + mvc: + pathmatch: + matching-strategy: ant_path_matcher + #应用配置 + application: + #应用名称 + name: points-web + cloud: + nacos: + discovery: + server-addr: 192.168.12.129:8848 # nacos注册中心 + group: SEATA_GROUP + service: ${spring.application.name} + config: + server-addr: 192.168.12.129:8848 # nacos配置中心地址 + group: SEATA_GROUP + file-extension: yml + shared-configs: # 共享配置 + - data-id: shared-spring-seata.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-spring-task.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-redisson.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false + - data-id: shared-mybatis-plus.yml #配置文件名-DataId + group: SEATA_GROUP + refresh: false +logging: + config: classpath:logback.xml + diff --git a/day02/sfbx-points/points-web/src/main/resources/generrator.properties b/day02/sfbx-points/points-web/src/main/resources/generrator.properties new file mode 100644 index 0000000..d7d95a2 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/generrator.properties @@ -0,0 +1,44 @@ +#\u6570\u636E\u5E93\u5730\u5740 +url=jdbc:mysql://192.168.12.129:3306/sfbx-log?serverTimezone=UTC&useUnicode=true&characterEncoding=utf-8&tinyInt1isBit=false +#\u6570\u636E\u5E93\u8D26\u53F7 +userName=root +#\u6570\u636E\u5E93\u5BC6\u7801 +password=pass +#services\u7684src\u8DEF\u5F84 +serviceProjectPath=D:/sfbx-cloud/sfbx-points/points-web-2 +#VO\u7684src\u8DEF\u5F84 +dtoOProjectPath=D:/sfbx-cloud/sfbx-points/points-web-2 +#\u4F5C\u8005 +author=Admin +#\u5305\u540D\u79F0 +parent=com.itheima.sfbx +#\u6A21\u5757\u540D\u79F0 +moduleName=points +#\u6570\u636E\u5E93\u8868\u524D\u7F00 +tablePrefix =tab_ +#\u9700\u8981\u751F\u6210\u7684\u8868\u540D\uFF0C\u4F7F\u7528\uFF0C\u5206\u5272 +tableName=tab_do_insure_category +#\u9700\u8981\u751F\u6210\u9644\u4EF6\u76F8\u5173\u7684\u8868 +#tablesFile =tab_category,tab_combination,tab_customer_card,tab_customer_info,tab_customer_relation,tab_insurance +tablesFile = +#pojo\u7684\u7236\u7C7B +SuperEntityClass = com.itheima.sfbx.framework.mybatisplus.basic.BasePojo +#pojo\u7684\u901A\u7528\u5B57\u6BB5 +superEntityColumns = id,create_time,update_time,create_by,update_by,data_state +#\u751F\u6210\u89C4\u5219 +constant=true +constant.ftl.path=/templates/constant.java +enums=true +enums.ftl.path=/templates/enums.java +dto=true +dto.ftl.path=/templates/dto.java +entity=true +entity.ftl.path=/templates/entity.java +mapper=true +mapper.ftl.path=/templates/mapper.java +service=true +service.ftl.path=/templates/service.java +serviceImpl=true +serviceImpl.ftl.path=/templates/serviceImpl.java +controller=true +controller.ftl.path=/templates/controller.java diff --git a/day02/sfbx-points/points-web/src/main/resources/logback.xml b/day02/sfbx-points/points-web/src/main/resources/logback.xml new file mode 100644 index 0000000..c51a400 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/logback.xml @@ -0,0 +1,53 @@ + + + + + + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + + + + ${LOG_HOME}/points-web-01.log.%d{yyyy-MM-dd}.log + + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}-%msg%n + + + + 10MB + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/constant.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/constant.java.ftl new file mode 100644 index 0000000..8ccef81 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/constant.java.ftl @@ -0,0 +1,26 @@ +package com.itheima.sfbx.points.constant; + +import com.itheima.sfbx.framework.commons.constant.basic.CacheConstant; + +/** +* @Description:${table.comment!}缓存常量 +*/ +public class ${entity}CacheConstant extends CacheConstant { + + //缓存父包 + public static final String PREFIX= "${controllerMappingHyphen}:"; + + //缓存父包 + public static final String BASIC= PREFIX+"basic"; + + //分布式锁前缀 + public static final String LOCK_PREFIX = PREFIX+"lock:"; + + //page分页 + public static final String PAGE= PREFIX+"page"; + + //list下拉框 + public static final String LIST= PREFIX+"list"; + + +} diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/controller.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/controller.java.ftl new file mode 100644 index 0000000..7a4b68d --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/controller.java.ftl @@ -0,0 +1,133 @@ +package ${package.Controller}; + +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.itheima.sfbx.insurance.enums.${entity}Enum; +import com.itheima.sfbx.framework.commons.basic.ResponseResult; +import com.itheima.sfbx.framework.commons.utils.ResponseResultBuild; +import org.springframework.web.bind.annotation.RequestMapping; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.itheima.sfbx.insurance.service.I${entity}Service; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +<#if restControllerStyle> +import org.springframework.web.bind.annotation.RestController; +<#else> +import org.springframework.stereotype.Controller; + +<#if superControllerClassPackage??> +import ${superControllerClassPackage}; + + +/** + * @Description:${table.comment!}响应接口 + */ +@Slf4j +@Api(tags = "${table.comment!}") +<#if restControllerStyle> +@RestController +<#else> +@Controller + +@RequestMapping("<#if controllerMappingHyphenStyle??>${controllerMappingHyphen}<#else>${table.entityPath}") +<#if kotlin> +class ${table.controllerName}<#if superControllerClass??> : ${superControllerClass}() +<#else> +<#if superControllerClass??> +public class ${table.controllerName} extends ${superControllerClass} { +<#else> +public class ${table.controllerName} { + + + @Autowired + I${entity}Service ${entity?uncap_first}Service; + + /*** + * @description 多条件查询${table.comment!}分页 + * @param ${entity?uncap_first}VO ${table.comment!}VO查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return: Page<${entity}VO> + */ + @PostMapping("page/{pageNum}/{pageSize}") + @ApiOperation(value = "${table.comment!}分页",notes = "${table.comment!}分页") + @ApiImplicitParams({ + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO"), + @ApiImplicitParam(paramType = "path",name = "pageNum",value = "页码",example = "1",dataType = "Integer"), + @ApiImplicitParam(paramType = "path",name = "pageSize",value = "每页条数",example = "10",dataType = "Integer") + }) + @ApiOperationSupport(includeParameters = {<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult> find${entity}VOPage( + @RequestBody ${entity}VO ${entity?uncap_first}VO, + @PathVariable("pageNum") int pageNum, + @PathVariable("pageSize") int pageSize) { + Page<${entity}VO> ${entity?uncap_first}VOPage = ${entity?uncap_first}Service.findPage(${entity?uncap_first}VO, pageNum, pageSize); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOPage); + } + + /** + * @Description 保存${table.comment!} + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return ${entity}VO + */ + @PutMapping + @ApiOperation(value = "保存${entity}",notes = "添加${entity}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.dataState",<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult<${entity}VO> create${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + ${entity}VO ${entity?uncap_first}VOResult = ${entity?uncap_first}Service.save(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOResult); + } + + /** + * @Description 修改${table.comment!} + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return Boolean 是否修改成功 + */ + @PatchMapping + @ApiOperation(value = "修改${table.comment!}",notes = "修改${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.id","${entity?uncap_first}VO.dataState",<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult update${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + Boolean flag = ${entity?uncap_first}Service.update(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(flag); + } + + /** + * @Description 删除${table.comment!} + * @param ${entity?uncap_first}VO 刪除条件:checkedIds 不可为空 + * @return + */ + @DeleteMapping + @ApiOperation(value = "删除${table.comment!}",notes = "删除${table.comment!}") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {"${entity?uncap_first}VO.checkedIds"}) + public ResponseResult delete${entity}(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + Boolean flag = ${entity?uncap_first}Service.delete(${entity?uncap_first}VO.getCheckedIds()); + return ResponseResultBuild.successBuild(flag); + } + + /*** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}VO ${table.comment!}VO对象 + * @return List<${entity}VO> + */ + @PostMapping("list") + @ApiOperation(value = "多条件查询${table.comment!}列表",notes = "多条件查询${table.comment!}列表") + @ApiImplicitParam(name = "${entity?uncap_first}VO",value = "${table.comment!}VO对象",required = true,dataType = "${entity}VO") + @ApiOperationSupport(includeParameters = {<#list table.fields as field>"${entity?uncap_first}VO.${field.propertyName}"<#if field_has_next>,}) + public ResponseResult> ${entity?uncap_first}List(@RequestBody ${entity}VO ${entity?uncap_first}VO) { + List<${entity}VO> ${entity?uncap_first}VOList = ${entity?uncap_first}Service.findList(${entity?uncap_first}VO); + return ResponseResultBuild.successBuild(${entity?uncap_first}VOList); + } + +} + diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/dto.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/dto.java.ftl new file mode 100644 index 0000000..c673049 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/dto.java.ftl @@ -0,0 +1,92 @@ +package com.itheima.sfbx.points.dto; + +import com.itheima.sfbx.framework.commons.dto.basic.BaseVO; +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.format.annotation.DateTimeFormat; +import java.math.BigDecimal; +import java.util.Date; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import java.util.List; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +public class ${entity}VO extends BaseVO { + + @Builder + public ${entity}VO(Long id,String dataState,<#list cfg.tablesFile as tableFiile><#if tableFiile==table.name>List fileVOs,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id, dataState); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + <#list cfg.tablesFile as tableFiile><#if tableFiile==table.name> + this.fileVOs=fileVOs; + + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.propertyType=='Long'> + @JsonFormat(shape = JsonFormat.Shape.STRING) + + <#if field.propertyType=='Date'> + @JsonDeserialize(using = LocalDateTimeDeserializer.class) + @JsonSerialize(using = LocalDateTimeSerializer.class) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + <#if swagger2> + @ApiModelProperty(value = "文件VO对象") + + private List fileVOs; + + + + @ApiModelProperty(value = "批量操作:主键ID") + private String[] checkedIds; +} diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/entity.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/entity.java.ftl new file mode 100644 index 0000000..a1f860a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/entity.java.ftl @@ -0,0 +1,156 @@ +package ${package.Entity}; + +<#list table.importPackages as pkg> +import ${pkg}; + +<#if swagger2> +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +<#if entityLombokModel> +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; +import lombok.EqualsAndHashCode; + + +/** + * @Description:${table.comment!} + */ +<#if entityLombokModel> +@Data +@NoArgsConstructor +<#if superEntityClass??> +@EqualsAndHashCode(callSuper = true) + <#else> +@EqualsAndHashCode(callSuper = false) + + +<#if table.convert> +@TableName("${table.name}") + +<#if swagger2> +@ApiModel(value="${entity}对象", description="${table.comment!}") + +<#if superEntityClass??> +public class ${entity} extends ${superEntityClass}<#if activeRecord><${entity}> { +<#elseif activeRecord> +public class ${entity} extends Model<${entity}> { +<#else> +public class ${entity} implements Serializable { + + +<#if entitySerialVersionUID> + private static final long serialVersionUID = 1L; + + + @Builder + public ${entity}(Long id,String dataState,<#list table.fields as field>${field.propertyType} ${field.propertyName}<#if field_has_next>,){ + super(id, dataState); + <#list table.fields as field> + this.${field.propertyName}=${field.propertyName}; + + } +<#-- ---------- BEGIN 字段循环遍历 ----------> +<#list table.fields as field> + <#if field.keyFlag> + <#assign keyPropertyName="${field.propertyName}"/> + + + <#if field.comment!?length gt 0> + <#if swagger2> + @ApiModelProperty(value = "${field.comment}") + <#else> + /** + * ${field.comment} + */ + + + <#if field.keyFlag> + <#-- 主键 --> + <#if field.keyIdentityFlag> + @TableId(value = "${field.name}", type = IdType.AUTO) + <#elseif idType??> + @TableId(value = "${field.name}", type = IdType.${idType}) + <#elseif field.convert> + @TableId("${field.name}") + + <#-- 普通字段 --> + <#elseif field.fill??> + <#-- ----- 存在字段填充设置 -----> + <#if field.convert> + @TableField(value = "${field.name}", fill = FieldFill.${field.fill}) + <#else> + @TableField(fill = FieldFill.${field.fill}) + + <#elseif field.convert> + @TableField("${field.name}") + + <#-- 乐观锁注解 --> + <#if (versionFieldName!"") == field.name> + @Version + + <#-- 逻辑删除注解 --> + <#if (logicDeleteFieldName!"") == field.name> + @TableLogic + + private ${field.propertyType} ${field.propertyName}; + +<#------------ END 字段循环遍历 ----------> + +<#if !entityLombokModel> + <#list table.fields as field> + <#if field.propertyType == "boolean"> + <#assign getprefix="is"/> + <#else> + <#assign getprefix="get"/> + + public ${field.propertyType} ${getprefix}${field.capitalName}() { + return ${field.propertyName}; + } + + <#if entityBuilderModel> + public ${entity} set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + <#else> + public void set${field.capitalName}(${field.propertyType} ${field.propertyName}) { + + this.${field.propertyName} = ${field.propertyName}; + <#if entityBuilderModel> + return this; + + } + + + +<#if entityColumnConstant> + <#list table.fields as field> + public static final String ${field.name?upper_case} = "${field.name}"; + + + +<#if activeRecord> + @Override + protected Serializable pkVal() { + <#if keyPropertyName??> + return this.${keyPropertyName}; + <#else> + return null; + + } + + +<#if !entityLombokModel> + @Override + public String toString() { + return "${entity}{" + + <#list table.fields as field> + <#if field_index==0> + "${field.propertyName}=" + ${field.propertyName} + + <#else> + ", ${field.propertyName}=" + ${field.propertyName} + + + + "}"; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/enums.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/enums.java.ftl new file mode 100644 index 0000000..12c016a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/enums.java.ftl @@ -0,0 +1,37 @@ +package com.itheima.sfbx.points.enums; + +import com.itheima.sfbx.framework.commons.enums.basic.IBaseEnum; + +/** +* @ClassName ${entity}Enum.java +* @Description ${table.comment!}枚举 +*/ + +public enum ${entity}Enum implements IBaseEnum { + + PAGE_FAIL(53001, "查询${table.comment!}分页失败"), + LIST_FAIL(53002, "查询${table.comment!}列表失败"), + FIND_ONE_FAIL(53003, "查询${table.comment!}对象失败"), + SAVE_FAIL(53004, "保存${table.comment!}失败"), + UPDATE_FAIL(53005, "修改${table.comment!}失败"), + DEL_FAIL(53006, "删除${table.comment!}失败") + ; + + private Integer code; + + private String msg; + + ${entity}Enum(Integer code, String msg) { + this.code = code; + this.msg = msg; + } + + public Integer getCode() { + return code; + } + + public String getMsg() { + return msg; + } + +} diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/mapper.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/mapper.java.ftl new file mode 100644 index 0000000..71b3a31 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/mapper.java.ftl @@ -0,0 +1,17 @@ +package ${package.Mapper}; + +import ${package.Entity}.${entity}; +import ${superMapperClassPackage}; +import org.apache.ibatis.annotations.Mapper; + +/** + * @Description:${table.comment!}Mapper接口 + */ +<#if kotlin> +interface ${table.mapperName} : ${superMapperClass}<${entity}> +<#else> +@Mapper +public interface ${table.mapperName} extends ${superMapperClass}<${entity}> { + +} + diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/mapper.xml.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/mapper.xml.ftl new file mode 100644 index 0000000..d9ca71c --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/mapper.xml.ftl @@ -0,0 +1,39 @@ + + + + +<#if enableCache> + + + + +<#if baseResultMap> + + +<#list table.fields as field> +<#if field.keyFlag><#--生成主键排在第一位--> + + + +<#list table.commonFields as field><#--生成公共字段 --> + + +<#list table.fields as field> +<#if !field.keyFlag><#--生成普通字段 --> + + + + + + +<#if baseColumnList> + + +<#list table.commonFields as field> + ${field.name}, + + ${table.fieldNames} + + + + diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/service.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/service.java.ftl new file mode 100644 index 0000000..d3fae6a --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/service.java.ftl @@ -0,0 +1,62 @@ +package ${package.Service}; + +import ${package.Entity}.${entity}; +import ${superServiceClassPackage}; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; + +import java.util.List; + +/** + * @Description:${table.comment!}服务类 + */ +<#if kotlin> +interface ${table.serviceName} : ${superServiceClass}<${entity}> +<#else> +public interface ${table.serviceName} extends ${superServiceClass}<${entity}> { + + /** + * @Description 多条件查询${table.comment!}分页 + * @param ${entity?uncap_first}VO ${table.comment!}查询条件 + * @param pageNum 页码 + * @param pageSize 每页条数 + * @return Page<${entity}VO> + */ + Page<${entity}VO> findPage(${entity}VO ${entity?uncap_first}VO, int pageNum, int pageSize); + + /** + * @Description 多条件查询${table.comment!} + * @param ${entity?uncap_first}Id 合同信息ID + * @return ${entity}VO + */ + ${entity}VO findById(String ${entity?uncap_first}Id); + + /** + * @Description ${table.comment!}新增 + * @param ${entity?uncap_first}VO ${table.comment!}查询条件 + * @return ${entity}VO + */ + ${entity}VO save(${entity}VO ${entity?uncap_first}VO); + + /** + * @Description ${table.comment!}修改 + * @param ${entity?uncap_first}VO ${table.comment!}对象 + * @return ${entity}VO + */ + Boolean update(${entity}VO ${entity?uncap_first}VO); + + /** + * @Description ${table.comment!}删除 + * @param checkedIds 选择中对象Ids + * @return Boolean + */ + Boolean delete(String[] checkedIds); + + /** + * @description 多条件查询${table.comment!}列表 + * @param ${entity?uncap_first}VO 查询条件 + * @return: List<${entity}VO> + */ + List<${entity}VO> findList(${entity}VO ${entity?uncap_first}VO); +} + diff --git a/day02/sfbx-points/points-web/src/main/resources/templates/serviceImpl.java.ftl b/day02/sfbx-points/points-web/src/main/resources/templates/serviceImpl.java.ftl new file mode 100644 index 0000000..e8bea25 --- /dev/null +++ b/day02/sfbx-points/points-web/src/main/resources/templates/serviceImpl.java.ftl @@ -0,0 +1,294 @@ +package ${package.ServiceImpl}; + +import ${package.Entity}.${entity}; +import ${package.Mapper}.${table.mapperName}; +import ${package.Service}.${table.serviceName}; +import ${superServiceImplClassPackage}; +import org.springframework.stereotype.Service; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import org.springframework.transaction.annotation.Transactional; +<#list cfg.tablesFile as tableFiile> +<#if tableFiile==table.name> +import com.itheima.sfbx.file.feign.FileBusinessFeign; +import com.itheima.sfbx.framework.commons.dto.file.FileVO; +import io.seata.spring.annotation.GlobalTransactional; + + +import com.itheima.sfbx.insurance.constant.${entity}CacheConstant; +import com.itheima.sfbx.insurance.dto.${entity}VO; +import com.itheima.sfbx.insurance.enums.${entity}Enum; +import com.itheima.sfbx.framework.commons.utils.BeanConv; +import com.itheima.sfbx.framework.commons.utils.EmptyUtil; +import com.itheima.sfbx.framework.commons.utils.ExceptionsUtil; +import com.itheima.sfbx.framework.commons.exception.ProjectException; +import com.google.common.collect.Lists; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.stream.Collectors; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.cache.annotation.CachePut; +import org.springframework.cache.annotation.Cacheable; +import org.springframework.cache.annotation.Caching; +import lombok.extern.slf4j.Slf4j; +/** + * @Description:${table.comment!}服务实现类 + */ +@Slf4j +@Service +<#if kotlin> +open class ${table.serviceImplName} : ${superServiceImplClass}<${table.mapperName}, ${entity}>(), ${table.serviceName} { + +} +<#else> +public class ${table.serviceImplName} extends ${superServiceImplClass}<${table.mapperName}, ${entity}> implements ${table.serviceName} { + + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @Autowired + FileBusinessFeign fileBusinessFeign; + + + + /*** + * @description ${table.comment!}多条件组合 + * @param ${entity?uncap_first}VO ${table.comment!} + * @return QueryWrapper查询条件 + */ + private QueryWrapper<${entity}> queryWrapper(${entity}VO ${entity?uncap_first}VO){ + QueryWrapper<${entity}> queryWrapper = new QueryWrapper<>(); + <#list table.fields as field> + //${field.comment}查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.get${field.propertyName?cap_first}())) { + queryWrapper.lambda().eq(${entity}::get${field.propertyName?cap_first},${entity?uncap_first}VO.get${field.propertyName?cap_first}()); + } + + //状态查询 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.getDataState())) { + queryWrapper.lambda().eq(${entity}::getDataState,${entity?uncap_first}VO.getDataState()); + } + //按创建时间降序 + queryWrapper.lambda().orderByDesc(${entity}::getCreateTime); + return queryWrapper; + } + + @Override + @Cacheable(value = ${entity}CacheConstant.PAGE,key ="#pageNum+'-'+#pageSize+'-'+#${entity?uncap_first}VO.hashCode()") + public Page<${entity}VO> findPage(${entity}VO ${entity?uncap_first}VO, int pageNum, int pageSize) { + try { + //构建分页对象 + Page<${entity}> ${entity}Page = new Page<>(pageNum,pageSize); + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = queryWrapper(${entity?uncap_first}VO); + //执行分页查询 + Page<${entity}VO> ${entity?uncap_first}VOPage = BeanConv.toPage( + page(${entity}Page, queryWrapper), ${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOPage)&& + !EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOPage.getRecords())){ + //获得所有业务主键ID + List ${entity?uncap_first}Ids = ${entity?uncap_first}VOPage.getRecords() + .stream().map(${entity}VO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(${entity?uncap_first}Ids)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + ${entity?uncap_first}VOPage.getRecords().forEach(${entity?uncap_first}VOHandler->{ + fileVOs.forEach(fileVO -> { + if (${entity?uncap_first}VOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + ${entity?uncap_first}VOHandler.setFileVOs(fileVOsHandler); + }); + } + + + //返回结果 + return ${entity?uncap_first}VOPage; + }catch (Exception e){ + log.error("${table.comment!}分页查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.PAGE_FAIL); + } + } + + @Override + @Cacheable(value = ${entity}CacheConstant.BASIC,key ="#${entity?uncap_first}Id") + public ${entity}VO findById(String ${entity?uncap_first}Id) { + try { + //执行查询 + return BeanConv.toBean(getById(${entity?uncap_first}Id),${entity}VO.class); + }catch (Exception e){ + log.error("${table.comment!}单条查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.FIND_ONE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true)}, + put={@CachePut(value =${entity}CacheConstant.BASIC,key = "#result.id")}) + public ${entity}VO save(${entity}VO ${entity?uncap_first}VO) { + try { + //转换${entity}VO为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}VO, ${entity}.class); + boolean flag = save(${entity?uncap_first}); + if (!flag){ + throw new RuntimeException("保存${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //保存附件信息 + if (EmptyUtil.isNullOrEmpty(${entity?uncap_first}VO.getFileVOs())){ + throw new RuntimeException("合同附件为空"); + } + //构建附件对象 + ${entity?uncap_first}VO.getFileVOs().forEach(fileVO -> { + fileVO.setBusinessId(${entity?uncap_first}.getId()); + }); + //调用附件接口 + List fileVOs = fileBusinessFeign.bindBatchFile(Lists.newArrayList(${entity?uncap_first}VO.getFileVOs())); + if (EmptyUtil.isNullOrEmpty(fileVOs)){ + throw new RuntimeException("合同附件绑定失败"); + } + + + //转换返回对象${entity}VO + ${entity}VO ${entity?uncap_first}VOHandler = BeanConv.toBean(${entity?uncap_first}, ${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + ${entity?uncap_first}VOHandler.setFileVOs(fileVOs); + + + return ${entity?uncap_first}VOHandler; + }catch (Exception e){ + log.error("保存${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.SAVE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.BASIC,key = "#${entity?uncap_first}VO.id")}) + public Boolean update(${entity}VO ${entity?uncap_first}VO) { + try { + //转换${entity}VO为${entity} + ${entity} ${entity?uncap_first} = BeanConv.toBean(${entity?uncap_first}VO, ${entity}.class); + boolean flag = updateById(${entity?uncap_first}); + if (!flag){ + throw new RuntimeException("修改${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //替换附件信息 + flag = fileBusinessFeign.replaceBindBatchFile(Lists.newArrayList(${entity?uncap_first}VO.getFileVOs())); + if (!flag){ + throw new RuntimeException("移除${table.comment!}附件失败"); + } + + + return flag; + }catch (Exception e){ + log.error("修改${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.UPDATE_FAIL); + } + } + + @Override + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + @GlobalTransactional + <#break> + + <#if !tableFiile_has_next> + @Transactional + + + @Caching(evict = {@CacheEvict(value = ${entity}CacheConstant.PAGE,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.LIST,allEntries = true), + @CacheEvict(value = ${entity}CacheConstant.BASIC,allEntries = true)}) + public Boolean delete(String[] checkedIds) { + try { + List idsLong = Arrays.asList(checkedIds) + .stream().map(Long::new).collect(Collectors.toList()); + boolean flag = removeByIds(idsLong); + if (!flag){ + throw new RuntimeException("删除${table.comment!}失败"); + } + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //删除附件 + flag = fileBusinessFeign.deleteByBusinessIds(Lists.newArrayList(idsLong)); + if (!flag){ + throw new RuntimeException("删除${table.comment!}附件失败"); + } + + + return flag; + }catch (Exception e){ + log.error("删除${table.comment!}异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.DEL_FAIL); + } + } + + @Override + @Cacheable(value = ${entity}CacheConstant.LIST,key ="#${entity?uncap_first}VO.hashCode()") + public List<${entity}VO> findList(${entity}VO ${entity?uncap_first}VO) { + try { + //构建查询条件 + QueryWrapper<${entity}> queryWrapper = queryWrapper(${entity?uncap_first}VO); + //执行列表查询 + List<${entity}VO> ${entity?uncap_first}VOs = BeanConv.toBeanList(list(queryWrapper),${entity}VO.class); + <#list cfg.tablesFile as tableFiile> + <#if tableFiile==table.name> + //构建补充信息 + if (!EmptyUtil.isNullOrEmpty(${entity?uncap_first}VOs)){ + //获得所有业务主键ID + List ${entity?uncap_first}Ids = ${entity?uncap_first}VOs.stream().map(${entity}VO::getId).collect(Collectors.toList()); + //调用fileBusinessFeign附件信息 + List fileVOs = fileBusinessFeign.findInBusinessIds(Lists.newArrayList(${entity?uncap_first}Ids)); + //构建附件处理List对象 + List fileVOsHandler = Lists.newArrayList(); + ${entity?uncap_first}VOs.forEach(${entity?uncap_first}VOHandler->{ + fileVOs.forEach(fileVO -> { + if (${entity?uncap_first}VOHandler.getId().equals(fileVO.getBusinessId())) + fileVOsHandler.add(fileVO); + }); + //补全附件信息 + ${entity?uncap_first}VOHandler.setFileVOs(fileVOsHandler); + }); + } + + + return ${entity?uncap_first}VOs; + }catch (Exception e){ + log.error("${table.comment!}列表查询异常:{}", ExceptionsUtil.getStackTraceAsString(e)); + throw new ProjectException(${entity}Enum.LIST_FAIL); + } + } +} + diff --git a/day02/sfbx-points/points-web/src/test/java/com/itheima/sfbx/insurance/PointsGenerator.java b/day02/sfbx-points/points-web/src/test/java/com/itheima/sfbx/insurance/PointsGenerator.java new file mode 100644 index 0000000..ebf89d2 --- /dev/null +++ b/day02/sfbx-points/points-web/src/test/java/com/itheima/sfbx/insurance/PointsGenerator.java @@ -0,0 +1,16 @@ +package com.itheima.sfbx.insurance; + + +import com.itheima.sfbx.framework.mybatisplus.generator.CodeGenerator; +import org.junit.Test; + +/** + * @Description:代码生成器 + */ +public class PointsGenerator { + + @Test + public void test(){ + CodeGenerator.autoGenerator(); + } +} diff --git a/day02/sfbx-points/pom.xml b/day02/sfbx-points/pom.xml new file mode 100644 index 0000000..5924aac --- /dev/null +++ b/day02/sfbx-points/pom.xml @@ -0,0 +1,24 @@ + + + + 4.0.0 + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + + sfbx-points + sfbx-points + pom + + + points-interface + + points-web + + + http://www.example.com + + diff --git a/day02/sfbx-rule/pom.xml b/day02/sfbx-rule/pom.xml new file mode 100644 index 0000000..e7006eb --- /dev/null +++ b/day02/sfbx-rule/pom.xml @@ -0,0 +1,22 @@ + + + + sfbx-cloud + com.itheima.sfbx + 2.0-SNAPSHOT + + 4.0.0 + + sfbx-rule + sfbx-rule + pom + + rule-client + rule-web + + + http://www.example.com + + diff --git a/day02/sfbx-rule/rule-client/pom.xml b/day02/sfbx-rule/rule-client/pom.xml new file mode 100644 index 0000000..f7c1081 --- /dev/null +++ b/day02/sfbx-rule/rule-client/pom.xml @@ -0,0 +1,27 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-rule + 2.0-SNAPSHOT + + rule-client + rule-client + + + + com.itheima.sfbx + framework-rule-base + 2.0-SNAPSHOT + + + org.slf4j + slf4j-jdk14 + + + + + diff --git a/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/SpringApplicationAware.java b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/SpringApplicationAware.java new file mode 100644 index 0000000..870b706 --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/SpringApplicationAware.java @@ -0,0 +1,38 @@ +package com.itheima.sfbx.framework.rule.config; + +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgeService; +import org.springframework.beans.BeansException; +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.stereotype.Component; + +/** + * SpringApplicationAware + * + * @author: wgl + * @describe: 上下文增强器 + * @date: 2022/12/28 10:10 + */ +@Component +@Configuration +public class SpringApplicationAware implements ApplicationContextAware { + + private static ApplicationContext ctx; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + ctx = applicationContext; + } + + + /** + * 获取上下文中的内容 + * @return + */ + public static ApplicationContext getApplicationContext(){ + return ctx; + } +} diff --git a/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/URuleServletRegistration.java b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/URuleServletRegistration.java new file mode 100644 index 0000000..a545dfd --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/URuleServletRegistration.java @@ -0,0 +1,17 @@ +package com.itheima.sfbx.framework.rule.config; + +import com.itheima.sfbx.framework.rule.KnowledgePackageReceiverServlet; +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Component; + +@SuppressWarnings({ "rawtypes", "unchecked" }) +@Component +public class URuleServletRegistration { + + @Bean + public ServletRegistrationBean registerURuleServlet(){ + return new ServletRegistrationBean(new KnowledgePackageReceiverServlet(),"/knowledgepackagereceiver"); + } +} + diff --git a/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/UruleBeanInit.java b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/UruleBeanInit.java new file mode 100644 index 0000000..25e47ab --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/config/UruleBeanInit.java @@ -0,0 +1,27 @@ +package com.itheima.sfbx.framework.rule.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ImportResource; +import org.springframework.context.annotation.PropertySource; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + +/** + * UruleBeanInit + * + * @author: wgl + * @describe: Urule配置类加载 + * @date: 2022/12/28 10:10 + */ +@Configuration +@ImportResource({"classpath:urule-core-context.xml"}) +@PropertySource(value = {"classpath:urule-core-context.properties"}) +public class UruleBeanInit { + @Bean + public PropertySourcesPlaceholderConfigurer propertySourceLoader() { + PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer(); + configurer.setIgnoreUnresolvablePlaceholders(true); + configurer.setOrder(1); + return configurer; + } +} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/dto/ScoreParams.java b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/dto/ScoreParams.java new file mode 100644 index 0000000..4e545ee --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/dto/ScoreParams.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.framework.rule.dto; + +import com.itheima.sfbx.framework.rule.model.Label; + +/** + * RuleParams + * + * @author: wgl + * @describe: 规则参数 + * @date: 2022/12/28 10:10 + */ +public class ScoreParams { + + @Label("得分") + private String score; + + + public ScoreParams() { + } + + public ScoreParams(String score) { + this.score = score; + } + + + public String getScore() { + return score; + } + + public void setScore(String score) { + this.score = score; + } + + @Override + public String toString() { + return "ScoreParams{" + + "score='" + score + '\'' + + '}'; + } +} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/template/RuleTemplate.java b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/template/RuleTemplate.java new file mode 100644 index 0000000..050d7f5 --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/java/com/itheima/sfbx/framework/rule/template/RuleTemplate.java @@ -0,0 +1,73 @@ +package com.itheima.sfbx.framework.rule.template; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.config.SpringApplicationAware; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import javax.annotation.PostConstruct; +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +/** + * RuleTemplate + * + * @author: wgl + * @describe: 规则调用模板 + * @date: 2022/12/28 10:10 + */ +@Service +public class RuleTemplate { + + + + /** + * 获取知识库里的包 + * + * @param serverName + * @param packageId + * @return + * @throws IOException + */ + public KnowledgePackage getPackage(String serverName, String packageId) throws IOException { + //创建一个KnowledgeSession对象 + KnowledgeService knowledgeService = (KnowledgeService) SpringApplicationAware.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge(serverName + "/" + packageId); + return knowledgePackage; + } + + /** + * 获取urule的session连接 + * + * @param serverName + * @param packageId + * @return + * @throws IOException + */ + public KnowledgeSession getSession(String serverName, String packageId) throws IOException { + KnowledgeService knowledgeService = (KnowledgeService) SpringApplicationAware.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + KnowledgePackage knowledgePackage = knowledgeService.getKnowledge(serverName + "/" + packageId); + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + return session; + } + + /** + * 获取urule的session连接 + * + * @param serverName + * @param packageId + * @return + * @throws IOException + */ + public void fireRules(Map data, String serverName, String packageId) throws IOException { + Object knowledgeService = Utils.getApplicationContext().getBean(KnowledgeService.BEAN_ID); + KnowledgePackage knowledgePackage = ((KnowledgeService)knowledgeService).getKnowledge(serverName + "/" + packageId); + KnowledgeSession session = KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + session.fireRules(data); + } +} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-client/src/main/resources/META-INF/spring.factories b/day02/sfbx-rule/rule-client/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000..9668286 --- /dev/null +++ b/day02/sfbx-rule/rule-client/src/main/resources/META-INF/spring.factories @@ -0,0 +1,4 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.itheima.sfbx.framework.rule.config.SpringApplicationAware,\ + com.itheima.sfbx.framework.rule.config.URuleServletRegistration,\ + com.itheima.sfbx.framework.rule.template.RuleTemplate \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/Dockerfile b/day02/sfbx-rule/rule-web/Dockerfile new file mode 100644 index 0000000..4e1ac9a --- /dev/null +++ b/day02/sfbx-rule/rule-web/Dockerfile @@ -0,0 +1,21 @@ +FROM openjdk:11-jdk +LABEL maintainer="研究院研发组 " + +# 时区修改为东八区 +ENV TZ=Asia/Shanghai +RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +WORKDIR /rule-web +ARG JAR_FILE=target/*.jar +ADD ${JAR_FILE} rule-web.jar + +EXPOSE 8080 + +ENV JAVA_OPTS="\ +-server \ +-Xms256m \ +-Xmx1024m \ +-XX:MetaspaceSize=256m \ +-XX:MaxMetaspaceSize=512m\ +-Dspring.profiles.active=test" +ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar $JAVA_OPTS rule-web.jar"] diff --git a/day02/sfbx-rule/rule-web/pom.xml b/day02/sfbx-rule/rule-web/pom.xml new file mode 100644 index 0000000..a59f9bd --- /dev/null +++ b/day02/sfbx-rule/rule-web/pom.xml @@ -0,0 +1,123 @@ + + + + 4.0.0 + + com.itheima.sfbx + sfbx-rule + 2.0-SNAPSHOT + + rule-web + + rule-web + + http://www.example.com + + + + com.itheima.sfbx + framework-rule-base + 2.0-SNAPSHOT + + + org.slf4j + slf4j-jdk14 + + + + + + mysql + mysql-connector-java + + + org.apache.jackrabbit + jackrabbit-core + 2.13.3 + + + derby + org.apache.derby + + + commons-dbcp + commons-dbcp + + + commons-pool + commons-pool + + + + + javax.jcr + jcr + 2.0 + + + commons-fileupload + commons-fileupload + 1.3.2 + + + org.apache.velocity + velocity + 1.7 + + + org.apache.poi + poi-ooxml + 3.16 + + + org.springframework.boot + spring-boot-configuration-processor + true + + + org.springframework.boot + spring-boot-starter-jdbc + + + org.springframework.boot + spring-boot-starter-logging + + + com.zaxxer + HikariCP + + + + + com.alibaba + druid-spring-boot-starter + 1.1.9 + + + org.springframework.boot + spring-boot-starter-web + + + org.projectlombok + lombok + + + + + rule-web + + + org.springframework.boot + spring-boot-maven-plugin + + + + repackage + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/RuleStart.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/RuleStart.java new file mode 100644 index 0000000..bc651b7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/RuleStart.java @@ -0,0 +1,14 @@ +package com.itheima.sfbx.rule; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +/** + * 本地规则引擎 + */ +@SpringBootApplication +public class RuleStart { + public static void main(String[] args) { + SpringApplication.run(RuleStart.class, args); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/action/LogAction.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/action/LogAction.java new file mode 100644 index 0000000..7a0ec24 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/action/LogAction.java @@ -0,0 +1,36 @@ +//package com.itheima.sfbx.rule.action; +// +//import cn.hutool.http.HttpRequest; +//import cn.hutool.http.HttpUtil; +//import com.itheima.sfbx.framework.rule.RuleException; +//import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionBean; +//import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethod; +//import com.itheima.sfbx.framework.rule.model.library.action.annotation.ActionMethodParameter; +//import org.apache.commons.lang.StringUtils; +//import org.springframework.stereotype.Component; +// +//import java.text.ParseException; +//import java.text.SimpleDateFormat; +//import java.util.Date; +// +///** +// * LogAction +// * +// * @author: wgl +// * @describe: TODO +// * @date: 2022/12/28 10:10 +// */ +//@ActionBean(name="日志") +//@Component +//public class LogAction { +// +// @ActionMethod(name="记录规则执行日志") +// @ActionMethodParameter(names={"校验结果","校验描述"}) +// public void saveLog(Boolean checkResult, String des){ +// String url = "http://127.0.0.1:7065/log/"+checkResult+"/"+des; +// HttpRequest get = HttpUtil.createGet(url); +// // 如果有cookie 或者token进行鉴权,可以在此添加 +// String body = get.execute().body(); +// System.out.println(body); +// } +//} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/IndexServlet.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/IndexServlet.java new file mode 100644 index 0000000..4a04f92 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/IndexServlet.java @@ -0,0 +1,18 @@ +package com.itheima.sfbx.rule.config; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +public class IndexServlet extends HttpServlet { + + private static final long serialVersionUID = 9155627652423910928L; + + @Override + protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + resp.sendRedirect(req.getContextPath()+"/urule/frame"); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/SpringApplicationUtil.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/SpringApplicationUtil.java new file mode 100644 index 0000000..a0f474e --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/SpringApplicationUtil.java @@ -0,0 +1,43 @@ +package com.itheima.sfbx.rule.config; + +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.stereotype.Component; + +@Component +public class SpringApplicationUtil implements ApplicationContextAware { + + private static ApplicationContext applicationContext; + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + SpringApplicationUtil.applicationContext = applicationContext; + } + + public ApplicationContext getApplicationContext() { + return applicationContext; + } + + /** + * 获取服务Bean + * @param name String 服务Bean名称 + * @return Object + */ + public static Object getBean(String name) { + if (applicationContext == null) + throw new RuntimeException("ApplicationContext为空"); + else + return applicationContext.getBean(name); + } + + /** + * 获取服务接口 + * @param impClz Class 实现类 + * @return bean + */ + public static T getBean(Class impClz){ + return applicationContext.getBean(impClz); + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleConsoleConfiguration.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleConsoleConfiguration.java new file mode 100644 index 0000000..c9a60ec --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleConsoleConfiguration.java @@ -0,0 +1,24 @@ +package com.itheima.sfbx.rule.config; + +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.ImportResource; +import org.springframework.context.annotation.PropertySource; +import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; + +/** + * URule配置 + * Created by zhaolong on 2018年4月1日. + */ +@Configuration +@ImportResource({"classpath:urule-console-context.xml"}) +@PropertySource(value = {"classpath:urule-console-context.properties"}) +public class URuleConsoleConfiguration { + @Bean + public PropertySourcesPlaceholderConfigurer propertySourceLoader() { + PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer(); + configurer.setIgnoreUnresolvablePlaceholders(true); + configurer.setOrder(1); + return configurer; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleServletRegistration.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleServletRegistration.java new file mode 100644 index 0000000..ece0e5b --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/URuleServletRegistration.java @@ -0,0 +1,23 @@ +package com.itheima.sfbx.rule.config; + +import org.springframework.boot.web.servlet.ServletRegistrationBean; +import org.springframework.context.annotation.Bean; +import org.springframework.stereotype.Component; + +import com.itheima.sfbx.rule.console.servlet.URuleServlet; + +@SuppressWarnings({ "rawtypes", "unchecked" }) +@Component +public class URuleServletRegistration { + + @Bean + public ServletRegistrationBean registerURuleServlet(){ + return new ServletRegistrationBean(new URuleServlet(),"/urule/*"); + } + + @Bean + public ServletRegistrationBean registerIndexServlet(){ + return new ServletRegistrationBean(new IndexServlet(),"/"); + } +} + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/mysql.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/mysql.xml new file mode 100644 index 0000000..27dd6e7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/config/mysql.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultEnvironmentProvider.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultEnvironmentProvider.java new file mode 100644 index 0000000..02c07e7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultEnvironmentProvider.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + +import java.util.ArrayList; +import java.util.List; + +import com.itheima.sfbx.rule.console.servlet.RequestContext; + +/** + * @author Jacky.gao + * @since 2016年5月25日 + */ +public class DefaultEnvironmentProvider implements EnvironmentProvider { + + @Override + public User getLoginUser(RequestContext context) { + DefaultUser user=new DefaultUser(); + user.setCompanyId("bstek"); + user.setUsername("admin"); + user.setAdmin(true); + return user; + } + + @Override + public List getUsers() { + DefaultUser user1=new DefaultUser(); + user1.setCompanyId("bstek"); + user1.setUsername("user1"); + DefaultUser user2=new DefaultUser(); + user2.setCompanyId("bstek"); + user2.setUsername("user2"); + DefaultUser user3=new DefaultUser(); + user3.setCompanyId("bstek"); + user3.setUsername("user3"); + List users=new ArrayList(); + users.add(user1); + users.add(user2); + users.add(user3); + return users; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultKnowledgePackageService.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultKnowledgePackageService.java new file mode 100644 index 0000000..fb59842 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultKnowledgePackageService.java @@ -0,0 +1,77 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + +import java.io.IOException; +import java.util.List; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBase; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBuilder; +import com.itheima.sfbx.framework.rule.builder.ResourceBase; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.model.ResourceItem; +import com.itheima.sfbx.rule.console.repository.model.ResourcePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgePackageService; + +/** + * @author Jacky.gao + * @since 2016年6月22日 + */ +public class DefaultKnowledgePackageService implements KnowledgePackageService{ + private KnowledgeBuilder knowledgeBuilder; + private RepositoryService repositoryService; + + @Override + public KnowledgePackage buildKnowledgePackage(String packageInfo) throws IOException{ + try{ + String[] info=packageInfo.split("/"); + if(info.length!=2){ + throw new RuleException("PackageInfo ["+packageInfo+"] is invalid. Correct such as \"projectName/packageId\"."); + } + String project=info[0]; + String packageId=info[1]; + List packages=repositoryService.loadProjectResourcePackages(project); + List list=null; + for(ResourcePackage p:packages){ + if(p.getId().equals(packageId)){ + list=p.getResourceItems(); + break; + } + } + if(list==null){ + throw new RuleException("PackageId ["+packageId+"] was not found in project ["+project+"]."); + } + ResourceBase resourceBase=knowledgeBuilder.newResourceBase(); + for(ResourceItem item:list){ + resourceBase.addResource(item.getPath(),item.getVersion()); + } + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(resourceBase); + KnowledgePackage knowledgePackage=knowledgeBase.getKnowledgePackage(); + return knowledgePackage; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void setKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) { + this.knowledgeBuilder = knowledgeBuilder; + } + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultRepositoryInteceptor.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultRepositoryInteceptor.java new file mode 100644 index 0000000..6250846 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultRepositoryInteceptor.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + + +/** + * @author Jacky.gao + * @since 2016年8月30日 + */ +public class DefaultRepositoryInteceptor implements RepositoryInteceptor { + + @Override + public void readFile(String file) { + + } + + @Override + public void saveFile(String file, String content) { + // TODO Auto-generated method stub + + } + + @Override + public void createFile(String file,String content) { + // TODO Auto-generated method stub + + } + + @Override + public void deleteFile(String file) { + // TODO Auto-generated method stub + + } + + @Override + public void renameFile(String oldFileName, String newFileName) { + // TODO Auto-generated method stub + + } + + @Override + public void createDir(String dir) { + // TODO Auto-generated method stub + + } + + @Override + public void createProject(String project) { + // TODO Auto-generated method stub + + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultUser.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultUser.java new file mode 100644 index 0000000..6ef2482 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/DefaultUser.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; +/** + * @author Jacky.gao + * @since 2016年5月25日 + */ +public class DefaultUser implements User{ + private String username; + private String companyId; + private boolean isAdmin; + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public String getCompanyId() { + return companyId; + } + public void setCompanyId(String companyId) { + this.companyId = companyId; + } + public boolean isAdmin() { + return isAdmin; + } + public void setAdmin(boolean isAdmin) { + this.isAdmin = isAdmin; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentProvider.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentProvider.java new file mode 100644 index 0000000..fc1772a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentProvider.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + +import java.util.List; + +import com.itheima.sfbx.rule.console.servlet.RequestContext; + +/** + * @author Jacky.gao + * @since 2015年3月27日 + */ +public interface EnvironmentProvider { + /** + * @param context 请求上下文对象 + * @return 返回当前登录用户 + */ + User getLoginUser(RequestContext context); + + /** + * @return 返回当前系统当中用户集合 ,供配置资源库权限使用 + */ + List getUsers(); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentUtils.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentUtils.java new file mode 100644 index 0000000..bf3cbf9 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/EnvironmentUtils.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + +import java.util.Collection; + +import org.springframework.context.ApplicationContext; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.servlet.RequestContext; + + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class EnvironmentUtils{ + private static EnvironmentProvider environmentProvider; + public static User getLoginUser(RequestContext context){ + if(environmentProvider==null){ + initEnvironmentProvider(); + } + return environmentProvider.getLoginUser(context); + } + public static void initEnvironmentProvider(){ + ApplicationContext context=Utils.getApplicationContext(); + Collection providers=context.getBeansOfType(EnvironmentProvider.class).values(); + if(providers.size()==0){ + environmentProvider=new DefaultEnvironmentProvider(); + }else{ + environmentProvider = providers.iterator().next(); + } + } + public static EnvironmentProvider getEnvironmentProvider(){ + if(environmentProvider==null){ + initEnvironmentProvider(); + } + return environmentProvider; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/RepositoryInteceptor.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/RepositoryInteceptor.java new file mode 100644 index 0000000..f814a88 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/RepositoryInteceptor.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; + + +/** + * @author Jacky.gao + * @since 2016年8月30日 + */ +public interface RepositoryInteceptor { + void readFile(String file); + void saveFile(String file, String content); + void createFile(String file, String content); + void deleteFile(String file); + void renameFile(String oldFileName, String newFileName); + void createDir(String dir); + void createProject(String project); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/User.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/User.java new file mode 100644 index 0000000..0cbc4a4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/User.java @@ -0,0 +1,34 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console; +/** + * @author Jacky.gao + * @since 2015年5月7日 + */ +public interface User { + /** + * @return 用户名 + */ + String getUsername(); + /** + * @return 所在公司ID + */ + String getCompanyId(); + /** + * @return 是否为管理员 + */ + boolean isAdmin(); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/exception/NoPermissionException.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/exception/NoPermissionException.java new file mode 100644 index 0000000..ac92be4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/exception/NoPermissionException.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.exception; + +/** + * @author Jacky.gao + * @since 2016年9月1日 + */ +public class NoPermissionException extends RuntimeException { + private static final long serialVersionUID = 441877650698078466L; + public NoPermissionException() { + super("Permission denied!"); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/BaseRepositoryService.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/BaseRepositoryService.java new file mode 100644 index 0000000..2fced96 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/BaseRepositoryService.java @@ -0,0 +1,265 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.DefaultRepositoryInteceptor; +import com.itheima.sfbx.rule.console.RepositoryInteceptor; +import com.itheima.sfbx.rule.console.repository.model.*; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.jackrabbit.core.RepositoryImpl; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import javax.jcr.*; +import javax.jcr.lock.LockManager; +import javax.jcr.version.Version; +import javax.jcr.version.VersionHistory; +import javax.jcr.version.VersionIterator; +import javax.jcr.version.VersionManager; +import java.io.InputStream; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2017年12月15日 + */ +public abstract class BaseRepositoryService implements RepositoryReader,ApplicationContextAware { + public static final String RES_PACKGE_FILE="___res__package__file__"; + public static final String CLIENT_CONFIG_FILE="___client_config__file__"; + public static final String RESOURCE_SECURITY_CONFIG_FILE="___resource_security_config__file__"; + protected final String DATA = "_data"; + protected final String DIR_TAG = "_dir"; + protected final String FILE = "_file"; + protected final String CRATE_USER = "_create_user"; + protected final String CRATE_DATE = "_create_date"; + protected final String VERSION_COMMENT="_version_comment"; + protected final String COMPANY_ID="_company_id"; + + protected RepositoryBuilder repositoryBuilder; + protected RepositoryImpl repository; + protected Session session; + protected VersionManager versionManager; + protected LockManager lockManager; + + protected RepositoryInteceptor repositoryInteceptor; + + @Override + public List loadProjects(String companyId) throws Exception{ + List projects=new ArrayList(); + Node rootNode=getRootNode(); + NodeIterator nodeIterator = rootNode.getNodes(); + while (nodeIterator.hasNext()) { + Node projectNode = nodeIterator.nextNode(); + if (!projectNode.hasProperty(FILE)) { + continue; + } + if(StringUtils.isNotEmpty(companyId)){ + if(projectNode.hasProperty(COMPANY_ID)){ + String id=projectNode.getProperty(COMPANY_ID).getString(); + if(!companyId.equals(id)){ + continue; + } + } + } + if(projectNode.getName().indexOf(RESOURCE_SECURITY_CONFIG_FILE)>-1){ + continue; + } + RepositoryFile projectFile = new RepositoryFile(); + projectFile.setType(Type.project); + projectFile.setName(projectNode.getName()); + projectFile.setFullPath("/" + projectNode.getName()); + projects.add(projectFile); + } + return projects; + } + + @Override + public List getVersionFiles(String path) throws Exception{ + path = processPath(path); + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + List files = new ArrayList(); + Node fileNode = rootNode.getNode(path); + VersionHistory versionHistory = versionManager.getVersionHistory(fileNode.getPath()); + VersionIterator iterator = versionHistory.getAllVersions(); + while (iterator.hasNext()) { + Version version = iterator.nextVersion(); + String versionName = version.getName(); + if (versionName.startsWith("jcr:")) { + continue; // skip root version + } + Node fnode = version.getFrozenNode(); + VersionFile file = new VersionFile(); + file.setName(version.getName()); + file.setPath(fileNode.getPath()); + Property prop = fnode.getProperty(CRATE_USER); + file.setCreateUser(prop.getString()); + prop = fnode.getProperty(CRATE_DATE); + file.setCreateDate(prop.getDate().getTime()); + if(fnode.hasProperty(VERSION_COMMENT)){ + prop=fnode.getProperty(VERSION_COMMENT); + file.setComment(prop.getString()); + } + files.add(file); + } + return files; + } + + @Override + public InputStream readFile(String path) throws Exception{ + return readFile(path, null); + } + + @Override + public InputStream readFile(String path,String version) throws Exception{ + if(StringUtils.isNotBlank(version)){ + repositoryInteceptor.readFile(path+":"+version); + return readVersionFile(path, version); + } + repositoryInteceptor.readFile(path); + Node rootNode=getRootNode(); + int colonPos = path.lastIndexOf(":"); + if (colonPos > -1) { + version = path.substring(colonPos + 1, path.length()); + path = path.substring(0, colonPos); + return readFile(path, version); + } + path = processPath(path); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + Node fileNode = rootNode.getNode(path); + Property property = fileNode.getProperty(DATA); + Binary fileBinary = property.getBinary(); + return fileBinary.getStream(); + } + + + private InputStream readVersionFile(String path, String version) throws Exception{ + path = processPath(path); + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + Node fileNode = rootNode.getNode(path); + VersionHistory versionHistory = versionManager.getVersionHistory(fileNode.getPath()); + Version v = versionHistory.getVersion(version); + Node fnode = v.getFrozenNode(); + Property property = fnode.getProperty(DATA); + Binary fileBinary = property.getBinary(); + return fileBinary.getStream(); + } + + @Override + public List loadProjectResourcePackages(String project) throws Exception { + Node rootNode=getRootNode(); + String filePath = processPath(project) + "/" + RES_PACKGE_FILE; + SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Node fileNode = rootNode.getNode(filePath); + Property property = fileNode.getProperty(DATA); + Binary fileBinary = property.getBinary(); + InputStream inputStream = fileBinary.getStream(); + String content = IOUtils.toString(inputStream, "utf-8"); + content = Utils.decodeURL(content); + inputStream.close(); + Document document = DocumentHelper.parseText(content); + Element rootElement = document.getRootElement(); + List packages = new ArrayList(); + for (Object obj : rootElement.elements()) { + if (!(obj instanceof Element)) { + continue; + } + Element element = (Element) obj; + if (!element.getName().equals("res-package")) { + continue; + } + ResourcePackage p = new ResourcePackage(); + String dateStr = element.attributeValue("create_date"); + if (dateStr != null) { + p.setCreateDate(sd.parse(dateStr)); + } + p.setId(element.attributeValue("id")); + p.setName(element.attributeValue("name")); + p.setProject(project); + List items = new ArrayList(); + for (Object o : element.elements()) { + if (!(o instanceof Element)) { + continue; + } + Element ele = (Element) o; + if (!ele.getName().equals("res-package-item")) { + continue; + } + ResourceItem item = new ResourceItem(); + item.setName(ele.attributeValue("name")); + item.setPackageId(p.getId()); + item.setPath(ele.attributeValue("path")); + item.setVersion(ele.attributeValue("version")); + items.add(item); + } + p.setResourceItems(items); + packages.add(p); + } + return packages; + } + + protected String processPath(String path) { + if (path.startsWith("/")) { + return path.substring(1, path.length()); + } + return path; + } + + protected Node getRootNode() throws Exception{ + return session.getRootNode(); + } + + public void setRepositoryBuilder(RepositoryBuilder repositoryBuilder) { + this.repositoryBuilder = repositoryBuilder; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + try { + repository = repositoryBuilder.getRepository(); + SimpleCredentials cred = new SimpleCredentials("admin", "admin".toCharArray()); + cred.setAttribute("AutoRefresh", true); + session = repository.login(cred, null); + versionManager = session.getWorkspace().getVersionManager(); + lockManager=session.getWorkspace().getLockManager(); + Collection repositoryInteceptors=applicationContext.getBeansOfType(RepositoryInteceptor.class).values(); + if(repositoryInteceptors.size()==0){ + repositoryInteceptor=new DefaultRepositoryInteceptor(); + }else{ + repositoryInteceptor=repositoryInteceptors.iterator().next(); + } + } catch (Exception ex) { + throw new RuleException(ex); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/ClientConfig.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/ClientConfig.java new file mode 100644 index 0000000..7adddef --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/ClientConfig.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; +/** + * @author Jacky.gao + * @since 2016年8月11日 + */ +public class ClientConfig { + private String name; + private String client; + private String project; + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getClient() { + return client; + } + public void setClient(String client) { + this.client = client; + } + public String getProject() { + return project; + } + public void setProject(String project) { + this.project = project; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/NodeLockException.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/NodeLockException.java new file mode 100644 index 0000000..9506ff3 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/NodeLockException.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import com.itheima.sfbx.framework.rule.RuleException; + +/** + * @author Jacky.gao + * @since 2017年11月22日 + */ +public class NodeLockException extends RuleException { + private static final long serialVersionUID = 5117384355737392800L; + public NodeLockException(String msg) { + super(msg); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/Repository.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/Repository.java new file mode 100644 index 0000000..9ab610f --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/Repository.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.util.List; + +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; + +public class Repository { + private RepositoryFile rootFile; + private List projectNames; + public RepositoryFile getRootFile() { + return rootFile; + } + public void setRootFile(RepositoryFile rootFile) { + this.rootFile = rootFile; + } + public List getProjectNames() { + return projectNames; + } + public void setProjectNames(List projectNames) { + this.projectNames = projectNames; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryBuilder.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryBuilder.java new file mode 100644 index 0000000..ba7f55f --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryBuilder.java @@ -0,0 +1,327 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.File; +import java.io.InputStream; +import java.util.Properties; +import java.util.logging.Logger; + +import javax.jcr.RepositoryException; +import javax.servlet.ServletContext; +import javax.sql.DataSource; +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.jackrabbit.core.RepositoryImpl; +import org.apache.jackrabbit.core.config.AccessManagerConfig; +import org.apache.jackrabbit.core.config.BeanConfig; +import org.apache.jackrabbit.core.config.ClusterConfig; +import org.apache.jackrabbit.core.config.DataSourceConfig; +import org.apache.jackrabbit.core.config.LoginModuleConfig; +import org.apache.jackrabbit.core.config.PersistenceManagerConfig; +import org.apache.jackrabbit.core.config.RepositoryConfig; +import org.apache.jackrabbit.core.config.RepositoryConfigurationParser; +import org.apache.jackrabbit.core.config.SecurityConfig; +import org.apache.jackrabbit.core.config.SecurityManagerConfig; +import org.apache.jackrabbit.core.config.VersioningConfig; +import org.apache.jackrabbit.core.data.DataStore; +import org.apache.jackrabbit.core.data.DataStoreFactory; +import org.apache.jackrabbit.core.data.FileDataStore; +import org.apache.jackrabbit.core.fs.FileSystem; +import org.apache.jackrabbit.core.fs.FileSystemException; +import org.apache.jackrabbit.core.fs.FileSystemFactory; +import org.apache.jackrabbit.core.fs.local.LocalFileSystem; +import org.apache.jackrabbit.core.query.QueryHandlerFactory; +import org.apache.jackrabbit.core.state.DefaultISMLocking; +import org.apache.jackrabbit.core.state.ISMLocking; +import org.apache.jackrabbit.core.state.ISMLockingFactory; +import org.apache.jackrabbit.core.util.CooperativeFileLock; +import org.apache.jackrabbit.core.util.RepositoryLockMechanism; +import org.apache.jackrabbit.core.util.RepositoryLockMechanismFactory; +import org.apache.jackrabbit.core.util.db.ConnectionFactory; +import org.springframework.beans.BeansException; +import org.springframework.beans.factory.InitializingBean; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; +import org.springframework.web.context.WebApplicationContext; +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +import com.itheima.sfbx.framework.rule.RuleException; + +/** + * @author Jacky.gao + * @since 2016年5月24日 + */ +public class RepositoryBuilder implements InitializingBean,ApplicationContextAware{ + private String repoHomeDir; + private Element workspaceTemplate; + private RepositoryImpl repository; + private String repositoryXml; + private ApplicationContext applicationContext; + private String repositoryDatasourceName; + public static String databaseType; + public static DataSource datasource; + private Logger log=Logger.getLogger(RepositoryBuilder.class.getName()); + public RepositoryImpl getRepository() { + return repository; + } + + private SecurityConfig buildSecurityConfig(){ + SecurityConfig securityConfig=new SecurityConfig("uruleRepoSecurity",buildSecurityManagerConfig(),buildAccessManagerConfig(),buildLoginModuleConfig()); + return securityConfig; + } + + private RepositoryLockMechanismFactory buildRepositoryLockMechanismFactory(){ + return new RepositoryLockMechanismFactory(){ + public RepositoryLockMechanism getRepositoryLockMechanism() throws RepositoryException { + return new CooperativeFileLock(); + } + }; + } + + private FileSystemFactory buildFileSystemFactory(final String dirName){ + return new FileSystemFactory() { + public FileSystem getFileSystem() throws RepositoryException { + try { + LocalFileSystem fs = new LocalFileSystem(); + fs.setPath(""+repoHomeDir+"/"+dirName); + fs.init(); + return fs; + } catch (FileSystemException e) { + throw new RepositoryException("File system initialization failure.", e); + } + } + }; + } + + private DataStoreFactory buildDataStoreFactory(){ + return new DataStoreFactory(){ + public DataStore getDataStore() throws RepositoryException { + FileDataStore datastore=new FileDataStore(); + datastore.setPath(""+repoHomeDir+"/repository/datastore"); + datastore.setMinRecordLength(100); + return null; + } + }; + } + + private VersioningConfig buildVersioningConfig(){ + String homeDir=""+repoHomeDir+"/version"; + FileSystemFactory fileSystemFactory=buildFileSystemFactory("version"); + PersistenceManagerConfig persistenceManagerConfig=buildPersistenceManagerConfig(); + ISMLockingFactory ismLockingFactory=buildISMLockingFactory(); + VersioningConfig versioningConfig=new VersioningConfig(homeDir,fileSystemFactory,persistenceManagerConfig,ismLockingFactory); + return versioningConfig; + } + + private ISMLockingFactory buildISMLockingFactory(){ + return new ISMLockingFactory(){ + public ISMLocking getISMLocking() throws RepositoryException { + return new DefaultISMLocking(); + } + }; + } + + private PersistenceManagerConfig buildPersistenceManagerConfig(){ + Properties prop=new Properties(); + BeanConfig beanConfig=new BeanConfig("org.apache.jackrabbit.core.persistence.bundle.BundleFsPersistenceManager",prop); + PersistenceManagerConfig persistenceManagerConfig=new PersistenceManagerConfig(beanConfig); + return persistenceManagerConfig; + } + + private SecurityManagerConfig buildSecurityManagerConfig(){ + Properties prop=new Properties(); + BeanConfig beanConfig=new BeanConfig("org.apache.jackrabbit.core.security.simple.SimpleSecurityManager",prop); + SecurityManagerConfig securityManagerConfig=new SecurityManagerConfig(beanConfig,"default",null); + return securityManagerConfig; + } + + private AccessManagerConfig buildAccessManagerConfig(){ + Properties prop=new Properties(); + BeanConfig beanConfig=new BeanConfig("org.apache.jackrabbit.core.security.simple.SimpleAccessManager",prop); + AccessManagerConfig accessManagerConfig=new AccessManagerConfig(beanConfig); + return accessManagerConfig; + } + + private LoginModuleConfig buildLoginModuleConfig(){ + Properties prop=new Properties(); + prop.put("anonymousId", "anonymous"); + prop.put("adminId", "admin"); + BeanConfig beanConfig=new BeanConfig("org.apache.jackrabbit.core.security.simple.SimpleLoginModule",prop); + LoginModuleConfig loginModuleConfig=new LoginModuleConfig(beanConfig); + return loginModuleConfig; + } + + private void initRepositoryByXml(String xml)throws Exception { + log.info("Build repository from user custom xml file..."); + InputStream inputStream=null; + try{ + inputStream=this.applicationContext.getResource(xml).getInputStream(); + String tempRepoHomeDir=System.getProperty("java.io.tmpdir"); +// String tempRepoHomeDir = "D:/repo2/"; + if(StringUtils.isNotBlank(tempRepoHomeDir) && tempRepoHomeDir.length()>1){ + if(tempRepoHomeDir.endsWith("/") || tempRepoHomeDir.endsWith("\\")){ + tempRepoHomeDir+="urule-temp-repo-home/"; + }else{ + tempRepoHomeDir+="/urule-temp-repo-home/"; + } + File tempDir=new File(tempRepoHomeDir); + clearTempDir(tempDir); + }else{ + tempRepoHomeDir=""; + } + RepositoryConfig repositoryConfig = RepositoryConfig.create(inputStream,tempRepoHomeDir); + repository=RepositoryImpl.create(repositoryConfig); + }finally{ + if(inputStream!=null){ + inputStream.close(); + } + } + } + + private void clearTempDir(File file){ + if(file.isDirectory()){ + for(File childFile:file.listFiles()){ + clearTempDir(childFile); + } + } + file.delete(); + } + + private void initDefaultRepository()throws Exception { + SecurityConfig securityConfig=buildSecurityConfig(); + FileSystemFactory fileSystemFactory=buildFileSystemFactory("repository"); + String workspaceDirectory=""+repoHomeDir+"/workspaces"; + String workspaceConfigDirectory=null; + String defaultWorkspace="default"; + int workspaceMaxIdleTime=0; + VersioningConfig versioningConfig=buildVersioningConfig(); + QueryHandlerFactory queryHandlerFactory=null; + ClusterConfig clusterConfig=null; + DataStoreFactory dataStoreFactory=buildDataStoreFactory(); + RepositoryLockMechanismFactory repositoryLockMechanismFactory=buildRepositoryLockMechanismFactory(); + DataSourceConfig dataSourceConfig=new DataSourceConfig(); + ConnectionFactory connectionFactory=new ConnectionFactory(); + RepositoryConfigurationParser repositoryConfigurationParser=new RepositoryConfigurationParser(new Properties()); + initWorkspaceTemplate(); + RepositoryConfig repositoryConfig = new RepositoryConfig(repoHomeDir, securityConfig, + fileSystemFactory, workspaceDirectory, + workspaceConfigDirectory, defaultWorkspace, + workspaceMaxIdleTime, workspaceTemplate, versioningConfig, + queryHandlerFactory, clusterConfig, dataStoreFactory, + repositoryLockMechanismFactory, dataSourceConfig, + connectionFactory, repositoryConfigurationParser); + repositoryConfig.init(); + repository=RepositoryImpl.create(repositoryConfig); + } + + private void initWorkspaceTemplate(){ + InputStream inputStream=null; + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); + try { + DocumentBuilder builder = factory.newDocumentBuilder(); + inputStream=applicationContext.getResource("classpath:workspace_template.xml").getInputStream(); +// inputStream=applicationContext.getResource("classpath:com/itheima/sfbx/framework/rule/console/repository/workspace_template.xml").getInputStream(); +// inputStream=applicationContext.getResource("classpath:com/itheima/sfbx/rule/config/workspace_template.xml").getInputStream(); + Document doc = builder.parse(inputStream); + workspaceTemplate=doc.getDocumentElement(); + } catch (Exception e) { + throw new RuleException(e); + } finally { + IOUtils.closeQuietly(inputStream); + } + } + + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext=applicationContext; + } + + private void initRepositoryDir(ApplicationContext applicationContext){ + if(applicationContext instanceof WebApplicationContext){ + WebApplicationContext context=(WebApplicationContext)applicationContext; + ServletContext servletContext=context.getServletContext(); + File file=new File(repoHomeDir); + if(!file.exists()){ + repoHomeDir=servletContext.getRealPath(repoHomeDir); + } + file=new File(repoHomeDir); + if(!file.exists()){ + throw new RuleException("Repository root dir "+repoHomeDir+" is not exist."); + } + }else{ + log.info("Current is not a standard web container,so can't resolve real path for repo home dir."); + } + log.info("Use \""+repoHomeDir+"\" as urule repository home directory."); + } + public void afterPropertiesSet() throws Exception { + if(StringUtils.isNotBlank(repositoryDatasourceName)){ + RepositoryBuilder.datasource=(DataSource)this.applicationContext.getBean(repositoryDatasourceName); + } + if(repository!=null){ + repository.shutdown(); + } + if(StringUtils.isNotBlank(repoHomeDir) && !repoHomeDir.equals("${urule.repository.dir}")){ + initRepositoryDir(applicationContext); + } + if(StringUtils.isNotBlank(repositoryXml)){ + initRepositoryByXml(repositoryXml); + }else if(RepositoryBuilder.datasource!=null){ + if(RepositoryBuilder.databaseType==null){ + throw new RuleException("You need config \"urule.repository.databasetype\" property when use spring datasource!"); + } + initRepositoryFromSpringDatasource(); + }else{ + if(StringUtils.isBlank(repoHomeDir)){ + throw new RuleException("You need config \"urule.repository.dir\" property for set repository home dir."); + } + initDefaultRepository(); + } + } + + private void initRepositoryFromSpringDatasource() throws Exception{ + System.out.println("Init repository from spring datasource ["+repositoryDatasourceName+"] with database type ["+RepositoryBuilder.databaseType+"]..."); + String xml="classpath:"+RepositoryBuilder.databaseType+".xml"; +// String xml="classpath:com/itheima/sfbx/rule/console/repository/database/configs/"+RepositoryBuilder.databaseType+".xml"; +// String xml="classpath:com/itheima/sfbx/rule/config/"+RepositoryBuilder.databaseType+".xml"; + initRepositoryByXml(xml); + } + + public void setRepoHomeDir(String repoHomeDir) { + this.repoHomeDir = repoHomeDir; + } + + + public void setRepositoryXml(String repositoryXml) { + this.repositoryXml = repositoryXml; + } + + public void setDatabaseType(String databaseType) { + RepositoryBuilder.databaseType = databaseType; + } + public void setRepositoryDatasourceName(String repositoryDatasourceName) { + this.repositoryDatasourceName = repositoryDatasourceName; + } + + public void destroy(){ + System.out.println("Shutdown repository..."); + repository.shutdown(); + System.out.println("Shutdown repository completed..."); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryReader.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryReader.java new file mode 100644 index 0000000..11fab38 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryReader.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.InputStream; +import java.util.List; + +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; +import com.itheima.sfbx.rule.console.repository.model.ResourcePackage; +import com.itheima.sfbx.rule.console.repository.model.VersionFile; + +/** + * @author Jacky.gao + * @since 2017年12月15日 + */ +public interface RepositoryReader { + public static final String BEAN_ID=RepositoryService.BEAN_ID; + /** + * 加载指定的companyId下创建的所有的项目信息 + * @param companyId 指定的公司ID + * @return 返回所有的项目信息 + * @throws Exception 抛出异常 + */ + List loadProjects(String companyId) throws Exception; + /** + * 读取指定的最新版本的文件 + * @param path 文件考路径 + * @return 返回文件内容 + * @throws Exception 抛出异常 + */ + InputStream readFile(String path) throws Exception; + /** + * 加载指定项目下的知识包信息 + * @param project 项目名称 + * @return 返回已定义的知识包信息 + * @throws Exception 抛出异常 + */ + List loadProjectResourcePackages(String project) throws Exception; + /** + * 获取指定路径文件的所有版本信息 + * @param path 文件路径 + * @return 返回版本信息列表 + * @throws Exception + */ + List getVersionFiles(String path) throws Exception; + + /** + * 读取指定版本文件 + * @param path 文件路径 + * @param version 文件版本号 + * @return 返回文件内容 + * @throws Exception 抛出异常 + */ + InputStream readFile(String path, String version) throws Exception; +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryRefactor.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryRefactor.java new file mode 100644 index 0000000..35dbe64 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryRefactor.java @@ -0,0 +1,102 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.RepositoryException; + +import org.apache.tika.io.IOUtils; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; + +/** + * @author Jacky.gao + * @since 2016年5月25日 + */ +public class RepositoryRefactor { + private RepositoryService repositoryService; + public RepositoryRefactor(RepositoryService repositoryService) { + this.repositoryService=repositoryService; + } + + public List getReferenceFiles(Node rootNode,String path,String searchText) throws Exception{ + List referenceFiles=new ArrayList(); + List files=getFiles(rootNode, path); + for(String nodePath:files){ + InputStream inputStream=repositoryService.readFile(nodePath,null); + try { + String content = IOUtils.toString(inputStream); + inputStream.close(); + boolean containPath=content.contains(path); + boolean containText=content.contains(searchText); + if(containPath && containText){ + referenceFiles.add(nodePath); + } + } catch (IOException e) { + throw new RuleException(e); + } + } + return referenceFiles; + } + + public List getFiles(Node rootNode,String path){ + String project=getProject(path); + try{ + List list=new ArrayList(); + Node projectNode=rootNode.getNode(project); + buildPath(list, projectNode); + return list; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + private void buildPath(List list, Node parentNode) throws RepositoryException { + NodeIterator nodeIterator=parentNode.getNodes(); + while(nodeIterator.hasNext()){ + Node node=nodeIterator.nextNode(); + String nodePath=node.getPath(); + if(nodePath.endsWith(FileType.Ruleset.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.UL.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.DecisionTable.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.ScriptDecisionTable.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.DecisionTree.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.RuleFlow.toString())){ + list.add(nodePath); + } + buildPath(list,node); + } + } + + private String getProject(String path){ + if(path.startsWith("/")){ + path=path.substring(1); + } + int pos=path.indexOf("/"); + return path.substring(0,pos); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryResourceProvider.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryResourceProvider.java new file mode 100644 index 0000000..665fda0 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryResourceProvider.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.InputStream; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.builder.resource.Resource; +import com.itheima.sfbx.framework.rule.builder.resource.ResourceProvider; + +/** + * @author Jacky.gao + * @since 2015年3月25日 + */ +public class RepositoryResourceProvider implements ResourceProvider { + public static final String JCR="jcr:"; + private RepositoryService repositoryService; + + @Override + public Resource provide(String path,String version) { + String newpath=path.substring(4,path.length()); + InputStream inputStream=null; + try { + if(StringUtils.isEmpty(version) || version.equals("LATEST")){ + inputStream=repositoryService.readFile(newpath,null); + }else{ + inputStream=repositoryService.readFile(newpath,version); + } + String content=IOUtils.toString(inputStream,"utf-8"); + IOUtils.closeQuietly(inputStream); + return new Resource(content,path); + } catch (Exception e) { + throw new RuleException(e); + } + } + + public boolean support(String path) { + return path.startsWith(JCR); + } + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryService.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryService.java new file mode 100644 index 0000000..e68ade7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryService.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.InputStream; +import java.io.OutputStream; +import java.util.List; + +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; +import com.itheima.sfbx.rule.console.repository.model.VersionFile; +import com.itheima.sfbx.rule.console.servlet.permission.UserPermission; + +/** + * @author Jacky.gao + * @since 2015年3月24日 + */ +public interface RepositoryService extends RepositoryReader{ + public static final String BEAN_ID="urule.repositoryService"; + boolean fileExistCheck(String filePath) throws Exception; + RepositoryFile createProject(String projectName, User user, boolean classify) throws Exception; + void createDir(String path, User user) throws Exception; + void createFile(String path, String content, User user) throws Exception; + void saveFile(String path, String content, boolean newVersion, String versionComment, User user) throws Exception; + void deleteFile(String path, User user)throws Exception; + void lockPath(String path, User user) throws Exception; + void unlockPath(String path, User user) throws Exception; + Repository loadRepository(String project, User user, boolean classify, FileType[] types, String searchFileName) throws Exception; + void fileRename(String path, String newPath) throws Exception; + List getReferenceFiles(String path, String searchText) throws Exception; + InputStream readFile(String path, String version) throws Exception; + List getVersionFiles(String path) throws Exception; + void exportXml(String projectPath, OutputStream outputStream)throws Exception; + void importXml(InputStream inputStream, boolean overwrite)throws Exception; + List getDirectories(String project) throws Exception; + List loadClientConfigs(String project)throws Exception; + List loadResourceSecurityConfigs(String companyId) throws Exception; +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryServiceImpl.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryServiceImpl.java new file mode 100644 index 0000000..ede5857 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/RepositoryServiceImpl.java @@ -0,0 +1,936 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.List; + +import javax.jcr.Binary; +import javax.jcr.ImportUUIDBehavior; +import javax.jcr.Node; +import javax.jcr.NodeIterator; +import javax.jcr.Property; +import javax.jcr.RepositoryException; +import javax.jcr.lock.Lock; +import javax.jcr.nodetype.NodeType; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.jackrabbit.value.BinaryImpl; +import org.apache.jackrabbit.value.DateValue; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; +import org.springframework.context.ApplicationContextAware; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.exception.NoPermissionException; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.rule.console.repository.model.LibType; +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; +import com.itheima.sfbx.rule.console.repository.model.Type; +import com.itheima.sfbx.rule.console.repository.permission.PermissionService; +import com.itheima.sfbx.rule.console.servlet.permission.ProjectConfig; +import com.itheima.sfbx.rule.console.servlet.permission.UserPermission; + +/** + * @author Jacky.gao + * @since 2016年5月24日 + */ +public class RepositoryServiceImpl extends BaseRepositoryService implements RepositoryService, ApplicationContextAware { + private PermissionService permissionService; + + @Override + public List loadResourceSecurityConfigs(String companyId) throws Exception{ + List configs=new ArrayList(); + String filePath=RESOURCE_SECURITY_CONFIG_FILE+(companyId == null ? "" : companyId); + Node rootNode=getRootNode(); + Node fileNode = rootNode.getNode(filePath); + Property property = fileNode.getProperty(DATA); + Binary fileBinary = property.getBinary(); + InputStream inputStream = fileBinary.getStream(); + String content = IOUtils.toString(inputStream, "utf-8"); + inputStream.close(); + Document document = DocumentHelper.parseText(content); + Element rootElement = document.getRootElement(); + for (Object obj : rootElement.elements()) { + if (!(obj instanceof Element)) { + continue; + } + Element element = (Element) obj; + if (!element.getName().equals("user-permission")) { + continue; + } + UserPermission userResource=new UserPermission(); + userResource.setUsername(element.attributeValue("username")); + userResource.setProjectConfigs(parseProjectConfigs(element)); + configs.add(userResource); + } + return configs; + } + + private List parseProjectConfigs(Element element){ + List list=new ArrayList(); + for (Object obj : element.elements()) { + if (!(obj instanceof Element)) { + continue; + } + Element ele = (Element) obj; + if (!ele.getName().equals("project-config")) { + continue; + } + ProjectConfig config=new ProjectConfig(); + config.setProject(ele.attributeValue("project")); + config.setReadProject(parseBooleanValue(ele, "read-project")); + + config.setReadPackage(parseBooleanValue(ele, "read-package")); + config.setWritePackage(parseBooleanValue(ele, "write-package")); + + config.setReadVariableFile(parseBooleanValue(ele, "read-variable-file")); + config.setWriteVariableFile(parseBooleanValue(ele, "write-variable-file")); + + config.setReadParameterFile(parseBooleanValue(ele, "read-parameter-file")); + config.setWriteParameterFile(parseBooleanValue(ele, "write-parameter-file")); + + config.setReadConstantFile(parseBooleanValue(ele, "read-constant-file")); + config.setWriteConstantFile(parseBooleanValue(ele, "write-constant-file")); + + config.setReadActionFile(parseBooleanValue(ele, "read-action-file")); + config.setWriteActionFile(parseBooleanValue(ele, "write-action-file")); + + config.setReadRuleFile(parseBooleanValue(ele, "read-rule-file")); + config.setWriteRuleFile(parseBooleanValue(ele, "write-rule-file")); + + config.setReadScorecardFile(parseBooleanValue(ele, "read-scorecard-file")); + config.setWriteScorecardFile(parseBooleanValue(ele, "write-scorecard-file")); + + config.setReadDecisionTableFile(parseBooleanValue(ele, "read-decision-table-file")); + config.setWriteDecisionTableFile(parseBooleanValue(ele, "write-decision-table-file")); + + config.setReadDecisionTreeFile(parseBooleanValue(ele, "read-decision-tree-file")); + config.setWriteDecisionTreeFile(parseBooleanValue(ele, "write-decision-tree-file")); + + config.setReadFlowFile(parseBooleanValue(ele, "read-flow-file")); + config.setWriteFlowFile(parseBooleanValue(ele, "write-flow-file")); + list.add(config); + } + return list; + } + + private boolean parseBooleanValue(Element element,String attributeName){ + if(element.attributeValue(attributeName)!=null){ + return Boolean.valueOf(element.attributeValue(attributeName)); + } + return false; + } + + @Override + public List loadClientConfigs(String project) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + List clients=new ArrayList(); + Node rootNode=getRootNode(); + String filePath = processPath(project) + "/" + CLIENT_CONFIG_FILE; + Node fileNode = rootNode.getNode(filePath); + Property property = fileNode.getProperty(DATA); + Binary fileBinary = property.getBinary(); + InputStream inputStream = fileBinary.getStream(); + String content = IOUtils.toString(inputStream, "utf-8"); + inputStream.close(); + Document document = DocumentHelper.parseText(content); + Element rootElement = document.getRootElement(); + for (Object obj : rootElement.elements()) { + if (!(obj instanceof Element)) { + continue; + } + Element element = (Element) obj; + if (!element.getName().equals("item")) { + continue; + } + ClientConfig client = new ClientConfig(); + client.setName(element.attributeValue("name")); + client.setClient(element.attributeValue("client")); + client.setProject(project); + clients.add(client); + } + return clients; + } + + @Override + public List getDirectories(String project) throws Exception { + Node rootNode=getRootNode(); + NodeIterator nodeIterator = rootNode.getNodes(); + Node targetProjectNode = null; + while (nodeIterator.hasNext()) { + Node projectNode = nodeIterator.nextNode(); + if (!projectNode.hasProperty(FILE)) { + continue; + } + String projectName = projectNode.getName(); + if (project != null && !project.equals(projectName)) { + continue; + } + targetProjectNode = projectNode; + break; + } + if (targetProjectNode == null) { + throw new RuleException("Project [" + project + "] not exist."); + } + List fileList = new ArrayList(); + RepositoryFile root = new RepositoryFile(); + root.setName("根目录"); + String projectPath = targetProjectNode.getPath(); + root.setFullPath(projectPath); + fileList.add(root); + NodeIterator projectNodeIterator = targetProjectNode.getNodes(); + while (projectNodeIterator.hasNext()) { + Node dirNode = projectNodeIterator.nextNode(); + if (!dirNode.hasProperty(DIR_TAG)) { + continue; + } + RepositoryFile file = new RepositoryFile(); + file.setName(dirNode.getPath().substring(projectPath.length())); + file.setFullPath(dirNode.getPath()); + fileList.add(file); + buildDirectories(dirNode, fileList, projectPath); + } + return fileList; + } + + private void buildDirectories(Node node, List fileList, String projectPath) throws Exception { + NodeIterator nodeIterator = node.getNodes(); + while (nodeIterator.hasNext()) { + Node dirNode = nodeIterator.nextNode(); + if (!dirNode.hasProperty(FILE)) { + continue; + } + if (!dirNode.hasProperty(DIR_TAG)) { + continue; + } + RepositoryFile file = new RepositoryFile(); + file.setName(dirNode.getPath().substring(projectPath.length())); + file.setFullPath(dirNode.getPath()); + buildDirectories(dirNode, fileList, projectPath); + fileList.add(file); + } + } + + @Override + public Repository loadRepository(String project,User user,boolean classify,FileType[] types,String searchFileName) throws Exception{ + String companyId=user.getCompanyId(); + createSecurityConfigFile(user); + if(project!=null && project.startsWith("/")){ + project=project.substring(1,project.length()); + } + Repository repo=new Repository(); + List projectNames=new ArrayList(); + repo.setProjectNames(projectNames); + RepositoryFile rootFile = new RepositoryFile(); + rootFile.setFullPath("/"); + rootFile.setName("项目列表"); + rootFile.setType(Type.root); + Node rootNode=getRootNode(); + NodeIterator nodeIterator = rootNode.getNodes(); + while (nodeIterator.hasNext()) { + Node projectNode = nodeIterator.nextNode(); + if (!projectNode.hasProperty(FILE)) { + continue; + } + if(StringUtils.isNotEmpty(companyId)){ + if(projectNode.hasProperty(COMPANY_ID)){ + String id=projectNode.getProperty(COMPANY_ID).getString(); + if(!companyId.equals(id)){ + continue; + } + } + } + String projectName = projectNode.getName(); + if(projectName.indexOf(RESOURCE_SECURITY_CONFIG_FILE)>-1){ + continue; + } + if (StringUtils.isNotBlank(project) && !project.equals(projectName)) { + continue; + } + if(!permissionService.projectHasPermission(projectNode.getPath())){ + continue; + } + if(StringUtils.isBlank(project)){ + projectNames.add(projectName); + } + RepositoryFile projectFile=buildProjectFile(projectNode,types,classify,searchFileName); + rootFile.addChild(projectFile, false); + } + repo.setRootFile(rootFile); + return repo; + } + + private RepositoryFile buildProjectFile(Node projectNode,FileType[] types,boolean classify,String searchFileName) throws Exception{ + RepositoryFile projectFile = new RepositoryFile(); + projectFile.setType(Type.project); + projectFile.setName(projectNode.getName()); + projectFile.setFullPath("/" + projectNode.getName()); + RepositoryFile resDir = new RepositoryFile(); + resDir.setFullPath(projectFile.getFullPath()); + resDir.setName("资源"); + if((types==null || types.length==0) && permissionService.projectPackageHasReadPermission(projectNode.getPath())){ + RepositoryFile packageFile = new RepositoryFile(); + packageFile.setName("知识包"); + packageFile.setType(Type.resourcePackage); + packageFile.setFullPath(projectFile.getFullPath()); + projectFile.addChild(packageFile, false); + } + if(classify){ + resDir.setType(Type.resource); + createResourceCategory(projectNode, resDir,types,searchFileName); + }else{ + resDir.setType(Type.all); + buildResources(projectNode, resDir, types,searchFileName); + } + projectFile.addChild(resDir, false); + return projectFile; + } + + private void buildResources(Node projectNode, RepositoryFile libDir,FileType[] types,String searchFileName) throws Exception{ + FileType[] fileTypes=types; + if(types==null || types.length==0){ + fileTypes = new FileType[] { FileType.VariableLibrary, + FileType.ParameterLibrary, FileType.ConstantLibrary, + FileType.ActionLibrary, FileType.Ruleset, + FileType.RuleFlow, FileType.DecisionTable, + FileType.DecisionTree, FileType.ScriptDecisionTable, + FileType.UL,FileType.Scorecard }; + } + libDir.setLibType(LibType.all); + buildNodes(projectNode.getNodes(), libDir, fileTypes,Type.all,searchFileName); + } + + private void createResourceCategory(Node projectNode, RepositoryFile libDir,FileType[] types,String searchFileName) throws Exception{ + RepositoryFile subLib = buildLibFile(libDir,"库",LibType.res); + subLib.setType(Type.lib); + libDir.addChild(subLib, false); + FileType[] librarySubTypes = types; + if(types==null || types.length==0){ + librarySubTypes=new FileType[] { FileType.VariableLibrary, FileType.ParameterLibrary,FileType.ConstantLibrary, FileType.ActionLibrary }; + } + buildNodes(projectNode.getNodes(), subLib, librarySubTypes,Type.lib,searchFileName); + + RepositoryFile rulesLib = buildLibFile(libDir,"决策集",LibType.ruleset); + rulesLib.setFullPath(libDir.getFullPath()); + rulesLib.setType(Type.ruleLib); + + RepositoryFile decisionTableLib = buildLibFile(libDir,"决策表",LibType.decisiontable); + decisionTableLib.setFullPath(libDir.getFullPath()); + decisionTableLib.setType(Type.decisionTableLib); + + RepositoryFile decisionTreeLib = buildLibFile(libDir,"决策树",LibType.decisiontree); + decisionTreeLib.setFullPath(libDir.getFullPath()); + decisionTreeLib.setType(Type.decisionTreeLib); + + RepositoryFile scorecardLib = buildLibFile(libDir,"评分卡",LibType.scorecard); + scorecardLib.setFullPath(libDir.getFullPath()); + scorecardLib.setType(Type.scorecardLib); + + RepositoryFile flowLib = buildLibFile(libDir,"决策流",LibType.ruleflow); + flowLib.setFullPath(libDir.getFullPath()); + flowLib.setType(Type.flowLib); + + libDir.addChild(rulesLib, false); + libDir.addChild(decisionTableLib, false); + libDir.addChild(decisionTreeLib, false); + libDir.addChild(scorecardLib, false); + libDir.addChild(flowLib, false); + + FileType[] libraryRuleTypes = types; + if(types==null || types.length==0){ + libraryRuleTypes=new FileType[] { FileType.Ruleset, FileType.UL }; + } + + FileType[] libraryDecisionTypes = types; + if(types==null || types.length==0){ + libraryDecisionTypes = new FileType[] { FileType.DecisionTable, FileType.ScriptDecisionTable }; + } + FileType[] libraryDecisionTreeTypes = types; + if(types==null || types.length==0){ + libraryDecisionTreeTypes = new FileType[] { FileType.DecisionTree }; + } + + FileType[] libraryFlowTypes = types; + if(types==null || types.length==0){ + libraryFlowTypes = new FileType[] { FileType.RuleFlow }; + } + + FileType[] libraryScorecardTypes = types; + if(types==null || types.length==0){ + libraryScorecardTypes = new FileType[] { FileType.Scorecard }; + } + + buildNodes(projectNode.getNodes(), rulesLib, libraryRuleTypes,Type.ruleLib,searchFileName); + buildNodes(projectNode.getNodes(), decisionTableLib, libraryDecisionTypes,Type.decisionTableLib,searchFileName); + buildNodes(projectNode.getNodes(), decisionTreeLib, libraryDecisionTreeTypes,Type.decisionTreeLib,searchFileName); + buildNodes(projectNode.getNodes(), scorecardLib, libraryScorecardTypes,Type.scorecardLib,searchFileName); + buildNodes(projectNode.getNodes(), flowLib, libraryFlowTypes,Type.flowLib,searchFileName); + } + + private RepositoryFile buildLibFile(RepositoryFile libraryDir,String name,LibType libType) { + RepositoryFile subLib = new RepositoryFile(); + subLib.setFullPath(libraryDir.getFullPath()); + subLib.setName(name); + subLib.setLibType(libType); + return subLib; + } + + private void buildNodes(NodeIterator nodeIterator, RepositoryFile parent, FileType[] types,Type folderType,String searchFileName) throws Exception{ + LibType libType=parent.getLibType(); + while (nodeIterator.hasNext()) { + Node fileNode = nodeIterator.nextNode(); + if (!fileNode.hasProperty(FILE)) { + continue; + } + RepositoryFile file = new RepositoryFile(); + file.setLibType(libType); + String name = fileNode.getName(); + if (name.toLowerCase().indexOf(RES_PACKGE_FILE) > -1 || name.toLowerCase().indexOf(CLIENT_CONFIG_FILE) > -1 || name.toLowerCase().indexOf(RESOURCE_SECURITY_CONFIG_FILE) > -1) { + continue; + } + if (!fileNode.hasProperty(DIR_TAG)) { + if(!permissionService.fileHasReadPermission(fileNode.getPath())){ + continue; + } + FileType fileType=null; + boolean add = false; + for (FileType type : types) { + if (name.toLowerCase().endsWith(type.toString())) { + fileType=type; + add = true; + break; + } + } + if (!add) { + continue; + } + + if(libType.equals(LibType.res)){ + if(!fileType.equals(FileType.ActionLibrary) && !fileType.equals(FileType.ParameterLibrary) && !fileType.equals(FileType.ConstantLibrary) && !fileType.equals(FileType.VariableLibrary)) { + continue; + } + } + + if(libType.equals(LibType.decisiontable)){ + if(!fileType.equals(FileType.ScriptDecisionTable) && !fileType.equals(FileType.DecisionTable)) { + continue; + } + } + + if(libType.equals(LibType.decisiontree)){ + if(!fileType.equals(FileType.DecisionTree)) { + continue; + } + } + + if(libType.equals(LibType.ruleflow)){ + if(!fileType.equals(FileType.RuleFlow)) { + continue; + } + } + + if(libType.equals(LibType.scorecard)){ + if(!fileType.equals(FileType.Scorecard)) { + continue; + } + } + + if(libType.equals(LibType.ruleset)){ + if(!fileType.equals(FileType.Ruleset) && !fileType.equals(FileType.UL)) { + continue; + } + } + if(StringUtils.isNotBlank(searchFileName)){ + if(name.toLowerCase().indexOf(searchFileName.toLowerCase())==-1){ + continue; + } + } + if (name.toLowerCase().endsWith(FileType.ActionLibrary.toString())) { + file.setType(Type.action); + } else if (name.toLowerCase().endsWith(FileType.VariableLibrary.toString())) { + file.setType(Type.variable); + } else if (name.toLowerCase().endsWith(FileType.ConstantLibrary.toString())) { + file.setType(Type.constant); + } else if (name.toLowerCase().endsWith(FileType.Ruleset.toString())) { + file.setType(Type.rule); + } else if (name.toLowerCase().endsWith(FileType.DecisionTable.toString())) { + file.setType(Type.decisionTable); + } else if (name.toLowerCase().endsWith(FileType.UL.toString())) { + file.setType(Type.ul); + } else if (name.toLowerCase().endsWith(FileType.ParameterLibrary.toString())) { + file.setType(Type.parameter); + } else if (name.toLowerCase().endsWith(FileType.RuleFlow.toString())) { + file.setType(Type.flow); + } else if (name.toLowerCase().endsWith(FileType.ScriptDecisionTable.toString())) { + file.setType(Type.scriptDecisionTable); + } else if (name.toLowerCase().endsWith(FileType.DecisionTree.toString())) { + file.setType(Type.decisionTree); + } else if (name.toLowerCase().endsWith(FileType.Scorecard.toString())) { + file.setType(Type.scorecard); + } + file.setFullPath(fileNode.getPath()); + file.setName(name); + buildNodeLockInfo(fileNode,file); + parent.addChild(file, false); + buildNodes(fileNode.getNodes(), file, types,folderType,searchFileName); + }else{ + file.setFullPath(fileNode.getPath()); + file.setName(name); + file.setType(Type.folder); + buildNodeLockInfo(fileNode,file); + file.setFolderType(folderType); + parent.addChild(file, true); + buildNodes(fileNode.getNodes(), file, types,folderType,searchFileName); + } + } + } + + private void buildNodeLockInfo(Node node,RepositoryFile file) throws Exception{ + String absPath=node.getPath(); + if(!lockManager.isLocked(absPath)){ + return; + } + String owner=lockManager.getLock(absPath).getLockOwner(); + file.setLock(true); + file.setLockInfo("被"+owner+"锁定"); + } + + @Override + public void lockPath(String path,User user) throws Exception{ + path = processPath(path); + int pos=path.indexOf(":"); + if(pos!=-1){ + path=path.substring(0,pos); + } + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + Node fileNode = rootNode.getNode(path); + String topAbsPath=fileNode.getPath(); + if(lockManager.isLocked(topAbsPath)){ + String owner=lockManager.getLock(topAbsPath).getLockOwner(); + throw new NodeLockException("【"+path+"】已被"+owner+"锁定,您不能进行再次锁定!"); + } + List nodeList=new ArrayList(); + unlockAllChildNodes(fileNode, user, nodeList, path); + for(Node node:nodeList){ + if(!lockManager.isLocked(node.getPath())){ + continue; + } + Lock lock=lockManager.getLock(node.getPath()); + lockManager.unlock(lock.getNode().getPath()); + } + if(!fileNode.isNodeType(NodeType.MIX_LOCKABLE)){ + if (!fileNode.isCheckedOut()) { + versionManager.checkout(fileNode.getPath()); + } + fileNode.addMixin("mix:lockable"); + session.save(); + } + lockManager.lock(topAbsPath, true, true, Long.MAX_VALUE, user.getUsername()); + } + + private void unlockAllChildNodes(Node node,User user,List nodeList,String rootPath) throws Exception{ + NodeIterator iter=node.getNodes(); + while(iter.hasNext()){ + Node nextNode=iter.nextNode(); + String absPath=nextNode.getPath(); + if(!lockManager.isLocked(absPath)){ + continue; + } + Lock lock=lockManager.getLock(absPath); + String owner=lock.getLockOwner(); + if(!user.getUsername().equals(owner)){ + throw new NodeLockException("当前目录下有子目录被其它人锁定,您不能执行锁定"+rootPath+"目录"); + } + nodeList.add(nextNode); + unlockAllChildNodes(nextNode, user, nodeList, rootPath); + } + } + + @Override + public void unlockPath(String path,User user) throws Exception{ + path = processPath(path); + int pos=path.indexOf(":"); + if(pos!=-1){ + path=path.substring(0,pos); + } + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + Node fileNode = rootNode.getNode(path); + String absPath=fileNode.getPath(); + if(!lockManager.isLocked(absPath)){ + throw new NodeLockException("当前文件未锁定,不需要解锁!"); + } + Lock lock=lockManager.getLock(absPath); + String owner=lock.getLockOwner(); + if(!owner.equals(user.getUsername())){ + throw new NodeLockException("当前文件由【"+owner+"】锁定,您无权解锁!"); + } + lockManager.unlock(lock.getNode().getPath()); + } + + public void deleteFile(String path,User user) throws Exception{ + if(!permissionService.fileHasWritePermission(path)){ + throw new NoPermissionException(); + } + repositoryInteceptor.deleteFile(path); + path = processPath(path); + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + String[] subpaths = path.split("/"); + Node fileNode = rootNode; + for (String subpath : subpaths) { + if (StringUtils.isEmpty(subpath)) { + continue; + } + String subDirs[] = subpath.split("\\."); + for (String dir : subDirs) { + if (StringUtils.isEmpty(dir)) { + continue; + } + if (!fileNode.hasNode(dir)) { + continue; + } + fileNode = fileNode.getNode(dir); + lockCheck(fileNode,user); + if (!fileNode.isCheckedOut()) { + versionManager.checkout(fileNode.getPath()); + } + } + } + fileNode = rootNode.getNode(path); + lockCheck(fileNode,user); + if (!fileNode.isCheckedOut()) { + versionManager.checkout(fileNode.getPath()); + } + fileNode.remove(); + session.save(); + } + + @Override + public void saveFile(String path, String content,boolean newVersion,String versionComment,User user) throws Exception{ + path=Utils.decodeURL(path); + if(path.indexOf(RES_PACKGE_FILE)>-1){ + if(!permissionService.projectPackageHasWritePermission(path)){ + throw new NoPermissionException(); + } + } + if(!permissionService.fileHasWritePermission(path)){ + throw new NoPermissionException(); + } + + repositoryInteceptor.saveFile(path, content); + path = processPath(path); + int pos=path.indexOf(":"); + if(pos!=-1){ + path=path.substring(0,pos); + } + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + Node fileNode = rootNode.getNode(path); + lockCheck(fileNode,user); + versionManager.checkout(fileNode.getPath()); + Binary fileBinary = new BinaryImpl(content.getBytes("utf-8")); + fileNode.setProperty(DATA, fileBinary); + fileNode.setProperty(FILE, true); + fileNode.setProperty(CRATE_USER, user.getUsername()); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + DateValue dateValue = new DateValue(calendar); + fileNode.setProperty(CRATE_DATE, dateValue); + if (newVersion && StringUtils.isNotBlank(versionComment)) { + fileNode.setProperty(VERSION_COMMENT, versionComment); + } + session.save(); + if (newVersion) { + versionManager.checkin(fileNode.getPath()); + } + } + + @Override + public List getReferenceFiles(String path,String searchText) throws Exception{ + Node rootNode=getRootNode(); + List referenceFiles=new ArrayList(); + List files=getFiles(rootNode, path); + for(String nodePath:files){ + InputStream inputStream=readFile(nodePath,null); + try { + String content = IOUtils.toString(inputStream); + inputStream.close(); + boolean containPath=content.contains(path); + boolean containText=content.contains(searchText); + if(containPath && containText){ + referenceFiles.add(nodePath); + } + } catch (IOException e) { + throw new RuleException(e); + } + } + return referenceFiles; + } + + private List getFiles(Node rootNode,String path) throws Exception{ + String project=getProject(path); + List list=new ArrayList(); + Node projectNode=rootNode.getNode(project); + buildPath(list, projectNode); + return list; + } + + private void buildPath(List list, Node parentNode) throws RepositoryException { + NodeIterator nodeIterator=parentNode.getNodes(); + while(nodeIterator.hasNext()){ + Node node=nodeIterator.nextNode(); + String nodePath=node.getPath(); + if(nodePath.endsWith(FileType.Ruleset.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.UL.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.DecisionTable.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.ScriptDecisionTable.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.DecisionTree.toString())){ + list.add(nodePath); + }else if(nodePath.endsWith(FileType.RuleFlow.toString())){ + list.add(nodePath); + } + buildPath(list,node); + } + } + + private String getProject(String path){ + if(path.startsWith("/")){ + path=path.substring(1); + } + int pos=path.indexOf("/"); + return path.substring(0,pos); + } + + @Override + public boolean fileExistCheck(String filePath) throws Exception{ + Node rootNode=getRootNode(); + filePath=processPath(filePath); + if(filePath.contains(" ") || filePath.equals("")){ + return true; + } + if(rootNode.hasNode(filePath)){ + return true; + } + return false; + } + + @Override + public RepositoryFile createProject(String projectName, User user,boolean classify) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + repositoryInteceptor.createProject(projectName); + Node rootNode=getRootNode(); + if(rootNode.hasNode(projectName)){ + throw new RuleException("Project ["+projectName+"] already exist."); + } + Node projectNode=rootNode.addNode(projectName); + projectNode.addMixin("mix:versionable"); + projectNode.setProperty(FILE, true); + projectNode.setProperty(CRATE_USER,user.getUsername()); + projectNode.setProperty(COMPANY_ID, user.getCompanyId()); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + DateValue dateValue = new DateValue(calendar); + projectNode.setProperty(CRATE_DATE, dateValue); + session.save(); + createResourcePackageFile(projectName,user); + createClientConfigFile(projectName, user); + RepositoryFile projectFileInfo=buildProjectFile(projectNode, null ,classify,null); + return projectFileInfo; + } + + public void createDir(String path,User user) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + repositoryInteceptor.createDir(path); + Node rootNode=getRootNode(); + path = processPath(path); + if (rootNode.hasNode(path)) { + throw new RuleException("Dir [" + path + "] already exist."); + } + boolean add = false; + String[] subpaths = path.split("/"); + Node parentNode = rootNode; + for (String subpath : subpaths) { + if (StringUtils.isEmpty(subpath)) { + continue; + } + String subDirs[] = subpath.split("\\."); + for (String dir : subDirs) { + if (StringUtils.isEmpty(dir)) { + continue; + } + if (parentNode.hasNode(dir)) { + parentNode = parentNode.getNode(dir); + } else { + parentNode = parentNode.addNode(dir); + parentNode.addMixin("mix:versionable"); + parentNode.addMixin("mix:lockable"); + parentNode.setProperty(DIR_TAG, true); + parentNode.setProperty(FILE, true); + parentNode.setProperty(CRATE_USER,user.getUsername()); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + DateValue dateValue = new DateValue(calendar); + parentNode.setProperty(CRATE_DATE, dateValue); + add = true; + } + } + } + if (add) { + session.save(); + } + } + + @Override + public void createFile(String path, String content,User user) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + createFileNode(path, content, user, true); + } + + public void fileRename(String path, String newPath) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + + repositoryInteceptor.renameFile(path, newPath); + path = processPath(path); + newPath = processPath(newPath); + Node rootNode=getRootNode(); + if (!rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] not exist."); + } + session.getWorkspace().move("/" + path, "/" + newPath); + session.save(); + } + + public void exportXml(String projectPath, OutputStream outputStream) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + session.exportSystemView(projectPath, outputStream, false, false); + } + + public void importXml(InputStream inputStream,boolean overwrite) throws Exception{ + if(!permissionService.isAdmin()){ + throw new NoPermissionException(); + } + String rootNodePath=getRootNode().getPath(); + if(overwrite){ + session.importXML(rootNodePath, inputStream,ImportUUIDBehavior.IMPORT_UUID_COLLISION_REPLACE_EXISTING); + }else{ + session.importXML(rootNodePath, inputStream,ImportUUIDBehavior.IMPORT_UUID_CREATE_NEW); + } + session.save(); + } + + private void createResourcePackageFile(String project,User user) throws Exception{ + String filePath = processPath(project) + "/" + RES_PACKGE_FILE; + Node rootNode=getRootNode(); + if (!rootNode.hasNode(filePath)) { + createFile(filePath, "",user); + } + } + + private void createClientConfigFile(String project,User user) throws Exception{ + Node rootNode=getRootNode(); + String filePath = processPath(project) + "/" + CLIENT_CONFIG_FILE; + if (!rootNode.hasNode(filePath)) { + createFile(filePath, "",user); + } + } + + private void createSecurityConfigFile(User user) throws Exception{ + String companyId=user.getCompanyId(); + String filePath=RESOURCE_SECURITY_CONFIG_FILE+(companyId == null ? "" : companyId); + Node rootNode=getRootNode(); + if (!rootNode.hasNode(filePath)) { + createFileNode(filePath, "",user,false); + } + } + + private void createFileNode(String path, String content,User user,boolean isFile) throws Exception{ + String createUser=user.getUsername(); + repositoryInteceptor.createFile(path,content); + Node rootNode=getRootNode(); + path = processPath(path); + try { + if (rootNode.hasNode(path)) { + throw new RuleException("File [" + path + "] already exist."); + } + Node fileNode = rootNode.addNode(path); + fileNode.addMixin("mix:versionable"); + fileNode.addMixin("mix:lockable"); + Binary fileBinary = new BinaryImpl(content.getBytes()); + fileNode.setProperty(DATA, fileBinary); + if(isFile){ + fileNode.setProperty(FILE, true); + } + fileNode.setProperty(CRATE_USER, createUser); + Calendar calendar = Calendar.getInstance(); + calendar.setTime(new Date()); + DateValue dateValue = new DateValue(calendar); + fileNode.setProperty(CRATE_DATE, dateValue); + session.save(); + } catch (Exception ex) { + throw new RuleException(ex); + } + } + + private void lockCheck(Node node,User user) throws Exception{ + if(lockManager.isLocked(node.getPath())){ + String lockOwner=lockManager.getLock(node.getPath()).getLockOwner(); + if(lockOwner.equals(user.getUsername())){ + return; + } + throw new NodeLockException("【"+node.getName()+"】已被"+lockOwner+"锁定!"); + } + } + + public void setPermissionService(PermissionService permissionService) { + this.permissionService = permissionService; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/BaseDbFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/BaseDbFileSystem.java new file mode 100644 index 0000000..c9c4fa4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/BaseDbFileSystem.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database; + +import org.apache.jackrabbit.core.fs.FileSystemException; +import org.apache.jackrabbit.core.fs.db.DbFileSystem; + +import com.itheima.sfbx.rule.console.repository.RepositoryBuilder; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public abstract class BaseDbFileSystem extends DbFileSystem { + @Override + public void init() throws FileSystemException { + if (initialized) { + throw new IllegalStateException("already initialized"); + } + try { + setSchema(databaseType()); + conHelper = createConnectionHelper(RepositoryBuilder.datasource); + + // make sure schemaObjectPrefix consists of legal name characters only + schemaObjectPrefix = conHelper.prepareDbIdentifier(schemaObjectPrefix); + + // check if schema objects exist and create them if necessary + if (isSchemaCheckEnabled()) { + createCheckSchemaOperation().run(); + } + + // build sql statements + buildSQLStatements(); + + // finally verify that there's a file system root entry + verifyRootExists(); + + initialized = true; + } catch (Exception e) { + String msg = "failed to initialize file system"; + throw new FileSystemException(msg, e); + } + } + public abstract String databaseType(); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DatabaseDataStore.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DatabaseDataStore.java new file mode 100644 index 0000000..0660870 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DatabaseDataStore.java @@ -0,0 +1,93 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Properties; + +import org.apache.jackrabbit.core.data.DataStoreException; +import org.apache.jackrabbit.core.data.db.DbDataStore; + +import com.itheima.sfbx.rule.console.repository.RepositoryBuilder; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DatabaseDataStore extends DbDataStore { + @Override + public synchronized void init(String homeDir) throws DataStoreException { + try { + initDatabaseType(); + conHelper = createConnectionHelper(RepositoryBuilder.datasource); + if (isSchemaCheckEnabled()) { + createCheckSchemaOperation().run(); + } + } catch (Exception e) { + throw convert("Can not init data store, driver=" + driver + " url=" + url + " user=" + user + + " schemaObjectPrefix=" + schemaObjectPrefix + " tableSQL=" + tableSQL + " createTableSQL=" + createTableSQL, e); + } + } + + @Override + protected void initDatabaseType() throws DataStoreException { + databaseType=RepositoryBuilder.databaseType; + InputStream in = + DbDataStore.class.getResourceAsStream(databaseType + ".properties"); + if (in == null) { + String msg = + "Configuration error: The resource '" + databaseType + + ".properties' could not be found;" + + " Please verify the databaseType property"; + throw new DataStoreException(msg); + } + Properties prop = new Properties(); + try { + try { + prop.load(in); + } finally { + in.close(); + } + } catch (IOException e) { + String msg = "Configuration error: Could not read properties '" + databaseType + ".properties'"; + throw new DataStoreException(msg, e); + } + if (driver == null) { + driver = getProperty(prop, "driver", driver); + } + tableSQL = getProperty(prop, "table", tableSQL); + createTableSQL = getProperty(prop, "createTable", createTableSQL); + insertTempSQL = getProperty(prop, "insertTemp", insertTempSQL); + updateDataSQL = getProperty(prop, "updateData", updateDataSQL); + updateLastModifiedSQL = getProperty(prop, "updateLastModified", updateLastModifiedSQL); + updateSQL = getProperty(prop, "update", updateSQL); + deleteSQL = getProperty(prop, "delete", deleteSQL); + deleteOlderSQL = getProperty(prop, "deleteOlder", deleteOlderSQL); + selectMetaSQL = getProperty(prop, "selectMeta", selectMetaSQL); + selectAllSQL = getProperty(prop, "selectAll", selectAllSQL); + selectDataSQL = getProperty(prop, "selectData", selectDataSQL); + storeStream = getProperty(prop, "storeStream", storeStream); + if (!STORE_SIZE_MINUS_ONE.equals(storeStream) + && !STORE_TEMP_FILE.equals(storeStream) + && !STORE_SIZE_MAX.equals(storeStream)) { + String msg = "Unsupported Stream store mechanism: " + storeStream + + " supported are: " + STORE_SIZE_MINUS_ONE + ", " + + STORE_TEMP_FILE + ", " + STORE_SIZE_MAX; + throw new DataStoreException(msg); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DbPersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DbPersistenceManager.java new file mode 100644 index 0000000..fcbc727 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/DbPersistenceManager.java @@ -0,0 +1,1277 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FilterInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Types; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import javax.jcr.RepositoryException; +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.jackrabbit.core.fs.FileSystem; +import org.apache.jackrabbit.core.fs.FileSystemResource; +import org.apache.jackrabbit.core.fs.local.LocalFileSystem; +import org.apache.jackrabbit.core.id.NodeId; +import org.apache.jackrabbit.core.id.PropertyId; +import org.apache.jackrabbit.core.persistence.PMContext; +import org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager; +import org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager; +import org.apache.jackrabbit.core.persistence.pool.DbNameIndex; +import org.apache.jackrabbit.core.persistence.util.BLOBStore; +import org.apache.jackrabbit.core.persistence.util.BundleBinding; +import org.apache.jackrabbit.core.persistence.util.ErrorHandling; +import org.apache.jackrabbit.core.persistence.util.FileSystemBLOBStore; +import org.apache.jackrabbit.core.persistence.util.NodeInfo; +import org.apache.jackrabbit.core.persistence.util.NodePropBundle; +import org.apache.jackrabbit.core.persistence.util.Serializer; +import org.apache.jackrabbit.core.state.ChangeLog; +import org.apache.jackrabbit.core.state.ItemStateException; +import org.apache.jackrabbit.core.state.NoSuchItemStateException; +import org.apache.jackrabbit.core.state.NodeReferences; +import org.apache.jackrabbit.core.util.StringIndex; +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; +import org.apache.jackrabbit.core.util.db.ConnectionFactory; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.DatabaseAware; +import org.apache.jackrabbit.core.util.db.DbUtility; +import org.apache.jackrabbit.core.util.db.StreamWrapper; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.itheima.sfbx.rule.console.repository.RepositoryBuilder; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DbPersistenceManager extends AbstractBundlePersistenceManager implements DatabaseAware { + + /** the default logger */ + private static Logger log = LoggerFactory.getLogger(BundleDbPersistenceManager.class); + + /** storage model modifier: binary keys */ + public static final int SM_BINARY_KEYS = 1; + + /** storage model modifier: longlong keys */ + public static final int SM_LONGLONG_KEYS = 2; + + /** flag indicating if this manager was initialized */ + protected boolean initialized; + + /** the jdbc driver name */ + protected String driver; + + /** the jdbc url string */ + protected String url; + + /** the jdbc user */ + protected String user; + + /** the jdbc password */ + protected String password; + + /** the database type */ + protected String databaseType; + + /** the logical name of the data source to use */ + protected String dataSourceName; + + /** the {@link ConnectionHelper} set in the {@link #init(PMContext)} method */ + protected ConnectionHelper conHelper; + + /** the prefix for the database objects */ + protected String schemaObjectPrefix; + + /** flag indicating if a consistency check should be issued during startup */ + protected boolean consistencyCheck; + + /** flag indicating if the consistency check should attempt to fix issues */ + protected boolean consistencyFix; + + /** initial size of buffer used to serialize objects */ + protected static final int INITIAL_BUFFER_SIZE = 1024; + + /** indicates if uses (filesystem) blob store */ + protected boolean externalBLOBs; + + /** indicates whether to block if the database connection is lost */ + protected boolean blockOnConnectionLoss; + + // SQL statements for bundle management + protected String bundleInsertSQL; + protected String bundleUpdateSQL; + protected String bundleSelectSQL; + protected String bundleDeleteSQL; + protected String bundleSelectAllIdsFromSQL; + protected String bundleSelectAllIdsSQL; + protected String bundleSelectAllBundlesFromSQL; + protected String bundleSelectAllBundlesSQL; + + // SQL statements for NodeReference management + protected String nodeReferenceInsertSQL; + protected String nodeReferenceUpdateSQL; + protected String nodeReferenceSelectSQL; + protected String nodeReferenceDeleteSQL; + + /** file system where BLOB data is stored */ + protected CloseableBLOBStore blobStore; + + /** the index for local names */ + private StringIndex nameIndex; + + /** + * the minimum size of a property until it gets written to the blob store + * @see #setMinBlobSize(String) + */ + private int minBlobSize = 0x1000; + + /** + * flag for error handling + */ + protected ErrorHandling errorHandling = new ErrorHandling(); + + /** + * the bundle binding + */ + protected BundleBinding binding; + + /** + * the name of this persistence manager + */ + private String name = super.toString(); + + /** + * Whether the schema check must be done during initialization. + */ + private boolean schemaCheckEnabled = true; +/* + *//** + * The repositories {@link ConnectionFactory}. + *//* + private ConnectionFactory connectionFactory;*/ + + /** + * {@inheritDoc} + */ + public void setConnectionFactory(ConnectionFactory connectionFactory) { + //this.connectionFactory = connectionFactory; + } + + /** + * Returns the configured JDBC connection url. + * @return the configured JDBC connection url. + */ + public String getUrl() { + return url; + } + + /** + * Sets the JDBC connection URL. + * The connection can be created using a JNDI Data Source as well. + * To do that, the driver class name must reference a javax.naming.Context class + * (for example javax.naming.InitialContext), and the URL must be the JNDI URL + * (for example java:comp/env/jdbc/Test). + * + * @param url the url to set. + */ + public void setUrl(String url) { + this.url = url; + } + + /** + * Returns the configured user that is used to establish JDBC connections. + * @return the JDBC user. + */ + public String getUser() { + return user; + } + + /** + * Sets the user name that will be used to establish JDBC connections. + * @param user the user name. + */ + public void setUser(String user) { + this.user = user; + } + + /** + * Returns the configured password that is used to establish JDBC connections. + * @return the password. + */ + public String getPassword() { + return password; + } + + /** + * Sets the password that will be used to establish JDBC connections. + * @param password the password for the connection + */ + public void setPassword(String password) { + this.password = password; + } + + /** + * Returns the class name of the JDBC driver. + * @return the class name of the JDBC driver. + */ + public String getDriver() { + return driver; + } + + /** + * Sets the class name of the JDBC driver. The driver class will be loaded + * during {@link #init(PMContext) init} in order to assure the existence. + * If no driver is specified, the default driver for the database is used. + * + * @param driver the class name of the driver + */ + public void setDriver(String driver) { + this.driver = driver; + } + + /** + * Returns the configured schema object prefix. + * @return the configured schema object prefix. + */ + public String getSchemaObjectPrefix() { + return schemaObjectPrefix; + } + + /** + * Sets the schema object prefix. This string is used to prefix all schema + * objects, like tables and indexes. this is useful, if several persistence + * managers use the same database. + * + * @param schemaObjectPrefix the prefix for schema objects. + */ + public void setSchemaObjectPrefix(String schemaObjectPrefix) { + // make sure prefix is all uppercase + this.schemaObjectPrefix = schemaObjectPrefix.toUpperCase(); + } + + /** + * Returns the configured database type name. + * @deprecated + * This method is deprecated; {@link getDatabaseType} should be used instead. + * + * @return the database type name. + */ + public String getSchema() { + return databaseType; + } + + /** + * Returns the configured database type name. + * @return the database type name. + */ + public String getDatabaseType() { + return databaseType; + } + + /** + * Sets the database type. This identifier is used to load and execute + * the respective .ddl resource in order to create the required schema + * objects. + * @deprecated + * This method is deprecated; {@link setDatabaseType} should be used instead. + * + * @param databaseType database type name + */ + public void setSchema(String databaseType) { + this.databaseType = databaseType; + } + + /** + * Sets the database type. This identifier is used to load and execute + * the respective .ddl resource in order to create the required schema + * objects. + * + * @param databaseType database type name + */ + public void setDatabaseType(String databaseType) { + this.databaseType = databaseType; + } + + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + /** + * Returns if uses external (filesystem) blob store. + * @return if uses external (filesystem) blob store. + */ + public boolean isExternalBLOBs() { + return externalBLOBs; + } + + /** + * Sets the flag for external (filesystem) blob store usage. + * @param externalBLOBs a value of "true" indicates that an external blob + * store is to be used. + */ + public void setExternalBLOBs(boolean externalBLOBs) { + this.externalBLOBs = externalBLOBs; + } + + /** + * Checks if consistency check is enabled. + * @return true if consistency check is enabled. + */ + public String getConsistencyCheck() { + return Boolean.toString(consistencyCheck); + } + + /** + * Defines if a consistency check is to be performed on initialization. + * @param consistencyCheck the consistency check flag. + */ + public void setConsistencyCheck(String consistencyCheck) { + this.consistencyCheck = Boolean.valueOf(consistencyCheck).booleanValue(); + } + + /** + * Checks if consistency fix is enabled. + * @return true if consistency fix is enabled. + */ + public String getConsistencyFix() { + return Boolean.toString(consistencyFix); + } + + /** + * Defines if the consistency check should attempt to fix issues that + * it finds. + * + * @param consistencyFix the consistency fix flag. + */ + public void setConsistencyFix(String consistencyFix) { + this.consistencyFix = Boolean.valueOf(consistencyFix).booleanValue(); + } + + /** + * Returns the minimum blob size in bytes. + * @return the minimum blob size in bytes. + */ + public String getMinBlobSize() { + return String.valueOf(minBlobSize); + } + + /** + * Sets the minimum blob size. This size defines the threshold of which + * size a property is included in the bundle or is stored in the blob store. + * + * @param minBlobSize the minimum blob size in bytes. + */ + public void setMinBlobSize(String minBlobSize) { + this.minBlobSize = Integer.decode(minBlobSize).intValue(); + } + + /** + * Sets the error handling behaviour of this manager. See {@link ErrorHandling} + * for details about the flags. + * + * @param errorHandling the error handling flags + */ + public void setErrorHandling(String errorHandling) { + this.errorHandling = new ErrorHandling(errorHandling); + } + + /** + * Returns the error handling configuration of this manager + * @return the error handling configuration of this manager + */ + public String getErrorHandling() { + return errorHandling.toString(); + } + + public void setBlockOnConnectionLoss(String block) { + this.blockOnConnectionLoss = Boolean.valueOf(block).booleanValue(); + } + + public String getBlockOnConnectionLoss() { + return Boolean.toString(blockOnConnectionLoss); + } + + /** + * Returns true if the blobs are stored in the DB. + * @return true if the blobs are stored in the DB. + */ + public boolean useDbBlobStore() { + return !externalBLOBs; + } + + /** + * Returns true if the blobs are stored in the local fs. + * @return true if the blobs are stored in the local fs. + */ + public boolean useLocalFsBlobStore() { + return externalBLOBs; + } + + /** + * @return whether the schema check is enabled + */ + public final boolean isSchemaCheckEnabled() { + return schemaCheckEnabled; + } + + /** + * @param enabled set whether the schema check is enabled + */ + public final void setSchemaCheckEnabled(boolean enabled) { + schemaCheckEnabled = enabled; + } + + /** + * {@inheritDoc} + * + * Basically wraps a JDBC transaction around super.store(). + * + * FIXME: the retry logic is almost a duplicate of {@code ConnectionHelper.RetryManager}. + */ + public synchronized void store(final ChangeLog changeLog) throws ItemStateException { + int failures = 0; + ItemStateException lastException = null; + boolean sleepInterrupted = false; + while (!sleepInterrupted && (blockOnConnectionLoss || failures <= 1)) { + try { + conHelper.startBatch(); + super.store(changeLog); + conHelper.endBatch(true); + return; + } catch (SQLException e) { + // Either startBatch or stopBatch threw it: either way the + // transaction was not persisted and no action needs to be taken. + lastException = new ItemStateException(e.getMessage(), e); + } catch (ItemStateException e) { + // store call threw it: we need to cancel the transaction + lastException = e; + try { + conHelper.endBatch(false); + } catch (SQLException e2) { + DbUtility.logException("rollback failed", e2); + } + + // if we got here due to a constraint violation and we + // are running in test mode, we really want to stop + assert !isIntegrityConstraintViolation(e.getCause()); + } + failures++; + log.error("Failed to persist ChangeLog (stacktrace on DEBUG log level), blockOnConnectionLoss = " + + blockOnConnectionLoss + ": " + lastException); + log.debug("Failed to persist ChangeLog", lastException); + if (blockOnConnectionLoss || failures <= 1) { // if we're going to try again + try { + Thread.sleep(100); + } catch (InterruptedException e1) { + Thread.currentThread().interrupt(); + sleepInterrupted = true; + log.error("Interrupted: canceling retry of ChangeLog storage"); + } + } + } + throw lastException; + } + + private boolean isIntegrityConstraintViolation(Throwable t) { + if (t instanceof SQLException) { + String state = ((SQLException) t).getSQLState(); + return state != null && state.startsWith("23"); + } else { + return false; + } + } + + /** + * {@inheritDoc} + */ + public void init(PMContext context) throws Exception { + if (initialized) { + throw new IllegalStateException("already initialized"); + } + super.init(context); + + conHelper = createConnectionHelper(getDataSource()); + + this.name = context.getHomeDir().getName(); + + // make sure schemaObjectPrefix consists of legal name characters only + schemaObjectPrefix = conHelper.prepareDbIdentifier(schemaObjectPrefix); + + // check if schema objects exist and create them if necessary + if (isSchemaCheckEnabled()) { + createCheckSchemaOperation().run(); + } + + // create correct blob store + blobStore = createBlobStore(); + + buildSQLStatements(); + + // load namespaces + binding = new BundleBinding(errorHandling, blobStore, getNsIndex(), getNameIndex(), context.getDataStore()); + binding.setMinBlobSize(minBlobSize); + + initialized = true; + + if (consistencyCheck) { + // check all bundles + checkConsistency(null, true, consistencyFix); + } + + } + + private DataSource getDataSource() throws Exception { + setDatabaseType(RepositoryBuilder.databaseType); + return RepositoryBuilder.datasource; + } + + /** + * This method is called from the {@link #init(PMContext)} method of this class and returns a + * {@link ConnectionHelper} instance which is assigned to the {@code conHelper} field. Subclasses may + * override it to return a specialized connection helper. + * + * @param dataSrc the {@link DataSource} of this persistence manager + * @return a {@link ConnectionHelper} + * @throws Exception on error + */ + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + return new ConnectionHelper(dataSrc, blockOnConnectionLoss); + } + + /** + * This method is called from {@link #init(PMContext)} after the + * {@link #createConnectionHelper(DataSource)} method, and returns a default {@link CheckSchemaOperation}. + * Subclasses can overrride this implementation to get a customized implementation. + * + * @return a new {@link CheckSchemaOperation} instance + */ + protected CheckSchemaOperation createCheckSchemaOperation() { + InputStream in = + AbstractBundlePersistenceManager.class.getResourceAsStream( + databaseType + ".ddl"); + return new CheckSchemaOperation(conHelper, in, schemaObjectPrefix + "BUNDLE").addVariableReplacement( + CheckSchemaOperation.SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix); + } + + /** + * {@inheritDoc} + */ + @Override + protected BLOBStore getBlobStore() { + return blobStore; + } + + /** + * Creates a suitable blobstore + * @return a blobstore + * @throws Exception if an unspecified error occurs + */ + protected CloseableBLOBStore createBlobStore() throws Exception { + if (useLocalFsBlobStore()) { + return createLocalFSBlobStore(context); + } else { + return createDBBlobStore(context); + } + } + + /** + * Returns the local name index + * @return the local name index + * @throws IllegalStateException if an error occurs. + */ + public StringIndex getNameIndex() { + try { + if (nameIndex == null) { + FileSystemResource res = new FileSystemResource(context.getFileSystem(), RES_NAME_INDEX); + if (res.exists()) { + nameIndex = super.getNameIndex(); + } else { + // create db nameindex + nameIndex = createDbNameIndex(); + } + } + return nameIndex; + } catch (Exception e) { + IllegalStateException exception = + new IllegalStateException("Unable to create nsIndex"); + exception.initCause(e); + throw exception; + } + } + + /** + * Returns a new instance of a DbNameIndex. + * @return a new instance of a DbNameIndex. + * @throws SQLException if an SQL error occurs. + */ + protected DbNameIndex createDbNameIndex() throws SQLException { + return new DbNameIndex(conHelper, schemaObjectPrefix); + } + + /** + * returns the storage model + * @return the storage model + */ + public int getStorageModel() { + return SM_BINARY_KEYS; + } + + /** + * Creates a blob store that is based on a local fs. This is called by + * init if {@link #useLocalFsBlobStore()} returns true. + * + * @param context the persistence manager context + * @return a blob store + * @throws Exception if an error occurs. + */ + protected CloseableBLOBStore createLocalFSBlobStore(PMContext context) + throws Exception { + /** + * store blob's in local file system in a sub directory + * of the workspace home directory + */ + LocalFileSystem blobFS = new LocalFileSystem(); + blobFS.setRoot(new File(context.getHomeDir(), "blobs")); + blobFS.init(); + return new FSBlobStore(blobFS); + } + + /** + * Creates a blob store that uses the database. This is called by + * init if {@link #useDbBlobStore()} returns true. + * + * @param context the persistence manager context + * + * @return a blob store + * @throws Exception if an error occurs. + */ + protected CloseableBLOBStore createDBBlobStore(PMContext context) + throws Exception { + return new DbBlobStore(); + } + + /** + * {@inheritDoc} + */ + public synchronized void close() throws Exception { + if (!initialized) { + throw new IllegalStateException("not initialized"); + } + + try { + if (nameIndex instanceof DbNameIndex) { + ((DbNameIndex) nameIndex).close(); + } + // close blob store + blobStore.close(); + blobStore = null; + super.close(); + } finally { + initialized = false; + } + } + + /** + * Constructs a parameter list for a PreparedStatement + * for the given node identifier. + * + * @param id the node id + * @return a list of Objects + */ + protected Object[] getKey(NodeId id) { + if (getStorageModel() == SM_BINARY_KEYS) { + return new Object[] { id.getRawBytes() }; + } else { + return new Object[] { + id.getMostSignificantBits(), id.getLeastSignificantBits() }; + } + } + + /** + * Creates a parameter array for an SQL statement that needs + * (i) a node identifier, and (2) another parameter. + * + * @param id the node id + * @param p the other parameter + * @param before whether the other parameter should be before the uuid parameter + * @return an Object array that represents the parameters + */ + protected Object[] createParams(NodeId id, Object p, boolean before) { + + // Create the key + List key = new ArrayList(); + if (getStorageModel() == SM_BINARY_KEYS) { + key.add(id.getRawBytes()); + } else { + key.add(id.getMostSignificantBits()); + key.add(id.getLeastSignificantBits()); + } + + // Create the parameters + List params = new ArrayList(); + if (before) { + params.add(p); + params.addAll(key); + } else { + params.addAll(key); + params.add(p); + } + + return params.toArray(); + } + + /** + * {@inheritDoc} + */ + public synchronized List getAllNodeIds(NodeId bigger, int maxCount) + throws ItemStateException, RepositoryException { + ResultSet rs = null; + try { + String sql = bundleSelectAllIdsSQL; + NodeId lowId = null; + Object[] keys = new Object[0]; + if (bigger != null) { + sql = bundleSelectAllIdsFromSQL; + lowId = bigger; + keys = getKey(bigger); + } + if (getStorageModel() == SM_LONGLONG_KEYS && maxCount > 0) { + // get some more rows, in case the first row is smaller + // only required for SM_LONGLONG_KEYS + // probability is very low to get get the wrong first key, < 1 : 2^64 + // see also bundleSelectAllIdsFrom SQL statement + maxCount += 10; + } + rs = conHelper.exec(sql, keys, false, maxCount); + ArrayList result = new ArrayList(); + while ((maxCount == 0 || result.size() < maxCount) && rs.next()) { + NodeId current; + if (getStorageModel() == SM_BINARY_KEYS) { + current = new NodeId(rs.getBytes(1)); + } else { + long high = rs.getLong(1); + long low = rs.getLong(2); + current = new NodeId(high, low); + if (lowId != null) { + // skip the keys that are smaller or equal (see above, maxCount += 10) + // only required for SM_LONGLONG_KEYS + if (current.compareTo(lowId) <= 0) { + continue; + } + } + } + result.add(current); + } + return result; + } catch (SQLException e) { + String msg = "getAllNodeIds failed."; + log.error(msg, e); + throw new ItemStateException(msg, e); + } finally { + DbUtility.close(rs); + } + } + + /** + * {@inheritDoc} + */ + @Override + public synchronized Map getAllNodeInfos(NodeId bigger, int maxCount) throws ItemStateException { + ResultSet rs = null; + try { + String sql = bundleSelectAllBundlesSQL; + NodeId lowId = null; + Object[] keys = new Object[0]; + if (bigger != null) { + sql = bundleSelectAllBundlesFromSQL; + lowId = bigger; + keys = getKey(bigger); + } + if (getStorageModel() == SM_LONGLONG_KEYS && maxCount > 0) { + // get some more rows, in case the first row is smaller + // only required for SM_LONGLONG_KEYS + // probability is very low to get get the wrong first key, < 1 : 2^64 + // see also bundleSelectAllIdsFrom SQL statement + maxCount += 10; + } + rs = conHelper.exec(sql, keys, false, maxCount); + Map result = new LinkedHashMap(maxCount); + while ((maxCount == 0 || result.size() < maxCount) && rs.next()) { + NodeId current; + if (getStorageModel() == SM_BINARY_KEYS) { + current = new NodeId(rs.getBytes(1)); + } else { + long high = rs.getLong(1); + long low = rs.getLong(2); + current = new NodeId(high, low); + } + if (getStorageModel() == SM_LONGLONG_KEYS && lowId != null) { + // skip the keys that are smaller or equal (see above, maxCount += 10) + if (current.compareTo(lowId) <= 0) { + continue; + } + } + NodePropBundle bundle = readBundle(current, rs, getStorageModel() == SM_LONGLONG_KEYS ? 3 : 2); + NodeInfo nodeInfo = new NodeInfo(bundle); + result.put(nodeInfo.getId(), nodeInfo); + } + return result; + } catch (SQLException e) { + String msg = "getAllNodeIds failed."; + log.error(msg, e); + throw new ItemStateException(msg, e); + } finally { + DbUtility.close(rs); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected NodePropBundle loadBundle(NodeId id) throws ItemStateException { + try { + ResultSet rs = + conHelper.exec(bundleSelectSQL, getKey(id), false, 0); + try { + if (rs != null && rs.next()) { + return readBundle(id, rs, 1); + } else { + return null; + } + } finally { + if (rs != null) { + rs.close(); + } + } + } catch (SQLException e) { + String msg = "failed to read bundle (stacktrace on DEBUG log level): " + id + ": " + e; + log.error(msg); + log.debug("failed to read bundle: " + id, e); + throw new ItemStateException(msg, e); + } + } + + /** + * Reads and parses a bundle from the BLOB in the given column of the + * current row of the given result set. This is a helper method to + * circumvent issues JCR-1039 and JCR-1474. + * + * @param id bundle identifier + * @param rs result set + * @param column BLOB column + * @return parsed bundle + * @throws SQLException if the bundle can not be read or parsed + */ + private NodePropBundle readBundle(NodeId id, ResultSet rs, int column) + throws SQLException { + try { + InputStream in; + if (rs.getMetaData().getColumnType(column) == Types.BLOB) { + in = rs.getBlob(column).getBinaryStream(); + } else { + in = rs.getBinaryStream(column); + } + try { + return binding.readBundle(in, id); + } finally { + in.close(); + } + } catch (IOException e) { + SQLException exception = + new SQLException("Failed to parse bundle " + id); + exception.initCause(e); + throw exception; + } + } + + /** + * {@inheritDoc} + */ + protected synchronized void storeBundle(NodePropBundle bundle) throws ItemStateException { + try { + ByteArrayOutputStream out = + new ByteArrayOutputStream(INITIAL_BUFFER_SIZE); + binding.writeBundle(out, bundle); + + String sql = bundle.isNew() ? bundleInsertSQL : bundleUpdateSQL; + Object[] params = createParams(bundle.getId(), out.toByteArray(), true); + conHelper.update(sql, params); + } catch (Exception e) { + String msg; + + if (isIntegrityConstraintViolation(e)) { + // we should never get an integrity constraint violation here + // other PMs may not be able to detect this and end up with + // corrupted data + msg = "FATAL error while writing the bundle: " + bundle.getId(); + } else { + msg = "failed to write bundle: " + bundle.getId(); + } + + log.error(msg, e); + throw new ItemStateException(msg, e); + } + } + + /** + * {@inheritDoc} + */ + protected synchronized void destroyBundle(NodePropBundle bundle) throws ItemStateException { + try { + conHelper.update(bundleDeleteSQL, getKey(bundle.getId())); + } catch (Exception e) { + if (e instanceof NoSuchItemStateException) { + throw (NoSuchItemStateException) e; + } + String msg = "failed to delete bundle: " + bundle.getId(); + log.error(msg, e); + throw new ItemStateException(msg, e); + } + } + + /** + * {@inheritDoc} + */ + public synchronized NodeReferences loadReferencesTo(NodeId targetId) + throws NoSuchItemStateException, ItemStateException { + if (!initialized) { + throw new IllegalStateException("not initialized"); + } + + ResultSet rs = null; + InputStream in = null; + try { + rs = conHelper.exec(nodeReferenceSelectSQL, getKey(targetId), false, 0); + if (!rs.next()) { + throw new NoSuchItemStateException(targetId.toString()); + } + + in = rs.getBinaryStream(1); + NodeReferences refs = new NodeReferences(targetId); + Serializer.deserialize(refs, in); + + return refs; + } catch (Exception e) { + if (e instanceof NoSuchItemStateException) { + throw (NoSuchItemStateException) e; + } + String msg = "failed to read references: " + targetId; + log.error(msg, e); + throw new ItemStateException(msg, e); + } finally { + IOUtils.closeQuietly(in); + DbUtility.close(rs); + } + } + + /** + * {@inheritDoc} + * + * This method uses shared PreparedStatements, which must + * be used strictly sequentially. Because this method synchronizes on the + * persistence manager instance, there is no need to synchronize on the + * shared statement. If the method would not be synchronized, the shared + * statement must be synchronized. + */ + public synchronized void store(NodeReferences refs) throws ItemStateException { + if (!initialized) { + throw new IllegalStateException("not initialized"); + } + + // check if insert or update + boolean update = existsReferencesTo(refs.getTargetId()); + String sql = (update) ? nodeReferenceUpdateSQL : nodeReferenceInsertSQL; + + try { + ByteArrayOutputStream out = + new ByteArrayOutputStream(INITIAL_BUFFER_SIZE); + // serialize references + Serializer.serialize(refs, out); + + Object[] params = createParams(refs.getTargetId(), out.toByteArray(), true); + conHelper.exec(sql, params); + + // there's no need to close a ByteArrayOutputStream + //out.close(); + } catch (Exception e) { + String msg = "failed to write " + refs; + log.error(msg, e); + throw new ItemStateException(msg, e); + } + } + + /** + * {@inheritDoc} + */ + public synchronized void destroy(NodeReferences refs) throws ItemStateException { + if (!initialized) { + throw new IllegalStateException("not initialized"); + } + + try { + conHelper.exec(nodeReferenceDeleteSQL, getKey(refs.getTargetId())); + } catch (Exception e) { + if (e instanceof NoSuchItemStateException) { + throw (NoSuchItemStateException) e; + } + String msg = "failed to delete " + refs; + log.error(msg, e); + throw new ItemStateException(msg, e); + } + } + + /** + * {@inheritDoc} + */ + public synchronized boolean existsReferencesTo(NodeId targetId) throws ItemStateException { + if (!initialized) { + throw new IllegalStateException("not initialized"); + } + + ResultSet rs = null; + try { + rs = conHelper.exec(nodeReferenceSelectSQL, getKey(targetId), false, 0); + + // a reference exists if the result has at least one entry + return rs.next(); + } catch (Exception e) { + String msg = "failed to check existence of node references: " + + targetId; + log.error(msg, e); + throw new ItemStateException(msg, e); + } finally { + DbUtility.close(rs); + } + } + + public String toString() { + return name; + } + + /** + * Initializes the SQL strings. + */ + protected void buildSQLStatements() { + // prepare statements + if (getStorageModel() == SM_BINARY_KEYS) { + bundleInsertSQL = "insert into " + schemaObjectPrefix + "BUNDLE (BUNDLE_DATA, NODE_ID) values (?, ?)"; + bundleUpdateSQL = "update " + schemaObjectPrefix + "BUNDLE set BUNDLE_DATA = ? where NODE_ID = ?"; + bundleSelectSQL = "select BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE where NODE_ID = ?"; + bundleDeleteSQL = "delete from " + schemaObjectPrefix + "BUNDLE where NODE_ID = ?"; + + nodeReferenceInsertSQL = "insert into " + schemaObjectPrefix + "REFS (REFS_DATA, NODE_ID) values (?, ?)"; + nodeReferenceUpdateSQL = "update " + schemaObjectPrefix + "REFS set REFS_DATA = ? where NODE_ID = ?"; + nodeReferenceSelectSQL = "select REFS_DATA from " + schemaObjectPrefix + "REFS where NODE_ID = ?"; + nodeReferenceDeleteSQL = "delete from " + schemaObjectPrefix + "REFS where NODE_ID = ?"; + + bundleSelectAllIdsSQL = "select NODE_ID from " + schemaObjectPrefix + "BUNDLE ORDER BY NODE_ID"; + bundleSelectAllIdsFromSQL = "select NODE_ID from " + schemaObjectPrefix + "BUNDLE WHERE NODE_ID > ? ORDER BY NODE_ID"; + bundleSelectAllBundlesSQL = "select NODE_ID, BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE ORDER BY NODE_ID"; + bundleSelectAllBundlesFromSQL = "select NODE_ID, BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE WHERE NODE_ID > ? ORDER BY NODE_ID"; + } else { + bundleInsertSQL = "insert into " + schemaObjectPrefix + "BUNDLE (BUNDLE_DATA, NODE_ID_HI, NODE_ID_LO) values (?, ?, ?)"; + bundleUpdateSQL = "update " + schemaObjectPrefix + "BUNDLE set BUNDLE_DATA = ? where NODE_ID_HI = ? and NODE_ID_LO = ?"; + bundleSelectSQL = "select BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE where NODE_ID_HI = ? and NODE_ID_LO = ?"; + bundleDeleteSQL = "delete from " + schemaObjectPrefix + "BUNDLE where NODE_ID_HI = ? and NODE_ID_LO = ?"; + + nodeReferenceInsertSQL = + "insert into " + schemaObjectPrefix + "REFS" + + " (REFS_DATA, NODE_ID_HI, NODE_ID_LO) values (?, ?, ?)"; + nodeReferenceUpdateSQL = + "update " + schemaObjectPrefix + "REFS" + + " set REFS_DATA = ? where NODE_ID_HI = ? and NODE_ID_LO = ?"; + nodeReferenceSelectSQL = "select REFS_DATA from " + schemaObjectPrefix + "REFS where NODE_ID_HI = ? and NODE_ID_LO = ?"; + nodeReferenceDeleteSQL = "delete from " + schemaObjectPrefix + "REFS where NODE_ID_HI = ? and NODE_ID_LO = ?"; + + bundleSelectAllIdsSQL = "select NODE_ID_HI, NODE_ID_LO from " + schemaObjectPrefix + + "BUNDLE ORDER BY NODE_ID_HI, NODE_ID_LO"; + // need to use HI and LO parameters + // this is not the exact statement, but not all databases support WHERE (NODE_ID_HI, NODE_ID_LOW) >= (?, ?) + bundleSelectAllIdsFromSQL = + "select NODE_ID_HI, NODE_ID_LO from " + schemaObjectPrefix + "BUNDLE" + + " WHERE (NODE_ID_HI >= ?) AND (? IS NOT NULL)" + + " ORDER BY NODE_ID_HI, NODE_ID_LO"; + + bundleSelectAllBundlesSQL = "select NODE_ID_HI, NODE_ID_LO, BUNDLE_DATA from " + schemaObjectPrefix + + "BUNDLE ORDER BY NODE_ID_HI, NODE_ID_LO"; + // need to use HI and LO parameters + // this is not the exact statement, but not all databases support WHERE (NODE_ID_HI, NODE_ID_LOW) >= (?, ?) + bundleSelectAllBundlesFromSQL = + "select NODE_ID_HI, NODE_ID_LO, BUNDLE_DATA from " + schemaObjectPrefix + "BUNDLE" + + " WHERE (NODE_ID_HI >= ?) AND (? IS NOT NULL)" + + " ORDER BY NODE_ID_HI, NODE_ID_LO"; + + } + + } + + /** + * Helper interface for closeable stores + */ + protected static interface CloseableBLOBStore extends BLOBStore { + void close(); + } + + /** + * own implementation of the filesystem blob store that uses a different + * blob-id scheme. + */ + protected class FSBlobStore extends FileSystemBLOBStore implements CloseableBLOBStore { + + private FileSystem fs; + + public FSBlobStore(FileSystem fs) { + super(fs); + this.fs = fs; + } + + public String createId(PropertyId id, int index) { + return buildBlobFilePath(null, id, index).toString(); + } + + public void close() { + try { + fs.close(); + fs = null; + } catch (Exception e) { + // ignore + } + } + } + + /** + * Implementation of a blob store that stores the data inside the database + */ + protected class DbBlobStore implements CloseableBLOBStore { + + protected String blobInsertSQL; + protected String blobUpdateSQL; + protected String blobSelectSQL; + protected String blobSelectExistSQL; + protected String blobDeleteSQL; + + public DbBlobStore() throws SQLException { + blobInsertSQL = "insert into " + schemaObjectPrefix + "BINVAL (BINVAL_DATA, BINVAL_ID) values (?, ?)"; + blobUpdateSQL = "update " + schemaObjectPrefix + "BINVAL set BINVAL_DATA = ? where BINVAL_ID = ?"; + blobSelectSQL = "select BINVAL_DATA from " + schemaObjectPrefix + "BINVAL where BINVAL_ID = ?"; + blobSelectExistSQL = "select 1 from " + schemaObjectPrefix + "BINVAL where BINVAL_ID = ?"; + blobDeleteSQL = "delete from " + schemaObjectPrefix + "BINVAL where BINVAL_ID = ?"; + } + + /** + * {@inheritDoc} + */ + public String createId(PropertyId id, int index) { + StringBuilder buf = new StringBuilder(); + buf.append(id.getParentId().toString()); + buf.append('.'); + buf.append(getNsIndex().stringToIndex(id.getName().getNamespaceURI())); + buf.append('.'); + buf.append(getNameIndex().stringToIndex(id.getName().getLocalName())); + buf.append('.'); + buf.append(index); + return buf.toString(); + } + + /** + * {@inheritDoc} + */ + public InputStream get(String blobId) throws Exception { + ResultSet rs = null; + boolean close = true; + try { + rs = conHelper.exec(blobSelectSQL, new Object[]{blobId}, false, 0); + if (!rs.next()) { + throw new Exception("no such BLOB: " + blobId); + } + + InputStream in = rs.getBinaryStream(1); + if (in == null) { + // some databases treat zero-length values as NULL; + // return empty InputStream in such a case + return new ByteArrayInputStream(new byte[0]); + } + + // return an InputStream wrapper in order to close the ResultSet when the stream is closed + close = false; + final ResultSet rs2 = rs; + return new FilterInputStream(in) { + + public void close() throws IOException { + try { + in.close(); + } finally { + // now it's safe to close ResultSet + DbUtility.close(rs2); + } + } + }; + } finally { + if (close) { + DbUtility.close(rs); + } + } + } + + /** + * {@inheritDoc} + */ + public synchronized void put(String blobId, InputStream in, long size) + throws Exception { + ResultSet rs = null; + boolean exists; + try { + rs = conHelper.exec(blobSelectExistSQL, new Object[]{blobId}, false, 0); + // a BLOB exists if the result has at least one entry + exists = rs.next(); + } finally { + DbUtility.close(rs); + } + String sql = (exists) ? blobUpdateSQL : blobInsertSQL; + Object[] params = new Object[]{new StreamWrapper(in, size), blobId}; + conHelper.exec(sql, params); + } + + /** + * {@inheritDoc} + */ + public synchronized boolean remove(String blobId) throws Exception { + return conHelper.update(blobDeleteSQL, new Object[]{blobId}) == 1; + } + + public void close() { + // closing the database resources of this blobstore is left to the + // owning BundleDbPersistenceManager + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/db2.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/db2.xml new file mode 100644 index 0000000..58cbf1e --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/db2.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/derby.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/derby.xml new file mode 100644 index 0000000..4edef3f --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/derby.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mssql.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mssql.xml new file mode 100644 index 0000000..6a5173c --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mssql.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mysql.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mysql.xml new file mode 100644 index 0000000..27dd6e7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/mysql.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/oracle.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/oracle.xml new file mode 100644 index 0000000..f2722e7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/oracle.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/postgresql.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/postgresql.xml new file mode 100644 index 0000000..39fb7ea --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/configs/postgresql.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseJournal.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseJournal.java new file mode 100644 index 0000000..de86665 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseJournal.java @@ -0,0 +1,808 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.journal; + +import java.io.BufferedReader; +import java.io.ByteArrayInputStream; +import java.io.File; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Calendar; + +import javax.sql.DataSource; + +import org.apache.commons.io.IOUtils; +import org.apache.jackrabbit.core.journal.AbstractJournal; +import org.apache.jackrabbit.core.journal.AppendRecord; +import org.apache.jackrabbit.core.journal.FileRevision; +import org.apache.jackrabbit.core.journal.InstanceRevision; +import org.apache.jackrabbit.core.journal.JournalException; +import org.apache.jackrabbit.core.journal.RecordIterator; +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; +import org.apache.jackrabbit.core.util.db.ConnectionFactory; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.DatabaseAware; +import org.apache.jackrabbit.core.util.db.DbUtility; +import org.apache.jackrabbit.core.util.db.StreamWrapper; +import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import com.itheima.sfbx.rule.console.repository.RepositoryBuilder; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DatabaseJournal extends AbstractJournal implements DatabaseAware{ + + /** + * Default journal table name, used to check schema completeness. + */ + private static final String DEFAULT_JOURNAL_TABLE = "JOURNAL"; + + /** + * Local revisions table name, used to check schema completeness. + */ + private static final String LOCAL_REVISIONS_TABLE = "LOCAL_REVISIONS"; + + /** + * Logger. + */ + static Logger log = LoggerFactory.getLogger(DatabaseJournal.class); + + /** + * Driver name, bean property. + */ + private String driver; + + /** + * Connection URL, bean property. + */ + private String url; + + /** + * Database type, bean property. + */ + private String databaseType; + + /** + * User name, bean property. + */ + private String user; + + /** + * Password, bean property. + */ + private String password; + + /** + * DataSource logical name, bean property. + */ + private String dataSourceName; + + /** + * The connection helper + */ + ConnectionHelper conHelper; + + /** + * Auto commit level. + */ + private int lockLevel; + + /** + * Locked revision. + */ + private long lockedRevision; + + /** + * Whether the revision table janitor thread is enabled. + */ + private boolean janitorEnabled = false; + + /** + * The sleep time of the revision table janitor in seconds, 1 day default. + */ + int janitorSleep = 60 * 60 * 24; + + /** + * Indicates when the next run of the janitor is scheduled. + * The first run is scheduled by default at 03:00 hours. + */ + Calendar janitorNextRun = Calendar.getInstance(); + + { + if (janitorNextRun.get(Calendar.HOUR_OF_DAY) >= 3) { + janitorNextRun.add(Calendar.DAY_OF_MONTH, 1); + } + janitorNextRun.set(Calendar.HOUR_OF_DAY, 3); + janitorNextRun.set(Calendar.MINUTE, 0); + janitorNextRun.set(Calendar.SECOND, 0); + janitorNextRun.set(Calendar.MILLISECOND, 0); + } + + private Thread janitorThread; + + /** + * Whether the schema check must be done during initialization. + */ + private boolean schemaCheckEnabled = true; + + /** + * The instance that manages the local revision. + */ + private DatabaseRevision databaseRevision; + + /** + * SQL statement returning all revisions within a range. + */ + protected String selectRevisionsStmtSQL; + + /** + * SQL statement updating the global revision. + */ + protected String updateGlobalStmtSQL; + + /** + * SQL statement returning the global revision. + */ + protected String selectGlobalStmtSQL; + + /** + * SQL statement appending a new record. + */ + protected String insertRevisionStmtSQL; + + /** + * SQL statement returning the minimum of the local revisions. + */ + protected String selectMinLocalRevisionStmtSQL; + + /** + * SQL statement removing a set of revisions with from the journal table. + */ + protected String cleanRevisionStmtSQL; + + /** + * SQL statement returning the local revision of this cluster node. + */ + protected String getLocalRevisionStmtSQL; + + /** + * SQL statement for inserting the local revision of this cluster node. + */ + protected String insertLocalRevisionStmtSQL; + + /** + * SQL statement for updating the local revision of this cluster node. + */ + protected String updateLocalRevisionStmtSQL; + + /** + * Schema object prefix, bean property. + */ + protected String schemaObjectPrefix; +/* + *//** + * The repositories {@link ConnectionFactory}. + *//* + private ConnectionFactory connectionFactory;*/ + + public DatabaseJournal() { + databaseType = "default"; + schemaObjectPrefix = ""; + } + + /** + * {@inheritDoc} + */ + public void setConnectionFactory(ConnectionFactory connnectionFactory) { + //this.connectionFactory = connnectionFactory; + } + + /** + * {@inheritDoc} + */ + public void init(String id, NamespaceResolver resolver) + throws JournalException { + + super.init(id, resolver); + + init(); + + try { + conHelper = createConnectionHelper(getDataSource()); + + // make sure schemaObjectPrefix consists of legal name characters only + schemaObjectPrefix = conHelper.prepareDbIdentifier(schemaObjectPrefix); + + // check if schema objects exist and create them if necessary + if (isSchemaCheckEnabled()) { + createCheckSchemaOperation().run(); + } + + // Make sure that the LOCAL_REVISIONS table exists (see JCR-1087) + if (isSchemaCheckEnabled()) { + checkLocalRevisionSchema(); + } + + buildSQLStatements(); + initInstanceRevisionAndJanitor(); + } catch (Exception e) { + String msg = "Unable to create connection."; + throw new JournalException(msg, e); + } + log.info("DatabaseJournal initialized."); + } + + private DataSource getDataSource() throws Exception { + /*if (getDataSourceName() == null || "".equals(getDataSourceName())) { + return connectionFactory.getDataSource(getDriver(), getUrl(), getUser(), getPassword()); + } else { + return connectionFactory.getDataSource(dataSourceName); + }*/ + return RepositoryBuilder.datasource; + } + + /** + * This method is called from the {@link #init(String, NamespaceResolver)} method of this class and + * returns a {@link ConnectionHelper} instance which is assigned to the {@code conHelper} field. + * Subclasses may override it to return a specialized connection helper. + * + * @param dataSrc the {@link DataSource} of this persistence manager + * @return a {@link ConnectionHelper} + * @throws Exception on error + */ + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + return new ConnectionHelper(dataSrc, false); + } + + /** + * This method is called from {@link #init(String, NamespaceResolver)} after the + * {@link #createConnectionHelper(DataSource)} method, and returns a default {@link CheckSchemaOperation}. + * Subclasses can overrride this implementation to get a customized implementation. + * + * @return a new {@link CheckSchemaOperation} instance + */ + protected CheckSchemaOperation createCheckSchemaOperation() { + InputStream in = org.apache.jackrabbit.core.journal.DatabaseJournal.class.getResourceAsStream(databaseType + ".ddl"); + return new CheckSchemaOperation(conHelper, in, schemaObjectPrefix + DEFAULT_JOURNAL_TABLE).addVariableReplacement( + CheckSchemaOperation.SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix); + } + + /** + * Completes initialization of this database journal. Base implementation + * checks whether the required bean properties driver and + * url have been specified and optionally deduces a valid + * database type. Should be overridden by subclasses that use a different way to + * create a connection and therefore require other arguments. + * @throws JournalException if initialization fails + */ + protected void init() throws JournalException { + databaseType=RepositoryBuilder.databaseType; + } + + /** + * Initialize the instance revision manager and the janitor thread. + * + * @throws JournalException on error + */ + protected void initInstanceRevisionAndJanitor() throws Exception { + databaseRevision = new DatabaseRevision(); + + // Get the local file revision from disk (upgrade; see JCR-1087) + long localFileRevision = 0L; + if (getRevision() != null) { + InstanceRevision currentFileRevision = new FileRevision(new File(getRevision()), true); + localFileRevision = currentFileRevision.get(); + currentFileRevision.close(); + } + + // Now write the localFileRevision (or 0 if it does not exist) to the LOCAL_REVISIONS + // table, but only if the LOCAL_REVISIONS table has no entry yet for this cluster node + long localRevision = databaseRevision.init(localFileRevision); + log.info("Initialized local revision to " + localRevision); + + // Start the clean-up thread if necessary. + if (janitorEnabled) { + janitorThread = new Thread(new RevisionTableJanitor(), "Jackrabbit-ClusterRevisionJanitor"); + janitorThread.setDaemon(true); + janitorThread.start(); + log.info("Cluster revision janitor thread started; first run scheduled at " + janitorNextRun.getTime()); + } else { + log.info("Cluster revision janitor thread not started"); + } + } + + /* (non-Javadoc) + * @see org.apache.jackrabbit.core.journal.Journal#getInstanceRevision() + */ + public InstanceRevision getInstanceRevision() throws JournalException { + return databaseRevision; + } + + /** + * {@inheritDoc} + */ + public RecordIterator getRecords(long startRevision) throws JournalException { + try { + return new DatabaseRecordIterator(conHelper.exec(selectRevisionsStmtSQL, new Object[]{new Long( + startRevision)}, false, 0), getResolver(), getNamePathResolver()); + } catch (SQLException e) { + throw new JournalException("Unable to return record iterator.", e); + } + } + + /** + * {@inheritDoc} + */ + public RecordIterator getRecords() throws JournalException { + try { + return new DatabaseRecordIterator(conHelper.exec(selectRevisionsStmtSQL, new Object[]{new Long( + Long.MIN_VALUE)}, false, 0), getResolver(), getNamePathResolver()); + } catch (SQLException e) { + throw new JournalException("Unable to return record iterator.", e); + } + } + + /** + * Synchronize contents from journal. May be overridden by subclasses. + * Do the initial sync in batchMode, since some databases (PSQL) when + * not in transactional mode, load all results in memory which causes + * out of memory. See JCR-2832 + * + * @param startRevision start point (exclusive) + * @param startup indicates if the cluster node is syncing on startup + * or does a normal sync. + * @throws JournalException if an error occurs + */ + @Override + protected void doSync(long startRevision, boolean startup) throws JournalException { + if (!startup) { + // if the cluster node is not starting do a normal sync + doSync(startRevision); + } else { + try { + startBatch(); + try { + doSync(startRevision); + } finally { + endBatch(true); + } + } catch (SQLException e) { + throw new JournalException("Couldn't sync the cluster node", e); + } + } + } + + /** + *

+ * This journal is locked by incrementing the current value in the table + * named GLOBAL_REVISION, which effectively write-locks this + * table. The updated value is then saved away and remembered in the + * appended record, because a save may entail multiple appends (JCR-884). + */ + protected void doLock() throws JournalException { + ResultSet rs = null; + boolean succeeded = false; + + try { + startBatch(); + } catch (SQLException e) { + throw new JournalException("Unable to set autocommit to false.", e); + } + + try { + conHelper.exec(updateGlobalStmtSQL); + rs = conHelper.exec(selectGlobalStmtSQL, null, false, 0); + if (!rs.next()) { + throw new JournalException("No revision available."); + } + lockedRevision = rs.getLong(1); + succeeded = true; + } catch (SQLException e) { + throw new JournalException("Unable to lock global revision table.", e); + } finally { + DbUtility.close(rs); + if (!succeeded) { + doUnlock(false); + } + } + } + protected void doUnlock(boolean successful) { + endBatch(successful); + } + + private void startBatch() throws SQLException { + if (lockLevel++ == 0) { + conHelper.startBatch(); + } + } + + private void endBatch(boolean successful) { + if (--lockLevel == 0) { + try { + conHelper.endBatch(successful);; + } catch (SQLException e) { + log.error("failed to end batch", e); + } + } + } + + /** + * Save away the locked revision inside the newly appended record. + */ + protected void appending(AppendRecord record) { + record.setRevision(lockedRevision); + } + + /** + * We have already saved away the revision for this record. + */ + protected void append(AppendRecord record, InputStream in, int length) + throws JournalException { + + try { + conHelper.exec(insertRevisionStmtSQL, record.getRevision(), getId(), record.getProducerId(), + new StreamWrapper(in, length)); + + } catch (SQLException e) { + String msg = "Unable to append revision " + lockedRevision + "."; + throw new JournalException(msg, e); + } + } + + public void close() { + if (janitorThread != null) { + janitorThread.interrupt(); + } + } + + /** + * Checks if the local revision schema objects exist and creates them if they + * don't exist yet. + * + * @throws Exception if an error occurs + */ + private void checkLocalRevisionSchema() throws Exception { + InputStream localRevisionDDLStream = null; + InputStream in = org.apache.jackrabbit.core.journal.DatabaseJournal.class.getResourceAsStream(databaseType + ".ddl"); + try { + BufferedReader reader = new BufferedReader(new InputStreamReader(in)); + String sql = reader.readLine(); + while (sql != null) { + // Skip comments and empty lines, and select only the statement to create the LOCAL_REVISIONS + // table. + if (!sql.startsWith("#") && sql.length() > 0 && sql.indexOf(LOCAL_REVISIONS_TABLE) != -1) { + localRevisionDDLStream = new ByteArrayInputStream(sql.getBytes()); + break; + } + // read next sql stmt + sql = reader.readLine(); + } + } finally { + IOUtils.closeQuietly(in); + } + // Run the schema check for the single table + new CheckSchemaOperation(conHelper, localRevisionDDLStream, schemaObjectPrefix + + LOCAL_REVISIONS_TABLE).addVariableReplacement( + CheckSchemaOperation.SCHEMA_OBJECT_PREFIX_VARIABLE, schemaObjectPrefix).run(); + } + + /** + * Builds the SQL statements. May be overridden by subclasses to allow + * different table and/or column names. + */ + protected void buildSQLStatements() { + selectRevisionsStmtSQL = + "select REVISION_ID, JOURNAL_ID, PRODUCER_ID, REVISION_DATA from " + + schemaObjectPrefix + "JOURNAL where REVISION_ID > ? order by REVISION_ID"; + updateGlobalStmtSQL = + "update " + schemaObjectPrefix + "GLOBAL_REVISION" + + " set REVISION_ID = REVISION_ID + 1"; + selectGlobalStmtSQL = + "select REVISION_ID from " + + schemaObjectPrefix + "GLOBAL_REVISION"; + insertRevisionStmtSQL = + "insert into " + schemaObjectPrefix + "JOURNAL" + + " (REVISION_ID, JOURNAL_ID, PRODUCER_ID, REVISION_DATA) " + + "values (?,?,?,?)"; + selectMinLocalRevisionStmtSQL = + "select MIN(REVISION_ID) from " + schemaObjectPrefix + "LOCAL_REVISIONS"; + cleanRevisionStmtSQL = + "delete from " + schemaObjectPrefix + "JOURNAL " + "where REVISION_ID < ?"; + getLocalRevisionStmtSQL = + "select REVISION_ID from " + schemaObjectPrefix + "LOCAL_REVISIONS " + + "where JOURNAL_ID = ?"; + insertLocalRevisionStmtSQL = + "insert into " + schemaObjectPrefix + "LOCAL_REVISIONS " + + "(REVISION_ID, JOURNAL_ID) values (?,?)"; + updateLocalRevisionStmtSQL = + "update " + schemaObjectPrefix + "LOCAL_REVISIONS " + + "set REVISION_ID = ? where JOURNAL_ID = ?"; + } + + public String getDriver() { + return driver; + } + + public String getUrl() { + return url; + } + + /** + * Get the database type. + * + * @return the database type + */ + public String getDatabaseType() { + return databaseType; + } + + /** + * Get the database type. + * @deprecated + * This method is deprecated; {@link #getDatabaseType} should be used instead. + * + * @return the database type + */ + public String getSchema() { + return databaseType; + } + + public String getSchemaObjectPrefix() { + return schemaObjectPrefix; + } + + public String getUser() { + return user; + } + + public String getPassword() { + return password; + } + + public boolean getJanitorEnabled() { + return janitorEnabled; + } + + public int getJanitorSleep() { + return janitorSleep; + } + + public int getJanitorFirstRunHourOfDay() { + return janitorNextRun.get(Calendar.HOUR_OF_DAY); + } + + public void setDriver(String driver) { + this.driver = driver; + } + + public void setUrl(String url) { + this.url = url; + } + + /** + * Set the database type. + * + * @param databaseType the database type + */ + public void setDatabaseType(String databaseType) { + this.databaseType = databaseType; + } + + /** + * Set the database type. + * @deprecated + * This method is deprecated; {@link #getDatabaseType} should be used instead. + * + * @param databaseType the database type + */ + public void setSchema(String databaseType) { + this.databaseType = databaseType; + } + + public void setSchemaObjectPrefix(String schemaObjectPrefix) { + this.schemaObjectPrefix = schemaObjectPrefix.toUpperCase(); + } + + public void setUser(String user) { + this.user = user; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setJanitorEnabled(boolean enabled) { + this.janitorEnabled = enabled; + } + + public void setJanitorSleep(int sleep) { + this.janitorSleep = sleep; + } + + public void setJanitorFirstRunHourOfDay(int hourOfDay) { + janitorNextRun = Calendar.getInstance(); + if (janitorNextRun.get(Calendar.HOUR_OF_DAY) >= hourOfDay) { + janitorNextRun.add(Calendar.DAY_OF_MONTH, 1); + } + janitorNextRun.set(Calendar.HOUR_OF_DAY, hourOfDay); + janitorNextRun.set(Calendar.MINUTE, 0); + janitorNextRun.set(Calendar.SECOND, 0); + janitorNextRun.set(Calendar.MILLISECOND, 0); + } + + public String getDataSourceName() { + return dataSourceName; + } + + public void setDataSourceName(String dataSourceName) { + this.dataSourceName = dataSourceName; + } + + /** + * @return whether the schema check is enabled + */ + public final boolean isSchemaCheckEnabled() { + return schemaCheckEnabled; + } + + /** + * @param enabled set whether the schema check is enabled + */ + public final void setSchemaCheckEnabled(boolean enabled) { + schemaCheckEnabled = enabled; + } + + /** + * This class manages the local revision of the cluster node. It + * persists the local revision in the LOCAL_REVISIONS table in the + * clustering database. + */ + public class DatabaseRevision implements InstanceRevision { + + /** + * The cached local revision of this cluster node. + */ + private long localRevision; + + /** + * Indicates whether the init method has been called. + */ + private boolean initialized = false; + + /** + * Checks whether there's a local revision value in the database for this + * cluster node. If not, it writes the given default revision to the database. + * + * @param revision the default value for the local revision counter + * @return the local revision + * @throws JournalException on error + */ + protected synchronized long init(long revision) throws JournalException { + ResultSet rs = null; + try { + // Check whether there is an entry in the database. + rs = conHelper.exec(getLocalRevisionStmtSQL, new Object[]{getId()}, false, 0); + boolean exists = rs.next(); + if (exists) { + revision = rs.getLong(1); + } + + // Insert the given revision in the database + if (!exists) { + conHelper.exec(insertLocalRevisionStmtSQL, revision, getId()); + } + + // Set the cached local revision and return + localRevision = revision; + initialized = true; + return revision; + + } catch (SQLException e) { + log.warn("Failed to initialize local revision.", e); + throw new JournalException("Failed to initialize local revision", e); + } finally { + DbUtility.close(rs); + } + } + + public synchronized long get() { + if (!initialized) { + throw new IllegalStateException("instance has not yet been initialized"); + } + return localRevision; + } + + public synchronized void set(long localRevision) throws JournalException { + + if (!initialized) { + throw new IllegalStateException("instance has not yet been initialized"); + } + + // Update the cached value and the table with local revisions. + try { + conHelper.exec(updateLocalRevisionStmtSQL, localRevision, getId()); + this.localRevision = localRevision; + } catch (SQLException e) { + log.warn("Failed to update local revision.", e); + throw new JournalException("Failed to update local revision.", e); + } + } + + public void close() { + // nothing to do + } + } + + /** + * Class for maintaining the revision table. This is only useful if all + * JR information except the search index is in the database (i.e., node types + * etc). In that case, revision data can safely be thrown away from the JOURNAL table. + */ + public class RevisionTableJanitor implements Runnable { + + /** + * {@inheritDoc} + */ + public void run() { + while (!Thread.currentThread().isInterrupted()) { + try { + log.info("Next clean-up run scheduled at " + janitorNextRun.getTime()); + long sleepTime = janitorNextRun.getTimeInMillis() - System.currentTimeMillis(); + if (sleepTime > 0) { + Thread.sleep(sleepTime); + } + cleanUpOldRevisions(); + janitorNextRun.add(Calendar.SECOND, janitorSleep); + } catch (InterruptedException e) { + Thread.currentThread().interrupt(); + } + } + log.info("Interrupted: stopping clean-up task."); + } + + /** + * Cleans old revisions from the clustering table. + */ + protected void cleanUpOldRevisions() { + ResultSet rs = null; + try { + long minRevision = 0; + rs = conHelper.exec(selectMinLocalRevisionStmtSQL, null, false, 0); + boolean cleanUp = rs.next(); + if (cleanUp) { + minRevision = rs.getLong(1); + } + + // Clean up if necessary: + if (cleanUp) { + conHelper.exec(cleanRevisionStmtSQL, minRevision); + log.info("Cleaned old revisions up to revision " + minRevision + "."); + } + + } catch (Exception e) { + log.warn("Failed to clean up old revisions.", e); + } finally { + DbUtility.close(rs); + } + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseRecordIterator.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseRecordIterator.java new file mode 100644 index 0000000..cf45a9d --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/DatabaseRecordIterator.java @@ -0,0 +1,156 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.journal; + +import java.io.DataInputStream; +import java.io.IOException; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.NoSuchElementException; + +import org.apache.jackrabbit.core.journal.JournalException; +import org.apache.jackrabbit.core.journal.ReadRecord; +import org.apache.jackrabbit.core.journal.Record; +import org.apache.jackrabbit.core.journal.RecordIterator; +import org.apache.jackrabbit.spi.commons.conversion.NamePathResolver; +import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DatabaseRecordIterator implements RecordIterator { + + /** + * Logger. + */ + private static Logger log = LoggerFactory.getLogger(DatabaseRecordIterator.class); + + /** + * Underlying result set. + */ + private final ResultSet rs; + + /** + * Namespace resolver. + */ + private final NamespaceResolver resolver; + + /** + * Name and Path resolver. + */ + private final NamePathResolver npResolver; + + /** + * Current record. + */ + private ReadRecord record; + + /** + * Last record returned. + */ + private ReadRecord lastRecord; + + /** + * Flag indicating whether EOF was reached. + */ + private boolean isEOF; + public DatabaseRecordIterator(ResultSet rs, NamespaceResolver resolver, NamePathResolver npResolver) { + this.rs = rs; + this.resolver = resolver; + this.npResolver = npResolver; + } + public boolean hasNext() { + try { + if (!isEOF && record == null) { + fetchRecord(); + } + return !isEOF; + } catch (SQLException e) { + String msg = "Error while moving to next record."; + log.error(msg, e); + return false; + } + } + + /** + * Return the next record. If there are no more records, throws + * a NoSuchElementException. If an error occurs, + * throws a JournalException. + * + * @return next record + * @throws NoSuchElementException if there are no more records + * @throws JournalException if another error occurs + */ + public Record nextRecord() throws NoSuchElementException, JournalException { + if (!hasNext()) { + String msg = "No current record."; + throw new NoSuchElementException(msg); + } + close(lastRecord); + lastRecord = record; + record = null; + + return lastRecord; + } + + public void close() { + if (lastRecord != null) { + close(lastRecord); + lastRecord = null; + } + try { + rs.close(); + } catch (SQLException e) { + String msg = "Error while closing result set: " + e.getMessage(); + log.warn(msg); + } + } + + /** + * Fetch the next record. + */ + private void fetchRecord() throws SQLException { + if (rs.next()) { + long revision = rs.getLong(1); + String journalId = rs.getString(2); + String producerId = rs.getString(3); + DataInputStream dataIn = new DataInputStream(rs.getBinaryStream(4)); + record = new ReadRecord(journalId, producerId, revision, dataIn, 0, resolver, npResolver); + } else { + isEOF = true; + } + } + + /** + * Close a record. + * + * @param record record + */ + private static void close(ReadRecord record) { + if (record != null) { + try { + record.close(); + } catch (IOException e) { + String msg = "Error while closing record."; + log.warn(msg, e); + } + } + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/MSSqlDatabaseJournal.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/MSSqlDatabaseJournal.java new file mode 100644 index 0000000..5bd1158 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/MSSqlDatabaseJournal.java @@ -0,0 +1,66 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.journal; + +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class MSSqlDatabaseJournal extends DatabaseJournal { + + /** the MS SQL table space to use */ + protected String tableSpace = ""; + + /** + * Initialize this instance with the default schema and + * driver values. + */ + public MSSqlDatabaseJournal() { + setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver"); + setDatabaseType("mssql"); + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + return super.createCheckSchemaOperation().addVariableReplacement( + CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace); + } + + /** + * Returns the configured MS SQL table space. + * @return the configured MS SQL table space. + */ + public String getTableSpace() { + return tableSpace; + } + + /** + * Sets the MS SQL table space. + * @param tableSpace the MS SQL table space. + */ + public void setTableSpace(String tableSpace) { + if (tableSpace != null && tableSpace.length() > 0) { + this.tableSpace = "on " + tableSpace.trim(); + } else { + this.tableSpace = ""; + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/OracleDatabaseJournal.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/OracleDatabaseJournal.java new file mode 100644 index 0000000..dfbc817 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/journal/OracleDatabaseJournal.java @@ -0,0 +1,131 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.journal; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.OracleConnectionHelper; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class OracleDatabaseJournal extends DatabaseJournal { + /** + * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace} + * are not specified. + */ + protected static final String DEFAULT_TABLESPACE_CLAUSE = ""; + + /** + * Name of the replacement variable in the DDL for {@link #tablespace}. + */ + protected static final String TABLESPACE_VARIABLE = "${tablespace}"; + + /** + * Name of the replacement variable in the DDL for {@link #indexTablespace}. + */ + protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}"; + + /** The Oracle tablespace to use for tables */ + protected String tablespace; + + /** The Oracle tablespace to use for indexes */ + protected String indexTablespace; + + public OracleDatabaseJournal() { + setDatabaseType("oracle"); + setDriver("oracle.jdbc.OracleDriver"); + setSchemaObjectPrefix(""); + tablespace = DEFAULT_TABLESPACE_CLAUSE; + indexTablespace = DEFAULT_TABLESPACE_CLAUSE; + } + + /** + * Returns the configured Oracle tablespace for tables. + * @return the configured Oracle tablespace for tables. + */ + public String getTablespace() { + return tablespace; + } + + /** + * Sets the Oracle tablespace for tables. + * @param tablespaceName the Oracle tablespace for tables. + */ + public void setTablespace(String tablespaceName) { + this.tablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Returns the configured Oracle tablespace for indexes. + * @return the configured Oracle tablespace for indexes. + */ + public String getIndexTablespace() { + return indexTablespace; + } + + /** + * Sets the Oracle tablespace for indexes. + * @param tablespaceName the Oracle tablespace for indexes. + */ + public void setIndexTablespace(String tablespaceName) { + this.indexTablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Constructs the tablespace <tbs name> clause from + * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE} + * is returned instead. + * + * @param tablespaceName A tablespace name + * @return A tablespace clause using the supplied name or + * {@value #DEFAULT_TABLESPACE_CLAUSE} if the name is empty + */ + private String buildTablespaceClause(String tablespaceName) { + if (tablespaceName == null || tablespaceName.trim().length() == 0) { + return DEFAULT_TABLESPACE_CLAUSE; + } else { + return "tablespace " + tablespaceName.trim(); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + OracleConnectionHelper helper = new OracleConnectionHelper(dataSrc, false); + helper.init(); + return helper; + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) { + // tablespace was set but not indexTablespace : use the same for both + indexTablespace = tablespace; + } + return super.createCheckSchemaOperation() + .addVariableReplacement(TABLESPACE_VARIABLE, tablespace) + .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/DerbyPersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/DerbyPersistenceManager.java new file mode 100644 index 0000000..831ba21 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/DerbyPersistenceManager.java @@ -0,0 +1,277 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import java.sql.SQLException; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.persistence.PMContext; +import org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.DerbyConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DerbyPersistenceManager extends DbPersistenceManager { + + /** name of the embedded driver */ + public static final String DERBY_EMBEDDED_DRIVER = "org.apache.derby.jdbc.EmbeddedDriver"; + + /** @see #setDerbyStorageInitialPages(String) */ + private int derbyStorageInitialPages = 16; + + /** @see #setDerbyStorageMinimumRecordSize(String) */ + private int derbyStorageMinimumRecordSize = 512; + + /** @see #setDerbyStoragePageCacheSize(String) */ + private int derbyStoragePageCacheSize = 1024; + + /** @see #setDerbyStoragePageReservedSpace(String) */ + private int derbyStoragePageReservedSpace = 20; + + /** @see #setDerbyStoragePageSize(String) */ + private int derbyStoragePageSize = 16384; + + /** + * @see #setDerbyStorageInitialPages + * @return the initial pages property + */ + public String getDerbyStorageInitialPages() { + return String.valueOf(derbyStorageInitialPages); + } + + /** + * The on-disk size of a Derby table grows by one page at a time until eight + * pages of user data (or nine pages of total disk use, one is used for + * overhead) have been allocated. Then it will grow by eight pages at a time + * if possible. + *

+ * A Derby table or index can be created with a number of pages already + * pre-allocated. To do so, specify the property prior to the CREATE TABLE + * or CREATE INDEX statement. + *

+ * Define the number of user pages the table or index is to be created with. + * The purpose of this property is to preallocate a table or index of + * reasonable size if the user expects that a large amount of data will be + * inserted into the table or index. A table or index that has the + * pre-allocated pages will enjoy a small performance improvement over a + * table or index that has no pre-allocated pages when the data are loaded. + *

+ * The total desired size of the table or index should be + *

+ * (1+derby.storage.initialPages) * derby.storage.pageSize bytes. + *

+ * When you create a table or an index after setting this property, Derby + * attempts to preallocate the requested number of user pages. However, the + * operations do not fail even if they are unable to preallocate the + * requested number of pages, as long as they allocate at least one page. + *

+ * Default is 16 + * + * @param derbyStorageInitialPages the number of initial pages + */ + public void setDerbyStorageInitialPages(String derbyStorageInitialPages) { + this.derbyStorageInitialPages = + Integer.decode(derbyStorageInitialPages).intValue(); + } + + /** + * @see #setDerbyStorageMinimumRecordSize + * @return the minimum record size + */ + public String getDerbyStorageMinimumRecordSize() { + return String.valueOf(derbyStorageMinimumRecordSize); + } + + /** + * Indicates the minimum user row size in bytes for on-disk database pages + * for tables when you are creating a table. This property ensures that + * there is enough room for a row to grow on a page when updated without + * having to overflow. This is generally most useful for VARCHAR and + * VARCHAR FOR BIT DATA data types and for tables that are updated a lot, + * in which the rows start small and grow due to updates. Reserving the + * space at the time of insertion minimizes row overflow due to updates, + * but it can result in wasted space. Set the property prior to issuing the + * CREATE TABLE statement. + *

+ * Default is 256 + * + * @param derbyStorageMinimumRecordSize the minimum record size + */ + public void setDerbyStorageMinimumRecordSize(String derbyStorageMinimumRecordSize) { + this.derbyStorageMinimumRecordSize = + Integer.decode(derbyStorageMinimumRecordSize).intValue(); + } + + /** + * @see #setDerbyStoragePageCacheSize + * @return the page cache size + */ + public String getDerbyStoragePageCacheSize() { + return String.valueOf(derbyStoragePageCacheSize); + } + + /** + * Defines the size, in number of pages, of the database's data page cache + * (data pages kept in memory). The actual amount of memory the page cache + * will use depends on the following: + *

    + *
  • the size of the cache (configured with {@link #setDerbyStoragePageCacheSize}) + *
  • the size of the pages (configured with {@link #setDerbyStoragePageSize}) + *
  • overhead (varies with JVMs) + *
+ * When increasing the size of the page cache, you typically have to allow + * more memory for the Java heap when starting the embedding application + * (taking into consideration, of course, the memory needs of the embedding + * application as well). For example, using the default page size of 4K, a + * page cache size of 2000 pages will require at least 8 MB of memory (and + * probably more, given the overhead). + *

+ * The minimum value is 40 pages. If you specify a lower value, Derby uses + * the default value. + *

+ * Default is 1024 (which gives about 16mb memory usage given + * the default of 16384 as page size). + * + * @param derbyStoragePageCacheSize the page cache size + */ + public void setDerbyStoragePageCacheSize(String derbyStoragePageCacheSize) { + this.derbyStoragePageCacheSize = + Integer.decode(derbyStoragePageCacheSize).intValue(); + } + + + /** + * @see #setDerbyStoragePageReservedSpace + * @return the page reserved space + */ + public String getDerbyStoragePageReservedSpace() { + return String.valueOf(derbyStoragePageReservedSpace); + } + + /** + * Defines the percentage of space reserved for updates on an on-disk + * database page for tables only (not indexes); indicates the percentage of + * space to keep free on a page when inserting. Leaving reserved space on a + * page can minimize row overflow (and the associated performance hit) + * during updates. Once a page has been filled up to the reserved-space + * threshold, no new rows are allowed on the page. This reserved space is + * used only for rows that increase in size when updated, not for new + * inserts. Set this property prior to issuing the CREATE TABLE statement. + *

+ * Regardless of the value of derby.storage.pageReservedSpace, an empty page + * always accepts at least one row. + *

+ * Default is 20% + * + * @param derbyStoragePageReservedSpace the page reserved space + */ + public void setDerbyStoragePageReservedSpace(String derbyStoragePageReservedSpace) { + this.derbyStoragePageReservedSpace = + Integer.decode(derbyStoragePageReservedSpace).intValue(); + } + + /** + * @see #setDerbyStoragePageSize + * @return the page size + */ + public String getDerbyStoragePageSize() { + return String.valueOf(derbyStoragePageSize); + } + + /** + * Defines the page size, in bytes, for on-disk database pages for tables or + * indexes used during table or index creation. Page size can only be one + * the following values: 4096, 8192, 16384, or 32768. Set this property + * prior to issuing the CREATE TABLE or CREATE INDEX statement. This value + * will be used for the lifetime of the newly created conglomerates. + *

+ * Default is 16384 + * + * @param derbyStoragePageSize the storage page size + */ + public void setDerbyStoragePageSize(String derbyStoragePageSize) { + this.derbyStoragePageSize = Integer.decode(derbyStoragePageSize).intValue(); + } + + /** + * {@inheritDoc} + */ + public void init(PMContext context) throws Exception { + // init default values + if (getDriver() == null) { + setDriver(DERBY_EMBEDDED_DRIVER); + } + if (getDatabaseType() == null) { + setDatabaseType("derby"); + } + if (getUrl() == null) { + setUrl("jdbc:derby:" + context.getHomeDir().getPath() + "/db/itemState;create=true"); + } + if (getSchemaObjectPrefix() == null) { + setSchemaObjectPrefix(""); + } + super.init(context); + // set properties + if (DERBY_EMBEDDED_DRIVER.equals(getDriver())) { + conHelper.exec("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY " + + "('derby.storage.initialPages', '" + derbyStorageInitialPages + "')"); + conHelper.exec("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY " + + "('derby.storage.minimumRecordSize', '" + derbyStorageMinimumRecordSize + "')"); + conHelper.exec("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY " + + "('derby.storage.pageCacheSize', '" + derbyStoragePageCacheSize + "')"); + conHelper.exec("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY " + + "('derby.storage.pageReservedSpace', '" + derbyStoragePageReservedSpace + "')"); + conHelper.exec("CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY " + "('derby.storage.pageSize', '" + + derbyStoragePageSize + "')"); + } + } + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) { + return new DerbyConnectionHelper(dataSrc, blockOnConnectionLoss); + } + + /** + * {@inheritDoc} + * + * Since Derby cannot handle binary indexes, we use long-long keys. + * + * @return {@link BundleDbPersistenceManager#SM_LONGLONG_KEYS} + */ + public int getStorageModel() { + return BundleDbPersistenceManager.SM_LONGLONG_KEYS; + } + + /** + * Closes the given connection by shutting down the embedded Derby + * database. + * + * @throws SQLException if an error occurs + */ + public void close() throws Exception { + super.close(); + ((DerbyConnectionHelper) conHelper).shutDown(getDriver()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/H2PersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/H2PersistenceManager.java new file mode 100644 index 0000000..25bfba2 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/H2PersistenceManager.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import org.apache.jackrabbit.core.persistence.PMContext; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class H2PersistenceManager extends DbPersistenceManager { + + /** the lock time out. see*/ + private long lockTimeout = 10000; + + /** + * Returns the lock timeout. + * @return the lock timeout + */ + public String getLockTimeout() { + return String.valueOf(lockTimeout); + } + + /** + * Sets the lock timeout in milliseconds. + * @param lockTimeout the lock timeout. + */ + public void setLockTimeout(String lockTimeout) { + this.lockTimeout = Long.parseLong(lockTimeout); + } + + /** + * {@inheritDoc} + */ + public void init(PMContext context) throws Exception { + // init default values + if (getDriver() == null) { + setDriver("org.h2.Driver"); + } + if (getUrl() == null) { + setUrl("jdbc:h2:file:" + context.getHomeDir().getPath() + "/db/itemState"); + } + if (getDatabaseType() == null) { + setDatabaseType("h2"); + } + if (getSchemaObjectPrefix() == null) { + setSchemaObjectPrefix(""); + } + + super.init(context); + + conHelper.exec("SET LOCK_TIMEOUT " + lockTimeout); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MSSqlPersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MSSqlPersistenceManager.java new file mode 100644 index 0000000..b7edaf7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MSSqlPersistenceManager.java @@ -0,0 +1,67 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class MSSqlPersistenceManager extends DbPersistenceManager { + + /** the MS SQL table space to use */ + protected String tableSpace = ""; + + public MSSqlPersistenceManager() { + setDriver("com.microsoft.sqlserver.jdbc.SQLServerDriver"); + setDatabaseType("mssql"); + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + return super.createCheckSchemaOperation().addVariableReplacement( + CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace); + } + + /** + * Returns the configured MS SQL table space. + * + * @return the configured MS SQL table space. + */ + public String getTableSpace() { + return tableSpace; + } + + /** + * Sets the MS SQL table space. + * + * @param tableSpace the MS SQL table space. + */ + public void setTableSpace(String tableSpace) { + if (tableSpace != null && tableSpace.trim().length() > 0) { + this.tableSpace = "on " + tableSpace.trim(); + } else { + this.tableSpace = ""; + } + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MySqlPersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MySqlPersistenceManager.java new file mode 100644 index 0000000..724c91f --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/MySqlPersistenceManager.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import org.apache.jackrabbit.core.persistence.PMContext; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class MySqlPersistenceManager extends DbPersistenceManager { + + /** + * {@inheritDoc} + */ + public void init(PMContext context) throws Exception { + // init default values + if (getDriver() == null) { + setDriver("org.gjt.mm.mysql.Driver"); + } + if (getDatabaseType() == null) { + setDatabaseType("mysql"); + } + super.init(context); + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/Oracle9PersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/Oracle9PersistenceManager.java new file mode 100644 index 0000000..863cd42 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/Oracle9PersistenceManager.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.Oracle10R1ConnectionHelper; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class Oracle9PersistenceManager extends OraclePersistenceManager { + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + Oracle10R1ConnectionHelper helper = new Oracle10R1ConnectionHelper(dataSrc, blockOnConnectionLoss); + helper.init(); + return helper; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/OraclePersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/OraclePersistenceManager.java new file mode 100644 index 0000000..01ab35a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/OraclePersistenceManager.java @@ -0,0 +1,167 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import java.sql.SQLException; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.persistence.PMContext; +import org.apache.jackrabbit.core.persistence.pool.DbNameIndex; +import org.apache.jackrabbit.core.persistence.pool.NGKDbNameIndex; +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.OracleConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class OraclePersistenceManager extends DbPersistenceManager { + /** + * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace} + * are not specified. + */ + protected static final String DEFAULT_TABLESPACE_CLAUSE = ""; + + /** + * Name of the replacement variable in the DDL for {@link #tablespace}. + */ + protected static final String TABLESPACE_VARIABLE = "${tablespace}"; + + /** + * Name of the replacement variable in the DDL for {@link #indexTablespace}. + */ + protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}"; + + /** The Oracle tablespace to use for tables */ + protected String tablespace; + + /** The Oracle tablespace to use for indexes */ + protected String indexTablespace; + + /** + * Creates a new oracle persistence manager + */ + public OraclePersistenceManager() { + tablespace = DEFAULT_TABLESPACE_CLAUSE; + indexTablespace = DEFAULT_TABLESPACE_CLAUSE; + // enable db blob support + setExternalBLOBs(false); + } + + /** + * Returns the configured Oracle tablespace for tables. + * @return the configured Oracle tablespace for tables. + */ + public String getTablespace() { + return tablespace; + } + + /** + * Sets the Oracle tablespace for tables. + * @param tablespaceName the Oracle tablespace for tables. + */ + public void setTablespace(String tablespaceName) { + this.tablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Returns the configured Oracle tablespace for indexes. + * @return the configured Oracle tablespace for indexes. + */ + public String getIndexTablespace() { + return indexTablespace; + } + + /** + * Sets the Oracle tablespace for indexes. + * @param tablespaceName the Oracle tablespace for indexes. + */ + public void setIndexTablespace(String tablespaceName) { + this.indexTablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Constructs the tablespace <tbs name> clause from + * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE} + * is returned instead. + * + * @param tablespaceName A tablespace name + * @return A tablespace clause using the supplied name or + * {@value #DEFAULT_TABLESPACE_CLAUSE} if the name is empty + */ + private String buildTablespaceClause(String tablespaceName) { + if (tablespaceName == null || tablespaceName.trim().length() == 0) { + return DEFAULT_TABLESPACE_CLAUSE; + } else { + return "tablespace " + tablespaceName.trim(); + } + } + + public void init(PMContext context) throws Exception { + // init default values + if (getDriver() == null) { + setDriver("oracle.jdbc.OracleDriver"); + } + if (getUrl() == null) { + setUrl("jdbc:oracle:thin:@127.0.0.1:1521:xe"); + } + if (getDatabaseType() == null) { + setDatabaseType("oracle"); + } + if (getSchemaObjectPrefix() == null) { + setSchemaObjectPrefix(context.getHomeDir().getName() + "_"); + } + super.init(context); + } + + /** + * Returns a new instance of a NGKDbNameIndex. + * + * @return a new instance of a NGKDbNameIndex. + * @throws SQLException if an SQL error occurs. + */ + protected DbNameIndex createDbNameIndex() throws SQLException { + return new NGKDbNameIndex(conHelper, schemaObjectPrefix); + } + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + OracleConnectionHelper helper = new OracleConnectionHelper(dataSrc, blockOnConnectionLoss); + helper.init(); + return helper; + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) { + // tablespace was set but not indexTablespace : use the same for both + indexTablespace = tablespace; + } + return super.createCheckSchemaOperation() + .addVariableReplacement(TABLESPACE_VARIABLE, tablespace) + .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/PostgreSQLPersistenceManager.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/PostgreSQLPersistenceManager.java new file mode 100644 index 0000000..27eb2e9 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/manager/PostgreSQLPersistenceManager.java @@ -0,0 +1,75 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.manager; + +import java.sql.SQLException; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.persistence.PMContext; +import org.apache.jackrabbit.core.persistence.pool.DbNameIndex; +import org.apache.jackrabbit.core.persistence.pool.PostgreSQLNameIndex; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.PostgreSQLConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.DbPersistenceManager; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class PostgreSQLPersistenceManager extends DbPersistenceManager { + + /** + * {@inheritDoc} + */ + public void init(PMContext context) throws Exception { + // init default values + if (getDriver() == null) { + setDriver("org.postgresql.Driver"); + } + if (getDatabaseType() == null) { + setDatabaseType("postgresql"); + } + super.init(context); + } + + /** + * Returns a new instance of a DbNameIndex. + * @return a new instance of a DbNameIndex. + * @throws SQLException if an SQL error occurs. + */ + protected DbNameIndex createDbNameIndex() throws SQLException { + return new PostgreSQLNameIndex(conHelper, schemaObjectPrefix); + } + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + return new PostgreSQLConnectionHelper(dataSrc, blockOnConnectionLoss); + } + + /** + * returns the storage model + * @return the storage model + */ + public int getStorageModel() { + return SM_LONGLONG_KEYS; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/store/DerbyDataStore.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/store/DerbyDataStore.java new file mode 100644 index 0000000..d5b80ab --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/store/DerbyDataStore.java @@ -0,0 +1,54 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.store; + +import java.sql.SQLException; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.data.DataStoreException; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.DerbyConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.DatabaseDataStore; + +/** + * @author Jacky.gao + * @since 2017年12月7日 + */ +public class DerbyDataStore extends DatabaseDataStore { + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + return new DerbyConnectionHelper(dataSrc, false); + } + + /** + * {@inheritDoc} + */ + @Override + public synchronized void close() throws DataStoreException { + super.close(); + try { + ((DerbyConnectionHelper) conHelper).shutDown(getDriver()); + } catch (SQLException e) { + throw new DataStoreException(e); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DB2FileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DB2FileSystem.java new file mode 100644 index 0000000..f52aafa --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DB2FileSystem.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class DB2FileSystem extends BaseDbFileSystem { + + @Override + public String databaseType() { + return "db2"; + } + + /** + * Creates a new DB2FileSystem instance. + */ + public DB2FileSystem() { + // preset some attributes to reasonable defaults + schema = "db2"; + driver = "com.ibm.db2.jcc.DB2Driver"; + } + + //-----------------------------------------< DatabaseFileSystem overrides > + /** + * {@inheritDoc} + *

+ * Since DB2 requires parameter markers within the select clause to be + * explicitly typed using cast(? as type_name) some statements + * had to be changed accordingly. + */ + protected void buildSQLStatements() { + super.buildSQLStatements(); + + copyFileSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "select cast(? as varchar(745)), cast(? as varchar(255)), FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_DATA is not null"; + + copyFilesSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "select cast(? as varchar(745)), FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_DATA is not null"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DerbyFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DerbyFileSystem.java new file mode 100644 index 0000000..bbba464 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/DerbyFileSystem.java @@ -0,0 +1,91 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import java.sql.SQLException; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.fs.FileSystemException; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.DerbyConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class DerbyFileSystem extends BaseDbFileSystem { + + @Override + public String databaseType() { + return "derby"; + } + + + + /** + * Flag indicating whether this derby database should be shutdown on close. + */ + protected boolean shutdownOnClose; + + /** + * Creates a new DerbyFileSystem instance. + */ + public DerbyFileSystem() { + // preset some attributes to reasonable defaults + schema = "derby"; + driver = "org.apache.derby.jdbc.EmbeddedDriver"; + shutdownOnClose = true; + initialized = false; + } + + //----------------------------------------------------< setters & getters > + + public boolean getShutdownOnClose() { + return shutdownOnClose; + } + + public void setShutdownOnClose(boolean shutdownOnClose) { + this.shutdownOnClose = shutdownOnClose; + } + + //-----------------------------------------------< DbFileSystem overrides > + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + return new DerbyConnectionHelper(dataSrc, false); + } + + /** + * {@inheritDoc} + */ + @Override + public void close() throws FileSystemException { + super.close(); + if (shutdownOnClose) { + try { + ((DerbyConnectionHelper) conHelper).shutDown(driver); + } catch (SQLException e) { + throw new FileSystemException("failed to shutdown Derby", e); + } + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MSSqlFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MSSqlFileSystem.java new file mode 100644 index 0000000..c49af02 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MSSqlFileSystem.java @@ -0,0 +1,78 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class MSSqlFileSystem extends BaseDbFileSystem { + @Override + public String databaseType() { + // TODO Auto-generated method stub + return "mssql"; + } + + + /** the variable for the MS SQL table space */ + public static final String TABLE_SPACE_VARIABLE = "${tableSpace}"; + + /** the MS SQL table space to use */ + protected String tableSpace = ""; + + /** + * Returns the configured MS SQL table space. + * @return the configured MS SQL table space. + */ + public String getTableSpace() { + return tableSpace; + } + + /** + * Sets the MS SQL table space. + * @param tableSpace the MS SQL table space. + */ + public void setTableSpace(String tableSpace) { + if (tableSpace != null && tableSpace.length() > 0) { + this.tableSpace = "on " + tableSpace.trim(); + } else { + this.tableSpace = ""; + } + } + + /** + * Creates a new MSSqlFileSystem instance. + */ + public MSSqlFileSystem() { + // preset some attributes to reasonable defaults + schema = "mssql"; + driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"; + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + return super.createCheckSchemaOperation().addVariableReplacement( + CheckSchemaOperation.TABLE_SPACE_VARIABLE, tableSpace); + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MysqlFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MysqlFileSystem.java new file mode 100644 index 0000000..bd890ee --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/MysqlFileSystem.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class MysqlFileSystem extends BaseDbFileSystem { + @Override + public String databaseType() { + return "mysql"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/Oracle9FileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/Oracle9FileSystem.java new file mode 100644 index 0000000..610f12d --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/Oracle9FileSystem.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.Oracle10R1ConnectionHelper; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class Oracle9FileSystem extends OracleFileSystem { + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + Oracle10R1ConnectionHelper helper = new Oracle10R1ConnectionHelper(dataSrc, false); + helper.init(); + return helper; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/OracleFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/OracleFileSystem.java new file mode 100644 index 0000000..384fcc4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/OracleFileSystem.java @@ -0,0 +1,256 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import javax.sql.DataSource; + +import org.apache.jackrabbit.core.util.db.CheckSchemaOperation; +import org.apache.jackrabbit.core.util.db.ConnectionHelper; +import org.apache.jackrabbit.core.util.db.OracleConnectionHelper; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class OracleFileSystem extends BaseDbFileSystem{ + @Override + public String databaseType() { + return "oracle"; + } + + /** + * The default tablespace clause used when {@link #tablespace} or {@link #indexTablespace} + * are not specified. + */ + protected static final String DEFAULT_TABLESPACE_CLAUSE = ""; + + /** + * Name of the replacement variable in the DDL for {@link #tablespace}. + */ + protected static final String TABLESPACE_VARIABLE = "${tablespace}"; + + /** + * Name of the replacement variable in the DDL for {@link #indexTablespace}. + */ + protected static final String INDEX_TABLESPACE_VARIABLE = "${indexTablespace}"; + + /** The Oracle tablespace to use for tables */ + protected String tablespace; + + /** The Oracle tablespace to use for indexes */ + protected String indexTablespace; + + /** + * Creates a new OracleFileSystem instance. + */ + public OracleFileSystem() { + // preset some attributes to reasonable defaults + schema = "oracle"; + driver = "oracle.jdbc.OracleDriver"; + schemaObjectPrefix = ""; + tablespace = DEFAULT_TABLESPACE_CLAUSE; + indexTablespace = DEFAULT_TABLESPACE_CLAUSE; + initialized = false; + } + + /** + * Returns the configured Oracle tablespace for tables. + * @return the configured Oracle tablespace for tables. + */ + public String getTablespace() { + return tablespace; + } + + /** + * Sets the Oracle tablespace for tables. + * @param tablespaceName the Oracle tablespace for tables. + */ + public void setTablespace(String tablespaceName) { + this.tablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Returns the configured Oracle tablespace for indexes. + * @return the configured Oracle tablespace for indexes. + */ + public String getIndexTablespace() { + return indexTablespace; + } + + /** + * Sets the Oracle tablespace for indexes. + * @param tablespaceName the Oracle tablespace for indexes. + */ + public void setIndexTablespace(String tablespaceName) { + this.indexTablespace = this.buildTablespaceClause(tablespaceName); + } + + /** + * Constructs the tablespace <tbs name> clause from + * the supplied tablespace name. If the name is empty, {@link #DEFAULT_TABLESPACE_CLAUSE} + * is returned instead. + * + * @param tablespaceName A tablespace name + * @return A tablespace clause using the supplied name or + * {@value #DEFAULT_TABLESPACE_CLAUSE} if the name is empty + */ + private String buildTablespaceClause(String tablespaceName) { + if (tablespaceName == null || tablespaceName.trim().length() == 0) { + return DEFAULT_TABLESPACE_CLAUSE; + } else { + return "tablespace " + tablespaceName.trim(); + } + } + + //-----------------------------------------< DatabaseFileSystem overrides > + + /** + * {@inheritDoc} + */ + @Override + protected ConnectionHelper createConnectionHelper(DataSource dataSrc) throws Exception { + OracleConnectionHelper helper = new OracleConnectionHelper(dataSrc, false); + helper.init(); + return helper; + } + + /** + * {@inheritDoc} + */ + @Override + protected CheckSchemaOperation createCheckSchemaOperation() { + if (DEFAULT_TABLESPACE_CLAUSE.equals(indexTablespace) && !DEFAULT_TABLESPACE_CLAUSE.equals(tablespace)) { + // tablespace was set but not indexTablespace : use the same for both + indexTablespace = tablespace; + } + return super.createCheckSchemaOperation() + .addVariableReplacement(TABLESPACE_VARIABLE, tablespace) + .addVariableReplacement(INDEX_TABLESPACE_VARIABLE, indexTablespace); + } + + //-----------------------------------------< DatabaseFileSystem overrides > + + /** + * Builds the SQL statements + *

+ * Since Oracle treats emtpy strings and BLOBs as null values the SQL + * statements had to be adapated accordingly. The following changes were + * necessary: + *

    + *
  • The distinction between file and folder entries is based on + * FSENTRY_LENGTH being null/not null rather than FSENTRY_DATA being + * null/not null because FSENTRY_DATA of a 0-length (i.e. empty) file is + * null in Oracle.
  • + *
  • Folder entries: Since the root folder has an empty name (which would + * be null in Oracle), an empty name is automatically converted and treated + * as " ".
  • + *
+ */ + protected void buildSQLStatements() { + insertFileSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "values (?, ?, ?, ?, ?)"; + + insertFolderSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "values (?, nvl(?, ' '), ?, null)"; + + updateDataSQL = "update " + + schemaObjectPrefix + "FSENTRY " + + "set FSENTRY_DATA = ?, FSENTRY_LASTMOD = ?, FSENTRY_LENGTH = ? " + + "where FSENTRY_PATH = ? and FSENTRY_NAME = ? " + + "and FSENTRY_LENGTH is not null"; + + updateLastModifiedSQL = "update " + + schemaObjectPrefix + "FSENTRY set FSENTRY_LASTMOD = ? " + + "where FSENTRY_PATH = ? and FSENTRY_NAME = ? " + + "and FSENTRY_LENGTH is not null"; + + selectExistSQL = "select 1 from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = nvl(?, ' ')"; + + selectFileExistSQL = "select 1 from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_LENGTH is not null"; + + selectFolderExistSQL = "select 1 from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = nvl(?, ' ') and FSENTRY_LENGTH is null"; + + selectFileNamesSQL = "select FSENTRY_NAME from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_LENGTH is not null"; + + selectFolderNamesSQL = "select FSENTRY_NAME from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME != ' ' " + + "and FSENTRY_LENGTH is null"; + + selectFileAndFolderNamesSQL = "select FSENTRY_NAME from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME != ' '"; + + selectChildCountSQL = "select count(FSENTRY_NAME) from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME != ' '"; + + selectDataSQL = "select nvl(FSENTRY_DATA, empty_blob()) from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_LENGTH is not null"; + + selectLastModifiedSQL = "select FSENTRY_LASTMOD from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = nvl(?, ' ')"; + + selectLengthSQL = "select nvl(FSENTRY_LENGTH, 0) from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_LENGTH is not null"; + + deleteFileSQL = "delete from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_LENGTH is not null"; + + deleteFolderSQL = "delete from " + + schemaObjectPrefix + "FSENTRY where " + + "(FSENTRY_PATH = ? and FSENTRY_NAME = nvl(?, ' ') and FSENTRY_LENGTH is null) " + + "or (FSENTRY_PATH = ?) " + + "or (FSENTRY_PATH like ?) "; + + copyFileSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "select ?, ?, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_NAME = ? and FSENTRY_LENGTH is not null"; + + copyFilesSQL = "insert into " + + schemaObjectPrefix + "FSENTRY " + + "(FSENTRY_PATH, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH) " + + "select ?, FSENTRY_NAME, FSENTRY_DATA, " + + "FSENTRY_LASTMOD, FSENTRY_LENGTH from " + + schemaObjectPrefix + "FSENTRY where FSENTRY_PATH = ? " + + "and FSENTRY_LENGTH is not null"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/PostgreSQLFileSystem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/PostgreSQLFileSystem.java new file mode 100644 index 0000000..0a039d4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/database/system/PostgreSQLFileSystem.java @@ -0,0 +1,29 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.database.system; + +import com.itheima.sfbx.rule.console.repository.database.BaseDbFileSystem; + +/** + * @author Jacky.gao + * @since 2017年12月6日 + */ +public class PostgreSQLFileSystem extends BaseDbFileSystem { + @Override + public String databaseType() { + return "postgresql"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/FileType.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/FileType.java new file mode 100644 index 0000000..bdcbd9c --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/FileType.java @@ -0,0 +1,117 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.dsl.Constant; + +/** + * @author Jacky.gao + * @since 2014年12月24日 + */ +public enum FileType { + Ruleset{ + @Override + public String toString() { + return "rs.xml"; + } + },DecisionTable{ + @Override + public String toString() { + return "dt.xml"; + } + },ScriptDecisionTable{ + @Override + public String toString() { + return "dts.xml"; + } + },ActionLibrary{ + @Override + public String toString() { + return "al.xml"; + } + },VariableLibrary{ + @Override + public String toString() { + return "vl.xml"; + } + },ParameterLibrary{ + @Override + public String toString() { + return "pl.xml"; + } + },ConstantLibrary{ + @Override + public String toString() { + return "cl.xml"; + } + },RuleFlow{ + @Override + public String toString() { + return "rl.xml"; + } + },UL{ + @Override + public String toString() { + return Constant.UL_SUFFIX; + } + },DecisionTree{ + @Override + public String toString() { + return "dtree.xml"; + } + },Scorecard{ + @Override + public String toString() { + return "sc"; + } + },DIR{ + @Override + public String toString() { + return "DIR"; + } + }; + + public static FileType parse(String type){ + if(type.equals("rs.xml")){ + return FileType.Ruleset; + }else if(type.equals("dt.xml")){ + return FileType.DecisionTable; + }else if(type.equals("dts.xml")){ + return FileType.ScriptDecisionTable; + }else if(type.equals("al.xml")){ + return FileType.ActionLibrary; + }else if(type.equals("vl.xml")){ + return FileType.VariableLibrary; + }else if(type.equals("pl.xml")){ + return FileType.ParameterLibrary; + }else if(type.equals("cl.xml")){ + return FileType.ConstantLibrary; + }else if(type.equals("rl.xml")){ + return FileType.RuleFlow; + }else if(type.equals("ul")){ + return FileType.UL; + }else if(type.equals("dtree.xml")){ + return FileType.DecisionTree; + }else if(type.equals("sc")){ + return FileType.Scorecard; + }else if(type.equals("DIR")){ + return FileType.DIR; + }else{ + throw new RuleException("Unknow type:"+type); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/LibType.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/LibType.java new file mode 100644 index 0000000..8be8201 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/LibType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; +/** + * @author Jacky.gao + * @since 2016年3月3日 + */ +public enum LibType { + ruleset,decisiontable,decisiontree,ruleflow,scorecard,res,all; +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/PermissionType.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/PermissionType.java new file mode 100644 index 0000000..2fe1498 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/PermissionType.java @@ -0,0 +1,37 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +/** + * @author Jacky.gao + * @since 2015年5月7日 + */ +public enum PermissionType { + ProjectVisible, NewVar, NewParam, NewConst, NewAction, + NewRule, NewDslRule, NewDecisionTable,NewDslDecisionTable,NewRuleFlow,NewDecisionTree, + + DelVar,DelParam,DelConst,DelAction,DelRule,DelDslRule, + DelDecisionTable,DelDslDecisionTable,DelRuleFlow,DelDecisionTree, + + ModVar,ModParam,ModConst,ModAction,ModRule,ModDslRule, + ModDecisionTable,ModDslDecisionTable,ModRuleFlow,ModDecisionTree, + + InsertRow, DelRow, InsertConditionCol, ModConditionCol, DelConditionCol, + InsertActionCol, ModActionCol, DelActionCol, + + InsertDslRow, DelDslRow, InsertDslConditionCol, ModDslConditionCol, DelDslConditionCol, + InsertDslActionCol, ModDslActionCol, DelDslActionCol +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/RepositoryFile.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/RepositoryFile.java new file mode 100644 index 0000000..922e057 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/RepositoryFile.java @@ -0,0 +1,135 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2014年12月24日 + */ +public class RepositoryFile { + private String id; + private String name; + private String fullPath; + private Type type; + private Type folderType; + private boolean lock; + private String lockInfo; + @JsonIgnore + private LibType libType; + @JsonIgnore + private RepositoryFile parentFile; + private List children; + public RepositoryFile() { + this.id=UUID.randomUUID().toString(); + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public RepositoryFile getParentFile() { + return parentFile; + } + public void setParentFile(RepositoryFile parentFile) { + this.parentFile = parentFile; + } + public LibType getLibType() { + return libType; + } + public void setLibType(LibType libType) { + this.libType = libType; + } + public List getChildren() { + return children; + } + public void addChild(RepositoryFile fileInfo,boolean isdir) { + if(this.children==null){ + this.children=new ArrayList(); + } + fileInfo.setParentFile(this); + if(isdir){ + this.children.add(0,fileInfo); + }else{ + this.children.add(fileInfo); + } + } + public void setChildren(List children) { + this.children = children; + } + public String getFullPath(){ + if(fullPath==null){ + if(parentFile!=null){ + fullPath=parentFile.getFullPath(); + }else{ + fullPath=""; + } + if(fullPath.equals("/")){ + fullPath=""; + } + fullPath+="/"+name; + } + return fullPath; + } + public void setFullPath(String fullPath) { + this.fullPath = fullPath; + } + public Type getType() { + return type; + } + public void setType(Type type) { + this.type = type; + } + + public Type getFolderType() { + return folderType; + } + + public void setFolderType(Type folderType) { + this.folderType = folderType; + } + + public boolean isLock() { + return lock; + } + + public void setLock(boolean lock) { + this.lock = lock; + } + + public String getLockInfo() { + return lockInfo; + } + + public void setLockInfo(String lockInfo) { + this.lockInfo = lockInfo; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourceItem.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourceItem.java new file mode 100644 index 0000000..329f219 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourceItem.java @@ -0,0 +1,53 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + + +/** + * @author Jacky.gao + * @since 2015年1月7日 + */ +public class ResourceItem { + private String name; + private String path; + private String packageId; + private String version; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + public String getPackageId() { + return packageId; + } + public void setPackageId(String packageId) { + this.packageId = packageId; + } + public String getVersion() { + return version; + } + public void setVersion(String version) { + this.version = version; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourcePackage.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourcePackage.java new file mode 100644 index 0000000..b10bc16 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/ResourcePackage.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +import java.util.Date; +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月7日 + */ + +public class ResourcePackage { + + private String id; + private String name; + private String project; + private Date createDate; + private List resourceItems; + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getProject() { + return project; + } + public void setProject(String project) { + this.project = project; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } + public List getResourceItems() { + return resourceItems; + } + public void setResourceItems(List resourceItems) { + this.resourceItems = resourceItems; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/Type.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/Type.java new file mode 100644 index 0000000..090b0d8 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/Type.java @@ -0,0 +1,24 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +/** + * @author Jacky.gao + * @since 2016年5月26日 + */ +public enum Type { + root, project, resource, resourcePackage, lib, action, parameter, constant, variable, ruleLib, decisionTableLib, decisionTreeLib, scorecardLib,flowLib, scorecard,rule, ul, decisionTable, scriptDecisionTable, decisionTree, flow, all, folder; +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/VersionFile.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/VersionFile.java new file mode 100644 index 0000000..c917a6c --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/model/VersionFile.java @@ -0,0 +1,62 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.model; + +import java.util.Date; + +/** + * @author Jacky.gao + * @since 2015年3月25日 + */ +public class VersionFile { + private String path; + private String createUser; + private String name; + private String comment; + private Date createDate; + + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + public String getCreateUser() { + return createUser; + } + public void setCreateUser(String createUser) { + this.createUser = createUser; + } + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public String getComment() { + return comment; + } + public void setComment(String comment) { + this.comment = comment; + } + public Date getCreateDate() { + return createDate; + } + public void setCreateDate(Date createDate) { + this.createDate = createDate; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionService.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionService.java new file mode 100644 index 0000000..103e288 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionService.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.permission; +/** + * @author Jacky.gao + * @since 2016年9月1日 + */ +public interface PermissionService { + boolean isAdmin(); + + boolean projectHasPermission(String path); + + boolean projectPackageHasReadPermission(String path); + boolean projectPackageHasWritePermission(String path); + + boolean fileHasWritePermission(String path); + boolean fileHasReadPermission(String path); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionServiceImpl.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionServiceImpl.java new file mode 100644 index 0000000..2e7156a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionServiceImpl.java @@ -0,0 +1,229 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.permission; + +import java.util.List; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.rule.console.servlet.RequestHolder; +import com.itheima.sfbx.rule.console.servlet.permission.ProjectConfig; +import com.itheima.sfbx.rule.console.servlet.permission.UserPermission; + +/** + * @author Jacky.gao + * @since 2016年9月1日 + */ +public class PermissionServiceImpl implements PermissionStore,PermissionService { + private RepositoryService repositoryService; + + @Override + public boolean projectHasPermission(String path) { + if(isAdmin()){ + return true; + } + path=processPath(path); + int slashPos=path.indexOf("/"); + if(slashPos==-1){ + slashPos=path.length(); + } + String project=path.substring(0,slashPos); + ProjectConfig config=loadProjectPermission(project); + if(config==null){ + return false; + } + return config.isReadProject(); + } + + + @Override + public boolean projectPackageHasReadPermission(String path) { + return projectPackagePermission(path, 0); + } + @Override + public boolean projectPackageHasWritePermission(String path) { + return projectPackagePermission(path, 1); + } + + private boolean projectPackagePermission(String path,int type){ + if(isAdmin()){ + return true; + } + path=processPath(path); + int slashPos=path.indexOf("/"); + if(slashPos==-1){ + slashPos=path.length(); + } + String project=path.substring(0,slashPos); + ProjectConfig config=loadProjectPermission(project); + if(config==null){ + return false; + } + if(type==0){ + return config.isReadPackage(); + }else{ + return config.isWritePackage(); + } + } + + @Override + public boolean fileHasReadPermission(String path) { + return fileHasPermission(path, 0); + } + + @Override + public boolean fileHasWritePermission(String path) { + return fileHasPermission(path, 1); + } + + private boolean fileHasPermission(String path,int permissionType){ + if(isAdmin()){ + return true; + } + path=processPath(path); + int slashPos=path.indexOf("/"); + if(slashPos==-1){ + throw new RuleException("Invalid file ["+path+"] for permission check."); + } + String project=path.substring(0,slashPos); + int pointPos=path.indexOf("."); + if(pointPos==-1){ + return true; + } + ProjectConfig config=loadProjectPermission(project); + if(config==null){ + return false; + } + String extName=path.substring(pointPos+1,path.length()); + FileType type=FileType.parse(extName); + switch(type){ + case VariableLibrary: + if(permissionType==0){ + return config.isReadVariableFile(); + }else{ + return config.isWriteVariableFile(); + } + case ActionLibrary: + if(permissionType==0){ + return config.isReadActionFile(); + }else{ + return config.isWriteActionFile(); + } + case ConstantLibrary: + if(permissionType==0){ + return config.isReadConstantFile(); + }else{ + return config.isWriteConstantFile(); + } + case DecisionTable: + if(permissionType==0){ + return config.isReadDecisionTableFile(); + }else{ + return config.isWriteDecisionTableFile(); + } + case DecisionTree: + if(permissionType==0){ + return config.isReadDecisionTreeFile(); + }else{ + return config.isWriteDecisionTreeFile(); + } + case ParameterLibrary: + if(permissionType==0){ + return config.isReadParameterFile(); + }else{ + return config.isWriteParameterFile(); + } + case RuleFlow: + if(permissionType==0){ + return config.isReadFlowFile(); + }else{ + return config.isWriteFlowFile(); + } + case Ruleset: + if(permissionType==0){ + return config.isReadRuleFile(); + }else{ + return config.isWriteRuleFile(); + } + case ScriptDecisionTable: + if(permissionType==0){ + return config.isReadDecisionTableFile(); + }else{ + return config.isWriteDecisionTableFile(); + } + case UL: + if(permissionType==0){ + return config.isReadRuleFile(); + }else{ + return config.isWriteRuleFile(); + } + case Scorecard: + if(permissionType==0){ + return config.isReadScorecardFile(); + }else{ + return config.isWriteScorecardFile(); + } + case DIR: + return true; + } + return false; + } + + private String processPath(String path) { + if (path.startsWith("/")) { + return path.substring(1, path.length()); + } + return path; + } + @Override + public boolean isAdmin(){ + User user=EnvironmentUtils.getLoginUser(RequestHolder.newRequestContext()); + return user.isAdmin(); + } + private ProjectConfig loadProjectPermission(String project){ + User user=EnvironmentUtils.getLoginUser(RequestHolder.newRequestContext()); + String companyId=user.getCompanyId(); + try{ + List permissions=repositoryService.loadResourceSecurityConfigs(companyId); + ProjectConfig target=null; + for(UserPermission p:permissions){ + if(p.getUsername().equals(user.getUsername())){ + for(ProjectConfig pc:p.getProjectConfigs()){ + if(pc.getProject().equals(project)){ + target=pc; + break; + } + } + break; + } + } + return target; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + @Override + public void refreshPermissionStore() { + //do nothing... + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionStore.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionStore.java new file mode 100644 index 0000000..3673c9a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/permission/PermissionStore.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.permission; +/** + * @author Jacky.gao + * @since 2016年9月1日 + */ +public interface PermissionStore { + void refreshPermissionStore(); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/AbstractReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/AbstractReferenceUpdater.java new file mode 100644 index 0000000..d6bdaa4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/AbstractReferenceUpdater.java @@ -0,0 +1,46 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import java.io.IOException; +import java.io.StringWriter; + +import org.dom4j.Document; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.XMLWriter; + +import com.itheima.sfbx.framework.rule.RuleException; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public abstract class AbstractReferenceUpdater implements ReferenceUpdater { + protected String xmlToString(Document doc){ + StringWriter stringWriter = new StringWriter(); + OutputFormat xmlFormat = new OutputFormat(); + xmlFormat.setEncoding("UTF-8"); + XMLWriter xmlWriter = new XMLWriter(stringWriter, xmlFormat); + try { + xmlWriter.write(doc); + xmlWriter.close(); + return stringWriter.toString(); + } catch (IOException e) { + e.printStackTrace(); + throw new RuleException(e); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/DecisionTableReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/DecisionTableReferenceUpdater.java new file mode 100644 index 0000000..189767e --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/DecisionTableReferenceUpdater.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public class DecisionTableReferenceUpdater extends AbstractReferenceUpdater { + public boolean contain(String path, String xml) { + try{ + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String filePath=ele.attributeValue("path"); + if(filePath.endsWith(path)){ + return true; + } + } + return false; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public String update(String oldPath, String newPath, String xml) { + try{ + boolean modify=false; + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String path=ele.attributeValue("path"); + if(path.endsWith(oldPath)){ + ele.addAttribute("path", newPath); + modify=true; + } + } + if(modify){ + return xmlToString(doc); + } + return null; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public boolean support(String path) { + return path.endsWith(FileType.DecisionTable.toString()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/FlowDefinitionReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/FlowDefinitionReferenceUpdater.java new file mode 100644 index 0000000..0560523 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/FlowDefinitionReferenceUpdater.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public class FlowDefinitionReferenceUpdater extends AbstractReferenceUpdater { + public boolean contain(String path, String xml) { + try{ + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String filePath=ele.attributeValue("path"); + if(filePath.endsWith(path)){ + return true; + } + } + return false; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public String update(String oldPath, String newPath, String xml) { + try{ + boolean modify=false; + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String path=ele.attributeValue("path"); + if(path.endsWith(oldPath)){ + ele.addAttribute("path", newPath); + modify=true; + } + } + if(modify){ + return xmlToString(doc); + } + return null; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public boolean support(String path) { + return path.endsWith(FileType.RuleFlow.toString()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ReferenceUpdater.java new file mode 100644 index 0000000..a183630 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ReferenceUpdater.java @@ -0,0 +1,25 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public interface ReferenceUpdater { + boolean contain(String path, String xml); + String update(String path, String newPath, String xml); + boolean support(String path); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/RuleSetReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/RuleSetReferenceUpdater.java new file mode 100644 index 0000000..066792a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/RuleSetReferenceUpdater.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public class RuleSetReferenceUpdater extends AbstractReferenceUpdater { + public boolean contain(String path, String xml) { + try{ + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String filePath=ele.attributeValue("path"); + if(filePath.endsWith(path)){ + return true; + } + } + return false; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public String update(String oldPath, String newPath, String xml) { + try{ + boolean modify=false; + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String path=ele.attributeValue("path"); + if(path.endsWith(oldPath)){ + ele.addAttribute("path", newPath); + modify=true; + } + } + if(modify){ + return xmlToString(doc); + } + return null; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public boolean support(String path) { + return path.endsWith(FileType.Ruleset.toString()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptDecisionTableReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptDecisionTableReferenceUpdater.java new file mode 100644 index 0000000..bfefb0d --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptDecisionTableReferenceUpdater.java @@ -0,0 +1,105 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public class ScriptDecisionTableReferenceUpdater extends AbstractReferenceUpdater { + public boolean contain(String path, String xml) { + try{ + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String filePath=ele.attributeValue("path"); + if(filePath.endsWith(path)){ + return true; + } + } + return false; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public String update(String oldPath, String newPath, String xml) { + try{ + boolean modify=false; + Document doc=DocumentHelper.parseText(xml); + Element element=doc.getRootElement(); + for(Object obj:element.elements()){ + if(!(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + String name=ele.getName(); + boolean match=false; + if(name.equals("import-variable-library")){ + match=true; + }else if(name.equals("import-constant-library")){ + match=true; + }else if(name.equals("import-action-library")){ + match=true; + }else if(name.equals("import-parameter-library")){ + match=true; + } + if(!match){ + continue; + } + String path=ele.attributeValue("path"); + if(path.endsWith(oldPath)){ + ele.addAttribute("path", newPath); + modify=true; + } + } + if(modify){ + return xmlToString(doc); + } + return null; + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public boolean support(String path) { + return path.endsWith(FileType.ScriptDecisionTable.toString()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptRuleSetReferenceUpdater.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptRuleSetReferenceUpdater.java new file mode 100644 index 0000000..2a0fec6 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/updater/ScriptRuleSetReferenceUpdater.java @@ -0,0 +1,59 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.repository.updater; + +import java.io.IOException; +import java.util.List; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.framework.rule.dsl.DSLRuleSetBuilder; +import com.itheima.sfbx.framework.rule.model.rule.Library; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; + +/** + * @author Jacky.gao + * @since 2015年8月4日 + */ +public class ScriptRuleSetReferenceUpdater extends AbstractReferenceUpdater { + private DSLRuleSetBuilder builder; + public boolean contain(String path, String xml) { + try { + RuleSet rs=builder.build(xml); + List libs=rs.getLibraries(); + if(libs!=null){ + for(Library lib:libs){ + String libpath=lib.getPath(); + if(libpath.indexOf(path)!=-1){ + return true; + } + } + } + return false; + } catch (IOException e) { + throw new RuleException(e); + } + } + public String update(String path, String newPath, String xml) { + return null; + } + public void setBuilder(DSLRuleSetBuilder builder) { + this.builder = builder; + } + public boolean support(String path) { + return path.endsWith(FileType.UL.toString()); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/workspace_template.xml b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/workspace_template.xml new file mode 100644 index 0000000..60800b6 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/repository/workspace_template.xml @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/BaseServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/BaseServletHandler.java new file mode 100644 index 0000000..bbeceae --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/BaseServletHandler.java @@ -0,0 +1,55 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.itheima.sfbx.framework.rule.RuleException; + + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public abstract class BaseServletHandler implements ServletHandler { + + protected void invokeMethod(String methodName,HttpServletRequest req,HttpServletResponse resp){ + Method method; + try { + method = this.getClass().getMethod(methodName, new Class[]{HttpServletRequest.class,HttpServletResponse.class}); + method.invoke(this, new Object[]{req,resp}); + } catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) { + throw new RuleException(e); + } + } + + protected String retriveMethod(HttpServletRequest req) throws ServletException{ + String path=req.getContextPath()+URuleServlet.URL; + String uri=req.getRequestURI(); + String targetUrl=uri.substring(path.length()); + int slashPos=targetUrl.indexOf("/",1); + if(slashPos>-1){ + String methodName=targetUrl.substring(slashPos+1).trim(); + return methodName.length()>0 ? methodName : null; + } + return null; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RenderPageServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RenderPageServletHandler.java new file mode 100644 index 0000000..f13c8c1 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RenderPageServletHandler.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import org.apache.commons.lang.StringUtils; +import org.apache.velocity.app.Velocity; +import org.apache.velocity.app.VelocityEngine; +import org.apache.velocity.runtime.RuntimeConstants; +import org.apache.velocity.runtime.log.NullLogChute; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import com.itheima.sfbx.framework.rule.Utils; + + +/** + * @author Jacky.gao + * @since 2016年6月6日 + */ +public abstract class RenderPageServletHandler extends WriteJsonServletHandler implements ApplicationContextAware{ + protected VelocityEngine ve; + protected ApplicationContext applicationContext; + protected String buildProjectNameFromFile(String file) { + String project=null; + if(StringUtils.isNotBlank(file)){ + file=Utils.decodeURL(file); + if(file.startsWith("/")){ + file=file.substring(1,file.length()); + int pos=file.indexOf("/"); + project=file.substring(0,pos); + } + } + return project; + } + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext=applicationContext; + ve = new VelocityEngine(); + ve.setProperty(Velocity.RESOURCE_LOADER, "class"); + ve.setProperty("class.resource.loader.class","org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader"); + ve.setProperty(RuntimeConstants.RUNTIME_LOG_LOGSYSTEM,new NullLogChute()); + ve.init(); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestContext.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestContext.java new file mode 100644 index 0000000..0d7adb8 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestContext.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @author Jacky.gao + * @since 2016年5月25日 + */ +public class RequestContext { + private HttpServletRequest req; + private HttpServletResponse resp; + public RequestContext(HttpServletRequest req, HttpServletResponse resp) { + this.req=req; + this.resp=resp; + } + public HttpServletRequest getRequest() { + return req; + } + public HttpServletResponse getResponse() { + return resp; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestHolder.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestHolder.java new file mode 100644 index 0000000..28241b9 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/RequestHolder.java @@ -0,0 +1,45 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @author Jacky.gao + * @since 2016年9月1日 + */ +public class RequestHolder { + private static ThreadLocal request=new ThreadLocal(); + private static ThreadLocal response=new ThreadLocal(); + public static void set(HttpServletRequest request,HttpServletResponse response) { + RequestHolder.request.set(request); + RequestHolder.response.set(response); + } + public static RequestContext newRequestContext(){ + return new RequestContext(request.get(),response.get()); + } + public static void reset(){ + request.remove(); + response.remove(); + } + public static HttpServletRequest getRequest() { + return request.get(); + } + public static HttpServletResponse getResponse() { + return response.get(); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ResourceLoaderServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ResourceLoaderServletHandler.java new file mode 100644 index 0000000..f40c76a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ResourceLoaderServletHandler.java @@ -0,0 +1,79 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.IOUtils; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +/** + * @author Jacky.gao + * @since 2016年6月6日 + */ +public class ResourceLoaderServletHandler implements ServletHandler,ApplicationContextAware{ + public static final String URL="/res"; + private ApplicationContext applicationContext; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String path=req.getContextPath()+URuleServlet.URL+URL; + String uri=req.getRequestURI(); + String resPath=uri.substring(path.length()+1); + String p="classpath:"+resPath; + if(p.endsWith(".js")){ + resp.setContentType("text/javascript"); + }else if(p.endsWith(".css")){ + resp.setContentType("text/css"); + }else if(p.endsWith(".png")){ + resp.setContentType("image/png"); + }else if(p.endsWith(".jpg")){ + resp.setContentType("image/jpeg"); + }else{ + resp.setContentType("application/octet-stream"); + } + InputStream input=applicationContext.getResource(p).getInputStream(); + OutputStream output=resp.getOutputStream(); + try{ + IOUtils.copy(input, output); + }finally{ + if(input!=null){ + input.close(); + } + if(output!=null){ + output.flush(); + output.close(); + } + } + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + this.applicationContext=applicationContext; + } + + @Override + public String url() { + return URL; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ServletHandler.java new file mode 100644 index 0000000..e701dc8 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ServletHandler.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import java.io.IOException; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +/** + * @author Jacky.gao + * @since 2016年5月23日 + */ +public interface ServletHandler { + void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException; + String url(); +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/URuleServlet.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/URuleServlet.java new file mode 100644 index 0000000..3a5dd2d --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/URuleServlet.java @@ -0,0 +1,129 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.Collection; +import java.util.HashMap; +import java.util.Map; + +import javax.servlet.ServletConfig; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.springframework.web.context.WebApplicationContext; +import org.springframework.web.context.support.WebApplicationContextUtils; + +import com.itheima.sfbx.rule.console.exception.NoPermissionException; +import com.itheima.sfbx.rule.console.repository.NodeLockException; + +/** + * @author Jacky.gao + * @since 2016年5月23日 + */ +public class URuleServlet extends HttpServlet{ + private static final long serialVersionUID = -5067484267904906233L; + private Map handlerMap=new HashMap(); + public static final String URL="/urule"; + + @Override + public void init(ServletConfig config) throws ServletException { + super.init(config); + WebApplicationContext applicationContext=getWebApplicationContext(config); + Collection handlers=applicationContext.getBeansOfType(ServletHandler.class).values(); + for(ServletHandler handler:handlers){ + String url=handler.url(); + if(handlerMap.containsKey(url)){ + throw new RuntimeException("Handler ["+url+"] already exist."); + } + handlerMap.put(url, handler); + } + } + + protected WebApplicationContext getWebApplicationContext(ServletConfig config){ + return WebApplicationContextUtils.getWebApplicationContext(config.getServletContext()); + } + + @Override + protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + RequestHolder.set(req, resp); + try{ + String path=req.getContextPath()+URL; + String uri=req.getRequestURI(); + String targetUrl=uri.substring(path.length()); + if(targetUrl.length()<1){ + resp.sendRedirect(req.getContextPath()+"/urule/frame"); + return; + } + int slashPos=targetUrl.indexOf("/",1); + if(slashPos>-1){ + targetUrl=targetUrl.substring(0,slashPos); + } + ServletHandler targetHandler=handlerMap.get(targetUrl); + if(targetHandler==null){ + outContent(resp,"Handler ["+targetUrl+"] not exist."); + return; + } + targetHandler.execute(req, resp); + }catch(Exception ex){ + Throwable e=getCause(ex); + resp.setCharacterEncoding("UTF-8"); + PrintWriter pw=resp.getWriter(); + if(e instanceof NoPermissionException){ + resp.setStatus(HttpServletResponse.SC_UNAUTHORIZED); + pw.write("

Permission denied!

"); + pw.close(); + }else{ + resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); + String errorMsg = e.getMessage(); + if(StringUtils.isBlank(errorMsg)){ + errorMsg=e.getClass().getName(); + } + pw.write(errorMsg); + pw.close(); + if(!(e instanceof NodeLockException)){ + throw new ServletException(ex); + } + } + }finally{ + RequestHolder.reset(); + } + } + + private void outContent(HttpServletResponse resp,String msg) throws IOException { + resp.setContentType("text/html"); + PrintWriter pw=resp.getWriter(); + pw.write(""); + pw.write("
URule Console
"); + pw.write(""); + pw.write(msg); + pw.write(""); + pw.write(""); + pw.flush(); + pw.close(); + } + + private Throwable getCause(Throwable e){ + if(e.getCause()!=null){ + return getCause(e.getCause()); + } + return e; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/WriteJsonServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/WriteJsonServletHandler.java new file mode 100644 index 0000000..461dcc3 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/WriteJsonServletHandler.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet; + +import java.io.IOException; +import java.io.OutputStream; +import java.text.SimpleDateFormat; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletResponse; + +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.SerializationConfig; +import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + +import com.itheima.sfbx.framework.rule.Configure; + +/** + * @author Jacky.gao + * @since 2016年5月23日 + */ +public abstract class WriteJsonServletHandler extends BaseServletHandler{ + protected void writeObjectToJson(HttpServletResponse resp,Object obj) throws ServletException, IOException{ + resp.setHeader("Access-Control-Allow-Origin", "*"); + resp.setContentType("text/json"); + resp.setCharacterEncoding("UTF-8"); + ObjectMapper mapper=new ObjectMapper(); + mapper.setSerializationInclusion(Inclusion.NON_NULL); + mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS,false); + mapper.setDateFormat(new SimpleDateFormat(Configure.getDateFormat())); + OutputStream out = resp.getOutputStream(); + try { + mapper.writeValue(out, obj); + } finally { + out.flush(); + out.close(); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/action/ActionServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/action/ActionServletHandler.java new file mode 100644 index 0000000..81f41e5 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/action/ActionServletHandler.java @@ -0,0 +1,185 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.action; + +import java.io.IOException; +import java.io.PrintWriter; +import java.lang.reflect.Field; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.springframework.aop.framework.AdvisedSupport; +import org.springframework.aop.framework.AopProxy; +import org.springframework.aop.support.AopUtils; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.framework.rule.model.ExposeAction; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.action.Method; +import com.itheima.sfbx.framework.rule.model.library.action.Parameter; + +public class ActionServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/action-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + public void loadMethods(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String beanId=req.getParameter("beanId"); + Object o=applicationContext.getBean(beanId); + Object bean=getTarget(o); + List list=new ArrayList(); + java.lang.reflect.Method[] methods=bean.getClass().getMethods(); + for(java.lang.reflect.Method m:methods){ + ExposeAction action=m.getAnnotation(ExposeAction.class); + if(action==null){ + continue; + } + String name=m.getName(); + Method method=new Method(); + method.setMethodName(name); + method.setName(action.value()); + method.setParameters(buildParameters(m)); + list.add(method); + } + writeObjectToJson(resp, list); + } + + private Object getTarget(Object proxy){ + if(!AopUtils.isAopProxy(proxy)) { + return proxy;//不是代理对象 + } + try { + if(AopUtils.isJdkDynamicProxy(proxy)) { + return getJdkDynamicProxyTargetObject(proxy); + } else { //cglib + return getCglibProxyTargetObject(proxy); + } + } catch (Exception e) { + throw new RuntimeException(e); + } + } + + private Object getCglibProxyTargetObject(Object proxy) throws Exception { + Field h = proxy.getClass().getDeclaredField("CGLIB$CALLBACK_0"); + h.setAccessible(true); + Object dynamicAdvisedInterceptor = h.get(proxy); + Field advised = dynamicAdvisedInterceptor.getClass().getDeclaredField("advised"); + advised.setAccessible(true); + + Object target = ((AdvisedSupport)advised.get(dynamicAdvisedInterceptor)).getTargetSource().getTarget(); + + return target; + } + + + private Object getJdkDynamicProxyTargetObject(Object proxy) throws Exception { + Field h = proxy.getClass().getSuperclass().getDeclaredField("h"); + h.setAccessible(true); + AopProxy aopProxy = (AopProxy) h.get(proxy); + Field advised = aopProxy.getClass().getDeclaredField("advised"); + advised.setAccessible(true); + Object target = ((AdvisedSupport)advised.get(aopProxy)).getTargetSource().getTarget(); + return target; + } + + private List buildParameters(java.lang.reflect.Method m){ + List parameters=new ArrayList(); + Class[] classes=m.getParameterTypes(); + for(int i=0;i c=classes[i]; + Parameter p=new Parameter(); + p.setName("参数"+i); + p.setType(buildDatatype(c)); + parameters.add(p); + } + return parameters; + } + + private Datatype buildDatatype(Class clazz) { + if(clazz.equals(String.class)){ + return Datatype.String; + }else if(clazz.equals(BigDecimal.class)){ + return Datatype.BigDecimal; + }else if(clazz.equals(Boolean.class)){ + return Datatype.Boolean; + }else if(clazz.equals(Boolean.class)){ + return Datatype.Boolean; + }else if(clazz.equals(boolean.class)){ + return Datatype.Boolean; + }else if(clazz.equals(Date.class)){ + return Datatype.Date; + }else if(clazz.equals(Double.class)){ + return Datatype.Double; + }else if(clazz.equals(double.class)){ + return Datatype.Double; + }else if(Enum.class.isAssignableFrom(clazz)){ + return Datatype.Enum; + }else if(clazz.equals(Float.class)){ + return Datatype.Float; + }else if(clazz.equals(float.class)){ + return Datatype.Float; + }else if(clazz.equals(Integer.class)){ + return Datatype.Integer; + }else if(clazz.equals(int.class)){ + return Datatype.Integer; + }else if(clazz.equals(Character.class)){ + return Datatype.Char; + }else if(clazz.equals(char.class)){ + return Datatype.Char; + }else if(List.class.isAssignableFrom(clazz)){ + return Datatype.List; + }else if(clazz.equals(long.class)){ + return Datatype.Long; + }else if(clazz.equals(Long.class)){ + return Datatype.Long; + }else if(Map.class.isAssignableFrom(clazz)){ + return Datatype.Map; + }else if(Set.class.isAssignableFrom(clazz)){ + return Datatype.Set; + }else{ + return Datatype.Object; + } + } + + + @Override + public String url() { + return "/actioneditor"; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/client/ClientConfigServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/client/ClientConfigServletHandler.java new file mode 100644 index 0000000..a04b850 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/client/ClientConfigServletHandler.java @@ -0,0 +1,85 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.client; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.RepositoryServiceImpl; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.RequestContext; + +/** + * @author Jacky.gao + * @since 2016年8月11日 + */ +public class ClientConfigServletHandler extends RenderPageServletHandler{ + private RepositoryService repositoryService; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/client-config-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + public void loadData(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + writeObjectToJson(resp, repositoryService.loadClientConfigs(project)); + } + public void save(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + String file=project+"/"+RepositoryServiceImpl.CLIENT_CONFIG_FILE; + String content=req.getParameter("content"); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + try{ + repositoryService.saveFile(file, content, false,null,user); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + @Override + public String url() { + return "/clientconfig"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/CommonServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/CommonServletHandler.java new file mode 100644 index 0000000..b24ba3c --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/CommonServletHandler.java @@ -0,0 +1,384 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.common; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.antlr.v4.runtime.ANTLRInputStream; +import org.antlr.v4.runtime.CommonTokenStream; +import org.apache.commons.lang.StringUtils; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.Repository; +import com.itheima.sfbx.rule.console.repository.RepositoryResourceProvider; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.RequestContext; +import com.itheima.sfbx.framework.rule.dsl.RuleParserLexer; +import com.itheima.sfbx.framework.rule.dsl.RuleParserParser; +import com.itheima.sfbx.framework.rule.model.function.FunctionDescriptor; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import com.itheima.sfbx.framework.rule.parse.deserializer.ActionLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ConstantLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTableDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTreeDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.Deserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ParameterLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.RuleSetDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ScorecardDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ScriptDecisionTableDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.VariableLibraryDeserializer; +import com.itheima.sfbx.framework.rule.runtime.BuiltInActionLibraryBuilder; + +/** + * @author Jacky.gao + * @since 2016年7月25日 + */ +public class CommonServletHandler extends RenderPageServletHandler{ + private RepositoryService repositoryService; + private BuiltInActionLibraryBuilder builtInActionLibraryBuilder; + private List> deserializers=new ArrayList>(); + private List functionDescriptors=new ArrayList(); + + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + throw new ServletException("Unsupport this operation."); + } + } + public void saveFile(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String file=req.getParameter("file"); + String content = Utils.decodeURL(req.getParameter("content")); + String versionComment=req.getParameter("versionComment"); + Boolean newVersion = Boolean.valueOf(req.getParameter("newVersion")); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + try{ + repositoryService.saveFile(file,content,newVersion,versionComment,user); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public void loadReferenceFiles(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + String searchText=buildSearchText(path,req,false); + try{ + List files=repositoryService.getReferenceFiles(path,searchText); + searchText=buildSearchText(path,req,true); + List scriptFiles=repositoryService.getReferenceFiles(path,searchText); + if(scriptFiles.size()>0){ + files.addAll(scriptFiles); + } + List refFiles=new ArrayList(); + for(String file:files){ + RefFile ref=new RefFile(); + refFiles.add(ref); + ref.setPath(file); + if(file.endsWith(FileType.Ruleset.toString())){ + ref.setEditor("/ruleseteditor"); + ref.setType("决策集"); + }else if(file.endsWith(FileType.UL.toString())){ + ref.setEditor("/uleditor"); + ref.setType("脚本决策集"); + }else if(file.endsWith(FileType.DecisionTable.toString())){ + ref.setEditor("/decisiontableeditor"); + ref.setType("决策表"); + }else if(file.endsWith(FileType.ScriptDecisionTable.toString())){ + ref.setEditor("/scriptdecisiontableeditor"); + ref.setType("脚本决策表"); + }else if(file.endsWith(FileType.DecisionTree.toString())){ + ref.setEditor("/decisiontreeeditor"); + ref.setType("决策树"); + }else if(file.endsWith(FileType.RuleFlow.toString())){ + ref.setEditor("/ruleflowdesigner"); + ref.setType("决策流"); + } + int pos=file.lastIndexOf("/"); + String name=file; + if(pos>-1){ + name=file.substring(pos+1,file.length()); + } + ref.setName(name); + } + writeObjectToJson(resp, refFiles); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + private String buildSearchText(String path,HttpServletRequest req,boolean isScript){ + StringBuilder sb=new StringBuilder(); + if(path.endsWith(FileType.ActionLibrary.toString())){ + if(isScript){ + sb.append(req.getParameter("beanLabel")); + sb.append("."); + sb.append(req.getParameter("methodLabel")); + }else{ + sb.append("bean=\""+req.getParameter("beanName")+"\""); + sb.append(" bean-label=\""+req.getParameter("beanLabel")+"\""); + sb.append(" method-label=\""+req.getParameter("methodLabel")+"\""); + sb.append(" method-name=\""+req.getParameter("methodName")+"\""); + } + return sb.toString(); + }else if(path.endsWith(FileType.ConstantLibrary.toString())){ + if(isScript){ + sb.append(req.getParameter("constCategoryLabel")); + sb.append("."); + sb.append(req.getParameter("constLabel")); + }else{ + sb.append("const-category=\""+req.getParameter("constCategoryLabel")+"\""); + sb.append(" const=\""+req.getParameter("constName")+"\""); + } + return sb.toString(); + }else if(path.endsWith(FileType.ParameterLibrary.toString())){ + if(isScript){ + sb.append("参数."); + sb.append(req.getParameter("varLabel")); + }else{ + sb.append("var-category=\"参数\""); + sb.append(" var=\""+req.getParameter("varName")+"\""); + } + return sb.toString(); + }else if(path.endsWith(FileType.VariableLibrary.toString())){ + if(isScript){ + sb.append(req.getParameter("varCategory")); + sb.append("."); + sb.append(req.getParameter("varLabel")); + }else{ + sb.append("var-category=\""+req.getParameter("varCategory")+"\""); + sb.append(" var=\""+req.getParameter("varName")+"\""); + } + return sb.toString(); + + }else{ + throw new RuleException("Unknow file : "+ path); + } + } + + public void loadResourceTreeData(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + String forLib=req.getParameter("forLib"); + String fileType=req.getParameter("fileType"); + String searchFileName=req.getParameter("searchFileName"); + + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + FileType[] types=null; + if(StringUtils.isNotBlank(forLib) && forLib.equals("true")){ + types=new FileType[]{FileType.ActionLibrary,FileType.ConstantLibrary,FileType.VariableLibrary,FileType.ParameterLibrary}; + }else if(StringUtils.isNotBlank(fileType)){ + String[] fileTypes=fileType.split(","); + types=new FileType[fileTypes.length]; + for(int i=0;i infos=errorListener.getInfos(); + writeObjectToJson(resp, infos); + } + } + + + public void loadXml(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + List result=new ArrayList(); + String files=req.getParameter("files"); + files=Utils.decodeURL(files); + boolean isaction=false; + if(files!=null){ + if(files.startsWith("builtinactions")){ + isaction=true; + }else{ + String[] paths=files.split(";"); + for(String path:paths){ + if(path.startsWith(RepositoryResourceProvider.JCR)){ + path=path.substring(4,path.length()); + } + String[] subpaths=path.split(","); + path=subpaths[0]; + String version=null; + if(subpaths.length==2){ + version=subpaths[1]; + } + try{ + InputStream inputStream=null; + if(StringUtils.isEmpty(version)){ + inputStream=repositoryService.readFile(path,null); + }else{ + inputStream=repositoryService.readFile(path,version); + } +// System.out.println(getStringByInputStream_1(inputStream)); + Element element=parseXml(inputStream); + for(Deserializer des:deserializers){ + if(des.support(element)){ + result.add(des.deserialize(element)); + if(des instanceof ActionLibraryDeserializer){ + isaction=true; + } + break; + } + } + inputStream.close(); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + } + } + if(isaction){ + List beans=builtInActionLibraryBuilder.getBuiltInActions(); + if(beans.size()>0){ + ActionLibrary al=new ActionLibrary(); + al.setSpringBeans(beans); + result.add(al); + } + } + writeObjectToJson(resp, result); + } + + protected Element parseXml(InputStream stream){ + SAXReader reader=new SAXReader(); + Document document; + try { + document = reader.read(stream); + Element root=document.getRootElement(); + return root; + } catch (DocumentException e) { + throw new RuleException(e); + } + } + + public void setBuiltInActionLibraryBuilder(BuiltInActionLibraryBuilder builtInActionLibraryBuilder) { + this.builtInActionLibraryBuilder = builtInActionLibraryBuilder; + } + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + @Override + public String url() { + return "/common"; + } + + @Override + public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { + super.setApplicationContext(applicationContext); + ActionLibraryDeserializer actionLibraryDeserializer=(ActionLibraryDeserializer)applicationContext.getBean(ActionLibraryDeserializer.BEAN_ID); + VariableLibraryDeserializer variableLibraryDeserializer=(VariableLibraryDeserializer)applicationContext.getBean(VariableLibraryDeserializer.BEAN_ID); + ConstantLibraryDeserializer constantLibraryDeserializer=(ConstantLibraryDeserializer)applicationContext.getBean(ConstantLibraryDeserializer.BEAN_ID); + RuleSetDeserializer ruleSetDeserializer=(RuleSetDeserializer)applicationContext.getBean(RuleSetDeserializer.BEAN_ID); + DecisionTableDeserializer decisionTableDeserializer=(DecisionTableDeserializer)applicationContext.getBean(DecisionTableDeserializer.BEAN_ID); + ScriptDecisionTableDeserializer scriptDecisionTableDeserializer=(ScriptDecisionTableDeserializer)applicationContext.getBean(ScriptDecisionTableDeserializer.BEAN_ID); + DecisionTreeDeserializer decisionTreeDeserializer=(DecisionTreeDeserializer)applicationContext.getBean(DecisionTreeDeserializer.BEAN_ID); + ScorecardDeserializer scorecardDeserializer=(ScorecardDeserializer)applicationContext.getBean(ScorecardDeserializer.BEAN_ID); + + ParameterLibraryDeserializer parameterLibraryDeserializer=(ParameterLibraryDeserializer)applicationContext.getBean(ParameterLibraryDeserializer.BEAN_ID); + deserializers.add(actionLibraryDeserializer); + deserializers.add(variableLibraryDeserializer); + deserializers.add(constantLibraryDeserializer); + deserializers.add(ruleSetDeserializer); + deserializers.add(decisionTableDeserializer); + deserializers.add(scriptDecisionTableDeserializer); + deserializers.add(decisionTreeDeserializer); + deserializers.add(parameterLibraryDeserializer); + deserializers.add(scorecardDeserializer); + + Collection coll=applicationContext.getBeansOfType(FunctionDescriptor.class).values(); + for(FunctionDescriptor fun:coll){ + if(fun.isDisabled()){ + continue; + } + functionDescriptors.add(fun); + } + } + + + public static String getStringByInputStream_1(InputStream inputStream) { + ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); + try { + byte[] b = new byte[10240]; + int n; + while ((n = inputStream.read(b)) != -1) { + outputStream.write(b, 0, n); + } + } catch (Exception e) { + try { + inputStream.close(); + outputStream.close(); + } catch (Exception e1) { + } + } + return outputStream.toString(); + } + } diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ErrorInfo.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ErrorInfo.java new file mode 100644 index 0000000..a1c60fc --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ErrorInfo.java @@ -0,0 +1,49 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.common; +/** + * @author Jacky.gao + * @since 2016年7月26日 + */ +public class ErrorInfo { + private int line; + private int charPositionInLine; + private String message; + + public ErrorInfo(int line,int charPositionInLine,String message) { + this.line = line; + this.charPositionInLine=charPositionInLine; + this.message = message; + } + public int getLine() { + return line; + } + public void setLine(int line) { + this.line = line; + } + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + public int getCharPositionInLine() { + return charPositionInLine; + } + public void setCharPositionInLine(int charPositionInLine) { + this.charPositionInLine = charPositionInLine; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/RefFile.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/RefFile.java new file mode 100644 index 0000000..d352f5f --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/RefFile.java @@ -0,0 +1,51 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.common; +/** + * @author Jacky.gao + * @since 2016年8月9日 + */ +public class RefFile { + private String name; + private String path; + private String editor; + private String type; + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + public String getPath() { + return path; + } + public void setPath(String path) { + this.path = path; + } + public String getEditor() { + return editor; + } + public void setEditor(String editor) { + this.editor = editor; + } + public String getType() { + return type; + } + public void setType(String type) { + this.type = type; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptErrorListener.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptErrorListener.java new file mode 100644 index 0000000..857a7e1 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptErrorListener.java @@ -0,0 +1,38 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.common; + +import java.util.ArrayList; +import java.util.List; + +import org.antlr.v4.runtime.BaseErrorListener; +import org.antlr.v4.runtime.RecognitionException; +import org.antlr.v4.runtime.Recognizer; + +/** + * @author Jacky.gao + * @since 2016年7月26日 + */ +public class ScriptErrorListener extends BaseErrorListener { + private List infos=new ArrayList(); + @Override + public void syntaxError(Recognizer recognizer,Object offendingSymbol, int line, int charPositionInLine,String msg, RecognitionException e) { + infos.add(new ErrorInfo(line,charPositionInLine,msg)); + } + public List getInfos() { + return infos; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptType.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptType.java new file mode 100644 index 0000000..3eda150 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/common/ScriptType.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.common; +/** + * @author Jacky.gao + * @since 2016年7月26日 + */ +public enum ScriptType { + DecisionNode,ScriptNode,Script; +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleDebugWriter.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleDebugWriter.java new file mode 100644 index 0000000..da63a45 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleDebugWriter.java @@ -0,0 +1,43 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.console; + +import java.io.IOException; +import java.util.List; + +import com.itheima.sfbx.framework.rule.debug.DebugWriter; +import com.itheima.sfbx.framework.rule.debug.MessageItem; + +/** + * @author Jacky.gao + * @since 2017年11月28日 + */ +public class ConsoleDebugWriter implements DebugWriter { + private DebugMessageHolder debugMessageHolder; + @Override + public void write(List items) throws IOException { + StringBuilder sb=new StringBuilder(); + for(MessageItem item:items){ + sb.append(item.toHtml()); + } + String key=debugMessageHolder.generateKey(); + System.out.println("Console key : "+key); + debugMessageHolder.putDebugMessage(key, sb.toString()); + } + public void setDebugMessageHolder(DebugMessageHolder debugMessageHolder) { + this.debugMessageHolder = debugMessageHolder; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleServletHandler.java new file mode 100644 index 0000000..2124ea8 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/ConsoleServletHandler.java @@ -0,0 +1,65 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.console; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2017年11月28日 + */ +public class ConsoleServletHandler extends RenderPageServletHandler { + private DebugMessageHolder debugMessageHolder; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String key=req.getParameter("key"); + String msg=null; + if(StringUtils.isBlank(key)){ + msg="

请指定要查看的调试消息的key值

"; + }else{ + msg=debugMessageHolder.getDebugMessage(key); + } + VelocityContext context = new VelocityContext(); + context.put("title", "URule Console"); + context.put("msg", msg); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/console.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + + public void setDebugMessageHolder(DebugMessageHolder debugMessageHolder) { + this.debugMessageHolder = debugMessageHolder; + } + + @Override + public String url() { + return "/console"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessage.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessage.java new file mode 100644 index 0000000..63463fe --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessage.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.console; + +/** + * @author Jacky.gao + * @since 2017年11月28日 + */ +public class DebugMessage { + private String message; + private long timestamp; + public DebugMessage(String message) { + this.message=message; + this.timestamp=System.currentTimeMillis(); + } + public String getMessage() { + return message; + } + public long getTimestamp() { + return timestamp; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessageHolder.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessageHolder.java new file mode 100644 index 0000000..1a729fe --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/console/DebugMessageHolder.java @@ -0,0 +1,64 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.console; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2017年11月28日 + */ +public class DebugMessageHolder { + private int num=0; + private Map messageMap=new HashMap(); + public String getDebugMessage(String key){ + DebugMessage msg=messageMap.get(key); + String info=null; + if(msg==null){ + info="

Key为["+key+"]的调试信息已失效,不能查看,当前key值为:"+this.num+"。
调试消息有效期为3分钟,请在有效期内查看!

"; + }else{ + info=msg.getMessage(); + } + clean(); + return info; + } + public void putDebugMessage(String key,String msg){ + clean(); + DebugMessage m=new DebugMessage(msg); + messageMap.put(key, m); + } + private void clean(){ + long current=System.currentTimeMillis(); + List list=new ArrayList(); + for(String key:messageMap.keySet()){ + DebugMessage msg=messageMap.get(key); + long dif=current-msg.getTimestamp(); + if(dif>180000){ + list.add(key); + } + } + for(String key:list){ + messageMap.remove(key); + } + } + public synchronized String generateKey(){ + num++; + return String.valueOf(num); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/constant/ConstantServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/constant/ConstantServletHandler.java new file mode 100644 index 0000000..3b3bb11 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/constant/ConstantServletHandler.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.constant; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +public class ConstantServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/constant-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/constanteditor"; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontable/DecisiontableEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontable/DecisiontableEditorServletHandler.java new file mode 100644 index 0000000..1002899 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontable/DecisiontableEditorServletHandler.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.decisiontable; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class DecisiontableEditorServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/decisiontable-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/decisiontableeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontree/DecisionTreeEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontree/DecisionTreeEditorServletHandler.java new file mode 100644 index 0000000..b094b82 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/decisiontree/DecisionTreeEditorServletHandler.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.decisiontree; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class DecisionTreeEditorServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/decisiontree-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/decisiontreeeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Box.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Box.java new file mode 100644 index 0000000..ccad659 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Box.java @@ -0,0 +1,36 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; +/** + * @author Jacky.gao + * @since 2015年3月2日 + */ +public class Box { + private int width; + private int height; + public int getWidth() { + return width; + } + public void setWidth(int width) { + this.width = width; + } + public int getHeight() { + return height; + } + public void setHeight(int height) { + this.height = height; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Diagram.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Diagram.java new file mode 100644 index 0000000..46ff4f9 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Diagram.java @@ -0,0 +1,57 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class Diagram { + private List edges; + private NodeInfo rootNode; + private int width; + private int height; + public Diagram(List edges, NodeInfo rootNode) { + this.edges = edges; + this.rootNode = rootNode; + } + public List getEdges() { + return edges; + } + public void setEdges(List edges) { + this.edges = edges; + } + public NodeInfo getRootNode() { + return rootNode; + } + public void setRootNode(NodeInfo rootNode) { + this.rootNode = rootNode; + } + public int getWidth() { + return width; + } + public void setWidth(int width) { + this.width = width; + } + public int getHeight() { + return height; + } + public void setHeight(int height) { + this.height = height; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/DiagramContext.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/DiagramContext.java new file mode 100644 index 0000000..db807c0 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/DiagramContext.java @@ -0,0 +1,52 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; + +import java.util.List; +import java.util.Map; + +import com.itheima.sfbx.framework.rule.model.Node; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class DiagramContext { + private int id; + private List edges; + private Map nodeMap; + public DiagramContext(List edges,Map nodeMap) { + this.edges = edges; + this.nodeMap = nodeMap; + } + + public List getEdges() { + return edges; + } + public void addEdge(Edge edge) { + edges.add(edge); + } + public Map getNodeMap() { + return nodeMap; + } + public void setNodeMap(Map nodeMap) { + this.nodeMap = nodeMap; + } + public int nextId(){ + id++; + return id; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Edge.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Edge.java new file mode 100644 index 0000000..00d83cc --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/Edge.java @@ -0,0 +1,40 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class Edge { + private int from; + private int to; + public Edge(int from, int to) { + this.from = from; + this.to = to; + } + public int getFrom() { + return from; + } + public void setFrom(int from) { + this.from = from; + } + public int getTo() { + return to; + } + public void setTo(int to) { + this.to = to; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/NodeInfo.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/NodeInfo.java new file mode 100644 index 0000000..64d593d --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/NodeInfo.java @@ -0,0 +1,109 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; + +import java.util.ArrayList; +import java.util.List; + +import org.codehaus.jackson.annotate.JsonIgnore; + +/** + * @author Jacky.gao + * @since 2015年1月6日 + */ +public class NodeInfo { + private int id; + @JsonIgnore + private int level; + private String label; + private String title; + private String color; + private int x; + private int y; + private int width; + private int height; + private int roundCorner; + private List children; + public int getId() { + return id; + } + public void setId(int id) { + this.id = id; + } + public int getLevel() { + return level; + } + public void setLevel(int level) { + this.level = level; + } + public String getLabel() { + return label; + } + public void setLabel(String label) { + this.label = label; + } + public String getColor() { + return color; + } + public void setColor(String color) { + this.color = color; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public int getX() { + return x; + } + public void setX(int x) { + this.x = x; + } + public int getY() { + return y; + } + public void setY(int y) { + this.y = y; + } + public int getWidth() { + return width; + } + public void setWidth(int width) { + this.width = width; + } + public int getHeight() { + return height; + } + public void setHeight(int height) { + this.height = height; + } + public int getRoundCorner() { + return roundCorner; + } + public void setRoundCorner(int roundCorner) { + this.roundCorner = roundCorner; + } + public List getChildren() { + return children; + } + public void addChild(NodeInfo nodeInfo){ + if(children==null){ + children=new ArrayList(); + } + children.add(nodeInfo); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteDiagramServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteDiagramServletHandler.java new file mode 100644 index 0000000..5cc6756 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteDiagramServletHandler.java @@ -0,0 +1,219 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBase; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBuilder; +import com.itheima.sfbx.framework.rule.builder.ResourceBase; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.respackage.HttpSessionKnowledgeCache; +import com.itheima.sfbx.rule.console.servlet.respackage.PackageServletHandler; +import com.itheima.sfbx.framework.rule.model.Node; +import com.itheima.sfbx.framework.rule.model.rete.AndNode; +import com.itheima.sfbx.framework.rule.model.rete.CriteriaNode; +import com.itheima.sfbx.framework.rule.model.rete.Line; +import com.itheima.sfbx.framework.rule.model.rete.NamedCriteriaNode; +import com.itheima.sfbx.framework.rule.model.rete.ObjectTypeNode; +import com.itheima.sfbx.framework.rule.model.rete.OrNode; +import com.itheima.sfbx.framework.rule.model.rete.Rete; +import com.itheima.sfbx.framework.rule.model.rete.TerminalNode; + +/** + * @author Jacky.gao + * @since 2016年6月23日 + */ +public class ReteDiagramServletHandler extends RenderPageServletHandler { + private KnowledgeBuilder knowledgeBuilder; + private ReteNodeLayout nodeLayout; + private final int nodeWidth=30; + private final int nodeHeight=30; + private HttpSessionKnowledgeCache httpSessionKnowledgeCache; + public ReteDiagramServletHandler() { + nodeLayout=new ReteNodeLayout(); + } + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + context.put("files", req.getParameter("files")); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/rete-diagram.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + public void loadReteDiagramData(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String files=req.getParameter("files"); + files=Utils.decodeURL(files); + KnowledgeBase knowledgeBase=(KnowledgeBase)httpSessionKnowledgeCache.get(req,PackageServletHandler.KB_KEY); + if(knowledgeBase==null){ + ResourceBase resourceBase=knowledgeBuilder.newResourceBase(); + String[] paths=files.split(";"); + for(String path:paths){ + String[] subpaths=path.split(","); + path=subpaths[0]; + String version=subpaths[1]; + path=Utils.toUTF8(path); + resourceBase.addResource(path,version); + } + knowledgeBase=knowledgeBuilder.buildKnowledgeBase(resourceBase); + httpSessionKnowledgeCache.put(req,PackageServletHandler.KB_KEY, knowledgeBase); + } + Rete rete=knowledgeBase.getRete(); + Diagram diagram=buildReteDiagram(rete); + writeObjectToJson(resp,diagram); + } + + private Diagram buildReteDiagram(Rete rete){ + Map nodeMap=new HashMap(); + List edges=new ArrayList(); + NodeInfo root=new NodeInfo(); + DiagramContext context=new DiagramContext(edges,nodeMap); + root.setId(context.nextId()); + root.setLabel("Enter"); + root.setColor("#98AFC7"); + root.setWidth(nodeWidth); + root.setHeight(nodeHeight); + root.setRoundCorner(10); + List typeNodes=rete.getObjectTypeNodes(); + int level=1; + for(ObjectTypeNode typeNode:typeNodes){ + NodeInfo node=new NodeInfo(); + node.setId(context.nextId()); + node.setLabel("T"); + node.setTitle(typeNode.getObjectTypeClass()); + node.setColor("#97CBFF"); + node.setLevel(level); + node.setWidth(nodeWidth); + node.setHeight(nodeHeight); + node.setRoundCorner(5); + root.addChild(node); + List lines=typeNode.getLines(); + if(lines==null){ + continue; + } + int nextLevel=level+1; + for(Line line:lines){ + Edge edge=new Edge(root.getId(),node.getId()); + edges.add(edge); + buildLine(line,context,node,nextLevel); + } + } + Box box=nodeLayout.layout(root); + Diagram diagram = new Diagram(edges,root); + if(box!=null){ + diagram.setWidth(box.getWidth()+500); + diagram.setHeight(box.getHeight()+300); + } + return diagram; + } + + private void buildLine(Line line,DiagramContext context,NodeInfo parentNode,int level){ + Node toNode=line.getTo(); + if(toNode==null){ + return; + } + Map nodeMap=context.getNodeMap(); + NodeInfo newNodeInfo=null; + if(nodeMap.containsKey(toNode)){ + newNodeInfo=nodeMap.get(toNode); + context.addEdge(new Edge(parentNode.getId(),newNodeInfo.getId())); + return; + } + List lines=null; + newNodeInfo=new NodeInfo(); + newNodeInfo.setLevel(level); + newNodeInfo.setId(context.nextId()); + newNodeInfo.setWidth(nodeWidth); + newNodeInfo.setHeight(nodeHeight); + if(toNode instanceof CriteriaNode){ + CriteriaNode cnode=(CriteriaNode)toNode; + newNodeInfo.setColor("#B3D9D9"); + newNodeInfo.setLabel("C"); + newNodeInfo.setTitle(cnode.getCriteriaInfo()); + newNodeInfo.setRoundCorner(nodeHeight); + lines=cnode.getLines(); + }else if(toNode instanceof NamedCriteriaNode){ + NamedCriteriaNode node=(NamedCriteriaNode)toNode; + newNodeInfo.setColor("#B3E9D9"); + newNodeInfo.setLabel("C"); + newNodeInfo.setTitle(node.getCriteriaInfo()); + newNodeInfo.setRoundCorner(nodeHeight); + lines=node.getLines(); + }else if(toNode instanceof AndNode){ + AndNode andNode=(AndNode)toNode; + lines=andNode.getLines(); + newNodeInfo.setColor("#DAB1D5"); + newNodeInfo.setLabel("AND"); + newNodeInfo.setRoundCorner(nodeHeight/2); + }else if(toNode instanceof OrNode){ + OrNode orNode=(OrNode)toNode; + lines=orNode.getLines(); + newNodeInfo.setColor("#82D900"); + newNodeInfo.setLabel("OR"); + newNodeInfo.setRoundCorner(nodeHeight/2); + }else if(toNode instanceof TerminalNode){ + TerminalNode terminalNode=(TerminalNode)toNode; + newNodeInfo.setColor("orange"); + newNodeInfo.setLabel(terminalNode.getRule().getName()); + newNodeInfo.setTitle(terminalNode.getRule().getName()); + newNodeInfo.setRoundCorner(0); + } + nodeMap.put(toNode, newNodeInfo); + parentNode.addChild(newNodeInfo); + context.addEdge(new Edge(parentNode.getId(),newNodeInfo.getId())); + if(lines==null){ + return; + } + int nextLevel=level+1; + for(Line nextLine:lines){ + buildLine(nextLine, context, newNodeInfo,nextLevel); + } + } + public void setKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) { + this.knowledgeBuilder = knowledgeBuilder; + } + + public void setHttpSessionKnowledgeCache( + HttpSessionKnowledgeCache httpSessionKnowledgeCache) { + this.httpSessionKnowledgeCache = httpSessionKnowledgeCache; + } + + @Override + public String url() { + return "/retediagram"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteNodeLayout.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteNodeLayout.java new file mode 100644 index 0000000..2162333 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/diagram/ReteNodeLayout.java @@ -0,0 +1,110 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.diagram; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2015年1月29日 + */ +public class ReteNodeLayout { + private final int leftMargin=50; + private final int topMargin=50; + private final int nodeWidth=30; + private final int nodeHeight=30; + public Box layout(NodeInfo rootNode){ + List children=rootNode.getChildren(); + if(children==null){ + return null; + } + Map levelXPositionMap=new HashMap(); + Map> nodeLevelMap=new HashMap>(); + buildNodesLevelMap(children, nodeLevelMap); + int maxSize = buildMaxSize(nodeLevelMap)-1; + int maxWidth=maxSize*nodeWidth+maxSize*leftMargin; + int x=maxWidth/2+leftMargin+nodeWidth; + rootNode.setX(x); + rootNode.setY(5); + buildChildrenNodeLocation(children,rootNode,nodeLevelMap,levelXPositionMap); + Box box=new Box(); + box.setWidth(maxWidth+leftMargin*2+nodeWidth); + int maxHeight=nodeLevelMap.size()*nodeHeight*3+topMargin*2; + box.setHeight(maxHeight); + return box; + } + private void buildChildrenNodeLocation(List nodes,NodeInfo rootNode,Map> nodeLevelMap,Map levelXPositionMap){ + for(int i=0;i children=node.getChildren(); + int xposition=0; + if(levelXPositionMap.containsKey(level)){ + xposition=levelXPositionMap.get(level); + } + int rootX=rootNode.getX(); + int levelSize=nodeLevelMap.get(level).size(); + if(xposition==0){ + if(levelSize>1){ + int levelWidth=levelSize*nodeWidth+levelSize*leftMargin; + xposition=rootX-levelWidth/2-leftMargin; + }else{ + xposition=rootX; + } + } + int x=leftMargin+nodeWidth+xposition; + if(levelSize==1){ + x=xposition; + } + node.setX(x); + levelXPositionMap.put(level, x); + if(children!=null){ + buildChildrenNodeLocation(children,rootNode,nodeLevelMap,levelXPositionMap); + } + } + } + private int buildMaxSize(Map> nodeLevelMap) { + int maxSize=1; + for(List list:nodeLevelMap.values()){ + if(list.size()>maxSize){ + maxSize=list.size(); + } + } + return maxSize; + } + private void buildNodesLevelMap(List nodes,Map> nodeLevelMap){ + for(NodeInfo node:nodes){ + int level=node.getLevel(); + if(nodeLevelMap.containsKey(level)){ + List levelNodes=nodeLevelMap.get(level); + levelNodes.add(node); + }else{ + List levelNodes=new ArrayList(); + levelNodes.add(node); + nodeLevelMap.put(level, levelNodes); + } + List children=node.getChildren(); + if(children==null){ + continue; + } + buildNodesLevelMap(children, nodeLevelMap); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/FlowDefinitionWrapper.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/FlowDefinitionWrapper.java new file mode 100644 index 0000000..3639ced --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/FlowDefinitionWrapper.java @@ -0,0 +1,68 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.flow; + +import java.util.List; + +import com.itheima.sfbx.framework.rule.model.flow.FlowNode; +import com.itheima.sfbx.framework.rule.model.flow.ProcessDefinition; +import com.itheima.sfbx.framework.rule.model.rule.Library; + +/** + * @author Jacky.gao + * @since 2016年7月27日 + */ +public class FlowDefinitionWrapper { + private String id; + private boolean debug; + private List libraries; + private List nodes; + public FlowDefinitionWrapper(ProcessDefinition flowDefinition) { + this.id = flowDefinition.getId(); + this.debug=flowDefinition.isDebug(); + this.libraries = flowDefinition.getLibraries(); + this.nodes = flowDefinition.getNodes(); + } + + public List getNodes() { + return nodes; + } + public void setNodes(List nodes) { + this.nodes = nodes; + } + public List getLibraries() { + return libraries; + } + public void setLibraries(List libraries) { + this.libraries = libraries; + } + + public String getId() { + return id; + } + public void setId(String id) { + this.id = id; + } + + public boolean isDebug() { + return debug; + } + + public void setDebug(boolean debug) { + this.debug = debug; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/RuleFlowDesignerServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/RuleFlowDesignerServletHandler.java new file mode 100644 index 0000000..0bdbdbe --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/flow/RuleFlowDesignerServletHandler.java @@ -0,0 +1,126 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.flow; + +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.model.ResourcePackage; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.parse.deserializer.FlowDeserializer; + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public class RuleFlowDesignerServletHandler extends RenderPageServletHandler { + private RepositoryService repositoryService; + private FlowDeserializer flowDeserializer; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/rule-flow-designer.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + + public void loadFlowDefinition(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + InputStream inputStream; + String file=req.getParameter("file"); + String version=req.getParameter("version"); + file=Utils.decodeURL(file); + try{ + if(StringUtils.isEmpty(version)){ + inputStream=repositoryService.readFile(file,null); + }else{ + inputStream=repositoryService.readFile(file,version); + } + Element root=parseXml(inputStream); + FlowDefinition fd = flowDeserializer.deserialize(root); + inputStream.close(); + writeObjectToJson(resp, new FlowDefinitionWrapper(fd)); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + protected Element parseXml(InputStream stream){ + SAXReader reader=new SAXReader(); + Document document; + try { + document = reader.read(stream); + Element root=document.getRootElement(); + return root; + } catch (DocumentException e) { + throw new RuleException(e); + } + } + + public void loadPackages(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String project=req.getParameter("project"); + try{ + List packages=repositoryService.loadProjectResourcePackages(project); + writeObjectToJson(resp, packages); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + public void setFlowDeserializer(FlowDeserializer flowDeserializer) { + this.flowDeserializer = flowDeserializer; + } + + @Override + public String url() { + return "/ruleflowdesigner"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/frame/FrameServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/frame/FrameServletHandler.java new file mode 100644 index 0000000..98b50c6 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/frame/FrameServletHandler.java @@ -0,0 +1,476 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.frame; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.Cookie; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.io.OutputFormat; +import org.dom4j.io.XMLWriter; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.Repository; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.model.FileType; +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; +import com.itheima.sfbx.rule.console.repository.model.Type; +import com.itheima.sfbx.rule.console.repository.model.VersionFile; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.RequestContext; + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public class FrameServletHandler extends RenderPageServletHandler{ + private RepositoryService repositoryService; + private String welcomePage; + private String title; + private static final String CLASSIFY_COOKIE_NAME="_lib_classify"; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + context.put("welcomePage", welcomePage); + context.put("title", title); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/frame.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + + public void fileVersions(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + List files=repositoryService.getVersionFiles(path); + writeObjectToJson(resp, files); + } + + public void fileSource(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + InputStream inputStream=repositoryService.readFile(path,null); + String content=IOUtils.toString(inputStream,"utf-8"); + inputStream.close(); + String xml=null; + try{ + Document doc=DocumentHelper.parseText(content); + OutputFormat format=OutputFormat.createPrettyPrint(); + StringWriter out=new StringWriter(); + XMLWriter writer=new XMLWriter(out, format); + writer.write(doc); + xml=out.toString(); + }catch(Exception ex){ + xml=content; + } + Map result=new HashMap(); + result.put("content", xml); + writeObjectToJson(resp, result); + } + + public void importProject(HttpServletRequest req, HttpServletResponse resp) throws Exception { + DiskFileItemFactory factory = new DiskFileItemFactory(); + ServletContext servletContext = req.getSession().getServletContext(); + File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir"); + factory.setRepository(repository); + ServletFileUpload upload = new ServletFileUpload(factory); + InputStream inputStream=null; + boolean overwriteProject=true; + List items = upload.parseRequest(req); + if(items.size()==0){ + throw new ServletException("Upload file is invalid."); + } + for(FileItem item:items){ + String name=item.getFieldName(); + if(name.equals("overwriteProject")){ + String overwriteProjectStr=new String(item.get()); + overwriteProject=Boolean.valueOf(overwriteProjectStr); + }else if(name.equals("file")){ + inputStream=item.getInputStream(); + } + } + repositoryService.importXml(inputStream,overwriteProject); + IOUtils.closeQuietly(inputStream); + resp.sendRedirect(req.getContextPath()+"/urule/frame"); + } + + public void loadFileVersions(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String file=req.getParameter("file"); + file=Utils.decodeURL(file); + List versions=repositoryService.getVersionFiles(file); + writeObjectToJson(resp, versions); + } + public void createFolder(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String fullFolderName=req.getParameter("fullFolderName"); + fullFolderName=Utils.decodeURL(fullFolderName); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + repositoryService.createDir(fullFolderName, user); + loadProjects(req, resp); + } + public void copyFile(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String newFullPath=req.getParameter("newFullPath"); + String oldFullPath=req.getParameter("oldFullPath"); + newFullPath=Utils.decodeURL(newFullPath); + oldFullPath=Utils.decodeURL(oldFullPath); + try{ + InputStream inputStream=repositoryService.readFile(oldFullPath, null); + String content=IOUtils.toString(inputStream, "utf-8"); + inputStream.close(); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + repositoryService.createFile(newFullPath, content,user); + loadProjects(req, resp); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void createFile(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + String type=req.getParameter("type"); + FileType fileType=FileType.parse(type); + StringBuilder content=new StringBuilder(); + if(fileType.equals(FileType.UL)) { + content.append("rule \"rule01\""); + content.append("\n"); + content.append("if"); + content.append("\r\n"); + content.append("then"); + content.append("\r\n"); + content.append("end"); + }else if(fileType.equals(FileType.DecisionTable)) { + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + }else if(fileType.equals(FileType.DecisionTree)){ + content.append(""); + content.append(""); + content.append(""); + content.append(""); + }else if(fileType.equals(FileType.ScriptDecisionTable)) { + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + content.append(""); + }else if(fileType.equals(FileType.Scorecard)){ + content.append(""); + content.append(""); + content.append(""); + }else{ + String name = getRootTagName(fileType); + content.append(""); + content.append("<" + name + ">"); + content.append(""); + } + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + try{ + repositoryService.createFile(path, content.toString(),user); + }catch(Exception ex){ + throw new RuleException(ex); + } + RepositoryFile newFileInfo=new RepositoryFile(); + newFileInfo.setFullPath(path); + if(fileType.equals(FileType.VariableLibrary)){ + newFileInfo.setType(Type.variable); + }else if(fileType.equals(FileType.ActionLibrary)){ + newFileInfo.setType(Type.action); + }else if(fileType.equals(FileType.ConstantLibrary)){ + newFileInfo.setType(Type.constant); + }else if(fileType.equals(FileType.ParameterLibrary)){ + newFileInfo.setType(Type.parameter); + }else if(fileType.equals(FileType.DecisionTable)){ + newFileInfo.setType(Type.decisionTable); + }else if(fileType.equals(FileType.ScriptDecisionTable)){ + newFileInfo.setType(Type.scriptDecisionTable); + }else if(fileType.equals(FileType.Ruleset)){ + newFileInfo.setType(Type.rule); + }else if(fileType.equals(FileType.UL)){ + newFileInfo.setType(Type.ul); + }else if(fileType.equals(FileType.DecisionTree)){ + newFileInfo.setType(Type.decisionTree); + }else if(fileType.equals(FileType.RuleFlow)){ + newFileInfo.setType(Type.flow); + }else if(fileType.equals(FileType.Scorecard)){ + newFileInfo.setType(Type.scorecard); + } + writeObjectToJson(resp, newFileInfo); + } + + private String getRootTagName(FileType type) { + String root = null; + switch(type){ + case ActionLibrary: + root="action-library"; + break; + case ConstantLibrary: + root="constant-library"; + break; + case DecisionTable: + root="decision-table"; + break; + case DecisionTree: + root="decision-tree"; + break; + case ParameterLibrary: + root="parameter-library"; + break; + case RuleFlow: + root="rule-flow"; + break; + case Ruleset: + root="rule-set"; + break; + case ScriptDecisionTable: + root="script-decision-table"; + break; + case VariableLibrary: + root="variable-library"; + break; + case UL: + root="script"; + break; + case Scorecard: + root="scorecard"; + break; + case DIR: + throw new IllegalArgumentException("Unsupport filetype : "+type); + } + return root; + } + + public void projectExistCheck(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String projectName=req.getParameter("newProjectName"); + if(StringUtils.isEmpty(projectName)){ + return; + } + projectName=Utils.decodeURL(projectName); + projectName=projectName.trim(); + Map result=new HashMap(); + try{ + result.put("valid", !repositoryService.fileExistCheck(projectName)); + writeObjectToJson(resp, result); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + public void fileExistCheck(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String fullFileName=req.getParameter("fullFileName"); + if(StringUtils.isEmpty(fullFileName)){ + return; + } + fullFileName=Utils.decodeURL(fullFileName); + fullFileName=fullFileName.trim(); + Map result=new HashMap(); + try{ + result.put("valid", !repositoryService.fileExistCheck(fullFileName)); + writeObjectToJson(resp, result); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void deleteFile(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + repositoryService.deleteFile(path,user); + String isFolder=req.getParameter("isFolder"); + if(StringUtils.isNotBlank(isFolder) && isFolder.equals("true")){ + loadProjects(req, resp); + } + } + + public void lockFile(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String file=req.getParameter("file"); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + repositoryService.lockPath(file, user); + loadProjects(req, resp); + } + public void unlockFile(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String file=req.getParameter("file"); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + repositoryService.unlockPath(file, user); + loadProjects(req, resp); + } + + public void exportProjectBackupFile(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String path=req.getParameter("path"); + String projectPath=Utils.decodeURL(path); + if(StringUtils.isEmpty(projectPath)){ + throw new RuleException("Export project not be null."); + } + SimpleDateFormat sd=new SimpleDateFormat("yyyyMMddHHmmss"); + String projectName=projectPath.substring(1,projectPath.length()); + String filename=projectName+"-urule-repo-"+sd.format(new Date())+".bak"; + resp.setContentType("application/octet-stream"); + resp.setHeader("Content-Disposition", "attachment; filename=\"" + new String(filename.getBytes("utf-8"),"iso-8859-1") + "\""); + resp.setHeader("content-type", "application/octet-stream"); + OutputStream outputStream=resp.getOutputStream(); + repositoryService.exportXml(projectPath,outputStream); + outputStream.flush(); + outputStream.close(); + } + + public void createProject(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String projectName=req.getParameter("newProjectName"); + projectName=Utils.decodeURL(projectName); + boolean classify = getClassify(req,resp); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + RepositoryFile projectFileInfo=repositoryService.createProject(projectName,user,classify); + writeObjectToJson(resp, projectFileInfo); + } + + + public void loadProjects(HttpServletRequest req, HttpServletResponse resp) throws Exception { + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + boolean classify = getClassify(req,resp); + String projectName=req.getParameter("projectName"); + String searchFileName=req.getParameter("searchFileName"); + projectName=Utils.decodeURL(projectName); + String typesStr=req.getParameter("types"); + FileType[] types=null; + if(StringUtils.isNotBlank(typesStr) && !typesStr.equals("all")){ + if(typesStr.equals("lib")){ + types=new FileType[]{FileType.VariableLibrary,FileType.ConstantLibrary,FileType.ParameterLibrary,FileType.ActionLibrary}; + }else if(typesStr.equals("rule")){ + types=new FileType[]{FileType.Ruleset,FileType.UL}; + }else if(typesStr.equals("table")){ + types=new FileType[]{FileType.DecisionTable,FileType.ScriptDecisionTable}; + }else if(typesStr.equals("tree")){ + types=new FileType[]{FileType.DecisionTree}; + }else if(typesStr.equals("flow")){ + types=new FileType[]{FileType.RuleFlow}; + } + } + Repository repo=repositoryService.loadRepository(projectName, user,classify,types,searchFileName); + Map map=new HashMap(); + map.put("repo", repo); + map.put("classify", classify); + writeObjectToJson(resp, map); + } + + private boolean getClassify(HttpServletRequest req,HttpServletResponse resp) { + String classifyValue=req.getParameter("classify"); + if(StringUtils.isBlank(classifyValue)){ + Cookie[] cookies=req.getCookies(); + if(cookies!=null){ + for(Cookie cookie:cookies){ + if(CLASSIFY_COOKIE_NAME.equals(cookie.getName())){ + classifyValue=cookie.getValue(); + break; + } + } + } + }else{ + Cookie classifyCookie=new Cookie(CLASSIFY_COOKIE_NAME,classifyValue); + classifyCookie.setMaxAge(2100000000); + resp.addCookie(classifyCookie); + } + boolean classify=true; + if(StringUtils.isNotBlank(classifyValue)){ + classify=Boolean.valueOf(classifyValue); + } + return classify; + } + + public void fileRename(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String path=req.getParameter("path"); + path=Utils.decodeURL(path); + String newPath=req.getParameter("newPath"); + newPath=Utils.decodeURL(newPath); + repositoryService.fileRename(path, newPath); + loadProjects(req, resp); + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + public void setWelcomePage(String welcomePage) { + this.welcomePage = welcomePage; + } + public void setTitle(String title) { + this.title = title; + } + + @Override + public String url() { + return "/frame"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/knowledge/LoadKnowledgeServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/knowledge/LoadKnowledgeServletHandler.java new file mode 100644 index 0000000..4174898 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/knowledge/LoadKnowledgeServletHandler.java @@ -0,0 +1,66 @@ +package com.itheima.sfbx.rule.console.servlet.knowledge; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.cache.CacheUtils; +import com.itheima.sfbx.framework.rule.runtime.service.KnowledgePackageService; + +/** + * @author Jacky.gao + * @since 2016年8月17日 + */ +public class LoadKnowledgeServletHandler extends RenderPageServletHandler{ + private KnowledgePackageService knowledgePackageService; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String packageId=req.getParameter("packageId"); + if(StringUtils.isEmpty(packageId)){ + resp.setContentType("text/html"); + PrintWriter pw=resp.getWriter(); + pw.write(""); + pw.write("
"); + pw.write("
"); + pw.write(""); + pw.write("

packageId can not be null

"); + pw.write(""); + pw.write(""); + pw.flush(); + pw.close(); + return; + } + packageId=Utils.decodeURL(packageId); + String timestamp=req.getParameter("timestamp"); + KnowledgePackage knowledgePackage=CacheUtils.getKnowledgeCache().getKnowledge(packageId); + if(knowledgePackage==null){ + knowledgePackage=knowledgePackageService.buildKnowledgePackage(packageId); + CacheUtils.getKnowledgeCache().putKnowledge(packageId, knowledgePackage); + } + if(StringUtils.isNotEmpty(timestamp)){ + long remoteTimestamp=Long.valueOf(timestamp); + long localTimestamp=knowledgePackage.getTimestamp(); + if(localTimestamp>remoteTimestamp){ + writeObjectToJson(resp, new KnowledgePackageWrapper(knowledgePackage)); + } + }else{ + writeObjectToJson(resp, new KnowledgePackageWrapper(knowledgePackage)); + } + } + @Override + public String url() { + return "/loadknowledge"; + } + public void setKnowledgePackageService(KnowledgePackageService knowledgePackageService) { + this.knowledgePackageService = knowledgePackageService; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/parameter/ParameterServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/parameter/ParameterServletHandler.java new file mode 100644 index 0000000..c77a1fa --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/parameter/ParameterServletHandler.java @@ -0,0 +1,56 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.parameter; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class ParameterServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/parameter-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/parametereditor"; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/PermissionConfigServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/PermissionConfigServletHandler.java new file mode 100644 index 0000000..2b820dd --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/PermissionConfigServletHandler.java @@ -0,0 +1,162 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.permission; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.exception.NoPermissionException; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.RepositoryServiceImpl; +import com.itheima.sfbx.rule.console.repository.model.RepositoryFile; +import com.itheima.sfbx.rule.console.repository.permission.PermissionService; +import com.itheima.sfbx.rule.console.repository.permission.PermissionStore; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.RequestContext; + +/** + * @author Jacky.gao + * @since 2016年8月30日 + */ +public class PermissionConfigServletHandler extends RenderPageServletHandler{ + private RepositoryService repositoryService; + private PermissionStore permissionStore; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + if(!((PermissionService)permissionStore).isAdmin()){ + throw new NoPermissionException(); + } + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/permission-config-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + + public void loadResourceSecurityConfigs(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String companyId=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)).getCompanyId(); + try{ + List permissions=repositoryService.loadResourceSecurityConfigs(companyId); + List users=EnvironmentUtils.getEnvironmentProvider().getUsers(); + if(users==null)users=new ArrayList(); + List result=new ArrayList(); + for(User user:users){ + if(user.isAdmin()){ + continue; + } + if(companyId!=null){ + if(user.getCompanyId()==null){ + continue; + } + if(!user.getCompanyId().equals(companyId)){ + continue; + } + } + boolean exist=false; + for(UserPermission p:permissions){ + if(p.getUsername().equals(user.getUsername())){ + exist=true; + break; + } + } + if(exist){ + continue; + } + UserPermission up=new UserPermission(); + up.setProjectConfigs(new ArrayList()); + up.setUsername(user.getUsername()); + result.add(up); + } + result.addAll(permissions); + List projects=repositoryService.loadProjects(companyId); + for(UserPermission p:result){ + buildProjectConfigs(projects, p); + } + writeObjectToJson(resp, result); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + private void buildProjectConfigs(List projects,UserPermission p){ + List configs=p.getProjectConfigs(); + if(configs==null){ + configs=new ArrayList(); + p.setProjectConfigs(configs); + } + for(RepositoryFile project:projects){ + boolean exist=false; + for(ProjectConfig c:p.getProjectConfigs()){ + if(project.getName().equals(c.getProject())){ + exist=true; + break; + } + } + if(exist){ + continue; + } + ProjectConfig config=new ProjectConfig(); + config.setProject(project.getName()); + configs.add(config); + } + } + + public void saveResourceSecurityConfigs(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + User user=EnvironmentUtils.getLoginUser(new RequestContext(req, resp)); + String companyId=user.getCompanyId(); + String content=req.getParameter("content"); + String path=RepositoryServiceImpl.RESOURCE_SECURITY_CONFIG_FILE+(companyId==null ? "" : companyId); + try{ + repositoryService.saveFile(path, content, false,null,user); + permissionStore.refreshPermissionStore(); + }catch(Exception ex){ + throw new RuleException(ex); + } + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + public void setPermissionStore(PermissionStore permissionStore) { + this.permissionStore = permissionStore; + } + + @Override + public String url() { + return "/permission"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/ProjectConfig.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/ProjectConfig.java new file mode 100644 index 0000000..a3dd442 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/ProjectConfig.java @@ -0,0 +1,188 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.permission; +/** + * @author Jacky.gao + * @since 2016年8月30日 + */ +public class ProjectConfig { + private String project; + private boolean readProject; + + private boolean readPackage; + private boolean writePackage; + + private boolean readVariableFile; + private boolean writeVariableFile; + + private boolean readParameterFile; + private boolean writeParameterFile; + + private boolean readConstantFile; + private boolean writeConstantFile; + + private boolean readActionFile; + private boolean writeActionFile; + + private boolean readRuleFile; + private boolean writeRuleFile; + + private boolean readScorecardFile; + private boolean writeScorecardFile; + + private boolean readDecisionTableFile; + private boolean writeDecisionTableFile; + + private boolean readDecisionTreeFile; + private boolean writeDecisionTreeFile; + + private boolean readFlowFile; + private boolean writeFlowFile; + + public String getProject() { + return project; + } + public void setProject(String project) { + this.project = project; + } + + public boolean isReadProject() { + return readProject; + } + public void setReadProject(boolean readProject) { + this.readProject = readProject; + } + public boolean isReadPackage() { + return readPackage; + } + public void setReadPackage(boolean readPackage) { + this.readPackage = readPackage; + } + public boolean isWritePackage() { + return writePackage; + } + public void setWritePackage(boolean writePackage) { + this.writePackage = writePackage; + } + public boolean isReadVariableFile() { + return readVariableFile; + } + public void setReadVariableFile(boolean readVariableFile) { + this.readVariableFile = readVariableFile; + } + public boolean isWriteVariableFile() { + return writeVariableFile; + } + public void setWriteVariableFile(boolean writeVariableFile) { + this.writeVariableFile = writeVariableFile; + } + public boolean isReadParameterFile() { + return readParameterFile; + } + public void setReadParameterFile(boolean readParameterFile) { + this.readParameterFile = readParameterFile; + } + public boolean isWriteParameterFile() { + return writeParameterFile; + } + public void setWriteParameterFile(boolean writeParameterFile) { + this.writeParameterFile = writeParameterFile; + } + public boolean isReadConstantFile() { + return readConstantFile; + } + public void setReadConstantFile(boolean readConstantFile) { + this.readConstantFile = readConstantFile; + } + public boolean isWriteConstantFile() { + return writeConstantFile; + } + public void setWriteConstantFile(boolean writeConstantFile) { + this.writeConstantFile = writeConstantFile; + } + public boolean isReadActionFile() { + return readActionFile; + } + public void setReadActionFile(boolean readActionFile) { + this.readActionFile = readActionFile; + } + public boolean isWriteActionFile() { + return writeActionFile; + } + public void setWriteActionFile(boolean writeActionFile) { + this.writeActionFile = writeActionFile; + } + public boolean isReadRuleFile() { + return readRuleFile; + } + public void setReadRuleFile(boolean readRuleFile) { + this.readRuleFile = readRuleFile; + } + public boolean isWriteRuleFile() { + return writeRuleFile; + } + public void setWriteRuleFile(boolean writeRuleFile) { + this.writeRuleFile = writeRuleFile; + } + public boolean isReadDecisionTableFile() { + return readDecisionTableFile; + } + public void setReadDecisionTableFile(boolean readDecisionTableFile) { + this.readDecisionTableFile = readDecisionTableFile; + } + public boolean isWriteDecisionTableFile() { + return writeDecisionTableFile; + } + public void setWriteDecisionTableFile(boolean writeDecisionTableFile) { + this.writeDecisionTableFile = writeDecisionTableFile; + } + public boolean isReadDecisionTreeFile() { + return readDecisionTreeFile; + } + public void setReadDecisionTreeFile(boolean readDecisionTreeFile) { + this.readDecisionTreeFile = readDecisionTreeFile; + } + public boolean isWriteDecisionTreeFile() { + return writeDecisionTreeFile; + } + public void setWriteDecisionTreeFile(boolean writeDecisionTreeFile) { + this.writeDecisionTreeFile = writeDecisionTreeFile; + } + public boolean isReadFlowFile() { + return readFlowFile; + } + public void setReadFlowFile(boolean readFlowFile) { + this.readFlowFile = readFlowFile; + } + public boolean isWriteFlowFile() { + return writeFlowFile; + } + public void setWriteFlowFile(boolean writeFlowFile) { + this.writeFlowFile = writeFlowFile; + } + public boolean isReadScorecardFile() { + return readScorecardFile; + } + public void setReadScorecardFile(boolean readScorecardFile) { + this.readScorecardFile = readScorecardFile; + } + public boolean isWriteScorecardFile() { + return writeScorecardFile; + } + public void setWriteScorecardFile(boolean writeScorecardFile) { + this.writeScorecardFile = writeScorecardFile; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/UserPermission.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/UserPermission.java new file mode 100644 index 0000000..4186ce8 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/permission/UserPermission.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.permission; + +import java.util.List; + +/** + * @author Jacky.gao + * @since 2016年8月30日 + */ +public class UserPermission { + private String username; + private List projectConfigs; + public String getUsername() { + return username; + } + public void setUsername(String username) { + this.username = username; + } + public List getProjectConfigs() { + return projectConfigs; + } + public void setProjectConfigs(List projectConfigs) { + this.projectConfigs = projectConfigs; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/HttpSessionKnowledgeCache.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/HttpSessionKnowledgeCache.java new file mode 100644 index 0000000..428d4d2 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/HttpSessionKnowledgeCache.java @@ -0,0 +1,69 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.respackage; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.http.HttpServletRequest; + + +/** + * @author Jacky.gao + * @since 2017年8月20日 + */ +public class HttpSessionKnowledgeCache { + private Map sessionMap=new HashMap(); + public Object get(HttpServletRequest req,String key){ + SessionObject sessionObject = getSessionObject(req); + return sessionObject.get(key); + } + public void put(HttpServletRequest req,String key,Object obj){ + SessionObject sessionObject = getSessionObject(req); + sessionObject.put(key, obj); + } + public void remove(HttpServletRequest req,String key){ + SessionObject sessionObject = getSessionObject(req); + sessionObject.remove(key); + } + private SessionObject getSessionObject(HttpServletRequest req) { + clean(); + String sessionId=req.getSession().getId(); + SessionObject sessionObject=null; + if(sessionMap.containsKey(sessionId)){ + sessionObject=sessionMap.get(sessionId); + }else{ + sessionObject=new SessionObject(); + sessionMap.put(sessionId, sessionObject); + } + return sessionObject; + } + + private void clean(){ + List list=new ArrayList(); + for(String key:sessionMap.keySet()){ + SessionObject obj=sessionMap.get(key); + if(obj.isExpired()){ + list.add(key); + } + } + for(String key:list){ + sessionMap.remove(key); + } + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/PackageServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/PackageServletHandler.java new file mode 100644 index 0000000..9b8de65 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/PackageServletHandler.java @@ -0,0 +1,858 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.respackage; + +import java.awt.Color; +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.StringWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.net.URLEncoder; +import java.text.SimpleDateFormat; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.beanutils.PropertyUtils; +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.poi.ss.usermodel.Cell; +import org.apache.poi.ss.usermodel.FillPatternType; +import org.apache.poi.ss.usermodel.Row; +import org.apache.poi.ss.usermodel.Sheet; +import org.apache.poi.xssf.streaming.SXSSFWorkbook; +import org.apache.poi.xssf.usermodel.XSSFCell; +import org.apache.poi.xssf.usermodel.XSSFCellStyle; +import org.apache.poi.xssf.usermodel.XSSFColor; +import org.apache.poi.xssf.usermodel.XSSFRow; +import org.apache.poi.xssf.usermodel.XSSFSheet; +import org.apache.poi.xssf.usermodel.XSSFWorkbook; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.codehaus.jackson.map.ObjectMapper; +import org.codehaus.jackson.map.SerializationConfig; +import org.codehaus.jackson.map.annotate.JsonSerialize.Inclusion; + +import com.itheima.sfbx.framework.rule.Configure; +import com.itheima.sfbx.framework.rule.KnowledgePackageReceiverServlet; +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBase; +import com.itheima.sfbx.framework.rule.builder.KnowledgeBuilder; +import com.itheima.sfbx.framework.rule.builder.ResourceBase; +import com.itheima.sfbx.rule.console.EnvironmentUtils; +import com.itheima.sfbx.rule.console.User; +import com.itheima.sfbx.rule.console.repository.ClientConfig; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.repository.RepositoryServiceImpl; +import com.itheima.sfbx.rule.console.repository.model.ResourcePackage; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.rule.console.servlet.RequestContext; +import com.itheima.sfbx.framework.rule.model.GeneralEntity; +import com.itheima.sfbx.framework.rule.model.flow.FlowDefinition; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; +import com.itheima.sfbx.framework.rule.model.library.variable.VariableCategory; +import com.itheima.sfbx.framework.rule.model.rule.RuleInfo; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackage; +import com.itheima.sfbx.framework.rule.runtime.KnowledgePackageWrapper; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSession; +import com.itheima.sfbx.framework.rule.runtime.KnowledgeSessionFactory; +import com.itheima.sfbx.framework.rule.runtime.cache.CacheUtils; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponse; +import com.itheima.sfbx.framework.rule.runtime.response.ExecutionResponseImpl; + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public class PackageServletHandler extends RenderPageServletHandler { + public static final String KB_KEY="_kb"; + public static final String VCS_KEY="_vcs"; + public static final String IMPORT_EXCEL_DATA="_import_excel_data"; + private RepositoryService repositoryService; + private KnowledgeBuilder knowledgeBuilder; + private HttpSessionKnowledgeCache httpSessionKnowledgeCache; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/package-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + public void loadPackages(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + List packages=repositoryService.loadProjectResourcePackages(project); + writeObjectToJson(resp, packages); + } + + @SuppressWarnings("unchecked") + public void exportExcelTemplate(HttpServletRequest req, HttpServletResponse resp) throws Exception { + List variableCategories=(List)httpSessionKnowledgeCache.get(req, VCS_KEY); + if(variableCategories==null){ + KnowledgeBase knowledgeBase=buildKnowledgeBase(req); + variableCategories=knowledgeBase.getResourceLibrary().getVariableCategories(); + } + SXSSFWorkbook wb = new SXSSFWorkbook(); + XSSFCellStyle style=(XSSFCellStyle)wb.createCellStyle(); + Color c=new Color(147,208,15); + XSSFColor xssfColor=new XSSFColor(c); + style.setFillPattern(FillPatternType.SOLID_FOREGROUND); + style.setFillForegroundColor(xssfColor); + for(VariableCategory vc:variableCategories){ + buildSheet(wb, vc,style); + } + resp.setContentType("application/x-xls"); + resp.setHeader("Content-Disposition","attachment; filename=urule-batch-test-template.xlsx"); + OutputStream outputStream=resp.getOutputStream(); + wb.write(outputStream);; + outputStream.flush(); + outputStream.close(); + } + + private void buildSheet(SXSSFWorkbook wb,VariableCategory vc,XSSFCellStyle style){ + String name=vc.getName(); + Sheet sheet=wb.createSheet(name); + Row row=sheet.createRow(0); + List variables=vc.getVariables(); + for(int i=0;i items = upload.parseRequest(req); + Iterator itr = items.iterator(); + List> mapData=null; + while (itr.hasNext()) { + FileItem item = (FileItem) itr.next(); + String name=item.getFieldName(); + if(!name.equals("file")){ + continue; + } + InputStream stream=item.getInputStream(); + mapData=parseExcel(stream); + httpSessionKnowledgeCache.put(req, IMPORT_EXCEL_DATA, mapData); + stream.close(); + break; + } + httpSessionKnowledgeCache.put(req, IMPORT_EXCEL_DATA, mapData); + writeObjectToJson(resp, mapData); + } + + @SuppressWarnings("resource") + private List> parseExcel(InputStream stream) throws Exception { + List> mapList=new ArrayList>(); + XSSFWorkbook wb = new XSSFWorkbook(stream); + for (int i = 0; i < wb.getNumberOfSheets(); i++) { + XSSFSheet sheet = wb.getSheetAt(i); + if (sheet == null) { + continue; + } + String name = sheet.getSheetName(); + Map map=new HashMap(); + map.put("name",name); + map.put("data", buildVariables(sheet)); + mapList.add(map); + } + return mapList; + } + + @SuppressWarnings("deprecation") + private List> buildVariables(XSSFSheet sheet){ + Map headerMap=new HashMap(); + List> mapList=new ArrayList>(); + int totalRow=sheet.getLastRowNum(); + XSSFRow headerRow=sheet.getRow(0); + int totalColumn=headerRow.getLastCellNum(); + Map noDataRowMap=new HashMap(); + for(int i=0;i map=new HashMap(); + mapList.add(map); + for(int j=0;j col=knowledgeBase.getFlowMap().values(); + writeObjectToJson(resp, col); + } + + public void pushKnowledgePackageToClients(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + String packageId=project+"/"+Utils.decodeURL(req.getParameter("packageId")); + if(packageId.startsWith("/")){ + packageId=packageId.substring(1,packageId.length()); + } + KnowledgePackage knowledgePackage=CacheUtils.getKnowledgeCache().getKnowledge(packageId); + + ObjectMapper mapper=new ObjectMapper(); + mapper.setSerializationInclusion(Inclusion.NON_NULL); + mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS,false); + mapper.setDateFormat(new SimpleDateFormat(Configure.getDateFormat())); + StringWriter writer=new StringWriter(); + mapper.writeValue(writer, new KnowledgePackageWrapper(knowledgePackage)); + String content=writer.getBuffer().toString(); + writer.close(); + StringBuffer sb=new StringBuffer(); + List clients=repositoryService.loadClientConfigs(project); + int i=0; + for(ClientConfig config:clients){ + if(i>0){ + sb.append("
"); + } + boolean result=pushKnowledgePackage(packageId,content,config.getClient()); + if(result){ + sb.append("推送到客户端:"+config.getName()+":"+config.getClient()+" 成功"); + }else{ + sb.append("推送到客户端:"+config.getName()+":"+config.getClient()+" 失败"); + } + i++; + } + Map map=new HashMap(); + map.put("info", sb.toString()); + writeObjectToJson(resp, map); + } + + private boolean pushKnowledgePackage(String packageId,String content,String client){ + HttpURLConnection connection=null; + try{ + if(client.endsWith("/")){ + client=client.substring(0,client.length()-1); + } + String clientUrl=client+KnowledgePackageReceiverServlet.URL; + content="packageId="+URLEncoder.encode(packageId, "utf-8")+"&content="+URLEncoder.encode(content, "utf-8"); + URL url=new URL(clientUrl); + connection=(HttpURLConnection)url.openConnection(); + connection.setRequestMethod("POST"); + connection.setRequestProperty("Charset", "UTF-8"); + connection.setRequestProperty("Accept-Charset", "utf-8"); + connection.setRequestProperty("Content-Type", "application/x-www-form-urlencoded"); + connection.setUseCaches(false); + connection.setDoOutput(true); + connection.setDoInput(true); + connection.connect(); + OutputStream outputStream=connection.getOutputStream(); + DataOutputStream wr = new DataOutputStream (connection.getOutputStream()); + wr.writeBytes(content); + wr.flush(); + wr.close(); + if (connection.getResponseCode() >= 300) { + return false; + } + InputStream inputStream=connection.getInputStream(); + String result=IOUtils.toString(inputStream); + outputStream.close(); + inputStream.close(); + if(!result.equals("ok")){ + return false; + } + return true; + }catch(Exception ex){ + ex.printStackTrace(); + return false; + }finally { + if(connection!=null){ + connection.disconnect(); + } + } + } + + + public void refreshKnowledgeCache(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + String packageId=project+"/"+Utils.decodeURL(req.getParameter("packageId")); + if(packageId.startsWith("/")){ + packageId=packageId.substring(1,packageId.length()); + } + KnowledgeBase knowledgeBase= buildKnowledgeBase(req); + KnowledgePackage knowledgePackage=knowledgeBase.getKnowledgePackage(); + CacheUtils.getKnowledgeCache().putKnowledge(packageId, knowledgePackage); + Map map=new HashMap(); + List clients=repositoryService.loadClientConfigs(project); + if(clients.size()>0){ + StringBuffer sb=new StringBuffer(); + int i=1; + for(ClientConfig config:clients){ + if(i>1){ + sb.append("
"); + } + sb.append(config.getName()+":"+config.getClient()); + i++; + } + map.put("clientInfo", sb.toString()); + } + writeObjectToJson(resp, map); + } + + public void loadForTestVariableCategories(HttpServletRequest req, HttpServletResponse resp) throws Exception { + KnowledgeBase knowledgeBase = buildKnowledgeBase(req); + List vcs=knowledgeBase.getResourceLibrary().getVariableCategories(); + httpSessionKnowledgeCache.put(req, VCS_KEY, vcs); + writeObjectToJson(resp, vcs); + } + + private KnowledgeBase buildKnowledgeBase(HttpServletRequest req) throws IOException{ + String files=req.getParameter("files"); + files=Utils.decodeURL(files); + ResourceBase resourceBase=knowledgeBuilder.newResourceBase(); + String[] paths=files.split(";"); + for(String path:paths){ + String[] subpaths=path.split(","); + path=subpaths[0]; + String version=null; + if(subpaths.length>1){ + version=subpaths[1]; + } + resourceBase.addResource(path,version); + } + KnowledgeBase knowledgeBase=knowledgeBuilder.buildKnowledgeBase(resourceBase); + httpSessionKnowledgeCache.remove(req, KB_KEY); + httpSessionKnowledgeCache.put(req, KB_KEY, knowledgeBase); + return knowledgeBase; + } + + + public void saveResourcePackages(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String project=req.getParameter("project"); + project=Utils.decodeURL(project); + String path=project+"/"+RepositoryServiceImpl.RES_PACKGE_FILE; + String xml=req.getParameter("xml"); + User user=EnvironmentUtils.getLoginUser(new RequestContext(req,resp)); + repositoryService.saveFile(path, xml, false,null,user); + } + + @SuppressWarnings("unchecked") + private List mapToVariableCategories(List> mapList){ + List list=new ArrayList(); + for(Map map:mapList){ + VariableCategory category=new VariableCategory(); + list.add(category); + for(String key:map.keySet()){ + if(key.equals("name")){ + category.setName((String)map.get(key)); + }else if(key.equals("clazz")){ + category.setClazz((String)map.get(key)); + }else if(key.equals("variables")){ + List> variables=(List>)map.get(key); + if(variables!=null){ + for(Map m:variables){ + Variable var=new Variable(); + category.addVariable(var); + for(String varName:m.keySet()){ + if(varName.equals("name")){ + var.setName((String)m.get(varName)); + }else if(varName.equals("label")){ + var.setLabel((String)m.get(varName)); + }else if(varName.equals("type")){ + var.setType(Datatype.valueOf((String)m.get(varName))); + }else if(varName.equals("defaultValue")){ + var.setDefaultValue((String)m.get(varName)); + } + } + } + } + } + } + } + return list; + } + + + @SuppressWarnings("unchecked") + public void doBatchTest(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String flowId=req.getParameter("flowId"); + List vcs=(List)httpSessionKnowledgeCache.get(req, VCS_KEY); + if(vcs==null){ + vcs=buildKnowledgeBase(req).getResourceLibrary().getVariableCategories(); + } + Map vcmap=new HashMap(); + for(VariableCategory vc:vcs){ + vcmap.put(vc.getName(), vc); + } + List> data=(List>)httpSessionKnowledgeCache.get(req, IMPORT_EXCEL_DATA); + if(data==null){ + throw new RuleException("Import excel data for test has expired,please import the excel and try again."); + } + Map> factMap=new HashMap>(); + for(Map map:data){ + String name=(String)map.get("name"); + VariableCategory vc=vcmap.get(name); + if(vc==null){ + continue; + } + String clazz=vc.getClazz(); + List> rowList=(List>)map.get("data"); + List variables=vc.getVariables(); + List factList=new ArrayList(); + for(Map rowMap:rowList){ + Object entity=null; + if(vc.getName().equals(VariableCategory.PARAM_CATEGORY)){ + entity=new HashMap(); + }else{ + entity=new GeneralEntity(clazz); + } + buildObject(entity, rowMap,variables); + factList.add(entity); + } + factMap.put(name, factList); + } + if(factMap.size()==0){ + throw new RuleException("Import data cannot match current knowledge package."); + } + int rowSize=0; + List keyList=new ArrayList(); + for(String key:factMap.keySet()){ + keyList.add(key); + List facts=factMap.get(key); + if(facts.size()>rowSize){ + rowSize=facts.size(); + } + } + List> resultList=new ArrayList>(); + int mapSize=factMap.size(); + KnowledgeBase knowledgeBase=(KnowledgeBase)httpSessionKnowledgeCache.get(req, KB_KEY); + KnowledgePackage knowledgePackage=knowledgeBase.getKnowledgePackage(); + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + long start=System.currentTimeMillis(); + for(int i=0;i parameterMap=null; + for(int j=0;j)fact; + }else{ + session.insert(fact); + buildResult(resultList,categoryName,fact); + } + } + if(StringUtils.isNotEmpty(flowId)){ + if(parameterMap!=null){ + session.startProcess(flowId,parameterMap); + }else{ + session.startProcess(flowId); + } + }else{ + if(parameterMap==null){ + session.fireRules(); + }else{ + session.fireRules(parameterMap); + Map p=new HashMap(); + p.putAll(session.getParameters()); + p.remove("return_to_"); + buildResult(resultList,VariableCategory.PARAM_CATEGORY,p); + } + } + } + long end=System.currentTimeMillis(); + long elapse=end-start; + StringBuffer sb=new StringBuffer(); + if(StringUtils.isNotEmpty(flowId)){ + sb.append("共执行规则流"); + sb.append("["+flowId+"]"); + sb.append(rowSize); + sb.append("次,"); + }else{ + sb.append("共测试规则"); + sb.append(rowSize); + sb.append("次,"); + } + sb.append(""+"耗时:"+elapse+"ms"); + Map result=new HashMap(); + result.put("info", sb.toString()); + result.put("data", resultList); + writeObjectToJson(resp, result); + } + + + @SuppressWarnings("unchecked") + private void buildResult(List> list,String categoryName,Object fact){ + List rowList=null; + for(Map map:list){ + if(map.get("name").equals(categoryName)){ + rowList=(List)map.get("data"); + break; + } + } + if(rowList==null){ + rowList=new ArrayList(); + Map dataMap=new HashMap(); + dataMap.put("name", categoryName); + dataMap.put("data", rowList); + dataMap.put("id", UUID.randomUUID().toString()); + list.add(dataMap); + } + rowList.add(fact); + } + + private Object fetchFact(Map> factMap,List keyList,int i,int objectIndex){ + if(i>keyList.size()){ + return null; + } + String name=keyList.get(i); + List factList = factMap.get(name); + if(factList==null){ + return null; + } + if(objectIndex>=factList.size()){ + return null; + } + return factList.get(objectIndex); + } + + + private void buildObject(Object obj,Map map,List variables){ + for(String name:map.keySet()){ + name=name.replaceAll("-", "\\."); + if(name.indexOf(".")!=-1){ + instanceChildObject(obj,name); + } + Object value=map.get(name); + Variable var=null; + for(Variable variable:variables){ + if(name.equals(variable.getLabel()) || name.equals(variable.getName())){ + var=variable; + break; + } + } + if(var==null){ + throw new RuleException("Variable ["+name+"] not exist."); + } + Datatype type=var.getType(); + if(type.equals(Datatype.List) || type.equals(Datatype.Set) || type.equals(Datatype.Map)){ + continue; + } + value=type.convert(value); + Utils.setObjectProperty(obj, var.getName(), value); + } + } + + + + @SuppressWarnings({ "unchecked"}) + public void doTest(HttpServletRequest req, HttpServletResponse resp) throws Exception { + String data=req.getParameter("data"); + ObjectMapper mapper=new ObjectMapper(); + List> list=mapper.readValue(data, ArrayList.class); + List variableCategories=mapToVariableCategories(list); + Map facts=new HashMap(); + for(VariableCategory vc:variableCategories){ + String clazz=vc.getClazz(); + Object entity=null; + if(vc.getName().equals(VariableCategory.PARAM_CATEGORY)){ + entity=new HashMap(); + }else{ + entity=new GeneralEntity(clazz); + } + for(Variable var:vc.getVariables()){ + buildObject(entity, var); + } + facts.put(vc,entity); + } + String flowId=req.getParameter("flowId"); + long start=System.currentTimeMillis(); + KnowledgeBase knowledgeBase=(KnowledgeBase)httpSessionKnowledgeCache.get(req, KB_KEY); + if(knowledgeBase==null){ + knowledgeBase=buildKnowledgeBase(req); + } + KnowledgePackage knowledgePackage=knowledgeBase.getKnowledgePackage(); + KnowledgeSession session=KnowledgeSessionFactory.newKnowledgeSession(knowledgePackage); + Map parameters=null; + for(Object obj:facts.values()){ + if(!(obj instanceof GeneralEntity) && (obj instanceof HashMap)){ + parameters=(Map)obj; + }else{ + session.insert(obj); + } + } + ExecutionResponse response=null; + if(StringUtils.isNotEmpty(flowId)){ + if(parameters!=null){ + response=session.startProcess(flowId,parameters); + }else{ + response=session.startProcess(flowId); + } + }else{ + if(parameters==null){ + response=session.fireRules(); + }else{ + response=session.fireRules(parameters); + } + } + for(VariableCategory vc:facts.keySet()){ + Object obj=facts.get(vc); + if(obj==null){ + continue; + } + if(obj instanceof Map && !(obj instanceof GeneralEntity)){ + obj=session.getParameters(); + } + for(Variable var:vc.getVariables()){ + buildVariableValue(obj, var); + } + } + long end=System.currentTimeMillis(); + long elapse=end-start; + session.writeLogFile(); + ExecutionResponseImpl res=(ExecutionResponseImpl)response; + List firedRules=res.getFiredRules(); + List matchedRules=res.getMatchedRules(); + StringBuffer sb=new StringBuffer(); + sb.append("耗时:"+elapse+"ms"); + if(StringUtils.isEmpty(flowId)){ + sb.append(","); + sb.append("匹配的规则共"+matchedRules.size()+"个"); + if(matchedRules.size()>0){ + buildRulesName(matchedRules, sb); + } + sb.append(";"); + sb.append("触发的规则共"+firedRules.size()+"个"); + buildRulesName(firedRules, sb); + } + Map resultMap=new HashMap(); + resultMap.put("info", sb.toString()); + resultMap.put("data", variableCategories); + writeObjectToJson(resp, resultMap); + } + + private void buildObject(Object obj,Variable var){ + String name=var.getName(); + if(name.indexOf(".")!=-1){ + instanceChildObject(obj,name); + } + String defaultValue=var.getDefaultValue(); + if(StringUtils.isBlank(defaultValue)){ + return; + } + Datatype type=var.getType(); + if(type.equals(Datatype.List)){ + Utils.setObjectProperty(obj, name, buildList(defaultValue)); + }else if(type.equals(Datatype.Set)){ + Utils.setObjectProperty(obj, name, buildSet(defaultValue)); + }else if(type.equals(Datatype.Map)){ + return; + }else{ + Object value=type.convert(defaultValue); + Utils.setObjectProperty(obj, name, value); + } + } + + @SuppressWarnings({ "unchecked", "rawtypes" }) + private List buildList(String value){ + try { + List result=new ArrayList(); + ObjectMapper mapper=new ObjectMapper(); + Map map=mapper.readValue(value, HashMap.class); + if(map.containsKey("rows")){ + List list=(List)map.get("rows"); + for(Object obj:list){ + if(obj instanceof Map){ + GeneralEntity entity=new GeneralEntity((String)map.get("type")); + entity.putAll((Map)obj); + result.add(entity); + } + } + return result; + }else{ + return null; + } + } catch (Exception e) { + throw new RuleException(e); + } + } + @SuppressWarnings({ "unchecked", "rawtypes" }) + private Set buildSet(String value){ + try { + Set result=new HashSet(); + ObjectMapper mapper=new ObjectMapper(); + Map map=mapper.readValue(value, HashMap.class); + if(map.containsKey("rows")){ + List list=(List)map.get("rows"); + for(Object obj:list){ + if(obj instanceof Map){ + GeneralEntity entity=new GeneralEntity((String)map.get("type")); + entity.putAll((Map)obj); + result.add(entity); + } + } + return result; + }else{ + return null; + } + } catch (Exception e) { + throw new RuleException(e); + } + } + + private void instanceChildObject(Object obj,String propertyName){ + int pointIndex=propertyName.indexOf("."); + if(pointIndex==-1){ + return; + } + String name=propertyName.substring(0,pointIndex); + propertyName=propertyName.substring(pointIndex+1); + try { + Object instance=PropertyUtils.getProperty(obj, name); + if(instance!=null){ + instanceChildObject(instance,propertyName); + return; + } + Object targetEntity=new GeneralEntity(name); + PropertyUtils.setProperty(obj, name, targetEntity); + instanceChildObject(targetEntity,propertyName); + } catch (Exception e) { + throw new RuleException(e); + } + } + + + private void buildRulesName(List firedRules, StringBuffer sb) { + sb.append(":"); + int i=0; + for(RuleInfo rule:firedRules){ + if(i>0){ + sb.append(","); + } + sb.append(rule.getName()); + i++; + } + } + + private void buildVariableValue(Object object,Variable var){ + String name=var.getName(); + Object value=Utils.getObjectProperty(object, name); + if(value!=null){ + Datatype type=var.getType(); + if(type.equals(Datatype.List) || type.equals(Datatype.Set)){ + //var.setDefaultValue(value.toString()); + }else{ + String str=type.convertObjectToString(value); + var.setDefaultValue(str); + } + } + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + public void setKnowledgeBuilder(KnowledgeBuilder knowledgeBuilder) { + this.knowledgeBuilder = knowledgeBuilder; + } + public void setHttpSessionKnowledgeCache( + HttpSessionKnowledgeCache httpSessionKnowledgeCache) { + this.httpSessionKnowledgeCache = httpSessionKnowledgeCache; + } + + @Override + public String url() { + return "/packageeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/SessionObject.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/SessionObject.java new file mode 100644 index 0000000..ef2b1ee --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/respackage/SessionObject.java @@ -0,0 +1,58 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.respackage; + +import java.util.HashMap; +import java.util.Map; + +/** + * @author Jacky.gao + * @since 2017年8月20日 + */ +public class SessionObject { + private long start; + private static final long MILLISECOND=1200000;//default expired time is 20 minutes. + private Map map=new HashMap(); + public SessionObject() { + this.start=System.currentTimeMillis(); + } + public void put(String key,Object obj){ + this.start=System.currentTimeMillis(); + if(map.containsKey(key)){ + map.remove(key); + } + map.put(key, obj); + } + + public Object get(String key){ + this.start=System.currentTimeMillis(); + return map.get(key); + } + + public void remove(String key){ + this.start=System.currentTimeMillis(); + map.remove(key); + } + + public boolean isExpired(){ + long end=System.currentTimeMillis(); + long value=end-start; + if(value>=MILLISECOND){ + return true; + } + return false; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ruleset/RuleSetServletEditorHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ruleset/RuleSetServletEditorHandler.java new file mode 100644 index 0000000..09e9bcf --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ruleset/RuleSetServletEditorHandler.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.ruleset; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class RuleSetServletEditorHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + file=Utils.decodeURL(file); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/ruleset-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/ruleseteditor"; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scorecard/ScorecardEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scorecard/ScorecardEditorServletHandler.java new file mode 100644 index 0000000..1c1ab7c --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scorecard/ScorecardEditorServletHandler.java @@ -0,0 +1,63 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.scorecard; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年9月18日 + */ +public class ScorecardEditorServletHandler extends RenderPageServletHandler { + + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/scorecard-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + + + @Override + public String url() { + return "/scorecardeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scriptdecisiontable/ScriptDecisiontableEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scriptdecisiontable/ScriptDecisiontableEditorServletHandler.java new file mode 100644 index 0000000..7e39006 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/scriptdecisiontable/ScriptDecisiontableEditorServletHandler.java @@ -0,0 +1,60 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.scriptdecisiontable; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class ScriptDecisiontableEditorServletHandler extends RenderPageServletHandler{ + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/scriptdecisiontable-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + @Override + public String url() { + return "/scriptdecisiontableeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ul/ULEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ul/ULEditorServletHandler.java new file mode 100644 index 0000000..a0adb2a --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/ul/ULEditorServletHandler.java @@ -0,0 +1,113 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.ul; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.framework.rule.builder.ResourceLibraryBuilder; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.framework.rule.dsl.DSLRuleSetBuilder; +import com.itheima.sfbx.framework.rule.model.library.ResourceLibrary; +import com.itheima.sfbx.framework.rule.model.rule.RuleSet; + +/** + * @author Jacky.gao + * @since 2016年8月1日 + */ +public class ULEditorServletHandler extends RenderPageServletHandler{ + private DSLRuleSetBuilder dslRuleSetBuilder; + private ResourceLibraryBuilder resourceLibraryBuilder; + private RepositoryService repositoryService; + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + String file=req.getParameter("file"); + String project = buildProjectNameFromFile(file); + if(project!=null){ + context.put("project", project); + } + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/ul-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + public void loadUL(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String file=req.getParameter("file"); + file=Utils.decodeURL(file); + OutputStream outputStream=resp.getOutputStream(); + String version=req.getParameter("version"); + InputStream inputStream=null; + try{ + if(StringUtils.isEmpty(version)){ + inputStream=repositoryService.readFile(file,null); + }else{ + inputStream=repositoryService.readFile(file,version); + } + IOUtils.copy(inputStream, outputStream); + }catch(Exception ex){ + throw new RuleException(ex); + }finally{ + outputStream.close(); + inputStream.close(); + } + } + public void loadULLibs(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String content = req.getParameter("content"); + RuleSet ruleSet=dslRuleSetBuilder.build(content); + ResourceLibrary library=resourceLibraryBuilder.buildResourceLibrary(ruleSet.getLibraries()); + writeObjectToJson(resp, library); + } + + public void setDslRuleSetBuilder(DSLRuleSetBuilder dslRuleSetBuilder) { + this.dslRuleSetBuilder = dslRuleSetBuilder; + } + public void setResourceLibraryBuilder(ResourceLibraryBuilder resourceLibraryBuilder) { + this.resourceLibraryBuilder = resourceLibraryBuilder; + } + + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + + @Override + public String url() { + return "/uleditor"; + } + +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/variable/VariableEditorServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/variable/VariableEditorServletHandler.java new file mode 100644 index 0000000..f27dc6e --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/variable/VariableEditorServletHandler.java @@ -0,0 +1,129 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.variable; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.servlet.ServletContext; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; +import org.apache.commons.io.IOUtils; +import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; +import org.dom4j.Document; +import org.dom4j.DocumentHelper; +import org.dom4j.Element; + +import com.itheima.sfbx.framework.rule.ClassUtils; +import com.itheima.sfbx.rule.console.servlet.RenderPageServletHandler; +import com.itheima.sfbx.framework.rule.model.library.Datatype; +import com.itheima.sfbx.framework.rule.model.library.variable.Act; +import com.itheima.sfbx.framework.rule.model.library.variable.Variable; + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public class VariableEditorServletHandler extends RenderPageServletHandler { + + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String method=retriveMethod(req); + if(method!=null){ + invokeMethod(method, req, resp); + }else{ + VelocityContext context = new VelocityContext(); + context.put("contextPath", req.getContextPath()); + resp.setContentType("text/html"); + resp.setCharacterEncoding("utf-8"); + Template template=ve.getTemplate("html/variable-editor.html","utf-8"); + PrintWriter writer=resp.getWriter(); + template.merge(context, writer); + writer.close(); + } + } + + public void importXml(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + DiskFileItemFactory factory = new DiskFileItemFactory(); + ServletContext servletContext = req.getSession().getServletContext(); + File repository = (File) servletContext.getAttribute("javax.servlet.context.tempdir"); + factory.setRepository(repository); + ServletFileUpload upload = new ServletFileUpload(factory); + InputStream inputStream=null; + try { + List items = upload.parseRequest(req); + if(items.size()!=1){ + throw new ServletException("Upload xml file is invalid."); + } + FileItem item=items.get(0); + inputStream=item.getInputStream(); + String xmlContent=IOUtils.toString(inputStream, "utf-8"); + List variables=new ArrayList(); + Document doc=DocumentHelper.parseText(xmlContent); + Element root=doc.getRootElement(); + String clazz=root.attributeValue("clazz"); + for(Object obj:root.elements()){ + if(obj==null || !(obj instanceof Element)){ + continue; + } + Element ele=(Element)obj; + Variable var=new Variable(); + var.setAct(Act.InOut); + var.setDefaultValue(ele.attributeValue("defaultValue")); + var.setLabel(ele.attributeValue("label")); + var.setName(ele.attributeValue("name")); + var.setType(Datatype.valueOf(ele.attributeValue("type"))); + variables.add(var); + } + Map result=new HashMap(); + result.put("clazz", clazz); + result.put("variables", variables); + writeObjectToJson(resp, result); + } catch (Exception e) { + throw new ServletException(e); + } finally { + IOUtils.closeQuietly(inputStream); + } + } + + public void generateFields(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String clazz=req.getParameter("clazz"); + try { + List variables=ClassUtils.classToVariables(Class.forName(clazz)); + writeObjectToJson(resp, variables); + } catch (ClassNotFoundException e) { + throw new ServletException(e); + } + } + + + @Override + public String url() { + return "/variableeditor"; + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/xml/XmlServletHandler.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/xml/XmlServletHandler.java new file mode 100644 index 0000000..3be4483 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/console/servlet/xml/XmlServletHandler.java @@ -0,0 +1,174 @@ +/******************************************************************************* + * Copyright 2017 Bstek + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. You may obtain a copy + * of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT + * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the + * License for the specific language governing permissions and limitations under + * the License. + ******************************************************************************/ +package com.itheima.sfbx.rule.console.servlet.xml; + +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.lang.StringUtils; +import org.dom4j.Document; +import org.dom4j.DocumentException; +import org.dom4j.Element; +import org.dom4j.io.SAXReader; +import org.springframework.beans.BeansException; +import org.springframework.context.ApplicationContext; +import org.springframework.context.ApplicationContextAware; + +import com.itheima.sfbx.framework.rule.RuleException; +import com.itheima.sfbx.framework.rule.Utils; +import com.itheima.sfbx.rule.console.repository.RepositoryResourceProvider; +import com.itheima.sfbx.rule.console.repository.RepositoryService; +import com.itheima.sfbx.rule.console.servlet.WriteJsonServletHandler; +import com.itheima.sfbx.framework.rule.model.library.action.ActionLibrary; +import com.itheima.sfbx.framework.rule.model.library.action.SpringBean; +import com.itheima.sfbx.framework.rule.parse.deserializer.ActionLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ConstantLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTableDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.DecisionTreeDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.Deserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ParameterLibraryDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.RuleSetDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.ScriptDecisionTableDeserializer; +import com.itheima.sfbx.framework.rule.parse.deserializer.VariableLibraryDeserializer; +import com.itheima.sfbx.framework.rule.runtime.BuiltInActionLibraryBuilder; + +/** + * @author Jacky.gao + * @since 2016年6月3日 + */ +public class XmlServletHandler extends WriteJsonServletHandler implements ApplicationContextAware{ + private RepositoryService repositoryService; + private BuiltInActionLibraryBuilder builtInActionLibraryBuilder; + protected List> deserializers=new ArrayList>(); + @Override + public void execute(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + String methodName=retriveMethod(req); + if(methodName!=null){ + invokeMethod(methodName, req, resp); + }else{ + //default load xml + loadXml(req, resp); + } + } + + public void loadXml(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { + List result=new ArrayList(); + String files=req.getParameter("files"); + boolean isaction=false; + if(files!=null){ + if(files.startsWith("builtinactions")){ + isaction=true; + }else{ + files=Utils.decodeURL(files); + String[] paths=files.split(";"); + for(String path:paths){ + path=Utils.toUTF8(path); + if(path.startsWith(RepositoryResourceProvider.JCR)){ + path=path.substring(4,path.length()); + } + String[] subpaths=path.split(","); + path=subpaths[0]; + String version=null; + if(subpaths.length==2){ + version=subpaths[1]; + } + try{ + InputStream inputStream=null; + if(StringUtils.isEmpty(version)){ + inputStream=repositoryService.readFile(path,null); + }else{ + inputStream=repositoryService.readFile(path,version); + } + try{ + Element element=parseXml(inputStream); + for(Deserializer des:deserializers){ + if(des.support(element)){ + result.add(des.deserialize(element)); + if(des instanceof ActionLibraryDeserializer){ + isaction=true; + } + break; + } + } + }finally{ + inputStream.close(); + } + }catch(Exception ex){ + throw new RuleException(ex); + } + } + } + } + if(isaction){ + List beans=builtInActionLibraryBuilder.getBuiltInActions(); + if(beans.size()>0){ + ActionLibrary al=new ActionLibrary(); + al.setSpringBeans(beans); + result.add(al); + } + } + writeObjectToJson(resp,result); + } + + protected Element parseXml(InputStream stream){ + SAXReader reader=new SAXReader(); + Document document; + try { + document = reader.read(stream); + Element root=document.getRootElement(); + return root; + } catch (DocumentException e) { + throw new RuleException(e); + } + } + + @Override + public String url() { + return "/xml"; + } + + public void setBuiltInActionLibraryBuilder( + BuiltInActionLibraryBuilder builtInActionLibraryBuilder) { + this.builtInActionLibraryBuilder = builtInActionLibraryBuilder; + } + public void setRepositoryService(RepositoryService repositoryService) { + this.repositoryService = repositoryService; + } + public void setApplicationContext(ApplicationContext applicationContext)throws BeansException { + ActionLibraryDeserializer actionLibraryDeserializer=(ActionLibraryDeserializer)applicationContext.getBean(ActionLibraryDeserializer.BEAN_ID); + VariableLibraryDeserializer variableLibraryDeserializer=(VariableLibraryDeserializer)applicationContext.getBean(VariableLibraryDeserializer.BEAN_ID); + ConstantLibraryDeserializer constantLibraryDeserializer=(ConstantLibraryDeserializer)applicationContext.getBean(ConstantLibraryDeserializer.BEAN_ID); + RuleSetDeserializer ruleSetDeserializer=(RuleSetDeserializer)applicationContext.getBean(RuleSetDeserializer.BEAN_ID); + DecisionTableDeserializer decisionTableDeserializer=(DecisionTableDeserializer)applicationContext.getBean(DecisionTableDeserializer.BEAN_ID); + ScriptDecisionTableDeserializer scriptDecisionTableDeserializer=(ScriptDecisionTableDeserializer)applicationContext.getBean(ScriptDecisionTableDeserializer.BEAN_ID); + DecisionTreeDeserializer decisionTreeDeserializer=(DecisionTreeDeserializer)applicationContext.getBean(DecisionTreeDeserializer.BEAN_ID); + ParameterLibraryDeserializer parameterLibraryDeserializer=(ParameterLibraryDeserializer)applicationContext.getBean(ParameterLibraryDeserializer.BEAN_ID); + deserializers.add(actionLibraryDeserializer); + deserializers.add(variableLibraryDeserializer); + deserializers.add(constantLibraryDeserializer); + deserializers.add(ruleSetDeserializer); + deserializers.add(decisionTableDeserializer); + deserializers.add(scriptDecisionTableDeserializer); + deserializers.add(decisionTreeDeserializer); + deserializers.add(parameterLibraryDeserializer); + } +} diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/ApplicantInfo.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/ApplicantInfo.java new file mode 100644 index 0000000..f2870dd --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/ApplicantInfo.java @@ -0,0 +1,51 @@ +package com.itheima.sfbx.rule.dto; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +/** + * ApplicantInfo + * + * @author: wgl + * @describe: 申请人信息 + * @date: 2022/12/28 10:10 + */ +@Data +public class ApplicantInfo { + + @Label("用户id") + private String id; + + @Label("申请人姓名") + private String name; + + @Label("身份证号") + private String idCard; + + @Label("年龄") + private int age = 0; + + @Label("收入") + private BigDecimal income = BigDecimal.ZERO; + + @Label("职业") + private String jobNo; + + @Label("常驻城市") + private String cityNo; + + @Label("子女数量") + private int childNum; + + @Label("赡养父母数量") + private int supportingParents; + + @Label("风险结果") + private List risks; + + @Label("风险项结果") + private List riskItem; +} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/advice/AdviceHealthDTO.java b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/advice/AdviceHealthDTO.java new file mode 100644 index 0000000..9529700 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/java/com/itheima/sfbx/rule/dto/advice/AdviceHealthDTO.java @@ -0,0 +1,40 @@ +package com.itheima.sfbx.rule.dto.advice; + +import com.itheima.sfbx.framework.rule.model.Label; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +/** + * AdviceHealthDTO + * + * @author: wgl + * @describe: 健康检查传输对象 + * @date: 2022/12/28 10:10 + */ +@Data +public class AdviceHealthDTO { + + @Label("保险") + private String insuranceId; + + @Label("用户id") + private String userId; + + @Label("疾病列表") + private List sickKey = new ArrayList<>(); + + //key 问卷唯一标识 value 用户提交选项内容 + @Label("问卷列表") + private Map questions; + + @Label("问卷结果") + private List sicks = new ArrayList<>(); + + @Label("初筛结果") + private Boolean result = true; + +} + diff --git a/day02/sfbx-rule/rule-web/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/day02/sfbx-rule/rule-web/src/main/resources/META-INF/additional-spring-configuration-metadata.json new file mode 100644 index 0000000..2d80ebe --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -0,0 +1,17 @@ +{"properties": [ + { + "name": "urule.repository.databasetype", + "type": "java.lang.String", + "description": "A description for 'urule.repository.databasetype'" + }, + { + "name": "urule.repository.databasetype", + "type": "java.lang.String", + "description": "A description for 'urule.repository.databasetype'" + }, + { + "name": "urule.repository.xml", + "type": "java.lang.String", + "description": "A description for 'urule.repository.xml'" + } +]} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/application.properties b/day02/sfbx-rule/rule-web/src/main/resources/application.properties new file mode 100644 index 0000000..cc822cf --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/application.properties @@ -0,0 +1,29 @@ +debug=false +server.port=8090 + +spring.main.allow-circular-references=true + +#spring.datasource.type=org.apache.tomcat.jdbc.pool.DataSource +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +#spring.datasource.url=jdbc:mysql://rm-2zez3rxueq847dh57vo.mysql.rds.aliyuncs.com/urule-demo?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false +spring.datasource.url=jdbc:mysql://192.168.12.129:3306/urule-sf?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false +spring.datasource.username=root +spring.datasource.password=pass +spring.datasource.druid.initial-size=5 +spring.datasource.druid.max-active=10 +spring.datasource.druid.min-idle=5 +spring.datasource.druid.max-wait=60000 +spring.datasource.druid.validation-query=SELECT 1 +spring.datasource.druid.validation-query-timeout=6000 +spring.datasource.druid.test-on-borrow=false +spring.datasource.druid.test-on-return=false +spring.datasource.druid.test-while-idle=true +spring.datasource.druid.pool-prepared-statements=true +spring.datasource.druid.max-pool-prepared-statement-per-connection-size=20 +spring.datasource.druid.time-between-eviction-runs-millis=60000 +spring.datasource.druid.min-evictable-idle-time-millis=100000 + + +urule.repository.databasetype=mysql +urule.repository.datasourcename=dataSource diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/action-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/action-editor.html new file mode 100644 index 0000000..c21fd78 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/action-editor.html @@ -0,0 +1,17 @@ + + + + +动作编辑器 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/client-config-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/client-config-editor.html new file mode 100644 index 0000000..d415716 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/client-config-editor.html @@ -0,0 +1,17 @@ + + + + +客户端推送配置 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/console.html b/day02/sfbx-rule/rule-web/src/main/resources/html/console.html new file mode 100644 index 0000000..0b25ed9 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/console.html @@ -0,0 +1,11 @@ + + + + +${title} + + +${msg} + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/constant-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/constant-editor.html new file mode 100644 index 0000000..07d28fd --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/constant-editor.html @@ -0,0 +1,17 @@ + + + + +常量编辑器 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontable-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontable-editor.html new file mode 100644 index 0000000..198e225 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontable-editor.html @@ -0,0 +1,18 @@ + + + + +决策表编辑器 + + + + +
+
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontree-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontree-editor.html new file mode 100644 index 0000000..3a45d14 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/decisiontree-editor.html @@ -0,0 +1,18 @@ + + + + +决策树编辑器 + + + + +
+
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/frame.html b/day02/sfbx-rule/rule-web/src/main/resources/html/frame.html new file mode 100644 index 0000000..149eeb3 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/frame.html @@ -0,0 +1,19 @@ + + + + +${title} + + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/package-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/package-editor.html new file mode 100644 index 0000000..e151e33 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/package-editor.html @@ -0,0 +1,18 @@ + + + + +知识包编辑器 + + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/parameter-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/parameter-editor.html new file mode 100644 index 0000000..4b01cab --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/parameter-editor.html @@ -0,0 +1,17 @@ + + + + +参数编辑器 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/permission-config-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/permission-config-editor.html new file mode 100644 index 0000000..247bbf7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/permission-config-editor.html @@ -0,0 +1,17 @@ + + + + +权限配置 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/rete-diagram.html b/day02/sfbx-rule/rule-web/src/main/resources/html/rete-diagram.html new file mode 100644 index 0000000..1f249e6 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/rete-diagram.html @@ -0,0 +1,24 @@ + + + + + + +RETE树展示 + + + + + + + +
+ + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/rule-flow-designer.html b/day02/sfbx-rule/rule-web/src/main/resources/html/rule-flow-designer.html new file mode 100644 index 0000000..4232af7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/rule-flow-designer.html @@ -0,0 +1,17 @@ + + + + +决策流设计器 + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/ruleset-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/ruleset-editor.html new file mode 100644 index 0000000..929b9d4 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/ruleset-editor.html @@ -0,0 +1,19 @@ + + + + +决策集编辑器 + + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/scorecard-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/scorecard-editor.html new file mode 100644 index 0000000..d2b71da --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/scorecard-editor.html @@ -0,0 +1,21 @@ + + + + +评分卡编辑器 + + + + + +
+
+
+
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/scriptdecisiontable-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/scriptdecisiontable-editor.html new file mode 100644 index 0000000..33242cd --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/scriptdecisiontable-editor.html @@ -0,0 +1,18 @@ + + + + +脚本式决策表编辑器 + + + + +
+
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/ul-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/ul-editor.html new file mode 100644 index 0000000..efef844 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/ul-editor.html @@ -0,0 +1,19 @@ + + + + +脚本编辑器 + + + + +
+ +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/html/variable-editor.html b/day02/sfbx-rule/rule-web/src/main/resources/html/variable-editor.html new file mode 100644 index 0000000..ca8f880 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/html/variable-editor.html @@ -0,0 +1,17 @@ + + + + +变量编辑器 + + + + + +
+ + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/logback.xml b/day02/sfbx-rule/rule-web/src/main/resources/logback.xml new file mode 100644 index 0000000..3c9b558 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/logback.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + ${CONSOLE_LOG_PATTERN} + UTF-8 + + + + + + + + + + + DEBUG + ACCEPT + DENY + + + + ${LOG_HOME}/rule-web.log.%d{yyyy-MM-dd}.log + + 30 + + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + + + + 10MB + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/mysql.xml b/day02/sfbx-rule/rule-web/src/main/resources/mysql.xml new file mode 100644 index 0000000..27dd6e7 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/mysql.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css new file mode 100644 index 0000000..206e287 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css @@ -0,0 +1,6 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:0 0!important;-webkit-box-shadow:none!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="javascript:"]:after,a[href^="#"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:'Glyphicons Halflings';src:url(../fonts/glyphicons-halflings-regular.eot);src:url(../fonts/glyphicons-halflings-regular.eot?#iefix) format('embedded-opentype'),url(../fonts/glyphicons-halflings-regular.woff2) format('woff2'),url(../fonts/glyphicons-halflings-regular.woff) format('woff'),url(../fonts/glyphicons-halflings-regular.ttf) format('truetype'),url(../fonts/glyphicons-halflings-regular.svg#glyphicons_halflingsregular) format('svg')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:'Glyphicons Halflings';font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"\002a"}.glyphicon-plus:before{content:"\002b"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\20ac"}.glyphicon-minus:before{content:"\2212"}.glyphicon-cloud:before{content:"\2601"}.glyphicon-envelope:before{content:"\2709"}.glyphicon-pencil:before{content:"\270f"}.glyphicon-glass:before{content:"\e001"}.glyphicon-music:before{content:"\e002"}.glyphicon-search:before{content:"\e003"}.glyphicon-heart:before{content:"\e005"}.glyphicon-star:before{content:"\e006"}.glyphicon-star-empty:before{content:"\e007"}.glyphicon-user:before{content:"\e008"}.glyphicon-film:before{content:"\e009"}.glyphicon-th-large:before{content:"\e010"}.glyphicon-th:before{content:"\e011"}.glyphicon-th-list:before{content:"\e012"}.glyphicon-ok:before{content:"\e013"}.glyphicon-remove:before{content:"\e014"}.glyphicon-zoom-in:before{content:"\e015"}.glyphicon-zoom-out:before{content:"\e016"}.glyphicon-off:before{content:"\e017"}.glyphicon-signal:before{content:"\e018"}.glyphicon-cog:before{content:"\e019"}.glyphicon-trash:before{content:"\e020"}.glyphicon-home:before{content:"\e021"}.glyphicon-file:before{content:"\e022"}.glyphicon-time:before{content:"\e023"}.glyphicon-road:before{content:"\e024"}.glyphicon-download-alt:before{content:"\e025"}.glyphicon-download:before{content:"\e026"}.glyphicon-upload:before{content:"\e027"}.glyphicon-inbox:before{content:"\e028"}.glyphicon-play-circle:before{content:"\e029"}.glyphicon-repeat:before{content:"\e030"}.glyphicon-refresh:before{content:"\e031"}.glyphicon-list-alt:before{content:"\e032"}.glyphicon-lock:before{content:"\e033"}.glyphicon-flag:before{content:"\e034"}.glyphicon-headphones:before{content:"\e035"}.glyphicon-volume-off:before{content:"\e036"}.glyphicon-volume-down:before{content:"\e037"}.glyphicon-volume-up:before{content:"\e038"}.glyphicon-qrcode:before{content:"\e039"}.glyphicon-barcode:before{content:"\e040"}.glyphicon-tag:before{content:"\e041"}.glyphicon-tags:before{content:"\e042"}.glyphicon-book:before{content:"\e043"}.glyphicon-bookmark:before{content:"\e044"}.glyphicon-print:before{content:"\e045"}.glyphicon-camera:before{content:"\e046"}.glyphicon-font:before{content:"\e047"}.glyphicon-bold:before{content:"\e048"}.glyphicon-italic:before{content:"\e049"}.glyphicon-text-height:before{content:"\e050"}.glyphicon-text-width:before{content:"\e051"}.glyphicon-align-left:before{content:"\e052"}.glyphicon-align-center:before{content:"\e053"}.glyphicon-align-right:before{content:"\e054"}.glyphicon-align-justify:before{content:"\e055"}.glyphicon-list:before{content:"\e056"}.glyphicon-indent-left:before{content:"\e057"}.glyphicon-indent-right:before{content:"\e058"}.glyphicon-facetime-video:before{content:"\e059"}.glyphicon-picture:before{content:"\e060"}.glyphicon-map-marker:before{content:"\e062"}.glyphicon-adjust:before{content:"\e063"}.glyphicon-tint:before{content:"\e064"}.glyphicon-edit:before{content:"\e065"}.glyphicon-share:before{content:"\e066"}.glyphicon-check:before{content:"\e067"}.glyphicon-move:before{content:"\e068"}.glyphicon-step-backward:before{content:"\e069"}.glyphicon-fast-backward:before{content:"\e070"}.glyphicon-backward:before{content:"\e071"}.glyphicon-play:before{content:"\e072"}.glyphicon-pause:before{content:"\e073"}.glyphicon-stop:before{content:"\e074"}.glyphicon-forward:before{content:"\e075"}.glyphicon-fast-forward:before{content:"\e076"}.glyphicon-step-forward:before{content:"\e077"}.glyphicon-eject:before{content:"\e078"}.glyphicon-chevron-left:before{content:"\e079"}.glyphicon-chevron-right:before{content:"\e080"}.glyphicon-plus-sign:before{content:"\e081"}.glyphicon-minus-sign:before{content:"\e082"}.glyphicon-remove-sign:before{content:"\e083"}.glyphicon-ok-sign:before{content:"\e084"}.glyphicon-question-sign:before{content:"\e085"}.glyphicon-info-sign:before{content:"\e086"}.glyphicon-screenshot:before{content:"\e087"}.glyphicon-remove-circle:before{content:"\e088"}.glyphicon-ok-circle:before{content:"\e089"}.glyphicon-ban-circle:before{content:"\e090"}.glyphicon-arrow-left:before{content:"\e091"}.glyphicon-arrow-right:before{content:"\e092"}.glyphicon-arrow-up:before{content:"\e093"}.glyphicon-arrow-down:before{content:"\e094"}.glyphicon-share-alt:before{content:"\e095"}.glyphicon-resize-full:before{content:"\e096"}.glyphicon-resize-small:before{content:"\e097"}.glyphicon-exclamation-sign:before{content:"\e101"}.glyphicon-gift:before{content:"\e102"}.glyphicon-leaf:before{content:"\e103"}.glyphicon-fire:before{content:"\e104"}.glyphicon-eye-open:before{content:"\e105"}.glyphicon-eye-close:before{content:"\e106"}.glyphicon-warning-sign:before{content:"\e107"}.glyphicon-plane:before{content:"\e108"}.glyphicon-calendar:before{content:"\e109"}.glyphicon-random:before{content:"\e110"}.glyphicon-comment:before{content:"\e111"}.glyphicon-magnet:before{content:"\e112"}.glyphicon-chevron-up:before{content:"\e113"}.glyphicon-chevron-down:before{content:"\e114"}.glyphicon-retweet:before{content:"\e115"}.glyphicon-shopping-cart:before{content:"\e116"}.glyphicon-folder-close:before{content:"\e117"}.glyphicon-folder-open:before{content:"\e118"}.glyphicon-resize-vertical:before{content:"\e119"}.glyphicon-resize-horizontal:before{content:"\e120"}.glyphicon-hdd:before{content:"\e121"}.glyphicon-bullhorn:before{content:"\e122"}.glyphicon-bell:before{content:"\e123"}.glyphicon-certificate:before{content:"\e124"}.glyphicon-thumbs-up:before{content:"\e125"}.glyphicon-thumbs-down:before{content:"\e126"}.glyphicon-hand-right:before{content:"\e127"}.glyphicon-hand-left:before{content:"\e128"}.glyphicon-hand-up:before{content:"\e129"}.glyphicon-hand-down:before{content:"\e130"}.glyphicon-circle-arrow-right:before{content:"\e131"}.glyphicon-circle-arrow-left:before{content:"\e132"}.glyphicon-circle-arrow-up:before{content:"\e133"}.glyphicon-circle-arrow-down:before{content:"\e134"}.glyphicon-globe:before{content:"\e135"}.glyphicon-wrench:before{content:"\e136"}.glyphicon-tasks:before{content:"\e137"}.glyphicon-filter:before{content:"\e138"}.glyphicon-briefcase:before{content:"\e139"}.glyphicon-fullscreen:before{content:"\e140"}.glyphicon-dashboard:before{content:"\e141"}.glyphicon-paperclip:before{content:"\e142"}.glyphicon-heart-empty:before{content:"\e143"}.glyphicon-link:before{content:"\e144"}.glyphicon-phone:before{content:"\e145"}.glyphicon-pushpin:before{content:"\e146"}.glyphicon-usd:before{content:"\e148"}.glyphicon-gbp:before{content:"\e149"}.glyphicon-sort:before{content:"\e150"}.glyphicon-sort-by-alphabet:before{content:"\e151"}.glyphicon-sort-by-alphabet-alt:before{content:"\e152"}.glyphicon-sort-by-order:before{content:"\e153"}.glyphicon-sort-by-order-alt:before{content:"\e154"}.glyphicon-sort-by-attributes:before{content:"\e155"}.glyphicon-sort-by-attributes-alt:before{content:"\e156"}.glyphicon-unchecked:before{content:"\e157"}.glyphicon-expand:before{content:"\e158"}.glyphicon-collapse-down:before{content:"\e159"}.glyphicon-collapse-up:before{content:"\e160"}.glyphicon-log-in:before{content:"\e161"}.glyphicon-flash:before{content:"\e162"}.glyphicon-log-out:before{content:"\e163"}.glyphicon-new-window:before{content:"\e164"}.glyphicon-record:before{content:"\e165"}.glyphicon-save:before{content:"\e166"}.glyphicon-open:before{content:"\e167"}.glyphicon-saved:before{content:"\e168"}.glyphicon-import:before{content:"\e169"}.glyphicon-export:before{content:"\e170"}.glyphicon-send:before{content:"\e171"}.glyphicon-floppy-disk:before{content:"\e172"}.glyphicon-floppy-saved:before{content:"\e173"}.glyphicon-floppy-remove:before{content:"\e174"}.glyphicon-floppy-save:before{content:"\e175"}.glyphicon-floppy-open:before{content:"\e176"}.glyphicon-credit-card:before{content:"\e177"}.glyphicon-transfer:before{content:"\e178"}.glyphicon-cutlery:before{content:"\e179"}.glyphicon-header:before{content:"\e180"}.glyphicon-compressed:before{content:"\e181"}.glyphicon-earphone:before{content:"\e182"}.glyphicon-phone-alt:before{content:"\e183"}.glyphicon-tower:before{content:"\e184"}.glyphicon-stats:before{content:"\e185"}.glyphicon-sd-video:before{content:"\e186"}.glyphicon-hd-video:before{content:"\e187"}.glyphicon-subtitles:before{content:"\e188"}.glyphicon-sound-stereo:before{content:"\e189"}.glyphicon-sound-dolby:before{content:"\e190"}.glyphicon-sound-5-1:before{content:"\e191"}.glyphicon-sound-6-1:before{content:"\e192"}.glyphicon-sound-7-1:before{content:"\e193"}.glyphicon-copyright-mark:before{content:"\e194"}.glyphicon-registration-mark:before{content:"\e195"}.glyphicon-cloud-download:before{content:"\e197"}.glyphicon-cloud-upload:before{content:"\e198"}.glyphicon-tree-conifer:before{content:"\e199"}.glyphicon-tree-deciduous:before{content:"\e200"}.glyphicon-cd:before{content:"\e201"}.glyphicon-save-file:before{content:"\e202"}.glyphicon-open-file:before{content:"\e203"}.glyphicon-level-up:before{content:"\e204"}.glyphicon-copy:before{content:"\e205"}.glyphicon-paste:before{content:"\e206"}.glyphicon-alert:before{content:"\e209"}.glyphicon-equalizer:before{content:"\e210"}.glyphicon-king:before{content:"\e211"}.glyphicon-queen:before{content:"\e212"}.glyphicon-pawn:before{content:"\e213"}.glyphicon-bishop:before{content:"\e214"}.glyphicon-knight:before{content:"\e215"}.glyphicon-baby-formula:before{content:"\e216"}.glyphicon-tent:before{content:"\26fa"}.glyphicon-blackboard:before{content:"\e218"}.glyphicon-bed:before{content:"\e219"}.glyphicon-apple:before{content:"\f8ff"}.glyphicon-erase:before{content:"\e221"}.glyphicon-hourglass:before{content:"\231b"}.glyphicon-lamp:before{content:"\e223"}.glyphicon-duplicate:before{content:"\e224"}.glyphicon-piggy-bank:before{content:"\e225"}.glyphicon-scissors:before{content:"\e226"}.glyphicon-bitcoin:before{content:"\e227"}.glyphicon-btc:before{content:"\e227"}.glyphicon-xbt:before{content:"\e227"}.glyphicon-yen:before{content:"\00a5"}.glyphicon-jpy:before{content:"\00a5"}.glyphicon-ruble:before{content:"\20bd"}.glyphicon-rub:before{content:"\20bd"}.glyphicon-scale:before{content:"\e230"}.glyphicon-ice-lolly:before{content:"\e231"}.glyphicon-ice-lolly-tasted:before{content:"\e232"}.glyphicon-education:before{content:"\e233"}.glyphicon-option-horizontal:before{content:"\e234"}.glyphicon-option-vertical:before{content:"\e235"}.glyphicon-menu-hamburger:before{content:"\e236"}.glyphicon-modal-window:before{content:"\e237"}.glyphicon-oil:before{content:"\e238"}.glyphicon-grain:before{content:"\e239"}.glyphicon-sunglasses:before{content:"\e240"}.glyphicon-text-size:before{content:"\e241"}.glyphicon-text-color:before{content:"\e242"}.glyphicon-text-background:before{content:"\e243"}.glyphicon-object-align-top:before{content:"\e244"}.glyphicon-object-align-bottom:before{content:"\e245"}.glyphicon-object-align-horizontal:before{content:"\e246"}.glyphicon-object-align-left:before{content:"\e247"}.glyphicon-object-align-vertical:before{content:"\e248"}.glyphicon-object-align-right:before{content:"\e249"}.glyphicon-triangle-right:before{content:"\e250"}.glyphicon-triangle-left:before{content:"\e251"}.glyphicon-triangle-bottom:before{content:"\e252"}.glyphicon-triangle-top:before{content:"\e253"}.glyphicon-console:before{content:"\e254"}.glyphicon-superscript:before{content:"\e255"}.glyphicon-subscript:before{content:"\e256"}.glyphicon-menu-left:before{content:"\e257"}.glyphicon-menu-right:before{content:"\e258"}.glyphicon-menu-down:before{content:"\e259"}.glyphicon-menu-up:before{content:"\e260"}*{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail a>img,.thumbnail>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-unstyled{padding-left:0;list-style:none}.list-inline{padding-left:0;margin-left:-5px;list-style:none}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:'\2014 \00A0'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:''}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:'\00A0 \2014'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,"Courier New",monospace}code{padding:2px 4px;font-size:90%;color:#c7254e;background-color:#f9f2f4;border-radius:4px}kbd{padding:2px 4px;font-size:90%;color:#fff;background-color:#333;border-radius:3px;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.25);box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;-webkit-box-shadow:none;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-10,.col-xs-11,.col-xs-12,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-10,.col-sm-11,.col-sm-12,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-10,.col-md-11,.col-md-12,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-10,.col-lg-11,.col-lg-12,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777;text-align:left}th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered{border:1px solid #ddd}.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border:0;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=file]:focus,input[type=checkbox]:focus,input[type=radio]:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{display:block;padding-top:7px;font-size:14px;line-height:1.42857143;color:#555}.form-control{display:block;width:100%;height:34px;padding:6px 12px;font-size:14px;line-height:1.42857143;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s;-o-transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s;transition:border-color ease-in-out .15s,box-shadow ease-in-out .15s}.form-control:focus{border-color:#66afe9;outline:0;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=time].form-control,input[type=datetime-local].form-control,input[type=month].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=time],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],input[type=date].input-sm,input[type=time].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=time],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],input[type=date].input-lg,input[type=time].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox input[type=checkbox],.checkbox-inline input[type=checkbox],.radio input[type=radio],.radio-inline input[type=radio]{position:absolute;margin-top:4px\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.checkbox-inline.disabled,.radio-inline.disabled,fieldset[disabled] .checkbox-inline,fieldset[disabled] .radio-inline{cursor:not-allowed}.checkbox.disabled label,.radio.disabled label,fieldset[disabled] .checkbox label,fieldset[disabled] .radio label{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.checkbox label,.has-success.checkbox-inline label,.has-success.radio label,.has-success.radio-inline label{color:#3c763d}.has-success .form-control{border-color:#3c763d;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.checkbox label,.has-warning.checkbox-inline label,.has-warning.radio label,.has-warning.radio-inline label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.checkbox label,.has-error.checkbox-inline label,.has-error.radio label,.has-error.radio-inline label{color:#a94442}.has-error .form-control{border-color:#a94442;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:thin dotted;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);-webkit-box-shadow:none;box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default:hover{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{position:relative;font-size:0;white-space:nowrap}.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li{position:relative;display:block}.nav>li>a{position:relative;display:block;padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;-webkit-box-shadow:none;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px 15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container .navbar-brand,.navbar>.container-fluid .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;-webkit-box-shadow:none;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin-top:8px;margin-right:-15px;margin-bottom:8px;margin-left:-15px;border-top:1px solid transparent;border-bottom:1px solid transparent;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 1px 0 rgba(255,255,255,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;-webkit-box-shadow:none;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\00a0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;color:inherit;background-color:#eee}.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container .jumbotron,.container-fluid .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container .jumbotron,.container-fluid .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;-o-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail a>img,.thumbnail>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1);box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.05);box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px;color:inherit}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.list-group+.panel-footer{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table caption,.panel>.table-responsive>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.05);box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:0 0;border:0}.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;overflow:auto;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;-o-transition:-o-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translate(0,-25%);-ms-transform:translate(0,-25%);-o-transform:translate(0,-25%);transform:translate(0,-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0,0);-ms-transform:translate(0,0);-o-transform:translate(0,0);transform:translate(0,0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;-webkit-box-shadow:0 3px 9px rgba(0,0,0,.5);box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{-webkit-box-shadow:0 5px 15px rgba(0,0,0,.5);box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px;bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{bottom:0;left:5px;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;-webkit-background-clip:padding-box;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel{position:relative}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media all and (transform-3d),(-webkit-transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;-o-transition:-o-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:rgba(0,0,0,0);filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(to right,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-o-linear-gradient(left,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(to right,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5) 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:'\2039'}.carousel-control .icon-next:before{content:'\203a'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\9;background-color:rgba(0,0,0,0);border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-md,.visible-sm,.visible-xs{display:none!important}.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}} +/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css.map b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css.map new file mode 100644 index 0000000..5f49bb3 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrap.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["less/normalize.less","less/print.less","bootstrap.css","dist/css/bootstrap.css","less/glyphicons.less","less/scaffolding.less","less/mixins/vendor-prefixes.less","less/mixins/tab-focus.less","less/mixins/image.less","less/type.less","less/mixins/text-emphasis.less","less/mixins/background-variant.less","less/mixins/text-overflow.less","less/code.less","less/grid.less","less/mixins/grid.less","less/mixins/grid-framework.less","less/tables.less","less/mixins/table-row.less","less/forms.less","less/mixins/forms.less","less/buttons.less","less/mixins/buttons.less","less/mixins/opacity.less","less/component-animations.less","less/dropdowns.less","less/mixins/nav-divider.less","less/mixins/reset-filter.less","less/button-groups.less","less/mixins/border-radius.less","less/input-groups.less","less/navs.less","less/navbar.less","less/mixins/nav-vertical-align.less","less/utilities.less","less/breadcrumbs.less","less/pagination.less","less/mixins/pagination.less","less/pager.less","less/labels.less","less/mixins/labels.less","less/badges.less","less/jumbotron.less","less/thumbnails.less","less/alerts.less","less/mixins/alerts.less","less/progress-bars.less","less/mixins/gradients.less","less/mixins/progress-bar.less","less/media.less","less/list-group.less","less/mixins/list-group.less","less/panels.less","less/mixins/panels.less","less/responsive-embed.less","less/wells.less","less/close.less","less/modals.less","less/tooltip.less","less/mixins/reset-text.less","less/popovers.less","less/carousel.less","less/mixins/clearfix.less","less/mixins/center-block.less","less/mixins/hide-text.less","less/responsive-utilities.less","less/mixins/responsive-visibility.less"],"names":[],"mappings":";;;;4EAQA,KACE,YAAA,WACA,yBAAA,KACA,qBAAA,KAOF,KACE,OAAA,EAaF,QAAA,MAAA,QAAA,WAAA,OAAA,OAAA,OAAA,OAAA,KAAA,KAAA,IAAA,QAAA,QAaE,QAAA,MAQF,MAAA,OAAA,SAAA,MAIE,QAAA,aACA,eAAA,SAQF,sBACE,QAAA,KACA,OAAA,EAQF,SAAA,SAEE,QAAA,KAUF,EACE,iBAAA,YAQF,SAAA,QAEE,QAAA,EAUF,YACE,cAAA,IAAA,OAOF,EAAA,OAEE,YAAA,IAOF,IACE,WAAA,OAQF,GACE,OAAA,MAAA,EACA,UAAA,IAOF,KACE,MAAA,KACA,WAAA,KAOF,MACE,UAAA,IAOF,IAAA,IAEE,SAAA,SACA,UAAA,IACA,YAAA,EACA,eAAA,SAGF,IACE,IAAA,MAGF,IACE,OAAA,OAUF,IACE,OAAA,EAOF,eACE,SAAA,OAUF,OACE,OAAA,IAAA,KAOF,GACE,OAAA,EAAA,mBAAA,YAAA,gBAAA,YACA,WAAA,YAOF,IACE,SAAA,KAOF,KAAA,IAAA,IAAA,KAIE,YAAA,UAAA,UACA,UAAA,IAkBF,OAAA,MAAA,SAAA,OAAA,SAKE,OAAA,EACA,KAAA,QACA,MAAA,QAOF,OACE,SAAA,QAUF,OAAA,OAEE,eAAA,KAWF,OAAA,wBAAA,kBAAA,mBAIE,mBAAA,OACA,OAAA,QAOF,iBAAA,qBAEE,OAAA,QAOF,yBAAA,wBAEE,QAAA,EACA,OAAA,EAQF,MACE,YAAA,OAWF,qBAAA,kBAEE,mBAAA,WAAA,gBAAA,WAAA,WAAA,WACA,QAAA,EASF,8CAAA,8CAEE,OAAA,KAQF,mBACE,mBAAA,YACA,gBAAA,YAAA,WAAA,YAAA,mBAAA,UASF,iDAAA,8CAEE,mBAAA,KAOF,SACE,QAAA,MAAA,OAAA,MACA,OAAA,EAAA,IACA,OAAA,IAAA,MAAA,OAQF,OACE,QAAA,EACA,OAAA,EAOF,SACE,SAAA,KAQF,SACE,YAAA,IAUF,MACE,eAAA,EACA,gBAAA,SAGF,GAAA,GAEE,QAAA,uFCjUF,aA7FI,EAAA,OAAA,QAGI,MAAA,eACA,YAAA,eACA,WAAA,cAAA,mBAAA,eACA,WAAA,eAGJ,EAAA,UAEI,gBAAA,UAGJ,cACI,QAAA,KAAA,WAAA,IAGJ,kBACI,QAAA,KAAA,YAAA,IAKJ,6BAAA,mBAEI,QAAA,GAGJ,WAAA,IAEI,OAAA,IAAA,MAAA,KC4KL,kBAAA,MDvKK,MC0KL,QAAA,mBDrKK,IE8KN,GDLC,kBAAA,MDrKK,ICwKL,UAAA,eCUD,GF5KM,GE2KN,EF1KM,QAAA,ECuKL,OAAA,ECSD,GF3KM,GCsKL,iBAAA,MD/JK,QCkKL,QAAA,KCSD,YFtKU,oBCiKT,iBAAA,eD7JK,OCgKL,OAAA,IAAA,MAAA,KD5JK,OC+JL,gBAAA,mBCSD,UFpKU,UC+JT,iBAAA,eDzJS,mBEkKV,mBDLC,OAAA,IAAA,MAAA,gBEjPD,WACA,YAAA,uBFsPD,IAAA,+CE7OC,IAAK,sDAAuD,4BAA6B,iDAAkD,gBAAiB,gDAAiD,eAAgB,+CAAgD,mBAAoB,2EAA4E,cAE7W,WACA,SAAA,SACA,IAAA,IACA,QAAA,aACA,YAAA,uBACA,WAAA,OACA,YAAA,IACA,YAAA,EAIkC,uBAAA,YAAW,wBAAA,UACX,2BAAW,QAAA,QAEX,uBDuPlC,QAAS,QCtPyB,sBFiPnC,uBEjP8C,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,qBAAW,QAAA,QACX,0BAAW,QAAA,QACX,qBAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,sBAAW,QAAA,QACX,yBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,+BAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,gCAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,gCAAW,QAAA,QACX,gCAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,0BAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,gCAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,6BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,mCAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,yBAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,gCAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,sBAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,0BAAW,QAAA,QACX,4BAAW,QAAA,QACX,qCAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,oCAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,8BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,uBAAW,QAAA,QACX,mCAAW,QAAA,QACX,uCAAW,QAAA,QACX,gCAAW,QAAA,QACX,oCAAW,QAAA,QACX,qCAAW,QAAA,QACX,yCAAW,QAAA,QACX,4BAAW,QAAA,QACX,yBAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,yBAAW,QAAA,QACX,wBAAW,QAAA,QACX,0BAAW,QAAA,QACX,6BAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,uBAAW,QAAA,QACX,8BAAW,QAAA,QACX,+BAAW,QAAA,QACX,gCAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,8BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,yBAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,2BAAW,QAAA,QACX,2BAAW,QAAA,QACX,4BAAW,QAAA,QACX,+BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,iCAAW,QAAA,QACX,oCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,+BAAW,QAAA,QACX,iCAAW,QAAA,QACX,qBAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,2BAAW,QAAA,QACX,uBAAW,QAAA,QASX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,wBAAW,QAAA,QACX,uBAAW,QAAA,QACX,yBAAW,QAAA,QACX,yBAAW,QAAA,QACX,+BAAW,QAAA,QACX,uBAAW,QAAA,QACX,6BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,uBAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,2BAAW,QAAA,QACX,0BAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,4BAAW,QAAA,QACX,mCAAW,QAAA,QACX,4BAAW,QAAA,QACX,oCAAW,QAAA,QACX,kCAAW,QAAA,QACX,iCAAW,QAAA,QACX,+BAAW,QAAA,QACX,sBAAW,QAAA,QACX,wBAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,kCAAW,QAAA,QACX,mCAAW,QAAA,QACX,sCAAW,QAAA,QACX,0CAAW,QAAA,QACX,oCAAW,QAAA,QACX,wCAAW,QAAA,QACX,qCAAW,QAAA,QACX,iCAAW,QAAA,QACX,gCAAW,QAAA,QACX,kCAAW,QAAA,QACX,+BAAW,QAAA,QACX,0BAAW,QAAA,QACX,8BAAW,QAAA,QACX,4BAAW,QAAA,QACX,4BAAW,QAAA,QACX,6BAAW,QAAA,QACX,4BAAW,QAAA,QCtS/C,0BCgEE,QAAA,QHi+BF,EDNC,mBAAA,WGxhCI,gBAAiB,WFiiCZ,WAAY,WGl+BZ,OADL,QJg+BJ,mBAAA,WGthCI,gBAAiB,WACpB,WAAA,WHyhCD,KGrhCC,UAAW,KAEX,4BAAA,cAEA,KACA,YAAA,iBAAA,UAAA,MAAA,WHuhCD,UAAA,KGnhCC,YAAa,WF4hCb,MAAO,KACP,iBAAkB,KExhClB,OADA,MAEA,OHqhCD,SG/gCC,YAAa,QACb,UAAA,QACA,YAAA,QAEA,EFwhCA,MAAO,QEthCL,gBAAA,KAIF,QH8gCD,QKnkCC,MAAA,QAEA,gBAAA,ULskCD,QGxgCC,QAAS,KAAK,OACd,QAAA,IAAA,KAAA,yBH0gCD,eAAA,KGngCC,OHsgCD,OAAA,ECSD,IACE,eAAgB,ODDjB,4BMhlCC,0BLmlCF,gBKplCE,iBADA,eH4EA,QAAS,MACT,UAAA,KHwgCD,OAAA,KGjgCC,aACA,cAAA,IAEA,eACA,QAAA,aC6FA,UAAA,KACK,OAAA,KACG,QAAA,IEvLR,YAAA,WACA,iBAAA,KACA,OAAA,IAAA,MAAA,KNgmCD,cAAA,IGlgCC,mBAAoB,IAAI,IAAI,YAC5B,cAAA,IAAA,IAAA,YHogCD,WAAA,IAAA,IAAA,YG7/BC,YACA,cAAA,IAEA,GHggCD,WAAA,KGx/BC,cAAe,KACf,OAAA,EACA,WAAA,IAAA,MAAA,KAEA,SACA,SAAA,SACA,MAAA,IACA,OAAA,IACA,QAAA,EH0/BD,OAAA,KGl/BC,SAAA,OF2/BA,KAAM,cEz/BJ,OAAA,EAEA,0BACA,yBACA,SAAA,OACA,MAAA,KHo/BH,OAAA,KGz+BC,OAAQ,EACR,SAAA,QH2+BD,KAAA,KCSD,cACE,OAAQ,QAQV,IACA,IMnpCE,IACA,IACA,IACA,INyoCF,GACA,GACA,GACA,GACA,GACA,GDAC,YAAA,QOnpCC,YAAa,IN4pCb,YAAa,IACb,MAAO,QAoBT,WAZA,UAaA,WAZA,UM7pCI,WN8pCJ,UM7pCI,WN8pCJ,UM7pCI,WN8pCJ,UDMC,WCLD,UACA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SAaA,UAZA,SMrpCE,YAAa,INyqCb,YAAa,EACb,MAAO,KAGT,IMzqCE,IAJF,IN4qCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UM7qCA,WN+qCA,UACA,UANA,SM7qCI,UN+qCJ,SM5qCA,UN8qCA,SAQE,UAAW,IAGb,IMrrCE,IAJF,INwrCA,GAEA,GDLC,GCSC,WAAY,KACZ,cAAe,KASjB,WANA,UDCC,WCCD,UMxrCA,WN0rCA,UACA,UANA,SMzrCI,UN2rCJ,SMvrCA,UNyrCA,SMzrCU,UAAA,IACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KACV,IAAA,GAAU,UAAA,KAOR,IADF,GPusCC,UAAA,KCSD,EM1sCE,OAAA,EAAA,EAAA,KAEA,MPqsCD,cAAA,KOhsCC,UAAW,KAwOX,YAAa,IA1OX,YAAA,IPusCH,yBO9rCC,MNusCE,UAAW,MMlsCf,OAAA,MAEE,UAAA,IAKF,MP2rCC,KO3rCsB,QAAA,KP8rCtB,iBAAA,QO7rCsB,WPgsCtB,WAAA,KO/rCsB,YPksCtB,WAAA,MOjsCsB,aPosCtB,WAAA,OOnsCsB,cPssCtB,WAAA,QOnsCsB,aPssCtB,YAAA,OOrsCsB,gBPwsCtB,eAAA,UOvsCsB,gBP0sCtB,eAAA,UOtsCC,iBPysCD,eAAA,WQ5yCC,YR+yCD,MAAA,KCSD,cOrzCI,MAAA,QAHF,qBDwGF,qBP8sCC,MAAA,QCSD,cO5zCI,MAAA,QAHF,qBD2GF,qBPktCC,MAAA,QCSD,WOn0CI,MAAA,QAHF,kBD8GF,kBPstCC,MAAA,QCSD,cO10CI,MAAA,QAHF,qBDiHF,qBP0tCC,MAAA,QCSD,aOj1CI,MAAA,QDwHF,oBAHF,oBExHE,MAAA,QACA,YR21CA,MAAO,KQz1CL,iBAAA,QAHF,mBF8HF,mBP4tCC,iBAAA,QCSD,YQh2CI,iBAAA,QAHF,mBFiIF,mBPguCC,iBAAA,QCSD,SQv2CI,iBAAA,QAHF,gBFoIF,gBPouCC,iBAAA,QCSD,YQ92CI,iBAAA,QAHF,mBFuIF,mBPwuCC,iBAAA,QCSD,WQr3CI,iBAAA,QF6IF,kBADF,kBAEE,iBAAA,QPuuCD,aO9tCC,eAAgB,INuuChB,OAAQ,KAAK,EAAE,KMruCf,cAAA,IAAA,MAAA,KAFF,GPmuCC,GCSC,WAAY,EACZ,cAAe,KM/tCf,MP2tCD,MO5tCD,MAPI,MASF,cAAA,EAIF,eALE,aAAA,EACA,WAAA,KPmuCD,aO/tCC,aAAc,EAKZ,YAAA,KACA,WAAA,KP8tCH,gBOxtCC,QAAS,aACT,cAAA,IACA,aAAA,IAEF,GNiuCE,WAAY,EM/tCZ,cAAA,KAGA,GADF,GP2tCC,YAAA,WOvtCC,GP0tCD,YAAA,IOpnCD,GAvFM,YAAA,EAEA,yBACA,kBGtNJ,MAAA,KACA,MAAA,MACA,SAAA,OVs6CC,MAAA,KO9nCC,WAAY,MAhFV,cAAA,SPitCH,YAAA,OOvsCD,kBNitCE,YAAa,OM3sCjB,0BPusCC,YOtsCC,OAAA,KA9IqB,cAAA,IAAA,OAAA,KAmJvB,YACE,UAAA,IACA,eAAA,UAEA,WPusCD,QAAA,KAAA,KOlsCG,OAAA,EAAA,EAAA,KN2sCF,UAAW,OACX,YAAa,IAAI,MAAM,KMrtCzB,yBPgtCC,wBOhtCD,yBN0tCE,cAAe,EMpsCb,kBAFA,kBACA,iBPmsCH,QAAA,MOhsCG,UAAA,INysCF,YAAa,WACb,MAAO,KMjsCT,yBP4rCC,yBO5rCD,wBAEE,QAAA,cAEA,oBACA,sBACA,cAAA,KP8rCD,aAAA,EOxrCG,WAAA,MNisCF,aAAc,IAAI,MAAM,KACxB,YAAa,EMjsCX,kCNmsCJ,kCMpsCe,iCACX,oCNosCJ,oCDLC,mCCUC,QAAS,GMlsCX,iCNosCA,iCM1sCM,gCAOJ,mCNosCF,mCDLC,kCO9rCC,QAAA,cPmsCD,QWx+CC,cAAe,KVi/Cf,WAAY,OACZ,YAAa,WU9+Cb,KX0+CD,IWt+CD,IACE,KACA,YAAA,MAAA,OAAA,SAAA,cAAA,UAEA,KACA,QAAA,IAAA,IXw+CD,UAAA,IWp+CC,MAAO,QACP,iBAAA,QACA,cAAA,IAEA,IACA,QAAA,IAAA,IACA,UAAA,IV6+CA,MU7+CA,KXs+CD,iBAAA,KW5+CC,cAAe,IASb,mBAAA,MAAA,EAAA,KAAA,EAAA,gBACA,WAAA,MAAA,EAAA,KAAA,EAAA,gBAEA,QV8+CF,QU9+CE,EXs+CH,UAAA,KWj+CC,YAAa,IACb,mBAAA,KACA,WAAA,KAEA,IACA,QAAA,MACA,QAAA,MACA,OAAA,EAAA,EAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KACA,WAAA,UXm+CD,UAAA,WW9+CC,iBAAkB,QAehB,OAAA,IAAA,MAAA,KACA,cAAA,IAEA,SACA,QAAA,EACA,UAAA,QXk+CH,MAAA,QW79CC,YAAa,SACb,iBAAA,YACA,cAAA,EC1DF,gBCHE,WAAA,MACA,WAAA,OAEA,Wb+hDD,cAAA,KYzhDC,aAAA,KAqEA,aAAc,KAvEZ,YAAA,KZgiDH,yBY3hDC,WAkEE,MAAO,OZ89CV,yBY7hDC,WA+DE,MAAO,OZm+CV,0BY1hDC,WCvBA,MAAA,QAGA,iBbojDD,cAAA,KYvhDC,aAAc,KCvBd,aAAA,KACA,YAAA,KCAE,KACE,aAAA,MAEA,YAAA,MAGA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UdijDL,SAAA,ScjiDG,WAAA,IACE,cAAA,KdmiDL,aAAA,Kc3hDG,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud8hDH,MAAA,Kc9hDG,WdiiDH,MAAA,KcjiDG,WdoiDH,MAAA,acpiDG,WduiDH,MAAA,acviDG,Ud0iDH,MAAA,Ic1iDG,Ud6iDH,MAAA,ac7iDG,UdgjDH,MAAA,achjDG,UdmjDH,MAAA,IcnjDG,UdsjDH,MAAA,actjDG,UdyjDH,MAAA,aczjDG,Ud4jDH,MAAA,Ic5jDG,Ud+jDH,MAAA,achjDG,UdmjDH,MAAA,YcnjDG,gBdsjDH,MAAA,KctjDG,gBdyjDH,MAAA,aczjDG,gBd4jDH,MAAA,ac5jDG,ed+jDH,MAAA,Ic/jDG,edkkDH,MAAA,aclkDG,edqkDH,MAAA,acrkDG,edwkDH,MAAA,IcxkDG,ed2kDH,MAAA,ac3kDG,ed8kDH,MAAA,ac9kDG,edilDH,MAAA,IcjlDG,edolDH,MAAA,ac/kDG,edklDH,MAAA,YcjmDG,edomDH,MAAA,KcpmDG,gBdumDH,KAAA,KcvmDG,gBd0mDH,KAAA,ac1mDG,gBd6mDH,KAAA,ac7mDG,edgnDH,KAAA,IchnDG,edmnDH,KAAA,acnnDG,edsnDH,KAAA,actnDG,edynDH,KAAA,IcznDG,ed4nDH,KAAA,ac5nDG,ed+nDH,KAAA,ac/nDG,edkoDH,KAAA,IcloDG,edqoDH,KAAA,achoDG,edmoDH,KAAA,YcpnDG,edunDH,KAAA,KcvnDG,kBd0nDH,YAAA,Kc1nDG,kBd6nDH,YAAA,ac7nDG,kBdgoDH,YAAA,achoDG,iBdmoDH,YAAA,IcnoDG,iBdsoDH,YAAA,actoDG,iBdyoDH,YAAA,aczoDG,iBd4oDH,YAAA,Ic5oDG,iBd+oDH,YAAA,ac/oDG,iBdkpDH,YAAA,aclpDG,iBdqpDH,YAAA,IcrpDG,iBdwpDH,YAAA,acxpDG,iBd2pDH,YAAA,Yc7rDG,iBACE,YAAA,EAOJ,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Ud2rDD,MAAA,Kc3rDC,Wd8rDD,MAAA,Kc9rDC,WdisDD,MAAA,acjsDC,WdosDD,MAAA,acpsDC,UdusDD,MAAA,IcvsDC,Ud0sDD,MAAA,ac1sDC,Ud6sDD,MAAA,ac7sDC,UdgtDD,MAAA,IchtDC,UdmtDD,MAAA,acntDC,UdstDD,MAAA,acttDC,UdytDD,MAAA,IcztDC,Ud4tDD,MAAA,ac7sDC,UdgtDD,MAAA,YchtDC,gBdmtDD,MAAA,KcntDC,gBdstDD,MAAA,acttDC,gBdytDD,MAAA,acztDC,ed4tDD,MAAA,Ic5tDC,ed+tDD,MAAA,ac/tDC,edkuDD,MAAA,acluDC,edquDD,MAAA,IcruDC,edwuDD,MAAA,acxuDC,ed2uDD,MAAA,ac3uDC,ed8uDD,MAAA,Ic9uDC,edivDD,MAAA,ac5uDC,ed+uDD,MAAA,Yc9vDC,ediwDD,MAAA,KcjwDC,gBdowDD,KAAA,KcpwDC,gBduwDD,KAAA,acvwDC,gBd0wDD,KAAA,ac1wDC,ed6wDD,KAAA,Ic7wDC,edgxDD,KAAA,achxDC,edmxDD,KAAA,acnxDC,edsxDD,KAAA,IctxDC,edyxDD,KAAA,aczxDC,ed4xDD,KAAA,ac5xDC,ed+xDD,KAAA,Ic/xDC,edkyDD,KAAA,ac7xDC,edgyDD,KAAA,YcjxDC,edoxDD,KAAA,KcpxDC,kBduxDD,YAAA,KcvxDC,kBd0xDD,YAAA,ac1xDC,kBd6xDD,YAAA,ac7xDC,iBdgyDD,YAAA,IchyDC,iBdmyDD,YAAA,acnyDC,iBdsyDD,YAAA,actyDC,iBdyyDD,YAAA,IczyDC,iBd4yDD,YAAA,ac5yDC,iBd+yDD,YAAA,ac/yDC,iBdkzDD,YAAA,IclzDC,iBdqzDD,YAAA,acrzDC,iBdwzDD,YAAA,YY/yDD,iBE3CE,YAAA,GAQF,yBACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Udy1DD,MAAA,Kcz1DC,Wd41DD,MAAA,Kc51DC,Wd+1DD,MAAA,ac/1DC,Wdk2DD,MAAA,acl2DC,Udq2DD,MAAA,Icr2DC,Udw2DD,MAAA,acx2DC,Ud22DD,MAAA,ac32DC,Ud82DD,MAAA,Ic92DC,Udi3DD,MAAA,acj3DC,Udo3DD,MAAA,acp3DC,Udu3DD,MAAA,Icv3DC,Ud03DD,MAAA,ac32DC,Ud82DD,MAAA,Yc92DC,gBdi3DD,MAAA,Kcj3DC,gBdo3DD,MAAA,acp3DC,gBdu3DD,MAAA,acv3DC,ed03DD,MAAA,Ic13DC,ed63DD,MAAA,ac73DC,edg4DD,MAAA,ach4DC,edm4DD,MAAA,Icn4DC,eds4DD,MAAA,act4DC,edy4DD,MAAA,acz4DC,ed44DD,MAAA,Ic54DC,ed+4DD,MAAA,ac14DC,ed64DD,MAAA,Yc55DC,ed+5DD,MAAA,Kc/5DC,gBdk6DD,KAAA,Kcl6DC,gBdq6DD,KAAA,acr6DC,gBdw6DD,KAAA,acx6DC,ed26DD,KAAA,Ic36DC,ed86DD,KAAA,ac96DC,edi7DD,KAAA,acj7DC,edo7DD,KAAA,Icp7DC,edu7DD,KAAA,acv7DC,ed07DD,KAAA,ac17DC,ed67DD,KAAA,Ic77DC,edg8DD,KAAA,ac37DC,ed87DD,KAAA,Yc/6DC,edk7DD,KAAA,Kcl7DC,kBdq7DD,YAAA,Kcr7DC,kBdw7DD,YAAA,acx7DC,kBd27DD,YAAA,ac37DC,iBd87DD,YAAA,Ic97DC,iBdi8DD,YAAA,acj8DC,iBdo8DD,YAAA,acp8DC,iBdu8DD,YAAA,Icv8DC,iBd08DD,YAAA,ac18DC,iBd68DD,YAAA,ac78DC,iBdg9DD,YAAA,Ich9DC,iBdm9DD,YAAA,acn9DC,iBds9DD,YAAA,YY18DD,iBE9CE,YAAA,GAQF,0BACE,UAAA,WAAA,WAAA,WAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,UAAA,Udu/DD,MAAA,Kcv/DC,Wd0/DD,MAAA,Kc1/DC,Wd6/DD,MAAA,ac7/DC,WdggED,MAAA,achgEC,UdmgED,MAAA,IcngEC,UdsgED,MAAA,actgEC,UdygED,MAAA,aczgEC,Ud4gED,MAAA,Ic5gEC,Ud+gED,MAAA,ac/gEC,UdkhED,MAAA,aclhEC,UdqhED,MAAA,IcrhEC,UdwhED,MAAA,aczgEC,Ud4gED,MAAA,Yc5gEC,gBd+gED,MAAA,Kc/gEC,gBdkhED,MAAA,aclhEC,gBdqhED,MAAA,acrhEC,edwhED,MAAA,IcxhEC,ed2hED,MAAA,ac3hEC,ed8hED,MAAA,ac9hEC,ediiED,MAAA,IcjiEC,edoiED,MAAA,acpiEC,eduiED,MAAA,acviEC,ed0iED,MAAA,Ic1iEC,ed6iED,MAAA,acxiEC,ed2iED,MAAA,Yc1jEC,ed6jED,MAAA,Kc7jEC,gBdgkED,KAAA,KchkEC,gBdmkED,KAAA,acnkEC,gBdskED,KAAA,actkEC,edykED,KAAA,IczkEC,ed4kED,KAAA,ac5kEC,ed+kED,KAAA,ac/kEC,edklED,KAAA,IcllEC,edqlED,KAAA,acrlEC,edwlED,KAAA,acxlEC,ed2lED,KAAA,Ic3lEC,ed8lED,KAAA,aczlEC,ed4lED,KAAA,Yc7kEC,edglED,KAAA,KchlEC,kBdmlED,YAAA,KcnlEC,kBdslED,YAAA,actlEC,kBdylED,YAAA,aczlEC,iBd4lED,YAAA,Ic5lEC,iBd+lED,YAAA,ac/lEC,iBdkmED,YAAA,aclmEC,iBdqmED,YAAA,IcrmEC,iBdwmED,YAAA,acxmEC,iBd2mED,YAAA,ac3mEC,iBd8mED,YAAA,Ic9mEC,iBdinED,YAAA,acjnEC,iBdonED,YAAA,YevrED,iBACA,YAAA,GAGA,MACA,iBAAA,YAEA,Qf0rED,YAAA,IexrEC,eAAgB,IAChB,MAAA,Kf0rED,WAAA,KenrEC,GACA,WAAA,KfurED,OezrEC,MAAO,KdosEP,UAAW,KACX,cAAe,KcxrET,mBd2rER,mBc1rEQ,mBAHA,mBACA,mBd2rER,mBDHC,QAAA,IepsEC,YAAa,WAoBX,eAAA,IACA,WAAA,IAAA,MAAA,KArBJ,mBdmtEE,eAAgB,OAChB,cAAe,IAAI,MAAM,KDJ1B,uCCMD,uCcttEA,wCdutEA,wCcnrEI,2CANI,2CfqrEP,WAAA,Ee1qEG,mBf6qEH,WAAA,IAAA,MAAA,KCWD,cACE,iBAAkB,KchqEpB,6BdmqEA,6BclqEE,6BAZM,6BfuqEP,6BCMD,6BDHC,QAAA,ICWD,gBACE,OAAQ,IAAI,MAAM,Kc3qEpB,4Bd8qEA,4Bc9qEA,4BAQQ,4Bf+pEP,4BCMD,4Bc9pEM,OAAA,IAAA,MAAA,KAYF,4BAFJ,4BfqpEC,oBAAA,IexoEG,yCf2oEH,iBAAA,QejoEC,4BACA,iBAAA,QfqoED,uBe/nEG,SAAA,Od0oEF,QAAS,aczoEL,MAAA,KAEA,sBfkoEL,sBgB9wEC,SAAA,OfyxEA,QAAS,WACT,MAAO,KAST,0BetxEE,0BfgxEF,0BAGA,0BezxEM,0BAMJ,0BfixEF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCgBnyEC,sCAAA,oCf0yEF,sCevxEM,sCf4xEJ,iBAAkB,QASpB,2Be3yEE,2BfqyEF,2BAGA,2Be9yEM,2BAMJ,2BfsyEF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBxzEC,uCAAA,qCf+zEF,uCe5yEM,uCfizEJ,iBAAkB,QASpB,wBeh0EE,wBf0zEF,wBAGA,wBen0EM,wBAMJ,wBf2zEF,wBAGA,wBACA,wBDNC,wBCAD,wBAGA,wBASE,iBAAkB,QDLnB,oCgB70EC,oCAAA,kCfo1EF,oCej0EM,oCfs0EJ,iBAAkB,QASpB,2Ber1EE,2Bf+0EF,2BAGA,2Bex1EM,2BAMJ,2Bfg1EF,2BAGA,2BACA,2BDNC,2BCAD,2BAGA,2BASE,iBAAkB,QDLnB,uCgBl2EC,uCAAA,qCfy2EF,uCet1EM,uCf21EJ,iBAAkB,QASpB,0Be12EE,0Bfo2EF,0BAGA,0Be72EM,0BAMJ,0Bfq2EF,0BAGA,0BACA,0BDNC,0BCAD,0BAGA,0BASE,iBAAkB,QDLnB,sCejtEC,sCADF,oCdytEA,sCe32EM,sCDoJJ,iBAAA,QA6DF,kBACE,WAAY,KA3DV,WAAA,KAEA,oCACA,kBACA,MAAA,KfqtED,cAAA,Ke9pEC,WAAY,OAnDV,mBAAA,yBfotEH,OAAA,IAAA,MAAA,KCWD,yBACE,cAAe,Ec7qEjB,qCdgrEA,qCcltEI,qCARM,qCfmtET,qCCMD,qCDHC,YAAA,OCWD,kCACE,OAAQ,EcxrEV,0Dd2rEA,0Dc3rEA,0DAzBU,0Df6sET,0DCMD,0DAME,YAAa,EchsEf,yDdmsEA,yDcnsEA,yDArBU,yDfitET,yDCMD,yDAME,aAAc,EDLjB,yDe3sEW,yDEzNV,yDjBm6EC,yDiBl6ED,cAAA,GAMA,SjBm6ED,UAAA,EiBh6EC,QAAS,EACT,OAAA,EACA,OAAA,EAEA,OACA,QAAA,MACA,MAAA,KACA,QAAA,EACA,cAAA,KACA,UAAA,KjBk6ED,YAAA,QiB/5EC,MAAO,KACP,OAAA,EACA,cAAA,IAAA,MAAA,QAEA,MjBi6ED,QAAA,aiBt5EC,UAAW,Kb4BX,cAAA,IACG,YAAA,IJ83EJ,mBiBt5EC,mBAAoB,WhBi6EjB,gBAAiB,WgB/5EpB,WAAA,WjB05ED,qBiBx5EC,kBAGA,OAAQ,IAAI,EAAE,EACd,WAAA,MjBu5ED,YAAA,OiBl5EC,iBACA,QAAA,MAIF,kBhB45EE,QAAS,MgB15ET,MAAA,KAIF,iBAAA,ahB25EE,OAAQ,KIh+ER,uBL29ED,2BK19EC,wBY2EA,QAAS,KAAK,OACd,QAAA,IAAA,KAAA,yBACA,eAAA,KAEA,OACA,QAAA,MjBi5ED,YAAA,IiBv3EC,UAAW,KACX,YAAA,WACA,MAAA,KAEA,cACA,QAAA,MACA,MAAA,KACA,OAAA,KACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,WACA,MAAA,KbxDA,iBAAA,KACQ,iBAAA,KAyHR,OAAA,IAAA,MAAA,KACK,cAAA,IACG,mBAAA,MAAA,EAAA,IAAA,IAAA,iBJ0zET,WAAA,MAAA,EAAA,IAAA,IAAA,iBkBl8EC,mBAAA,aAAA,YAAA,KAAA,mBAAA,YAAA,KACE,cAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KACA,WAAA,aAAA,YAAA,KAAA,WAAA,YAAA,KdWM,oBJ27ET,aAAA,QI15EC,QAAA,EACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,qBAEF,gCAA0B,MAAA,KJ65E3B,QAAA,EI55EiC,oCJ+5EjC,MAAA,KiBl4EG,yCACA,MAAA,KAQF,0BhBw4EA,iBAAkB,YAClB,OAAQ,EgBr4EN,wBjB+3EH,wBiB53EC,iChBu4EA,iBAAkB,KgBr4EhB,QAAA,EAIF,wBACE,iCjB43EH,OAAA,YiB/2EC,sBjBk3ED,OAAA,KiBh2EG,mBhB42EF,mBAAoB,KAEtB,qDgB72EM,8BjBs2EH,8BiBn2EC,wCAAA,+BhB+2EA,YAAa,KgB72EX,iCjB22EH,iCiBx2EC,2CAAA,kChB42EF,0BACA,0BACA,oCACA,2BAKE,YAAa,KgBl3EX,iCjBg3EH,iCACF,2CiBt2EC,kChBy2EA,0BACA,0BACA,oCACA,2BgB32EA,YAAA,MhBm3EF,YgBz2EE,cAAA,KAGA,UADA,OjBm2ED,SAAA,SiBv2EC,QAAS,MhBk3ET,WAAY,KgB12EV,cAAA,KAGA,gBADA,aAEA,WAAA,KjBm2EH,aAAA,KiBh2EC,cAAe,EhB22Ef,YAAa,IACb,OAAQ,QgBt2ER,+BjBk2ED,sCiBp2EC,yBACA,gCAIA,SAAU,ShB02EV,WAAY,MgBx2EZ,YAAA,MAIF,oBAAA,cAEE,WAAA,KAGA,iBADA,cAEA,SAAA,SACA,QAAA,aACA,aAAA,KjB+1ED,cAAA,EiB71EC,YAAa,IhBw2Eb,eAAgB,OgBt2EhB,OAAA,QAUA,kCjBs1ED,4BCWC,WAAY,EACZ,YAAa,KgBz1Eb,wCAAA,qCjBq1ED,8BCOD,+BgBl2EI,2BhBi2EJ,4BAME,OAAQ,YDNT,0BiBz1EG,uBAMF,oCAAA,iChB+1EA,OAAQ,YDNT,yBiBt1EK,sBAaJ,mCAFF,gCAGE,OAAA,YAGA,qBjB20ED,WAAA,KiBz0EC,YAAA,IhBo1EA,eAAgB,IgBl1Ed,cAAA,EjB40EH,8BiB9zED,8BCnQE,cAAA,EACA,aAAA,EAEA,UACA,OAAA,KlBokFD,QAAA,IAAA,KkBlkFC,UAAA,KACE,YAAA,IACA,cAAA,IAGF,gBjB4kFA,OAAQ,KiB1kFN,YAAA,KD2PA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjB20EH,QAAA,IAAA,KiBj1EC,UAAW,KAST,YAAA,IACA,cAAA,IAVJ,mChBg2EE,OAAQ,KgBl1EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjB20EH,WAAA,KiBv0EC,QAAS,IAAI,KC/Rb,UAAA,KACA,YAAA,IAEA,UACA,OAAA,KlBymFD,QAAA,KAAA,KkBvmFC,UAAA,KACE,YAAA,UACA,cAAA,IAGF,gBjBinFA,OAAQ,KiB/mFN,YAAA,KDuRA,0BAFJ,kBAGI,OAAA,KAEA,6BACA,OAAA,KjBo1EH,QAAA,KAAA,KiB11EC,UAAW,KAST,YAAA,UACA,cAAA,IAVJ,mChBy2EE,OAAQ,KgB31EN,YAAA,KAGA,6CAjBJ,qCAkBI,OAAA,KAEA,oCACA,OAAA,KjBo1EH,WAAA,KiB30EC,QAAS,KAAK,KAEd,UAAA,KjB40ED,YAAA,UiBx0EG,cjB20EH,SAAA,SiBt0EC,4BACA,cAAA,OAEA,uBACA,SAAA,SACA,IAAA,EACA,MAAA,EACA,QAAA,EACA,QAAA,MACA,MAAA,KjBy0ED,OAAA,KiBv0EC,YAAa,KhBk1Eb,WAAY,OACZ,eAAgB,KDLjB,oDiBz0EC,uCADA,iCAGA,MAAO,KhBk1EP,OAAQ,KACR,YAAa,KDLd,oDiBz0EC,uCADA,iCAKA,MAAO,KhBg1EP,OAAQ,KACR,YAAa,KAKf,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBvuFG,mCAJA,yBD0ZJ,gCbvWE,MAAA,QJ6rFD,2BkB1uFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJksFD,iCiB31EC,aAAc,QC5YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlB2uFH,gCiBh2EC,MAAO,QCtYL,iBAAA,QlByuFH,aAAA,QCWD,oCACE,MAAO,QAKT,uBAEA,8BAJA,4BADA,yBAEA,oBAEA,2BDNC,4BkBrwFG,mCAJA,yBD6ZJ,gCb1WE,MAAA,QJ2tFD,2BkBxwFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJguFD,iCiBt3EC,aAAc,QC/YZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBywFH,gCiB33EC,MAAO,QCzYL,iBAAA,QlBuwFH,aAAA,QCWD,oCACE,MAAO,QAKT,qBAEA,4BAJA,0BADA,uBAEA,kBAEA,yBDNC,0BkBnyFG,iCAJA,uBDgaJ,8Bb7WE,MAAA,QJyvFD,yBkBtyFG,aAAA,QACE,mBAAA,MAAA,EAAA,IAAA,IAAA,iBd4CJ,WAAA,MAAA,EAAA,IAAA,IAAA,iBJ8vFD,+BiBj5EC,aAAc,QClZZ,mBAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QACA,WAAA,MAAA,EAAA,IAAA,IAAA,iBAAA,EAAA,EAAA,IAAA,QlBuyFH,8BiBt5EC,MAAO,QC5YL,iBAAA,QlBqyFH,aAAA,QiBj5EG,kCjBo5EH,MAAA,QiBj5EG,2CjBo5EH,IAAA,KiBz4EC,mDACA,IAAA,EAEA,YjB44ED,QAAA,MiBzzEC,WAAY,IAwEZ,cAAe,KAtIX,MAAA,QAEA,yBjB23EH,yBiBvvEC,QAAS,aA/HP,cAAA,EACA,eAAA,OjB03EH,2BiB5vEC,QAAS,aAxHP,MAAA,KjBu3EH,eAAA,OiBn3EG,kCACA,QAAA,aAmHJ,0BhB8wEE,QAAS,aACT,eAAgB,OgBv3Ed,wCjBg3EH,6CiBxwED,2CjB2wEC,MAAA,KiB/2EG,wCACA,MAAA,KAmGJ,4BhB0xEE,cAAe,EgBt3Eb,eAAA,OAGA,uBADA,oBjBg3EH,QAAA,aiBtxEC,WAAY,EhBiyEZ,cAAe,EgBv3EX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB+xEC,sCiB12EG,SAAA,SjB62EH,YAAA,EiBl2ED,kDhB82EE,IAAK,GgBp2EL,2BjBi2EH,kCiBl2EG,wBAEA,+BAXF,YAAa,IhBs3Eb,WAAY,EgBr2EV,cAAA,EJviBF,2BIshBF,wBJrhBE,WAAA,KI4jBA,6BAyBA,aAAc,MAnCV,YAAA,MAEA,yBjB01EH,gCACF,YAAA,IiB13EG,cAAe,EAwCf,WAAA,OAwBJ,sDAdQ,MAAA,KjBg1EL,yBACF,+CiBr0EC,YAAA,KAEE,UAAW,MjBw0EZ,yBACF,+CmBt6FG,YAAa,IACf,UAAA,MAGA,KACA,QAAA,aACA,QAAA,IAAA,KAAA,cAAA,EACA,UAAA,KACA,YAAA,IACA,YAAA,WACA,WAAA,OC0CA,YAAA,OACA,eAAA,OACA,iBAAA,aACA,aAAA,ahB+JA,OAAA,QACG,oBAAA,KACC,iBAAA,KACI,gBAAA,KJiuFT,YAAA,KmBz6FG,iBAAA,KlBq7FF,OAAQ,IAAI,MAAM,YAClB,cAAe,IDHhB,kBKx8FC,kBAEA,WACA,kBJ28FF,kBADA,WkBl7FE,QAAA,KAAA,OlBy7FA,QAAS,IAAI,KAAK,yBAClB,eAAgB,KkBn7FhB,WnB46FD,WmB/6FG,WlB27FF,MAAO,KkBt7FL,gBAAA,Kf6BM,YADR,YJq5FD,iBAAA,KmB56FC,QAAA,ElBw7FA,mBAAoB,MAAM,EAAE,IAAI,IAAI,iBAC5B,WAAY,MAAM,EAAE,IAAI,IAAI,iBoBn+FpC,cAGA,ejB8DA,wBACQ,OAAA,YJ65FT,OAAA,kBmB56FG,mBAAA,KlBw7FM,WAAY,KkBt7FhB,QAAA,IASN,eC3DE,yBACA,eAAA,KpBo+FD,aoBj+FC,MAAA,KnB6+FA,iBAAkB,KmB3+FhB,aAAA,KpBq+FH,mBoBn+FO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBo+FH,mBoBj+FC,MAAA,KnB6+FA,iBAAkB,QAClB,aAAc,QmBz+FR,oBADJ,oBpBo+FH,mCoBj+FG,MAAA,KnB6+FF,iBAAkB,QAClB,aAAc,QmBz+FN,0BnB++FV,0BAHA,0BmB7+FM,0BnB++FN,0BAHA,0BDFC,yCoB3+FK,yCnB++FN,yCmB1+FE,MAAA,KnBk/FA,iBAAkB,QAClB,aAAc,QmB3+FZ,oBpBm+FH,oBoBn+FG,mCnBg/FF,iBAAkB,KmB5+FV,4BnBi/FV,4BAHA,4BDHC,6BCOD,6BAHA,6BkB99FA,sCClBM,sCnBi/FN,sCmB3+FI,iBAAA,KACA,aAAA,KDcJ,oBC9DE,MAAA,KACA,iBAAA,KpB6hGD,aoB1hGC,MAAA,KnBsiGA,iBAAkB,QmBpiGhB,aAAA,QpB8hGH,mBoB5hGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB6hGH,mBoB1hGC,MAAA,KnBsiGA,iBAAkB,QAClB,aAAc,QmBliGR,oBADJ,oBpB6hGH,mCoB1hGG,MAAA,KnBsiGF,iBAAkB,QAClB,aAAc,QmBliGN,0BnBwiGV,0BAHA,0BmBtiGM,0BnBwiGN,0BAHA,0BDFC,yCoBpiGK,yCnBwiGN,yCmBniGE,MAAA,KnB2iGA,iBAAkB,QAClB,aAAc,QmBpiGZ,oBpB4hGH,oBoB5hGG,mCnByiGF,iBAAkB,KmBriGV,4BnB0iGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBphGA,sCCrBM,sCnB0iGN,sCmBpiGI,iBAAA,QACA,aAAA,QDkBJ,oBClEE,MAAA,QACA,iBAAA,KpBslGD,aoBnlGC,MAAA,KnB+lGA,iBAAkB,QmB7lGhB,aAAA,QpBulGH,mBoBrlGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBslGH,mBoBnlGC,MAAA,KnB+lGA,iBAAkB,QAClB,aAAc,QmB3lGR,oBADJ,oBpBslGH,mCoBnlGG,MAAA,KnB+lGF,iBAAkB,QAClB,aAAc,QmB3lGN,0BnBimGV,0BAHA,0BmB/lGM,0BnBimGN,0BAHA,0BDFC,yCoB7lGK,yCnBimGN,yCmB5lGE,MAAA,KnBomGA,iBAAkB,QAClB,aAAc,QmB7lGZ,oBpBqlGH,oBoBrlGG,mCnBkmGF,iBAAkB,KmB9lGV,4BnBmmGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBzkGA,sCCzBM,sCnBmmGN,sCmB7lGI,iBAAA,QACA,aAAA,QDsBJ,oBCtEE,MAAA,QACA,iBAAA,KpB+oGD,UoB5oGC,MAAA,KnBwpGA,iBAAkB,QmBtpGhB,aAAA,QpBgpGH,gBoB9oGO,gBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpB+oGH,gBoB5oGC,MAAA,KnBwpGA,iBAAkB,QAClB,aAAc,QmBppGR,iBADJ,iBpB+oGH,gCoB5oGG,MAAA,KnBwpGF,iBAAkB,QAClB,aAAc,QmBppGN,uBnB0pGV,uBAHA,uBmBxpGM,uBnB0pGN,uBAHA,uBDFC,sCoBtpGK,sCnB0pGN,sCmBrpGE,MAAA,KnB6pGA,iBAAkB,QAClB,aAAc,QmBtpGZ,iBpB8oGH,iBoB9oGG,gCnB2pGF,iBAAkB,KmBvpGV,yBnB4pGV,yBAHA,yBDHC,0BCOD,0BAHA,0BkB9nGA,mCC7BM,mCnB4pGN,mCmBtpGI,iBAAA,QACA,aAAA,QD0BJ,iBC1EE,MAAA,QACA,iBAAA,KpBwsGD,aoBrsGC,MAAA,KnBitGA,iBAAkB,QmB/sGhB,aAAA,QpBysGH,mBoBvsGO,mBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBwsGH,mBoBrsGC,MAAA,KnBitGA,iBAAkB,QAClB,aAAc,QmB7sGR,oBADJ,oBpBwsGH,mCoBrsGG,MAAA,KnBitGF,iBAAkB,QAClB,aAAc,QmB7sGN,0BnBmtGV,0BAHA,0BmBjtGM,0BnBmtGN,0BAHA,0BDFC,yCoB/sGK,yCnBmtGN,yCmB9sGE,MAAA,KnBstGA,iBAAkB,QAClB,aAAc,QmB/sGZ,oBpBusGH,oBoBvsGG,mCnBotGF,iBAAkB,KmBhtGV,4BnBqtGV,4BAHA,4BDHC,6BCOD,6BAHA,6BkBnrGA,sCCjCM,sCnBqtGN,sCmB/sGI,iBAAA,QACA,aAAA,QD8BJ,oBC9EE,MAAA,QACA,iBAAA,KpBiwGD,YoB9vGC,MAAA,KnB0wGA,iBAAkB,QmBxwGhB,aAAA,QpBkwGH,kBoBhwGO,kBAEN,MAAA,KACE,iBAAA,QACA,aAAA,QpBiwGH,kBoB9vGC,MAAA,KnB0wGA,iBAAkB,QAClB,aAAc,QmBtwGR,mBADJ,mBpBiwGH,kCoB9vGG,MAAA,KnB0wGF,iBAAkB,QAClB,aAAc,QmBtwGN,yBnB4wGV,yBAHA,yBmB1wGM,yBnB4wGN,yBAHA,yBDFC,wCoBxwGK,wCnB4wGN,wCmBvwGE,MAAA,KnB+wGA,iBAAkB,QAClB,aAAc,QmBxwGZ,mBpBgwGH,mBoBhwGG,kCnB6wGF,iBAAkB,KmBzwGV,2BnB8wGV,2BAHA,2BDHC,4BCOD,4BAHA,4BkBxuGA,qCCrCM,qCnB8wGN,qCmBxwGI,iBAAA,QACA,aAAA,QDuCJ,mBACE,MAAA,QACA,iBAAA,KnBkuGD,UmB/tGC,YAAA,IlB2uGA,MAAO,QACP,cAAe,EAEjB,UG5wGE,iBemCE,iBflCM,oBJqwGT,6BmBhuGC,iBAAA,YlB4uGA,mBAAoB,KACZ,WAAY,KkBzuGlB,UAEF,iBAAA,gBnBguGD,gBmB9tGG,aAAA,YnBouGH,gBmBluGG,gBAIA,MAAA,QlB0uGF,gBAAiB,UACjB,iBAAkB,YDNnB,0BmBnuGK,0BAUN,mCATM,mClB8uGJ,MAAO,KmB7yGP,gBAAA,KAGA,mBADA,QpBsyGD,QAAA,KAAA,KmB5tGC,UAAW,KlBwuGX,YAAa,UmBpzGb,cAAA,IAGA,mBADA,QpB6yGD,QAAA,IAAA,KmB/tGC,UAAW,KlB2uGX,YAAa,ImB3zGb,cAAA,IAGA,mBADA,QpBozGD,QAAA,IAAA,ImB9tGC,UAAW,KACX,YAAA,IACA,cAAA,IAIF,WACE,QAAA,MnB8tGD,MAAA,KCYD,sBACE,WAAY,IqB53GZ,6BADF,4BtBq3GC,6BIhsGC,MAAA,KAEQ,MJosGT,QAAA,EsBx3GC,mBAAA,QAAA,KAAA,OACE,cAAA,QAAA,KAAA,OtB03GH,WAAA,QAAA,KAAA,OsBr3GC,StBw3GD,QAAA,EsBt3Ga,UtBy3Gb,QAAA,KsBx3Ga,atB23Gb,QAAA,MsB13Ga,etB63Gb,QAAA,UsBz3GC,kBACA,QAAA,gBlBwKA,YACQ,SAAA,SAAA,OAAA,EAOR,SAAA,OACQ,mCAAA,KAAA,8BAAA,KAGR,2BAAA,KACQ,4BAAA,KAAA,uBAAA,KJ8sGT,oBAAA,KuBx5GC,4BAA6B,OAAQ,WACrC,uBAAA,OAAA,WACA,oBAAA,OAAA,WAEA,OACA,QAAA,aACA,MAAA,EACA,OAAA,EACA,YAAA,IACA,eAAA,OvB05GD,WAAA,IAAA,OuBt5GC,WAAY,IAAI,QtBq6GhB,aAAc,IAAI,MAAM,YsBn6GxB,YAAA,IAAA,MAAA,YAKA,UADF,QvBu5GC,SAAA,SuBj5GC,uBACA,QAAA,EAEA,eACA,SAAA,SACA,IAAA,KACA,KAAA,EACA,QAAA,KACA,QAAA,KACA,MAAA,KACA,UAAA,MACA,QAAA,IAAA,EACA,OAAA,IAAA,EAAA,EACA,UAAA,KACA,WAAA,KACA,WAAA,KnBsBA,iBAAA,KACQ,wBAAA,YmBrBR,gBAAA,YtBk6GA,OsBl6GA,IAAA,MAAA,KvBq5GD,OAAA,IAAA,MAAA,gBuBh5GC,cAAA,IACE,mBAAA,EAAA,IAAA,KAAA,iBACA,WAAA,EAAA,IAAA,KAAA,iBAzBJ,0BCzBE,MAAA,EACA,KAAA,KAEA,wBxBu8GD,OAAA,IuBj7GC,OAAQ,IAAI,EAmCV,SAAA,OACA,iBAAA,QAEA,oBACA,QAAA,MACA,QAAA,IAAA,KACA,MAAA,KvBi5GH,YAAA,IuB34GC,YAAA,WtB25GA,MAAO,KsBz5GL,YAAA,OvB+4GH,0BuB74GG,0BAMF,MAAA,QtBu5GA,gBAAiB,KACjB,iBAAkB,QsBp5GhB,yBAEA,+BADA,+BvB04GH,MAAA,KuBh4GC,gBAAA,KtBg5GA,iBAAkB,QAClB,QAAS,EDZV,2BuB93GC,iCAAA,iCAEE,MAAA,KEzGF,iCF2GE,iCAEA,gBAAA,KvBg4GH,OAAA,YuB33GC,iBAAkB,YAGhB,iBAAA,KvB23GH,OAAA,0DuBt3GG,qBvBy3GH,QAAA,MuBh3GC,QACA,QAAA,EAQF,qBACE,MAAA,EACA,KAAA,KAIF,oBACE,MAAA,KACA,KAAA,EAEA,iBACA,QAAA,MACA,QAAA,IAAA,KvB22GD,UAAA,KuBv2GC,YAAa,WACb,MAAA,KACA,YAAA,OAEA,mBACA,SAAA,MACA,IAAA,EvBy2GD,MAAA,EuBr2GC,OAAQ,EACR,KAAA,EACA,QAAA,IAQF,2BtB+2GE,MAAO,EsB32GL,KAAA,KAEA,eACA,sCvB+1GH,QAAA,GuBt2GC,WAAY,EtBs3GZ,cAAe,IAAI,OsB32GjB,cAAA,IAAA,QAEA,uBvB+1GH,8CuB10GC,IAAK,KAXL,OAAA,KApEA,cAAA,IvB85GC,yBuB11GD,6BA1DA,MAAA,EACA,KAAA,KvBw5GD,kC0BviHG,MAAO,KzBujHP,KAAM,GyBnjHR,W1ByiHD,oB0B7iHC,SAAU,SzB6jHV,QAAS,ayBvjHP,eAAA,OAGA,yB1ByiHH,gBCgBC,SAAU,SACV,MAAO,KyBhjHT,gC1ByiHC,gCCYD,+BAFA,+ByBnjHA,uBANM,uBzB0jHN,sBAFA,sBAQE,QAAS,EyBrjHP,qB1B0iHH,2B0BriHD,2BACE,iC1BuiHD,YAAA,KCgBD,aACE,YAAa,KDZd,kB0B7iHD,wBAAA,0BzB8jHE,MAAO,KDZR,kB0BliHD,wBACE,0B1BoiHD,YAAA,I0B/hHC,yE1BkiHD,cAAA,E2BnlHC,4BACG,YAAA,EDsDL,mEzBgjHE,wBAAyB,E0B/lHzB,2BAAA,E3BolHD,6C0B/hHD,8CACE,uBAAA,E1BiiHD,0BAAA,E0B9hHC,sB1BiiHD,MAAA,KCgBD,8D0BlnHE,cAAA,E3BumHD,mE0B9hHD,oECjEE,wBAAA,EACG,2BAAA,EDqEL,oEzB6iHE,uBAAwB,EyB3iHxB,0BAAA,EAiBF,mCACE,iCACA,QAAA,EAEF,iCACE,cAAA,IACA,aAAA,IAKF,oCtB/CE,cAAA,KACQ,aAAA,KsBkDR,iCtBnDA,mBAAA,MAAA,EAAA,IAAA,IAAA,iBACQ,WAAA,MAAA,EAAA,IAAA,IAAA,iBsByDV,0CACE,mBAAA,K1B0gHD,WAAA,K0BtgHC,YACA,YAAA,EAGF,eACE,aAAA,IAAA,IAAA,E1BwgHD,oBAAA,ECgBD,uBACE,aAAc,EAAE,IAAI,IyB7gHlB,yBACA,+BACA,oC1BkgHH,QAAA,M0BzgHC,MAAO,KAcH,MAAA,K1B8/GL,UAAA,KCgBD,oCACE,MAAO,KyBvgHL,8BACA,oC1B4/GH,oC0Bv/GC,0CACE,WAAA,K1By/GH,YAAA,E2BlqHC,4DACC,cAAA,EAQA,sD3B+pHF,uBAAA,I0Bz/GC,wBAAA,IC/KA,2BAAA,EACC,0BAAA,EAQA,sD3BqqHF,uBAAA,E0B1/GC,wBAAyB,EACzB,2BAAA,I1B4/GD,0BAAA,ICgBD,uE0BzrHE,cAAA,E3B8qHD,4E0Bz/GD,6EC7LE,2BAAA,EACC,0BAAA,EDoMH,6EACE,uBAAA,EACA,wBAAA,EAEA,qB1Bu/GD,QAAA,M0B3/GC,MAAO,KzB2gHP,aAAc,MyBpgHZ,gBAAA,SAEA,0B1Bw/GH,gC0BjgHC,QAAS,WAYP,MAAA,K1Bw/GH,MAAA,G0Bp/GG,qC1Bu/GH,MAAA,KCgBD,+CACE,KAAM,KyBh/GF,gDAFA,6C1By+GL,2D0Bx+GK,wDEzOJ,SAAU,SACV,KAAA,cACA,eAAA,K5BotHD,a4BhtHC,SAAA,SACE,QAAA,MACA,gBAAA,S5BmtHH,0B4B3tHC,MAAO,KAeL,cAAA,EACA,aAAA,EAOA,2BACA,SAAA,S5B0sHH,QAAA,E4BxsHG,MAAA,KACE,MAAA,K5B0sHL,cAAA,ECgBD,iCACE,QAAS,EiBtrHT,8BACA,mCACA,sCACA,OAAA,KlB2qHD,QAAA,KAAA,KkBzqHC,UAAA,KjByrHA,YAAa,UACb,cAAe,IiBxrHb,oClB6qHH,yCkB1qHC,4CjB0rHA,OAAQ,KACR,YAAa,KDTd,8C4BltHD,mDAAA,sD3B6tHA,sCACA,2CiB5rHI,8CjBisHF,OAAQ,KiB7sHR,8BACA,mCACA,sCACA,OAAA,KlBksHD,QAAA,IAAA,KkBhsHC,UAAA,KjBgtHA,YAAa,IACb,cAAe,IiB/sHb,oClBosHH,yCkBjsHC,4CjBitHA,OAAQ,KACR,YAAa,KDTd,8C4BhuHD,mDAAA,sD3B2uHA,sCACA,2CiBntHI,8CjBwtHF,OAAQ,K2B5uHR,2B5BguHD,mB4BhuHC,iB3BivHA,QAAS,W2B5uHX,8D5BguHC,sD4BhuHD,oDAEE,cAAA,EAEA,mB5BkuHD,iB4B7tHC,MAAO,GACP,YAAA,OACA,eAAA,OAEA,mBACA,QAAA,IAAA,KACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,K5B+tHD,WAAA,O4B5tHC,iBAAA,KACE,OAAA,IAAA,MAAA,KACA,cAAA,I5B+tHH,4B4B5tHC,QAAA,IAAA,KACE,UAAA,KACA,cAAA,I5B+tHH,4B4BlvHC,QAAS,KAAK,K3BkwHd,UAAW,K2BxuHT,cAAA,IAKJ,wCAAA,qC3BwuHE,WAAY,EAEd,uCACA,+BACA,kC0Bh1HE,6CACG,8CC4GL,6D5BwtHC,wE4BvtHC,wBAAA,E5B0tHD,2BAAA,ECgBD,+BACE,aAAc,EAEhB,sCACA,8B2BnuHA,+D5BytHC,oDCWD,iC0Br1HE,4CACG,6CCiHH,uBAAA,E5B2tHD,0BAAA,E4BrtHC,8BAGA,YAAA,E5ButHD,iB4B3tHC,SAAU,SAUR,UAAA,E5BotHH,YAAA,O4BltHK,sB5BqtHL,SAAA,SCgBD,2BACE,YAAa,K2B3tHb,6BAAA,4B5B+sHD,4B4B5sHK,QAAA,EAGJ,kCAAA,wCAGI,aAAA,K5B+sHL,iC6B72HD,uCACE,QAAA,EACA,YAAA,K7Bg3HD,K6Bl3HC,aAAc,EAOZ,cAAA,EACA,WAAA,KARJ,QAWM,SAAA,SACA,QAAA,M7B+2HL,U6B72HK,SAAA,S5B63HJ,QAAS,M4B33HH,QAAA,KAAA,KAMJ,gB7B02HH,gB6Bz2HK,gBAAA,K7B42HL,iBAAA,KCgBD,mB4Bx3HQ,MAAA,KAGA,yBADA,yB7B62HP,MAAA,K6Br2HG,gBAAA,K5Bq3HF,OAAQ,YACR,iBAAkB,Y4Bl3Hd,aAzCN,mB7Bg5HC,mBwBn5HC,iBAAA,KACA,aAAA,QAEA,kBxBs5HD,OAAA,I6Bt5HC,OAAQ,IAAI,EA0DV,SAAA,O7B+1HH,iBAAA,Q6Br1HC,c7Bw1HD,UAAA,K6Bt1HG,UAEA,cAAA,IAAA,MAAA,KALJ,aASM,MAAA,KACA,cAAA,KAEA,e7Bu1HL,aAAA,I6Bt1HK,YAAA,WACE,OAAA,IAAA,MAAA,Y7Bw1HP,cAAA,IAAA,IAAA,EAAA,ECgBD,qBACE,aAAc,KAAK,KAAK,K4B/1HlB,sBAEA,4BADA,4BAEA,MAAA,K7Bo1HP,OAAA,Q6B/0HC,iBAAA,KAqDA,OAAA,IAAA,MAAA,KA8BA,oBAAA,YAnFA,wBAwDE,MAAA,K7B8xHH,cAAA,E6B5xHK,2BACA,MAAA,KA3DJ,6BAgEE,cAAA,IACA,WAAA,OAYJ,iDA0DE,IAAK,KAjED,KAAA,K7B6xHH,yB6B5tHD,2BA9DM,QAAA,W7B6xHL,MAAA,G6Bt2HD,6BAuFE,cAAA,GAvFF,6B5B23HA,aAAc,EACd,cAAe,IDZhB,kC6BzuHD,wCA3BA,wCATM,OAAA,IAAA,MAAA,K7BkxHH,yB6B9uHD,6B5B8vHE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,kC6Bj3HD,wC7Bk3HD,wC6Bh3HG,oBAAA,MAIE,c7Bk3HL,MAAA,K6B/2HK,gB7Bk3HL,cAAA,ICgBD,iBACE,YAAa,I4B13HP,uBAQR,6B7Bu2HC,6B6Br2HG,MAAA,K7Bw2HH,iBAAA,Q6Bt2HK,gBACA,MAAA,KAYN,mBACE,WAAA,I7B+1HD,YAAA,E6B51HG,e7B+1HH,MAAA,K6B71HK,kBACA,MAAA,KAPN,oBAYI,cAAA,IACA,WAAA,OAYJ,wCA0DE,IAAK,KAjED,KAAA,K7B81HH,yB6B7xHD,kBA9DM,QAAA,W7B81HL,MAAA,G6Br1HD,oBACA,cAAA,GAIE,oBACA,cAAA,EANJ,yB5B62HE,aAAc,EACd,cAAe,IDZhB,8B6B7yHD,oCA3BA,oCATM,OAAA,IAAA,MAAA,K7Bs1HH,yB6BlzHD,yB5Bk0HE,cAAe,IAAI,MAAM,KACzB,cAAe,IAAI,IAAI,EAAE,EDZ1B,8B6B30HD,oC7B40HD,oC6B10HG,oBAAA,MAGA,uB7B60HH,QAAA,K6Bl0HC,qBF3OA,QAAA,M3BkjID,yB8B3iIC,WAAY,KACZ,uBAAA,EACA,wBAAA,EAEA,Q9B6iID,SAAA,S8BriIC,WAAY,KA8nBZ,cAAe,KAhoBb,OAAA,IAAA,MAAA,Y9B4iIH,yB8B5hIC,QAgnBE,cAAe,K9Bi7GlB,yB8BphIC,eACA,MAAA,MAGA,iBACA,cAAA,KAAA,aAAA,KAEA,WAAA,Q9BqhID,2BAAA,M8BnhIC,WAAA,IAAA,MAAA,YACE,mBAAA,MAAA,EAAA,IAAA,EAAA,qB9BqhIH,WAAA,MAAA,EAAA,IAAA,EAAA,qB8B57GD,oBArlBI,WAAA,KAEA,yBAAA,iB9BqhID,MAAA,K8BnhIC,WAAA,EACE,mBAAA,KACA,WAAA,KAEA,0B9BqhIH,QAAA,gB8BlhIC,OAAA,eACE,eAAA,E9BohIH,SAAA,kBCkBD,oBACE,WAAY,QDZf,sC8BlhIK,mC9BihIH,oC8B5gIC,cAAe,E7B+hIf,aAAc,G6Bp+GlB,sCAnjBE,mC7B4hIA,WAAY,MDdX,4D8BtgID,sC9BugID,mCCkBG,WAAY,O6B9gId,kCANE,gC9BygIH,4B8B1gIG,0BAuiBF,aAAc,M7Bs/Gd,YAAa,MAEf,yBDZC,kC8B9gIK,gC9B6gIH,4B8B9gIG,0BAcF,aAAc,EAChB,YAAA,GAMF,mBA8gBE,QAAS,KAhhBP,aAAA,EAAA,EAAA,I9BqgIH,yB8BhgIC,mB7BkhIE,cAAe,G6B7gIjB,qBADA,kB9BmgID,SAAA,M8B5/HC,MAAO,EAggBP,KAAM,E7B+gHN,QAAS,KDdR,yB8BhgID,qB9BigID,kB8BhgIC,cAAA,GAGF,kBACE,IAAA,EACA,aAAA,EAAA,EAAA,I9BogID,qB8B7/HC,OAAQ,EACR,cAAA,EACA,aAAA,IAAA,EAAA,EAEA,cACA,MAAA,K9B+/HD,OAAA,K8B7/HC,QAAA,KAAA,K7B+gIA,UAAW,K6B7gIT,YAAA,KAIA,oBAbJ,oB9B2gIC,gBAAA,K8B1/HG,kB7B6gIF,QAAS,MDdR,yBACF,iC8Bn/HC,uCACA,YAAA,OAGA,eC9LA,SAAA,SACA,MAAA,MD+LA,QAAA,IAAA,KACA,WAAA,IACA,aAAA,KACA,cAAA,I9Bs/HD,iBAAA,Y8Bl/HC,iBAAA,KACE,OAAA,IAAA,MAAA,Y9Bo/HH,cAAA,I8B/+HG,qBACA,QAAA,EAEA,yB9Bk/HH,QAAA,M8BxgIC,MAAO,KAyBL,OAAA,I9Bk/HH,cAAA,I8BvjHD,mCAvbI,WAAA,I9Bm/HH,yB8Bz+HC,eACA,QAAA,MAGE,YACA,OAAA,MAAA,M9B4+HH,iB8B/8HC,YAAA,KA2YA,eAAgB,KAjaZ,YAAA,KAEA,yBACA,iCACA,SAAA,OACA,MAAA,KACA,MAAA,KAAA,WAAA,E9By+HH,iBAAA,Y8B9kHC,OAAQ,E7BimHR,mBAAoB,K6Bz/HhB,WAAA,KAGA,kDAqZN,sC9BqlHC,QAAA,IAAA,KAAA,IAAA,KCmBD,sC6B1/HQ,YAAA,KAmBR,4C9By9HD,4C8B1lHG,iBAAkB,M9B+lHnB,yB8B/lHD,YAtYI,MAAA,K9Bw+HH,OAAA,E8Bt+HK,eACA,MAAA,K9B0+HP,iB8B99HG,YAAa,KACf,eAAA,MAGA,aACA,QAAA,KAAA,K1B9NA,WAAA,IACQ,aAAA,M2B/DR,cAAA,IACA,YAAA,M/B+vID,WAAA,IAAA,MAAA,YiBzuHC,cAAe,IAAI,MAAM,YAwEzB,mBAAoB,MAAM,EAAE,IAAI,EAAE,qBAAyB,EAAE,IAAI,EAAE,qBAtI/D,WAAA,MAAA,EAAA,IAAA,EAAA,qBAAA,EAAA,IAAA,EAAA,qBAEA,yBjB2yHH,yBiBvqHC,QAAS,aA/HP,cAAA,EACA,eAAA,OjB0yHH,2BiB5qHC,QAAS,aAxHP,MAAA,KjBuyHH,eAAA,OiBnyHG,kCACA,QAAA,aAmHJ,0BhBssHE,QAAS,aACT,eAAgB,OgB/yHd,wCjBgyHH,6CiBxrHD,2CjB2rHC,MAAA,KiB/xHG,wCACA,MAAA,KAmGJ,4BhBktHE,cAAe,EgB9yHb,eAAA,OAGA,uBADA,oBjBgyHH,QAAA,aiBtsHC,WAAY,EhBytHZ,cAAe,EgB/yHX,eAAA,OAsFN,6BAAA,0BAjFI,aAAA,EAiFJ,4CjB+sHC,sCiB1xHG,SAAA,SjB6xHH,YAAA,E8BtgID,kDAmWE,IAAK,GAvWH,yBACE,yB9BihIL,cAAA,I8B//HD,oCAoVE,cAAe,GA1Vf,yBACA,aACA,MAAA,KACA,YAAA,E1BzPF,eAAA,EACQ,aAAA,EJswIP,YAAA,EACF,OAAA,E8BtgIG,mBAAoB,KACtB,WAAA,M9B0gID,8B8BtgIC,WAAY,EACZ,uBAAA,EHzUA,wBAAA,EAQA,mDACC,cAAA,E3B40IF,uBAAA,I8BlgIC,wBAAyB,IChVzB,2BAAA,EACA,0BAAA,EDkVA,YCnVA,WAAA,IACA,cAAA,IDqVA,mBCtVA,WAAA,KACA,cAAA,KD+VF,mBChWE,WAAA,KACA,cAAA,KDuWF,aAsSE,WAAY,KA1SV,cAAA,KAEA,yB9BkgID,aACF,MAAA,K8Br+HG,aAAc,KAhBhB,YAAA,MACA,yBE5WA,aF8WE,MAAA,eAFF,cAKI,MAAA,gB9B0/HH,aAAA,M8Bh/HD,4BACA,aAAA,GADF,gBAKI,iBAAA,Q9Bm/HH,aAAA,QCmBD,8B6BngIM,MAAA,KARN,oC9B6/HC,oC8B/+HG,MAAA,Q9Bk/HH,iBAAA,Y8B7+HK,6B9Bg/HL,MAAA,KCmBD,iC6B//HQ,MAAA,KAKF,uC9B4+HL,uCCmBC,MAAO,KACP,iBAAkB,Y6B5/HZ,sCAIF,4C9B0+HL,4CCmBC,MAAO,KACP,iBAAkB,Q6B1/HZ,wCAxCR,8C9BohIC,8C8Bt+HG,MAAA,K9By+HH,iBAAA,YCmBD,+B6Bz/HM,aAAA,KAGA,qCApDN,qC9B8hIC,iBAAA,KCmBD,yC6Bv/HI,iBAAA,KAOE,iCAAA,6B7Bq/HJ,aAAc,Q6Bj/HR,oCAiCN,0C9Bk8HD,0C8B9xHC,MAAO,KA7LC,iBAAA,QACA,yB7Bi/HR,sD6B/+HU,MAAA,KAKF,4D9B49HP,4DCmBC,MAAO,KACP,iBAAkB,Y6B5+HV,2DAIF,iE9B09HP,iECmBC,MAAO,KACP,iBAAkB,Q6B1+HV,6D9B69HX,mEADE,mE8B7jIC,MAAO,KA8GP,iBAAA,aAEE,6B9Bo9HL,MAAA,K8B/8HG,mC9Bk9HH,MAAA,KCmBD,0B6Bl+HM,MAAA,KAIA,gCAAA,gC7Bm+HJ,MAAO,K6Bz9HT,0CARQ,0CASN,mD9B08HD,mD8Bz8HC,MAAA,KAFF,gBAKI,iBAAA,K9B68HH,aAAA,QCmBD,8B6B79HM,MAAA,QARN,oC9Bu9HC,oC8Bz8HG,MAAA,K9B48HH,iBAAA,Y8Bv8HK,6B9B08HL,MAAA,QCmBD,iC6Bz9HQ,MAAA,QAKF,uC9Bs8HL,uCCmBC,MAAO,KACP,iBAAkB,Y6Bt9HZ,sCAIF,4C9Bo8HL,4CCmBC,MAAO,KACP,iBAAkB,Q6Bp9HZ,wCAxCR,8C9B8+HC,8C8B/7HG,MAAA,K9Bk8HH,iBAAA,YCmBD,+B6Bl9HM,aAAA,KAGA,qCArDN,qC9Bw/HC,iBAAA,KCmBD,yC6Bh9HI,iBAAA,KAME,iCAAA,6B7B+8HJ,aAAc,Q6B38HR,oCAuCN,0C9Bs5HD,0C8B93HC,MAAO,KAvDC,iBAAA,QAuDV,yBApDU,kE9By7HP,aAAA,Q8Bt7HO,0D9By7HP,iBAAA,QCmBD,sD6Bz8HU,MAAA,QAKF,4D9Bs7HP,4DCmBC,MAAO,KACP,iBAAkB,Y6Bt8HV,2DAIF,iE9Bo7HP,iECmBC,MAAO,KACP,iBAAkB,Q6Bp8HV,6D9Bu7HX,mEADE,mE8B7hIC,MAAO,KA+GP,iBAAA,aAEE,6B9Bm7HL,MAAA,Q8B96HG,mC9Bi7HH,MAAA,KCmBD,0B6Bj8HM,MAAA,QAIA,gCAAA,gC7Bk8HJ,MAAO,KgC1kJT,0CH0oBQ,0CGzoBN,mDjC2jJD,mDiC1jJC,MAAA,KAEA,YACA,QAAA,IAAA,KjC8jJD,cAAA,KiCnkJC,WAAY,KAQV,iBAAA,QjC8jJH,cAAA,IiC3jJK,eACA,QAAA,ajC+jJL,yBiC3kJC,QAAS,EAAE,IAkBT,MAAA,KjC4jJH,QAAA,SkC/kJC,oBACA,MAAA,KAEA,YlCklJD,QAAA,akCtlJC,aAAc,EAOZ,OAAA,KAAA,ElCklJH,cAAA,ICmBD,eiClmJM,QAAA,OAEA,iBACA,oBACA,SAAA,SACA,MAAA,KACA,QAAA,IAAA,KACA,YAAA,KACA,YAAA,WlCmlJL,MAAA,QkCjlJG,gBAAA,KjComJF,iBAAkB,KiCjmJZ,OAAA,IAAA,MAAA,KPVH,6B3B8lJJ,gCkChlJG,YAAA,EjCmmJF,uBAAwB,I0B1nJxB,0BAAA,I3B4mJD,4BkC3kJG,+BjC8lJF,wBAAyB,IACzB,2BAA4B,IiC3lJxB,uBAFA,uBAGA,0BAFA,0BlCilJL,QAAA,EkCzkJG,MAAA,QjC4lJF,iBAAkB,KAClB,aAAc,KAEhB,sBiC1lJM,4BAFA,4BjC6lJN,yBiC1lJM,+BAFA,+BAGA,QAAA,ElC8kJL,MAAA,KkCroJC,OAAQ,QjCwpJR,iBAAkB,QAClB,aAAc,QiCtlJV,wBAEA,8BADA,8BjCulJN,2BiCzlJM,iCjC0lJN,iCDZC,MAAA,KkClkJC,OAAQ,YjCqlJR,iBAAkB,KkChqJd,aAAA,KAEA,oBnCipJL,uBmC/oJG,QAAA,KAAA,KlCkqJF,UAAW,K0B7pJX,YAAA,U3B+oJD,gCmC9oJG,mClCiqJF,uBAAwB,I0B1qJxB,0BAAA,I3B4pJD,+BkC7kJD,kCjCgmJE,wBAAyB,IkChrJrB,2BAAA,IAEA,oBnCiqJL,uBmC/pJG,QAAA,IAAA,KlCkrJF,UAAW,K0B7qJX,YAAA,I3B+pJD,gCmC9pJG,mClCirJF,uBAAwB,I0B1rJxB,0BAAA,I3B4qJD,+BoC9qJD,kCACE,wBAAA,IACA,2BAAA,IAEA,OpCgrJD,aAAA,EoCprJC,OAAQ,KAAK,EAOX,WAAA,OpCgrJH,WAAA,KCmBD,UmChsJM,QAAA,OAEA,YACA,eACA,QAAA,apCirJL,QAAA,IAAA,KoC/rJC,iBAAkB,KnCktJlB,OAAQ,IAAI,MAAM,KmC/rJd,cAAA,KAnBN,kBpCosJC,kBCmBC,gBAAiB,KmC5rJb,iBAAA,KA3BN,eAAA,kBAkCM,MAAA,MAlCN,mBAAA,sBnCguJE,MAAO,KmCrrJH,mBAEA,yBADA,yBpCwqJL,sBqCrtJC,MAAO,KACP,OAAA,YACA,iBAAA,KAEA,OACA,QAAA,OACA,QAAA,KAAA,KAAA,KACA,UAAA,IACA,YAAA,IACA,YAAA,EACA,MAAA,KrCutJD,WAAA,OqCntJG,YAAA,OpCsuJF,eAAgB,SoCpuJZ,cAAA,MrCutJL,cqCrtJK,cAKJ,MAAA,KACE,gBAAA,KrCktJH,OAAA,QqC7sJG,aACA,QAAA,KAOJ,YCtCE,SAAA,StCkvJD,IAAA,KCmBD,eqChwJM,iBAAA,KALJ,2BD0CF,2BrC+sJC,iBAAA,QCmBD,eqCvwJM,iBAAA,QALJ,2BD8CF,2BrCktJC,iBAAA,QCmBD,eqC9wJM,iBAAA,QALJ,2BDkDF,2BrCqtJC,iBAAA,QCmBD,YqCrxJM,iBAAA,QALJ,wBDsDF,wBrCwtJC,iBAAA,QCmBD,eqC5xJM,iBAAA,QALJ,2BD0DF,2BrC2tJC,iBAAA,QCmBD,cqCnyJM,iBAAA,QCDJ,0BADF,0BAEE,iBAAA,QAEA,OACA,QAAA,aACA,UAAA,KACA,QAAA,IAAA,IACA,UAAA,KACA,YAAA,IACA,YAAA,EACA,MAAA,KACA,WAAA,OvCwxJD,YAAA,OuCrxJC,eAAA,OACE,iBAAA,KvCuxJH,cAAA,KuClxJG,aACA,QAAA,KAGF,YtCqyJA,SAAU,SsCnyJR,IAAA,KAMA,0BvC+wJH,eCmBC,IAAK,EsChyJD,QAAA,IAAA,IvCmxJL,cuCjxJK,cAKJ,MAAA,KtC+xJA,gBAAiB,KsC7xJf,OAAA,QvC+wJH,+BuC3wJC,4BACE,MAAA,QvC6wJH,iBAAA,KuCzwJG,wBvC4wJH,MAAA,MuCxwJG,+BvC2wJH,aAAA,IwCp0JC,uBACA,YAAA,IAEA,WACA,YAAA,KxCu0JD,eAAA,KwC50JC,cAAe,KvC+1Jf,MAAO,QuCt1JL,iBAAA,KAIA,eAbJ,cAcI,MAAA,QxCu0JH,awCr1JC,cAAe,KAmBb,UAAA,KxCq0JH,YAAA,ICmBD,cuCn1JI,iBAAA,QAEA,sBxCo0JH,4BwC91JC,cAAe,KA8Bb,aAAA,KxCm0JH,cAAA,IwChzJD,sBAfI,UAAA,KxCo0JD,oCwCj0JC,WvCo1JA,YAAa,KuCl1JX,eAAA,KxCo0JH,sBwC1zJD,4BvC60JE,cAAe,KuCj1Jb,aAAA,KC5CJ,ezC+2JD,cyC92JC,UAAA,MAGA,WACA,QAAA,MACA,QAAA,IACA,cAAA,KrCiLA,YAAA,WACK,iBAAA,KACG,OAAA,IAAA,MAAA,KJisJT,cAAA,IyC33JC,mBAAoB,OAAO,IAAI,YxC84J1B,cAAe,OAAO,IAAI,YwCj4J7B,WAAA,OAAA,IAAA,YAKF,iBzC82JD,eCmBC,aAAc,KACd,YAAa,KwC13JX,mBA1BJ,kBzCq4JC,kByC12JG,aAAA,QCzBJ,oBACE,QAAA,IACA,MAAA,KAEA,O1Cy4JD,QAAA,K0C74JC,cAAe,KAQb,OAAA,IAAA,MAAA,YAEA,cAAA,IAVJ,UAeI,WAAA,E1Cq4JH,MAAA,QCmBD,mByCl5JI,YAAA,IArBJ,SAyBI,U1Ck4JH,cAAA,ECmBD,WyC34JE,WAAA,IAFF,mBAAA,mBAMI,cAAA,KAEA,0BACA,0B1C43JH,SAAA,S0Cp3JC,IAAK,KCvDL,MAAA,MACA,MAAA,Q3C+6JD,e0Cz3JC,MAAO,QClDL,iBAAA,Q3C86JH,aAAA,Q2C36JG,kB3C86JH,iBAAA,Q2Ct7JC,2BACA,MAAA,Q3C07JD,Y0Ch4JC,MAAO,QCtDL,iBAAA,Q3Cy7JH,aAAA,Q2Ct7JG,e3Cy7JH,iBAAA,Q2Cj8JC,wBACA,MAAA,Q3Cq8JD,e0Cv4JC,MAAO,QC1DL,iBAAA,Q3Co8JH,aAAA,Q2Cj8JG,kB3Co8JH,iBAAA,Q2C58JC,2BACA,MAAA,Q3Cg9JD,c0C94JC,MAAO,QC9DL,iBAAA,Q3C+8JH,aAAA,Q2C58JG,iB3C+8JH,iBAAA,Q4Ch9JC,0BAAQ,MAAA,QACR,wCAAQ,K5Cs9JP,oBAAA,KAAA,E4Cl9JD,GACA,oBAAA,EAAA,GACA,mCAAQ,K5Cw9JP,oBAAA,KAAA,E4C19JD,GACA,oBAAA,EAAA,GACA,gCAAQ,K5Cw9JP,oBAAA,KAAA,E4Ch9JD,GACA,oBAAA,EAAA,GAGA,UACA,OAAA,KxCsCA,cAAA,KACQ,SAAA,OJ86JT,iBAAA,Q4Ch9JC,cAAe,IACf,mBAAA,MAAA,EAAA,IAAA,IAAA,eACA,WAAA,MAAA,EAAA,IAAA,IAAA,eAEA,cACA,MAAA,KACA,MAAA,EACA,OAAA,KACA,UAAA,KxCyBA,YAAA,KACQ,MAAA,KAyHR,WAAA,OACK,iBAAA,QACG,mBAAA,MAAA,EAAA,KAAA,EAAA,gBJk0JT,WAAA,MAAA,EAAA,KAAA,EAAA,gB4C78JC,mBAAoB,MAAM,IAAI,K3Cw+JzB,cAAe,MAAM,IAAI,K4Cv+J5B,WAAA,MAAA,IAAA,KDEF,sBCAE,gCDAF,iBAAA,yK5Ci9JD,iBAAA,oK4C18JC,iBAAiB,iK3Cs+JjB,wBAAyB,KAAK,KGlhK9B,gBAAA,KAAA,KJ4/JD,qBI1/JS,+BwCmDR,kBAAmB,qBAAqB,GAAG,OAAO,SErElD,aAAA,qBAAA,GAAA,OAAA,S9C+gKD,UAAA,qBAAA,GAAA,OAAA,S6C59JG,sBACA,iBAAA,Q7Cg+JH,wC4C38JC,iBAAkB,yKEzElB,iBAAA,oK9CuhKD,iBAAA,iK6Cp+JG,mBACA,iBAAA,Q7Cw+JH,qC4C/8JC,iBAAkB,yKE7ElB,iBAAA,oK9C+hKD,iBAAA,iK6C5+JG,sBACA,iBAAA,Q7Cg/JH,wC4Cn9JC,iBAAkB,yKEjFlB,iBAAA,oK9CuiKD,iBAAA,iK6Cp/JG,qBACA,iBAAA,Q7Cw/JH,uC+C/iKC,iBAAkB,yKAElB,iBAAA,oK/CgjKD,iBAAA,iK+C7iKG,O/CgjKH,WAAA,KC4BD,mB8CtkKE,WAAA,E/C+iKD,O+C3iKD,YACE,SAAA,O/C6iKD,KAAA,E+CziKC,Y/C4iKD,MAAA,Q+CxiKG,c/C2iKH,QAAA,MC4BD,4B8CjkKE,UAAA,KAGF,aAAA,mBAEE,aAAA,KAGF,YAAA,kB9CkkKE,cAAe,K8C3jKjB,YAHE,Y/CuiKD,a+CniKC,QAAA,W/CsiKD,eAAA,I+CliKC,c/CqiKD,eAAA,O+ChiKC,cACA,eAAA,OAMF,eACE,WAAA,EACA,cAAA,ICvDF,YAEE,aAAA,EACA,WAAA,KAQF,YACE,aAAA,EACA,cAAA,KAGA,iBACA,SAAA,SACA,QAAA,MhDglKD,QAAA,KAAA,KgD7kKC,cAAA,KrB3BA,iBAAA,KACC,OAAA,IAAA,MAAA,KqB6BD,6BACE,uBAAA,IrBvBF,wBAAA,I3BymKD,4BgDvkKC,cAAe,E/CmmKf,2BAA4B,I+CjmK5B,0BAAA,IAFF,kBAAA,uBAKI,MAAA,KAIF,2CAAA,gD/CmmKA,MAAO,K+C/lKL,wBAFA,wBhD4kKH,6BgD3kKG,6BAKF,MAAO,KACP,gBAAA,KACA,iBAAA,QAKA,uB/C+lKA,MAAO,KACP,WAAY,K+C5lKV,0BhDskKH,gCgDrkKG,gCALF,MAAA,K/CsmKA,OAAQ,YACR,iBAAkB,KDxBnB,mDgD/kKC,yDAAA,yD/C4mKA,MAAO,QDxBR,gDgDnkKC,sDAAA,sD/CgmKA,MAAO,K+C5lKL,wBAEA,8BADA,8BhDskKH,QAAA,EgD3kKC,MAAA,K/CumKA,iBAAkB,QAClB,aAAc,QAEhB,iDDpBC,wDCuBD,uDADA,uD+C5mKE,8DAYI,6D/C+lKN,uD+C3mKE,8D/C8mKF,6DAKE,MAAO,QDxBR,8CiD7qKG,oDADF,oDAEE,MAAA,QAEA,yBhD0sKF,MAAO,QgDxsKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhD2sKJ,MAAO,QDtBR,gCiDnrKO,gCAGF,qCAFE,qChD8sKN,MAAO,QACP,iBAAkB,QAEpB,iCgD1sKQ,uCAFA,uChD6sKR,sCDtBC,4CiDtrKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,sBhDuuKF,MAAO,QgDruKH,iBAAA,QAFF,uBAAA,4BAKI,MAAA,QAGF,gDAAA,qDhDwuKJ,MAAO,QDtBR,6BiDhtKO,6BAGF,kCAFE,kChD2uKN,MAAO,QACP,iBAAkB,QAEpB,8BgDvuKQ,oCAFA,oChD0uKR,mCDtBC,yCiDntKO,yCArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,yBhDowKF,MAAO,QgDlwKH,iBAAA,QAFF,0BAAA,+BAKI,MAAA,QAGF,mDAAA,wDhDqwKJ,MAAO,QDtBR,gCiD7uKO,gCAGF,qCAFE,qChDwwKN,MAAO,QACP,iBAAkB,QAEpB,iCgDpwKQ,uCAFA,uChDuwKR,sCDtBC,4CiDhvKO,4CArBN,MAAA,KACE,iBAAA,QACA,aAAA,QAEA,wBhDiyKF,MAAO,QgD/xKH,iBAAA,QAFF,yBAAA,8BAKI,MAAA,QAGF,kDAAA,uDhDkyKJ,MAAO,QDtBR,+BiD1wKO,+BAGF,oCAFE,oChDqyKN,MAAO,QACP,iBAAkB,QAEpB,gCgDjyKQ,sCAFA,sChDoyKR,qCDtBC,2CiD7wKO,2CDkGN,MAAO,KACP,iBAAA,QACA,aAAA,QAEF,yBACE,WAAA,EACA,cAAA,IE1HF,sBACE,cAAA,EACA,YAAA,IAEA,O9C0DA,cAAA,KACQ,iBAAA,KJgvKT,OAAA,IAAA,MAAA,YkDtyKC,cAAe,IACf,mBAAA,EAAA,IAAA,IAAA,gBlDwyKD,WAAA,EAAA,IAAA,IAAA,gBkDlyKC,YACA,QAAA,KvBnBC,e3B0zKF,QAAA,KAAA,KkDzyKC,cAAe,IAAI,MAAM,YAMvB,uBAAA,IlDsyKH,wBAAA,IkDhyKC,0CACA,MAAA,QAEA,alDmyKD,WAAA,EkDvyKC,cAAe,EjDm0Kf,UAAW,KACX,MAAO,QDtBR,oBkD7xKC,sBjDqzKF,eiD3zKI,mBAKJ,qBAEE,MAAA,QvBvCA,cACC,QAAA,KAAA,K3By0KF,iBAAA,QkDxxKC,WAAY,IAAI,MAAM,KjDozKtB,2BAA4B,IiDjzK1B,0BAAA,IAHJ,mBAAA,mCAMM,cAAA,ElD2xKL,oCkDtxKG,oDjDkzKF,aAAc,IAAI,EiDhzKZ,cAAA,EvBtEL,4D3Bg2KF,4EkDpxKG,WAAA,EjDgzKF,uBAAwB,IiD9yKlB,wBAAA,IvBtEL,0D3B81KF,0EkD7yKC,cAAe,EvB1Df,2BAAA,IACC,0BAAA,IuB0FH,+EAEI,uBAAA,ElDixKH,wBAAA,EkD7wKC,wDlDgxKD,iBAAA,EC4BD,0BACE,iBAAkB,EiDryKpB,8BlD6wKC,ckD7wKD,gCjD0yKE,cAAe,EiD1yKjB,sCAQM,sBlD2wKL,wCC4BC,cAAe,K0Bx5Kf,aAAA,KuByGF,wDlDwxKC,0BC4BC,uBAAwB,IACxB,wBAAyB,IiDrzK3B,yFAoBQ,yFlD2wKP,2DkD5wKO,2DjDwyKN,uBAAwB,IACxB,wBAAyB,IAK3B,wGiDj0KA,wGjD+zKA,wGDtBC,wGCuBD,0EiDh0KA,0EjD8zKA,0EiDtyKU,0EjD8yKR,uBAAwB,IAK1B,uGiD30KA,uGjDy0KA,uGDtBC,uGCuBD,yEiD10KA,yEjDw0KA,yEiD5yKU,yEvB7HR,wBAAA,IuBiGF,sDlDwzKC,yBC4BC,2BAA4B,IAC5B,0BAA2B,IiD3yKrB,qFA1CR,qFAyCQ,wDlDsxKP,wDC4BC,2BAA4B,IAC5B,0BAA2B,IAG7B,oGDtBC,oGCwBD,oGiDj2KA,oGjD81KA,uEiDhzKU,uEjDkzKV,uEiDh2KA,uEjDs2KE,0BAA2B,IAG7B,mGDtBC,mGCwBD,mGiD32KA,mGjDw2KA,sEiDtzKU,sEjDwzKV,sEiD12KA,sEjDg3KE,2BAA4B,IiDrzK1B,0BlD8xKH,qCkDz1KD,0BAAA,qCA+DI,WAAA,IAAA,MAAA,KA/DJ,kDAAA,kDAmEI,WAAA,EAnEJ,uBAAA,yCjD83KE,OAAQ,EiDpzKA,+CjDwzKV,+CiDl4KA,+CjDo4KA,+CAEA,+CANA,+CDjBC,iECoBD,iEiDn4KA,iEjDq4KA,iEAEA,iEANA,iEAWE,YAAa,EiD9zKL,8CjDk0KV,8CiDh5KA,8CjDk5KA,8CAEA,8CANA,8CDjBC,gECoBD,gEiDj5KA,gEjDm5KA,gEAEA,gEANA,gEAWE,aAAc,EAIhB,+CiD95KA,+CjD45KA,+CiDr0KU,+CjDw0KV,iEiD/5KA,iEjD65KA,iEDtBC,iEC6BC,cAAe,EAEjB,8CiDt0KU,8CjDw0KV,8CiDx6KA,8CjDu6KA,gEDtBC,gECwBD,gEiDn0KI,gEACA,cAAA,EAUJ,yBACE,cAAA,ElDsyKD,OAAA,EkDlyKG,aACA,cAAA,KANJ,oBASM,cAAA,ElDqyKL,cAAA,IkDhyKG,2BlDmyKH,WAAA,IC4BD,4BiD3zKM,cAAA,EAKF,wDAvBJ,wDlDwzKC,WAAA,IAAA,MAAA,KkD/xKK,2BlDkyKL,WAAA,EmDrhLC,uDnDwhLD,cAAA,IAAA,MAAA,KmDrhLG,eACA,aAAA,KnDyhLH,8BmD3hLC,MAAA,KAMI,iBAAA,QnDwhLL,aAAA,KmDrhLK,0DACA,iBAAA,KAGJ,qCAEI,MAAA,QnDshLL,iBAAA,KmDviLC,yDnD0iLD,oBAAA,KmDviLG,eACA,aAAA,QnD2iLH,8BmD7iLC,MAAA,KAMI,iBAAA,QnD0iLL,aAAA,QmDviLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnDwiLL,iBAAA,KmDzjLC,yDnD4jLD,oBAAA,QmDzjLG,eACA,aAAA,QnD6jLH,8BmD/jLC,MAAA,QAMI,iBAAA,QnD4jLL,aAAA,QmDzjLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnD0jLL,iBAAA,QmD3kLC,yDnD8kLD,oBAAA,QmD3kLG,YACA,aAAA,QnD+kLH,2BmDjlLC,MAAA,QAMI,iBAAA,QnD8kLL,aAAA,QmD3kLK,uDACA,iBAAA,QAGJ,kCAEI,MAAA,QnD4kLL,iBAAA,QmD7lLC,sDnDgmLD,oBAAA,QmD7lLG,eACA,aAAA,QnDimLH,8BmDnmLC,MAAA,QAMI,iBAAA,QnDgmLL,aAAA,QmD7lLK,0DACA,iBAAA,QAGJ,qCAEI,MAAA,QnD8lLL,iBAAA,QmD/mLC,yDnDknLD,oBAAA,QmD/mLG,cACA,aAAA,QnDmnLH,6BmDrnLC,MAAA,QAMI,iBAAA,QnDknLL,aAAA,QmD/mLK,yDACA,iBAAA,QAGJ,oCAEI,MAAA,QnDgnLL,iBAAA,QoD/nLC,wDACA,oBAAA,QAEA,kBACA,SAAA,SpDkoLD,QAAA,MoDvoLC,OAAQ,EnDmqLR,QAAS,EACT,SAAU,OAEZ,yCmDzpLI,wBADA,yBAEA,yBACA,wBACA,SAAA,SACA,IAAA,EACA,OAAA,EpDkoLH,KAAA,EoD7nLC,MAAO,KACP,OAAA,KpD+nLD,OAAA,EoD1nLC,wBpD6nLD,eAAA,OqDvpLC,uBACA,eAAA,IAEA,MACA,WAAA,KACA,QAAA,KjDwDA,cAAA,KACQ,iBAAA,QJmmLT,OAAA,IAAA,MAAA,QqDlqLC,cAAe,IASb,mBAAA,MAAA,EAAA,IAAA,IAAA,gBACA,WAAA,MAAA,EAAA,IAAA,IAAA,gBAKJ,iBACE,aAAA,KACA,aAAA,gBAEF,SACE,QAAA,KACA,cAAA,ICtBF,SACE,QAAA,IACA,cAAA,IAEA,OACA,MAAA,MACA,UAAA,KjCRA,YAAA,IAGA,YAAA,ErBwrLD,MAAA,KsDhrLC,YAAA,EAAA,IAAA,EAAA,KrD4sLA,OAAQ,kBqD1sLN,QAAA,GjCbF,aiCeE,ajCZF,MAAA,KrBgsLD,gBAAA,KsD5qLC,OAAA,QACE,OAAA,kBACA,QAAA,GAEA,aACA,mBAAA,KtD8qLH,QAAA,EuDnsLC,OAAQ,QACR,WAAA,IvDqsLD,OAAA,EuDhsLC,YACA,SAAA,OAEA,OACA,SAAA,MACA,IAAA,EACA,MAAA,EACA,OAAA,EACA,KAAA,EAIA,QAAA,KvDgsLD,QAAA,KuD7rLC,SAAA,OnD+GA,2BAAA,MACI,QAAA,EAEI,0BAkER,mBAAA,kBAAA,IAAA,SAEK,cAAA,aAAA,IAAA,SACG,WAAA,UAAA,IAAA,SJghLT,kBAAA,kBuDnsLC,cAAA,kBnD2GA,aAAA,kBACI,UAAA,kBAEI,wBJ2lLT,kBAAA,euDvsLK,cAAe,eACnB,aAAA,eACA,UAAA,eAIF,mBACE,WAAA,OACA,WAAA,KvDwsLD,cuDnsLC,SAAU,SACV,MAAA,KACA,OAAA,KAEA,eACA,SAAA,SnDaA,iBAAA,KACQ,wBAAA,YmDZR,gBAAA,YtD+tLA,OsD/tLA,IAAA,MAAA,KAEA,OAAA,IAAA,MAAA,evDqsLD,cAAA,IuDjsLC,QAAS,EACT,mBAAA,EAAA,IAAA,IAAA,eACA,WAAA,EAAA,IAAA,IAAA,eAEA,gBACA,SAAA,MACA,IAAA,EACA,MAAA,EvDmsLD,OAAA,EuDjsLC,KAAA,ElCrEA,QAAA,KAGA,iBAAA,KkCmEA,qBlCtEA,OAAA,iBAGA,QAAA,EkCwEF,mBACE,OAAA,kBACA,QAAA,GAIF,cACE,QAAA,KvDmsLD,cAAA,IAAA,MAAA,QuD9rLC,qBACA,WAAA,KAKF,aACE,OAAA,EACA,YAAA,WAIF,YACE,SAAA,SACA,QAAA,KvD6rLD,cuD/rLC,QAAS,KAQP,WAAA,MACA,WAAA,IAAA,MAAA,QATJ,wBAaI,cAAA,EvDyrLH,YAAA,IuDrrLG,mCvDwrLH,YAAA,KuDlrLC,oCACA,YAAA,EAEA,yBACA,SAAA,SvDqrLD,IAAA,QuDnqLC,MAAO,KAZP,OAAA,KACE,SAAA,OvDmrLD,yBuDhrLD,cnDvEA,MAAA,MACQ,OAAA,KAAA,KmD2ER,eAAY,mBAAA,EAAA,IAAA,KAAA,evDkrLX,WAAA,EAAA,IAAA,KAAA,euD5qLD,UAFA,MAAA,OvDorLD,yBwDl0LC,UACA,MAAA,OCNA,SAEA,SAAA,SACA,QAAA,KACA,QAAA,MACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KACA,eAAA,ODHA,WAAA,OnCVA,aAAA,OAGA,UAAA,OrBy1LD,YAAA,OwD90LC,OAAA,iBnCdA,QAAA,ErBg2LD,WAAA,KwDj1LY,YAAmB,OAAA,kBxDq1L/B,QAAA,GwDp1LY,aAAmB,QAAA,IAAA,ExDw1L/B,WAAA,KwDv1LY,eAAmB,QAAA,EAAA,IxD21L/B,YAAA,IwD11LY,gBAAmB,QAAA,IAAA,ExD81L/B,WAAA,IwDz1LC,cACA,QAAA,EAAA,IACA,YAAA,KAEA,eACA,UAAA,MxD41LD,QAAA,IAAA,IwDx1LC,MAAO,KACP,WAAA,OACA,iBAAA,KACA,cAAA,IAEA,exD01LD,SAAA,SwDt1LC,MAAA,EACE,OAAA,EACA,aAAA,YACA,aAAA,MAEA,4BxDw1LH,OAAA,EwDt1LC,KAAA,IACE,YAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,iCxDw1LH,MAAA,IwDt1LC,OAAA,EACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,kCxDw1LH,OAAA,EwDt1LC,KAAA,IACE,cAAA,KACA,aAAA,IAAA,IAAA,EACA,iBAAA,KAEA,8BxDw1LH,IAAA,IwDt1LC,KAAA,EACE,WAAA,KACA,aAAA,IAAA,IAAA,IAAA,EACA,mBAAA,KAEA,6BxDw1LH,IAAA,IwDt1LC,MAAA,EACE,WAAA,KACA,aAAA,IAAA,EAAA,IAAA,IACA,kBAAA,KAEA,+BxDw1LH,IAAA,EwDt1LC,KAAA,IACE,YAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,oCxDw1LH,IAAA,EwDt1LC,MAAA,IACE,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,qCxDw1LH,IAAA,E0Dr7LC,KAAM,IACN,WAAA,KACA,aAAA,EAAA,IAAA,IACA,oBAAA,KAEA,SACA,SAAA,SACA,IAAA,EDXA,KAAA,EAEA,QAAA,KACA,QAAA,KACA,UAAA,MACA,QAAA,IACA,YAAA,iBAAA,UAAA,MAAA,WACA,UAAA,KACA,WAAA,OACA,YAAA,IACA,YAAA,WACA,WAAA,KACA,WAAA,MACA,gBAAA,KACA,YAAA,KACA,eAAA,KCAA,eAAA,OAEA,WAAA,OACA,aAAA,OAAA,UAAA,OACA,YAAA,OACA,iBAAA,KACA,wBAAA,YtD8CA,gBAAA,YACQ,OAAA,IAAA,MAAA,KJq5LT,OAAA,IAAA,MAAA,e0Dh8LC,cAAA,IAAY,mBAAA,EAAA,IAAA,KAAA,e1Dm8Lb,WAAA,EAAA,IAAA,KAAA,e0Dl8La,WAAA,KACZ,aAAY,WAAA,MACZ,eAAY,YAAA,KAGd,gBACE,WAAA,KAEA,cACA,YAAA,MAEA,e1Dw8LD,QAAA,IAAA,K0Dr8LC,OAAQ,EACR,UAAA,K1Du8LD,iBAAA,Q0D/7LC,cAAA,IAAA,MAAA,QzD49LA,cAAe,IAAI,IAAI,EAAE,EyDz9LvB,iBACA,QAAA,IAAA,KAEA,gBACA,sB1Di8LH,SAAA,S0D97LC,QAAS,MACT,MAAA,E1Dg8LD,OAAA,E0D97LC,aAAc,YACd,aAAA,M1Di8LD,gB0D57LC,aAAA,KAEE,sBACA,QAAA,GACA,aAAA,KAEA,oB1D87LH,OAAA,M0D77LG,KAAA,IACE,YAAA,MACA,iBAAA,KACA,iBAAA,gBACA,oBAAA,E1Dg8LL,0B0D57LC,OAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,KACA,oBAAA,EAEA,sB1D87LH,IAAA,I0D77LG,KAAA,MACE,WAAA,MACA,mBAAA,KACA,mBAAA,gBACA,kBAAA,E1Dg8LL,4B0D57LC,OAAA,MACE,KAAA,IACA,QAAA,IACA,mBAAA,KACA,kBAAA,EAEA,uB1D87LH,IAAA,M0D77LG,KAAA,IACE,YAAA,MACA,iBAAA,EACA,oBAAA,KACA,oBAAA,gB1Dg8LL,6B0D37LC,IAAA,IACE,YAAA,MACA,QAAA,IACA,iBAAA,EACA,oBAAA,KAEA,qB1D67LH,IAAA,I0D57LG,MAAA,MACE,WAAA,MACA,mBAAA,EACA,kBAAA,KACA,kBAAA,gB1D+7LL,2B2DvjMC,MAAO,IACP,OAAA,M3DyjMD,QAAA,I2DtjMC,mBAAoB,EACpB,kBAAA,KAEA,U3DwjMD,SAAA,S2DrjMG,gBACA,SAAA,SvD6KF,MAAA,KACK,SAAA,OJ64LN,sB2DlkMC,SAAU,S1D+lMV,QAAS,K0DjlML,mBAAA,IAAA,YAAA,K3DwjML,cAAA,IAAA,YAAA,K2D9hMC,WAAA,IAAA,YAAA,KvDmKK,4BAFL,0BAGQ,YAAA,EA3JA,qDA+GR,sBAEQ,mBAAA,kBAAA,IAAA,YJi7LP,cAAA,aAAA,IAAA,Y2D5jMG,WAAA,UAAA,IAAA,YvDmHJ,4BAAA,OACQ,oBAAA,OuDjHF,oBAAA,O3D+jML,YAAA,OI/8LD,mCHy+LA,2BGx+LQ,KAAA,EuD5GF,kBAAA,sB3DgkML,UAAA,sBC2BD,kCADA,2BG/+LA,KAAA,EACQ,kBAAA,uBuDtGF,UAAA,uBArCN,6B3DumMD,gC2DvmMC,iC1DkoME,KAAM,E0DrlMN,kBAAA,mB3D+jMH,UAAA,oBAGA,wB2D/mMD,sBAAA,sBAsDI,QAAA,MAEA,wB3D6jMH,KAAA,E2DzjMG,sB3D4jMH,sB2DxnMC,SAAU,SA+DR,IAAA,E3D4jMH,MAAA,KC0BD,sB0DllMI,KAAA,KAnEJ,sBAuEI,KAAA,MAvEJ,2BA0EI,4B3D2jMH,KAAA,E2DljMC,6BACA,KAAA,MAEA,8BACA,KAAA,KtC3FA,kBsC6FA,SAAA,SACA,IAAA,EACA,OAAA,EACA,KAAA,EACA,MAAA,I3DsjMD,UAAA,K2DjjMC,MAAA,KdnGE,WAAA,OACA,YAAA,EAAA,IAAA,IAAA,eACA,iBAAA,cAAA,OAAA,kBACA,QAAA,G7CwpMH,uB2DrjMC,iBAAA,sEACE,iBAAA,iEACA,iBAAA,uFdxGA,iBAAA,kEACA,OAAA,+GACA,kBAAA,SACA,wBACA,MAAA,E7CgqMH,KAAA,K2DvjMC,iBAAA,sE1DmlMA,iBAAiB,iE0DjlMf,iBAAA,uFACA,iBAAA,kEACA,OAAA,+GtCvHF,kBAAA,SsCyFF,wB3DylMC,wBC4BC,MAAO,KACP,gBAAiB,KACjB,OAAQ,kB0DhlMN,QAAA,EACA,QAAA,G3D2jMH,0C2DnmMD,2CA2CI,6BADA,6B1DqlMF,SAAU,S0DhlMR,IAAA,IACA,QAAA,E3DwjMH,QAAA,a2DxmMC,WAAY,MAqDV,0CADA,6B3DyjMH,KAAA,I2D7mMC,YAAa,MA0DX,2CADA,6BAEA,MAAA,IACA,aAAA,MAME,6BADF,6B3DsjMH,MAAA,K2DjjMG,OAAA,KACE,YAAA,M3DmjML,YAAA,E2DxiMC,oCACA,QAAA,QAEA,oCACA,QAAA,QAEA,qBACA,SAAA,SACA,OAAA,K3D2iMD,KAAA,I2DpjMC,QAAS,GAYP,MAAA,IACA,aAAA,EACA,YAAA,KACA,WAAA,OACA,WAAA,KAEA,wBACA,QAAA,aAWA,MAAA,KACA,OAAA,K3DiiMH,OAAA,I2DhkMC,YAAa,OAkCX,OAAA,QACA,iBAAA,OACA,iBAAA,cACA,OAAA,IAAA,MAAA,K3DiiMH,cAAA,K2DzhMC,6BACA,MAAA,KACA,OAAA,KACA,OAAA,EACA,iBAAA,KAEA,kBACA,SAAA,SACA,MAAA,IACA,OAAA,K3D4hMD,KAAA,I2D3hMC,QAAA,GACE,YAAA,K3D6hMH,eAAA,K2Dp/LC,MAAO,KAhCP,WAAA,O1DijMA,YAAa,EAAE,IAAI,IAAI,eAEzB,uB0D9iMM,YAAA,KAEA,oCACA,0C3DshMH,2C2D9hMD,6BAAA,6BAYI,MAAA,K3DshMH,OAAA,K2DliMD,WAAA,M1D8jME,UAAW,KDxBZ,0C2DjhMD,6BACE,YAAA,MAEA,2C3DmhMD,6B2D/gMD,aAAA,M3DkhMC,kBACF,MAAA,I4DhxMC,KAAA,I3D4yME,eAAgB,KAElB,qBACE,OAAQ,MAkBZ,qCADA,sCADA,mBADA,oBAXA,gBADA,iBAOA,uBADA,wBADA,iBADA,kBADA,wBADA,yBASA,mCADA,oC2DvzME,oBAAA,qBAAA,oBAAA,qB3D8zMF,WADA,YAOA,uBADA,wBADA,qBADA,sBADA,cADA,e2Dl0MI,a3Dw0MJ,cDvBC,kB4DhzMG,mB3DwzMJ,WADA,YAwBE,QAAS,MACT,QAAS,IASX,qCADA,mBANA,gBAGA,uBADA,iBADA,wBAIA,mCDhBC,oB6Dl1MC,oB5Dq2MF,W+B/1MA,uBhCu0MC,qB4D/zMG,cChBF,aACA,kB5Dk2MF,W+Bx1ME,MAAO,KhC40MR,cgCz0MC,QAAS,MACT,aAAA,KhC20MD,YAAA,KgCl0MC,YhCq0MD,MAAA,gBgCl0MC,WhCq0MD,MAAA,egCl0MC,MhCq0MD,QAAA,e8D51MC,MACA,QAAA,gBAEA,WACA,WAAA,O9B8BF,WACE,KAAA,EAAA,EAAA,EhCm0MD,MAAA,YgC5zMC,YAAa,KACb,iBAAA,YhC8zMD,OAAA,E+D91MC,Q/Di2MD,QAAA,eC4BD,OACE,SAAU,M+Dt4MV,chE+2MD,MAAA,aC+BD,YADA,YADA,YADA,YAIE,QAAS,e+Dv5MT,kBhEy4MC,mBgEx4MD,yBhEo4MD,kB+Dr1MD,mBA6IA,yB9D+tMA,kBACA,mB8Dp3ME,yB9Dg3MF,kBACA,mBACA,yB+D15MY,QAAA,eACV,yBAAU,YhE64MT,QAAA,gBC4BD,iB+Dv6MU,QAAA,gBhEg5MX,c+D/1MG,QAAS,oB/Dm2MV,c+Dr2MC,c/Ds2MH,QAAA,sB+Dj2MG,yB/Dq2MD,kBACF,QAAA,iB+Dj2MG,yB/Dq2MD,mBACF,QAAA,kBgEn6MC,yBhEu6MC,yBgEt6MD,QAAA,wBACA,+CAAU,YhE26MT,QAAA,gBC4BD,iB+Dr8MU,QAAA,gBhE86MX,c+Dx2MG,QAAS,oB/D42MV,c+D92MC,c/D+2MH,QAAA,sB+D12MG,+C/D82MD,kBACF,QAAA,iB+D12MG,+C/D82MD,mBACF,QAAA,kBgEj8MC,+ChEq8MC,yBgEp8MD,QAAA,wBACA,gDAAU,YhEy8MT,QAAA,gBC4BD,iB+Dn+MU,QAAA,gBhE48MX,c+Dj3MG,QAAS,oB/Dq3MV,c+Dv3MC,c/Dw3MH,QAAA,sB+Dn3MG,gD/Du3MD,kBACF,QAAA,iB+Dn3MG,gD/Du3MD,mBACF,QAAA,kBgE/9MC,gDhEm+MC,yBgEl+MD,QAAA,wBACA,0BAAU,YhEu+MT,QAAA,gBC4BD,iB+DjgNU,QAAA,gBhE0+MX,c+D13MG,QAAS,oB/D83MV,c+Dh4MC,c/Di4MH,QAAA,sB+D53MG,0B/Dg4MD,kBACF,QAAA,iB+D53MG,0B/Dg4MD,mBACF,QAAA,kBgEr/MC,0BhEy/MC,yBACF,QAAA,wBgE1/MC,yBhE8/MC,WACF,QAAA,gBgE//MC,+ChEmgNC,WACF,QAAA,gBgEpgNC,gDhEwgNC,WACF,QAAA,gBAGA,0B+Dn3MC,WA4BE,QAAS,gBC5LX,eAAU,QAAA,eACV,aAAU,ehE4hNT,QAAA,gBC4BD,oB+DtjNU,QAAA,gBhE+hNX,iB+Dj4MG,QAAS,oBAMX,iB/D83MD,iB+Dz2MG,QAAS,sB/D82MZ,qB+Dl4MC,QAAS,e/Dq4MV,a+D/3MC,qBAcE,QAAS,iB/Ds3MZ,sB+Dn4MC,QAAS,e/Ds4MV,a+Dh4MC,sBAOE,QAAS,kB/D83MZ,4B+D/3MC,QAAS,eCpLT,ahEujNC,4BACF,QAAA,wBC6BD,aACE,cACE,QAAS"} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrapValidator.min.css b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrapValidator.min.css new file mode 100644 index 0000000..62d7b59 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/bootstrapValidator.min.css @@ -0,0 +1,12 @@ +/*! + * BootstrapValidator (http://bootstrapvalidator.com) + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.5.3, built on 2014-11-05 9:14:18 PM + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license Commercial: http://bootstrapvalidator.com/license/ + * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ + */ + +.bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100} \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/font-awesome.min.css b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/font-awesome.min.css new file mode 100644 index 0000000..885b384 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/css/font-awesome.min.css @@ -0,0 +1,4 @@ +/*! + * Font Awesome 4.6.1 by @davegandy - http://fontawesome.io - @fontawesome + * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) + */@font-face{font-family:'FontAwesome';src:url('../fonts/fontawesome-webfont.eot?v=4.6.1');src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.6.1') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff2?v=4.6.1') format('woff2'),url('../fonts/fontawesome-webfont.woff?v=4.6.1') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.6.1') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.6.1#fontawesomeregular') format('svg');font-weight:normal;font-style:normal}.fa{display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.fa-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.fa-2x{font-size:2em}.fa-3x{font-size:3em}.fa-4x{font-size:4em}.fa-5x{font-size:5em}.fa-fw{width:1.28571429em;text-align:center}.fa-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.fa-ul>li{position:relative}.fa-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.fa-li.fa-lg{left:-1.85714286em}.fa-border{padding:.2em .25em .15em;border:solid .08em #eee;border-radius:.1em}.fa-pull-left{float:left}.fa-pull-right{float:right}.fa.fa-pull-left{margin-right:.3em}.fa.fa-pull-right{margin-left:.3em}.pull-right{float:right}.pull-left{float:left}.fa.pull-left{margin-right:.3em}.fa.pull-right{margin-left:.3em}.fa-spin{-webkit-animation:fa-spin 2s infinite linear;animation:fa-spin 2s infinite linear}.fa-pulse{-webkit-animation:fa-spin 1s infinite steps(8);animation:fa-spin 1s infinite steps(8)}@-webkit-keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes fa-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.fa-rotate-90{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.fa-rotate-180{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.fa-rotate-270{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.fa-flip-horizontal{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";-webkit-transform:scale(-1, 1);-ms-transform:scale(-1, 1);transform:scale(-1, 1)}.fa-flip-vertical{-ms-filter:"progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";-webkit-transform:scale(1, -1);-ms-transform:scale(1, -1);transform:scale(1, -1)}:root .fa-rotate-90,:root .fa-rotate-180,:root .fa-rotate-270,:root .fa-flip-horizontal,:root .fa-flip-vertical{filter:none}.fa-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.fa-stack-1x,.fa-stack-2x{position:absolute;left:0;width:100%;text-align:center}.fa-stack-1x{line-height:inherit}.fa-stack-2x{font-size:2em}.fa-inverse{color:#fff}.fa-glass:before{content:"\f000"}.fa-music:before{content:"\f001"}.fa-search:before{content:"\f002"}.fa-envelope-o:before{content:"\f003"}.fa-heart:before{content:"\f004"}.fa-star:before{content:"\f005"}.fa-star-o:before{content:"\f006"}.fa-user:before{content:"\f007"}.fa-film:before{content:"\f008"}.fa-th-large:before{content:"\f009"}.fa-th:before{content:"\f00a"}.fa-th-list:before{content:"\f00b"}.fa-check:before{content:"\f00c"}.fa-remove:before,.fa-close:before,.fa-times:before{content:"\f00d"}.fa-search-plus:before{content:"\f00e"}.fa-search-minus:before{content:"\f010"}.fa-power-off:before{content:"\f011"}.fa-signal:before{content:"\f012"}.fa-gear:before,.fa-cog:before{content:"\f013"}.fa-trash-o:before{content:"\f014"}.fa-home:before{content:"\f015"}.fa-file-o:before{content:"\f016"}.fa-clock-o:before{content:"\f017"}.fa-road:before{content:"\f018"}.fa-download:before{content:"\f019"}.fa-arrow-circle-o-down:before{content:"\f01a"}.fa-arrow-circle-o-up:before{content:"\f01b"}.fa-inbox:before{content:"\f01c"}.fa-play-circle-o:before{content:"\f01d"}.fa-rotate-right:before,.fa-repeat:before{content:"\f01e"}.fa-refresh:before{content:"\f021"}.fa-list-alt:before{content:"\f022"}.fa-lock:before{content:"\f023"}.fa-flag:before{content:"\f024"}.fa-headphones:before{content:"\f025"}.fa-volume-off:before{content:"\f026"}.fa-volume-down:before{content:"\f027"}.fa-volume-up:before{content:"\f028"}.fa-qrcode:before{content:"\f029"}.fa-barcode:before{content:"\f02a"}.fa-tag:before{content:"\f02b"}.fa-tags:before{content:"\f02c"}.fa-book:before{content:"\f02d"}.fa-bookmark:before{content:"\f02e"}.fa-print:before{content:"\f02f"}.fa-camera:before{content:"\f030"}.fa-font:before{content:"\f031"}.fa-bold:before{content:"\f032"}.fa-italic:before{content:"\f033"}.fa-text-height:before{content:"\f034"}.fa-text-width:before{content:"\f035"}.fa-align-left:before{content:"\f036"}.fa-align-center:before{content:"\f037"}.fa-align-right:before{content:"\f038"}.fa-align-justify:before{content:"\f039"}.fa-list:before{content:"\f03a"}.fa-dedent:before,.fa-outdent:before{content:"\f03b"}.fa-indent:before{content:"\f03c"}.fa-video-camera:before{content:"\f03d"}.fa-photo:before,.fa-image:before,.fa-picture-o:before{content:"\f03e"}.fa-pencil:before{content:"\f040"}.fa-map-marker:before{content:"\f041"}.fa-adjust:before{content:"\f042"}.fa-tint:before{content:"\f043"}.fa-edit:before,.fa-pencil-square-o:before{content:"\f044"}.fa-share-square-o:before{content:"\f045"}.fa-check-square-o:before{content:"\f046"}.fa-arrows:before{content:"\f047"}.fa-step-backward:before{content:"\f048"}.fa-fast-backward:before{content:"\f049"}.fa-backward:before{content:"\f04a"}.fa-play:before{content:"\f04b"}.fa-pause:before{content:"\f04c"}.fa-stop:before{content:"\f04d"}.fa-forward:before{content:"\f04e"}.fa-fast-forward:before{content:"\f050"}.fa-step-forward:before{content:"\f051"}.fa-eject:before{content:"\f052"}.fa-chevron-left:before{content:"\f053"}.fa-chevron-right:before{content:"\f054"}.fa-plus-circle:before{content:"\f055"}.fa-minus-circle:before{content:"\f056"}.fa-times-circle:before{content:"\f057"}.fa-check-circle:before{content:"\f058"}.fa-question-circle:before{content:"\f059"}.fa-info-circle:before{content:"\f05a"}.fa-crosshairs:before{content:"\f05b"}.fa-times-circle-o:before{content:"\f05c"}.fa-check-circle-o:before{content:"\f05d"}.fa-ban:before{content:"\f05e"}.fa-arrow-left:before{content:"\f060"}.fa-arrow-right:before{content:"\f061"}.fa-arrow-up:before{content:"\f062"}.fa-arrow-down:before{content:"\f063"}.fa-mail-forward:before,.fa-share:before{content:"\f064"}.fa-expand:before{content:"\f065"}.fa-compress:before{content:"\f066"}.fa-plus:before{content:"\f067"}.fa-minus:before{content:"\f068"}.fa-asterisk:before{content:"\f069"}.fa-exclamation-circle:before{content:"\f06a"}.fa-gift:before{content:"\f06b"}.fa-leaf:before{content:"\f06c"}.fa-fire:before{content:"\f06d"}.fa-eye:before{content:"\f06e"}.fa-eye-slash:before{content:"\f070"}.fa-warning:before,.fa-exclamation-triangle:before{content:"\f071"}.fa-plane:before{content:"\f072"}.fa-calendar:before{content:"\f073"}.fa-random:before{content:"\f074"}.fa-comment:before{content:"\f075"}.fa-magnet:before{content:"\f076"}.fa-chevron-up:before{content:"\f077"}.fa-chevron-down:before{content:"\f078"}.fa-retweet:before{content:"\f079"}.fa-shopping-cart:before{content:"\f07a"}.fa-folder:before{content:"\f07b"}.fa-folder-open:before{content:"\f07c"}.fa-arrows-v:before{content:"\f07d"}.fa-arrows-h:before{content:"\f07e"}.fa-bar-chart-o:before,.fa-bar-chart:before{content:"\f080"}.fa-twitter-square:before{content:"\f081"}.fa-facebook-square:before{content:"\f082"}.fa-camera-retro:before{content:"\f083"}.fa-key:before{content:"\f084"}.fa-gears:before,.fa-cogs:before{content:"\f085"}.fa-comments:before{content:"\f086"}.fa-thumbs-o-up:before{content:"\f087"}.fa-thumbs-o-down:before{content:"\f088"}.fa-star-half:before{content:"\f089"}.fa-heart-o:before{content:"\f08a"}.fa-sign-out:before{content:"\f08b"}.fa-linkedin-square:before{content:"\f08c"}.fa-thumb-tack:before{content:"\f08d"}.fa-external-link:before{content:"\f08e"}.fa-sign-in:before{content:"\f090"}.fa-trophy:before{content:"\f091"}.fa-github-square:before{content:"\f092"}.fa-upload:before{content:"\f093"}.fa-lemon-o:before{content:"\f094"}.fa-phone:before{content:"\f095"}.fa-square-o:before{content:"\f096"}.fa-bookmark-o:before{content:"\f097"}.fa-phone-square:before{content:"\f098"}.fa-twitter:before{content:"\f099"}.fa-facebook-f:before,.fa-facebook:before{content:"\f09a"}.fa-github:before{content:"\f09b"}.fa-unlock:before{content:"\f09c"}.fa-credit-card:before{content:"\f09d"}.fa-feed:before,.fa-rss:before{content:"\f09e"}.fa-hdd-o:before{content:"\f0a0"}.fa-bullhorn:before{content:"\f0a1"}.fa-bell:before{content:"\f0f3"}.fa-certificate:before{content:"\f0a3"}.fa-hand-o-right:before{content:"\f0a4"}.fa-hand-o-left:before{content:"\f0a5"}.fa-hand-o-up:before{content:"\f0a6"}.fa-hand-o-down:before{content:"\f0a7"}.fa-arrow-circle-left:before{content:"\f0a8"}.fa-arrow-circle-right:before{content:"\f0a9"}.fa-arrow-circle-up:before{content:"\f0aa"}.fa-arrow-circle-down:before{content:"\f0ab"}.fa-globe:before{content:"\f0ac"}.fa-wrench:before{content:"\f0ad"}.fa-tasks:before{content:"\f0ae"}.fa-filter:before{content:"\f0b0"}.fa-briefcase:before{content:"\f0b1"}.fa-arrows-alt:before{content:"\f0b2"}.fa-group:before,.fa-users:before{content:"\f0c0"}.fa-chain:before,.fa-link:before{content:"\f0c1"}.fa-cloud:before{content:"\f0c2"}.fa-flask:before{content:"\f0c3"}.fa-cut:before,.fa-scissors:before{content:"\f0c4"}.fa-copy:before,.fa-files-o:before{content:"\f0c5"}.fa-paperclip:before{content:"\f0c6"}.fa-save:before,.fa-floppy-o:before{content:"\f0c7"}.fa-square:before{content:"\f0c8"}.fa-navicon:before,.fa-reorder:before,.fa-bars:before{content:"\f0c9"}.fa-list-ul:before{content:"\f0ca"}.fa-list-ol:before{content:"\f0cb"}.fa-strikethrough:before{content:"\f0cc"}.fa-underline:before{content:"\f0cd"}.fa-table:before{content:"\f0ce"}.fa-magic:before{content:"\f0d0"}.fa-truck:before{content:"\f0d1"}.fa-pinterest:before{content:"\f0d2"}.fa-pinterest-square:before{content:"\f0d3"}.fa-google-plus-square:before{content:"\f0d4"}.fa-google-plus:before{content:"\f0d5"}.fa-money:before{content:"\f0d6"}.fa-caret-down:before{content:"\f0d7"}.fa-caret-up:before{content:"\f0d8"}.fa-caret-left:before{content:"\f0d9"}.fa-caret-right:before{content:"\f0da"}.fa-columns:before{content:"\f0db"}.fa-unsorted:before,.fa-sort:before{content:"\f0dc"}.fa-sort-down:before,.fa-sort-desc:before{content:"\f0dd"}.fa-sort-up:before,.fa-sort-asc:before{content:"\f0de"}.fa-envelope:before{content:"\f0e0"}.fa-linkedin:before{content:"\f0e1"}.fa-rotate-left:before,.fa-undo:before{content:"\f0e2"}.fa-legal:before,.fa-gavel:before{content:"\f0e3"}.fa-dashboard:before,.fa-tachometer:before{content:"\f0e4"}.fa-comment-o:before{content:"\f0e5"}.fa-comments-o:before{content:"\f0e6"}.fa-flash:before,.fa-bolt:before{content:"\f0e7"}.fa-sitemap:before{content:"\f0e8"}.fa-umbrella:before{content:"\f0e9"}.fa-paste:before,.fa-clipboard:before{content:"\f0ea"}.fa-lightbulb-o:before{content:"\f0eb"}.fa-exchange:before{content:"\f0ec"}.fa-cloud-download:before{content:"\f0ed"}.fa-cloud-upload:before{content:"\f0ee"}.fa-user-md:before{content:"\f0f0"}.fa-stethoscope:before{content:"\f0f1"}.fa-suitcase:before{content:"\f0f2"}.fa-bell-o:before{content:"\f0a2"}.fa-coffee:before{content:"\f0f4"}.fa-cutlery:before{content:"\f0f5"}.fa-file-text-o:before{content:"\f0f6"}.fa-building-o:before{content:"\f0f7"}.fa-hospital-o:before{content:"\f0f8"}.fa-ambulance:before{content:"\f0f9"}.fa-medkit:before{content:"\f0fa"}.fa-fighter-jet:before{content:"\f0fb"}.fa-beer:before{content:"\f0fc"}.fa-h-square:before{content:"\f0fd"}.fa-plus-square:before{content:"\f0fe"}.fa-angle-double-left:before{content:"\f100"}.fa-angle-double-right:before{content:"\f101"}.fa-angle-double-up:before{content:"\f102"}.fa-angle-double-down:before{content:"\f103"}.fa-angle-left:before{content:"\f104"}.fa-angle-right:before{content:"\f105"}.fa-angle-up:before{content:"\f106"}.fa-angle-down:before{content:"\f107"}.fa-desktop:before{content:"\f108"}.fa-laptop:before{content:"\f109"}.fa-tablet:before{content:"\f10a"}.fa-mobile-phone:before,.fa-mobile:before{content:"\f10b"}.fa-circle-o:before{content:"\f10c"}.fa-quote-left:before{content:"\f10d"}.fa-quote-right:before{content:"\f10e"}.fa-spinner:before{content:"\f110"}.fa-circle:before{content:"\f111"}.fa-mail-reply:before,.fa-reply:before{content:"\f112"}.fa-github-alt:before{content:"\f113"}.fa-folder-o:before{content:"\f114"}.fa-folder-open-o:before{content:"\f115"}.fa-smile-o:before{content:"\f118"}.fa-frown-o:before{content:"\f119"}.fa-meh-o:before{content:"\f11a"}.fa-gamepad:before{content:"\f11b"}.fa-keyboard-o:before{content:"\f11c"}.fa-flag-o:before{content:"\f11d"}.fa-flag-checkered:before{content:"\f11e"}.fa-terminal:before{content:"\f120"}.fa-code:before{content:"\f121"}.fa-mail-reply-all:before,.fa-reply-all:before{content:"\f122"}.fa-star-half-empty:before,.fa-star-half-full:before,.fa-star-half-o:before{content:"\f123"}.fa-location-arrow:before{content:"\f124"}.fa-crop:before{content:"\f125"}.fa-code-fork:before{content:"\f126"}.fa-unlink:before,.fa-chain-broken:before{content:"\f127"}.fa-question:before{content:"\f128"}.fa-info:before{content:"\f129"}.fa-exclamation:before{content:"\f12a"}.fa-superscript:before{content:"\f12b"}.fa-subscript:before{content:"\f12c"}.fa-eraser:before{content:"\f12d"}.fa-puzzle-piece:before{content:"\f12e"}.fa-microphone:before{content:"\f130"}.fa-microphone-slash:before{content:"\f131"}.fa-shield:before{content:"\f132"}.fa-calendar-o:before{content:"\f133"}.fa-fire-extinguisher:before{content:"\f134"}.fa-rocket:before{content:"\f135"}.fa-maxcdn:before{content:"\f136"}.fa-chevron-circle-left:before{content:"\f137"}.fa-chevron-circle-right:before{content:"\f138"}.fa-chevron-circle-up:before{content:"\f139"}.fa-chevron-circle-down:before{content:"\f13a"}.fa-html5:before{content:"\f13b"}.fa-css3:before{content:"\f13c"}.fa-anchor:before{content:"\f13d"}.fa-unlock-alt:before{content:"\f13e"}.fa-bullseye:before{content:"\f140"}.fa-ellipsis-h:before{content:"\f141"}.fa-ellipsis-v:before{content:"\f142"}.fa-rss-square:before{content:"\f143"}.fa-play-circle:before{content:"\f144"}.fa-ticket:before{content:"\f145"}.fa-minus-square:before{content:"\f146"}.fa-minus-square-o:before{content:"\f147"}.fa-level-up:before{content:"\f148"}.fa-level-down:before{content:"\f149"}.fa-check-square:before{content:"\f14a"}.fa-pencil-square:before{content:"\f14b"}.fa-external-link-square:before{content:"\f14c"}.fa-share-square:before{content:"\f14d"}.fa-compass:before{content:"\f14e"}.fa-toggle-down:before,.fa-caret-square-o-down:before{content:"\f150"}.fa-toggle-up:before,.fa-caret-square-o-up:before{content:"\f151"}.fa-toggle-right:before,.fa-caret-square-o-right:before{content:"\f152"}.fa-euro:before,.fa-eur:before{content:"\f153"}.fa-gbp:before{content:"\f154"}.fa-dollar:before,.fa-usd:before{content:"\f155"}.fa-rupee:before,.fa-inr:before{content:"\f156"}.fa-cny:before,.fa-rmb:before,.fa-yen:before,.fa-jpy:before{content:"\f157"}.fa-ruble:before,.fa-rouble:before,.fa-rub:before{content:"\f158"}.fa-won:before,.fa-krw:before{content:"\f159"}.fa-bitcoin:before,.fa-btc:before{content:"\f15a"}.fa-file:before{content:"\f15b"}.fa-file-text:before{content:"\f15c"}.fa-sort-alpha-asc:before{content:"\f15d"}.fa-sort-alpha-desc:before{content:"\f15e"}.fa-sort-amount-asc:before{content:"\f160"}.fa-sort-amount-desc:before{content:"\f161"}.fa-sort-numeric-asc:before{content:"\f162"}.fa-sort-numeric-desc:before{content:"\f163"}.fa-thumbs-up:before{content:"\f164"}.fa-thumbs-down:before{content:"\f165"}.fa-youtube-square:before{content:"\f166"}.fa-youtube:before{content:"\f167"}.fa-xing:before{content:"\f168"}.fa-xing-square:before{content:"\f169"}.fa-youtube-play:before{content:"\f16a"}.fa-dropbox:before{content:"\f16b"}.fa-stack-overflow:before{content:"\f16c"}.fa-instagram:before{content:"\f16d"}.fa-flickr:before{content:"\f16e"}.fa-adn:before{content:"\f170"}.fa-bitbucket:before{content:"\f171"}.fa-bitbucket-square:before{content:"\f172"}.fa-tumblr:before{content:"\f173"}.fa-tumblr-square:before{content:"\f174"}.fa-long-arrow-down:before{content:"\f175"}.fa-long-arrow-up:before{content:"\f176"}.fa-long-arrow-left:before{content:"\f177"}.fa-long-arrow-right:before{content:"\f178"}.fa-apple:before{content:"\f179"}.fa-windows:before{content:"\f17a"}.fa-android:before{content:"\f17b"}.fa-linux:before{content:"\f17c"}.fa-dribbble:before{content:"\f17d"}.fa-skype:before{content:"\f17e"}.fa-foursquare:before{content:"\f180"}.fa-trello:before{content:"\f181"}.fa-female:before{content:"\f182"}.fa-male:before{content:"\f183"}.fa-gittip:before,.fa-gratipay:before{content:"\f184"}.fa-sun-o:before{content:"\f185"}.fa-moon-o:before{content:"\f186"}.fa-archive:before{content:"\f187"}.fa-bug:before{content:"\f188"}.fa-vk:before{content:"\f189"}.fa-weibo:before{content:"\f18a"}.fa-renren:before{content:"\f18b"}.fa-pagelines:before{content:"\f18c"}.fa-stack-exchange:before{content:"\f18d"}.fa-arrow-circle-o-right:before{content:"\f18e"}.fa-arrow-circle-o-left:before{content:"\f190"}.fa-toggle-left:before,.fa-caret-square-o-left:before{content:"\f191"}.fa-dot-circle-o:before{content:"\f192"}.fa-wheelchair:before{content:"\f193"}.fa-vimeo-square:before{content:"\f194"}.fa-turkish-lira:before,.fa-try:before{content:"\f195"}.fa-plus-square-o:before{content:"\f196"}.fa-space-shuttle:before{content:"\f197"}.fa-slack:before{content:"\f198"}.fa-envelope-square:before{content:"\f199"}.fa-wordpress:before{content:"\f19a"}.fa-openid:before{content:"\f19b"}.fa-institution:before,.fa-bank:before,.fa-university:before{content:"\f19c"}.fa-mortar-board:before,.fa-graduation-cap:before{content:"\f19d"}.fa-yahoo:before{content:"\f19e"}.fa-google:before{content:"\f1a0"}.fa-reddit:before{content:"\f1a1"}.fa-reddit-square:before{content:"\f1a2"}.fa-stumbleupon-circle:before{content:"\f1a3"}.fa-stumbleupon:before{content:"\f1a4"}.fa-delicious:before{content:"\f1a5"}.fa-digg:before{content:"\f1a6"}.fa-pied-piper:before{content:"\f1a7"}.fa-pied-piper-alt:before{content:"\f1a8"}.fa-drupal:before{content:"\f1a9"}.fa-joomla:before{content:"\f1aa"}.fa-language:before{content:"\f1ab"}.fa-fax:before{content:"\f1ac"}.fa-building:before{content:"\f1ad"}.fa-child:before{content:"\f1ae"}.fa-paw:before{content:"\f1b0"}.fa-spoon:before{content:"\f1b1"}.fa-cube:before{content:"\f1b2"}.fa-cubes:before{content:"\f1b3"}.fa-behance:before{content:"\f1b4"}.fa-behance-square:before{content:"\f1b5"}.fa-steam:before{content:"\f1b6"}.fa-steam-square:before{content:"\f1b7"}.fa-recycle:before{content:"\f1b8"}.fa-automobile:before,.fa-car:before{content:"\f1b9"}.fa-cab:before,.fa-taxi:before{content:"\f1ba"}.fa-tree:before{content:"\f1bb"}.fa-spotify:before{content:"\f1bc"}.fa-deviantart:before{content:"\f1bd"}.fa-soundcloud:before{content:"\f1be"}.fa-database:before{content:"\f1c0"}.fa-file-pdf-o:before{content:"\f1c1"}.fa-file-word-o:before{content:"\f1c2"}.fa-file-excel-o:before{content:"\f1c3"}.fa-file-powerpoint-o:before{content:"\f1c4"}.fa-file-photo-o:before,.fa-file-picture-o:before,.fa-file-image-o:before{content:"\f1c5"}.fa-file-zip-o:before,.fa-file-archive-o:before{content:"\f1c6"}.fa-file-sound-o:before,.fa-file-audio-o:before{content:"\f1c7"}.fa-file-movie-o:before,.fa-file-video-o:before{content:"\f1c8"}.fa-file-code-o:before{content:"\f1c9"}.fa-vine:before{content:"\f1ca"}.fa-codepen:before{content:"\f1cb"}.fa-jsfiddle:before{content:"\f1cc"}.fa-life-bouy:before,.fa-life-buoy:before,.fa-life-saver:before,.fa-support:before,.fa-life-ring:before{content:"\f1cd"}.fa-circle-o-notch:before{content:"\f1ce"}.fa-ra:before,.fa-rebel:before{content:"\f1d0"}.fa-ge:before,.fa-empire:before{content:"\f1d1"}.fa-git-square:before{content:"\f1d2"}.fa-git:before{content:"\f1d3"}.fa-y-combinator-square:before,.fa-yc-square:before,.fa-hacker-news:before{content:"\f1d4"}.fa-tencent-weibo:before{content:"\f1d5"}.fa-qq:before{content:"\f1d6"}.fa-wechat:before,.fa-weixin:before{content:"\f1d7"}.fa-send:before,.fa-paper-plane:before{content:"\f1d8"}.fa-send-o:before,.fa-paper-plane-o:before{content:"\f1d9"}.fa-history:before{content:"\f1da"}.fa-circle-thin:before{content:"\f1db"}.fa-header:before{content:"\f1dc"}.fa-paragraph:before{content:"\f1dd"}.fa-sliders:before{content:"\f1de"}.fa-share-alt:before{content:"\f1e0"}.fa-share-alt-square:before{content:"\f1e1"}.fa-bomb:before{content:"\f1e2"}.fa-soccer-ball-o:before,.fa-futbol-o:before{content:"\f1e3"}.fa-tty:before{content:"\f1e4"}.fa-binoculars:before{content:"\f1e5"}.fa-plug:before{content:"\f1e6"}.fa-slideshare:before{content:"\f1e7"}.fa-twitch:before{content:"\f1e8"}.fa-yelp:before{content:"\f1e9"}.fa-newspaper-o:before{content:"\f1ea"}.fa-wifi:before{content:"\f1eb"}.fa-calculator:before{content:"\f1ec"}.fa-paypal:before{content:"\f1ed"}.fa-google-wallet:before{content:"\f1ee"}.fa-cc-visa:before{content:"\f1f0"}.fa-cc-mastercard:before{content:"\f1f1"}.fa-cc-discover:before{content:"\f1f2"}.fa-cc-amex:before{content:"\f1f3"}.fa-cc-paypal:before{content:"\f1f4"}.fa-cc-stripe:before{content:"\f1f5"}.fa-bell-slash:before{content:"\f1f6"}.fa-bell-slash-o:before{content:"\f1f7"}.fa-trash:before{content:"\f1f8"}.fa-copyright:before{content:"\f1f9"}.fa-at:before{content:"\f1fa"}.fa-eyedropper:before{content:"\f1fb"}.fa-paint-brush:before{content:"\f1fc"}.fa-birthday-cake:before{content:"\f1fd"}.fa-area-chart:before{content:"\f1fe"}.fa-pie-chart:before{content:"\f200"}.fa-line-chart:before{content:"\f201"}.fa-lastfm:before{content:"\f202"}.fa-lastfm-square:before{content:"\f203"}.fa-toggle-off:before{content:"\f204"}.fa-toggle-on:before{content:"\f205"}.fa-bicycle:before{content:"\f206"}.fa-bus:before{content:"\f207"}.fa-ioxhost:before{content:"\f208"}.fa-angellist:before{content:"\f209"}.fa-cc:before{content:"\f20a"}.fa-shekel:before,.fa-sheqel:before,.fa-ils:before{content:"\f20b"}.fa-meanpath:before{content:"\f20c"}.fa-buysellads:before{content:"\f20d"}.fa-connectdevelop:before{content:"\f20e"}.fa-dashcube:before{content:"\f210"}.fa-forumbee:before{content:"\f211"}.fa-leanpub:before{content:"\f212"}.fa-sellsy:before{content:"\f213"}.fa-shirtsinbulk:before{content:"\f214"}.fa-simplybuilt:before{content:"\f215"}.fa-skyatlas:before{content:"\f216"}.fa-cart-plus:before{content:"\f217"}.fa-cart-arrow-down:before{content:"\f218"}.fa-diamond:before{content:"\f219"}.fa-ship:before{content:"\f21a"}.fa-user-secret:before{content:"\f21b"}.fa-motorcycle:before{content:"\f21c"}.fa-street-view:before{content:"\f21d"}.fa-heartbeat:before{content:"\f21e"}.fa-venus:before{content:"\f221"}.fa-mars:before{content:"\f222"}.fa-mercury:before{content:"\f223"}.fa-intersex:before,.fa-transgender:before{content:"\f224"}.fa-transgender-alt:before{content:"\f225"}.fa-venus-double:before{content:"\f226"}.fa-mars-double:before{content:"\f227"}.fa-venus-mars:before{content:"\f228"}.fa-mars-stroke:before{content:"\f229"}.fa-mars-stroke-v:before{content:"\f22a"}.fa-mars-stroke-h:before{content:"\f22b"}.fa-neuter:before{content:"\f22c"}.fa-genderless:before{content:"\f22d"}.fa-facebook-official:before{content:"\f230"}.fa-pinterest-p:before{content:"\f231"}.fa-whatsapp:before{content:"\f232"}.fa-server:before{content:"\f233"}.fa-user-plus:before{content:"\f234"}.fa-user-times:before{content:"\f235"}.fa-hotel:before,.fa-bed:before{content:"\f236"}.fa-viacoin:before{content:"\f237"}.fa-train:before{content:"\f238"}.fa-subway:before{content:"\f239"}.fa-medium:before{content:"\f23a"}.fa-yc:before,.fa-y-combinator:before{content:"\f23b"}.fa-optin-monster:before{content:"\f23c"}.fa-opencart:before{content:"\f23d"}.fa-expeditedssl:before{content:"\f23e"}.fa-battery-4:before,.fa-battery-full:before{content:"\f240"}.fa-battery-3:before,.fa-battery-three-quarters:before{content:"\f241"}.fa-battery-2:before,.fa-battery-half:before{content:"\f242"}.fa-battery-1:before,.fa-battery-quarter:before{content:"\f243"}.fa-battery-0:before,.fa-battery-empty:before{content:"\f244"}.fa-mouse-pointer:before{content:"\f245"}.fa-i-cursor:before{content:"\f246"}.fa-object-group:before{content:"\f247"}.fa-object-ungroup:before{content:"\f248"}.fa-sticky-note:before{content:"\f249"}.fa-sticky-note-o:before{content:"\f24a"}.fa-cc-jcb:before{content:"\f24b"}.fa-cc-diners-club:before{content:"\f24c"}.fa-clone:before{content:"\f24d"}.fa-balance-scale:before{content:"\f24e"}.fa-hourglass-o:before{content:"\f250"}.fa-hourglass-1:before,.fa-hourglass-start:before{content:"\f251"}.fa-hourglass-2:before,.fa-hourglass-half:before{content:"\f252"}.fa-hourglass-3:before,.fa-hourglass-end:before{content:"\f253"}.fa-hourglass:before{content:"\f254"}.fa-hand-grab-o:before,.fa-hand-rock-o:before{content:"\f255"}.fa-hand-stop-o:before,.fa-hand-paper-o:before{content:"\f256"}.fa-hand-scissors-o:before{content:"\f257"}.fa-hand-lizard-o:before{content:"\f258"}.fa-hand-spock-o:before{content:"\f259"}.fa-hand-pointer-o:before{content:"\f25a"}.fa-hand-peace-o:before{content:"\f25b"}.fa-trademark:before{content:"\f25c"}.fa-registered:before{content:"\f25d"}.fa-creative-commons:before{content:"\f25e"}.fa-gg:before{content:"\f260"}.fa-gg-circle:before{content:"\f261"}.fa-tripadvisor:before{content:"\f262"}.fa-odnoklassniki:before{content:"\f263"}.fa-odnoklassniki-square:before{content:"\f264"}.fa-get-pocket:before{content:"\f265"}.fa-wikipedia-w:before{content:"\f266"}.fa-safari:before{content:"\f267"}.fa-chrome:before{content:"\f268"}.fa-firefox:before{content:"\f269"}.fa-opera:before{content:"\f26a"}.fa-internet-explorer:before{content:"\f26b"}.fa-tv:before,.fa-television:before{content:"\f26c"}.fa-contao:before{content:"\f26d"}.fa-500px:before{content:"\f26e"}.fa-amazon:before{content:"\f270"}.fa-calendar-plus-o:before{content:"\f271"}.fa-calendar-minus-o:before{content:"\f272"}.fa-calendar-times-o:before{content:"\f273"}.fa-calendar-check-o:before{content:"\f274"}.fa-industry:before{content:"\f275"}.fa-map-pin:before{content:"\f276"}.fa-map-signs:before{content:"\f277"}.fa-map-o:before{content:"\f278"}.fa-map:before{content:"\f279"}.fa-commenting:before{content:"\f27a"}.fa-commenting-o:before{content:"\f27b"}.fa-houzz:before{content:"\f27c"}.fa-vimeo:before{content:"\f27d"}.fa-black-tie:before{content:"\f27e"}.fa-fonticons:before{content:"\f280"}.fa-reddit-alien:before{content:"\f281"}.fa-edge:before{content:"\f282"}.fa-credit-card-alt:before{content:"\f283"}.fa-codiepie:before{content:"\f284"}.fa-modx:before{content:"\f285"}.fa-fort-awesome:before{content:"\f286"}.fa-usb:before{content:"\f287"}.fa-product-hunt:before{content:"\f288"}.fa-mixcloud:before{content:"\f289"}.fa-scribd:before{content:"\f28a"}.fa-pause-circle:before{content:"\f28b"}.fa-pause-circle-o:before{content:"\f28c"}.fa-stop-circle:before{content:"\f28d"}.fa-stop-circle-o:before{content:"\f28e"}.fa-shopping-bag:before{content:"\f290"}.fa-shopping-basket:before{content:"\f291"}.fa-hashtag:before{content:"\f292"}.fa-bluetooth:before{content:"\f293"}.fa-bluetooth-b:before{content:"\f294"}.fa-percent:before{content:"\f295"}.fa-gitlab:before{content:"\f296"}.fa-wpbeginner:before{content:"\f297"}.fa-wpforms:before{content:"\f298"}.fa-envira:before{content:"\f299"}.fa-universal-access:before{content:"\f29a"}.fa-wheelchair-alt:before{content:"\f29b"}.fa-question-circle-o:before{content:"\f29c"}.fa-blind:before{content:"\f29d"}.fa-audio-description:before{content:"\f29e"}.fa-volume-control-phone:before{content:"\f2a0"}.fa-braille:before{content:"\f2a1"}.fa-assistive-listening-systems:before{content:"\f2a2"}.fa-asl-interpreting:before,.fa-american-sign-language-interpreting:before{content:"\f2a3"}.fa-deafness:before,.fa-hard-of-hearing:before,.fa-deaf:before{content:"\f2a4"}.fa-glide:before{content:"\f2a5"}.fa-glide-g:before{content:"\f2a6"}.fa-signing:before,.fa-sign-language:before{content:"\f2a7"}.fa-low-vision:before{content:"\f2a8"}.fa-viadeo:before{content:"\f2a9"}.fa-viadeo-square:before{content:"\f2aa"}.fa-snapchat:before{content:"\f2ab"}.fa-snapchat-ghost:before{content:"\f2ac"}.fa-snapchat-square:before{content:"\f2ad"}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto} diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/4.4.0/index.html b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/4.4.0/index.html new file mode 100644 index 0000000..dcb5932 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/4.4.0/index.html @@ -0,0 +1,58 @@ + + + + + + + +

4.4.0

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/FontAwesome.otf b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/FontAwesome.otf new file mode 100644 index 0000000..59853bc Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/FontAwesome.otf differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.eot b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.eot new file mode 100644 index 0000000..96f92f9 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.eot differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.svg b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.svg new file mode 100644 index 0000000..5a5f0ec --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.svg @@ -0,0 +1,685 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.ttf b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.ttf new file mode 100644 index 0000000..86784df Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.ttf differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff new file mode 100644 index 0000000..c7faa19 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff2 b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff2 new file mode 100644 index 0000000..cab8571 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/fontawesome-webfont.woff2 differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.eot b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.eot new file mode 100644 index 0000000..b93a495 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.eot differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.svg b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.svg new file mode 100644 index 0000000..94fb549 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.svg @@ -0,0 +1,288 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.ttf b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.ttf new file mode 100644 index 0000000..1413fc6 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.ttf differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff new file mode 100644 index 0000000..9e61285 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff2 b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff2 new file mode 100644 index 0000000..64539b5 Binary files /dev/null and b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/fonts/glyphicons-halflings-regular.woff2 differ diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/actionEditor.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/actionEditor.bundle.js new file mode 100644 index 0000000..1f85e13 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/actionEditor.bundle.js @@ -0,0 +1,21 @@ +!function(t){function e(n){if(A[n])return A[n].exports;var o=A[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var A={};return e.m=t,e.c=A,e.p="",e(0)}([function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),A=window.location.search.substr(1).match(e);return null!=A?unescape(A[2]):null}A(1),A(10);var i=A(14),a=o(i),s=A(41),c=o(s),l=A(183),g=A(204),u=o(g),M=A(205),d=A(224),I=o(d),p=A(225),T=n(p),h=A(229),E=o(h);$(document).ready(function(){var t=(0,l.createStore)(I.default,(0,l.applyMiddleware)(u.default)),e=r("file");return!e||e.length<1?void bootbox.alert("请先指定要加载的变量库文件."):(t.dispatch(T.loadMasterData(e)),void c.default.render(a.default.createElement(M.Provider,{store:t},a.default.createElement(E.default,{file:e})),document.getElementById("container")))})},function(t,e,A){var n=A(2);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+A(4)+");src:url("+A(4)+"?#iefix) format('embedded-opentype'),url("+A(5)+") format('woff2'),url("+A(6)+") format('woff'),url("+A(7)+") format('truetype'),url("+A(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var A,n,o;if(e.singleton){var r=h++;A=T||(T=a(e)),n=l.bind(null,A,r,!1),o=l.bind(null,A,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=s(e),n=u.bind(null,A),o=function(){i(A),A.href&&URL.revokeObjectURL(A.href)}):(A=a(e),n=g.bind(null,A),o=function(){i(A)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function l(t,e,A,n){var o=A?"":n.css;if(t.styleSheet)t.styleSheet.cssText=N(e,o);else{var r=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(r,i[e]):t.appendChild(r)}}function g(t,e){var A=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=A;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(A))}}function u(t,e){var A=e.css,n=e.sourceMap;n&&(A+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([A],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var M={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},I=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),p=d(function(){return document.head||document.getElementsByTagName("head")[0]}),T=null,h=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=I()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var A=o(t);return n(A,e),function(t){for(var r=[],i=0;i1){for(var p=Array(I),T=0;T1){for(var E=Array(h),N=0;N>"),B={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:d(),objectOf:u,oneOf:g,oneOfType:M,shape:I};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var A="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=A},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,A){"use strict";function n(t){return r.isValidElement(t)?void 0:o("143"),t}var o=A(19),r=A(21);A(20);t.exports=n},function(t,e,A){"use strict";t.exports=A(42)},function(t,e,A){"use strict";var n=A(43),o=A(48),r=A(174),i=A(71),a=A(68),s=A(179),c=A(180),l=A(181),g=A(182);A(56);o.inject();var u={findDOMNode:c,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:g};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:n.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?n.getNodeFromInstance(t):null}},Mount:r,Reconciler:i});t.exports=u},function(t,e,A){"use strict";function n(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var A=n(t);A._hostNode=e,e[I]=A}function r(t){var e=t._hostNode;e&&(delete e[I],t._hostNode=null)}function i(t,e){if(!(t._flags&d.hasCachedChildNodes)){var A=t._renderedChildren,r=e.firstChild;t:for(var i in A)if(A.hasOwnProperty(i)){var a=A[i],s=n(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(M)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}l("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[I])return t[I];for(var e=[];!t[I];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var A,n;t&&(n=t[I]);t=e.pop())A=n,e.length&&i(n,t);return A}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?l("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:l("34"),t=t._hostParent;for(;e.length;t=e.pop())i(t,t._hostNode);return t._hostNode}var l=A(44),g=A(45),u=A(47),M=(A(46),g.ID_ATTRIBUTE_NAME),d=u,I="__reactInternalInstance$"+Math.random().toString(36).slice(2),p={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:i,precacheNode:o,uncacheNode:r};t.exports=p},function(t,e){"use strict";function A(t){for(var e=arguments.length-1,A="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,n=0;n8&&f<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,A,n){return[c(t,e,A,n),u(t,e,A,n)]}};t.exports=b},function(t,e,A){"use strict";function n(t,e,A){var n=e.dispatchConfig.phasedRegistrationNames[A];return T(t,n)}function o(t,e,A){var o=n(t,A,e);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function i(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,A=e?d.getParentInstance(e):null;d.traverseTwoPhase(A,o,t)}}function a(t,e,A){if(A&&A.dispatchConfig.registrationName){var n=A.dispatchConfig.registrationName,o=T(t,n);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){p(t,r)}function l(t){p(t,i)}function g(t,e,A,n){d.traverseEnterLeave(A,n,a,t,e)}function u(t){p(t,s)}var M=A(52),d=A(54),I=A(58),p=A(59),T=(A(56),M.getListener),h={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:u,accumulateEnterLeaveDispatches:g};t.exports=h},function(t,e,A){"use strict";function n(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,A){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!A.disabled||!n(e));default:return!1}}var r=A(44),i=A(53),a=A(54),s=A(55),c=A(58),l=A(59),g=(A(46),{}),u=null,M=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return M(t,!0)},I=function(t){return M(t,!1)},p=function(t){return"."+t._rootNodeID},T={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(t,e,A){"function"!=typeof A?r("94",e,typeof A):void 0;var n=p(t),o=g[e]||(g[e]={});o[n]=A;var a=i.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,A)},getListener:function(t,e){var A=g[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var n=p(t);return A&&A[n]},deleteListener:function(t,e){var A=i.registrationNameModules[e];A&&A.willDeleteListener&&A.willDeleteListener(t,e);var n=g[e];if(n){var o=p(t);delete n[o]}},deleteAllListeners:function(t){var e=p(t);for(var A in g)if(g.hasOwnProperty(A)&&g[A][e]){var n=i.registrationNameModules[A];n&&n.willDeleteListener&&n.willDeleteListener(t,A),delete g[A][e]}},extractEvents:function(t,e,A,n){for(var o,r=i.plugins,a=0;a-1?void 0:i("96",t),!c.plugins[A]){e.extractEvents?void 0:i("97",t),c.plugins[A]=e;var n=e.eventTypes;for(var r in n)o(n[r],e,r)?void 0:i("98",r,t)}}}function o(t,e,A){c.eventNameDispatchConfigs.hasOwnProperty(A)?i("99",A):void 0,c.eventNameDispatchConfigs[A]=t;var n=t.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];r(a,e,A)}return!0}return!!t.registrationName&&(r(t.registrationName,e,A),!0)}function r(t,e,A){c.registrationNameModules[t]?i("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[A].dependencies}var i=A(44),a=(A(46),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?i("101"):void 0,a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var A in t)if(t.hasOwnProperty(A)){var o=t[A];s.hasOwnProperty(A)&&s[A]===o||(s[A]?i("102",A):void 0,s[A]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var A=e.phasedRegistrationNames;for(var n in A)if(A.hasOwnProperty(n)){var o=c.registrationNameModules[A[n]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var A in e)e.hasOwnProperty(A)&&delete e[A];var n=c.registrationNameModules;for(var o in n)n.hasOwnProperty(o)&&delete n[o]}};t.exports=c},function(t,e,A){"use strict";function n(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function i(t,e,A,n){var o=t.type||"unknown-event";t.currentTarget=T.getNodeFromInstance(n),e?I.invokeGuardedCallbackWithCatch(o,A,t):I.invokeGuardedCallback(o,A,t),t.currentTarget=null}function a(t,e){var A=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(A))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},function(t,e,A){"use strict";var n=A(44),o=(A(46),function(t){var e=this;if(e.instancePool.length){var A=e.instancePool.pop();return e.call(A,t),A}return new e(t)}),r=function(t,e){var A=this;if(A.instancePool.length){var n=A.instancePool.pop();return A.call(n,t,e),n}return new A(t,e)},i=function(t,e,A){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e,A),o}return new n(t,e,A)},a=function(t,e,A,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,A,n),r}return new o(t,e,A,n)},s=function(t,e,A,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,A,n,o),i}return new r(t,e,A,n,o)},c=function(t){var e=this;t instanceof e?void 0:n("25"),t.destructor(),e.instancePool.length8));var S=!1;N.canUseDOM&&(S=D("input")&&(!document.documentMode||document.documentMode>11));var v={get:function(){return j.get.call(this)},set:function(t){Q=""+t,j.set.call(this,t)}},U={eventTypes:B,extractEvents:function(t,e,A,o){var r,i,a=e?f.getNodeFromInstance(e):window;if(n(a)?m?r=s:i=c:x(a)?S?r=M:(r=I,i=d):p(a)&&(r=T),r){var l=r(t,e);if(l){var g=C.getPooled(B.change,l,A,o);return g.type="change",E.accumulateTwoPhaseDispatches(g),g}}i&&i(t,a,e)}};t.exports=U},function(t,e,A){"use strict";function n(){B.ReactReconcileTransaction&&f?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=u.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function r(t,e,A,o,r,i){return n(),f.batchedUpdates(t,e,A,o,r,i)}function i(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==T.length?l("124",e,T.length):void 0,T.sort(i),h++;for(var A=0;A]/,s=A(91),c=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{n=n||document.createElement("div"),n.innerHTML=""+e+"";for(var A=n.firstChild;A.firstChild;)t.appendChild(A.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var A=t.firstChild;1===A.data.length?t.removeChild(A):A.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){"use strict";var A=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,n,o){MSApp.execUnsafeLocalFunction(function(){return t(e,A,n,o)})}:t};t.exports=A},function(t,e,A){"use strict";var n=A(60),o=A(93),r=A(90),i=function(t,e){if(e){var A=t.firstChild;if(A&&A===t.lastChild&&3===A.nodeType)return void(A.nodeValue=e)}t.textContent=e};n.canUseDOM&&("textContent"in document.documentElement||(i=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=i},function(t,e){"use strict";function A(t){var e=""+t,A=o.exec(e);if(!A)return e;var n,r="",i=0,a=0;for(i=A.index;i]/;t.exports=n},function(t,e,A){"use strict";var n=A(44),o=A(88),r=A(60),i=A(95),a=A(57),s=(A(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:n("56"),e?void 0:n("57"),"HTML"===t.nodeName?n("58"):void 0,"string"==typeof e){var A=i(e,a)[0];t.parentNode.replaceChild(A,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,A){"use strict";function n(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var A=c;c?void 0:s(!1);var o=n(t),r=o&&a(o);if(r){A.innerHTML=r[1]+t+r[2];for(var l=r[0];l--;)A=A.lastChild}else A.innerHTML=t;var g=A.getElementsByTagName("script");g.length&&(e?void 0:s(!1),i(g).forEach(e));for(var u=Array.from(A.childNodes);A.lastChild;)A.removeChild(A.lastChild);return u}var r=A(60),i=A(96),a=A(97),s=A(46),c=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,A){"use strict";function n(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),"function"==typeof t.callee?i(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var A=Array(e),n=0;n":i.innerHTML="<"+t+">",a[t]=!i.firstChild),a[t]?u[t]:null}var o=A(60),r=A(46),i=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],c=[1,"","
"],l=[3,"","
"],g=[1,'',""],u={"*":[1,"?
","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},M=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];M.forEach(function(t){u[t]=g,a[t]=!0}),t.exports=n},function(t,e,A){"use strict";var n=A(87),o=A(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var A=o.getNodeFromInstance(t);n.processUpdates(A,e)}};t.exports=r},function(t,e,A){"use strict";function n(t){if(t){var e=t._currentElement._owner||null;if(e){var A=e.getName();if(A)return" This DOM node was rendered by `"+A+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?I("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?I("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:I("61")),null!=e.style&&"object"!=typeof e.style?I("62",n(t)):void 0)}function r(t,e,A,n){if(!(n instanceof S)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;k(e,a),n.getReactMountReady().enqueue(i,{inst:t,registrationName:e,listener:A})}}function i(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function s(){var t=this;j.postMountWrapper(t)}function c(){var t=this;b.postMountWrapper(t)}function l(){var t=this;t._rootNodeID?void 0:I("63");var e=Y(t);switch(e?void 0:I("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var A in P)P.hasOwnProperty(A)&&t._wrapperState.listeners.push(D.trapBubbledEvent(A,P[A],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function g(){Q.postUpdateWrapper(this)}function u(t){_.call(K,t)||(Z.test(t)?void 0:I("65",t),K[t]=!0)}function M(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;u(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var I=A(44),p=A(16),T=A(100),h=A(102),E=A(88),N=A(89),f=A(45),w=A(110),C=A(52),y=A(53),D=A(112),x=A(47),B=A(43),L=A(115),b=A(118),Q=A(119),j=A(120),m=(A(74),A(121)),S=A(141),v=(A(57),A(93)),U=(A(46),A(77),A(130),A(144),A(56),x),z=C.deleteListener,Y=B.getNodeFromInstance,k=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=p({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,A,n){this._rootNodeID=q++,this._domID=A._idCounter++,this._hostParent=e,this._hostContainerInfo=A;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"option":b.mountWrapper(this,r,e),r=b.getHostProps(this,r);break;case"select":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"textarea":j.mountWrapper(this,r,e),r=j.getHostProps(this,r),t.getReactMountReady().enqueue(l,this)}o(this,r);var i,g;null!=e?(i=e._namespaceURI,g=e._tag):A._tag&&(i=A._namespaceURI,g=A._tag),(null==i||i===N.svg&&"foreignobject"===g)&&(i=N.html),i===N.html&&("svg"===this._tag?i=N.svg:"math"===this._tag&&(i=N.mathml)),this._namespaceURI=i;var u;if(t.useCreateElement){var M,d=A._ownerDocument;if(i===N.html)if("script"===this._tag){var I=d.createElement("div"),p=this._currentElement.type;I.innerHTML="<"+p+">",M=I.removeChild(I.firstChild)}else M=r.is?d.createElement(this._currentElement.type,r.is):d.createElement(this._currentElement.type);else M=d.createElementNS(i,this._currentElement.type);B.precacheNode(this,M),this._flags|=U.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(M),this._updateDOMProperties(null,r,t);var h=E(M);this._createInitialChildren(t,r,n,h),u=h}else{var f=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,n);u=!C&&X[this._tag]?f+"/>":f+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return u},_createOpenTagMarkupAndPutListeners:function(t,e){var A="<"+this._currentElement.type;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(R.hasOwnProperty(n))o&&r(this,n,o,t);else{n===O&&(o&&(o=this._previousStyleCopy=p({},e.style)),o=h.createMarkupForStyles(o,this));var i=null;null!=this._tag&&M(this._tag,e)?V.hasOwnProperty(n)||(i=w.createMarkupForCustomAttribute(n,o)):i=w.createMarkupForProperty(n,o),i&&(A+=" "+i)}}return t.renderToStaticMarkup?A:(this._hostParent||(A+=" "+w.createMarkupForRoot()),A+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,A){var n="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(n=o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)n=v(r);else if(null!=i){var a=this.mountChildren(i,t,A);n=a.join("")}}return W[this._tag]&&"\n"===n.charAt(0)?"\n"+n:n},_createInitialChildren:function(t,e,A,n){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(n,o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)E.queueText(n,r);else if(null!=i)for(var a=this.mountChildren(i,t,A),s=0;s1)for(var A=1;A0&&n.length<20?A+" (keys: "+n.join(", ")+")":A}function r(t,e){var A=a.get(t);if(!A){return null}return A}var i=A(44),a=(A(22),A(123)),s=(A(74),A(68)),c=(A(46),A(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,A){c.validateCallback(e,A);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void n(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],n(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,n(e))},enqueueReplaceState:function(t,e){var A=r(t,"replaceState");A&&(A._pendingStateQueue=[e],A._pendingReplaceState=!0,n(A))},enqueueSetState:function(t,e){var A=r(t,"setState");if(A){var o=A._pendingStateQueue||(A._pendingStateQueue=[]);o.push(e),n(A)}},enqueueElementInternal:function(t,e,A){t._pendingElement=e,t._context=A,n(t)},validateCallback:function(t,e){t&&"function"!=typeof t?i("122",e,o(t)):void 0}});t.exports=c},function(t,e,A){"use strict";var n=(A(16),A(57)),o=(A(56),n);t.exports=o},function(t,e,A){"use strict";var n=A(16),o=A(88),r=A(43),i=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};n(i.prototype,{mountComponent:function(t,e,A,n){var i=A._idCounter++;this._domID=i,this._hostParent=e,this._hostContainerInfo=A;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=A._ownerDocument,c=s.createComment(a);return r.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=i},function(t,e,A){"use strict";function n(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var A=0,n=t;n;n=n._hostParent)A++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;A-o>0;)t=t._hostParent,A--;for(;o-A>0;)e=e._hostParent,o--;for(var i=A;i--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function i(t,e,A){for(var n=[];t;)n.push(t),t=t._hostParent;var o;for(o=n.length;o-- >0;)e(n[o],"captured",A);for(o=0;o0;)A(s[c],"captured",r)}var s=A(44);A(46);t.exports={isAncestor:o,getLowestCommonAncestor:n,getParentInstance:r,traverseTwoPhase:i,traverseEnterLeave:a}},function(t,e,A){"use strict";var n=A(44),o=A(16),r=A(87),i=A(88),a=A(43),s=A(93),c=(A(46),A(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,A,n){var o=A._idCounter++,r=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var l=A._ownerDocument,g=l.createComment(r),u=l.createComment(c),M=i(l.createDocumentFragment());return i.queueChild(M,i(g)),this._stringText&&i.queueChild(M,i(l.createTextNode(this._stringText))),i.queueChild(M,i(u)),a.precacheNode(this,g),this._closingComment=u,M}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var A=""+t;if(A!==this._stringText){this._stringText=A;var n=this.getHostNode();r.replaceDelimitedText(n[0],n[1],A)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),A=e.nextSibling;;){if(null==A?n("67",this._domID):void 0,8===A.nodeType&&" /react-text "===A.nodeValue){this._closingComment=A;break}A=A.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,A){"use strict";function n(){this.reinitializeTransaction()}var o=A(16),r=A(68),i=A(75),a=A(57),s={initialize:a,close:function(){u.isBatchingUpdates=!1}},c={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[c,s];o(n.prototype,i,{getTransactionWrappers:function(){return l}});var g=new n,u={isBatchingUpdates:!1,batchedUpdates:function(t,e,A,n,o,r){var i=u.isBatchingUpdates;return u.isBatchingUpdates=!0,i?t(e,A,n,o,r):g.perform(t,null,e,A,n,o,r)}};t.exports=u},function(t,e,A){"use strict";function n(t){for(;t._hostParent;)t=t._hostParent;var e=g.getNodeFromInstance(t),A=e.parentNode;return g.getClosestInstanceFromNode(A)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=M(t.nativeEvent),A=g.getClosestInstanceFromNode(e),o=A;do t.ancestors.push(o),o=o&&n(o);while(o);for(var r=0;re.end?(A=e.end,n=e.start):(A=e.start,n=e.end),o.moveToElementText(t),o.moveStart("character",A),o.setEndPoint("EndToStart",o),o.moveEnd("character",n-A),o.select()}function a(t,e){if(window.getSelection){var A=window.getSelection(),n=t[l()].length,o=Math.min(e.start,n),r=void 0===e.end?o:Math.min(e.end,n);if(!A.extend&&o>r){var i=r;r=o,o=i}var a=c(t,o),s=c(t,r);if(a&&s){var g=document.createRange();g.setStart(a.node,a.offset),A.removeAllRanges(),o>r?(A.addRange(g),A.extend(s.node,s.offset)):(g.setEnd(s.node,s.offset),A.addRange(g))}}}var s=A(60),c=A(156),l=A(63),g=s.canUseDOM&&"selection"in document&&!("getSelection"in window),u={getOffsets:g?o:r,setOffsets:g?i:a};t.exports=u},function(t,e){"use strict";function A(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function n(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=A(t),r=0,i=0;o;){if(3===o.nodeType){if(i=r+o.textContent.length,r<=e&&i>=e)return{node:o,offset:e-r};r=i}o=A(n(o))}}t.exports=o},function(t,e,A){"use strict";function n(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?n(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=A(158);t.exports=n},function(t,e,A){"use strict";function n(t){return o(t)&&3==t.nodeType}var o=A(159);t.exports=n},function(t,e){"use strict";function A(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=A},function(t,e){"use strict";function A(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=A},function(t,e){"use strict";var A={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},n={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:A.xlink,xlinkArcrole:A.xlink,xlinkHref:A.xlink,xlinkRole:A.xlink,xlinkShow:A.xlink,xlinkTitle:A.xlink,xlinkType:A.xlink,xmlBase:A.xml,xmlLang:A.xml,xmlSpace:A.xml},DOMAttributeNames:{}};Object.keys(n).forEach(function(t){o.Properties[t]=0,n[t]&&(o.DOMAttributeNames[t]=n[t])}),t.exports=o},function(t,e,A){"use strict";function n(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var A=document.selection.createRange();return{parentElement:A.parentElement(),text:A.text,top:A.boundingTop,left:A.boundingLeft}}}function o(t,e){if(h||null==I||I!==l())return null;var A=n(I);if(!T||!u(T,A)){T=A;var o=c.getPooled(d.select,p,t,e);return o.type="select",o.target=I,r.accumulateTwoPhaseDispatches(o),o}return null}var r=A(51),i=A(60),a=A(43),s=A(154),c=A(65),l=A(160),g=A(78),u=A(130),M=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},I=null,p=null,T=null,h=!1,E=!1,N={eventTypes:d,extractEvents:function(t,e,A,n){if(!E)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(g(r)||"true"===r.contentEditable)&&(I=r,p=e,T=null);break;case"topBlur":I=null,p=null,T=null;break;case"topMouseDown":h=!0;break;case"topContextMenu":case"topMouseUp":return h=!1,o(A,n);case"topSelectionChange":if(M)break;case"topKeyDown":case"topKeyUp":return o(A,n)}return null},didPutListener:function(t,e,A){"onSelect"===e&&(E=!0)}};t.exports=N},function(t,e,A){"use strict";function n(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=A(44),i=A(150),a=A(51),s=A(43),c=A(164),l=A(165),g=A(65),u=A(166),M=A(167),d=A(81),I=A(170),p=A(171),T=A(172),h=A(82),E=A(173),N=A(57),f=A(168),w=(A(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),A="on"+e,n="top"+e,o={phasedRegistrationNames:{bubbled:A,captured:A+"Capture"},dependencies:[n]};w[t]=o,C[n]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,A,n){var o=C[t];if(!o)return null;var i;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=g;break;case"topKeyPress":if(0===f(A))return null;case"topKeyDown":case"topKeyUp":i=M;break;case"topBlur":case"topFocus":i=u;break;case"topClick":if(2===A.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=I;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=p;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=c;break;case"topTransitionEnd":i=T;break;case"topScroll":i=h;break;case"topWheel":i=E;break;case"topCopy":case"topCut":case"topPaste":i=l}i?void 0:r("86",t);var s=i.getPooled(o,e,A,n);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,A){if("onClick"===e&&!o(t._tag)){var r=n(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=i.listen(a,"click",N))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var A=n(t);y[A].remove(),delete y[A]}}};t.exports=D},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r={relatedTarget:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(168),i=A(169),a=A(84),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(n,s),t.exports=n},function(t,e){"use strict";function A(t){var e,A=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===A&&(e=13)):e=A,e>=32||13===e?e:0}t.exports=A},function(t,e,A){"use strict";function n(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var A=o(t);return 13===A?"Enter":String.fromCharCode(A)}return"keydown"===t.type||"keyup"===t.type?i[t.keyCode]||"Unidentified":""}var o=A(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={dataTransfer:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(84),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e){for(var A=Math.min(t.length,e.length),n=0;n.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,a=p.createElement(k,{child:e});if(t){var s=w.get(t);i=s._processChildContext(s._context)}else i=B;var l=u(A);if(l){var g=l._currentElement,d=g.props.child;if(Q(d,e)){var I=l._renderedComponent.getPublicInstance(),T=n&&function(){n.call(I)};return R._updateRootComponent(l,a,i,A,T),I}R.unmountComponentAtNode(A)}var h=o(A),E=h&&!!r(h),N=c(A),f=E&&!l&&!N,C=R._renderNewRootComponent(a,A,f,i)._renderedComponent.getPublicInstance();return n&&n.call(C),C},render:function(t,e,A){return R._renderSubtreeIntoContainer(null,t,e,A)},unmountComponentAtNode:function(t){l(t)?void 0:M("40");var e=u(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(m);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,A,r,i){if(l(e)?void 0:M("41"),r){var a=o(e);if(C.canReuseMarkup(t,a))return void h.precacheNode(A,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var g=t,u=n(g,c),I=" (client) "+g.substring(u-20,u+20)+"\n (server) "+c.substring(u-20,u+20);e.nodeType===v?M("42",I):void 0}if(e.nodeType===v?M("43"):void 0,i.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),h.precacheNode(A,e.firstChild)}};t.exports=R},function(t,e,A){"use strict";function n(t,e){var A={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return A}var o=(A(144),9);t.exports=n},function(t,e){"use strict";var A={useCreateElement:!0,useFiber:!1};t.exports=A},function(t,e,A){"use strict";var n=A(178),o=/\/?>/,r=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=n(t);return r.test(t)?t:t.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var A=e.getAttribute(i.CHECKSUM_ATTR_NAME);A=A&&parseInt(A,10);var o=n(t);return o===A}};t.exports=i},function(t,e){"use strict";function A(t){for(var e=1,A=0,o=0,r=t.length,i=r&-4;o3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),u=t||y,d=void 0;d="function"==typeof e?e:e?(0,T.default)(e):D;var p=A||x,h=n.pure,E=void 0===h||h,N=n.withRef,w=void 0!==N&&N,b=E&&p!==x,Q=L++;return function(t){function e(t,e,A){var n=p(t,e,A);return n}var A="Connect("+a(t)+")",n=function(n){function a(t,e){o(this,a);var i=r(this,n.call(this,t,e));i.version=Q,i.store=t.store||e.store,(0,C.default)(i.store,'Could not find "store" in either the context or '+('props of "'+A+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+A+'".'));var s=i.store.getState();return i.state={storeState:s},i.clearCache(),i}return i(a,n),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var A=t.getState(),n=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(A,e):this.finalMapStateToProps(A);return n},a.prototype.configureFinalMapState=function(t,e){var A=u(t.getState(),e),n="function"==typeof A;return this.finalMapStateToProps=n?A:u,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,n?this.computeStateProps(t,e):A},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var A=t.dispatch,n=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(A,e):this.finalMapDispatchToProps(A);return n},a.prototype.configureFinalMapDispatch=function(t,e){var A=d(t.dispatch,e),n="function"==typeof A;return this.finalMapDispatchToProps=n?A:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,n?this.computeDispatchProps(t,e):A},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,I.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,I.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,I.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,I.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var A=s(this.updateStatePropsIfNeeded,this);if(!A)return;A===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,A=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var i=!0,a=!0;E&&r&&(i=A||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;n?s=!0:i&&(s=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var u=!0;return u=!!(s||c||e)&&this.updateMergedPropsIfNeeded(),!u&&r?r:(w?this.renderedElement=(0,g.createElement)(t,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,g.createElement)(t,this.mergedProps),this.renderedElement)},a}(g.Component);return n.displayName=A,n.WrappedComponent=t,n.contextTypes={store:M.default},n.propTypes={store:M.default},(0,f.default)(n,t)}}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];switch(e.type){case g.LOAD_MASTER_COMPLETED:var A=e.masterData.springBeans;return Object.assign({},t.prototype,{data:A});case g.ADD_MASTER:var n=[];return t.data&&(n=[].concat(o(t.data))),n.push({id:"",name:"",methods:[]}),Object.assign({},t.prototype,{data:n});case g.DEL_MASTER:var n=[].concat(o(t.data)),r=e.rowIndex;return n.splice(r,1),Object.assign({},t.prototype,{data:n});case g.SAVE:var A=t.data,i=e.newVersion,a=e.file;return g.saveData(A,i,a),t;default:return t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case g.LOAD_SLAVE_COMPLETE:var A=e.masterRowData;return A&&A.methods&&A.methods.forEach(function(t,e){t.id=(0,u.uniqueID)()}),Object.assign({},t.prototype,{data:e.masterRowData});case g.ADD_SLAVE:if(!t.data||!t.data.methods)return bootbox.alert("请先指定方法所属的Bean"),t;var n=Object.assign({},t.data),o=e.newSlaveData||{name:"",methodName:"",parameters:[]};return n.methods.push(o),Object.assign({},t.prototype,{data:n});case g.DEL_SLAVE:var r=e.rowIndex,n=Object.assign({},t.data);return n.methods.splice(r,1),Object.assign({},t.prototype,{data:n});default:return t}}function a(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case g.LOAD_METHOD_COMPLETED:return Object.assign({},t.prototype,{data:e.slaveData});case g.LOAD_SLAVE_COMPLETE:return Object.assign({},t.prototype,{data:{}});case g.ADD_PARAMETER:if(!t.data||!t.data.parameters)return bootbox.alert("请先指定参数所属的方法"),t;var A=Object.assign({},t.data);return A.parameters.push({name:"",type:"String"}),Object.assign({},t.prototype,{data:A});case g.DEL_PARAMETER:var n=e.rowIndex,A=Object.assign({},t.data);return A.parameters.splice(n,1),Object.assign({},t.prototype,{data:A});default:return t}}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments[1];switch(e.type){case g.LOADED_BEAN_METHODS:return Object.assign({},t.prototype,{data:e.result});default:return t}}Object.defineProperty(e,"__esModule",{value:!0});var c=A(183),l=A(225),g=n(l),u=A(227);e.default=(0,c.combineReducers)({master:r,slave:i,method:a,methodList:s})},function(t,e,A){"use strict";function n(t,e){return{newVersion:t,file:e,type:x}}function o(t,e,A){var n='';n+="";var o="",r=!0,i=!1,a=void 0;try{for(var s,c=t[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(!l.name||l.name.length<1){o="动作名称不能为空.";break}if(!l.id||l.id.length<1){o="Bean Id不能为空.";break}n+="";var g=l.methods;if(!g||0===g.length){o="动作分类["+l.name+"]下未定义具体的动作方法.";break}var u=!0,M=!1,d=void 0;try{for(var p,T=g[Symbol.iterator]();!(u=(p=T.next()).done);u=!0){var h=p.value;if(!h.name||h.name.length<1){o="名称不能为空.";break}if(!h.methodName||h.methodName.length<1){o="方法名不能为空.";break}n+="";var E=h.parameters;if(E){var N=!0,f=!1,w=void 0;try{for(var C,y=E[Symbol.iterator]();!(N=(C=y.next()).done);N=!0){var D=C.value;if(!D.name||D.name.length<1){o="参数名不能为空!";break}if(!D.type||D.type.length<1){o="参数类型不能为空!";break}n+=""}}catch(t){f=!0,w=t}finally{try{!N&&y.return&&y.return()}finally{if(f)throw w}}}n+=""}}catch(t){M=!0,d=t}finally{try{!u&&T.return&&T.return()}finally{if(M)throw d}}if(o.length>1)break;n+=""}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}if(o.length>1)return void bootbox.alert(o+",不能保存!");n+="";var x={content:n,file:A,newVersion:e},L=window._server+"/common/saveFile";return e?bootbox.prompt("请输入新版本描述.",function(t){t&&(x.versionComment=t,(0,I.ajaxSave)(L,x,function(){bootbox.alert("保存成功!")}))}):(0,I.ajaxSave)(L,x,function(){bootbox.alert("保存成功!")}),{type:B}}function r(t){return function(e){var A=window._server+"/actioneditor/loadMethods";$.ajax({url:A,type:"POST",data:{beanId:t},success:function(t){e({type:L,result:t})},error:function(t){t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function i(){return{type:N}}function a(t){return{rowIndex:t,type:f}}function s(t){return{rowIndex:t,type:C}}function c(t){return{rowIndex:t,type:y}}function l(t){return t?{type:w,newSlaveData:t}:{type:w}}function g(){return{type:D}}function u(t){return function(e){var A=window._server+"/xml";$.ajax({url:A,type:"POST",data:{files:t},success:function(t){e({type:p,masterData:t[0]})},error:function(t){t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function M(t,e){return null!==b&&b===e?{type:E}:(b=e,{type:T,masterRowData:t})}function d(t){return{type:h,slaveData:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.LOADED_BEAN_METHODS=e.SAVE_COMPLETED=e.SAVE=e.IMPORT_FIELDS=e.ADD_PARAMETER=e.DEL_PARAMETER=e.DEL_SLAVE=e.ADD_SLAVE=e.DEL_MASTER=e.ADD_MASTER=e.DO_NOTHING=e.LOAD_METHOD_COMPLETED=e.LOAD_SLAVE_COMPLETE=e.LOAD_MASTER_COMPLETED=void 0,e.save=n,e.saveData=o,e.loadBeanMethods=r,e.addMaster=i,e.deleteMaster=a,e.deleteSlave=s,e.deleteParameter=c,e.addSlave=l,e.addParameter=g,e.loadMasterData=u,e.loadSlaveData=M,e.loadMethodData=d;var I=A(226),p=e.LOAD_MASTER_COMPLETED="load_master_completed",T=e.LOAD_SLAVE_COMPLETE="load_slave_completed",h=e.LOAD_METHOD_COMPLETED="load_method_data",E=e.DO_NOTHING="do_nothing",N=e.ADD_MASTER="add_master",f=e.DEL_MASTER="del_master",w=e.ADD_SLAVE="add_slave",C=e.DEL_SLAVE="del_slave",y=e.DEL_PARAMETER="del_parameter",D=e.ADD_PARAMETER="add_parameter",x=(e.IMPORT_FIELDS="IMPORT_FIELDS",e.SAVE="save"),B=e.SAVE_COMPLETED="save_completed",L=e.LOADED_BEAN_METHODS="loaded_bean_methods",b=null},function(t,e){"use strict";function A(){return window.iframe_id_++,"_iframe"+window.iframe_id_}function n(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),A=window.location.search.substr(1).match(e);return null!=A?A[2]:null}function o(t,e,A){$.ajax({type:"POST",url:t,data:e,success:function(t){A(t)},error:function(t){t&&401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var A={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in A)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?A[n]:("00"+A[n]).substr((""+A[n]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=A,e.getParameter=n,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+l++;return t}function r(t,e){var A=window._server+"/frame/loadFileVersions";$.ajax({url:A,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function i(t,e){var A=window._server+"/common/loadResourceTreeData";$.ajax({url:A,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=c.default.frameStyle.getRootIcon(),t._style=c.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=c.default.frameStyle.getFolderIcon(),t._style=c.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=c.default.frameStyle.getRuleIcon(),t._style=c.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=c.default.frameStyle.getProjectIcon(),t._style=c.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=c.default.frameStyle.getResourceIcon(),t._style=c.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=c.default.frameStyle.getResourcePackageIcon(),t._style=c.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=c.default.frameStyle.getLibIcon(),t._style=c.default.frameStyle.getLibIconStyle();break;case"action":t._icon=c.default.frameStyle.getActionIcon(),t._style=c.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=c.default.frameStyle.getParameterIcon(),t._style=c.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=c.default.frameStyle.getConstantIcon(),t._style=c.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=c.default.frameStyle.getVariableIcon(),t._style=c.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=c.default.frameStyle.getRuleLibIcon(),t._style=c.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=c.default.frameStyle.getDecisionTableLibIcon(),t._style=c.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=c.default.frameStyle.getDecisionTreeLibIcon(),t._style=c.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=c.default.frameStyle.getFlowLibIcon(),t._style=c.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=c.default.frameStyle.getUlIcon(),t._style=c.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=c.default.frameStyle.getDecisionTableIcon(),t._style=c.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=c.default.frameStyle.getScriptDecisionTableIcon(),t._style=c.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=c.default.frameStyle.getDecisionTreeIcon(),t._style=c.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=c.default.frameStyle.getFlowIcon(),t._style=c.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=c.default.frameStyle.getScorecardIcon(),t._style=c.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=i;var s=A(228),c=n(s),l=1},function(t,e){"use strict";function A(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var n={};n.frameStyle={getRootIcon:function(){return A("rootIcon","rf rf-root")},getRootIconStyle:function(){return A("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return A("projectIcon","rf rf-project")},getProjectIconStyle:function(){return A("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return A("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return A("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return A("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return A("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return A("libIcon","rf rf-database")},getLibIconStyle:function(){return A("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return A("actionIcon","rf rf-action")},getActionIconStyle:function(){return A("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return A("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return A("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return A("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return A("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return A("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return A("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return A("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return A("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return A("ulIcon","rf rf-script")},getUlIconStyle:function(){return A("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return A("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return A("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return A("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return A("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return A("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return A("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return A("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return A("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return A("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return A("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return A("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return A("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return A("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return A("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return A("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return A("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return A("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return A("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return A("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return A("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return A("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return A("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=n},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return{masterData:t.master.data||[],masterRowData:t.slave.data||{},slaveRowData:t.method.data||{}}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var A=0;A\r\n *\r\n * Same license as plugin\r\n */.splitter_panel{position:relative}.splitter_panel .vsplitter{border-left:1px solid #999;border-right:1px solid #999;background-color:#f5f5f5;cursor:col-resize;z-index:900;width:7px}.splitter_panel .hsplitter{background-color:#5f5f5f;cursor:row-resize;z-index:800;height:7px}.splitter_panel .hsplitter.splitter-invisible,.splitter_panel .vsplitter.splitter-invisible{background:none}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{position:absolute;overflow:auto}.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .vsplitter{height:100%}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .top_panel{width:100%}.splitter_panel .left_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{top:0}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .top_panel{left:0}.splitter_panel .bottom_panel{bottom:0}.splitter_panel .right_panel{right:0}.splitterMask{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1000}",""])},function(t,e){"use strict";!function(t,e){var A=0,n=null,o=[],r=null;t.fn.split=function(i){function a(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9\.]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==g.orientation)return d*+e[1]/100;if("horizontal"==g.orientation)return I*+e[1]/100}}}var s=this.data("splitter");if(s)return s;var c,l,g=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},i||{});this.settings=g;var u,M=this.children();"vertical"==g.orientation?(c=M.first().addClass("left_panel"),l=c.next().addClass("right_panel"),u="vsplitter"):"horizontal"==g.orientation&&(c=M.first().addClass("top_panel"),l=c.next().addClass("bottom_panel"),u="hsplitter"),g.invisible&&(u+=" splitter-invisible");var d=this.width(),I=this.height(),p=A++;this.addClass("splitter_panel");var T,h=t("
").addClass(u).bind("mouseenter touchstart",function(){n=p}).bind("mouseleave touchend",function(){n=null}).insertAfter(c),E=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&I==e||(d=this.width(),I=this.height(),E.position(T))},position:function(){return"vertical"==g.orientation?function(t,A){if(t===e)return T;T=a(t);var n=h.width(),o=n/2;if(g.invisible){var r=c.width(T).outerWidth();l.width(E.width()-r),h.css("left",r-o)}else{var r=c.width(T-o).outerWidth();l.width(E.width()-r-n),h.css("left",r)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:"horizontal"==g.orientation?function(t,A){if(t===e)return T;T=a(t);var n=h.height(),o=n/2;if(g.invisible){var r=c.height(T).outerHeight();l.height(E.height()-r),h.css("top",r-o)}else{var r=c.height(T-o).outerHeight();l.height(E.height()-r-n),h.css("top",r)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:t.noop}(),orientation:g.orientation,limit:g.limit,isActive:function(){return n===p},destroy:function(){E.removeClass("splitter_panel"),h.unbind("mouseenter"),h.unbind("mouseleave"),h.unbind("touchstart"),h.unbind("touchmove"),h.unbind("touchend"),h.unbind("touchleave"),h.unbind("touchcancel"),"vertical"==g.orientation?(c.removeClass("left_panel"),l.removeClass("right_panel")):"horizontal"==g.orientation&&(c.removeClass("top_panel"),l.removeClass("bottom_panel")),E.unbind("splitter.resize"),E.find(".splitter_panel").trigger("splitter.resize"),o[p]=null,h.remove();for(var e=!1,n=o.length;n--;)if(null!==o[n]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),E.data("splitter",null),o=[],A=0)}});E.bind("splitter.resize",function(t){var e=E.position();"vertical"==E.orientation&&e>E.width()?e=E.width()-E.limit-1:"horizontal"==E.orientation&&e>E.height()&&(e=E.height()-E.limit-1),ed-g.limit?d-g.limit:a(g.position):"horizontal"==g.orientation&&(N=N>I-g.limit?I-g.limit:a(g.position)),N
').css("cursor",r.children().eq(1).css("cursor")).insertAfter(r),r.settings.onDragStart(e),!1}).bind("mouseup.splitter touchend.splitter touchleave.splitter touchcancel.splitter",function(e){r&&(t(".splitterMask").remove(),r.settings.onDragEnd(e),r=null)}).bind("mousemove.splitter touchmove.splitter",function(t){if(null!==r){var e=r.limit,A=r.offset();if("vertical"==r.orientation){var n=t.pageX;t.originalEvent&&t.originalEvent.changedTouches&&(n=t.originalEvent.changedTouches[0].pageX);var o=n-A.left;o<=r.limit?o=r.limit+1:o>=r.width()-e&&(o=r.width()-e-1),o>r.limit&&o=r.height()-e&&(a=r.height()-e-1),a>r.limit&&a-1&&(l=!0),!1}}),l?c.show():c.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,A=e.headers,n=e.operationConfig,o=e.dispatch,r=e.selectFirst,i=(e.uniqueKey,this.props.rows||[]),a=[],s=[];A.forEach(function(e,A){e.editable?a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label),c.default.createElement(I.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label)))}),n&&a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:n.width}},c.default.createElement("label",null,"操作列")));var l=c.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},A.map(function(e,A){return e.filterable?c.default.createElement("td",{key:(0,p.uniqueID)()},c.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,A),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):c.default.createElement("td",{key:(0,p.uniqueID)()}," ")}),n?c.default.createElement("td",null):null);s.push(l),i.forEach(function(e,i){e.id||(e.id=(0,p.uniqueID)());var a=e.id;0===i&&r?s.push(c.default.createElement(M.default,{key:a,select:!0,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i})):s.push(c.default.createElement(M.default,{key:a,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i +}))});var g={margin:0,width:this.props.width?this.props.width:"100%"};return c.default.createElement("table",{className:"table table-bordered",style:g},c.default.createElement("thead",null,c.default.createElement("tr",{className:"well"},a)),c.default.createElement("tbody",null,s))}}]),e}(s.Component);T.propTypes={headers:c.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=T},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var n=e[t];n&&""!==n||(n="{}");var o=JSON.parse(n)||{},r=o.rows||[],i=o.type,a=function(n){var o={type:i,rows:n},r=JSON.stringify(o);e[t]=r;var a=A.find("div");a.html(r)};if(i){var s=null,c=!0,l=!1,g=void 0;try{for(var u,M=simulatorCategoryData[Symbol.iterator]();!(c=(u=M.next()).done);c=!0){var d=u.value;if(i===d.clazz){s=d;break}}}catch(t){l=!0,g=t}finally{try{!c&&M.return&&M.return()}finally{if(l)throw g}}var p=s.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:p,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),A=!0,n=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var l=s.value;e.append('")}}catch(t){n=!0,o=t}finally{try{!A&&c.return&&c.return()}finally{if(n)throw o}}e.append(''),T.MsgBox.dialog("选择子对象类型",e,function(){if(i=e.val(),!i||""===i)return void T.MsgBox.alert("请先选择子对象类型!");var A=null,n=!0,o=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(n=(c=l.next()).done);n=!0){var g=c.value;if(i===g.clazz){A=g;break}}}catch(t){o=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw s}}var u=A.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:u,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}A.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var n=A.find("div");n.html(e[t]),n.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,A=e.rowData,n=e.header,o=n.dateFormat,r=A[n.name];if(o){var i=new Date(r);r=(0,p.formatDate)(i,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return g.default.createElement("td",{style:{padding:"1px 5px"}},g.default.createElement("div",{style:a,onClick:function(e){if(n.editable){var o=e.target;$(o).css({display:"none"}),A._editorType?t._showEditor(n.name):I.eventEmitter.emit(I.SHOW_CELL_EDITOR,{targetDiv:o,rowData:A,colId:n.id})}}},r))}}]),e}(l.Component);e.default=h},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=A(240),r=n(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},A.prototype.emit=function(t){var e,A,o,a,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(A=this._events[t],i(A))return!1;if(n(A))switch(arguments.length){case 1:A.call(this);break;case 2:A.call(this,arguments[1]);break;case 3:A.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),A.apply(this,a)}else if(r(A))for(a=Array.prototype.slice.call(arguments,1),c=A.slice(),o=c.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(t,e){function A(){this.removeListener(t,A),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return A.listener=e,this.on(t,A),this},A.prototype.removeListener=function(t,e){var A,o,i,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(A=this._events[t],i=A.length,o=-1,A===e||n(A.listener)&&A.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(A)){for(a=i;a-- >0;)if(A[a]===e||A[a].listener&&A[a].listener===e){o=a;break}if(o<0)return this;1===A.length?(A.length=0,delete this._events[t]):A.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},A.prototype.removeAllListeners=function(t){var e,A;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(A=this._events[t],n(A))this.removeListener(t,A);else if(A)for(;A.length;)this.removeListener(t,A[A.length-1]);return delete this._events[t],this},A.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},A.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},A.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,A){var n=A(242).default,o=A(243).default,r=A(251),i=A(252).default,a=A(302);t.exports={Tool:n,Node:o,MsgBox:r,Event:a,FlowDesigner:i}},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_newNodeInstance",value:function(t,e,A){var n=this.newNode();return n?(n._tool=this,n._initConfigs(this.getConfigs()),A||(A=this._buildNodeName()),n._createFigure(this.context,{x:t,y:e},A),n):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,A=!0,n=!1,o=void 0;try{for(var r,i=this.context.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);es-l&&as-l&&a>c-l?this.attr("cursor","se-resize"):ic-l?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},n=function(A){if(!this.dragging){var n=t.currentTool;if(n){if(n instanceof M.default||n instanceof g.default||(t.currentTool=t.selectTool,n=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),n instanceof g.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,i=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var u=s.value;if(u===e){o=!0;break}}}catch(t){i=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(n instanceof M.default){var d=A.offsetX,p=A.offsetY,T=t.currentConnection;if(T){if(0===e.in)return void I.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void I.alert("当前节点进入的连线最多只能有"+e.in+"条.");T.endX=d,T.endY=p,T.from!==e?!function(){T.endPath(e),t.currentConnection=null;var A=T.from.uuid,n=e.uuid,o=T.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(A),r=t.getNodeByUUID(n);T=new c.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),T.uuid=o,T.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():I.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void I.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void I.alert("当前节点出去的连线最多只能有"+e.out+"条.");T=new c.default(e,{endX:d,endY:p}),t.currentConnection=T}}}}};this.rect.mouseover(A),this.rect.mousedown(n),this.icon.mouseover(A),this.icon.mousedown(n);var o=function(){var A=e.rect,n=t.currentTool;if(n&&n instanceof g.default){var o=!1,r=t.selectionFigures,i=!0,a=!1,s=void 0;try{for(var l,u=r[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var M=l.value;if(M===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof c.default||t._recordRectPosition()}),A.ow=A.attr("width"),A.oh=A.attr("height"),A.dragging=!0}},r=function(A,n){var o=t.currentTool;if(o&&o instanceof g.default){e.context.snapto&&(A-=A%10,n-=n%10);var r=t.selectionFigures,i=e.rect,a=(e.icon,i.ox+A),s=i.oy+n;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var l=void 0,u=void 0;switch(this.attr("cursor")){case"nw-resize":l=i.ow-A,u=i.oh-n,l>20&&u>20&&i.attr({x:a,y:s,width:l,height:u});break;case"ne-resize":l=i.ow+A,u=i.oh-n,l>20&&u>20&&i.attr({y:s,width:l,height:u});break;case"se-resize":l=i.ow+A,u=i.oh+n,l>20&&u>20&&i.attr({width:l,height:u});break;case"sw-resize":l=i.ow-A,u=i.oh+n,l>20&&u>20&&i.attr({x:a,width:l,height:u});break;default:r.forEach(function(t,e){t instanceof c.default||t._moveRect(A,n)})}r.forEach(function(t,e){t instanceof c.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},i=function(){e.rect.dragging=!1;var A=[],n=new Map,o=new Map,r=e.rect.ow,i=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),l=e.uuid,g=!0,u=!1,M=void 0;try{for(var d,I=t.selectionFigures[Symbol.iterator]();!(g=(d=I.next()).done);g=!0){var p=d.value;if(!(p instanceof c.default)){A.push(p.uuid);var T=p.rect.ox,h=p.rect.oy;T=T?T:0,h=h?h:0;var E=p.rect.attr("x"),N=p.rect.attr("y");n.set(p.uuid,{x:E,y:N}),o.set(p.uuid,{x:T,y:h})}}}catch(t){u=!0,M=t}finally{try{!g&&I.return&&I.return()}finally{if(u)throw M}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var i,c=A[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var g=i.value,u=t.getNodeByUUID(g),M=n.get(g);u.rect.attr({x:M.x,y:M.y}),g===l&&u.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&c.return&&c.return()}finally{if(o)throw r}}var d=!0,I=!1,p=void 0;try{for(var T,h=A[Symbol.iterator]();!(d=(T=h.next()).done);d=!0){var E=T.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,p=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw p}}},undo:function(){var e=!0,n=!1,a=void 0;try{for(var s,c=A[Symbol.iterator]();!(e=(s=c.next()).done);e=!0){var g=s.value,u=t.getNodeByUUID(g),M=o.get(g);u.rect.attr({x:M.x,y:M.y}),g===l&&u.rect.attr({width:r,height:i})}}catch(t){n=!0,a=t}finally{try{!e&&c.return&&c.return()}finally{if(n)throw a}}var d=!0,I=!1,p=void 0;try{for(var T,h=A[Symbol.iterator]();!(d=(T=h.next()).done);d=!0){var E=T.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,p=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw p}}}})};this.rect.drag(r,o,i),this.icon.drag(r,o,i)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),A=[].concat(r(this.fromConnections));e.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),A.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var A=void 0,n=void 0;this.rect.ox&&0!==this.rect.ox?(A=this.rect.ox+t,n=this.rect.oy+e):(A=this.rect.attr("x")+t,n=this.rect.attr("x")+e),this.rect.attr({x:A,y:n})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),A=this.rect.attr("y"),n=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,A-=5,n+=10,o+=10),"M "+e+" "+A+" L "+(e+n)+" "+A+" L "+(e+n)+" "+(A+o)+" L "+e+" "+(A+o)+" L "+e+" "+A}}]),t}();e.default=p},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t,e){for(var A=0;A0){({x:t[1][1],y:t[1][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var A=this.to.rect,n=A.attr("x"),o=A.attr("y"),r=A.attr("width"),i=A.attr("height");n+=r/2,o+=i/2-10;var a=t.x,c=t.y;t=[],t.push(["M",a,c]),t.push(["L",n,o])}var l=this.to.getPathInfo(!0),g=s.default.pathIntersection(l,t);if(g.length>0){({x:t[0][1],y:t[0][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),A=t.attr("y"),n=t.attr("width"),o=t.attr("height");e+=n/2,A+=o/2-10;var r=this.endX,i=this.endY,a=0,c=0,l=null;if(this.to){var g=this.to.rect;r=g.attr("x"),i=g.attr("y"),a=g.attr("width"),c=g.attr("height"),r+=a/2,i+=c/2-10}var u=this.from.getPathInfo(!0),M=Math.abs(e+n/2-(r-a/2)),d=Math.abs(A+o/2-(i-c/2)),I="M"+e+" "+A;if(M>=d){var p=I+" L"+r+" "+A,T=s.default.pathIntersection(u,p);if(T.length>0&&(e=T[0].x,A=T[0].y,I="M"+T[0].x+" "+T[0].y),this.to){var h="M"+e+" "+i+" L"+r+" "+i,E=this.to.getPathInfo(!0);T=s.default.pathIntersection(E,h),T.length>0&&(r=T[0].x,i=T[0].y,e0&&(e=C[0].x,A=C[0].y,I="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+A+" L"+r+" "+i,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,i=C[0].y,A=1e3&&delete a[s.shift()],s.push(i),a[i]=t[L](e,r),A?A(a[i]):a[i])}return o}function r(){return this.hex}function i(t,e){for(var A=[],n=0,o=t.length;o-2*!e>n;n+=2){var r=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?o-4==n?r[3]={x:+t[0],y:+t[1]}:o-2==n&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==n?r[3]=r[2]:n||(r[0]={x:+t[n],y:+t[n+1]}),A.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return A}function a(t,e,A,n,o){var r=-3*e+9*A-9*n+3*o,i=t*r+6*e-12*A+6*n;return t*i-3*e+3*A}function s(t,e,A,n,o,r,i,s,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,g=12,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],M=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,I=0;Id;)u/=2,M+=(lR(o,i)||R(e,n)R(r,a))){var s=(t*n-e*A)*(o-i)-(t-A)*(o*a-r*i),c=(t*n-e*A)*(r-a)-(e-n)*(o*a-r*i),l=(t-A)*(r-a)-(e-n)*(o-i);if(l){var g=s/l,u=c/l,M=+g.toFixed(2),d=+u.toFixed(2);if(!(M<+F(t,A).toFixed(2)||M>+R(t,A).toFixed(2)||M<+F(o,i).toFixed(2)||M>+R(o,i).toFixed(2)||d<+F(e,n).toFixed(2)||d>+R(e,n).toFixed(2)||d<+F(r,a).toFixed(2)||d>+R(r,a).toFixed(2)))return{x:g,y:u}}}}function g(t,A,n){var o=e.bezierBBox(t),r=e.bezierBBox(A);if(!e.isBBoxIntersect(o,r))return n?0:[];for(var i=s.apply(0,t),a=s.apply(0,A),c=R(~~(i/5),1),g=R(~~(a/5),1),u=[],M=[],d={},I=n?0:[],p=0;p=0&&x<=1.001&&B>=0&&B<=1.001&&(n?I++:I.push({x:D.x,y:D.y,t1:F(x,1),t2:F(B,1)}))}}return I}function u(t,A,n){t=e._path2curve(t),A=e._path2curve(A);for(var o,r,i,a,s,c,l,u,M,d,I=n?0:[],p=0,T=t.length;pn)return n;for(;Ar?A=o:n=o,o=(n-A)/2+A}return o}var c=3*e,l=3*(n-e)-c,g=1-c-l,u=3*A,M=3*(o-A)-u,d=1-u-M;return a(t,1/(200*r))}function p(t,e){var A=[],n={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(n[q(o)]=t[o],A.push(q(o)));A.sort(lt)}this.anim=n,this.top=A[A.length-1],this.percents=A}function T(A,n,o,r,i,a){o=q(o);var s,c,l,g,u,d,p=A.ms,T={},h={},E={};if(r)for(w=0,C=re.length;wr*A.top){o=A.percents[w],u=A.percents[w-1]||0,p=p/A.top*(o-u),g=A.percents[w+1],s=A.anim[o];break}r&&n.attr(A.anim[A.percents[w]])}if(s){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var D in s)if(s[y](D)&&(At[y](D)||n.paper.customAttributes[y](D)))switch(T[D]=n.attr(D),null==T[D]&&(T[D]=et[D]),h[D]=s[D],At[D]){case G:E[D]=(h[D]-T[D])/p;break;case"colour":T[D]=e.getRGB(T[D]);var x=e.getRGB(h[D]);E[D]={r:(x.r-T[D].r)/p,g:(x.g-T[D].g)/p,b:(x.b-T[D].b)/p};break;case"path":var B=vt(T[D],h[D]),L=B[1];for(T[D]=B[0],E[D]=[],w=0,C=T[D].length;w',pt=Tt.firstChild,pt.style.behavior="url(#default#VML)",!pt||"object"!=typeof pt.adj)return e.type=j;Tt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=N=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,A,n,o,r,i){if(null==r){var a=t-n,s=A-o;return a||s?(180+180*k.atan2(-s,-a)/V+360)%360:0}return e.angle(t,A,r,i)-e.angle(n,o,r,i)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,A,n){if(n=e.is(n,"finite")?n:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-A)<=n)return t[o]}else{t=+t;var r=A%t;if(rt-n)return A-r+t}return A};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*k.random()|0,A="x"==t?e:3&e|8;return A.toString(16)});e.setWindow=function(A){t("raphael.setWindow",e,D.win,A),D.win=A,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var ht=function(t){if(e.vml){var A,n=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),A=r.body}catch(t){A=createPopup().document.body}var i=A.createTextRange();ht=o(function(t){try{A.style.color=S(t).replace(n,j);var e=i.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),ht=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,j).getPropertyValue("color")})}return ht(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Nt=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return this.hex},wt=function(t,A,n){if(null==A&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,A=t.g,t=t.r),null==A&&e.is(t,P)){var o=e.getRGB(t);t=o.r,A=o.g,n=o.b}return(t>1||A>1||n>1)&&(t/=255,A/=255,n/=255),[t,A,n]},Ct=function(t,A,n,o){t*=255,A*=255,n*=255;var r={r:t,g:A,b:n,hex:e.rgb(t,A,n),toString:ft};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var A;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(A=e.hsb2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(A=e.hsl2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(A=e.rgb2hsl(t),t.h=A.h,t.s=A.s,t.l=A.l,A=e.rgb2hsb(t),t.v=A.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=ft,t},e.hsb2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(A=t.b,e=t.s,n=t.o,t=t.h),t*=360;var o,r,i,a,s;return t=t%360/60,s=A*e,a=s*(1-O(t%2-1)),o=r=i=A-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.hsl2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(A=t.l,e=t.s,t=t.h),(t>1||e>1||A>1)&&(t/=360,e/=100,A/=100),t*=360;var o,r,i,a,s;return t=t%360/60,s=2*e*(A<.5?A:1-A),a=s*(1-O(t%2-1)),o=r=i=A-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.rgb2hsb=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i;return r=R(t,e,A),i=r-F(t,e,A),n=0==i?null:r==t?(e-A)/i:r==e?(A-t)/i+2:(t-e)/i+4,n=(n+360)%6*60/360,o=0==i?0:i/r,{h:n,s:o,b:r,toString:Et}},e.rgb2hsl=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i,a,s;return i=R(t,e,A),a=F(t,e,A),s=i-a,n=0==s?null:i==t?(e-A)/s:i==e?(A-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=(i+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:n,s:o,l:r,toString:Nt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var A=D.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},A.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(A),A.src=t};e.getRGB=o(function(t){if(!t||(t=S(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ht(t));var A,n,o,i,a,s,c=t.match(J);return c?(c[2]&&(o=$(c[2].substring(5),16),n=$(c[2].substring(3,5),16),A=$(c[2].substring(1,3),16)),c[3]&&(o=$((a=c[3].charAt(3))+a,16),n=$((a=c[3].charAt(2))+a,16),A=$((a=c[3].charAt(1))+a,16)),c[4]&&(s=c[4][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100)),c[5]?(s=c[5][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsb2rgb(A,n,o,i)):c[6]?(s=c[6][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsl2rgb(A,n,o,i)):(c={r:A,g:n,b:o,toString:r},c.hex="#"+(16777216|o|n<<8|A<<16).toString(16).slice(1),e.is(i,"finite")&&(c.opacity=i),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,A,n){return e.hsb2rgb(t,A,n).hex}),e.hsl=o(function(t,A,n){return e.hsl2rgb(t,A,n).hex}),e.rgb=o(function(t,e,A){function n(t){return t+.5|0}return"#"+(16777216|n(A)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},A=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),A.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var A=yt(t);if(A.arr)return xt(A.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||S(t).replace(it,function(t,e,A){var r=[],i=e.toLowerCase();if(A.replace(st,function(t,e){e&&r.push(+e)}),"m"==i&&r.length>2&&(o.push([e][b](r.splice(0,2))),i="l",e="m"==e?"l":"L"),"r"==i)o.push([e][b](r));else for(;r.length>=n[i]&&(o.push([e][b](r.splice(0,n[i]))),n[i]););}),o.toString=e._path2string,A.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var A=[];return e.is(t,X)&&e.is(t[0],X)&&(A=xt(t)),A.length||S(t).replace(at,function(t,e,n){var o=[];Y.call(e);n.replace(st,function(t,e){e&&o.push(+e)}),A.push([e][b](o))}),A.toString=e._path2string,A});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var A in e)e[y](A)&&A!=t&&(e[A].sleep--,!e[A].sleep&&delete e[A])}),e[t]};e.findDotsAtSegment=function(t,e,A,n,o,r,i,a,s){var c=1-s,l=H(c,3),g=H(c,2),u=s*s,M=u*s,d=l*t+3*g*s*A+3*c*s*s*o+M*i,I=l*e+3*g*s*n+3*c*s*s*r+M*a,p=t+2*s*(A-t)+u*(o-2*A+t),T=e+2*s*(n-e)+u*(r-2*n+e),h=A+2*s*(o-A)+u*(i-2*o+A),E=n+2*s*(r-n)+u*(a-2*r+n),N=c*t+s*A,f=c*e+s*n,w=c*o+s*i,C=c*r+s*a,y=90-180*k.atan2(p-h,T-E)/V;return(p>h||T=t.x&&e<=t.x2&&A>=t.y&&A<=t.y2},e.isBBoxIntersect=function(t,A){var n=e.isPointInsideBBox;return n(A,t.x,t.y)||n(A,t.x2,t.y)||n(A,t.x,t.y2)||n(A,t.x2,t.y2)||n(t,A.x,A.y)||n(t,A.x2,A.y)||n(t,A.x,A.y2)||n(t,A.x2,A.y2)||(t.xA.x||A.xt.x)&&(t.yA.y||A.yt.y)},e.pathIntersection=function(t,e){return u(t,e)},e.pathIntersectionNumber=function(t,e){return u(t,e,1)},e.isPointInsidePath=function(t,A,n){var o=e.pathBBox(t);return e.isPointInsideBBox(o,A,n)&&u(t,[["M",A,n],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return A(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=vt(t);for(var n,o=0,r=0,i=[],a=[],s=0,c=t.length;s1&&(h=k.sqrt(h),A*=h,n*=h);var E=A*A,N=n*n,f=(i==a?-1:1)*k.sqrt(O((E*N-E*T*T-N*p*p)/(E*T*T+N*p*p))),w=f*A*T/n+(t+s)/2,C=f*-n*p/A+(e+c)/2,y=k.asin(((e-C)/n).toFixed(9)),D=k.asin(((c-C)/n).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(O(x)>u){var B=D,L=s,Q=c;D=y+u*(a&&D>y?1:-1),s=w+A*k.cos(D),c=C+n*k.sin(D),d=jt(s,c,A,n,r,0,a,L,Q,[D,B,w,C])}x=D-y;var j=k.cos(y),m=k.sin(y),S=k.cos(D),U=k.sin(D),z=k.tan(x/4),Y=4/3*A*z,R=4/3*n*z,F=[t,e],H=[t+Y*m,e-R*j],G=[s+Y*U,c-R*S],P=[s,c];if(H[0]=2*F[0]-H[0],H[1]=2*F[1]-H[1],l)return[H,G,P][b](d);d=[H,G,P][b](d).join()[v](",");for(var X=[],W=0,J=d.length;W"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),c=r-2*n+e-(a-2*r+n),l=2*(n-e)-2*(r-n),g=e-n,u=(-l+k.sqrt(l*l-4*c*g))/2/c,M=(-l-k.sqrt(l*l-4*c*g))/2/c,O(u)>"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),{min:{x:F[L](0,I),y:F[L](0,d)},max:{x:R[L](0,I),y:R[L](0,d)}}}),vt=e._path2curve=o(function(t,e){var A=!e&&yt(t);if(!e&&A.curve)return xt(A.curve);for(var n=Lt(t),o=e&&Lt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,A){var n,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](jt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==A||"S"==A?(n=2*e.x-e.bx,o=2*e.y-e.by):(n=e.x,o=e.y),t=["C",n,o][b](t.slice(1));break;case"T":"Q"==A||"T"==A?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](Qt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](Qt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var A=t[e];A.length;)l[e]="A",o&&(g[e]="A"),t.splice(e++,0,["C"][b](A.splice(0,6)));t.splice(e,1),I=R(n.length,o&&o.length||0)}},c=function(t,e,A,r,i){t&&e&&"M"==t[i][0]&&"M"!=e[i][0]&&(e.splice(i,0,["M",r.x,r.y]),A.bx=0,A.by=0,A.x=t[i][1],A.y=t[i][2],I=R(n.length,o&&o.length||0))},l=[],g=[],u="",M="",d=0,I=R(n.length,o&&o.length||0);do){if(A&&!u.start){if(l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),g+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],r)return g;u.start=g,g=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,s[5],s[6]].join(),M+=c,i=+s[5],a=+s[6];continue}if(!t&&!A)return l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),{x:l.x,y:l.y,alpha:l.alpha}}M+=c,i=+s[5],a=+s[6]}g+=s.shift()+s}return u.end=g,l=t?M:A?u:e.findDotsAtSegment(i,a,s[0],s[1],s[2],s[3],s[4],s[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},ee=te(1),Ae=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=Ae,e.getSubpath=function(t,e,A){if(this.getTotalLength(t)-A<1e-6)return ne(t,e).end;var n=ne(t,A,1);return e?ne(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return Ae(e,t)},Zt.getPath=function(){var t,A=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return A&&(t=A(this)),t},Zt.getSubpath=function(t,A){var n=this.getPath();if(n)return e.getSubpath(n,t,A)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,A=k.sqrt(.1734+e*e),n=A-e,o=H(O(n),1/3)*(n<0?-1:1),r=-A-e,i=H(O(r),1/3)*(r<0?-1:1),a=o+i+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*k.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,A=7.5625,n=2.75;return t<1/n?e=A*t*t:t<2/n?(t-=1.5/n,e=A*t*t+.75):t<2.5/n?(t-=2.25/n,e=A*t*t+.9375):(t-=2.625/n,e=A*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],ie=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var A=+new Date,n=0;n1&&!o.next){for(i in u)u[y](i)&&(I[i]=o.totalOrigin[i]);o.el.attr(I),T(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&T(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&ie(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,A,n,o,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=n instanceof p?n:e.animation(n,o,r,i);T(s,a,s.percents[0],null,a.attr());for(var c=0,l=re.length;cs&&(s=l)}s+="%",!t[s].callback&&(t[s].callback=o)}return new p(t,A)},Zt.animate=function(t,A,n,o){var r=this;if(r.removed)return o&&o.call(r),r;var i=t instanceof p?t:e.animation(t,A,n,o);return T(i,r,i.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var A,n,o=[],r=0;if(null!=e)return T(t,this,-1,F(e,1)),this;for(A=re.length;r1)for(var n=0,o=A.length;n.5)-1;s(u-.5,2)+s(M-.5,2)>.25&&(M=r.sqrt(.25-s(u-.5,2))*o+.5)&&.5!=M&&(M=M.toFixed(5)-1e-5*o)}return g}),o=o.split(/\s*\-\s*/),"linear"==c){var N=o.shift();if(N=-n(N),isNaN(N))return null;var f=[0,0,r.cos(t.rad(N)),r.sin(t.rad(N))],w=1/(i(a(f[2]),a(f[3]))||1);f[2]*=w,f[3]*=w,f[2]<0&&(f[0]=-f[2],f[2]=0),f[3]<0&&(f[1]=-f[3],f[3]=0)}var C=t._parseDots(o);if(!C)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(I.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){h=p(c+"Gradient",{id:l}),e.gradient=h,p(h,"radial"==c?{fx:u,fy:M}:{x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientTransform:e.matrix.invert()}),I.defs.appendChild(h);for(var y=0,D=C.length;y1?S.opacity/100:S.opacity});case"stroke":S=t.getRGB(I),s.setAttribute(d,S.hex), +"stroke"==d&&S[e]("opacity")&&p(s,{"stroke-opacity":S.opacity>1?S.opacity/100:S.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&f(n,n._.arrows.startString),"endString"in n._.arrows&&f(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=A(I).charAt())&&T(n,I);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&p(s,{"stroke-opacity":I>1?I/100:I});case"fill-opacity":if(l.gradient){v=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,g)),v&&(U=v.getElementsByTagName("stop"),p(U[U.length-1],{"stop-opacity":I}));break}default:"font-size"==d&&(I=o(I,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=I,n._.dirty=1,s.setAttribute(d,I)}}x(n,r),s.style.visibility=u},D=1.2,x=function(n,r){if("text"==n.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var i=n.attrs,a=n.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,g).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(i.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,l=A(r.text).split("\n"),u=[],M=0,d=l.length;M"));var Z=X.getBoundingClientRect();h.W=u.w=(Z.right-Z.left)/W,h.H=u.h=(Z.bottom-Z.top)/W,h.X=u.x,h.Y=u.y+h.H/2,("x"in s||"y"in s)&&(h.path.v=t.format("m{0},{1}l{2},{1}",r(u.x*N),r(u.y*N),r(u.x*N)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(A=o.sqrt(.25-a(e-.5,2))*(2*(A>.5)-1)+.5),c=e+M+A),d}),r=r.split(/\s*\-\s*/),"linear"==s){var l=r.shift();if(l=-n(l),isNaN(l))return null}var g=t._parseDots(r);if(!g)return null;if(e=e.shape||e.node,g.length){e.removeChild(i),i.on=!0,i.method="none",i.color=g[0].color,i.color2=g[g.length-1].color;for(var u=[],I=0,p=g.length;I')}}catch(t){j=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),A=e.container,n=e.height,o=e.width,r=e.x,i=e.y;if(!A)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),c=s.style;return r=r||0,i=i||0,o=o||512,n=n||342,a.width=o,a.height=n,o==+o&&(o+="px"),n==+n&&(n+="px"),a.coordsize=1e3*N+M+1e3*N,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,n),1==A?(t._g.doc.body.appendChild(s),c.left=r+"px",c.top=i+"px",c.position="absolute"):A.firstChild?A.insertBefore(s,A.firstChild):A.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var m=t.st;for(var S in Q)Q[e](S)&&!m[e](S)&&(m[S]=function(t){return function(){var e=arguments;return this.forEach(function(A){A[t].apply(A,e)})}}(S))}}.apply(e,n),!(void 0!==o&&(t.exports=o))}])})},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A1&&(o=(t+1)/2),n.splice(o,1),2===n.length)n=e.connection._buildStraightLinePathInfo();else{var r=n[1],i=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=n[0];a[1]=i.x,a[2]=i.y;var s=n[n.length-2],c=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),l=n[n.length-1];l[1]=c.x,l[2]=c.y}e.path.attr("path",n),e.remove()});var u=function(n,o){e.context.snapto&&(n-=n%10,o-=o%10);var a=this.ox+n,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),i=Math.round(t/2);var c=e.path.attr("path"),l=c.length,g=void 0,u=void 0,M=void 0,d=2*(A.length-1)-1;if(0===t||1===t){if(M=c[1],g=e.connection._buildFromFigureIntersetion({x:M[1],y:M[2]},!0),u=A[0],2===A.length){var I=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(I){var p=A[A.length-1];p[1]=I.x,p[2]=I.y}}}else d!==t&&d!==t+1&&d!==t+2||(M=c[l-2],g=e.connection._buildToFigureIntersetion({x:a,y:s},!0),u=A[A.length-1]);g&&(u[1]=g.x,u[2]=g.y);var T=[];A.forEach(function(t,e){r?e===i?T.push(["L",a,s]):T.push(t):(T.push(t),e===i&&T.push(["L",a,s]))}),e.path.attr("path",T),e.connection._buildText()}},M=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),A=this.oldConnectionPathInfo,n=e.connection.uuid;e.context.addRedoUndo({redo:function(){var A=e.context.getNodeByUUID(n);A.pathInfo=t,A.updatePath(),A._buildText()},undo:function(){var t=e.context.getNodeByUUID(n);t.pathInfo=A,t.updatePath(),t._buildText()}})};this.rect.drag(u,M,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e){"use strict";function A(t){var e=i("消息提示",t);e.modal("show")}function n(t,e){var A=i("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);A.modal("show")}function o(t,e,A){var n=i(t,e,[{name:"确认",click:function(){A.call(this)}}]);n.modal("show")}function r(t,e,A,n,o){var r=i(t,e,A,o);if(r.modal("show"),n){var a=!0,s=!1,c=void 0;try{for(var l,g=n[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var u=l.value;r.on(u.name,u.callback)}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}}}function i(t,e,A,n){var o=this,r="modal-dialog"+(n?" modal-lg":""),i=$(''),s=$('
');i.append(s);var c=$(''),A.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
'),A.append(this.nodeToolbar),this.canvasContainer=$('
'),this.canvasContainer.css("height",$(window).height()-100),A.append(this.canvasContainer),this.context=new l.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var n="_prop_container",o=$('
');this.canvasContainer.append(o);var i=$('');o.append(i),i.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
');var a=$('
');a.append('
属性值修改后,请回车以确认
'),a.append(this.propContainer),o.append(a),o.draggable();var c=$("#__prop_panel_tool__");c.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(c.removeClass("glyphicon-circle-arrow-left"),c.addClass("glyphicon-circle-arrow-down")):(c.removeClass("glyphicon-circle-arrow-down"),c.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return i(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void h.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void h.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void h.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),A=t.x,n=t.y,o=t.width,r=t.height,i=t.name;A=parseInt(A),n=parseInt(n),o=parseInt(o),r=parseInt(r);var a=A+o+10,s=n+r+10;this.context.resizePaper(a+50,s+50);var c=e._newNodeInstance(A,n,i);c.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(A){17===A.which&&(e=!0),e&&(90===A.which?t.context.undoManager.undo():89===A.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;u.eventEmitter.on(u.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_buildTools",value:function(){var t=this,e=this.context,A=this,n=!0,o=!1,r=void 0;try{for(var i,a=function(){var e=i.value,A=$('");A.click(function(){e.click.call(this)}),t.toolbar.append(A)},s=this.buttons[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)a()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,A.nodeToolbar.children("label").removeClass("active")});var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,A.nodeToolbar.children("label").removeClass("active")});var g=$('');this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.undo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),e.undoManager.redo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.SNAPTO_SELECTED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.REMOVE_CLICKED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_CENTER),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_MIDDLE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.UNIFY_SIZE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,A=!1,n=void 0;try{for(var o,r=function(){var e=o.value,A=$('\n \n ");t.nodeToolbar.append(A),A.click(function(){u.eventEmitter.emit(u.TRIGGER_TOOL,e.getType())})},i=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0)r()}catch(t){A=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(A)throw n}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;u.eventEmitter.on(u.OBJECT_SELECTED,function(A){if(t.propContainer.empty(),A instanceof d.default){var n=A.name||A.text.attr("text"),o=$('
'),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=!1,a=!0,s=!1,c=void 0;try{for(var l,g=e.context.allFigures[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var u=l.value;if(u instanceof d.default&&u!==A&&u.name===n){i=!0;break}}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}return i?void h.alert("节点名已存在!"):(A.name=n,A.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t.text.attr("text",n)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(A._tool.getPropertiesProducer().call(A))}else if(A instanceof p.default){var i=$('
'),a=$('');i.append(a),t.propContainer.append(i),a.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=A.from.fromConnections,a=!1,s=!0,c=!1,l=void 0;try{for(var g,u=i[Symbol.iterator]();!(s=(g=u.next()).done);s=!0){var M=g.value;if(M!==A&&M.name===n){a=!0;break}}}catch(t){c=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(c)throw l}}return a?void h.alert("连线名已存在"):(A.name=n,A._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
'),c=$('');s.append(c),c.val(A.type),c.change(function(t){var n=$(this).val(),o=A.uuid,r=A.type;A.type=n,A.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=n,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(A.from._tool.getConnectionPropertiesProducer().call(A))}}),u.eventEmitter.on(u.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),u.eventEmitter.emit(u.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(h.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,A=!1,n=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var i=o.value;if(i instanceof d.default){var a=i.validate();a&&t.push(a)}}}catch(t){A=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(A)throw n}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
"}),s='错误:
'+s+"
",h.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,A){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,A){var n=A(254);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+A(255)+");src:url("+A(255)+") format('embedded-opentype'),url("+A(256)+") format('woff'),url("+A(257)+") format('truetype'),url("+A(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,A){var n=A(260);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+A(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,A){A(263),A(264),A(265),A(266),A(267),A(268),A(269),A(270),A(271),A(272),A(273),A(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var A in e)if(void 0!==t.style[A])return{end:e[A]};return!1}t.fn.emulateTransitionEnd=function(e){var A=!1,n=this;t(this).one("bsTransitionEnd",function(){A=!0});var o=function(){A||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.alert");o||A.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(A)})}var A='[data-dismiss="alert"]',n=function(e){t(e).on("click",A,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function A(){i.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=t("#"===r?[]:r);e&&e.preventDefault(),i.length||(i=o.closest(".alert")),i.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",A).emulateTransitionEnd(n.TRANSITION_DURATION):A())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",A,n.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new A(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.isLoading=!1};A.VERSION="3.3.7",A.DEFAULTS={loadingText:"loading..."},A.prototype.setState=function(e){var A="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(A).attr(A,A).prop(A,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(A).removeAttr(A).prop(A,!1))},this),0)},A.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var A=this.$element.find("input");"radio"==A.prop("type")?(A.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==A.prop("type")&&(A.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),A.prop("checked",this.$element.hasClass("active")),t&&A.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=A,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(A){var n=t(A.target).closest(".btn");e.call(n,"toggle"),t(A.target).is('input[type="radio"], input[type="checkbox"]')||(A.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e),i="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new A(this,r)),"number"==typeof e?o.to(e):i?o[i]():r.interval&&o.pause().cycle()})}var A=function(e,A){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=A,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};A.VERSION="3.3.7",A.TRANSITION_DURATION=600,A.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},A.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},A.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},A.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},A.prototype.getItemForDirection=function(t,e){var A=this.getItemIndex(e),n="prev"==t&&0===A||"next"==t&&A==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(A+o)%this.$items.length;return this.$items.eq(r)},A.prototype.to=function(t){var e=this,A=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):A==t?this.pause().cycle():this.slide(t>A?"next":"prev",this.$items.eq(t))},A.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},A.prototype.next=function(){if(!this.sliding)return this.slide("next")},A.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},A.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),i=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var g=t(this.$indicators.children()[this.getItemIndex(r)]);g&&g.addClass("active")}var u=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(u)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),i&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=A,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(A){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var i=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(i.interval=!1),e.call(r,i),a&&r.data("bs.carousel").to(a),A.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var A=t(this);e.call(A,A.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A,n=e.attr("data-target")||(A=e.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function A(e){return this.each(function(){var A=t(this),o=A.data("bs.collapse"),r=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||A.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(A.call(o,"hide"),e||o.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[i](this.$element[0][s])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var A=this.dimension();this.$element[A](this.$element[A]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[A](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(A,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var A=t.hasClass("in");t.attr("aria-expanded",A),e.toggleClass("collapsed",!A).attr("aria-expanded",A)};var o=t.fn.collapse;t.fn.collapse=A,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),i=r.data("bs.collapse"),a=i?"toggle":o.data();A.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A=e.attr("data-target");A||(A=e.attr("href"),A=A&&/#[A-Za-z]/.test(A)&&A.replace(/.*(?=#[^\s]*$)/,""));var n=A&&t(A);return n&&n.length?n:e.parent()}function A(A){A&&3===A.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(A&&"click"==A.type&&/input|textarea/i.test(A.target.tagName)&&t.contains(o[0],A.target)||(o.trigger(A=t.Event("hide.bs.dropdown",r)),A.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var A=t(this),n=A.data("bs.dropdown");n||A.data("bs.dropdown",n=new i(this)),"string"==typeof e&&n[e].call(A)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};i.VERSION="3.3.7",i.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),i=r.hasClass("open");if(A(),!i){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",A);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(A){if(/(38|40|27|32)/.test(A.which)&&!/input|textarea/i.test(A.target.tagName)){var n=t(this);if(A.preventDefault(),A.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),i=o.hasClass("open");if(!i&&27!=A.which||i&&27==A.which)return 27==A.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var c=s.index(A.target);38==A.which&&c>0&&c--,40==A.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},A.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},A.prototype.init=function(e,A,n){if(this.enabled=!0,this.type=e,this.$element=t(A),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var i=o[r];if("click"==i)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=i){var a="hover"==i?"mouseenter":"focusin",s="hover"==i?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},A.prototype.getDelegateOptions=function(){var e={},A=this.getDefaults();return this._options&&t.each(this._options,function(t,n){A[t]!=n&&(e[t]=n)}),e},A.prototype.enter=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusin"==e.type?"focus":"hover"]=!0),A.tip().hasClass("in")||"in"==A.hoverState?void(A.hoverState="in"):(clearTimeout(A.timeout),A.hoverState="in",A.options.delay&&A.options.delay.show?void(A.timeout=setTimeout(function(){"in"==A.hoverState&&A.show()},A.options.delay.show)):A.show())},A.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},A.prototype.leave=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusout"==e.type?"focus":"hover"]=!1),!A.isInStateTrue())return clearTimeout(A.timeout),A.hoverState="out",A.options.delay&&A.options.delay.hide?void(A.timeout=setTimeout(function(){"out"==A.hoverState&&A.hide()},A.options.delay.hide)):A.hide()},A.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,c=s.test(a);c&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),g=r[0].offsetWidth,u=r[0].offsetHeight;if(c){var M=a,d=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+u>d.bottom?"top":"top"==a&&l.top-ud.width?"left":"left"==a&&l.left-gi.top+i.height&&(o.top=i.top+i.height-s)}else{var c=e.left-r,l=e.left+r+A;ci.right&&(o.left=i.left+i.width-l)}return o},A.prototype.getTitle=function(){var t,e=this.$element,A=this.options;return t=e.attr("data-original-title")||("function"==typeof A.title?A.title.call(e[0]):A.title)},A.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},A.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},A.prototype.enable=function(){this.enabled=!0},A.prototype.disable=function(){this.enabled=!1},A.prototype.toggleEnabled=function(){this.enabled=!this.enabled},A.prototype.toggle=function(e){var A=this;e&&(A=t(e.currentTarget).data("bs."+this.type),A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A))),e?(A.inState.click=!A.inState.click,A.isInStateTrue()?A.enter(A):A.leave(A)):A.tip().hasClass("in")?A.leave(A):A.enter(A)},A.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=A,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new A(this,r)),"string"==typeof e&&o[e]())})}var A=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");A.VERSION="3.3.7",A.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),A.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),A.prototype.constructor=A,A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),A=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof A?"html":"append":"text"](A),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},A.prototype.hasContent=function(){return this.getTitle()||this.getContent()},A.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=A,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(A,n){this.$body=t(document.body),this.$scrollElement=t(t(A).is(document.body)?window:A),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function A(A){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof A&&A;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof A&&o[A]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,A="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(A="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[A]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,A=this.getScrollHeight(),n=this.options.offset+A-this.$scrollElement.height(),o=this.offsets,r=this.targets,i=this.activeTarget;if(this.scrollHeight!=A&&this.refresh(),e>=n)return i!=(t=r[r.length-1])&&this.activate(t);if(i&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var i=n.find("> .active"),a=o&&t.support.transition&&(i.length&&i.hasClass("fade")||!!n.find("> .fade").length);i.length&&a?i.one("bsTransitionEnd",r).emulateTransitionEnd(A.TRANSITION_DURATION):r(),i.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=A,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(A){A.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new A(this,r)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.options=t.extend({},A.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};A.VERSION="3.3.7",A.RESET="affix affix-top affix-bottom",A.DEFAULTS={offset:0,target:window},A.prototype.getState=function(t,e,A,n){var o=this.$target.scrollTop(),r=this.$element.offset(),i=this.$target.height();if(null!=A&&"top"==this.affixed)return o=t-n&&"bottom"},A.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(A.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},A.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},A.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,i=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(i,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),c=t.Event(s+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(A.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=A,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var A=t(this),n=A.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(A,n)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var A=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,n,o=t(this),r=A.handle?t(A.handle,o):o;r.on({mousedown:function(r){var i=r.target,a="",s=!1;if(i&&(a=i.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===i.tagName||"INPUT"===i.tagName||i&&"presentation"===t(i).attr("role")||A.exclude&&~t.inArray(r.target,t(A.exclude,o)))){var c=o.offset();e=r.pageX-c.left,n=r.pageY-c.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-n,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A0&&i.push(g)}else{var p=g.rect,T=p.getBBox();(T.x>=A.x&&T.x<=A.x2||T.x2>=A.x&&T.x2<=A.x2)&&(T.y>=A.y&&T.y<=A.y2||T.y2>=A.y&&T.y2<=A.y2)&&s.push(g)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):i.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var n=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,A),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof g.default||e instanceof c.default)){var A=t.offsetX,n=t.offsetY,r=e._newNodeInstance(A,n);r&&!function(){var t=r.uuid,i=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(A,n,i),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof g.default){var e=o.currentConnection;if(e){var A=t.offsetX,n=t.offsetY;e.endX=A,e.endY=n,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);eA&&this.container.width(t+10),e>n&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,A){t||(t=e),e instanceof E.default&&e.select()}),t&&f.eventEmitter.emit(f.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),f.eventEmitter.emit(f.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return M.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),A=this.allFigures.indexOf(e);this.allFigures.splice(A,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;f.eventEmitter.on(f.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),f.eventEmitter.on(f.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,A){var n=e.toJSON(),o=e.uuid,r=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,A=t.to.uuid,i=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(A),s=new E.default(i,{x:i.rect.attr("x"),y:i.rect.attr("y")});i.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(n)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var A=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=A._newNodeInstance(10,10,"");t&&(t.initFromJson(n),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),f.eventEmitter.on(f.ALIGN_CENTER,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(e=g.rect.attr("x"),n=g.rect.attr("width"),e+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.ALIGN_MIDDLE,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0; +try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(A=g.rect.attr("y"),n=g.rect.attr("height"),A+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.UNIFY_SIZE,function(){var e=void 0,A=void 0,n=new Map,o=0,r=!0,i=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(l instanceof E.default)break;var g={oldWH:{w:l.rect.attr("width"),h:l.rect.attr("height")}};0===o?(e=l.rect.attr("width"),A=l.rect.attr("height")):l.changeSize(e,A),g.newWH={w:l.rect.attr("width"),h:l.rect.attr("height")},n.set(l.uuid,g),o++}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=u.getNodeByUUID(i),s=n.get(i),c=s.newWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=u.getNodeByUUID(i),s=n.get(i),c=s.oldWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new I.default,this.connectionTool=new T.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,A){var n;!function(){"use strict";function o(t,e,A){return t.splice(e,!A||1+A-e+(!(A<0^e>=0)&&(A<0||-1)*t.length)),t.length}var r=function(){var t,e,A=[],n=-1,r=0,i=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(i=!0,t[e](),i=!1,this):this},{add:function(e){return i?this:(A.splice(n+1,A.length-n),A.push(e),r&&A.length>r&&o(A,0,-(r+1)),n=A.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=A[n];return o?(e(o,"undo"),n-=1,t&&t(),this):this},redo:function(){var o=A[n+1];return o?(e(o,"redo"),n+=1,t&&t(),this):this},clear:function(){var e=A.length;A=[],n=-1,t&&e>0&&t()},hasUndo:function(){return n!==-1},hasRedo:function(){return n>>((3&e)<<3)&255;return A},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=A(284).randomBytes;d=u=t&&function(){return t(16)},u()}catch(t){}}function s(t,e,A){var n=e&&A||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=h[t])});o<16;)e[n+o++]=0;return e}function c(t,e){var A=e||0,n=T;return n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]}function l(t,e,A){var n=e&&A||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,i=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=i-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||i>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=i,y=a,w=r,i+=122192928e5;var l=(1e4*(268435455&i)+a)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var g=i/4294967296*1e4&268435455;o[n++]=g>>>8&255,o[n++]=255&g,o[n++]=g>>>24&15|16,o[n++]=g>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var u=t.node||f,M=0;M<6;M++)o[n+M]=u[M];return e?e:c(o)}function g(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new p(16):null,t=null),t=t||{};var o=t.random||(t.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[n+r]=o[r];return e||c(o)}var u,M,d,I;r?i():a();for(var p="function"==typeof o?o:Array,T=[],h={},E=0;E<256;E++)T[E]=(E+256).toString(16).substr(1),h[T[E]]=E;var N=u(),f=[1|N[0],N[1],N[2],N[3],N[4],N[5]],w=16383&(N[6]<<8|N[7]),C=0,y=0,D=g;D.v1=l,D.v4=g,D.parse=s,D.unparse=c,D.BufferClass=p,D._rng=u,D._mathRNG=M,D._nodeRNG=d,D._whatwgRNG=I,"undefined"!=typeof t&&t.exports?t.exports=D:(n=function(){return D}.call(e,A,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,A(280).Buffer)},function(t,e,A){(function(t,n){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,A){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function p(e){return+e!=e&&(e=0),t.alloc(+e)}function T(e,A){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(A){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;A=(""+A).toLowerCase(),o=!0}}function h(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if(A>>>=0,e>>>=0,A<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,A);case"utf8":case"utf-8":return b(this,e,A);case"ascii":return j(this,e,A);case"latin1":case"binary":return m(this,e,A);case"base64":return L(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function N(e,A,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof A&&(A=t.from(A,o)),t.isBuffer(A))return 0===A.length?-1:f(e,A,n,o,r);if("number"==typeof A)return A&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,A,n):Uint8Array.prototype.lastIndexOf.call(e,A,n):f(e,[A],n,o,r);throw new TypeError("val must be string, number or Buffer")}function f(t,e,A,n,o){function r(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,A/=2}var c;if(o){var l=-1;for(c=A;ca&&(A=a-s),c=A;c>=0;c--){for(var g=!0,u=0;uo&&(n=o)):n=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(o+a<=A){var s,c,l,g;switch(a){case 1:r<128&&(i=r);break;case 2:s=t[o+1],128===(192&s)&&(g=(31&r)<<6|63&s,g>127&&(i=g));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(g=(15&r)<<12|(63&s)<<6|63&c,g>2047&&(g<55296||g>57343)&&(i=g));break;case 4:s=t[o+1],c=t[o+2],l=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&l)&&(g=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&l,g>65535&&g<1114112&&(i=g))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return Q(n)}function Q(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var A="",n=0;nn)&&(A=n);for(var o="",r=e;rA)throw new RangeError("Trying to access beyond buffer length")}function z(e,A,n,o,r,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>r||Ae.length)throw new RangeError("Index out of range")}function Y(t,e,A,n){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-A,2);o>>8*(n?o:1-o)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-A,4);o>>8*(n?o:3-o)&255}function R(t,e,A,n,o,r){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function F(t,e,A,n,o){return o||R(t,e,A,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,A,n,23,4),A+4}function O(t,e,A,n,o){return o||R(t,e,A,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,A,n,52,8),A+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var A,n=t.length,o=null,r=[],i=0;i55295&&A<57344){if(!o){if(A>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=A;continue}if(A<56320){(e-=3)>-1&&r.push(239,191,189),o=A;continue}A=(o-55296<<10|A-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,A<128){if((e-=1)<0)break;r.push(A)}else if(A<2048){if((e-=2)<0)break;r.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;r.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return r}function X(t){for(var e=[],A=0;A>8,o=A%256,r.push(o),r.push(n);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,A,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+A]=t[o];return o}function K(t){return t!==t}var _=A(281),q=A(282),$=A(283);e.Buffer=t,e.SlowBuffer=p,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,A){return a(null,t,e,A)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,A){return c(null,t,e,A)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,A){if(!t.isBuffer(e)||!t.isBuffer(A))throw new TypeError("Arguments must be Buffers");if(e===A)return 0;for(var n=e.length,o=A.length,r=0,i=Math.min(n,o);r0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),""},t.prototype.compare=function(e,A,n,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===A&&(A=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),A<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&A>=n)return 0;if(o>=r)return-1;if(A>=n)return 1;if(A>>>=0,n>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var i=r-o,a=n-A,s=Math.min(i,a),c=this.slice(o,r),l=e.slice(A,n),g=0;go)&&(A=o),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return w(this,t,e,A);case"utf8":case"utf-8":return C(this,t,e,A);case"ascii":return y(this,t,e,A);case"latin1":case"binary":return D(this,t,e,A);case"base64":return x(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,A);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,A){var n=this.length;e=~~e,A=void 0===A?n:~~A,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),A<0?(A+=n,A<0&&(A=0)):A>n&&(A=n),A0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=this[t],o=1,r=0;++r=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=e,o=1,r=this[t+--n];n>0&&(o*=256);)r+=this[t+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,A,n){if(t=+t,e|=0,A|=0,!n){var o=Math.pow(2,8*A)-1;z(this,t,e,A,o,0)}var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+A},t.prototype.writeUInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[A]=255&e,A+1},t.prototype.writeUInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeUInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeUInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e):k(this,e,A,!0),A+4},t.prototype.writeUInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=0,i=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+A},t.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=A-1,i=1,a=0;for(this[e+r]=255&t;--r>=0&&(i*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/i>>0)-a&255;return e+A},t.prototype.writeInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[A]=255&e,A+1},t.prototype.writeInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24):k(this,e,A,!0),A+4},t.prototype.writeInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeFloatLE=function(t,e,A){return F(this,t,e,!0,A)},t.prototype.writeFloatBE=function(t,e,A){return F(this,t,e,!1,A)},t.prototype.writeDoubleLE=function(t,e,A){return O(this,t,e,!0,A)},t.prototype.writeDoubleBE=function(t,e,A){return O(this,t,e,!1,A)},t.prototype.copy=function(e,A,n,o){if(n||(n=0),o||0===o||(o=this.length),A>=e.length&&(A=e.length),A||(A=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-A=0;--r)e[r+A]=this[r+n];else if(i<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var i;if("number"==typeof e)for(i=A;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-A(t)}function o(t){var e,n,o,r,i,a,s=t.length;i=A(t),a=new l(3*s/4-i),o=i>0?s-4:s;var g=0;for(e=0,n=0;e>16&255,a[g++]=r>>8&255,a[g++]=255&r;return 2===i?(r=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[g++]=255&r):1===i&&(r=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[g++]=r>>8&255,a[g++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function i(t,e,A){for(var n,o=[],i=e;il?l:c+a));return 1===n?(e=t[A-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,M=g.length;u>1,l=-7,g=A?o-1:0,u=A?-1:1,M=t[e+g];for(g+=u,r=M&(1<<-l)-1,M>>=-l,l+=a;l>0;r=256*r+t[e+g],g+=u,l-=8);for(i=r&(1<<-l)-1,r>>=-l,l+=n;l>0;i=256*i+t[e+g],g+=u,l-=8);if(0===r)r=1-c;else{if(r===s)return i?NaN:(M?-1:1)*(1/0);i+=Math.pow(2,n),r-=c}return(M?-1:1)*i*Math.pow(2,r-n)},e.write=function(t,e,A,n,o,r){var i,a,s,c=8*r-o-1,l=(1<>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:r-1,d=n?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),e+=i+g>=1?u/s:u*Math.pow(2,1-g),e*s>=2&&(i++,s/=2),i+g>=l?(a=0,i=l):i+g>=1?(a=(e*s-1)*Math.pow(2,o),i+=g):(a=e*Math.pow(2,g-1)*Math.pow(2,o),i=0));o>=8;t[A+M]=255&a,M+=d,a/=256,o-=8);for(i=i<0;t[A+M]=255&i,M+=d,i/=256,c-=8);t[A+M-d]|=128*I}},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var A in t)e(t[A],A)}var r=A(285);e.createHash=A(287),e.createHmac=A(299),e.randomBytes=function(e,A){if(!A||!A.call)return new t(r(e));try{A.call(this,void 0,new t(r(e)))}catch(t){A(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var i=A(300)(e);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,A(280).Buffer)},function(t,e,A){(function(e,n){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||A(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),A(280).Buffer)},function(t,e){},function(t,e,A){(function(e){function n(t){return function(){var A=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),A.push(t),this},digest:function(n){var o=e.concat(A),r=t(o);return A=null,n?r.toString(n):r}};return n}}var o=A(288),r=n(A(296)),i=n(A(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new i:o(t)}}).call(e,A(280).Buffer)},function(t,e,A){var e=t.exports=function(t){var A=e[t];if(!A)throw new Error(t+" is not supported (we accept pull requests)");return new A},n=A(280).Buffer,o=A(289)(n);e.sha1=A(290)(n,o),e.sha256=A(294)(n,o),e.sha512=A(295)(n,o)},function(t,e){t.exports=function(t){function e(e,A){this._block=new t(e),this._finalSize=A,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,A){"string"==typeof e&&(A=A||"utf8",e=new t(e,A));for(var n=this._len+=e.length,o=this._s=this._s||0,r=0,i=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var A=this._update(this._block)||this._hash();return t?A.toString(t):A},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){return d.length?d.pop().init():this instanceof A?(this._w=M,e.call(this,64,56),this._h=null,void this.init()):new A}function o(t,e,A,n){return t<20?e&A|~e&n:t<40?e^A^n:t<60?e&A|e&n|A&n:e^A^n}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function i(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,c=4,l=8,g=12,u=16,M=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(A,e),A.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},A.prototype._POOL=d,A.prototype._update=function(t){var e,A,n,s,c,l,g,u,M,d;e=l=this._a,A=g=this._b,n=u=this._c,s=M=this._d,c=d=this._e;for(var I=this._w,p=0;p<80;p++){var T=I[p]=p<16?t.readInt32BE(4*p):a(I[p-3]^I[p-8]^I[p-14]^I[p-16],1),h=i(i(a(e,5),o(p,A,n,s)),i(i(c,T),r(p)));c=s,s=n,n=a(A,30),A=e,e=h}this._a=i(e,l),this._b=i(A,g),this._c=i(n,u),this._d=i(s,M),this._e=i(c,d)},A.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,g),e.writeInt32BE(0|this._e,u),e},A}},function(t,e,A){(function(t,n){function o(t,A){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]), +arguments.length>=4&&(n.colors=arguments[3]),I(A)?n.showHidden=A:A&&e._extend(n,A),f(n.showHidden)&&(n.showHidden=!1),f(n.depth)&&(n.depth=2),f(n.colors)&&(n.colors=!1),f(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=r),s(n,t,n.depth)}function r(t,e){var A=o.styles[e];return A?"["+o.colors[A][0]+"m"+t+"["+o.colors[A][1]+"m":t}function i(t,e){return t}function a(t){var e={};return t.forEach(function(t,A){e[t]=!0}),e}function s(t,A,n){if(t.customInspect&&A&&x(A.inspect)&&A.inspect!==e.inspect&&(!A.constructor||A.constructor.prototype!==A)){var o=A.inspect(n,t);return E(o)||(o=s(t,o,n)),o}var r=c(t,A);if(r)return r;var i=Object.keys(A),I=a(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(A)),D(A)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return l(A);if(0===i.length){if(x(A)){var p=A.name?": "+A.name:"";return t.stylize("[Function"+p+"]","special")}if(w(A))return t.stylize(RegExp.prototype.toString.call(A),"regexp");if(y(A))return t.stylize(Date.prototype.toString.call(A),"date");if(D(A))return l(A)}var T="",h=!1,N=["{","}"];if(d(A)&&(h=!0,N=["[","]"]),x(A)){var f=A.name?": "+A.name:"";T=" [Function"+f+"]"}if(w(A)&&(T=" "+RegExp.prototype.toString.call(A)),y(A)&&(T=" "+Date.prototype.toUTCString.call(A)),D(A)&&(T=" "+l(A)),0===i.length&&(!h||0==A.length))return N[0]+T+N[1];if(n<0)return w(A)?t.stylize(RegExp.prototype.toString.call(A),"regexp"):t.stylize("[Object]","special");t.seen.push(A);var C;return C=h?g(t,A,n,I,i):i.map(function(e){return u(t,A,n,I,e,h)}),t.seen.pop(),M(C,T,N)}function c(t,e){if(f(e))return t.stylize("undefined","undefined");if(E(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return h(e)?t.stylize(""+e,"number"):I(e)?t.stylize(""+e,"boolean"):p(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,A,n,o){for(var r=[],i=0,a=e.length;i-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),f(i)){if(r&&o.match(/^\d+$/))return a;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+a}function M(t,e,A){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}function d(t){return Array.isArray(t)}function I(t){return"boolean"==typeof t}function p(t){return null===t}function T(t){return null==t}function h(t){return"number"==typeof t}function E(t){return"string"==typeof t}function N(t){return"symbol"==typeof t}function f(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===L(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===L(t)}function D(t){return C(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],A=0;A=r)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(t){return"[Circular]"}default:return t}}),a=n[A];A>>e|t<<32-e}function r(t,e){return t>>>e}function i(t,e,A){return t&e^~t&A}function a(t,e,A){return t&e^t&A^e&A}function s(t){return o(t,2)^o(t,13)^o(t,22)}function c(t){return o(t,6)^o(t,11)^o(t,25)}function l(t){return o(t,7)^o(t,18)^r(t,3)}function g(t){return o(t,17)^o(t,19)^r(t,10)}var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],M=new Array(64);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,o,r,M,d,I,p,T,h=this._w;e=0|this._a,A=0|this._b,n=0|this._c,o=0|this._d,r=0|this._e,M=0|this._f,d=0|this._g,I=0|this._h;for(var E=0;E<64;E++){var N=h[E]=E<16?t.readInt32BE(4*E):g(h[E-2])+h[E-7]+l(h[E-15])+h[E-16];p=I+c(r)+i(r,M,d)+u[E]+N,T=s(e)+a(e,A,n),I=d,d=M,M=r,r=o+p,o=n,n=A,A=e,e=p+T}this._a=e+this._a|0,this._b=A+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=M+this._f|0,this._g=d+this._g|0,this._h=I+this._h|0},A.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},A}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,A){return t>>>A|e<<32-A}function r(t,e,A){return t&e^~t&A}function i(t,e,A){return t&e^t&A^e&A}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,s,c,l,g,u,M,d,I,p,T,h,E,N,f=this._w;e=0|this._a,A=0|this._b,n=0|this._c,s=0|this._d,c=0|this._e,l=0|this._f,g=0|this._g,u=0|this._h,M=0|this._al,d=0|this._bl,I=0|this._cl,p=0|this._dl,T=0|this._el,h=0|this._fl,E=0|this._gl,N=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=f[D]=t.readInt32BE(4*D),y=f[D+1]=t.readInt32BE(4*D+4);else{var x=f[D-30],B=f[D-30+1],L=o(x,B,1)^o(x,B,8)^x>>>7,b=o(B,x,1)^o(B,x,8)^o(B,x,7);x=f[D-4],B=f[D-4+1];var Q=o(x,B,19)^o(B,x,29)^x>>>6,j=o(B,x,19)^o(x,B,29)^o(B,x,6),m=f[D-14],S=f[D-14+1],v=f[D-32],U=f[D-32+1];y=b+S,C=L+m+(y>>>0>>0?1:0),y+=j,C=C+Q+(y>>>0>>0?1:0),y+=U,C=C+v+(y>>>0>>0?1:0),f[D]=C,f[D+1]=y}var z=i(e,A,n),Y=i(M,d,I),k=o(e,M,28)^o(M,e,2)^o(M,e,7),R=o(M,e,28)^o(e,M,2)^o(e,M,7),F=o(c,T,14)^o(c,T,18)^o(T,c,9),O=o(T,c,14)^o(T,c,18)^o(c,T,9),H=a[D],V=a[D+1],G=r(c,l,g),P=r(T,h,E),X=N+O,W=u+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

>>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+Y,Z=k+z+(J>>>0>>0?1:0);u=g,N=E,g=l,E=h,l=c,h=T,T=p+X|0,c=s+W+(T>>>0

>>0?1:0)|0,s=n,p=I,n=A,I=d,A=e,d=M,M=X+J|0,e=W+Z+(M>>>0>>0?1:0)|0}this._al=this._al+M|0,this._bl=this._bl+d|0,this._cl=this._cl+I|0,this._dl=this._dl+p|0,this._el=this._el+T|0,this._fl=this._fl+h|0,this._gl=this._gl+E|0,this._hl=this._hl+N|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+A+(this._bl>>>0>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0>>0?1:0)|0,this._d=this._d+s+(this._dl>>>0

>>0?1:0)|0,this._e=this._e+c+(this._el>>>0>>0?1:0)|0,this._f=this._f+l+(this._fl>>>0>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+u+(this._hl>>>0>>0?1:0)|0},A.prototype._hash=function(){function e(t,e,n){A.writeInt32BE(t,n),A.writeInt32BE(e,n+4)}var A=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),A},A}},function(t,e,A){function n(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var A=1732584193,n=-271733879,o=-1732584194,l=271733878,g=0;g>16)+(e>>16)+(A>>16);return n<<16|65535&A}function l(t,e){return t<>>32-e}var g=A(297);t.exports=function(t){return g.hash(t,n,16)}},function(t,e,A){(function(e){function A(t,A){if(t.length%r!==0){var n=t.length+(r-t.length%r);t=e.concat([t,i],n)}for(var o=[],a=A?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var A=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=I(t),o=8*t.length,r=8*t.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var i=0;i>>24)|4278255360&(a<<24|a>>>8)}var s=p(A);return new e(s)}t.exports=s;var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],M=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],I=function(t){for(var e=[],A=0,n=0;A>>5]|=t[A]<<24-n%32;return e},p=function(t){for(var e=[],A=0;A<32*t.length;A+=8)e.push(t[A>>>5]>>>24-A%32&255);return e},T=function(t,e,s){for(var I=0;I<16;I++){var p=s+I,T=e[p];e[p]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8)}var h,E,N,f,w,C,y,D,x,B;C=h=t[0],y=E=t[1],D=N=t[2],x=f=t[3],B=w=t[4];for(var L,I=0;I<80;I+=1)L=h+e[s+c[I]]|0,L+=I<16?A(E,N,f)+M[0]:I<32?n(E,N,f)+M[1]:I<48?o(E,N,f)+M[2]:I<64?r(E,N,f)+M[3]:i(E,N,f)+M[4],L|=0,L=a(L,g[I]),L=L+w|0,h=w,w=f,f=a(N,10),N=E,E=L,L=C+e[s+l[I]]|0,L+=I<16?i(y,D,x)+d[0]:I<32?r(y,D,x)+d[1]:I<48?o(y,D,x)+d[2]:I<64?n(y,D,x)+d[3]:A(y,D,x)+d[4],L|=0,L=a(L,u[I]),L=L+B|0,C=B,B=x,x=a(D,10),D=y,y=L;L=t[1]+N+x|0,t[1]=t[2]+f+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+h+y|0,t[4]=t[0]+E+D|0,t[0]=L}}).call(e,A(280).Buffer)},function(t,e,A){(function(e){function n(t,A){if(!(this instanceof n))return new n(t,A);this._opad=s,this._alg=t;var i="sha512"===t?128:64;A=this._key=e.isBuffer(A)?A:new e(A),A.length>i?A=o(t).update(A).digest():A.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,a);for(var I=1;Ie&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(A,n){e.push(c.default.createElement("button",{type:"button",key:n,className:A.className,onClick:function(e){A.click(t.props.dispatch)}},c.default.createElement("i",{className:A.icon})," ",A.name))});var A=this.props.large,n="modal-dialog"+(A?" modal-lg":"");return c.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},c.default.createElement("div",{className:n},c.default.createElement("div",{className:"modal-content"},c.default.createElement("div",{className:"modal-header"},c.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),c.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,c.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),c.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),c.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=u},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.CLOSE_REFERENCE_DIALOG=e.OPEN_REFERENCE_DIALOG=void 0;var o=A(240),r=n(o);e.OPEN_REFERENCE_DIALOG="open_reference_dialog",e.CLOSE_REFERENCE_DIALOG="close_reference_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var A=0;A.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+A(4)+");src:url("+A(4)+"?#iefix) format('embedded-opentype'),url("+A(5)+") format('woff2'),url("+A(6)+") format('woff'),url("+A(7)+") format('truetype'),url("+A(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var A,n,o;if(e.singleton){var r=p++;A=h||(h=a(e)),n=l.bind(null,A,r,!1),o=l.bind(null,A,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=s(e),n=M.bind(null,A),o=function(){i(A),A.href&&URL.revokeObjectURL(A.href)}):(A=a(e),n=g.bind(null,A),o=function(){i(A)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function l(t,e,A,n){var o=A?"":n.css;if(t.styleSheet)t.styleSheet.cssText=N(e,o);else{var r=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(r,i[e]):t.appendChild(r)}}function g(t,e){var A=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=A;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(A))}}function M(t,e){var A=e.css,n=e.sourceMap;n&&(A+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([A],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var u={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},I=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),T=d(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,p=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=I()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var A=o(t);return n(A,e),function(t){for(var r=[],i=0;i1){for(var T=Array(I),h=0;h1){for(var E=Array(p),N=0;N>"),B={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:d(),objectOf:M,oneOf:g,oneOfType:u,shape:I};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var A="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=A},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,A){"use strict";function n(t){return r.isValidElement(t)?void 0:o("143"),t}var o=A(19),r=A(21);A(20);t.exports=n},function(t,e,A){"use strict";t.exports=A(42)},function(t,e,A){"use strict";var n=A(43),o=A(48),r=A(174),i=A(71),a=A(68),s=A(179),c=A(180),l=A(181),g=A(182);A(56);o.inject();var M={findDOMNode:c,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:g};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:n.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?n.getNodeFromInstance(t):null}},Mount:r,Reconciler:i});t.exports=M},function(t,e,A){"use strict";function n(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var A=n(t);A._hostNode=e,e[I]=A}function r(t){var e=t._hostNode;e&&(delete e[I],t._hostNode=null)}function i(t,e){if(!(t._flags&d.hasCachedChildNodes)){var A=t._renderedChildren,r=e.firstChild;t:for(var i in A)if(A.hasOwnProperty(i)){var a=A[i],s=n(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(u)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}l("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[I])return t[I];for(var e=[];!t[I];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var A,n;t&&(n=t[I]);t=e.pop())A=n,e.length&&i(n,t);return A}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?l("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:l("34"),t=t._hostParent;for(;e.length;t=e.pop())i(t,t._hostNode);return t._hostNode}var l=A(44),g=A(45),M=A(47),u=(A(46),g.ID_ATTRIBUTE_NAME),d=M,I="__reactInternalInstance$"+Math.random().toString(36).slice(2),T={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:i,precacheNode:o,uncacheNode:r};t.exports=T},function(t,e){"use strict";function A(t){for(var e=arguments.length-1,A="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,n=0;n8&&f<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,A,n){return[c(t,e,A,n),M(t,e,A,n)]}};t.exports=b},function(t,e,A){"use strict";function n(t,e,A){var n=e.dispatchConfig.phasedRegistrationNames[A];return h(t,n)}function o(t,e,A){var o=n(t,A,e);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function i(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,A=e?d.getParentInstance(e):null;d.traverseTwoPhase(A,o,t)}}function a(t,e,A){if(A&&A.dispatchConfig.registrationName){var n=A.dispatchConfig.registrationName,o=h(t,n);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){T(t,r)}function l(t){T(t,i)}function g(t,e,A,n){d.traverseEnterLeave(A,n,a,t,e)}function M(t){T(t,s)}var u=A(52),d=A(54),I=A(58),T=A(59),h=(A(56),u.getListener),p={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:M,accumulateEnterLeaveDispatches:g};t.exports=p},function(t,e,A){"use strict";function n(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,A){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!A.disabled||!n(e));default:return!1}}var r=A(44),i=A(53),a=A(54),s=A(55),c=A(58),l=A(59),g=(A(46),{}),M=null,u=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return u(t,!0)},I=function(t){return u(t,!1)},T=function(t){return"."+t._rootNodeID},h={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(t,e,A){"function"!=typeof A?r("94",e,typeof A):void 0;var n=T(t),o=g[e]||(g[e]={});o[n]=A;var a=i.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,A)},getListener:function(t,e){var A=g[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var n=T(t);return A&&A[n]},deleteListener:function(t,e){var A=i.registrationNameModules[e];A&&A.willDeleteListener&&A.willDeleteListener(t,e);var n=g[e];if(n){var o=T(t);delete n[o]}},deleteAllListeners:function(t){var e=T(t);for(var A in g)if(g.hasOwnProperty(A)&&g[A][e]){var n=i.registrationNameModules[A];n&&n.willDeleteListener&&n.willDeleteListener(t,A),delete g[A][e]}},extractEvents:function(t,e,A,n){for(var o,r=i.plugins,a=0;a-1?void 0:i("96",t),!c.plugins[A]){e.extractEvents?void 0:i("97",t),c.plugins[A]=e;var n=e.eventTypes;for(var r in n)o(n[r],e,r)?void 0:i("98",r,t)}}}function o(t,e,A){c.eventNameDispatchConfigs.hasOwnProperty(A)?i("99",A):void 0,c.eventNameDispatchConfigs[A]=t;var n=t.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];r(a,e,A)}return!0}return!!t.registrationName&&(r(t.registrationName,e,A),!0)}function r(t,e,A){c.registrationNameModules[t]?i("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[A].dependencies}var i=A(44),a=(A(46),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?i("101"):void 0,a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var A in t)if(t.hasOwnProperty(A)){var o=t[A];s.hasOwnProperty(A)&&s[A]===o||(s[A]?i("102",A):void 0,s[A]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var A=e.phasedRegistrationNames;for(var n in A)if(A.hasOwnProperty(n)){var o=c.registrationNameModules[A[n]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var A in e)e.hasOwnProperty(A)&&delete e[A];var n=c.registrationNameModules;for(var o in n)n.hasOwnProperty(o)&&delete n[o]}};t.exports=c},function(t,e,A){"use strict";function n(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function i(t,e,A,n){var o=t.type||"unknown-event";t.currentTarget=h.getNodeFromInstance(n),e?I.invokeGuardedCallbackWithCatch(o,A,t):I.invokeGuardedCallback(o,A,t),t.currentTarget=null}function a(t,e){var A=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(A))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},function(t,e,A){"use strict";var n=A(44),o=(A(46),function(t){var e=this;if(e.instancePool.length){var A=e.instancePool.pop();return e.call(A,t),A}return new e(t)}),r=function(t,e){var A=this;if(A.instancePool.length){var n=A.instancePool.pop();return A.call(n,t,e),n}return new A(t,e)},i=function(t,e,A){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e,A),o}return new n(t,e,A)},a=function(t,e,A,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,A,n),r}return new o(t,e,A,n)},s=function(t,e,A,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,A,n,o),i}return new r(t,e,A,n,o)},c=function(t){var e=this;t instanceof e?void 0:n("25"),t.destructor(),e.instancePool.length8));var U=!1;N.canUseDOM&&(U=D("input")&&(!document.documentMode||document.documentMode>11));var S={get:function(){return j.get.call(this)},set:function(t){Q=""+t,j.set.call(this,t)}},v={eventTypes:B,extractEvents:function(t,e,A,o){var r,i,a=e?f.getNodeFromInstance(e):window;if(n(a)?m?r=s:i=c:x(a)?U?r=u:(r=I,i=d):T(a)&&(r=h),r){var l=r(t,e);if(l){var g=C.getPooled(B.change,l,A,o);return g.type="change",E.accumulateTwoPhaseDispatches(g),g}}i&&i(t,a,e)}};t.exports=v},function(t,e,A){"use strict";function n(){B.ReactReconcileTransaction&&f?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=M.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function r(t,e,A,o,r,i){return n(),f.batchedUpdates(t,e,A,o,r,i)}function i(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==h.length?l("124",e,h.length):void 0,h.sort(i),p++;for(var A=0;A]/,s=A(91),c=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{n=n||document.createElement("div"),n.innerHTML=""+e+"";for(var A=n.firstChild;A.firstChild;)t.appendChild(A.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var A=t.firstChild;1===A.data.length?t.removeChild(A):A.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){"use strict";var A=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,n,o){MSApp.execUnsafeLocalFunction(function(){return t(e,A,n,o)})}:t};t.exports=A},function(t,e,A){"use strict";var n=A(60),o=A(93),r=A(90),i=function(t,e){if(e){var A=t.firstChild;if(A&&A===t.lastChild&&3===A.nodeType)return void(A.nodeValue=e)}t.textContent=e};n.canUseDOM&&("textContent"in document.documentElement||(i=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=i},function(t,e){"use strict";function A(t){var e=""+t,A=o.exec(e);if(!A)return e;var n,r="",i=0,a=0;for(i=A.index;i]/;t.exports=n},function(t,e,A){"use strict";var n=A(44),o=A(88),r=A(60),i=A(95),a=A(57),s=(A(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:n("56"),e?void 0:n("57"),"HTML"===t.nodeName?n("58"):void 0,"string"==typeof e){var A=i(e,a)[0];t.parentNode.replaceChild(A,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,A){"use strict";function n(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var A=c;c?void 0:s(!1);var o=n(t),r=o&&a(o);if(r){A.innerHTML=r[1]+t+r[2];for(var l=r[0];l--;)A=A.lastChild}else A.innerHTML=t;var g=A.getElementsByTagName("script");g.length&&(e?void 0:s(!1),i(g).forEach(e));for(var M=Array.from(A.childNodes);A.lastChild;)A.removeChild(A.lastChild);return M}var r=A(60),i=A(96),a=A(97),s=A(46),c=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,A){"use strict";function n(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),"function"==typeof t.callee?i(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var A=Array(e),n=0;n":i.innerHTML="<"+t+">",a[t]=!i.firstChild),a[t]?M[t]:null}var o=A(60),r=A(46),i=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],c=[1,"","
"],l=[3,"","
"],g=[1,'',""],M={"*":[1,"?

","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},u=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];u.forEach(function(t){M[t]=g,a[t]=!0}),t.exports=n},function(t,e,A){"use strict";var n=A(87),o=A(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var A=o.getNodeFromInstance(t);n.processUpdates(A,e)}};t.exports=r},function(t,e,A){"use strict";function n(t){if(t){var e=t._currentElement._owner||null;if(e){var A=e.getName();if(A)return" This DOM node was rendered by `"+A+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?I("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?I("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:I("61")),null!=e.style&&"object"!=typeof e.style?I("62",n(t)):void 0)}function r(t,e,A,n){if(!(n instanceof U)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;k(e,a),n.getReactMountReady().enqueue(i,{inst:t,registrationName:e,listener:A})}}function i(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function s(){var t=this;j.postMountWrapper(t)}function c(){var t=this;b.postMountWrapper(t)}function l(){var t=this;t._rootNodeID?void 0:I("63");var e=Y(t);switch(e?void 0:I("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var A in P)P.hasOwnProperty(A)&&t._wrapperState.listeners.push(D.trapBubbledEvent(A,P[A],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function g(){Q.postUpdateWrapper(this)}function M(t){_.call(K,t)||(Z.test(t)?void 0:I("65",t),K[t]=!0)}function u(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;M(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var I=A(44),T=A(16),h=A(100),p=A(102),E=A(88),N=A(89),f=A(45),w=A(110),C=A(52),y=A(53),D=A(112),x=A(47),B=A(43),L=A(115),b=A(118),Q=A(119),j=A(120),m=(A(74),A(121)),U=A(141),S=(A(57),A(93)),v=(A(46),A(77),A(130),A(144),A(56),x),z=C.deleteListener,Y=B.getNodeFromInstance,k=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=T({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,A,n){this._rootNodeID=q++,this._domID=A._idCounter++,this._hostParent=e,this._hostContainerInfo=A;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"option":b.mountWrapper(this,r,e),r=b.getHostProps(this,r);break;case"select":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"textarea":j.mountWrapper(this,r,e),r=j.getHostProps(this,r),t.getReactMountReady().enqueue(l,this)}o(this,r);var i,g;null!=e?(i=e._namespaceURI,g=e._tag):A._tag&&(i=A._namespaceURI,g=A._tag),(null==i||i===N.svg&&"foreignobject"===g)&&(i=N.html),i===N.html&&("svg"===this._tag?i=N.svg:"math"===this._tag&&(i=N.mathml)),this._namespaceURI=i;var M;if(t.useCreateElement){var u,d=A._ownerDocument;if(i===N.html)if("script"===this._tag){var I=d.createElement("div"),T=this._currentElement.type;I.innerHTML="<"+T+">",u=I.removeChild(I.firstChild)}else u=r.is?d.createElement(this._currentElement.type,r.is):d.createElement(this._currentElement.type);else u=d.createElementNS(i,this._currentElement.type);B.precacheNode(this,u),this._flags|=v.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(u),this._updateDOMProperties(null,r,t);var p=E(u);this._createInitialChildren(t,r,n,p),M=p}else{var f=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,n);M=!C&&X[this._tag]?f+"/>":f+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return M},_createOpenTagMarkupAndPutListeners:function(t,e){var A="<"+this._currentElement.type;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(R.hasOwnProperty(n))o&&r(this,n,o,t);else{n===O&&(o&&(o=this._previousStyleCopy=T({},e.style)),o=p.createMarkupForStyles(o,this));var i=null;null!=this._tag&&u(this._tag,e)?V.hasOwnProperty(n)||(i=w.createMarkupForCustomAttribute(n,o)):i=w.createMarkupForProperty(n,o),i&&(A+=" "+i)}}return t.renderToStaticMarkup?A:(this._hostParent||(A+=" "+w.createMarkupForRoot()),A+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,A){var n="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(n=o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)n=S(r);else if(null!=i){var a=this.mountChildren(i,t,A);n=a.join("")}}return W[this._tag]&&"\n"===n.charAt(0)?"\n"+n:n},_createInitialChildren:function(t,e,A,n){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(n,o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)E.queueText(n,r);else if(null!=i)for(var a=this.mountChildren(i,t,A),s=0;s1)for(var A=1;A0&&n.length<20?A+" (keys: "+n.join(", ")+")":A}function r(t,e){var A=a.get(t);if(!A){return null}return A}var i=A(44),a=(A(22),A(123)),s=(A(74),A(68)),c=(A(46),A(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,A){c.validateCallback(e,A);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void n(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],n(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,n(e))},enqueueReplaceState:function(t,e){var A=r(t,"replaceState");A&&(A._pendingStateQueue=[e],A._pendingReplaceState=!0,n(A))},enqueueSetState:function(t,e){var A=r(t,"setState");if(A){var o=A._pendingStateQueue||(A._pendingStateQueue=[]);o.push(e),n(A)}},enqueueElementInternal:function(t,e,A){t._pendingElement=e,t._context=A,n(t)},validateCallback:function(t,e){t&&"function"!=typeof t?i("122",e,o(t)):void 0}});t.exports=c},function(t,e,A){"use strict";var n=(A(16),A(57)),o=(A(56),n);t.exports=o},function(t,e,A){"use strict";var n=A(16),o=A(88),r=A(43),i=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};n(i.prototype,{mountComponent:function(t,e,A,n){var i=A._idCounter++;this._domID=i,this._hostParent=e,this._hostContainerInfo=A;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=A._ownerDocument,c=s.createComment(a);return r.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=i},function(t,e,A){"use strict";function n(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var A=0,n=t;n;n=n._hostParent)A++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;A-o>0;)t=t._hostParent,A--;for(;o-A>0;)e=e._hostParent,o--;for(var i=A;i--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function i(t,e,A){for(var n=[];t;)n.push(t),t=t._hostParent;var o;for(o=n.length;o-- >0;)e(n[o],"captured",A);for(o=0;o0;)A(s[c],"captured",r)}var s=A(44);A(46);t.exports={isAncestor:o,getLowestCommonAncestor:n,getParentInstance:r,traverseTwoPhase:i,traverseEnterLeave:a}},function(t,e,A){"use strict";var n=A(44),o=A(16),r=A(87),i=A(88),a=A(43),s=A(93),c=(A(46),A(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,A,n){var o=A._idCounter++,r=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var l=A._ownerDocument,g=l.createComment(r),M=l.createComment(c),u=i(l.createDocumentFragment());return i.queueChild(u,i(g)),this._stringText&&i.queueChild(u,i(l.createTextNode(this._stringText))),i.queueChild(u,i(M)),a.precacheNode(this,g),this._closingComment=M,u}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var A=""+t;if(A!==this._stringText){this._stringText=A;var n=this.getHostNode();r.replaceDelimitedText(n[0],n[1],A)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),A=e.nextSibling;;){if(null==A?n("67",this._domID):void 0,8===A.nodeType&&" /react-text "===A.nodeValue){this._closingComment=A;break}A=A.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,A){"use strict";function n(){this.reinitializeTransaction()}var o=A(16),r=A(68),i=A(75),a=A(57),s={initialize:a,close:function(){M.isBatchingUpdates=!1}},c={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[c,s];o(n.prototype,i,{getTransactionWrappers:function(){return l}});var g=new n,M={isBatchingUpdates:!1,batchedUpdates:function(t,e,A,n,o,r){var i=M.isBatchingUpdates;return M.isBatchingUpdates=!0,i?t(e,A,n,o,r):g.perform(t,null,e,A,n,o,r)}};t.exports=M},function(t,e,A){"use strict";function n(t){for(;t._hostParent;)t=t._hostParent;var e=g.getNodeFromInstance(t),A=e.parentNode;return g.getClosestInstanceFromNode(A)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=u(t.nativeEvent),A=g.getClosestInstanceFromNode(e),o=A;do t.ancestors.push(o),o=o&&n(o);while(o);for(var r=0;re.end?(A=e.end,n=e.start):(A=e.start,n=e.end),o.moveToElementText(t),o.moveStart("character",A),o.setEndPoint("EndToStart",o),o.moveEnd("character",n-A),o.select()}function a(t,e){if(window.getSelection){var A=window.getSelection(),n=t[l()].length,o=Math.min(e.start,n),r=void 0===e.end?o:Math.min(e.end,n);if(!A.extend&&o>r){var i=r;r=o,o=i}var a=c(t,o),s=c(t,r);if(a&&s){var g=document.createRange();g.setStart(a.node,a.offset),A.removeAllRanges(),o>r?(A.addRange(g),A.extend(s.node,s.offset)):(g.setEnd(s.node,s.offset),A.addRange(g))}}}var s=A(60),c=A(156),l=A(63),g=s.canUseDOM&&"selection"in document&&!("getSelection"in window),M={getOffsets:g?o:r,setOffsets:g?i:a};t.exports=M},function(t,e){"use strict";function A(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function n(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=A(t),r=0,i=0;o;){if(3===o.nodeType){if(i=r+o.textContent.length,r<=e&&i>=e)return{node:o,offset:e-r};r=i}o=A(n(o))}}t.exports=o},function(t,e,A){"use strict";function n(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?n(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=A(158);t.exports=n},function(t,e,A){"use strict";function n(t){return o(t)&&3==t.nodeType}var o=A(159);t.exports=n},function(t,e){"use strict";function A(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=A},function(t,e){"use strict";function A(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=A},function(t,e){"use strict";var A={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},n={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:A.xlink,xlinkArcrole:A.xlink,xlinkHref:A.xlink,xlinkRole:A.xlink,xlinkShow:A.xlink,xlinkTitle:A.xlink,xlinkType:A.xlink,xmlBase:A.xml,xmlLang:A.xml,xmlSpace:A.xml},DOMAttributeNames:{}};Object.keys(n).forEach(function(t){o.Properties[t]=0,n[t]&&(o.DOMAttributeNames[t]=n[t])}),t.exports=o},function(t,e,A){"use strict";function n(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var A=document.selection.createRange();return{parentElement:A.parentElement(),text:A.text,top:A.boundingTop,left:A.boundingLeft}}}function o(t,e){if(p||null==I||I!==l())return null;var A=n(I);if(!h||!M(h,A)){h=A;var o=c.getPooled(d.select,T,t,e);return o.type="select",o.target=I,r.accumulateTwoPhaseDispatches(o),o}return null}var r=A(51),i=A(60),a=A(43),s=A(154),c=A(65),l=A(160),g=A(78),M=A(130),u=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},I=null,T=null,h=null,p=!1,E=!1,N={eventTypes:d,extractEvents:function(t,e,A,n){if(!E)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(g(r)||"true"===r.contentEditable)&&(I=r,T=e,h=null);break;case"topBlur":I=null,T=null,h=null;break;case"topMouseDown":p=!0;break;case"topContextMenu":case"topMouseUp":return p=!1,o(A,n);case"topSelectionChange":if(u)break;case"topKeyDown":case"topKeyUp":return o(A,n)}return null},didPutListener:function(t,e,A){"onSelect"===e&&(E=!0)}};t.exports=N},function(t,e,A){"use strict";function n(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=A(44),i=A(150),a=A(51),s=A(43),c=A(164),l=A(165),g=A(65),M=A(166),u=A(167),d=A(81),I=A(170),T=A(171),h=A(172),p=A(82),E=A(173),N=A(57),f=A(168),w=(A(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),A="on"+e,n="top"+e,o={phasedRegistrationNames:{bubbled:A,captured:A+"Capture"},dependencies:[n]};w[t]=o,C[n]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,A,n){var o=C[t];if(!o)return null;var i;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=g;break;case"topKeyPress":if(0===f(A))return null;case"topKeyDown":case"topKeyUp":i=u;break;case"topBlur":case"topFocus":i=M;break;case"topClick":if(2===A.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=I;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=T;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=c;break;case"topTransitionEnd":i=h;break;case"topScroll":i=p;break;case"topWheel":i=E;break;case"topCopy":case"topCut":case"topPaste":i=l}i?void 0:r("86",t);var s=i.getPooled(o,e,A,n);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,A){if("onClick"===e&&!o(t._tag)){var r=n(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=i.listen(a,"click",N))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var A=n(t);y[A].remove(),delete y[A]}}};t.exports=D},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r={relatedTarget:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(168),i=A(169),a=A(84),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(n,s),t.exports=n},function(t,e){"use strict";function A(t){var e,A=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===A&&(e=13)):e=A,e>=32||13===e?e:0}t.exports=A},function(t,e,A){"use strict";function n(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var A=o(t);return 13===A?"Enter":String.fromCharCode(A)}return"keydown"===t.type||"keyup"===t.type?i[t.keyCode]||"Unidentified":""}var o=A(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={dataTransfer:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(84),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e){for(var A=Math.min(t.length,e.length),n=0;n.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,a=T.createElement(k,{child:e});if(t){var s=w.get(t);i=s._processChildContext(s._context)}else i=B;var l=M(A);if(l){var g=l._currentElement,d=g.props.child;if(Q(d,e)){var I=l._renderedComponent.getPublicInstance(),h=n&&function(){n.call(I)};return R._updateRootComponent(l,a,i,A,h),I}R.unmountComponentAtNode(A)}var p=o(A),E=p&&!!r(p),N=c(A),f=E&&!l&&!N,C=R._renderNewRootComponent(a,A,f,i)._renderedComponent.getPublicInstance();return n&&n.call(C),C},render:function(t,e,A){return R._renderSubtreeIntoContainer(null,t,e,A)},unmountComponentAtNode:function(t){l(t)?void 0:u("40");var e=M(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(m);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,A,r,i){if(l(e)?void 0:u("41"),r){var a=o(e);if(C.canReuseMarkup(t,a))return void p.precacheNode(A,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var g=t,M=n(g,c),I=" (client) "+g.substring(M-20,M+20)+"\n (server) "+c.substring(M-20,M+20);e.nodeType===S?u("42",I):void 0}if(e.nodeType===S?u("43"):void 0,i.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),p.precacheNode(A,e.firstChild)}};t.exports=R},function(t,e,A){"use strict";function n(t,e){var A={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return A}var o=(A(144),9);t.exports=n},function(t,e){"use strict";var A={useCreateElement:!0,useFiber:!1};t.exports=A},function(t,e,A){"use strict";var n=A(178),o=/\/?>/,r=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=n(t);return r.test(t)?t:t.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var A=e.getAttribute(i.CHECKSUM_ATTR_NAME);A=A&&parseInt(A,10);var o=n(t);return o===A}};t.exports=i},function(t,e){"use strict";function A(t){for(var e=1,A=0,o=0,r=t.length,i=r&-4;o3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),M=t||y,d=void 0;d="function"==typeof e?e:e?(0,h.default)(e):D;var T=A||x,p=n.pure,E=void 0===p||p,N=n.withRef,w=void 0!==N&&N,b=E&&T!==x,Q=L++;return function(t){function e(t,e,A){var n=T(t,e,A);return n}var A="Connect("+a(t)+")",n=function(n){function a(t,e){o(this,a);var i=r(this,n.call(this,t,e));i.version=Q,i.store=t.store||e.store,(0,C.default)(i.store,'Could not find "store" in either the context or '+('props of "'+A+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+A+'".'));var s=i.store.getState();return i.state={storeState:s},i.clearCache(),i}return i(a,n),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var A=t.getState(),n=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(A,e):this.finalMapStateToProps(A);return n},a.prototype.configureFinalMapState=function(t,e){var A=M(t.getState(),e),n="function"==typeof A;return this.finalMapStateToProps=n?A:M,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,n?this.computeStateProps(t,e):A},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var A=t.dispatch,n=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(A,e):this.finalMapDispatchToProps(A);return n},a.prototype.configureFinalMapDispatch=function(t,e){var A=d(t.dispatch,e),n="function"==typeof A;return this.finalMapDispatchToProps=n?A:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,n?this.computeDispatchProps(t,e):A},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,I.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,I.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,I.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,I.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var A=s(this.updateStatePropsIfNeeded,this);if(!A)return;A===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,A=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var i=!0,a=!0;E&&r&&(i=A||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;n?s=!0:i&&(s=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var M=!0;return M=!!(s||c||e)&&this.updateMergedPropsIfNeeded(),!M&&r?r:(w?this.renderedElement=(0,g.createElement)(t,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,g.createElement)(t,this.mergedProps),this.renderedElement)},a}(g.Component);return n.displayName=A,n.WrappedComponent=t,n.contextTypes={store:u.default},n.propTypes={store:u.default},(0,f.default)(n,t)}}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var A={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in A)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?A[n]:("00"+A[n]).substr((""+A[n]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=A,e.getParameter=n,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+l++;return t}function r(t,e){var A=window._server+"/frame/loadFileVersions";$.ajax({url:A,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function i(t,e){var A=window._server+"/common/loadResourceTreeData";$.ajax({url:A,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=c.default.frameStyle.getRootIcon(),t._style=c.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=c.default.frameStyle.getFolderIcon(),t._style=c.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=c.default.frameStyle.getRuleIcon(),t._style=c.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=c.default.frameStyle.getProjectIcon(),t._style=c.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=c.default.frameStyle.getResourceIcon(),t._style=c.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=c.default.frameStyle.getResourcePackageIcon(),t._style=c.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=c.default.frameStyle.getLibIcon(),t._style=c.default.frameStyle.getLibIconStyle();break;case"action":t._icon=c.default.frameStyle.getActionIcon(),t._style=c.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=c.default.frameStyle.getParameterIcon(),t._style=c.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=c.default.frameStyle.getConstantIcon(),t._style=c.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=c.default.frameStyle.getVariableIcon(),t._style=c.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=c.default.frameStyle.getRuleLibIcon(),t._style=c.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=c.default.frameStyle.getDecisionTableLibIcon(),t._style=c.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=c.default.frameStyle.getDecisionTreeLibIcon(),t._style=c.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=c.default.frameStyle.getFlowLibIcon(),t._style=c.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=c.default.frameStyle.getUlIcon(),t._style=c.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=c.default.frameStyle.getDecisionTableIcon(),t._style=c.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=c.default.frameStyle.getScriptDecisionTableIcon(),t._style=c.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=c.default.frameStyle.getDecisionTreeIcon(),t._style=c.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=c.default.frameStyle.getFlowIcon(),t._style=c.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=c.default.frameStyle.getScorecardIcon(),t._style=c.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=i;var s=A(228),c=n(s),l=1},function(t,e){"use strict";function A(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var n={};n.frameStyle={getRootIcon:function(){return A("rootIcon","rf rf-root")},getRootIconStyle:function(){return A("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return A("projectIcon","rf rf-project")},getProjectIconStyle:function(){return A("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return A("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return A("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return A("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return A("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return A("libIcon","rf rf-database")},getLibIconStyle:function(){return A("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return A("actionIcon","rf rf-action")},getActionIconStyle:function(){return A("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return A("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return A("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return A("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return A("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return A("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return A("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return A("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return A("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return A("ulIcon","rf rf-script")},getUlIconStyle:function(){return A("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return A("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return A("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return A("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return A("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return A("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return A("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return A("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return A("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return A("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return A("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return A("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return A("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return A("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return A("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return A("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return A("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return A("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return A("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return A("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return A("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return A("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return A("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=n},,,,,,function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A-1&&(l=!0),!1}}),l?c.show():c.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,A=e.headers,n=e.operationConfig,o=e.dispatch,r=e.selectFirst,i=(e.uniqueKey,this.props.rows||[]),a=[],s=[];A.forEach(function(e,A){e.editable?a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label),c.default.createElement(I.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label)))}),n&&a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:n.width}},c.default.createElement("label",null,"操作列")));var l=c.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},A.map(function(e,A){return e.filterable?c.default.createElement("td",{key:(0,T.uniqueID)()},c.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,A),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):c.default.createElement("td",{key:(0,T.uniqueID)()}," ")}),n?c.default.createElement("td",null):null);s.push(l),i.forEach(function(e,i){e.id||(e.id=(0,T.uniqueID)());var a=e.id;0===i&&r?s.push(c.default.createElement(u.default,{key:a,select:!0,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i})):s.push(c.default.createElement(u.default,{key:a,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i}))});var g={margin:0,width:this.props.width?this.props.width:"100%"};return c.default.createElement("table",{className:"table table-bordered",style:g},c.default.createElement("thead",null,c.default.createElement("tr",{className:"well"},a)),c.default.createElement("tbody",null,s))}}]),e}(s.Component);h.propTypes={headers:c.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=h},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var n=e[t];n&&""!==n||(n="{}");var o=JSON.parse(n)||{},r=o.rows||[],i=o.type,a=function(n){var o={type:i,rows:n},r=JSON.stringify(o);e[t]=r;var a=A.find("div");a.html(r)};if(i){var s=null,c=!0,l=!1,g=void 0;try{for(var M,u=simulatorCategoryData[Symbol.iterator]();!(c=(M=u.next()).done);c=!0){var d=M.value;if(i===d.clazz){s=d;break}}}catch(t){l=!0,g=t}finally{try{!c&&u.return&&u.return()}finally{if(l)throw g}}var T=s.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:T,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),A=!0,n=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var l=s.value;e.append('")}}catch(t){n=!0,o=t}finally{try{!A&&c.return&&c.return()}finally{if(n)throw o}}e.append(''),h.MsgBox.dialog("选择子对象类型",e,function(){if(i=e.val(),!i||""===i)return void h.MsgBox.alert("请先选择子对象类型!");var A=null,n=!0,o=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(n=(c=l.next()).done);n=!0){var g=c.value;if(i===g.clazz){A=g;break}}}catch(t){o=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw s}}var M=A.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:M,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}A.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var n=A.find("div");n.html(e[t]),n.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,A=e.rowData,n=e.header,o=n.dateFormat,r=A[n.name];if(o){var i=new Date(r);r=(0,T.formatDate)(i,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return g.default.createElement("td",{style:{padding:"1px 5px"}},g.default.createElement("div",{style:a,onClick:function(e){if(n.editable){var o=e.target;$(o).css({display:"none"}),A._editorType?t._showEditor(n.name):I.eventEmitter.emit(I.SHOW_CELL_EDITOR,{targetDiv:o,rowData:A,colId:n.id})}}},r))}}]),e}(l.Component);e.default=p},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=A(240),r=n(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},A.prototype.emit=function(t){var e,A,o,a,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(A=this._events[t],i(A))return!1;if(n(A))switch(arguments.length){case 1:A.call(this);break;case 2:A.call(this,arguments[1]);break;case 3:A.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),A.apply(this,a)}else if(r(A))for(a=Array.prototype.slice.call(arguments,1),c=A.slice(),o=c.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(t,e){function A(){this.removeListener(t,A),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return A.listener=e,this.on(t,A),this},A.prototype.removeListener=function(t,e){var A,o,i,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(A=this._events[t],i=A.length,o=-1,A===e||n(A.listener)&&A.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(A)){for(a=i;a-- >0;)if(A[a]===e||A[a].listener&&A[a].listener===e){o=a;break}if(o<0)return this;1===A.length?(A.length=0,delete this._events[t]):A.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},A.prototype.removeAllListeners=function(t){var e,A;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(A=this._events[t],n(A))this.removeListener(t,A);else if(A)for(;A.length;)this.removeListener(t,A[A.length-1]);return delete this._events[t],this},A.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},A.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},A.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,A){var n=A(242).default,o=A(243).default,r=A(251),i=A(252).default,a=A(302);t.exports={Tool:n,Node:o,MsgBox:r,Event:a,FlowDesigner:i}},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_newNodeInstance",value:function(t,e,A){var n=this.newNode();return n?(n._tool=this,n._initConfigs(this.getConfigs()),A||(A=this._buildNodeName()),n._createFigure(this.context,{x:t,y:e},A),n):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,A=!0,n=!1,o=void 0;try{for(var r,i=this.context.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);es-l&&as-l&&a>c-l?this.attr("cursor","se-resize"):ic-l?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},n=function(A){if(!this.dragging){var n=t.currentTool;if(n){if(n instanceof u.default||n instanceof g.default||(t.currentTool=t.selectTool,n=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),n instanceof g.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,i=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var M=s.value;if(M===e){o=!0;break}}}catch(t){i=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(n instanceof u.default){var d=A.offsetX,T=A.offsetY,h=t.currentConnection;if(h){if(0===e.in)return void I.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void I.alert("当前节点进入的连线最多只能有"+e.in+"条.");h.endX=d,h.endY=T,h.from!==e?!function(){h.endPath(e),t.currentConnection=null;var A=h.from.uuid,n=e.uuid,o=h.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(A),r=t.getNodeByUUID(n);h=new c.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),h.uuid=o,h.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():I.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void I.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void I.alert("当前节点出去的连线最多只能有"+e.out+"条."); +h=new c.default(e,{endX:d,endY:T}),t.currentConnection=h}}}}};this.rect.mouseover(A),this.rect.mousedown(n),this.icon.mouseover(A),this.icon.mousedown(n);var o=function(){var A=e.rect,n=t.currentTool;if(n&&n instanceof g.default){var o=!1,r=t.selectionFigures,i=!0,a=!1,s=void 0;try{for(var l,M=r[Symbol.iterator]();!(i=(l=M.next()).done);i=!0){var u=l.value;if(u===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&M.return&&M.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof c.default||t._recordRectPosition()}),A.ow=A.attr("width"),A.oh=A.attr("height"),A.dragging=!0}},r=function(A,n){var o=t.currentTool;if(o&&o instanceof g.default){e.context.snapto&&(A-=A%10,n-=n%10);var r=t.selectionFigures,i=e.rect,a=(e.icon,i.ox+A),s=i.oy+n;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var l=void 0,M=void 0;switch(this.attr("cursor")){case"nw-resize":l=i.ow-A,M=i.oh-n,l>20&&M>20&&i.attr({x:a,y:s,width:l,height:M});break;case"ne-resize":l=i.ow+A,M=i.oh-n,l>20&&M>20&&i.attr({y:s,width:l,height:M});break;case"se-resize":l=i.ow+A,M=i.oh+n,l>20&&M>20&&i.attr({width:l,height:M});break;case"sw-resize":l=i.ow-A,M=i.oh+n,l>20&&M>20&&i.attr({x:a,width:l,height:M});break;default:r.forEach(function(t,e){t instanceof c.default||t._moveRect(A,n)})}r.forEach(function(t,e){t instanceof c.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},i=function(){e.rect.dragging=!1;var A=[],n=new Map,o=new Map,r=e.rect.ow,i=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),l=e.uuid,g=!0,M=!1,u=void 0;try{for(var d,I=t.selectionFigures[Symbol.iterator]();!(g=(d=I.next()).done);g=!0){var T=d.value;if(!(T instanceof c.default)){A.push(T.uuid);var h=T.rect.ox,p=T.rect.oy;h=h?h:0,p=p?p:0;var E=T.rect.attr("x"),N=T.rect.attr("y");n.set(T.uuid,{x:E,y:N}),o.set(T.uuid,{x:h,y:p})}}}catch(t){M=!0,u=t}finally{try{!g&&I.return&&I.return()}finally{if(M)throw u}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var i,c=A[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var g=i.value,M=t.getNodeByUUID(g),u=n.get(g);M.rect.attr({x:u.x,y:u.y}),g===l&&M.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&c.return&&c.return()}finally{if(o)throw r}}var d=!0,I=!1,T=void 0;try{for(var h,p=A[Symbol.iterator]();!(d=(h=p.next()).done);d=!0){var E=h.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,T=t}finally{try{!d&&p.return&&p.return()}finally{if(I)throw T}}},undo:function(){var e=!0,n=!1,a=void 0;try{for(var s,c=A[Symbol.iterator]();!(e=(s=c.next()).done);e=!0){var g=s.value,M=t.getNodeByUUID(g),u=o.get(g);M.rect.attr({x:u.x,y:u.y}),g===l&&M.rect.attr({width:r,height:i})}}catch(t){n=!0,a=t}finally{try{!e&&c.return&&c.return()}finally{if(n)throw a}}var d=!0,I=!1,T=void 0;try{for(var h,p=A[Symbol.iterator]();!(d=(h=p.next()).done);d=!0){var E=h.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,T=t}finally{try{!d&&p.return&&p.return()}finally{if(I)throw T}}}})};this.rect.drag(r,o,i),this.icon.drag(r,o,i)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),A=[].concat(r(this.fromConnections));e.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),A.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var A=void 0,n=void 0;this.rect.ox&&0!==this.rect.ox?(A=this.rect.ox+t,n=this.rect.oy+e):(A=this.rect.attr("x")+t,n=this.rect.attr("x")+e),this.rect.attr({x:A,y:n})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),A=this.rect.attr("y"),n=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,A-=5,n+=10,o+=10),"M "+e+" "+A+" L "+(e+n)+" "+A+" L "+(e+n)+" "+(A+o)+" L "+e+" "+(A+o)+" L "+e+" "+A}}]),t}();e.default=T},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t,e){for(var A=0;A0){({x:t[1][1],y:t[1][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var A=this.to.rect,n=A.attr("x"),o=A.attr("y"),r=A.attr("width"),i=A.attr("height");n+=r/2,o+=i/2-10;var a=t.x,c=t.y;t=[],t.push(["M",a,c]),t.push(["L",n,o])}var l=this.to.getPathInfo(!0),g=s.default.pathIntersection(l,t);if(g.length>0){({x:t[0][1],y:t[0][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),A=t.attr("y"),n=t.attr("width"),o=t.attr("height");e+=n/2,A+=o/2-10;var r=this.endX,i=this.endY,a=0,c=0,l=null;if(this.to){var g=this.to.rect;r=g.attr("x"),i=g.attr("y"),a=g.attr("width"),c=g.attr("height"),r+=a/2,i+=c/2-10}var M=this.from.getPathInfo(!0),u=Math.abs(e+n/2-(r-a/2)),d=Math.abs(A+o/2-(i-c/2)),I="M"+e+" "+A;if(u>=d){var T=I+" L"+r+" "+A,h=s.default.pathIntersection(M,T);if(h.length>0&&(e=h[0].x,A=h[0].y,I="M"+h[0].x+" "+h[0].y),this.to){var p="M"+e+" "+i+" L"+r+" "+i,E=this.to.getPathInfo(!0);h=s.default.pathIntersection(E,p),h.length>0&&(r=h[0].x,i=h[0].y,e0&&(e=C[0].x,A=C[0].y,I="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+A+" L"+r+" "+i,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,i=C[0].y,A=1e3&&delete a[s.shift()],s.push(i),a[i]=t[L](e,r),A?A(a[i]):a[i])}return o}function r(){return this.hex}function i(t,e){for(var A=[],n=0,o=t.length;o-2*!e>n;n+=2){var r=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?o-4==n?r[3]={x:+t[0],y:+t[1]}:o-2==n&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==n?r[3]=r[2]:n||(r[0]={x:+t[n],y:+t[n+1]}),A.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return A}function a(t,e,A,n,o){var r=-3*e+9*A-9*n+3*o,i=t*r+6*e-12*A+6*n;return t*i-3*e+3*A}function s(t,e,A,n,o,r,i,s,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,g=12,M=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,I=0;Id;)M/=2,u+=(lR(o,i)||R(e,n)R(r,a))){var s=(t*n-e*A)*(o-i)-(t-A)*(o*a-r*i),c=(t*n-e*A)*(r-a)-(e-n)*(o*a-r*i),l=(t-A)*(r-a)-(e-n)*(o-i);if(l){var g=s/l,M=c/l,u=+g.toFixed(2),d=+M.toFixed(2);if(!(u<+F(t,A).toFixed(2)||u>+R(t,A).toFixed(2)||u<+F(o,i).toFixed(2)||u>+R(o,i).toFixed(2)||d<+F(e,n).toFixed(2)||d>+R(e,n).toFixed(2)||d<+F(r,a).toFixed(2)||d>+R(r,a).toFixed(2)))return{x:g,y:M}}}}function g(t,A,n){var o=e.bezierBBox(t),r=e.bezierBBox(A);if(!e.isBBoxIntersect(o,r))return n?0:[];for(var i=s.apply(0,t),a=s.apply(0,A),c=R(~~(i/5),1),g=R(~~(a/5),1),M=[],u=[],d={},I=n?0:[],T=0;T=0&&x<=1.001&&B>=0&&B<=1.001&&(n?I++:I.push({x:D.x,y:D.y,t1:F(x,1),t2:F(B,1)}))}}return I}function M(t,A,n){t=e._path2curve(t),A=e._path2curve(A);for(var o,r,i,a,s,c,l,M,u,d,I=n?0:[],T=0,h=t.length;Tn)return n;for(;Ar?A=o:n=o,o=(n-A)/2+A}return o}var c=3*e,l=3*(n-e)-c,g=1-c-l,M=3*A,u=3*(o-A)-M,d=1-M-u;return a(t,1/(200*r))}function T(t,e){var A=[],n={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(n[q(o)]=t[o],A.push(q(o)));A.sort(lt)}this.anim=n,this.top=A[A.length-1],this.percents=A}function h(A,n,o,r,i,a){o=q(o);var s,c,l,g,M,d,T=A.ms,h={},p={},E={};if(r)for(w=0,C=re.length;wr*A.top){o=A.percents[w],M=A.percents[w-1]||0,T=T/A.top*(o-M),g=A.percents[w+1],s=A.anim[o];break}r&&n.attr(A.anim[A.percents[w]])}if(s){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var D in s)if(s[y](D)&&(At[y](D)||n.paper.customAttributes[y](D)))switch(h[D]=n.attr(D),null==h[D]&&(h[D]=et[D]),p[D]=s[D],At[D]){case G:E[D]=(p[D]-h[D])/T;break;case"colour":h[D]=e.getRGB(h[D]);var x=e.getRGB(p[D]);E[D]={r:(x.r-h[D].r)/T,g:(x.g-h[D].g)/T,b:(x.b-h[D].b)/T};break;case"path":var B=St(h[D],p[D]),L=B[1];for(h[D]=B[0],E[D]=[],w=0,C=h[D].length;w',Tt=ht.firstChild,Tt.style.behavior="url(#default#VML)",!Tt||"object"!=typeof Tt.adj)return e.type=j;ht=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=N=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,A,n,o,r,i){if(null==r){var a=t-n,s=A-o;return a||s?(180+180*k.atan2(-s,-a)/V+360)%360:0}return e.angle(t,A,r,i)-e.angle(n,o,r,i)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,A,n){if(n=e.is(n,"finite")?n:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-A)<=n)return t[o]}else{t=+t;var r=A%t;if(rt-n)return A-r+t}return A};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*k.random()|0,A="x"==t?e:3&e|8;return A.toString(16)});e.setWindow=function(A){t("raphael.setWindow",e,D.win,A),D.win=A,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var pt=function(t){if(e.vml){var A,n=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),A=r.body}catch(t){A=createPopup().document.body}var i=A.createTextRange();pt=o(function(t){try{A.style.color=U(t).replace(n,j);var e=i.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),pt=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,j).getPropertyValue("color")})}return pt(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Nt=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return this.hex},wt=function(t,A,n){if(null==A&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,A=t.g,t=t.r),null==A&&e.is(t,P)){var o=e.getRGB(t);t=o.r,A=o.g,n=o.b}return(t>1||A>1||n>1)&&(t/=255,A/=255,n/=255),[t,A,n]},Ct=function(t,A,n,o){t*=255,A*=255,n*=255;var r={r:t,g:A,b:n,hex:e.rgb(t,A,n),toString:ft};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var A;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(A=e.hsb2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(A=e.hsl2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(A=e.rgb2hsl(t),t.h=A.h,t.s=A.s,t.l=A.l,A=e.rgb2hsb(t),t.v=A.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=ft,t},e.hsb2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(A=t.b,e=t.s,n=t.o,t=t.h),t*=360;var o,r,i,a,s;return t=t%360/60,s=A*e,a=s*(1-O(t%2-1)),o=r=i=A-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.hsl2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(A=t.l,e=t.s,t=t.h),(t>1||e>1||A>1)&&(t/=360,e/=100,A/=100),t*=360;var o,r,i,a,s;return t=t%360/60,s=2*e*(A<.5?A:1-A),a=s*(1-O(t%2-1)),o=r=i=A-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.rgb2hsb=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i;return r=R(t,e,A),i=r-F(t,e,A),n=0==i?null:r==t?(e-A)/i:r==e?(A-t)/i+2:(t-e)/i+4,n=(n+360)%6*60/360,o=0==i?0:i/r,{h:n,s:o,b:r,toString:Et}},e.rgb2hsl=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i,a,s;return i=R(t,e,A),a=F(t,e,A),s=i-a,n=0==s?null:i==t?(e-A)/s:i==e?(A-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=(i+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:n,s:o,l:r,toString:Nt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var A=D.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},A.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(A),A.src=t};e.getRGB=o(function(t){if(!t||(t=U(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=pt(t));var A,n,o,i,a,s,c=t.match(J);return c?(c[2]&&(o=$(c[2].substring(5),16),n=$(c[2].substring(3,5),16),A=$(c[2].substring(1,3),16)),c[3]&&(o=$((a=c[3].charAt(3))+a,16),n=$((a=c[3].charAt(2))+a,16),A=$((a=c[3].charAt(1))+a,16)),c[4]&&(s=c[4][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100)),c[5]?(s=c[5][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsb2rgb(A,n,o,i)):c[6]?(s=c[6][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsl2rgb(A,n,o,i)):(c={r:A,g:n,b:o,toString:r},c.hex="#"+(16777216|o|n<<8|A<<16).toString(16).slice(1),e.is(i,"finite")&&(c.opacity=i),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,A,n){return e.hsb2rgb(t,A,n).hex}),e.hsl=o(function(t,A,n){return e.hsl2rgb(t,A,n).hex}),e.rgb=o(function(t,e,A){function n(t){return t+.5|0}return"#"+(16777216|n(A)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},A=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),A.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var A=yt(t);if(A.arr)return xt(A.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||U(t).replace(it,function(t,e,A){var r=[],i=e.toLowerCase();if(A.replace(st,function(t,e){e&&r.push(+e)}),"m"==i&&r.length>2&&(o.push([e][b](r.splice(0,2))),i="l",e="m"==e?"l":"L"),"r"==i)o.push([e][b](r));else for(;r.length>=n[i]&&(o.push([e][b](r.splice(0,n[i]))),n[i]););}),o.toString=e._path2string,A.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var A=[];return e.is(t,X)&&e.is(t[0],X)&&(A=xt(t)),A.length||U(t).replace(at,function(t,e,n){var o=[];Y.call(e);n.replace(st,function(t,e){e&&o.push(+e)}),A.push([e][b](o))}),A.toString=e._path2string,A});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var A in e)e[y](A)&&A!=t&&(e[A].sleep--,!e[A].sleep&&delete e[A])}),e[t]};e.findDotsAtSegment=function(t,e,A,n,o,r,i,a,s){var c=1-s,l=H(c,3),g=H(c,2),M=s*s,u=M*s,d=l*t+3*g*s*A+3*c*s*s*o+u*i,I=l*e+3*g*s*n+3*c*s*s*r+u*a,T=t+2*s*(A-t)+M*(o-2*A+t),h=e+2*s*(n-e)+M*(r-2*n+e),p=A+2*s*(o-A)+M*(i-2*o+A),E=n+2*s*(r-n)+M*(a-2*r+n),N=c*t+s*A,f=c*e+s*n,w=c*o+s*i,C=c*r+s*a,y=90-180*k.atan2(T-p,h-E)/V;return(T>p||h=t.x&&e<=t.x2&&A>=t.y&&A<=t.y2},e.isBBoxIntersect=function(t,A){var n=e.isPointInsideBBox;return n(A,t.x,t.y)||n(A,t.x2,t.y)||n(A,t.x,t.y2)||n(A,t.x2,t.y2)||n(t,A.x,A.y)||n(t,A.x2,A.y)||n(t,A.x,A.y2)||n(t,A.x2,A.y2)||(t.xA.x||A.xt.x)&&(t.yA.y||A.yt.y); +},e.pathIntersection=function(t,e){return M(t,e)},e.pathIntersectionNumber=function(t,e){return M(t,e,1)},e.isPointInsidePath=function(t,A,n){var o=e.pathBBox(t);return e.isPointInsideBBox(o,A,n)&&M(t,[["M",A,n],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return A(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=St(t);for(var n,o=0,r=0,i=[],a=[],s=0,c=t.length;s1&&(p=k.sqrt(p),A*=p,n*=p);var E=A*A,N=n*n,f=(i==a?-1:1)*k.sqrt(O((E*N-E*h*h-N*T*T)/(E*h*h+N*T*T))),w=f*A*h/n+(t+s)/2,C=f*-n*T/A+(e+c)/2,y=k.asin(((e-C)/n).toFixed(9)),D=k.asin(((c-C)/n).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(O(x)>M){var B=D,L=s,Q=c;D=y+M*(a&&D>y?1:-1),s=w+A*k.cos(D),c=C+n*k.sin(D),d=jt(s,c,A,n,r,0,a,L,Q,[D,B,w,C])}x=D-y;var j=k.cos(y),m=k.sin(y),U=k.cos(D),v=k.sin(D),z=k.tan(x/4),Y=4/3*A*z,R=4/3*n*z,F=[t,e],H=[t+Y*m,e-R*j],G=[s+Y*v,c-R*U],P=[s,c];if(H[0]=2*F[0]-H[0],H[1]=2*F[1]-H[1],l)return[H,G,P][b](d);d=[H,G,P][b](d).join()[S](",");for(var X=[],W=0,J=d.length;W"1e12"&&(M=.5),O(u)>"1e12"&&(u=.5),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),c=r-2*n+e-(a-2*r+n),l=2*(n-e)-2*(r-n),g=e-n,M=(-l+k.sqrt(l*l-4*c*g))/2/c,u=(-l-k.sqrt(l*l-4*c*g))/2/c,O(M)>"1e12"&&(M=.5),O(u)>"1e12"&&(u=.5),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),{min:{x:F[L](0,I),y:F[L](0,d)},max:{x:R[L](0,I),y:R[L](0,d)}}}),St=e._path2curve=o(function(t,e){var A=!e&&yt(t);if(!e&&A.curve)return xt(A.curve);for(var n=Lt(t),o=e&&Lt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,A){var n,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](jt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==A||"S"==A?(n=2*e.x-e.bx,o=2*e.y-e.by):(n=e.x,o=e.y),t=["C",n,o][b](t.slice(1));break;case"T":"Q"==A||"T"==A?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](Qt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](Qt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var A=t[e];A.length;)l[e]="A",o&&(g[e]="A"),t.splice(e++,0,["C"][b](A.splice(0,6)));t.splice(e,1),I=R(n.length,o&&o.length||0)}},c=function(t,e,A,r,i){t&&e&&"M"==t[i][0]&&"M"!=e[i][0]&&(e.splice(i,0,["M",r.x,r.y]),A.bx=0,A.by=0,A.x=t[i][1],A.y=t[i][2],I=R(n.length,o&&o.length||0))},l=[],g=[],M="",u="",d=0,I=R(n.length,o&&o.length||0);do){if(A&&!M.start){if(l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-u),g+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],r)return g;M.start=g,g=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,s[5],s[6]].join(),u+=c,i=+s[5],a=+s[6];continue}if(!t&&!A)return l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-u),{x:l.x,y:l.y,alpha:l.alpha}}u+=c,i=+s[5],a=+s[6]}g+=s.shift()+s}return M.end=g,l=t?u:A?M:e.findDotsAtSegment(i,a,s[0],s[1],s[2],s[3],s[4],s[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},ee=te(1),Ae=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=Ae,e.getSubpath=function(t,e,A){if(this.getTotalLength(t)-A<1e-6)return ne(t,e).end;var n=ne(t,A,1);return e?ne(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return Ae(e,t)},Zt.getPath=function(){var t,A=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return A&&(t=A(this)),t},Zt.getSubpath=function(t,A){var n=this.getPath();if(n)return e.getSubpath(n,t,A)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,A=k.sqrt(.1734+e*e),n=A-e,o=H(O(n),1/3)*(n<0?-1:1),r=-A-e,i=H(O(r),1/3)*(r<0?-1:1),a=o+i+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*k.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,A=7.5625,n=2.75;return t<1/n?e=A*t*t:t<2/n?(t-=1.5/n,e=A*t*t+.75):t<2.5/n?(t-=2.25/n,e=A*t*t+.9375):(t-=2.625/n,e=A*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],ie=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var A=+new Date,n=0;n1&&!o.next){for(i in M)M[y](i)&&(I[i]=o.totalOrigin[i]);o.el.attr(I),h(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&h(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&ie(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,A,n,o,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=n instanceof T?n:e.animation(n,o,r,i);h(s,a,s.percents[0],null,a.attr());for(var c=0,l=re.length;cs&&(s=l)}s+="%",!t[s].callback&&(t[s].callback=o)}return new T(t,A)},Zt.animate=function(t,A,n,o){var r=this;if(r.removed)return o&&o.call(r),r;var i=t instanceof T?t:e.animation(t,A,n,o);return h(i,r,i.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var A,n,o=[],r=0;if(null!=e)return h(t,this,-1,F(e,1)),this;for(A=re.length;r1)for(var n=0,o=A.length;n.5)-1;s(M-.5,2)+s(u-.5,2)>.25&&(u=r.sqrt(.25-s(M-.5,2))*o+.5)&&.5!=u&&(u=u.toFixed(5)-1e-5*o)}return g}),o=o.split(/\s*\-\s*/),"linear"==c){var N=o.shift();if(N=-n(N),isNaN(N))return null;var f=[0,0,r.cos(t.rad(N)),r.sin(t.rad(N))],w=1/(i(a(f[2]),a(f[3]))||1);f[2]*=w,f[3]*=w,f[2]<0&&(f[0]=-f[2],f[2]=0),f[3]<0&&(f[1]=-f[3],f[3]=0)}var C=t._parseDots(o);if(!C)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(I.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){p=T(c+"Gradient",{id:l}),e.gradient=p,T(p,"radial"==c?{fx:M,fy:u}:{x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientTransform:e.matrix.invert()}),I.defs.appendChild(p);for(var y=0,D=C.length;y1?U.opacity/100:U.opacity});case"stroke":U=t.getRGB(I),s.setAttribute(d,U.hex),"stroke"==d&&U[e]("opacity")&&T(s,{"stroke-opacity":U.opacity>1?U.opacity/100:U.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&f(n,n._.arrows.startString),"endString"in n._.arrows&&f(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=A(I).charAt())&&h(n,I);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&T(s,{"stroke-opacity":I>1?I/100:I});case"fill-opacity":if(l.gradient){S=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,g)),S&&(v=S.getElementsByTagName("stop"),T(v[v.length-1],{"stop-opacity":I}));break}default:"font-size"==d&&(I=o(I,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=I,n._.dirty=1,s.setAttribute(d,I)}}x(n,r),s.style.visibility=M},D=1.2,x=function(n,r){if("text"==n.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var i=n.attrs,a=n.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,g).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(i.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,l=A(r.text).split("\n"),M=[],u=0,d=l.length;u"));var Z=X.getBoundingClientRect();p.W=M.w=(Z.right-Z.left)/W,p.H=M.h=(Z.bottom-Z.top)/W,p.X=M.x,p.Y=M.y+p.H/2,("x"in s||"y"in s)&&(p.path.v=t.format("m{0},{1}l{2},{1}",r(M.x*N),r(M.y*N),r(M.x*N)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(A=o.sqrt(.25-a(e-.5,2))*(2*(A>.5)-1)+.5),c=e+u+A),d}),r=r.split(/\s*\-\s*/),"linear"==s){var l=r.shift();if(l=-n(l),isNaN(l))return null}var g=t._parseDots(r);if(!g)return null;if(e=e.shape||e.node,g.length){e.removeChild(i),i.on=!0,i.method="none",i.color=g[0].color,i.color2=g[g.length-1].color;for(var M=[],I=0,T=g.length;I')}}catch(t){j=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),A=e.container,n=e.height,o=e.width,r=e.x,i=e.y;if(!A)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),c=s.style;return r=r||0,i=i||0,o=o||512,n=n||342,a.width=o,a.height=n,o==+o&&(o+="px"),n==+n&&(n+="px"),a.coordsize=1e3*N+u+1e3*N,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,n),1==A?(t._g.doc.body.appendChild(s),c.left=r+"px",c.top=i+"px",c.position="absolute"):A.firstChild?A.insertBefore(s,A.firstChild):A.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var m=t.st;for(var U in Q)Q[e](U)&&!m[e](U)&&(m[U]=function(t){return function(){var e=arguments;return this.forEach(function(A){A[t].apply(A,e)})}}(U))}}.apply(e,n),!(void 0!==o&&(t.exports=o))}])})},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A1&&(o=(t+1)/2),n.splice(o,1),2===n.length)n=e.connection._buildStraightLinePathInfo();else{var r=n[1],i=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=n[0];a[1]=i.x,a[2]=i.y;var s=n[n.length-2],c=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),l=n[n.length-1];l[1]=c.x,l[2]=c.y}e.path.attr("path",n),e.remove()});var M=function(n,o){e.context.snapto&&(n-=n%10,o-=o%10);var a=this.ox+n,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),i=Math.round(t/2);var c=e.path.attr("path"),l=c.length,g=void 0,M=void 0,u=void 0,d=2*(A.length-1)-1;if(0===t||1===t){if(u=c[1],g=e.connection._buildFromFigureIntersetion({x:u[1],y:u[2]},!0),M=A[0],2===A.length){var I=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(I){var T=A[A.length-1];T[1]=I.x,T[2]=I.y}}}else d!==t&&d!==t+1&&d!==t+2||(u=c[l-2],g=e.connection._buildToFigureIntersetion({x:a,y:s},!0),M=A[A.length-1]);g&&(M[1]=g.x,M[2]=g.y);var h=[];A.forEach(function(t,e){r?e===i?h.push(["L",a,s]):h.push(t):(h.push(t),e===i&&h.push(["L",a,s]))}),e.path.attr("path",h),e.connection._buildText()}},u=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),A=this.oldConnectionPathInfo,n=e.connection.uuid;e.context.addRedoUndo({redo:function(){var A=e.context.getNodeByUUID(n);A.pathInfo=t,A.updatePath(),A._buildText()},undo:function(){var t=e.context.getNodeByUUID(n);t.pathInfo=A,t.updatePath(),t._buildText()}})};this.rect.drag(M,u,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e){"use strict";function A(t){var e=i("消息提示",t);e.modal("show")}function n(t,e){var A=i("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);A.modal("show")}function o(t,e,A){var n=i(t,e,[{name:"确认",click:function(){A.call(this)}}]);n.modal("show")}function r(t,e,A,n,o){var r=i(t,e,A,o);if(r.modal("show"),n){var a=!0,s=!1,c=void 0;try{for(var l,g=n[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var M=l.value;r.on(M.name,M.callback)}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}}}function i(t,e,A,n){var o=this,r="modal-dialog"+(n?" modal-lg":""),i=$(''),s=$('
');i.append(s);var c=$(''),A.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
'),A.append(this.nodeToolbar),this.canvasContainer=$('
'),this.canvasContainer.css("height",$(window).height()-100),A.append(this.canvasContainer),this.context=new l.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var n="_prop_container",o=$('
');this.canvasContainer.append(o);var i=$('');o.append(i),i.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
');var a=$('
');a.append('
属性值修改后,请回车以确认
'),a.append(this.propContainer),o.append(a),o.draggable();var c=$("#__prop_panel_tool__");c.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(c.removeClass("glyphicon-circle-arrow-left"),c.addClass("glyphicon-circle-arrow-down")):(c.removeClass("glyphicon-circle-arrow-down"),c.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return i(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void p.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void p.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void p.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),A=t.x,n=t.y,o=t.width,r=t.height,i=t.name;A=parseInt(A),n=parseInt(n),o=parseInt(o),r=parseInt(r);var a=A+o+10,s=n+r+10;this.context.resizePaper(a+50,s+50);var c=e._newNodeInstance(A,n,i);c.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(A){17===A.which&&(e=!0),e&&(90===A.which?t.context.undoManager.undo():89===A.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;M.eventEmitter.on(M.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_buildTools",value:function(){var t=this,e=this.context,A=this,n=!0,o=!1,r=void 0;try{for(var i,a=function(){var e=i.value,A=$('");A.click(function(){e.click.call(this)}),t.toolbar.append(A)},s=this.buttons[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)a()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,A.nodeToolbar.children("label").removeClass("active")});var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,A.nodeToolbar.children("label").removeClass("active")});var g=$('');this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.undo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.redo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.SNAPTO_SELECTED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.REMOVE_CLICKED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.ALIGN_CENTER),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.ALIGN_MIDDLE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.UNIFY_SIZE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,A=!1,n=void 0;try{for(var o,r=function(){var e=o.value,A=$('\n \n ");t.nodeToolbar.append(A),A.click(function(){M.eventEmitter.emit(M.TRIGGER_TOOL,e.getType())})},i=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0)r()}catch(t){A=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(A)throw n}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;M.eventEmitter.on(M.OBJECT_SELECTED,function(A){if(t.propContainer.empty(),A instanceof d.default){var n=A.name||A.text.attr("text"),o=$('
'),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=!1,a=!0,s=!1,c=void 0;try{for(var l,g=e.context.allFigures[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var M=l.value;if(M instanceof d.default&&M!==A&&M.name===n){i=!0;break}}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}return i?void p.alert("节点名已存在!"):(A.name=n,A.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t.text.attr("text",n)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(A._tool.getPropertiesProducer().call(A))}else if(A instanceof T.default){var i=$('
'),a=$('');i.append(a),t.propContainer.append(i),a.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=A.from.fromConnections,a=!1,s=!0,c=!1,l=void 0;try{for(var g,M=i[Symbol.iterator]();!(s=(g=M.next()).done);s=!0){var u=g.value;if(u!==A&&u.name===n){a=!0;break}}}catch(t){c=!0,l=t}finally{try{!s&&M.return&&M.return()}finally{if(c)throw l}}return a?void p.alert("连线名已存在"):(A.name=n,A._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
'),c=$('');s.append(c),c.val(A.type),c.change(function(t){var n=$(this).val(),o=A.uuid,r=A.type;A.type=n,A.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=n,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(A.from._tool.getConnectionPropertiesProducer().call(A))}}),M.eventEmitter.on(M.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),M.eventEmitter.emit(M.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(p.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,A=!1,n=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var i=o.value;if(i instanceof d.default){var a=i.validate();a&&t.push(a)}}}catch(t){A=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(A)throw n}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
"}),s='错误:
'+s+"
",p.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,A){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,A){var n=A(254);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+A(255)+");src:url("+A(255)+") format('embedded-opentype'),url("+A(256)+") format('woff'),url("+A(257)+") format('truetype'),url("+A(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""]); +},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="; +},function(t,e,A){var n=A(260);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+A(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,A){A(263),A(264),A(265),A(266),A(267),A(268),A(269),A(270),A(271),A(272),A(273),A(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var A in e)if(void 0!==t.style[A])return{end:e[A]};return!1}t.fn.emulateTransitionEnd=function(e){var A=!1,n=this;t(this).one("bsTransitionEnd",function(){A=!0});var o=function(){A||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.alert");o||A.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(A)})}var A='[data-dismiss="alert"]',n=function(e){t(e).on("click",A,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function A(){i.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=t("#"===r?[]:r);e&&e.preventDefault(),i.length||(i=o.closest(".alert")),i.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",A).emulateTransitionEnd(n.TRANSITION_DURATION):A())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",A,n.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new A(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.isLoading=!1};A.VERSION="3.3.7",A.DEFAULTS={loadingText:"loading..."},A.prototype.setState=function(e){var A="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(A).attr(A,A).prop(A,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(A).removeAttr(A).prop(A,!1))},this),0)},A.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var A=this.$element.find("input");"radio"==A.prop("type")?(A.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==A.prop("type")&&(A.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),A.prop("checked",this.$element.hasClass("active")),t&&A.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=A,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(A){var n=t(A.target).closest(".btn");e.call(n,"toggle"),t(A.target).is('input[type="radio"], input[type="checkbox"]')||(A.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e),i="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new A(this,r)),"number"==typeof e?o.to(e):i?o[i]():r.interval&&o.pause().cycle()})}var A=function(e,A){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=A,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};A.VERSION="3.3.7",A.TRANSITION_DURATION=600,A.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},A.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},A.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},A.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},A.prototype.getItemForDirection=function(t,e){var A=this.getItemIndex(e),n="prev"==t&&0===A||"next"==t&&A==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(A+o)%this.$items.length;return this.$items.eq(r)},A.prototype.to=function(t){var e=this,A=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):A==t?this.pause().cycle():this.slide(t>A?"next":"prev",this.$items.eq(t))},A.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},A.prototype.next=function(){if(!this.sliding)return this.slide("next")},A.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},A.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),i=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var g=t(this.$indicators.children()[this.getItemIndex(r)]);g&&g.addClass("active")}var M=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(M)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(M)),i&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=A,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(A){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var i=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(i.interval=!1),e.call(r,i),a&&r.data("bs.carousel").to(a),A.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var A=t(this);e.call(A,A.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A,n=e.attr("data-target")||(A=e.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function A(e){return this.each(function(){var A=t(this),o=A.data("bs.collapse"),r=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||A.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(A.call(o,"hide"),e||o.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[i](this.$element[0][s])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var A=this.dimension();this.$element[A](this.$element[A]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[A](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(A,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var A=t.hasClass("in");t.attr("aria-expanded",A),e.toggleClass("collapsed",!A).attr("aria-expanded",A)};var o=t.fn.collapse;t.fn.collapse=A,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),i=r.data("bs.collapse"),a=i?"toggle":o.data();A.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A=e.attr("data-target");A||(A=e.attr("href"),A=A&&/#[A-Za-z]/.test(A)&&A.replace(/.*(?=#[^\s]*$)/,""));var n=A&&t(A);return n&&n.length?n:e.parent()}function A(A){A&&3===A.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(A&&"click"==A.type&&/input|textarea/i.test(A.target.tagName)&&t.contains(o[0],A.target)||(o.trigger(A=t.Event("hide.bs.dropdown",r)),A.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var A=t(this),n=A.data("bs.dropdown");n||A.data("bs.dropdown",n=new i(this)),"string"==typeof e&&n[e].call(A)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};i.VERSION="3.3.7",i.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),i=r.hasClass("open");if(A(),!i){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",A);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(A){if(/(38|40|27|32)/.test(A.which)&&!/input|textarea/i.test(A.target.tagName)){var n=t(this);if(A.preventDefault(),A.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),i=o.hasClass("open");if(!i&&27!=A.which||i&&27==A.which)return 27==A.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var c=s.index(A.target);38==A.which&&c>0&&c--,40==A.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},A.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},A.prototype.init=function(e,A,n){if(this.enabled=!0,this.type=e,this.$element=t(A),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var i=o[r];if("click"==i)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=i){var a="hover"==i?"mouseenter":"focusin",s="hover"==i?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},A.prototype.getDelegateOptions=function(){var e={},A=this.getDefaults();return this._options&&t.each(this._options,function(t,n){A[t]!=n&&(e[t]=n)}),e},A.prototype.enter=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusin"==e.type?"focus":"hover"]=!0),A.tip().hasClass("in")||"in"==A.hoverState?void(A.hoverState="in"):(clearTimeout(A.timeout),A.hoverState="in",A.options.delay&&A.options.delay.show?void(A.timeout=setTimeout(function(){"in"==A.hoverState&&A.show()},A.options.delay.show)):A.show())},A.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},A.prototype.leave=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusout"==e.type?"focus":"hover"]=!1),!A.isInStateTrue())return clearTimeout(A.timeout),A.hoverState="out",A.options.delay&&A.options.delay.hide?void(A.timeout=setTimeout(function(){"out"==A.hoverState&&A.hide()},A.options.delay.hide)):A.hide()},A.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,c=s.test(a);c&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),g=r[0].offsetWidth,M=r[0].offsetHeight;if(c){var u=a,d=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+M>d.bottom?"top":"top"==a&&l.top-Md.width?"left":"left"==a&&l.left-gi.top+i.height&&(o.top=i.top+i.height-s)}else{var c=e.left-r,l=e.left+r+A;ci.right&&(o.left=i.left+i.width-l)}return o},A.prototype.getTitle=function(){var t,e=this.$element,A=this.options;return t=e.attr("data-original-title")||("function"==typeof A.title?A.title.call(e[0]):A.title)},A.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},A.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},A.prototype.enable=function(){this.enabled=!0},A.prototype.disable=function(){this.enabled=!1},A.prototype.toggleEnabled=function(){this.enabled=!this.enabled},A.prototype.toggle=function(e){var A=this;e&&(A=t(e.currentTarget).data("bs."+this.type),A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A))),e?(A.inState.click=!A.inState.click,A.isInStateTrue()?A.enter(A):A.leave(A)):A.tip().hasClass("in")?A.leave(A):A.enter(A)},A.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=A,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new A(this,r)),"string"==typeof e&&o[e]())})}var A=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");A.VERSION="3.3.7",A.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),A.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),A.prototype.constructor=A,A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),A=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof A?"html":"append":"text"](A),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},A.prototype.hasContent=function(){return this.getTitle()||this.getContent()},A.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=A,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(A,n){this.$body=t(document.body),this.$scrollElement=t(t(A).is(document.body)?window:A),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function A(A){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof A&&A;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof A&&o[A]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,A="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(A="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){ +var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[A]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,A=this.getScrollHeight(),n=this.options.offset+A-this.$scrollElement.height(),o=this.offsets,r=this.targets,i=this.activeTarget;if(this.scrollHeight!=A&&this.refresh(),e>=n)return i!=(t=r[r.length-1])&&this.activate(t);if(i&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var i=n.find("> .active"),a=o&&t.support.transition&&(i.length&&i.hasClass("fade")||!!n.find("> .fade").length);i.length&&a?i.one("bsTransitionEnd",r).emulateTransitionEnd(A.TRANSITION_DURATION):r(),i.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=A,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(A){A.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new A(this,r)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.options=t.extend({},A.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};A.VERSION="3.3.7",A.RESET="affix affix-top affix-bottom",A.DEFAULTS={offset:0,target:window},A.prototype.getState=function(t,e,A,n){var o=this.$target.scrollTop(),r=this.$element.offset(),i=this.$target.height();if(null!=A&&"top"==this.affixed)return o=t-n&&"bottom"},A.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(A.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},A.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},A.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,i=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(i,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),c=t.Event(s+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(A.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=A,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var A=t(this),n=A.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(A,n)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var A=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,n,o=t(this),r=A.handle?t(A.handle,o):o;r.on({mousedown:function(r){var i=r.target,a="",s=!1;if(i&&(a=i.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===i.tagName||"INPUT"===i.tagName||i&&"presentation"===t(i).attr("role")||A.exclude&&~t.inArray(r.target,t(A.exclude,o)))){var c=o.offset();e=r.pageX-c.left,n=r.pageY-c.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-n,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A0&&i.push(g)}else{var T=g.rect,h=T.getBBox();(h.x>=A.x&&h.x<=A.x2||h.x2>=A.x&&h.x2<=A.x2)&&(h.y>=A.y&&h.y<=A.y2||h.y2>=A.y&&h.y2<=A.y2)&&s.push(g)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):i.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var n=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,A),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof g.default||e instanceof c.default)){var A=t.offsetX,n=t.offsetY,r=e._newNodeInstance(A,n);r&&!function(){var t=r.uuid,i=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(A,n,i),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof g.default){var e=o.currentConnection;if(e){var A=t.offsetX,n=t.offsetY;e.endX=A,e.endY=n,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);eA&&this.container.width(t+10),e>n&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,A){t||(t=e),e instanceof E.default&&e.select()}),t&&f.eventEmitter.emit(f.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),f.eventEmitter.emit(f.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return u.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),A=this.allFigures.indexOf(e);this.allFigures.splice(A,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;f.eventEmitter.on(f.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),f.eventEmitter.on(f.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,A){var n=e.toJSON(),o=e.uuid,r=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,A=t.to.uuid,i=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(A),s=new E.default(i,{x:i.rect.attr("x"),y:i.rect.attr("y")});i.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(n)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var A=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=A._newNodeInstance(10,10,"");t&&(t.initFromJson(n),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),f.eventEmitter.on(f.ALIGN_CENTER,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var M={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(e=g.rect.attr("x"),n=g.rect.attr("width"),e+=n/2):g.moveTo(e,A),M.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,M),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.ALIGN_MIDDLE,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var M={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(A=g.rect.attr("y"),n=g.rect.attr("height"),A+=n/2):g.moveTo(e,A),M.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,M),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.UNIFY_SIZE,function(){var e=void 0,A=void 0,n=new Map,o=0,r=!0,i=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(l instanceof E.default)break;var g={oldWH:{w:l.rect.attr("width"),h:l.rect.attr("height")}};0===o?(e=l.rect.attr("width"),A=l.rect.attr("height")):l.changeSize(e,A),g.newWH={w:l.rect.attr("width"),h:l.rect.attr("height")},n.set(l.uuid,g),o++}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=M.getNodeByUUID(i),s=n.get(i),c=s.newWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=M.getNodeByUUID(i),s=n.get(i),c=s.oldWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new I.default,this.connectionTool=new h.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,A){var n;!function(){"use strict";function o(t,e,A){return t.splice(e,!A||1+A-e+(!(A<0^e>=0)&&(A<0||-1)*t.length)),t.length}var r=function(){var t,e,A=[],n=-1,r=0,i=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(i=!0,t[e](),i=!1,this):this},{add:function(e){return i?this:(A.splice(n+1,A.length-n),A.push(e),r&&A.length>r&&o(A,0,-(r+1)),n=A.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=A[n];return o?(e(o,"undo"),n-=1,t&&t(),this):this},redo:function(){var o=A[n+1];return o?(e(o,"redo"),n+=1,t&&t(),this):this},clear:function(){var e=A.length;A=[],n=-1,t&&e>0&&t()},hasUndo:function(){return n!==-1},hasRedo:function(){return n>>((3&e)<<3)&255;return A},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=A(284).randomBytes;d=M=t&&function(){return t(16)},M()}catch(t){}}function s(t,e,A){var n=e&&A||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=p[t])});o<16;)e[n+o++]=0;return e}function c(t,e){var A=e||0,n=h;return n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]}function l(t,e,A){var n=e&&A||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,i=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=i-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||i>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=i,y=a,w=r,i+=122192928e5;var l=(1e4*(268435455&i)+a)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var g=i/4294967296*1e4&268435455;o[n++]=g>>>8&255,o[n++]=255&g,o[n++]=g>>>24&15|16,o[n++]=g>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var M=t.node||f,u=0;u<6;u++)o[n+u]=M[u];return e?e:c(o)}function g(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new T(16):null,t=null),t=t||{};var o=t.random||(t.rng||M)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[n+r]=o[r];return e||c(o)}var M,u,d,I;r?i():a();for(var T="function"==typeof o?o:Array,h=[],p={},E=0;E<256;E++)h[E]=(E+256).toString(16).substr(1),p[h[E]]=E;var N=M(),f=[1|N[0],N[1],N[2],N[3],N[4],N[5]],w=16383&(N[6]<<8|N[7]),C=0,y=0,D=g;D.v1=l,D.v4=g,D.parse=s,D.unparse=c,D.BufferClass=T,D._rng=M,D._mathRNG=u,D._nodeRNG=d,D._whatwgRNG=I,"undefined"!=typeof t&&t.exports?t.exports=D:(n=function(){return D}.call(e,A,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,A(280).Buffer)},function(t,e,A){(function(t,n){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,A){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function T(e){return+e!=e&&(e=0),t.alloc(+e)}function h(e,A){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(A){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;A=(""+A).toLowerCase(),o=!0}}function p(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if(A>>>=0,e>>>=0,A<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,A);case"utf8":case"utf-8":return b(this,e,A);case"ascii":return j(this,e,A);case"latin1":case"binary":return m(this,e,A);case"base64":return L(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function N(e,A,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof A&&(A=t.from(A,o)),t.isBuffer(A))return 0===A.length?-1:f(e,A,n,o,r);if("number"==typeof A)return A&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,A,n):Uint8Array.prototype.lastIndexOf.call(e,A,n):f(e,[A],n,o,r);throw new TypeError("val must be string, number or Buffer")}function f(t,e,A,n,o){function r(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,A/=2}var c;if(o){var l=-1;for(c=A;ca&&(A=a-s),c=A;c>=0;c--){for(var g=!0,M=0;Mo&&(n=o)):n=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(o+a<=A){var s,c,l,g;switch(a){case 1:r<128&&(i=r);break;case 2:s=t[o+1],128===(192&s)&&(g=(31&r)<<6|63&s,g>127&&(i=g));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(g=(15&r)<<12|(63&s)<<6|63&c,g>2047&&(g<55296||g>57343)&&(i=g));break;case 4:s=t[o+1],c=t[o+2],l=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&l)&&(g=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&l,g>65535&&g<1114112&&(i=g))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return Q(n)}function Q(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var A="",n=0;nn)&&(A=n);for(var o="",r=e;rA)throw new RangeError("Trying to access beyond buffer length")}function z(e,A,n,o,r,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>r||Ae.length)throw new RangeError("Index out of range")}function Y(t,e,A,n){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-A,2);o>>8*(n?o:1-o)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-A,4);o>>8*(n?o:3-o)&255}function R(t,e,A,n,o,r){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function F(t,e,A,n,o){return o||R(t,e,A,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,A,n,23,4),A+4}function O(t,e,A,n,o){return o||R(t,e,A,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,A,n,52,8),A+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var A,n=t.length,o=null,r=[],i=0;i55295&&A<57344){if(!o){if(A>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=A;continue}if(A<56320){(e-=3)>-1&&r.push(239,191,189),o=A;continue}A=(o-55296<<10|A-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,A<128){if((e-=1)<0)break;r.push(A)}else if(A<2048){if((e-=2)<0)break;r.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;r.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return r}function X(t){for(var e=[],A=0;A>8,o=A%256,r.push(o),r.push(n);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,A,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+A]=t[o];return o}function K(t){return t!==t}var _=A(281),q=A(282),$=A(283);e.Buffer=t,e.SlowBuffer=T,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,A){return a(null,t,e,A)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,A){return c(null,t,e,A)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,A){if(!t.isBuffer(e)||!t.isBuffer(A))throw new TypeError("Arguments must be Buffers");if(e===A)return 0;for(var n=e.length,o=A.length,r=0,i=Math.min(n,o);r0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),""},t.prototype.compare=function(e,A,n,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===A&&(A=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),A<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index"); +if(o>=r&&A>=n)return 0;if(o>=r)return-1;if(A>=n)return 1;if(A>>>=0,n>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var i=r-o,a=n-A,s=Math.min(i,a),c=this.slice(o,r),l=e.slice(A,n),g=0;go)&&(A=o),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return w(this,t,e,A);case"utf8":case"utf-8":return C(this,t,e,A);case"ascii":return y(this,t,e,A);case"latin1":case"binary":return D(this,t,e,A);case"base64":return x(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,A);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,A){var n=this.length;e=~~e,A=void 0===A?n:~~A,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),A<0?(A+=n,A<0&&(A=0)):A>n&&(A=n),A0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||v(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||v(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||v(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=this[t],o=1,r=0;++r=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=e,o=1,r=this[t+--n];n>0&&(o*=256);)r+=this[t+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||v(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||v(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt16BE=function(t,e){e||v(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt32LE=function(t,e){return e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,A,n){if(t=+t,e|=0,A|=0,!n){var o=Math.pow(2,8*A)-1;z(this,t,e,A,o,0)}var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+A},t.prototype.writeUInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[A]=255&e,A+1},t.prototype.writeUInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeUInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeUInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e):k(this,e,A,!0),A+4},t.prototype.writeUInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=0,i=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+A},t.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=A-1,i=1,a=0;for(this[e+r]=255&t;--r>=0&&(i*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/i>>0)-a&255;return e+A},t.prototype.writeInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[A]=255&e,A+1},t.prototype.writeInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24):k(this,e,A,!0),A+4},t.prototype.writeInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeFloatLE=function(t,e,A){return F(this,t,e,!0,A)},t.prototype.writeFloatBE=function(t,e,A){return F(this,t,e,!1,A)},t.prototype.writeDoubleLE=function(t,e,A){return O(this,t,e,!0,A)},t.prototype.writeDoubleBE=function(t,e,A){return O(this,t,e,!1,A)},t.prototype.copy=function(e,A,n,o){if(n||(n=0),o||0===o||(o=this.length),A>=e.length&&(A=e.length),A||(A=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-A=0;--r)e[r+A]=this[r+n];else if(i<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var i;if("number"==typeof e)for(i=A;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-A(t)}function o(t){var e,n,o,r,i,a,s=t.length;i=A(t),a=new l(3*s/4-i),o=i>0?s-4:s;var g=0;for(e=0,n=0;e>16&255,a[g++]=r>>8&255,a[g++]=255&r;return 2===i?(r=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[g++]=255&r):1===i&&(r=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[g++]=r>>8&255,a[g++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function i(t,e,A){for(var n,o=[],i=e;il?l:c+a));return 1===n?(e=t[A-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,u=g.length;M>1,l=-7,g=A?o-1:0,M=A?-1:1,u=t[e+g];for(g+=M,r=u&(1<<-l)-1,u>>=-l,l+=a;l>0;r=256*r+t[e+g],g+=M,l-=8);for(i=r&(1<<-l)-1,r>>=-l,l+=n;l>0;i=256*i+t[e+g],g+=M,l-=8);if(0===r)r=1-c;else{if(r===s)return i?NaN:(u?-1:1)*(1/0);i+=Math.pow(2,n),r-=c}return(u?-1:1)*i*Math.pow(2,r-n)},e.write=function(t,e,A,n,o,r){var i,a,s,c=8*r-o-1,l=(1<>1,M=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,u=n?0:r-1,d=n?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),e+=i+g>=1?M/s:M*Math.pow(2,1-g),e*s>=2&&(i++,s/=2),i+g>=l?(a=0,i=l):i+g>=1?(a=(e*s-1)*Math.pow(2,o),i+=g):(a=e*Math.pow(2,g-1)*Math.pow(2,o),i=0));o>=8;t[A+u]=255&a,u+=d,a/=256,o-=8);for(i=i<0;t[A+u]=255&i,u+=d,i/=256,c-=8);t[A+u-d]|=128*I}},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var A in t)e(t[A],A)}var r=A(285);e.createHash=A(287),e.createHmac=A(299),e.randomBytes=function(e,A){if(!A||!A.call)return new t(r(e));try{A.call(this,void 0,new t(r(e)))}catch(t){A(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var i=A(300)(e);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,A(280).Buffer)},function(t,e,A){(function(e,n){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||A(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),A(280).Buffer)},function(t,e){},function(t,e,A){(function(e){function n(t){return function(){var A=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),A.push(t),this},digest:function(n){var o=e.concat(A),r=t(o);return A=null,n?r.toString(n):r}};return n}}var o=A(288),r=n(A(296)),i=n(A(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new i:o(t)}}).call(e,A(280).Buffer)},function(t,e,A){var e=t.exports=function(t){var A=e[t];if(!A)throw new Error(t+" is not supported (we accept pull requests)");return new A},n=A(280).Buffer,o=A(289)(n);e.sha1=A(290)(n,o),e.sha256=A(294)(n,o),e.sha512=A(295)(n,o)},function(t,e){t.exports=function(t){function e(e,A){this._block=new t(e),this._finalSize=A,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,A){"string"==typeof e&&(A=A||"utf8",e=new t(e,A));for(var n=this._len+=e.length,o=this._s=this._s||0,r=0,i=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var A=this._update(this._block)||this._hash();return t?A.toString(t):A},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){return d.length?d.pop().init():this instanceof A?(this._w=u,e.call(this,64,56),this._h=null,void this.init()):new A}function o(t,e,A,n){return t<20?e&A|~e&n:t<40?e^A^n:t<60?e&A|e&n|A&n:e^A^n}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function i(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,c=4,l=8,g=12,M=16,u=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(A,e),A.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},A.prototype._POOL=d,A.prototype._update=function(t){var e,A,n,s,c,l,g,M,u,d;e=l=this._a,A=g=this._b,n=M=this._c,s=u=this._d,c=d=this._e;for(var I=this._w,T=0;T<80;T++){var h=I[T]=T<16?t.readInt32BE(4*T):a(I[T-3]^I[T-8]^I[T-14]^I[T-16],1),p=i(i(a(e,5),o(T,A,n,s)),i(i(c,h),r(T)));c=s,s=n,n=a(A,30),A=e,e=p}this._a=i(e,l),this._b=i(A,g),this._c=i(n,M),this._d=i(s,u),this._e=i(c,d)},A.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,g),e.writeInt32BE(0|this._e,M),e},A}},function(t,e,A){(function(t,n){function o(t,A){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),I(A)?n.showHidden=A:A&&e._extend(n,A),f(n.showHidden)&&(n.showHidden=!1),f(n.depth)&&(n.depth=2),f(n.colors)&&(n.colors=!1),f(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=r),s(n,t,n.depth)}function r(t,e){var A=o.styles[e];return A?"["+o.colors[A][0]+"m"+t+"["+o.colors[A][1]+"m":t}function i(t,e){return t}function a(t){var e={};return t.forEach(function(t,A){e[t]=!0}),e}function s(t,A,n){if(t.customInspect&&A&&x(A.inspect)&&A.inspect!==e.inspect&&(!A.constructor||A.constructor.prototype!==A)){var o=A.inspect(n,t);return E(o)||(o=s(t,o,n)),o}var r=c(t,A);if(r)return r;var i=Object.keys(A),I=a(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(A)),D(A)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return l(A);if(0===i.length){if(x(A)){var T=A.name?": "+A.name:"";return t.stylize("[Function"+T+"]","special")}if(w(A))return t.stylize(RegExp.prototype.toString.call(A),"regexp");if(y(A))return t.stylize(Date.prototype.toString.call(A),"date");if(D(A))return l(A)}var h="",p=!1,N=["{","}"];if(d(A)&&(p=!0,N=["[","]"]),x(A)){var f=A.name?": "+A.name:"";h=" [Function"+f+"]"}if(w(A)&&(h=" "+RegExp.prototype.toString.call(A)),y(A)&&(h=" "+Date.prototype.toUTCString.call(A)),D(A)&&(h=" "+l(A)),0===i.length&&(!p||0==A.length))return N[0]+h+N[1];if(n<0)return w(A)?t.stylize(RegExp.prototype.toString.call(A),"regexp"):t.stylize("[Object]","special");t.seen.push(A);var C;return C=p?g(t,A,n,I,i):i.map(function(e){return M(t,A,n,I,e,p)}),t.seen.pop(),u(C,h,N)}function c(t,e){if(f(e))return t.stylize("undefined","undefined");if(E(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return p(e)?t.stylize(""+e,"number"):I(e)?t.stylize(""+e,"boolean"):T(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,A,n,o){for(var r=[],i=0,a=e.length;i-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),f(i)){if(r&&o.match(/^\d+$/))return a;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+a}function u(t,e,A){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}function d(t){return Array.isArray(t)}function I(t){return"boolean"==typeof t}function T(t){return null===t}function h(t){return null==t}function p(t){return"number"==typeof t}function E(t){return"string"==typeof t}function N(t){return"symbol"==typeof t}function f(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===L(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===L(t)}function D(t){return C(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),v[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],A=0;A=r)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(t){return"[Circular]"}default:return t}}),a=n[A];A>>e|t<<32-e}function r(t,e){return t>>>e}function i(t,e,A){return t&e^~t&A}function a(t,e,A){return t&e^t&A^e&A}function s(t){return o(t,2)^o(t,13)^o(t,22)}function c(t){return o(t,6)^o(t,11)^o(t,25)}function l(t){return o(t,7)^o(t,18)^r(t,3)}function g(t){return o(t,17)^o(t,19)^r(t,10)}var M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=new Array(64);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,o,r,u,d,I,T,h,p=this._w;e=0|this._a,A=0|this._b,n=0|this._c,o=0|this._d,r=0|this._e,u=0|this._f,d=0|this._g,I=0|this._h;for(var E=0;E<64;E++){var N=p[E]=E<16?t.readInt32BE(4*E):g(p[E-2])+p[E-7]+l(p[E-15])+p[E-16];T=I+c(r)+i(r,u,d)+M[E]+N,h=s(e)+a(e,A,n),I=d,d=u,u=r,r=o+T,o=n,n=A,A=e,e=T+h}this._a=e+this._a|0,this._b=A+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=u+this._f|0,this._g=d+this._g|0,this._h=I+this._h|0},A.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},A}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,A){return t>>>A|e<<32-A}function r(t,e,A){return t&e^~t&A}function i(t,e,A){return t&e^t&A^e&A}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,s,c,l,g,M,u,d,I,T,h,p,E,N,f=this._w;e=0|this._a,A=0|this._b,n=0|this._c,s=0|this._d,c=0|this._e,l=0|this._f,g=0|this._g,M=0|this._h,u=0|this._al,d=0|this._bl,I=0|this._cl,T=0|this._dl,h=0|this._el,p=0|this._fl,E=0|this._gl,N=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=f[D]=t.readInt32BE(4*D),y=f[D+1]=t.readInt32BE(4*D+4);else{var x=f[D-30],B=f[D-30+1],L=o(x,B,1)^o(x,B,8)^x>>>7,b=o(B,x,1)^o(B,x,8)^o(B,x,7);x=f[D-4],B=f[D-4+1];var Q=o(x,B,19)^o(B,x,29)^x>>>6,j=o(B,x,19)^o(x,B,29)^o(B,x,6),m=f[D-14],U=f[D-14+1],S=f[D-32],v=f[D-32+1];y=b+U,C=L+m+(y>>>0>>0?1:0),y+=j,C=C+Q+(y>>>0>>0?1:0),y+=v,C=C+S+(y>>>0>>0?1:0),f[D]=C,f[D+1]=y}var z=i(e,A,n),Y=i(u,d,I),k=o(e,u,28)^o(u,e,2)^o(u,e,7),R=o(u,e,28)^o(e,u,2)^o(e,u,7),F=o(c,h,14)^o(c,h,18)^o(h,c,9),O=o(h,c,14)^o(h,c,18)^o(c,h,9),H=a[D],V=a[D+1],G=r(c,l,g),P=r(h,p,E),X=N+O,W=M+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

>>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+Y,Z=k+z+(J>>>0>>0?1:0);M=g,N=E,g=l,E=p,l=c,p=h,h=T+X|0,c=s+W+(h>>>0>>0?1:0)|0,s=n,T=I,n=A,I=d,A=e,d=u,u=X+J|0,e=W+Z+(u>>>0>>0?1:0)|0}this._al=this._al+u|0,this._bl=this._bl+d|0,this._cl=this._cl+I|0,this._dl=this._dl+T|0,this._el=this._el+h|0,this._fl=this._fl+p|0,this._gl=this._gl+E|0,this._hl=this._hl+N|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+A+(this._bl>>>0>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0>>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+c+(this._el>>>0>>0?1:0)|0,this._f=this._f+l+(this._fl>>>0

>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+M+(this._hl>>>0>>0?1:0)|0},A.prototype._hash=function(){function e(t,e,n){A.writeInt32BE(t,n),A.writeInt32BE(e,n+4)}var A=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),A},A}},function(t,e,A){function n(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var A=1732584193,n=-271733879,o=-1732584194,l=271733878,g=0;g>16)+(e>>16)+(A>>16);return n<<16|65535&A}function l(t,e){return t<>>32-e}var g=A(297);t.exports=function(t){return g.hash(t,n,16)}},function(t,e,A){(function(e){function A(t,A){if(t.length%r!==0){var n=t.length+(r-t.length%r);t=e.concat([t,i],n)}for(var o=[],a=A?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var A=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=I(t),o=8*t.length,r=8*t.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var i=0;i>>24)|4278255360&(a<<24|a>>>8)}var s=T(A);return new e(s)}t.exports=s;var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],u=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],I=function(t){ +for(var e=[],A=0,n=0;A>>5]|=t[A]<<24-n%32;return e},T=function(t){for(var e=[],A=0;A<32*t.length;A+=8)e.push(t[A>>>5]>>>24-A%32&255);return e},h=function(t,e,s){for(var I=0;I<16;I++){var T=s+I,h=e[T];e[T]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var p,E,N,f,w,C,y,D,x,B;C=p=t[0],y=E=t[1],D=N=t[2],x=f=t[3],B=w=t[4];for(var L,I=0;I<80;I+=1)L=p+e[s+c[I]]|0,L+=I<16?A(E,N,f)+u[0]:I<32?n(E,N,f)+u[1]:I<48?o(E,N,f)+u[2]:I<64?r(E,N,f)+u[3]:i(E,N,f)+u[4],L|=0,L=a(L,g[I]),L=L+w|0,p=w,w=f,f=a(N,10),N=E,E=L,L=C+e[s+l[I]]|0,L+=I<16?i(y,D,x)+d[0]:I<32?r(y,D,x)+d[1]:I<48?o(y,D,x)+d[2]:I<64?n(y,D,x)+d[3]:A(y,D,x)+d[4],L|=0,L=a(L,M[I]),L=L+B|0,C=B,B=x,x=a(D,10),D=y,y=L;L=t[1]+N+x|0,t[1]=t[2]+f+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+p+y|0,t[4]=t[0]+E+D|0,t[0]=L}}).call(e,A(280).Buffer)},function(t,e,A){(function(e){function n(t,A){if(!(this instanceof n))return new n(t,A);this._opad=s,this._alg=t;var i="sha512"===t?128:64;A=this._key=e.isBuffer(A)?A:new e(A),A.length>i?A=o(t).update(A).digest():A.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,a);for(var I=1;I0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case a.LOADED_DATA:var A=e.data;return Object.assign({},t.prototype,{data:A});case a.DEL:var n=e.index,r=[].concat(o(t.data));return r.splice(n,1),Object.assign({},t.prototype,{data:r});case a.ADD:var A=[].concat(o(t.data));return A.push({}),Object.assign({},t.prototype,{data:A})}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=A(310),a=n(i)},function(t,e){"use strict";function A(t){return function(e){$.ajax({url:window._server+"/clientconfig/loadData?project="+t,type:"POST",success:function(t){e({type:s,data:t})},error:function(t){t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function n(t,e){var A='',n=null,o=!0,r=!1,i=void 0;try{for(var a,s=t[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var c=a.value;if(!c.name){n="客户端名不能为空";break}if(!c.client){n="客户端地址不能为空";break}A+=''}}catch(t){r=!0,i=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw i}}return n?void bootbox.alert(n):(A+="",void $.ajax({url:window._server+"/clientconfig/save",type:"POST",data:{project:e,content:A},success:function(){bootbox.alert("保存成功!")},error:function(t){t&&401===t.status?alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("保存失败,服务端错误:"+t.responseText+""):bootbox.alert("保存失败,服务端出错")}}))}function o(t){return{type:a,index:t}}function r(){return{type:i}}Object.defineProperty(e,"__esModule",{value:!0}),e.loadData=A,e.save=n,e.del=o,e.add=r;var i=e.ADD="add",a=e.DEL="del",s=e.LOADED_DATA="loaded_data"},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{data:t.data||[]}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var A=0;A.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+A(4)+");src:url("+A(4)+"?#iefix) format('embedded-opentype'),url("+A(5)+") format('woff2'),url("+A(6)+") format('woff'),url("+A(7)+") format('truetype'),url("+A(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var A,n,o;if(e.singleton){var r=h++;A=T||(T=a(e)),n=l.bind(null,A,r,!1),o=l.bind(null,A,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=s(e),n=u.bind(null,A),o=function(){i(A),A.href&&URL.revokeObjectURL(A.href)}):(A=a(e),n=g.bind(null,A),o=function(){i(A)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function l(t,e,A,n){var o=A?"":n.css;if(t.styleSheet)t.styleSheet.cssText=N(e,o);else{var r=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(r,i[e]):t.appendChild(r)}}function g(t,e){var A=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=A;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(A))}}function u(t,e){var A=e.css,n=e.sourceMap;n&&(A+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([A],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var M={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},I=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),p=d(function(){return document.head||document.getElementsByTagName("head")[0]}),T=null,h=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=I()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var A=o(t);return n(A,e),function(t){for(var r=[],i=0;i1){for(var p=Array(I),T=0;T1){for(var E=Array(h),N=0;N>"),B={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:d(),objectOf:u,oneOf:g,oneOfType:M,shape:I};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var A="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=A},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,A){"use strict";function n(t){return r.isValidElement(t)?void 0:o("143"),t}var o=A(19),r=A(21);A(20);t.exports=n},function(t,e,A){"use strict";t.exports=A(42)},function(t,e,A){"use strict";var n=A(43),o=A(48),r=A(174),i=A(71),a=A(68),s=A(179),c=A(180),l=A(181),g=A(182);A(56);o.inject();var u={findDOMNode:c,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:g};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:n.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?n.getNodeFromInstance(t):null}},Mount:r,Reconciler:i});t.exports=u},function(t,e,A){"use strict";function n(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var A=n(t);A._hostNode=e,e[I]=A}function r(t){var e=t._hostNode;e&&(delete e[I],t._hostNode=null)}function i(t,e){if(!(t._flags&d.hasCachedChildNodes)){var A=t._renderedChildren,r=e.firstChild;t:for(var i in A)if(A.hasOwnProperty(i)){var a=A[i],s=n(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(M)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}l("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[I])return t[I];for(var e=[];!t[I];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var A,n;t&&(n=t[I]);t=e.pop())A=n,e.length&&i(n,t);return A}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?l("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:l("34"),t=t._hostParent;for(;e.length;t=e.pop())i(t,t._hostNode);return t._hostNode}var l=A(44),g=A(45),u=A(47),M=(A(46),g.ID_ATTRIBUTE_NAME),d=u,I="__reactInternalInstance$"+Math.random().toString(36).slice(2),p={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:i,precacheNode:o,uncacheNode:r};t.exports=p},function(t,e){"use strict";function A(t){for(var e=arguments.length-1,A="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,n=0;n8&&f<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,A,n){return[c(t,e,A,n),u(t,e,A,n)]}};t.exports=b},function(t,e,A){"use strict";function n(t,e,A){var n=e.dispatchConfig.phasedRegistrationNames[A];return T(t,n)}function o(t,e,A){var o=n(t,A,e);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function i(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,A=e?d.getParentInstance(e):null;d.traverseTwoPhase(A,o,t)}}function a(t,e,A){if(A&&A.dispatchConfig.registrationName){var n=A.dispatchConfig.registrationName,o=T(t,n);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){p(t,r)}function l(t){p(t,i)}function g(t,e,A,n){d.traverseEnterLeave(A,n,a,t,e)}function u(t){p(t,s)}var M=A(52),d=A(54),I=A(58),p=A(59),T=(A(56),M.getListener),h={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:u,accumulateEnterLeaveDispatches:g};t.exports=h},function(t,e,A){"use strict";function n(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,A){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!A.disabled||!n(e));default:return!1}}var r=A(44),i=A(53),a=A(54),s=A(55),c=A(58),l=A(59),g=(A(46),{}),u=null,M=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return M(t,!0)},I=function(t){return M(t,!1)},p=function(t){return"."+t._rootNodeID},T={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(t,e,A){"function"!=typeof A?r("94",e,typeof A):void 0;var n=p(t),o=g[e]||(g[e]={});o[n]=A;var a=i.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,A)},getListener:function(t,e){var A=g[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var n=p(t);return A&&A[n]},deleteListener:function(t,e){var A=i.registrationNameModules[e];A&&A.willDeleteListener&&A.willDeleteListener(t,e);var n=g[e];if(n){var o=p(t);delete n[o]}},deleteAllListeners:function(t){var e=p(t);for(var A in g)if(g.hasOwnProperty(A)&&g[A][e]){var n=i.registrationNameModules[A];n&&n.willDeleteListener&&n.willDeleteListener(t,A),delete g[A][e]}},extractEvents:function(t,e,A,n){for(var o,r=i.plugins,a=0;a-1?void 0:i("96",t),!c.plugins[A]){e.extractEvents?void 0:i("97",t),c.plugins[A]=e;var n=e.eventTypes;for(var r in n)o(n[r],e,r)?void 0:i("98",r,t)}}}function o(t,e,A){c.eventNameDispatchConfigs.hasOwnProperty(A)?i("99",A):void 0,c.eventNameDispatchConfigs[A]=t;var n=t.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];r(a,e,A)}return!0}return!!t.registrationName&&(r(t.registrationName,e,A),!0)}function r(t,e,A){c.registrationNameModules[t]?i("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[A].dependencies}var i=A(44),a=(A(46),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?i("101"):void 0,a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var A in t)if(t.hasOwnProperty(A)){var o=t[A];s.hasOwnProperty(A)&&s[A]===o||(s[A]?i("102",A):void 0,s[A]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var A=e.phasedRegistrationNames;for(var n in A)if(A.hasOwnProperty(n)){var o=c.registrationNameModules[A[n]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var A in e)e.hasOwnProperty(A)&&delete e[A];var n=c.registrationNameModules;for(var o in n)n.hasOwnProperty(o)&&delete n[o]}};t.exports=c},function(t,e,A){"use strict";function n(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function i(t,e,A,n){var o=t.type||"unknown-event";t.currentTarget=T.getNodeFromInstance(n),e?I.invokeGuardedCallbackWithCatch(o,A,t):I.invokeGuardedCallback(o,A,t),t.currentTarget=null}function a(t,e){var A=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(A))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},function(t,e,A){"use strict";var n=A(44),o=(A(46),function(t){var e=this;if(e.instancePool.length){var A=e.instancePool.pop();return e.call(A,t),A}return new e(t)}),r=function(t,e){var A=this;if(A.instancePool.length){var n=A.instancePool.pop();return A.call(n,t,e),n}return new A(t,e)},i=function(t,e,A){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e,A),o}return new n(t,e,A)},a=function(t,e,A,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,A,n),r}return new o(t,e,A,n)},s=function(t,e,A,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,A,n,o),i}return new r(t,e,A,n,o)},c=function(t){var e=this;t instanceof e?void 0:n("25"),t.destructor(),e.instancePool.length8));var S=!1;N.canUseDOM&&(S=D("input")&&(!document.documentMode||document.documentMode>11));var U={get:function(){return j.get.call(this)},set:function(t){Q=""+t,j.set.call(this,t)}},v={eventTypes:B,extractEvents:function(t,e,A,o){var r,i,a=e?f.getNodeFromInstance(e):window;if(n(a)?m?r=s:i=c:x(a)?S?r=M:(r=I,i=d):p(a)&&(r=T),r){var l=r(t,e);if(l){var g=C.getPooled(B.change,l,A,o);return g.type="change",E.accumulateTwoPhaseDispatches(g),g}}i&&i(t,a,e)}};t.exports=v},function(t,e,A){"use strict";function n(){B.ReactReconcileTransaction&&f?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=u.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function r(t,e,A,o,r,i){return n(),f.batchedUpdates(t,e,A,o,r,i)}function i(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==T.length?l("124",e,T.length):void 0,T.sort(i),h++;for(var A=0;A]/,s=A(91),c=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{n=n||document.createElement("div"),n.innerHTML=""+e+"";for(var A=n.firstChild;A.firstChild;)t.appendChild(A.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var A=t.firstChild;1===A.data.length?t.removeChild(A):A.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){"use strict";var A=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,n,o){MSApp.execUnsafeLocalFunction(function(){return t(e,A,n,o)})}:t};t.exports=A},function(t,e,A){"use strict";var n=A(60),o=A(93),r=A(90),i=function(t,e){if(e){var A=t.firstChild;if(A&&A===t.lastChild&&3===A.nodeType)return void(A.nodeValue=e)}t.textContent=e};n.canUseDOM&&("textContent"in document.documentElement||(i=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=i},function(t,e){"use strict";function A(t){var e=""+t,A=o.exec(e);if(!A)return e;var n,r="",i=0,a=0;for(i=A.index;i]/;t.exports=n},function(t,e,A){"use strict";var n=A(44),o=A(88),r=A(60),i=A(95),a=A(57),s=(A(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:n("56"),e?void 0:n("57"),"HTML"===t.nodeName?n("58"):void 0,"string"==typeof e){var A=i(e,a)[0];t.parentNode.replaceChild(A,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,A){"use strict";function n(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var A=c;c?void 0:s(!1);var o=n(t),r=o&&a(o);if(r){A.innerHTML=r[1]+t+r[2];for(var l=r[0];l--;)A=A.lastChild}else A.innerHTML=t;var g=A.getElementsByTagName("script");g.length&&(e?void 0:s(!1),i(g).forEach(e));for(var u=Array.from(A.childNodes);A.lastChild;)A.removeChild(A.lastChild);return u}var r=A(60),i=A(96),a=A(97),s=A(46),c=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,A){"use strict";function n(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),"function"==typeof t.callee?i(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var A=Array(e),n=0;n":i.innerHTML="<"+t+">",a[t]=!i.firstChild),a[t]?u[t]:null}var o=A(60),r=A(46),i=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],c=[1,"","
"],l=[3,"","
"],g=[1,'',""],u={"*":[1,"?

","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},M=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];M.forEach(function(t){u[t]=g,a[t]=!0}),t.exports=n},function(t,e,A){"use strict";var n=A(87),o=A(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var A=o.getNodeFromInstance(t);n.processUpdates(A,e)}};t.exports=r},function(t,e,A){"use strict";function n(t){if(t){var e=t._currentElement._owner||null;if(e){var A=e.getName();if(A)return" This DOM node was rendered by `"+A+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?I("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?I("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:I("61")),null!=e.style&&"object"!=typeof e.style?I("62",n(t)):void 0)}function r(t,e,A,n){if(!(n instanceof S)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;k(e,a),n.getReactMountReady().enqueue(i,{inst:t,registrationName:e,listener:A})}}function i(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function s(){var t=this;j.postMountWrapper(t)}function c(){var t=this;b.postMountWrapper(t)}function l(){var t=this;t._rootNodeID?void 0:I("63");var e=Y(t);switch(e?void 0:I("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var A in P)P.hasOwnProperty(A)&&t._wrapperState.listeners.push(D.trapBubbledEvent(A,P[A],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function g(){Q.postUpdateWrapper(this)}function u(t){_.call(K,t)||(Z.test(t)?void 0:I("65",t),K[t]=!0)}function M(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;u(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var I=A(44),p=A(16),T=A(100),h=A(102),E=A(88),N=A(89),f=A(45),w=A(110),C=A(52),y=A(53),D=A(112),x=A(47),B=A(43),L=A(115),b=A(118),Q=A(119),j=A(120),m=(A(74),A(121)),S=A(141),U=(A(57),A(93)),v=(A(46),A(77),A(130),A(144),A(56),x),z=C.deleteListener,Y=B.getNodeFromInstance,k=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=p({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,A,n){this._rootNodeID=q++,this._domID=A._idCounter++,this._hostParent=e,this._hostContainerInfo=A;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"option":b.mountWrapper(this,r,e),r=b.getHostProps(this,r);break;case"select":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"textarea":j.mountWrapper(this,r,e),r=j.getHostProps(this,r),t.getReactMountReady().enqueue(l,this)}o(this,r);var i,g;null!=e?(i=e._namespaceURI,g=e._tag):A._tag&&(i=A._namespaceURI,g=A._tag),(null==i||i===N.svg&&"foreignobject"===g)&&(i=N.html),i===N.html&&("svg"===this._tag?i=N.svg:"math"===this._tag&&(i=N.mathml)),this._namespaceURI=i;var u;if(t.useCreateElement){var M,d=A._ownerDocument;if(i===N.html)if("script"===this._tag){var I=d.createElement("div"),p=this._currentElement.type;I.innerHTML="<"+p+">",M=I.removeChild(I.firstChild)}else M=r.is?d.createElement(this._currentElement.type,r.is):d.createElement(this._currentElement.type);else M=d.createElementNS(i,this._currentElement.type);B.precacheNode(this,M),this._flags|=v.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(M),this._updateDOMProperties(null,r,t);var h=E(M);this._createInitialChildren(t,r,n,h),u=h}else{var f=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,n);u=!C&&X[this._tag]?f+"/>":f+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(T.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return u},_createOpenTagMarkupAndPutListeners:function(t,e){var A="<"+this._currentElement.type;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(R.hasOwnProperty(n))o&&r(this,n,o,t);else{n===O&&(o&&(o=this._previousStyleCopy=p({},e.style)),o=h.createMarkupForStyles(o,this));var i=null;null!=this._tag&&M(this._tag,e)?V.hasOwnProperty(n)||(i=w.createMarkupForCustomAttribute(n,o)):i=w.createMarkupForProperty(n,o),i&&(A+=" "+i)}}return t.renderToStaticMarkup?A:(this._hostParent||(A+=" "+w.createMarkupForRoot()),A+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,A){var n="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(n=o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)n=U(r);else if(null!=i){var a=this.mountChildren(i,t,A);n=a.join("")}}return W[this._tag]&&"\n"===n.charAt(0)?"\n"+n:n},_createInitialChildren:function(t,e,A,n){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(n,o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)E.queueText(n,r);else if(null!=i)for(var a=this.mountChildren(i,t,A),s=0;s1)for(var A=1;A0&&n.length<20?A+" (keys: "+n.join(", ")+")":A}function r(t,e){var A=a.get(t);if(!A){return null}return A}var i=A(44),a=(A(22),A(123)),s=(A(74),A(68)),c=(A(46),A(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,A){c.validateCallback(e,A);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void n(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],n(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,n(e))},enqueueReplaceState:function(t,e){var A=r(t,"replaceState");A&&(A._pendingStateQueue=[e],A._pendingReplaceState=!0,n(A))},enqueueSetState:function(t,e){var A=r(t,"setState");if(A){var o=A._pendingStateQueue||(A._pendingStateQueue=[]);o.push(e),n(A)}},enqueueElementInternal:function(t,e,A){t._pendingElement=e,t._context=A,n(t)},validateCallback:function(t,e){t&&"function"!=typeof t?i("122",e,o(t)):void 0}});t.exports=c},function(t,e,A){"use strict";var n=(A(16),A(57)),o=(A(56),n);t.exports=o},function(t,e,A){"use strict";var n=A(16),o=A(88),r=A(43),i=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};n(i.prototype,{mountComponent:function(t,e,A,n){var i=A._idCounter++;this._domID=i,this._hostParent=e,this._hostContainerInfo=A;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=A._ownerDocument,c=s.createComment(a);return r.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=i},function(t,e,A){"use strict";function n(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var A=0,n=t;n;n=n._hostParent)A++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;A-o>0;)t=t._hostParent,A--;for(;o-A>0;)e=e._hostParent,o--;for(var i=A;i--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function i(t,e,A){for(var n=[];t;)n.push(t),t=t._hostParent;var o;for(o=n.length;o-- >0;)e(n[o],"captured",A);for(o=0;o0;)A(s[c],"captured",r)}var s=A(44);A(46);t.exports={isAncestor:o,getLowestCommonAncestor:n,getParentInstance:r,traverseTwoPhase:i,traverseEnterLeave:a}},function(t,e,A){"use strict";var n=A(44),o=A(16),r=A(87),i=A(88),a=A(43),s=A(93),c=(A(46),A(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,A,n){var o=A._idCounter++,r=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var l=A._ownerDocument,g=l.createComment(r),u=l.createComment(c),M=i(l.createDocumentFragment());return i.queueChild(M,i(g)),this._stringText&&i.queueChild(M,i(l.createTextNode(this._stringText))),i.queueChild(M,i(u)),a.precacheNode(this,g),this._closingComment=u,M}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var A=""+t;if(A!==this._stringText){this._stringText=A;var n=this.getHostNode();r.replaceDelimitedText(n[0],n[1],A)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),A=e.nextSibling;;){if(null==A?n("67",this._domID):void 0,8===A.nodeType&&" /react-text "===A.nodeValue){this._closingComment=A;break}A=A.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,A){"use strict";function n(){this.reinitializeTransaction()}var o=A(16),r=A(68),i=A(75),a=A(57),s={initialize:a,close:function(){u.isBatchingUpdates=!1}},c={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[c,s];o(n.prototype,i,{getTransactionWrappers:function(){return l}});var g=new n,u={isBatchingUpdates:!1,batchedUpdates:function(t,e,A,n,o,r){var i=u.isBatchingUpdates;return u.isBatchingUpdates=!0,i?t(e,A,n,o,r):g.perform(t,null,e,A,n,o,r)}};t.exports=u},function(t,e,A){"use strict";function n(t){for(;t._hostParent;)t=t._hostParent;var e=g.getNodeFromInstance(t),A=e.parentNode;return g.getClosestInstanceFromNode(A)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=M(t.nativeEvent),A=g.getClosestInstanceFromNode(e),o=A;do t.ancestors.push(o),o=o&&n(o);while(o);for(var r=0;re.end?(A=e.end,n=e.start):(A=e.start,n=e.end),o.moveToElementText(t),o.moveStart("character",A),o.setEndPoint("EndToStart",o),o.moveEnd("character",n-A),o.select()}function a(t,e){if(window.getSelection){var A=window.getSelection(),n=t[l()].length,o=Math.min(e.start,n),r=void 0===e.end?o:Math.min(e.end,n);if(!A.extend&&o>r){var i=r;r=o,o=i}var a=c(t,o),s=c(t,r);if(a&&s){var g=document.createRange();g.setStart(a.node,a.offset),A.removeAllRanges(),o>r?(A.addRange(g),A.extend(s.node,s.offset)):(g.setEnd(s.node,s.offset),A.addRange(g))}}}var s=A(60),c=A(156),l=A(63),g=s.canUseDOM&&"selection"in document&&!("getSelection"in window),u={getOffsets:g?o:r,setOffsets:g?i:a};t.exports=u},function(t,e){"use strict";function A(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function n(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=A(t),r=0,i=0;o;){if(3===o.nodeType){if(i=r+o.textContent.length,r<=e&&i>=e)return{node:o,offset:e-r};r=i}o=A(n(o))}}t.exports=o},function(t,e,A){"use strict";function n(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?n(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=A(158);t.exports=n},function(t,e,A){"use strict";function n(t){return o(t)&&3==t.nodeType}var o=A(159);t.exports=n},function(t,e){"use strict";function A(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=A},function(t,e){"use strict";function A(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=A},function(t,e){"use strict";var A={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},n={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:A.xlink,xlinkArcrole:A.xlink,xlinkHref:A.xlink,xlinkRole:A.xlink,xlinkShow:A.xlink,xlinkTitle:A.xlink,xlinkType:A.xlink,xmlBase:A.xml,xmlLang:A.xml,xmlSpace:A.xml},DOMAttributeNames:{}};Object.keys(n).forEach(function(t){o.Properties[t]=0,n[t]&&(o.DOMAttributeNames[t]=n[t])}),t.exports=o},function(t,e,A){"use strict";function n(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var A=document.selection.createRange();return{parentElement:A.parentElement(),text:A.text,top:A.boundingTop,left:A.boundingLeft}}}function o(t,e){if(h||null==I||I!==l())return null;var A=n(I);if(!T||!u(T,A)){T=A;var o=c.getPooled(d.select,p,t,e);return o.type="select",o.target=I,r.accumulateTwoPhaseDispatches(o),o}return null}var r=A(51),i=A(60),a=A(43),s=A(154),c=A(65),l=A(160),g=A(78),u=A(130),M=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},I=null,p=null,T=null,h=!1,E=!1,N={eventTypes:d,extractEvents:function(t,e,A,n){if(!E)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(g(r)||"true"===r.contentEditable)&&(I=r,p=e,T=null);break;case"topBlur":I=null,p=null,T=null;break;case"topMouseDown":h=!0;break;case"topContextMenu":case"topMouseUp":return h=!1,o(A,n);case"topSelectionChange":if(M)break;case"topKeyDown":case"topKeyUp":return o(A,n)}return null},didPutListener:function(t,e,A){"onSelect"===e&&(E=!0)}};t.exports=N},function(t,e,A){"use strict";function n(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=A(44),i=A(150),a=A(51),s=A(43),c=A(164),l=A(165),g=A(65),u=A(166),M=A(167),d=A(81),I=A(170),p=A(171),T=A(172),h=A(82),E=A(173),N=A(57),f=A(168),w=(A(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),A="on"+e,n="top"+e,o={phasedRegistrationNames:{bubbled:A,captured:A+"Capture"},dependencies:[n]};w[t]=o,C[n]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,A,n){var o=C[t];if(!o)return null;var i;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=g;break;case"topKeyPress":if(0===f(A))return null;case"topKeyDown":case"topKeyUp":i=M;break;case"topBlur":case"topFocus":i=u;break;case"topClick":if(2===A.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=I;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=p;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=c;break;case"topTransitionEnd":i=T;break;case"topScroll":i=h;break;case"topWheel":i=E;break;case"topCopy":case"topCut":case"topPaste":i=l}i?void 0:r("86",t);var s=i.getPooled(o,e,A,n);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,A){if("onClick"===e&&!o(t._tag)){var r=n(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=i.listen(a,"click",N))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var A=n(t);y[A].remove(),delete y[A]}}};t.exports=D},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r={relatedTarget:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(168),i=A(169),a=A(84),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(n,s),t.exports=n},function(t,e){"use strict";function A(t){var e,A=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===A&&(e=13)):e=A,e>=32||13===e?e:0}t.exports=A},function(t,e,A){"use strict";function n(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var A=o(t);return 13===A?"Enter":String.fromCharCode(A)}return"keydown"===t.type||"keyup"===t.type?i[t.keyCode]||"Unidentified":""}var o=A(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={dataTransfer:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(84),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e){for(var A=Math.min(t.length,e.length),n=0;n.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,a=p.createElement(k,{child:e});if(t){var s=w.get(t);i=s._processChildContext(s._context)}else i=B;var l=u(A);if(l){var g=l._currentElement,d=g.props.child;if(Q(d,e)){var I=l._renderedComponent.getPublicInstance(),T=n&&function(){n.call(I)};return R._updateRootComponent(l,a,i,A,T),I}R.unmountComponentAtNode(A)}var h=o(A),E=h&&!!r(h),N=c(A),f=E&&!l&&!N,C=R._renderNewRootComponent(a,A,f,i)._renderedComponent.getPublicInstance();return n&&n.call(C),C},render:function(t,e,A){return R._renderSubtreeIntoContainer(null,t,e,A)},unmountComponentAtNode:function(t){l(t)?void 0:M("40");var e=u(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(m);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,A,r,i){if(l(e)?void 0:M("41"),r){var a=o(e);if(C.canReuseMarkup(t,a))return void h.precacheNode(A,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var g=t,u=n(g,c),I=" (client) "+g.substring(u-20,u+20)+"\n (server) "+c.substring(u-20,u+20);e.nodeType===U?M("42",I):void 0}if(e.nodeType===U?M("43"):void 0,i.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),h.precacheNode(A,e.firstChild)}};t.exports=R},function(t,e,A){"use strict";function n(t,e){var A={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return A}var o=(A(144),9);t.exports=n},function(t,e){"use strict";var A={useCreateElement:!0,useFiber:!1};t.exports=A},function(t,e,A){"use strict";var n=A(178),o=/\/?>/,r=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=n(t);return r.test(t)?t:t.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var A=e.getAttribute(i.CHECKSUM_ATTR_NAME);A=A&&parseInt(A,10);var o=n(t);return o===A}};t.exports=i},function(t,e){"use strict";function A(t){for(var e=1,A=0,o=0,r=t.length,i=r&-4;o3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),u=t||y,d=void 0;d="function"==typeof e?e:e?(0,T.default)(e):D;var p=A||x,h=n.pure,E=void 0===h||h,N=n.withRef,w=void 0!==N&&N,b=E&&p!==x,Q=L++;return function(t){function e(t,e,A){var n=p(t,e,A);return n}var A="Connect("+a(t)+")",n=function(n){function a(t,e){o(this,a);var i=r(this,n.call(this,t,e));i.version=Q,i.store=t.store||e.store,(0,C.default)(i.store,'Could not find "store" in either the context or '+('props of "'+A+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+A+'".'));var s=i.store.getState();return i.state={storeState:s},i.clearCache(),i}return i(a,n),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var A=t.getState(),n=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(A,e):this.finalMapStateToProps(A);return n},a.prototype.configureFinalMapState=function(t,e){var A=u(t.getState(),e),n="function"==typeof A;return this.finalMapStateToProps=n?A:u,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,n?this.computeStateProps(t,e):A},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var A=t.dispatch,n=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(A,e):this.finalMapDispatchToProps(A);return n},a.prototype.configureFinalMapDispatch=function(t,e){var A=d(t.dispatch,e),n="function"==typeof A;return this.finalMapDispatchToProps=n?A:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,n?this.computeDispatchProps(t,e):A},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,I.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,I.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,I.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,I.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var A=s(this.updateStatePropsIfNeeded,this);if(!A)return;A===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,A=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var i=!0,a=!0;E&&r&&(i=A||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;n?s=!0:i&&(s=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var u=!0;return u=!!(s||c||e)&&this.updateMergedPropsIfNeeded(),!u&&r?r:(w?this.renderedElement=(0,g.createElement)(t,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,g.createElement)(t,this.mergedProps),this.renderedElement)},a}(g.Component);return n.displayName=A,n.WrappedComponent=t,n.contextTypes={store:M.default},n.propTypes={store:M.default},(0,f.default)(n,t)}}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var A={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in A)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?A[n]:("00"+A[n]).substr((""+A[n]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=A,e.getParameter=n,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+l++;return t}function r(t,e){var A=window._server+"/frame/loadFileVersions";$.ajax({url:A,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function i(t,e){var A=window._server+"/common/loadResourceTreeData";$.ajax({url:A,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=c.default.frameStyle.getRootIcon(),t._style=c.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=c.default.frameStyle.getFolderIcon(),t._style=c.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=c.default.frameStyle.getRuleIcon(),t._style=c.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=c.default.frameStyle.getProjectIcon(),t._style=c.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=c.default.frameStyle.getResourceIcon(),t._style=c.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=c.default.frameStyle.getResourcePackageIcon(),t._style=c.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=c.default.frameStyle.getLibIcon(),t._style=c.default.frameStyle.getLibIconStyle();break;case"action":t._icon=c.default.frameStyle.getActionIcon(),t._style=c.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=c.default.frameStyle.getParameterIcon(),t._style=c.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=c.default.frameStyle.getConstantIcon(),t._style=c.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=c.default.frameStyle.getVariableIcon(),t._style=c.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=c.default.frameStyle.getRuleLibIcon(),t._style=c.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=c.default.frameStyle.getDecisionTableLibIcon(),t._style=c.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=c.default.frameStyle.getDecisionTreeLibIcon(),t._style=c.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=c.default.frameStyle.getFlowLibIcon(),t._style=c.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=c.default.frameStyle.getUlIcon(),t._style=c.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=c.default.frameStyle.getDecisionTableIcon(),t._style=c.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=c.default.frameStyle.getScriptDecisionTableIcon(),t._style=c.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=c.default.frameStyle.getDecisionTreeIcon(),t._style=c.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=c.default.frameStyle.getFlowIcon(),t._style=c.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=c.default.frameStyle.getScorecardIcon(),t._style=c.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=i;var s=A(228),c=n(s),l=1},function(t,e){"use strict";function A(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var n={};n.frameStyle={getRootIcon:function(){return A("rootIcon","rf rf-root")},getRootIconStyle:function(){return A("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return A("projectIcon","rf rf-project")},getProjectIconStyle:function(){return A("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return A("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return A("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return A("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return A("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return A("libIcon","rf rf-database")},getLibIconStyle:function(){return A("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return A("actionIcon","rf rf-action")},getActionIconStyle:function(){return A("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return A("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return A("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return A("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return A("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return A("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return A("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return A("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return A("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return A("ulIcon","rf rf-script")},getUlIconStyle:function(){return A("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return A("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return A("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return A("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return A("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return A("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return A("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return A("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return A("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return A("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return A("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return A("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return A("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return A("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return A("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return A("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return A("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return A("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return A("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return A("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return A("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return A("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return A("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=n},,function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A\r\n *\r\n * Same license as plugin\r\n */.splitter_panel{position:relative}.splitter_panel .vsplitter{border-left:1px solid #999;border-right:1px solid #999;background-color:#f5f5f5;cursor:col-resize;z-index:900;width:7px}.splitter_panel .hsplitter{background-color:#5f5f5f;cursor:row-resize;z-index:800;height:7px}.splitter_panel .hsplitter.splitter-invisible,.splitter_panel .vsplitter.splitter-invisible{background:none}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{position:absolute;overflow:auto}.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .vsplitter{height:100%}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .top_panel{width:100%}.splitter_panel .left_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{top:0}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .top_panel{left:0}.splitter_panel .bottom_panel{bottom:0}.splitter_panel .right_panel{right:0}.splitterMask{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1000}",""])},function(t,e){"use strict";!function(t,e){var A=0,n=null,o=[],r=null;t.fn.split=function(i){function a(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9\.]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==g.orientation)return d*+e[1]/100;if("horizontal"==g.orientation)return I*+e[1]/100}}}var s=this.data("splitter");if(s)return s;var c,l,g=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},i||{});this.settings=g;var u,M=this.children();"vertical"==g.orientation?(c=M.first().addClass("left_panel"),l=c.next().addClass("right_panel"),u="vsplitter"):"horizontal"==g.orientation&&(c=M.first().addClass("top_panel"),l=c.next().addClass("bottom_panel"),u="hsplitter"),g.invisible&&(u+=" splitter-invisible");var d=this.width(),I=this.height(),p=A++;this.addClass("splitter_panel");var T,h=t("
").addClass(u).bind("mouseenter touchstart",function(){n=p}).bind("mouseleave touchend",function(){n=null}).insertAfter(c),E=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&I==e||(d=this.width(),I=this.height(),E.position(T))},position:function(){return"vertical"==g.orientation?function(t,A){if(t===e)return T;T=a(t);var n=h.width(),o=n/2;if(g.invisible){var r=c.width(T).outerWidth();l.width(E.width()-r),h.css("left",r-o)}else{var r=c.width(T-o).outerWidth();l.width(E.width()-r-n),h.css("left",r)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:"horizontal"==g.orientation?function(t,A){if(t===e)return T;T=a(t);var n=h.height(),o=n/2;if(g.invisible){var r=c.height(T).outerHeight();l.height(E.height()-r),h.css("top",r-o)}else{var r=c.height(T-o).outerHeight();l.height(E.height()-r-n),h.css("top",r)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:t.noop}(),orientation:g.orientation,limit:g.limit,isActive:function(){return n===p},destroy:function(){E.removeClass("splitter_panel"),h.unbind("mouseenter"),h.unbind("mouseleave"),h.unbind("touchstart"),h.unbind("touchmove"),h.unbind("touchend"),h.unbind("touchleave"),h.unbind("touchcancel"),"vertical"==g.orientation?(c.removeClass("left_panel"),l.removeClass("right_panel")):"horizontal"==g.orientation&&(c.removeClass("top_panel"),l.removeClass("bottom_panel")),E.unbind("splitter.resize"),E.find(".splitter_panel").trigger("splitter.resize"),o[p]=null,h.remove();for(var e=!1,n=o.length;n--;)if(null!==o[n]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),E.data("splitter",null),o=[],A=0)}});E.bind("splitter.resize",function(t){var e=E.position();"vertical"==E.orientation&&e>E.width()?e=E.width()-E.limit-1:"horizontal"==E.orientation&&e>E.height()&&(e=E.height()-E.limit-1),ed-g.limit?d-g.limit:a(g.position):"horizontal"==g.orientation&&(N=N>I-g.limit?I-g.limit:a(g.position)),N
').css("cursor",r.children().eq(1).css("cursor")).insertAfter(r),r.settings.onDragStart(e),!1}).bind("mouseup.splitter touchend.splitter touchleave.splitter touchcancel.splitter",function(e){r&&(t(".splitterMask").remove(),r.settings.onDragEnd(e),r=null)}).bind("mousemove.splitter touchmove.splitter",function(t){if(null!==r){var e=r.limit,A=r.offset();if("vertical"==r.orientation){var n=t.pageX;t.originalEvent&&t.originalEvent.changedTouches&&(n=t.originalEvent.changedTouches[0].pageX);var o=n-A.left;o<=r.limit?o=r.limit+1:o>=r.width()-e&&(o=r.width()-e-1),o>r.limit&&o=r.height()-e&&(a=r.height()-e-1),a>r.limit&&a-1&&(l=!0),!1}}),l?c.show():c.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,A=e.headers,n=e.operationConfig,o=e.dispatch,r=e.selectFirst,i=(e.uniqueKey,this.props.rows||[]),a=[],s=[];A.forEach(function(e,A){e.editable?a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label),c.default.createElement(I.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label)))}),n&&a.push(c.default.createElement("td",{key:(0,p.uniqueID)(),style:{width:n.width}},c.default.createElement("label",null,"操作列")));var l=c.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},A.map(function(e,A){return e.filterable?c.default.createElement("td",{key:(0,p.uniqueID)()},c.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,A),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):c.default.createElement("td",{key:(0,p.uniqueID)()}," ")}),n?c.default.createElement("td",null):null);s.push(l),i.forEach(function(e,i){e.id||(e.id=(0,p.uniqueID)());var a=e.id;0===i&&r?s.push(c.default.createElement(M.default,{key:a,select:!0,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i})):s.push(c.default.createElement(M.default,{key:a,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i}))});var g={margin:0,width:this.props.width?this.props.width:"100%"};return c.default.createElement("table",{className:"table table-bordered",style:g},c.default.createElement("thead",null,c.default.createElement("tr",{className:"well"},a)),c.default.createElement("tbody",null,s))}}]),e}(s.Component);T.propTypes={headers:c.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=T},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var n=e[t];n&&""!==n||(n="{}");var o=JSON.parse(n)||{},r=o.rows||[],i=o.type,a=function(n){var o={type:i,rows:n},r=JSON.stringify(o);e[t]=r;var a=A.find("div");a.html(r)};if(i){var s=null,c=!0,l=!1,g=void 0;try{for(var u,M=simulatorCategoryData[Symbol.iterator]();!(c=(u=M.next()).done);c=!0){var d=u.value;if(i===d.clazz){s=d;break}}}catch(t){l=!0,g=t}finally{try{!c&&M.return&&M.return()}finally{if(l)throw g}}var p=s.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:p,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),A=!0,n=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var l=s.value;e.append('")}}catch(t){n=!0,o=t}finally{try{!A&&c.return&&c.return()}finally{if(n)throw o}}e.append(''),T.MsgBox.dialog("选择子对象类型",e,function(){if(i=e.val(),!i||""===i)return void T.MsgBox.alert("请先选择子对象类型!");var A=null,n=!0,o=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(n=(c=l.next()).done);n=!0){var g=c.value;if(i===g.clazz){A=g;break}}}catch(t){o=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw s}}var u=A.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:u,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}A.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var n=A.find("div");n.html(e[t]),n.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,A=e.rowData,n=e.header,o=n.dateFormat,r=A[n.name];if(o){var i=new Date(r);r=(0,p.formatDate)(i,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return g.default.createElement("td",{style:{padding:"1px 5px"}},g.default.createElement("div",{style:a,onClick:function(e){if(n.editable){var o=e.target;$(o).css({display:"none"}),A._editorType?t._showEditor(n.name):I.eventEmitter.emit(I.SHOW_CELL_EDITOR,{targetDiv:o,rowData:A,colId:n.id})}}},r))}}]),e}(l.Component);e.default=h},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=A(240),r=n(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},A.prototype.emit=function(t){var e,A,o,a,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(A=this._events[t],i(A))return!1;if(n(A))switch(arguments.length){case 1:A.call(this);break;case 2:A.call(this,arguments[1]);break;case 3:A.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),A.apply(this,a)}else if(r(A))for(a=Array.prototype.slice.call(arguments,1),c=A.slice(),o=c.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(t,e){function A(){this.removeListener(t,A),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return A.listener=e,this.on(t,A),this},A.prototype.removeListener=function(t,e){var A,o,i,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(A=this._events[t],i=A.length,o=-1,A===e||n(A.listener)&&A.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(A)){for(a=i;a-- >0;)if(A[a]===e||A[a].listener&&A[a].listener===e){o=a;break}if(o<0)return this;1===A.length?(A.length=0,delete this._events[t]):A.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},A.prototype.removeAllListeners=function(t){var e,A;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(A=this._events[t],n(A))this.removeListener(t,A);else if(A)for(;A.length;)this.removeListener(t,A[A.length-1]);return delete this._events[t],this},A.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},A.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},A.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,A){var n=A(242).default,o=A(243).default,r=A(251),i=A(252).default,a=A(302);t.exports={Tool:n,Node:o,MsgBox:r,Event:a,FlowDesigner:i}},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A"}}},{key:"getConnectionPropertiesProducer", +value:function(){return function(){return"
"}}},{key:"_newNodeInstance",value:function(t,e,A){var n=this.newNode();return n?(n._tool=this,n._initConfigs(this.getConfigs()),A||(A=this._buildNodeName()),n._createFigure(this.context,{x:t,y:e},A),n):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,A=!0,n=!1,o=void 0;try{for(var r,i=this.context.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);es-l&&as-l&&a>c-l?this.attr("cursor","se-resize"):ic-l?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},n=function(A){if(!this.dragging){var n=t.currentTool;if(n){if(n instanceof M.default||n instanceof g.default||(t.currentTool=t.selectTool,n=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),n instanceof g.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,i=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var u=s.value;if(u===e){o=!0;break}}}catch(t){i=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(n instanceof M.default){var d=A.offsetX,p=A.offsetY,T=t.currentConnection;if(T){if(0===e.in)return void I.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void I.alert("当前节点进入的连线最多只能有"+e.in+"条.");T.endX=d,T.endY=p,T.from!==e?!function(){T.endPath(e),t.currentConnection=null;var A=T.from.uuid,n=e.uuid,o=T.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(A),r=t.getNodeByUUID(n);T=new c.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),T.uuid=o,T.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():I.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void I.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void I.alert("当前节点出去的连线最多只能有"+e.out+"条.");T=new c.default(e,{endX:d,endY:p}),t.currentConnection=T}}}}};this.rect.mouseover(A),this.rect.mousedown(n),this.icon.mouseover(A),this.icon.mousedown(n);var o=function(){var A=e.rect,n=t.currentTool;if(n&&n instanceof g.default){var o=!1,r=t.selectionFigures,i=!0,a=!1,s=void 0;try{for(var l,u=r[Symbol.iterator]();!(i=(l=u.next()).done);i=!0){var M=l.value;if(M===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&u.return&&u.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof c.default||t._recordRectPosition()}),A.ow=A.attr("width"),A.oh=A.attr("height"),A.dragging=!0}},r=function(A,n){var o=t.currentTool;if(o&&o instanceof g.default){e.context.snapto&&(A-=A%10,n-=n%10);var r=t.selectionFigures,i=e.rect,a=(e.icon,i.ox+A),s=i.oy+n;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var l=void 0,u=void 0;switch(this.attr("cursor")){case"nw-resize":l=i.ow-A,u=i.oh-n,l>20&&u>20&&i.attr({x:a,y:s,width:l,height:u});break;case"ne-resize":l=i.ow+A,u=i.oh-n,l>20&&u>20&&i.attr({y:s,width:l,height:u});break;case"se-resize":l=i.ow+A,u=i.oh+n,l>20&&u>20&&i.attr({width:l,height:u});break;case"sw-resize":l=i.ow-A,u=i.oh+n,l>20&&u>20&&i.attr({x:a,width:l,height:u});break;default:r.forEach(function(t,e){t instanceof c.default||t._moveRect(A,n)})}r.forEach(function(t,e){t instanceof c.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},i=function(){e.rect.dragging=!1;var A=[],n=new Map,o=new Map,r=e.rect.ow,i=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),l=e.uuid,g=!0,u=!1,M=void 0;try{for(var d,I=t.selectionFigures[Symbol.iterator]();!(g=(d=I.next()).done);g=!0){var p=d.value;if(!(p instanceof c.default)){A.push(p.uuid);var T=p.rect.ox,h=p.rect.oy;T=T?T:0,h=h?h:0;var E=p.rect.attr("x"),N=p.rect.attr("y");n.set(p.uuid,{x:E,y:N}),o.set(p.uuid,{x:T,y:h})}}}catch(t){u=!0,M=t}finally{try{!g&&I.return&&I.return()}finally{if(u)throw M}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var i,c=A[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var g=i.value,u=t.getNodeByUUID(g),M=n.get(g);u.rect.attr({x:M.x,y:M.y}),g===l&&u.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&c.return&&c.return()}finally{if(o)throw r}}var d=!0,I=!1,p=void 0;try{for(var T,h=A[Symbol.iterator]();!(d=(T=h.next()).done);d=!0){var E=T.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,p=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw p}}},undo:function(){var e=!0,n=!1,a=void 0;try{for(var s,c=A[Symbol.iterator]();!(e=(s=c.next()).done);e=!0){var g=s.value,u=t.getNodeByUUID(g),M=o.get(g);u.rect.attr({x:M.x,y:M.y}),g===l&&u.rect.attr({width:r,height:i})}}catch(t){n=!0,a=t}finally{try{!e&&c.return&&c.return()}finally{if(n)throw a}}var d=!0,I=!1,p=void 0;try{for(var T,h=A[Symbol.iterator]();!(d=(T=h.next()).done);d=!0){var E=T.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,p=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw p}}}})};this.rect.drag(r,o,i),this.icon.drag(r,o,i)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),A=[].concat(r(this.fromConnections));e.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),A.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var A=void 0,n=void 0;this.rect.ox&&0!==this.rect.ox?(A=this.rect.ox+t,n=this.rect.oy+e):(A=this.rect.attr("x")+t,n=this.rect.attr("x")+e),this.rect.attr({x:A,y:n})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),A=this.rect.attr("y"),n=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,A-=5,n+=10,o+=10),"M "+e+" "+A+" L "+(e+n)+" "+A+" L "+(e+n)+" "+(A+o)+" L "+e+" "+(A+o)+" L "+e+" "+A}}]),t}();e.default=p},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t,e){for(var A=0;A0){({x:t[1][1],y:t[1][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var A=this.to.rect,n=A.attr("x"),o=A.attr("y"),r=A.attr("width"),i=A.attr("height");n+=r/2,o+=i/2-10;var a=t.x,c=t.y;t=[],t.push(["M",a,c]),t.push(["L",n,o])}var l=this.to.getPathInfo(!0),g=s.default.pathIntersection(l,t);if(g.length>0){({x:t[0][1],y:t[0][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),A=t.attr("y"),n=t.attr("width"),o=t.attr("height");e+=n/2,A+=o/2-10;var r=this.endX,i=this.endY,a=0,c=0,l=null;if(this.to){var g=this.to.rect;r=g.attr("x"),i=g.attr("y"),a=g.attr("width"),c=g.attr("height"),r+=a/2,i+=c/2-10}var u=this.from.getPathInfo(!0),M=Math.abs(e+n/2-(r-a/2)),d=Math.abs(A+o/2-(i-c/2)),I="M"+e+" "+A;if(M>=d){var p=I+" L"+r+" "+A,T=s.default.pathIntersection(u,p);if(T.length>0&&(e=T[0].x,A=T[0].y,I="M"+T[0].x+" "+T[0].y),this.to){var h="M"+e+" "+i+" L"+r+" "+i,E=this.to.getPathInfo(!0);T=s.default.pathIntersection(E,h),T.length>0&&(r=T[0].x,i=T[0].y,e0&&(e=C[0].x,A=C[0].y,I="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+A+" L"+r+" "+i,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,i=C[0].y,A=1e3&&delete a[s.shift()],s.push(i),a[i]=t[L](e,r),A?A(a[i]):a[i])}return o}function r(){return this.hex}function i(t,e){for(var A=[],n=0,o=t.length;o-2*!e>n;n+=2){var r=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?o-4==n?r[3]={x:+t[0],y:+t[1]}:o-2==n&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==n?r[3]=r[2]:n||(r[0]={x:+t[n],y:+t[n+1]}),A.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return A}function a(t,e,A,n,o){var r=-3*e+9*A-9*n+3*o,i=t*r+6*e-12*A+6*n;return t*i-3*e+3*A}function s(t,e,A,n,o,r,i,s,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,g=12,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],M=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,I=0;Id;)u/=2,M+=(lR(o,i)||R(e,n)R(r,a))){var s=(t*n-e*A)*(o-i)-(t-A)*(o*a-r*i),c=(t*n-e*A)*(r-a)-(e-n)*(o*a-r*i),l=(t-A)*(r-a)-(e-n)*(o-i);if(l){var g=s/l,u=c/l,M=+g.toFixed(2),d=+u.toFixed(2);if(!(M<+F(t,A).toFixed(2)||M>+R(t,A).toFixed(2)||M<+F(o,i).toFixed(2)||M>+R(o,i).toFixed(2)||d<+F(e,n).toFixed(2)||d>+R(e,n).toFixed(2)||d<+F(r,a).toFixed(2)||d>+R(r,a).toFixed(2)))return{x:g,y:u}}}}function g(t,A,n){var o=e.bezierBBox(t),r=e.bezierBBox(A);if(!e.isBBoxIntersect(o,r))return n?0:[];for(var i=s.apply(0,t),a=s.apply(0,A),c=R(~~(i/5),1),g=R(~~(a/5),1),u=[],M=[],d={},I=n?0:[],p=0;p=0&&x<=1.001&&B>=0&&B<=1.001&&(n?I++:I.push({x:D.x,y:D.y,t1:F(x,1),t2:F(B,1)}))}}return I}function u(t,A,n){t=e._path2curve(t),A=e._path2curve(A);for(var o,r,i,a,s,c,l,u,M,d,I=n?0:[],p=0,T=t.length;pn)return n;for(;Ar?A=o:n=o,o=(n-A)/2+A}return o}var c=3*e,l=3*(n-e)-c,g=1-c-l,u=3*A,M=3*(o-A)-u,d=1-u-M;return a(t,1/(200*r))}function p(t,e){var A=[],n={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(n[q(o)]=t[o],A.push(q(o)));A.sort(lt)}this.anim=n,this.top=A[A.length-1],this.percents=A}function T(A,n,o,r,i,a){o=q(o);var s,c,l,g,u,d,p=A.ms,T={},h={},E={};if(r)for(w=0,C=re.length;wr*A.top){o=A.percents[w],u=A.percents[w-1]||0,p=p/A.top*(o-u),g=A.percents[w+1],s=A.anim[o];break}r&&n.attr(A.anim[A.percents[w]])}if(s){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var D in s)if(s[y](D)&&(At[y](D)||n.paper.customAttributes[y](D)))switch(T[D]=n.attr(D),null==T[D]&&(T[D]=et[D]),h[D]=s[D],At[D]){case G:E[D]=(h[D]-T[D])/p;break;case"colour":T[D]=e.getRGB(T[D]);var x=e.getRGB(h[D]);E[D]={r:(x.r-T[D].r)/p,g:(x.g-T[D].g)/p,b:(x.b-T[D].b)/p};break;case"path":var B=Ut(T[D],h[D]),L=B[1];for(T[D]=B[0],E[D]=[],w=0,C=T[D].length;w',pt=Tt.firstChild,pt.style.behavior="url(#default#VML)",!pt||"object"!=typeof pt.adj)return e.type=j;Tt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=N=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e; +},e.angle=function(t,A,n,o,r,i){if(null==r){var a=t-n,s=A-o;return a||s?(180+180*k.atan2(-s,-a)/V+360)%360:0}return e.angle(t,A,r,i)-e.angle(n,o,r,i)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,A,n){if(n=e.is(n,"finite")?n:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-A)<=n)return t[o]}else{t=+t;var r=A%t;if(rt-n)return A-r+t}return A};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*k.random()|0,A="x"==t?e:3&e|8;return A.toString(16)});e.setWindow=function(A){t("raphael.setWindow",e,D.win,A),D.win=A,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var ht=function(t){if(e.vml){var A,n=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),A=r.body}catch(t){A=createPopup().document.body}var i=A.createTextRange();ht=o(function(t){try{A.style.color=S(t).replace(n,j);var e=i.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),ht=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,j).getPropertyValue("color")})}return ht(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Nt=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return this.hex},wt=function(t,A,n){if(null==A&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,A=t.g,t=t.r),null==A&&e.is(t,P)){var o=e.getRGB(t);t=o.r,A=o.g,n=o.b}return(t>1||A>1||n>1)&&(t/=255,A/=255,n/=255),[t,A,n]},Ct=function(t,A,n,o){t*=255,A*=255,n*=255;var r={r:t,g:A,b:n,hex:e.rgb(t,A,n),toString:ft};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var A;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(A=e.hsb2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(A=e.hsl2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(A=e.rgb2hsl(t),t.h=A.h,t.s=A.s,t.l=A.l,A=e.rgb2hsb(t),t.v=A.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=ft,t},e.hsb2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(A=t.b,e=t.s,n=t.o,t=t.h),t*=360;var o,r,i,a,s;return t=t%360/60,s=A*e,a=s*(1-O(t%2-1)),o=r=i=A-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.hsl2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(A=t.l,e=t.s,t=t.h),(t>1||e>1||A>1)&&(t/=360,e/=100,A/=100),t*=360;var o,r,i,a,s;return t=t%360/60,s=2*e*(A<.5?A:1-A),a=s*(1-O(t%2-1)),o=r=i=A-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.rgb2hsb=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i;return r=R(t,e,A),i=r-F(t,e,A),n=0==i?null:r==t?(e-A)/i:r==e?(A-t)/i+2:(t-e)/i+4,n=(n+360)%6*60/360,o=0==i?0:i/r,{h:n,s:o,b:r,toString:Et}},e.rgb2hsl=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i,a,s;return i=R(t,e,A),a=F(t,e,A),s=i-a,n=0==s?null:i==t?(e-A)/s:i==e?(A-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=(i+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:n,s:o,l:r,toString:Nt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var A=D.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},A.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(A),A.src=t};e.getRGB=o(function(t){if(!t||(t=S(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ht(t));var A,n,o,i,a,s,c=t.match(J);return c?(c[2]&&(o=$(c[2].substring(5),16),n=$(c[2].substring(3,5),16),A=$(c[2].substring(1,3),16)),c[3]&&(o=$((a=c[3].charAt(3))+a,16),n=$((a=c[3].charAt(2))+a,16),A=$((a=c[3].charAt(1))+a,16)),c[4]&&(s=c[4][U](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100)),c[5]?(s=c[5][U](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsb2rgb(A,n,o,i)):c[6]?(s=c[6][U](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsl2rgb(A,n,o,i)):(c={r:A,g:n,b:o,toString:r},c.hex="#"+(16777216|o|n<<8|A<<16).toString(16).slice(1),e.is(i,"finite")&&(c.opacity=i),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,A,n){return e.hsb2rgb(t,A,n).hex}),e.hsl=o(function(t,A,n){return e.hsl2rgb(t,A,n).hex}),e.rgb=o(function(t,e,A){function n(t){return t+.5|0}return"#"+(16777216|n(A)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},A=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),A.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var A=yt(t);if(A.arr)return xt(A.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||S(t).replace(it,function(t,e,A){var r=[],i=e.toLowerCase();if(A.replace(st,function(t,e){e&&r.push(+e)}),"m"==i&&r.length>2&&(o.push([e][b](r.splice(0,2))),i="l",e="m"==e?"l":"L"),"r"==i)o.push([e][b](r));else for(;r.length>=n[i]&&(o.push([e][b](r.splice(0,n[i]))),n[i]););}),o.toString=e._path2string,A.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var A=[];return e.is(t,X)&&e.is(t[0],X)&&(A=xt(t)),A.length||S(t).replace(at,function(t,e,n){var o=[];Y.call(e);n.replace(st,function(t,e){e&&o.push(+e)}),A.push([e][b](o))}),A.toString=e._path2string,A});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var A in e)e[y](A)&&A!=t&&(e[A].sleep--,!e[A].sleep&&delete e[A])}),e[t]};e.findDotsAtSegment=function(t,e,A,n,o,r,i,a,s){var c=1-s,l=H(c,3),g=H(c,2),u=s*s,M=u*s,d=l*t+3*g*s*A+3*c*s*s*o+M*i,I=l*e+3*g*s*n+3*c*s*s*r+M*a,p=t+2*s*(A-t)+u*(o-2*A+t),T=e+2*s*(n-e)+u*(r-2*n+e),h=A+2*s*(o-A)+u*(i-2*o+A),E=n+2*s*(r-n)+u*(a-2*r+n),N=c*t+s*A,f=c*e+s*n,w=c*o+s*i,C=c*r+s*a,y=90-180*k.atan2(p-h,T-E)/V;return(p>h||T=t.x&&e<=t.x2&&A>=t.y&&A<=t.y2},e.isBBoxIntersect=function(t,A){var n=e.isPointInsideBBox;return n(A,t.x,t.y)||n(A,t.x2,t.y)||n(A,t.x,t.y2)||n(A,t.x2,t.y2)||n(t,A.x,A.y)||n(t,A.x2,A.y)||n(t,A.x,A.y2)||n(t,A.x2,A.y2)||(t.xA.x||A.xt.x)&&(t.yA.y||A.yt.y)},e.pathIntersection=function(t,e){return u(t,e)},e.pathIntersectionNumber=function(t,e){return u(t,e,1)},e.isPointInsidePath=function(t,A,n){var o=e.pathBBox(t);return e.isPointInsideBBox(o,A,n)&&u(t,[["M",A,n],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return A(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ut(t);for(var n,o=0,r=0,i=[],a=[],s=0,c=t.length;s1&&(h=k.sqrt(h),A*=h,n*=h);var E=A*A,N=n*n,f=(i==a?-1:1)*k.sqrt(O((E*N-E*T*T-N*p*p)/(E*T*T+N*p*p))),w=f*A*T/n+(t+s)/2,C=f*-n*p/A+(e+c)/2,y=k.asin(((e-C)/n).toFixed(9)),D=k.asin(((c-C)/n).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(O(x)>u){var B=D,L=s,Q=c;D=y+u*(a&&D>y?1:-1),s=w+A*k.cos(D),c=C+n*k.sin(D),d=jt(s,c,A,n,r,0,a,L,Q,[D,B,w,C])}x=D-y;var j=k.cos(y),m=k.sin(y),S=k.cos(D),v=k.sin(D),z=k.tan(x/4),Y=4/3*A*z,R=4/3*n*z,F=[t,e],H=[t+Y*m,e-R*j],G=[s+Y*v,c-R*S],P=[s,c];if(H[0]=2*F[0]-H[0],H[1]=2*F[1]-H[1],l)return[H,G,P][b](d);d=[H,G,P][b](d).join()[U](",");for(var X=[],W=0,J=d.length;W"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),c=r-2*n+e-(a-2*r+n),l=2*(n-e)-2*(r-n),g=e-n,u=(-l+k.sqrt(l*l-4*c*g))/2/c,M=(-l-k.sqrt(l*l-4*c*g))/2/c,O(u)>"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),{min:{x:F[L](0,I),y:F[L](0,d)},max:{x:R[L](0,I),y:R[L](0,d)}}}),Ut=e._path2curve=o(function(t,e){var A=!e&&yt(t);if(!e&&A.curve)return xt(A.curve);for(var n=Lt(t),o=e&&Lt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,A){var n,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](jt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==A||"S"==A?(n=2*e.x-e.bx,o=2*e.y-e.by):(n=e.x,o=e.y),t=["C",n,o][b](t.slice(1));break;case"T":"Q"==A||"T"==A?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](Qt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](Qt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var A=t[e];A.length;)l[e]="A",o&&(g[e]="A"),t.splice(e++,0,["C"][b](A.splice(0,6)));t.splice(e,1),I=R(n.length,o&&o.length||0)}},c=function(t,e,A,r,i){t&&e&&"M"==t[i][0]&&"M"!=e[i][0]&&(e.splice(i,0,["M",r.x,r.y]),A.bx=0,A.by=0,A.x=t[i][1],A.y=t[i][2],I=R(n.length,o&&o.length||0))},l=[],g=[],u="",M="",d=0,I=R(n.length,o&&o.length||0);do){if(A&&!u.start){if(l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),g+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],r)return g;u.start=g,g=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,s[5],s[6]].join(),M+=c,i=+s[5],a=+s[6];continue}if(!t&&!A)return l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),{x:l.x,y:l.y,alpha:l.alpha}}M+=c,i=+s[5],a=+s[6]}g+=s.shift()+s}return u.end=g,l=t?M:A?u:e.findDotsAtSegment(i,a,s[0],s[1],s[2],s[3],s[4],s[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},ee=te(1),Ae=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=Ae,e.getSubpath=function(t,e,A){if(this.getTotalLength(t)-A<1e-6)return ne(t,e).end;var n=ne(t,A,1);return e?ne(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return Ae(e,t)},Zt.getPath=function(){var t,A=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return A&&(t=A(this)),t},Zt.getSubpath=function(t,A){var n=this.getPath();if(n)return e.getSubpath(n,t,A)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,A=k.sqrt(.1734+e*e),n=A-e,o=H(O(n),1/3)*(n<0?-1:1),r=-A-e,i=H(O(r),1/3)*(r<0?-1:1),a=o+i+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*k.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,A=7.5625,n=2.75;return t<1/n?e=A*t*t:t<2/n?(t-=1.5/n,e=A*t*t+.75):t<2.5/n?(t-=2.25/n,e=A*t*t+.9375):(t-=2.625/n,e=A*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],ie=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var A=+new Date,n=0;n1&&!o.next){for(i in u)u[y](i)&&(I[i]=o.totalOrigin[i]);o.el.attr(I),T(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&T(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&ie(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,A,n,o,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=n instanceof p?n:e.animation(n,o,r,i);T(s,a,s.percents[0],null,a.attr());for(var c=0,l=re.length;cs&&(s=l)}s+="%",!t[s].callback&&(t[s].callback=o)}return new p(t,A)},Zt.animate=function(t,A,n,o){var r=this;if(r.removed)return o&&o.call(r),r;var i=t instanceof p?t:e.animation(t,A,n,o);return T(i,r,i.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var A,n,o=[],r=0;if(null!=e)return T(t,this,-1,F(e,1)),this;for(A=re.length;r1)for(var n=0,o=A.length;n.5)-1;s(u-.5,2)+s(M-.5,2)>.25&&(M=r.sqrt(.25-s(u-.5,2))*o+.5)&&.5!=M&&(M=M.toFixed(5)-1e-5*o)}return g}),o=o.split(/\s*\-\s*/),"linear"==c){var N=o.shift();if(N=-n(N),isNaN(N))return null;var f=[0,0,r.cos(t.rad(N)),r.sin(t.rad(N))],w=1/(i(a(f[2]),a(f[3]))||1);f[2]*=w,f[3]*=w,f[2]<0&&(f[0]=-f[2],f[2]=0),f[3]<0&&(f[1]=-f[3],f[3]=0)}var C=t._parseDots(o);if(!C)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(I.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){h=p(c+"Gradient",{id:l}),e.gradient=h,p(h,"radial"==c?{fx:u,fy:M}:{x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientTransform:e.matrix.invert()}),I.defs.appendChild(h);for(var y=0,D=C.length;y1?S.opacity/100:S.opacity});case"stroke":S=t.getRGB(I),s.setAttribute(d,S.hex),"stroke"==d&&S[e]("opacity")&&p(s,{"stroke-opacity":S.opacity>1?S.opacity/100:S.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&f(n,n._.arrows.startString),"endString"in n._.arrows&&f(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=A(I).charAt())&&T(n,I);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&p(s,{"stroke-opacity":I>1?I/100:I});case"fill-opacity":if(l.gradient){U=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,g)),U&&(v=U.getElementsByTagName("stop"),p(v[v.length-1],{"stop-opacity":I}));break}default:"font-size"==d&&(I=o(I,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=I,n._.dirty=1,s.setAttribute(d,I)}}x(n,r),s.style.visibility=u},D=1.2,x=function(n,r){if("text"==n.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var i=n.attrs,a=n.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,g).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(i.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,l=A(r.text).split("\n"),u=[],M=0,d=l.length;M"));var Z=X.getBoundingClientRect();h.W=u.w=(Z.right-Z.left)/W,h.H=u.h=(Z.bottom-Z.top)/W,h.X=u.x,h.Y=u.y+h.H/2,("x"in s||"y"in s)&&(h.path.v=t.format("m{0},{1}l{2},{1}",r(u.x*N),r(u.y*N),r(u.x*N)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(A=o.sqrt(.25-a(e-.5,2))*(2*(A>.5)-1)+.5),c=e+M+A),d}),r=r.split(/\s*\-\s*/),"linear"==s){var l=r.shift();if(l=-n(l),isNaN(l))return null}var g=t._parseDots(r);if(!g)return null;if(e=e.shape||e.node,g.length){e.removeChild(i),i.on=!0,i.method="none",i.color=g[0].color,i.color2=g[g.length-1].color;for(var u=[],I=0,p=g.length;I')}}catch(t){j=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),A=e.container,n=e.height,o=e.width,r=e.x,i=e.y;if(!A)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),c=s.style;return r=r||0,i=i||0,o=o||512,n=n||342,a.width=o,a.height=n,o==+o&&(o+="px"),n==+n&&(n+="px"),a.coordsize=1e3*N+M+1e3*N,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,n),1==A?(t._g.doc.body.appendChild(s),c.left=r+"px",c.top=i+"px",c.position="absolute"):A.firstChild?A.insertBefore(s,A.firstChild):A.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var m=t.st;for(var S in Q)Q[e](S)&&!m[e](S)&&(m[S]=function(t){return function(){var e=arguments;return this.forEach(function(A){A[t].apply(A,e)})}}(S))}}.apply(e,n),!(void 0!==o&&(t.exports=o))}])})},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A1&&(o=(t+1)/2),n.splice(o,1),2===n.length)n=e.connection._buildStraightLinePathInfo();else{var r=n[1],i=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=n[0];a[1]=i.x,a[2]=i.y;var s=n[n.length-2],c=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),l=n[n.length-1];l[1]=c.x,l[2]=c.y}e.path.attr("path",n),e.remove()});var u=function(n,o){e.context.snapto&&(n-=n%10,o-=o%10);var a=this.ox+n,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),i=Math.round(t/2);var c=e.path.attr("path"),l=c.length,g=void 0,u=void 0,M=void 0,d=2*(A.length-1)-1;if(0===t||1===t){if(M=c[1],g=e.connection._buildFromFigureIntersetion({x:M[1],y:M[2]},!0),u=A[0],2===A.length){var I=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(I){var p=A[A.length-1];p[1]=I.x,p[2]=I.y}}}else d!==t&&d!==t+1&&d!==t+2||(M=c[l-2],g=e.connection._buildToFigureIntersetion({x:a,y:s},!0),u=A[A.length-1]);g&&(u[1]=g.x,u[2]=g.y);var T=[];A.forEach(function(t,e){r?e===i?T.push(["L",a,s]):T.push(t):(T.push(t),e===i&&T.push(["L",a,s]))}),e.path.attr("path",T),e.connection._buildText()}},M=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),A=this.oldConnectionPathInfo,n=e.connection.uuid;e.context.addRedoUndo({redo:function(){var A=e.context.getNodeByUUID(n);A.pathInfo=t,A.updatePath(),A._buildText()},undo:function(){var t=e.context.getNodeByUUID(n);t.pathInfo=A,t.updatePath(),t._buildText()}})};this.rect.drag(u,M,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e){"use strict";function A(t){var e=i("消息提示",t);e.modal("show")}function n(t,e){var A=i("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);A.modal("show")}function o(t,e,A){var n=i(t,e,[{name:"确认",click:function(){A.call(this)}}]);n.modal("show")}function r(t,e,A,n,o){var r=i(t,e,A,o);if(r.modal("show"),n){var a=!0,s=!1,c=void 0;try{for(var l,g=n[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var u=l.value;r.on(u.name,u.callback)}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}}}function i(t,e,A,n){var o=this,r="modal-dialog"+(n?" modal-lg":""),i=$(''),s=$('
');i.append(s);var c=$(''),A.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
'),A.append(this.nodeToolbar),this.canvasContainer=$('
'),this.canvasContainer.css("height",$(window).height()-100),A.append(this.canvasContainer),this.context=new l.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var n="_prop_container",o=$('
');this.canvasContainer.append(o);var i=$('');o.append(i),i.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
');var a=$('
');a.append('
属性值修改后,请回车以确认
'),a.append(this.propContainer),o.append(a),o.draggable();var c=$("#__prop_panel_tool__");c.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(c.removeClass("glyphicon-circle-arrow-left"),c.addClass("glyphicon-circle-arrow-down")):(c.removeClass("glyphicon-circle-arrow-down"),c.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return i(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void h.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void h.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void h.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),A=t.x,n=t.y,o=t.width,r=t.height,i=t.name;A=parseInt(A),n=parseInt(n),o=parseInt(o),r=parseInt(r);var a=A+o+10,s=n+r+10;this.context.resizePaper(a+50,s+50);var c=e._newNodeInstance(A,n,i);c.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(A){17===A.which&&(e=!0),e&&(90===A.which?t.context.undoManager.undo():89===A.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;u.eventEmitter.on(u.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_buildTools",value:function(){var t=this,e=this.context,A=this,n=!0,o=!1,r=void 0;try{for(var i,a=function(){var e=i.value,A=$('");A.click(function(){e.click.call(this)}),t.toolbar.append(A)},s=this.buttons[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)a()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,A.nodeToolbar.children("label").removeClass("active")});var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,A.nodeToolbar.children("label").removeClass("active")});var g=$(''); +this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.undo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),e.undoManager.redo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.SNAPTO_SELECTED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.REMOVE_CLICKED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_CENTER),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_MIDDLE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.UNIFY_SIZE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,A=!1,n=void 0;try{for(var o,r=function(){var e=o.value,A=$('\n \n ");t.nodeToolbar.append(A),A.click(function(){u.eventEmitter.emit(u.TRIGGER_TOOL,e.getType())})},i=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0)r()}catch(t){A=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(A)throw n}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;u.eventEmitter.on(u.OBJECT_SELECTED,function(A){if(t.propContainer.empty(),A instanceof d.default){var n=A.name||A.text.attr("text"),o=$('
'),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=!1,a=!0,s=!1,c=void 0;try{for(var l,g=e.context.allFigures[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var u=l.value;if(u instanceof d.default&&u!==A&&u.name===n){i=!0;break}}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}return i?void h.alert("节点名已存在!"):(A.name=n,A.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t.text.attr("text",n)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(A._tool.getPropertiesProducer().call(A))}else if(A instanceof p.default){var i=$('
'),a=$('');i.append(a),t.propContainer.append(i),a.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=A.from.fromConnections,a=!1,s=!0,c=!1,l=void 0;try{for(var g,u=i[Symbol.iterator]();!(s=(g=u.next()).done);s=!0){var M=g.value;if(M!==A&&M.name===n){a=!0;break}}}catch(t){c=!0,l=t}finally{try{!s&&u.return&&u.return()}finally{if(c)throw l}}return a?void h.alert("连线名已存在"):(A.name=n,A._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
'),c=$('');s.append(c),c.val(A.type),c.change(function(t){var n=$(this).val(),o=A.uuid,r=A.type;A.type=n,A.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=n,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(A.from._tool.getConnectionPropertiesProducer().call(A))}}),u.eventEmitter.on(u.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),u.eventEmitter.emit(u.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(h.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,A=!1,n=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var i=o.value;if(i instanceof d.default){var a=i.validate();a&&t.push(a)}}}catch(t){A=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(A)throw n}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
"}),s='错误:
'+s+"
",h.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,A){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,A){var n=A(254);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+A(255)+");src:url("+A(255)+") format('embedded-opentype'),url("+A(256)+") format('woff'),url("+A(257)+") format('truetype'),url("+A(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,A){var n=A(260);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+A(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,A){A(263),A(264),A(265),A(266),A(267),A(268),A(269),A(270),A(271),A(272),A(273),A(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var A in e)if(void 0!==t.style[A])return{end:e[A]};return!1}t.fn.emulateTransitionEnd=function(e){var A=!1,n=this;t(this).one("bsTransitionEnd",function(){A=!0});var o=function(){A||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.alert");o||A.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(A)})}var A='[data-dismiss="alert"]',n=function(e){t(e).on("click",A,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function A(){i.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=t("#"===r?[]:r);e&&e.preventDefault(),i.length||(i=o.closest(".alert")),i.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",A).emulateTransitionEnd(n.TRANSITION_DURATION):A())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",A,n.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new A(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.isLoading=!1};A.VERSION="3.3.7",A.DEFAULTS={loadingText:"loading..."},A.prototype.setState=function(e){var A="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(A).attr(A,A).prop(A,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(A).removeAttr(A).prop(A,!1))},this),0)},A.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var A=this.$element.find("input");"radio"==A.prop("type")?(A.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==A.prop("type")&&(A.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),A.prop("checked",this.$element.hasClass("active")),t&&A.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=A,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(A){var n=t(A.target).closest(".btn");e.call(n,"toggle"),t(A.target).is('input[type="radio"], input[type="checkbox"]')||(A.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e),i="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new A(this,r)),"number"==typeof e?o.to(e):i?o[i]():r.interval&&o.pause().cycle()})}var A=function(e,A){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=A,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};A.VERSION="3.3.7",A.TRANSITION_DURATION=600,A.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},A.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},A.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},A.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},A.prototype.getItemForDirection=function(t,e){var A=this.getItemIndex(e),n="prev"==t&&0===A||"next"==t&&A==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(A+o)%this.$items.length;return this.$items.eq(r)},A.prototype.to=function(t){var e=this,A=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):A==t?this.pause().cycle():this.slide(t>A?"next":"prev",this.$items.eq(t))},A.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},A.prototype.next=function(){if(!this.sliding)return this.slide("next")},A.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},A.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),i=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var g=t(this.$indicators.children()[this.getItemIndex(r)]);g&&g.addClass("active")}var u=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(u)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),i&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=A,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(A){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var i=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(i.interval=!1),e.call(r,i),a&&r.data("bs.carousel").to(a),A.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var A=t(this);e.call(A,A.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A,n=e.attr("data-target")||(A=e.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function A(e){return this.each(function(){var A=t(this),o=A.data("bs.collapse"),r=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||A.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(A.call(o,"hide"),e||o.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[i](this.$element[0][s])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var A=this.dimension();this.$element[A](this.$element[A]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[A](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(A,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var A=t.hasClass("in");t.attr("aria-expanded",A),e.toggleClass("collapsed",!A).attr("aria-expanded",A)};var o=t.fn.collapse;t.fn.collapse=A,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),i=r.data("bs.collapse"),a=i?"toggle":o.data();A.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A=e.attr("data-target");A||(A=e.attr("href"),A=A&&/#[A-Za-z]/.test(A)&&A.replace(/.*(?=#[^\s]*$)/,""));var n=A&&t(A);return n&&n.length?n:e.parent()}function A(A){A&&3===A.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(A&&"click"==A.type&&/input|textarea/i.test(A.target.tagName)&&t.contains(o[0],A.target)||(o.trigger(A=t.Event("hide.bs.dropdown",r)),A.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var A=t(this),n=A.data("bs.dropdown");n||A.data("bs.dropdown",n=new i(this)),"string"==typeof e&&n[e].call(A)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};i.VERSION="3.3.7",i.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),i=r.hasClass("open");if(A(),!i){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",A);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(A){if(/(38|40|27|32)/.test(A.which)&&!/input|textarea/i.test(A.target.tagName)){var n=t(this);if(A.preventDefault(),A.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),i=o.hasClass("open");if(!i&&27!=A.which||i&&27==A.which)return 27==A.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var c=s.index(A.target);38==A.which&&c>0&&c--,40==A.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},A.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},A.prototype.init=function(e,A,n){if(this.enabled=!0,this.type=e,this.$element=t(A),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var i=o[r];if("click"==i)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=i){var a="hover"==i?"mouseenter":"focusin",s="hover"==i?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},A.prototype.getDelegateOptions=function(){var e={},A=this.getDefaults();return this._options&&t.each(this._options,function(t,n){A[t]!=n&&(e[t]=n)}),e},A.prototype.enter=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusin"==e.type?"focus":"hover"]=!0),A.tip().hasClass("in")||"in"==A.hoverState?void(A.hoverState="in"):(clearTimeout(A.timeout),A.hoverState="in",A.options.delay&&A.options.delay.show?void(A.timeout=setTimeout(function(){"in"==A.hoverState&&A.show()},A.options.delay.show)):A.show())},A.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},A.prototype.leave=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusout"==e.type?"focus":"hover"]=!1),!A.isInStateTrue())return clearTimeout(A.timeout),A.hoverState="out",A.options.delay&&A.options.delay.hide?void(A.timeout=setTimeout(function(){"out"==A.hoverState&&A.hide()},A.options.delay.hide)):A.hide()},A.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,c=s.test(a);c&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),g=r[0].offsetWidth,u=r[0].offsetHeight;if(c){var M=a,d=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+u>d.bottom?"top":"top"==a&&l.top-ud.width?"left":"left"==a&&l.left-gi.top+i.height&&(o.top=i.top+i.height-s)}else{var c=e.left-r,l=e.left+r+A;ci.right&&(o.left=i.left+i.width-l)}return o},A.prototype.getTitle=function(){var t,e=this.$element,A=this.options;return t=e.attr("data-original-title")||("function"==typeof A.title?A.title.call(e[0]):A.title)},A.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},A.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},A.prototype.enable=function(){this.enabled=!0},A.prototype.disable=function(){this.enabled=!1},A.prototype.toggleEnabled=function(){this.enabled=!this.enabled},A.prototype.toggle=function(e){var A=this;e&&(A=t(e.currentTarget).data("bs."+this.type),A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A))),e?(A.inState.click=!A.inState.click,A.isInStateTrue()?A.enter(A):A.leave(A)):A.tip().hasClass("in")?A.leave(A):A.enter(A)},A.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=A,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new A(this,r)),"string"==typeof e&&o[e]())})}var A=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");A.VERSION="3.3.7",A.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),A.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),A.prototype.constructor=A,A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),A=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof A?"html":"append":"text"](A),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},A.prototype.hasContent=function(){return this.getTitle()||this.getContent()},A.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=A,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(A,n){this.$body=t(document.body),this.$scrollElement=t(t(A).is(document.body)?window:A),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function A(A){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof A&&A;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof A&&o[A]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,A="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(A="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[A]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,A=this.getScrollHeight(),n=this.options.offset+A-this.$scrollElement.height(),o=this.offsets,r=this.targets,i=this.activeTarget;if(this.scrollHeight!=A&&this.refresh(),e>=n)return i!=(t=r[r.length-1])&&this.activate(t);if(i&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var i=n.find("> .active"),a=o&&t.support.transition&&(i.length&&i.hasClass("fade")||!!n.find("> .fade").length);i.length&&a?i.one("bsTransitionEnd",r).emulateTransitionEnd(A.TRANSITION_DURATION):r(),i.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=A,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(A){A.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new A(this,r)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.options=t.extend({},A.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};A.VERSION="3.3.7",A.RESET="affix affix-top affix-bottom",A.DEFAULTS={offset:0,target:window},A.prototype.getState=function(t,e,A,n){var o=this.$target.scrollTop(),r=this.$element.offset(),i=this.$target.height();if(null!=A&&"top"==this.affixed)return o=t-n&&"bottom"},A.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(A.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},A.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},A.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,i=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(i,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),c=t.Event(s+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(A.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=A,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var A=t(this),n=A.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(A,n)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var A=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,n,o=t(this),r=A.handle?t(A.handle,o):o;r.on({mousedown:function(r){var i=r.target,a="",s=!1;if(i&&(a=i.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===i.tagName||"INPUT"===i.tagName||i&&"presentation"===t(i).attr("role")||A.exclude&&~t.inArray(r.target,t(A.exclude,o)))){var c=o.offset();e=r.pageX-c.left,n=r.pageY-c.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-n,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A0&&i.push(g)}else{var p=g.rect,T=p.getBBox();(T.x>=A.x&&T.x<=A.x2||T.x2>=A.x&&T.x2<=A.x2)&&(T.y>=A.y&&T.y<=A.y2||T.y2>=A.y&&T.y2<=A.y2)&&s.push(g)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):i.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var n=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,A),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof g.default||e instanceof c.default)){var A=t.offsetX,n=t.offsetY,r=e._newNodeInstance(A,n);r&&!function(){var t=r.uuid,i=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(A,n,i),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof g.default){var e=o.currentConnection;if(e){var A=t.offsetX,n=t.offsetY;e.endX=A,e.endY=n,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);eA&&this.container.width(t+10),e>n&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,A){t||(t=e),e instanceof E.default&&e.select()}),t&&f.eventEmitter.emit(f.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),f.eventEmitter.emit(f.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return M.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),A=this.allFigures.indexOf(e);this.allFigures.splice(A,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;f.eventEmitter.on(f.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),f.eventEmitter.on(f.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,A){var n=e.toJSON(),o=e.uuid,r=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,A=t.to.uuid,i=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(A),s=new E.default(i,{x:i.rect.attr("x"),y:i.rect.attr("y")});i.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(n)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var A=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=A._newNodeInstance(10,10,"");t&&(t.initFromJson(n),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),f.eventEmitter.on(f.ALIGN_CENTER,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(e=g.rect.attr("x"),n=g.rect.attr("width"),e+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.ALIGN_MIDDLE,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(A=g.rect.attr("y"),n=g.rect.attr("height"),A+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.UNIFY_SIZE,function(){var e=void 0,A=void 0,n=new Map,o=0,r=!0,i=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(l instanceof E.default)break;var g={oldWH:{w:l.rect.attr("width"),h:l.rect.attr("height")}};0===o?(e=l.rect.attr("width"),A=l.rect.attr("height")):l.changeSize(e,A),g.newWH={w:l.rect.attr("width"),h:l.rect.attr("height")},n.set(l.uuid,g),o++}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=u.getNodeByUUID(i),s=n.get(i),c=s.newWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=u.getNodeByUUID(i),s=n.get(i),c=s.oldWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new I.default,this.connectionTool=new T.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,A){var n;!function(){"use strict";function o(t,e,A){return t.splice(e,!A||1+A-e+(!(A<0^e>=0)&&(A<0||-1)*t.length)),t.length}var r=function(){var t,e,A=[],n=-1,r=0,i=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(i=!0,t[e](),i=!1,this):this},{add:function(e){return i?this:(A.splice(n+1,A.length-n),A.push(e),r&&A.length>r&&o(A,0,-(r+1)),n=A.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=A[n];return o?(e(o,"undo"),n-=1,t&&t(),this):this},redo:function(){var o=A[n+1];return o?(e(o,"redo"),n+=1,t&&t(),this):this},clear:function(){var e=A.length;A=[],n=-1,t&&e>0&&t()},hasUndo:function(){return n!==-1},hasRedo:function(){return n>>((3&e)<<3)&255;return A},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=A(284).randomBytes;d=u=t&&function(){return t(16)},u()}catch(t){}}function s(t,e,A){var n=e&&A||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=h[t])});o<16;)e[n+o++]=0;return e}function c(t,e){var A=e||0,n=T;return n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]}function l(t,e,A){var n=e&&A||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,i=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=i-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||i>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=i,y=a,w=r,i+=122192928e5;var l=(1e4*(268435455&i)+a)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var g=i/4294967296*1e4&268435455;o[n++]=g>>>8&255,o[n++]=255&g,o[n++]=g>>>24&15|16,o[n++]=g>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var u=t.node||f,M=0;M<6;M++)o[n+M]=u[M];return e?e:c(o)}function g(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new p(16):null,t=null),t=t||{};var o=t.random||(t.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[n+r]=o[r];return e||c(o)}var u,M,d,I;r?i():a();for(var p="function"==typeof o?o:Array,T=[],h={},E=0;E<256;E++)T[E]=(E+256).toString(16).substr(1),h[T[E]]=E;var N=u(),f=[1|N[0],N[1],N[2],N[3],N[4],N[5]],w=16383&(N[6]<<8|N[7]),C=0,y=0,D=g;D.v1=l,D.v4=g,D.parse=s,D.unparse=c,D.BufferClass=p,D._rng=u,D._mathRNG=M,D._nodeRNG=d,D._whatwgRNG=I,"undefined"!=typeof t&&t.exports?t.exports=D:(n=function(){return D}.call(e,A,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,A(280).Buffer)},function(t,e,A){(function(t,n){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,A){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function p(e){return+e!=e&&(e=0),t.alloc(+e)}function T(e,A){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(A){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;A=(""+A).toLowerCase(),o=!0}}function h(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if(A>>>=0,e>>>=0,A<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,A);case"utf8":case"utf-8":return b(this,e,A);case"ascii":return j(this,e,A);case"latin1":case"binary":return m(this,e,A);case"base64":return L(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function N(e,A,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof A&&(A=t.from(A,o)),t.isBuffer(A))return 0===A.length?-1:f(e,A,n,o,r);if("number"==typeof A)return A&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,A,n):Uint8Array.prototype.lastIndexOf.call(e,A,n):f(e,[A],n,o,r); +throw new TypeError("val must be string, number or Buffer")}function f(t,e,A,n,o){function r(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,A/=2}var c;if(o){var l=-1;for(c=A;ca&&(A=a-s),c=A;c>=0;c--){for(var g=!0,u=0;uo&&(n=o)):n=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(o+a<=A){var s,c,l,g;switch(a){case 1:r<128&&(i=r);break;case 2:s=t[o+1],128===(192&s)&&(g=(31&r)<<6|63&s,g>127&&(i=g));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(g=(15&r)<<12|(63&s)<<6|63&c,g>2047&&(g<55296||g>57343)&&(i=g));break;case 4:s=t[o+1],c=t[o+2],l=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&l)&&(g=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&l,g>65535&&g<1114112&&(i=g))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return Q(n)}function Q(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var A="",n=0;nn)&&(A=n);for(var o="",r=e;rA)throw new RangeError("Trying to access beyond buffer length")}function z(e,A,n,o,r,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>r||Ae.length)throw new RangeError("Index out of range")}function Y(t,e,A,n){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-A,2);o>>8*(n?o:1-o)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-A,4);o>>8*(n?o:3-o)&255}function R(t,e,A,n,o,r){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function F(t,e,A,n,o){return o||R(t,e,A,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,A,n,23,4),A+4}function O(t,e,A,n,o){return o||R(t,e,A,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,A,n,52,8),A+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var A,n=t.length,o=null,r=[],i=0;i55295&&A<57344){if(!o){if(A>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=A;continue}if(A<56320){(e-=3)>-1&&r.push(239,191,189),o=A;continue}A=(o-55296<<10|A-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,A<128){if((e-=1)<0)break;r.push(A)}else if(A<2048){if((e-=2)<0)break;r.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;r.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return r}function X(t){for(var e=[],A=0;A>8,o=A%256,r.push(o),r.push(n);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,A,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+A]=t[o];return o}function K(t){return t!==t}var _=A(281),q=A(282),$=A(283);e.Buffer=t,e.SlowBuffer=p,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,A){return a(null,t,e,A)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,A){return c(null,t,e,A)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,A){if(!t.isBuffer(e)||!t.isBuffer(A))throw new TypeError("Arguments must be Buffers");if(e===A)return 0;for(var n=e.length,o=A.length,r=0,i=Math.min(n,o);r0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),""},t.prototype.compare=function(e,A,n,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===A&&(A=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),A<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&A>=n)return 0;if(o>=r)return-1;if(A>=n)return 1;if(A>>>=0,n>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var i=r-o,a=n-A,s=Math.min(i,a),c=this.slice(o,r),l=e.slice(A,n),g=0;go)&&(A=o),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return w(this,t,e,A);case"utf8":case"utf-8":return C(this,t,e,A);case"ascii":return y(this,t,e,A);case"latin1":case"binary":return D(this,t,e,A);case"base64":return x(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,A);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,A){var n=this.length;e=~~e,A=void 0===A?n:~~A,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),A<0?(A+=n,A<0&&(A=0)):A>n&&(A=n),A0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||v(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||v(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||v(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=this[t],o=1,r=0;++r=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=e,o=1,r=this[t+--n];n>0&&(o*=256);)r+=this[t+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||v(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||v(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt16BE=function(t,e){e||v(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt32LE=function(t,e){return e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,A,n){if(t=+t,e|=0,A|=0,!n){var o=Math.pow(2,8*A)-1;z(this,t,e,A,o,0)}var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+A},t.prototype.writeUInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[A]=255&e,A+1},t.prototype.writeUInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeUInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeUInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e):k(this,e,A,!0),A+4},t.prototype.writeUInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=0,i=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+A},t.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=A-1,i=1,a=0;for(this[e+r]=255&t;--r>=0&&(i*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/i>>0)-a&255;return e+A},t.prototype.writeInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[A]=255&e,A+1},t.prototype.writeInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24):k(this,e,A,!0),A+4},t.prototype.writeInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeFloatLE=function(t,e,A){return F(this,t,e,!0,A)},t.prototype.writeFloatBE=function(t,e,A){return F(this,t,e,!1,A)},t.prototype.writeDoubleLE=function(t,e,A){return O(this,t,e,!0,A)},t.prototype.writeDoubleBE=function(t,e,A){return O(this,t,e,!1,A)},t.prototype.copy=function(e,A,n,o){if(n||(n=0),o||0===o||(o=this.length),A>=e.length&&(A=e.length),A||(A=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-A=0;--r)e[r+A]=this[r+n];else if(i<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var i;if("number"==typeof e)for(i=A;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-A(t)}function o(t){var e,n,o,r,i,a,s=t.length;i=A(t),a=new l(3*s/4-i),o=i>0?s-4:s;var g=0;for(e=0,n=0;e>16&255,a[g++]=r>>8&255,a[g++]=255&r;return 2===i?(r=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[g++]=255&r):1===i&&(r=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[g++]=r>>8&255,a[g++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function i(t,e,A){for(var n,o=[],i=e;il?l:c+a));return 1===n?(e=t[A-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,M=g.length;u>1,l=-7,g=A?o-1:0,u=A?-1:1,M=t[e+g];for(g+=u,r=M&(1<<-l)-1,M>>=-l,l+=a;l>0;r=256*r+t[e+g],g+=u,l-=8);for(i=r&(1<<-l)-1,r>>=-l,l+=n;l>0;i=256*i+t[e+g],g+=u,l-=8);if(0===r)r=1-c;else{if(r===s)return i?NaN:(M?-1:1)*(1/0);i+=Math.pow(2,n),r-=c}return(M?-1:1)*i*Math.pow(2,r-n)},e.write=function(t,e,A,n,o,r){var i,a,s,c=8*r-o-1,l=(1<>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:r-1,d=n?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),e+=i+g>=1?u/s:u*Math.pow(2,1-g),e*s>=2&&(i++,s/=2),i+g>=l?(a=0,i=l):i+g>=1?(a=(e*s-1)*Math.pow(2,o),i+=g):(a=e*Math.pow(2,g-1)*Math.pow(2,o),i=0));o>=8;t[A+M]=255&a,M+=d,a/=256,o-=8);for(i=i<0;t[A+M]=255&i,M+=d,i/=256,c-=8);t[A+M-d]|=128*I}},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var A in t)e(t[A],A)}var r=A(285);e.createHash=A(287),e.createHmac=A(299),e.randomBytes=function(e,A){if(!A||!A.call)return new t(r(e));try{A.call(this,void 0,new t(r(e)))}catch(t){A(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var i=A(300)(e);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,A(280).Buffer)},function(t,e,A){(function(e,n){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||A(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),A(280).Buffer)},function(t,e){},function(t,e,A){(function(e){function n(t){return function(){var A=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),A.push(t),this},digest:function(n){var o=e.concat(A),r=t(o);return A=null,n?r.toString(n):r}};return n}}var o=A(288),r=n(A(296)),i=n(A(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new i:o(t)}}).call(e,A(280).Buffer)},function(t,e,A){var e=t.exports=function(t){var A=e[t];if(!A)throw new Error(t+" is not supported (we accept pull requests)");return new A},n=A(280).Buffer,o=A(289)(n);e.sha1=A(290)(n,o),e.sha256=A(294)(n,o),e.sha512=A(295)(n,o)},function(t,e){t.exports=function(t){function e(e,A){this._block=new t(e),this._finalSize=A,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,A){"string"==typeof e&&(A=A||"utf8",e=new t(e,A));for(var n=this._len+=e.length,o=this._s=this._s||0,r=0,i=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var A=this._update(this._block)||this._hash();return t?A.toString(t):A},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){return d.length?d.pop().init():this instanceof A?(this._w=M,e.call(this,64,56),this._h=null,void this.init()):new A}function o(t,e,A,n){return t<20?e&A|~e&n:t<40?e^A^n:t<60?e&A|e&n|A&n:e^A^n}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function i(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,c=4,l=8,g=12,u=16,M=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(A,e),A.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},A.prototype._POOL=d,A.prototype._update=function(t){var e,A,n,s,c,l,g,u,M,d;e=l=this._a,A=g=this._b,n=u=this._c,s=M=this._d,c=d=this._e;for(var I=this._w,p=0;p<80;p++){var T=I[p]=p<16?t.readInt32BE(4*p):a(I[p-3]^I[p-8]^I[p-14]^I[p-16],1),h=i(i(a(e,5),o(p,A,n,s)),i(i(c,T),r(p)));c=s,s=n,n=a(A,30),A=e,e=h}this._a=i(e,l),this._b=i(A,g),this._c=i(n,u),this._d=i(s,M),this._e=i(c,d)},A.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,g),e.writeInt32BE(0|this._e,u),e},A}},function(t,e,A){(function(t,n){function o(t,A){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),I(A)?n.showHidden=A:A&&e._extend(n,A),f(n.showHidden)&&(n.showHidden=!1),f(n.depth)&&(n.depth=2),f(n.colors)&&(n.colors=!1),f(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=r),s(n,t,n.depth)}function r(t,e){var A=o.styles[e];return A?"["+o.colors[A][0]+"m"+t+"["+o.colors[A][1]+"m":t}function i(t,e){return t}function a(t){var e={};return t.forEach(function(t,A){e[t]=!0}),e}function s(t,A,n){if(t.customInspect&&A&&x(A.inspect)&&A.inspect!==e.inspect&&(!A.constructor||A.constructor.prototype!==A)){var o=A.inspect(n,t);return E(o)||(o=s(t,o,n)),o}var r=c(t,A);if(r)return r;var i=Object.keys(A),I=a(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(A)),D(A)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return l(A);if(0===i.length){if(x(A)){var p=A.name?": "+A.name:"";return t.stylize("[Function"+p+"]","special")}if(w(A))return t.stylize(RegExp.prototype.toString.call(A),"regexp");if(y(A))return t.stylize(Date.prototype.toString.call(A),"date");if(D(A))return l(A)}var T="",h=!1,N=["{","}"];if(d(A)&&(h=!0,N=["[","]"]),x(A)){var f=A.name?": "+A.name:"";T=" [Function"+f+"]"}if(w(A)&&(T=" "+RegExp.prototype.toString.call(A)),y(A)&&(T=" "+Date.prototype.toUTCString.call(A)),D(A)&&(T=" "+l(A)),0===i.length&&(!h||0==A.length))return N[0]+T+N[1];if(n<0)return w(A)?t.stylize(RegExp.prototype.toString.call(A),"regexp"):t.stylize("[Object]","special");t.seen.push(A);var C;return C=h?g(t,A,n,I,i):i.map(function(e){return u(t,A,n,I,e,h)}),t.seen.pop(),M(C,T,N)}function c(t,e){if(f(e))return t.stylize("undefined","undefined");if(E(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return h(e)?t.stylize(""+e,"number"):I(e)?t.stylize(""+e,"boolean"):p(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,A,n,o){for(var r=[],i=0,a=e.length;i-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),f(i)){if(r&&o.match(/^\d+$/))return a;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+a}function M(t,e,A){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}function d(t){return Array.isArray(t)}function I(t){return"boolean"==typeof t}function p(t){return null===t}function T(t){return null==t}function h(t){return"number"==typeof t}function E(t){return"string"==typeof t}function N(t){return"symbol"==typeof t}function f(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===L(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===L(t)}function D(t){return C(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),v[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],A=0;A=r)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(t){return"[Circular]"}default:return t}}),a=n[A];A>>e|t<<32-e}function r(t,e){return t>>>e}function i(t,e,A){return t&e^~t&A}function a(t,e,A){return t&e^t&A^e&A}function s(t){return o(t,2)^o(t,13)^o(t,22)}function c(t){return o(t,6)^o(t,11)^o(t,25)}function l(t){return o(t,7)^o(t,18)^r(t,3)}function g(t){return o(t,17)^o(t,19)^r(t,10)}var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],M=new Array(64);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,o,r,M,d,I,p,T,h=this._w;e=0|this._a,A=0|this._b,n=0|this._c,o=0|this._d,r=0|this._e,M=0|this._f,d=0|this._g,I=0|this._h;for(var E=0;E<64;E++){var N=h[E]=E<16?t.readInt32BE(4*E):g(h[E-2])+h[E-7]+l(h[E-15])+h[E-16];p=I+c(r)+i(r,M,d)+u[E]+N,T=s(e)+a(e,A,n),I=d,d=M,M=r,r=o+p,o=n,n=A,A=e,e=p+T}this._a=e+this._a|0,this._b=A+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=M+this._f|0,this._g=d+this._g|0,this._h=I+this._h|0},A.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},A}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,A){return t>>>A|e<<32-A}function r(t,e,A){return t&e^~t&A}function i(t,e,A){return t&e^t&A^e&A}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,s,c,l,g,u,M,d,I,p,T,h,E,N,f=this._w;e=0|this._a,A=0|this._b,n=0|this._c,s=0|this._d,c=0|this._e,l=0|this._f,g=0|this._g,u=0|this._h,M=0|this._al,d=0|this._bl,I=0|this._cl,p=0|this._dl,T=0|this._el,h=0|this._fl,E=0|this._gl,N=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=f[D]=t.readInt32BE(4*D),y=f[D+1]=t.readInt32BE(4*D+4);else{var x=f[D-30],B=f[D-30+1],L=o(x,B,1)^o(x,B,8)^x>>>7,b=o(B,x,1)^o(B,x,8)^o(B,x,7);x=f[D-4],B=f[D-4+1];var Q=o(x,B,19)^o(B,x,29)^x>>>6,j=o(B,x,19)^o(x,B,29)^o(B,x,6),m=f[D-14],S=f[D-14+1],U=f[D-32],v=f[D-32+1];y=b+S,C=L+m+(y>>>0>>0?1:0),y+=j,C=C+Q+(y>>>0>>0?1:0),y+=v,C=C+U+(y>>>0>>0?1:0),f[D]=C,f[D+1]=y}var z=i(e,A,n),Y=i(M,d,I),k=o(e,M,28)^o(M,e,2)^o(M,e,7),R=o(M,e,28)^o(e,M,2)^o(e,M,7),F=o(c,T,14)^o(c,T,18)^o(T,c,9),O=o(T,c,14)^o(T,c,18)^o(c,T,9),H=a[D],V=a[D+1],G=r(c,l,g),P=r(T,h,E),X=N+O,W=u+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

>>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+Y,Z=k+z+(J>>>0>>0?1:0);u=g,N=E,g=l,E=h,l=c,h=T,T=p+X|0,c=s+W+(T>>>0

>>0?1:0)|0,s=n,p=I,n=A,I=d,A=e,d=M,M=X+J|0,e=W+Z+(M>>>0>>0?1:0)|0}this._al=this._al+M|0,this._bl=this._bl+d|0,this._cl=this._cl+I|0,this._dl=this._dl+p|0,this._el=this._el+T|0,this._fl=this._fl+h|0,this._gl=this._gl+E|0,this._hl=this._hl+N|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+A+(this._bl>>>0>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0>>0?1:0)|0,this._d=this._d+s+(this._dl>>>0

>>0?1:0)|0,this._e=this._e+c+(this._el>>>0>>0?1:0)|0,this._f=this._f+l+(this._fl>>>0>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+u+(this._hl>>>0>>0?1:0)|0},A.prototype._hash=function(){function e(t,e,n){A.writeInt32BE(t,n),A.writeInt32BE(e,n+4)}var A=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),A},A}},function(t,e,A){function n(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var A=1732584193,n=-271733879,o=-1732584194,l=271733878,g=0;g>16)+(e>>16)+(A>>16);return n<<16|65535&A}function l(t,e){return t<>>32-e}var g=A(297);t.exports=function(t){return g.hash(t,n,16)}},function(t,e,A){(function(e){function A(t,A){if(t.length%r!==0){var n=t.length+(r-t.length%r);t=e.concat([t,i],n)}for(var o=[],a=A?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var A=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=I(t),o=8*t.length,r=8*t.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var i=0;i>>24)|4278255360&(a<<24|a>>>8)}var s=p(A);return new e(s)}t.exports=s;var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],M=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],I=function(t){for(var e=[],A=0,n=0;A>>5]|=t[A]<<24-n%32;return e},p=function(t){for(var e=[],A=0;A<32*t.length;A+=8)e.push(t[A>>>5]>>>24-A%32&255);return e},T=function(t,e,s){for(var I=0;I<16;I++){var p=s+I,T=e[p];e[p]=16711935&(T<<8|T>>>24)|4278255360&(T<<24|T>>>8)}var h,E,N,f,w,C,y,D,x,B;C=h=t[0],y=E=t[1],D=N=t[2],x=f=t[3],B=w=t[4];for(var L,I=0;I<80;I+=1)L=h+e[s+c[I]]|0,L+=I<16?A(E,N,f)+M[0]:I<32?n(E,N,f)+M[1]:I<48?o(E,N,f)+M[2]:I<64?r(E,N,f)+M[3]:i(E,N,f)+M[4],L|=0,L=a(L,g[I]),L=L+w|0,h=w,w=f,f=a(N,10),N=E,E=L,L=C+e[s+l[I]]|0,L+=I<16?i(y,D,x)+d[0]:I<32?r(y,D,x)+d[1]:I<48?o(y,D,x)+d[2]:I<64?n(y,D,x)+d[3]:A(y,D,x)+d[4],L|=0,L=a(L,u[I]),L=L+B|0,C=B,B=x,x=a(D,10),D=y,y=L;L=t[1]+N+x|0,t[1]=t[2]+f+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+h+y|0,t[4]=t[0]+E+D|0,t[0]=L}}).call(e,A(280).Buffer)},function(t,e,A){(function(e){function n(t,A){if(!(this instanceof n))return new n(t,A);this._opad=s,this._alg=t;var i="sha512"===t?128:64;A=this._key=e.isBuffer(A)?A:new e(A),A.length>i?A=o(t).update(A).digest():A.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,a);for(var I=1;Ie&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(A,n){e.push(c.default.createElement("button",{type:"button",key:n,className:A.className,onClick:function(e){A.click(t.props.dispatch)}},c.default.createElement("i",{className:A.icon})," ",A.name))});var A=this.props.large,n="modal-dialog"+(A?" modal-lg":"");return c.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},c.default.createElement("div",{className:n},c.default.createElement("div",{className:"modal-content"},c.default.createElement("div",{className:"modal-header"},c.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),c.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,c.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),c.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),c.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=u},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.CLOSE_REFERENCE_DIALOG=e.OPEN_REFERENCE_DIALOG=void 0;var o=A(240),r=n(o);e.OPEN_REFERENCE_DIALOG="open_reference_dialog",e.CLOSE_REFERENCE_DIALOG="close_reference_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case c.LOAD_MASTER_COMPLETED:return Object.assign({},t.prototype,{data:e.masterData});case c.DEL_MASTER:var A=e.rowIndex,n=[].concat(o(t.data));return n.splice(A,1),Object.assign({},t.prototype,{data:n});case c.ADD_MASTER:var n=[].concat(o(t.data));return n.push({name:"",type:"Custom",constants:[]}),Object.assign({},t.prototype,{data:n});case c.SAVE:var r=t.data;return c.saveData(r,e.newVersion,e.file),t;default:return t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case c.LOAD_SLAVE_COMPLETE:return Object.assign({},t.prototype,{data:e.masterRowData});case c.DEL_SLAVE:var A=e.rowIndex,n=Object.assign({},t.data);return n.constants.splice(A,1),Object.assign({},t.prototype,{data:n});case c.ADD_SLAVE:var n=Object.assign({},t.data);return n.constants.push({name:"",label:"",type:"String"}),Object.assign({},t.prototype,{data:n});default:return t}}Object.defineProperty(e,"__esModule",{value:!0});var a=A(183),s=A(313),c=n(s);e.default=(0,a.combineReducers)({master:r,slave:i})},function(t,e,A){"use strict";function n(t,e){return{newVersion:t,file:e,type:h}}function o(t,e,A){var n='';n+="";var o="";if(t.forEach(function(t,e){if(!t.name||t.name.length<1)return o="常量分类名称不能为空.",!1;if(!t.label||t.label.length<1)return o="常量分类标题不能为空.",!1;n+="";var A=t.constants;return A&&0!==A.length?(A.forEach(function(t,e){return!t.name||t.name.length<1?(o="常量名不能为空.",!1):!t.label||t.label.length<1?(o="常量标题不能为空.",!1):!t.type||t.type.length<1?(o="常量数据类型不能为空.",!1):void(n+="")}),!(o.length>1)&&void(n+="")):(o="常量分类["+t.label+"]下未定义具体的常量信息",!1)}),o.length>1)return void bootbox.alert(o+",不能保存!");n+="";var r={content:n,file:A,newVersion:e},i=window._server+"/common/saveFile";e?bootbox.prompt("请输入新版本描述.",function(t){t&&(r.versionComment=t,(0,g.ajaxSave)(i,r,function(){bootbox.alert("保存成功!")}))}):(0,g.ajaxSave)(i,r,function(){bootbox.alert("保存成功!")})}function r(){return{type:d}}function i(t){return{rowIndex:t,type:I}}function a(t){return{rowIndex:t,type:T}}function s(){return{type:p}}function c(t){return function(e){var A=window._server+"/xml";$.ajax({url:A,type:"POST",data:{files:t},success:function(t){e({type:u,masterData:t[0].categories})},error:function(t){t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function l(t){return{type:M,masterRowData:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.SAVE=e.DEL_SLAVE=e.ADD_SLAVE=e.DEL_MASTER=e.ADD_MASTER=e.LOAD_SLAVE_COMPLETE=e.LOAD_MASTER_COMPLETED=void 0,e.save=n,e.saveData=o,e.addMaster=r,e.deleteMaster=i,e.deleteSlave=a,e.addSlave=s,e.loadMasterData=c,e.loadSlaveData=l;var g=A(226),u=e.LOAD_MASTER_COMPLETED="load_master_completed",M=e.LOAD_SLAVE_COMPLETE="load_slave_completed",d=e.ADD_MASTER="add_master",I=e.DEL_MASTER="del_master",p=e.ADD_SLAVE="add_slave",T=e.DEL_SLAVE="del_slave",h=e.SAVE="save"},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return{masterData:t.master.data||[],masterRowData:t.slave.data||{}}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var A=0;A.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&T.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function A(t,e){var n,o,i;if(e.singleton){var r=w++;n=M||(M=s(e)),o=c.bind(null,n,r,!1),i=c.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(e),o=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=u.bind(null,n),i=function(){a(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function c(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=C(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function u(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var g={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),f=h(function(){return document.head||document.getElementsByTagName("head")[0]}),M=null,w=0,T=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return o(n,e),function(t){for(var r=[],a=0;a1){for(var f=Array(p),M=0;M1){for(var T=Array(w),C=0;C>"),D={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:l,element:A(),instanceOf:c,node:h(),objectOf:d,oneOf:u,oneOfType:g,shape:p};i.prototype=Error.prototype,t.exports=D},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function o(t){return r.isValidElement(t)?void 0:i("143"),t}var i=n(19),r=n(21);n(20);t.exports=o},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var o=n(43),i=n(48),r=n(174),a=n(71),s=n(68),l=n(179),A=n(180),c=n(181),u=n(182);n(56);i.inject();var d={findDOMNode:A,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:l,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?o.getNodeFromInstance(t):null}},Mount:r,Reconciler:a});t.exports=d},function(t,e,n){"use strict";function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function a(t,e){if(!(t._flags&h.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],l=o(s)._domID;if(0!==l){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(g)===String(l)||8===r.nodeType&&r.nodeValue===" react-text: "+l+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+l+" "){i(s,r);continue t}c("32",l)}}t._flags|=h.hasCachedChildNodes}}function s(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,o;t&&(o=t[p]);t=e.pop())n=o,e.length&&a(o,t);return n}function l(t){var e=s(t);return null!=e&&e._hostNode===t?e:null}function A(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())a(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),d=n(47),g=(n(46),u.ID_ATTRIBUTE_NAME),h=d,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),f={getClosestInstanceFromNode:s,getInstanceFromNode:l,getNodeFromInstance:A,precacheChildNodes:a,precacheNode:i,uncacheNode:r};t.exports=f},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,o=0;o8&&I<=11),N=32,m=String.fromCharCode(N),b={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},D=!1,x=null,v={eventTypes:b,extractEvents:function(t,e,n,o){return[A(t,e,n,o),d(t,e,n,o)]}};t.exports=v},function(t,e,n){"use strict";function o(t,e,n){var o=e.dispatchConfig.phasedRegistrationNames[n];return M(t,o)}function i(t,e,n){var i=o(t,n,e);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(t._targetInst,i,t)}function a(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?h.getParentInstance(e):null;h.traverseTwoPhase(n,i,t)}}function s(t,e,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,i=M(t,o);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}}function l(t){t&&t.dispatchConfig.registrationName&&s(t._targetInst,null,t)}function A(t){f(t,r)}function c(t){f(t,a)}function u(t,e,n,o){h.traverseEnterLeave(n,o,s,t,e)}function d(t){f(t,l)}var g=n(52),h=n(54),p=n(58),f=n(59),M=(n(56),g.getListener),w={accumulateTwoPhaseDispatches:A,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:u};t.exports=w},function(t,e,n){"use strict";function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function i(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(e));default:return!1}}var r=n(44),a=n(53),s=n(54),l=n(55),A=n(58),c=n(59),u=(n(46),{}),d=null,g=function(t,e){t&&(s.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},h=function(t){return g(t,!0)},p=function(t){return g(t,!1)},f=function(t){return"."+t._rootNodeID},M={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var o=f(t),i=u[e]||(u[e]={});i[o]=n;var s=a.registrationNameModules[e];s&&s.didPutListener&&s.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(i(e,t._currentElement.type,t._currentElement.props))return null;var o=f(t);return n&&n[o]},deleteListener:function(t,e){var n=a.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var o=u[e];if(o){var i=f(t);delete o[i]}},deleteAllListeners:function(t){var e=f(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var o=a.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,o){for(var i,r=a.plugins,s=0;s-1?void 0:a("96",t),!A.plugins[n]){e.extractEvents?void 0:a("97",t),A.plugins[n]=e;var o=e.eventTypes;for(var r in o)i(o[r],e,r)?void 0:a("98",r,t)}}}function i(t,e,n){A.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,A.eventNameDispatchConfigs[n]=t;var o=t.phasedRegistrationNames;if(o){for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];r(s,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){A.registrationNameModules[t]?a("100",t):void 0,A.registrationNameModules[t]=e,A.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(44),s=(n(46),null),l={},A={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){s?a("101"):void 0,s=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a("102",n):void 0,l[n]=i,e=!0)}e&&o()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return A.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var i=A.registrationNameModules[n[o]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var t in l)l.hasOwnProperty(t)&&delete l[t];A.plugins.length=0;var e=A.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var o=A.registrationNameModules;for(var i in o)o.hasOwnProperty(i)&&delete o[i]}};t.exports=A},function(t,e,n){"use strict";function o(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,o){var i=t.type||"unknown-event";t.currentTarget=M.getNodeFromInstance(o),e?p.invokeGuardedCallbackWithCatch(i,n,t):p.invokeGuardedCallback(i,n,t),t.currentTarget=null}function s(t,e){var n=t._dispatchListeners,o=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-e:void 0;return this._fallbackText=i.slice(t,s),this._fallbackText}}),r.addPoolingTo(o),t.exports=o},function(t,e,n){"use strict";var o=n(44),i=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e),o}return new n(t,e)},a=function(t,e,n){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n),i}return new o(t,e,n)},s=function(t,e,n,o){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,n,o),r}return new i(t,e,n,o)},l=function(t,e,n,o,i){var r=this;if(r.instancePool.length){var a=r.instancePool.pop();return r.call(a,t,e,n,o,i),a}return new r(t,e,n,o,i)},A=function(t){var e=this;t instanceof e?void 0:o("25"),t.destructor(),e.instancePool.length8));var Q=!1;C.canUseDOM&&(Q=m("input")&&(!document.documentMode||document.documentMode>11));var j={get:function(){return L.get.call(this)},set:function(t){B=""+t,L.set.call(this,t)}},U={eventTypes:D,extractEvents:function(t,e,n,i){var r,a,s=e?I.getNodeFromInstance(e):window;if(o(s)?S?r=l:a=A:b(s)?Q?r=g:(r=p,a=h):f(s)&&(r=M),r){var c=r(t,e);if(c){var u=E.getPooled(D.change,c,n,i);return u.type="change",T.accumulateTwoPhaseDispatches(u),u}}a&&a(t,s,e)}};t.exports=U},function(t,e,n){"use strict";function o(){D.ReactReconcileTransaction&&I?void 0:c("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=D.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,i,r,a){return o(),I.batchedUpdates(t,e,n,i,r,a)}function a(t,e){return t._mountOrder-e._mountOrder}function s(t){var e=t.dirtyComponentsLength;e!==M.length?c("124",e,M.length):void 0,M.sort(a),w++;for(var n=0;n]/,l=n(91),A=l(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{o=o||document.createElement("div"),o.innerHTML=""+e+"";for(var n=o.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(A=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&s.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=A},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,o,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,o,i)})}:t};t.exports=n},function(t,e,n){"use strict";var o=n(60),i=n(93),r=n(90),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};o.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,i(e))})),t.exports=a},function(t,e){"use strict";function n(t){var e=""+t,n=i.exec(e);if(!n)return e;var o,r="",a=0,s=0;for(a=n.index;a]/;t.exports=o},function(t,e,n){"use strict";var o=n(44),i=n(88),r=n(60),a=n(95),s=n(57),l=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:o("56"),e?void 0:o("57"),"HTML"===t.nodeName?o("58"):void 0,"string"==typeof e){var n=a(e,s)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=l},function(t,e,n){"use strict";function o(t){var e=t.match(c);return e&&e[1].toLowerCase()}function i(t,e){var n=A;A?void 0:l(!1);var i=o(t),r=i&&s(i);if(r){n.innerHTML=r[1]+t+r[2];for(var c=r[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:l(!1),a(u).forEach(e));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var r=n(60),a=n(96),s=n(97),l=n(46),A=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=i},function(t,e,n){"use strict";function o(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?a(!1):void 0,"number"!=typeof e?a(!1):void 0,0===e||e-1 in t?void 0:a(!1),"function"==typeof t.callee?a(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),o=0;o":a.innerHTML="<"+t+">",s[t]=!a.firstChild),s[t]?d[t]:null}var i=n(60),r=n(46),a=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],A=[1,"","
"],c=[3,"","
"],u=[1,'',""],d={"*":[1,"?

","
"],area:[1,"",""],col:[2,"","
"],legend:[1,"
","
"],param:[1,"",""],tr:[2,"","
"],optgroup:l,option:l,caption:A,colgroup:A,tbody:A,tfoot:A,thead:A,td:c,th:c},g=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];g.forEach(function(t){d[t]=u,s[t]=!0}),t.exports=o},function(t,e,n){"use strict";var o=n(87),i=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=i.getNodeFromInstance(t);o.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function o(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",o(t)):void 0)}function r(t,e,n,o){if(!(o instanceof Q)){var i=t._hostContainerInfo,r=i._node&&i._node.nodeType===P,s=r?i._node:i._ownerDocument;z(e,s),o.getReactMountReady().enqueue(a,{inst:t,registrationName:e,listener:n})}}function a(){var t=this;E.putListener(t.inst,t.registrationName,t.listener)}function s(){var t=this;x.postMountWrapper(t)}function l(){var t=this;L.postMountWrapper(t)}function A(){var t=this;v.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:p("63");var e=R(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[m.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&t._wrapperState.listeners.push(m.trapBubbledEvent(n,G[n],e));break;case"source":t._wrapperState.listeners=[m.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[m.trapBubbledEvent("topError","error",e),m.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[m.trapBubbledEvent("topReset","reset",e),m.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[m.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){B.postUpdateWrapper(this)}function d(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function g(t,e){return t.indexOf("-")>=0||null!=e.is}function h(t){var e=t.type;d(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),f=n(16),M=n(100),w=n(102),T=n(88),C=n(89),I=n(45),y=n(110),E=n(52),N=n(53),m=n(112),b=n(47),D=n(43),x=n(115),v=n(118),B=n(119),L=n(120),S=(n(74),n(121)),Q=n(141),j=(n(57),n(93)),U=(n(46),n(77),n(130),n(144),n(56),b),k=E.deleteListener,R=D.getNodeFromInstance,z=m.listenTo,Y=N.registrationNameModules,O={string:!0,number:!0},F="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},P=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=f({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(t,e,n,o){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":x.mountWrapper(this,r,e),r=x.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"option":v.mountWrapper(this,r,e),r=v.getHostProps(this,r);break;case"select":B.mountWrapper(this,r,e),r=B.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"textarea":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(c,this)}i(this,r);var a,u;null!=e?(a=e._namespaceURI,u=e._tag):n._tag&&(a=n._namespaceURI,u=n._tag),(null==a||a===C.svg&&"foreignobject"===u)&&(a=C.html),a===C.html&&("svg"===this._tag?a=C.svg:"math"===this._tag&&(a=C.mathml)),this._namespaceURI=a;var d;if(t.useCreateElement){var g,h=n._ownerDocument;if(a===C.html)if("script"===this._tag){var p=h.createElement("div"),f=this._currentElement.type;p.innerHTML="<"+f+">",g=p.removeChild(p.firstChild)}else g=r.is?h.createElement(this._currentElement.type,r.is):h.createElement(this._currentElement.type);else g=h.createElementNS(a,this._currentElement.type);D.precacheNode(this,g),this._flags|=U.hasCachedChildNodes,this._hostParent||y.setAttributeForRoot(g),this._updateDOMProperties(null,r,t);var w=T(g);this._createInitialChildren(t,r,o,w),d=w}else{var I=this._createOpenTagMarkupAndPutListeners(t,r),E=this._createContentMarkup(t,r,o);d=!E&&X[this._tag]?I+"/>":I+">"+E+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(l,this),r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(A,this)}return d},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];if(null!=i)if(Y.hasOwnProperty(o))i&&r(this,o,i,t);else{o===F&&(i&&(i=this._previousStyleCopy=f({},e.style)),i=w.createMarkupForStyles(i,this));var a=null;null!=this._tag&&g(this._tag,e)?V.hasOwnProperty(o)||(a=y.createMarkupForCustomAttribute(o,i)):a=y.createMarkupForProperty(o,i),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var o="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(o=i.__html);else{var r=O[typeof e.children]?e.children:null,a=null!=r?null:e.children;if(null!=r)o=j(r);else if(null!=a){var s=this.mountChildren(a,t,n);o=s.join("")}}return W[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(t,e,n,o){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&T.queueHTML(o,i.__html);else{var r=O[typeof e.children]?e.children:null,a=null!=r?null:e.children;if(null!=r)T.queueText(o,r);else if(null!=a)for(var s=this.mountChildren(a,t,n),l=0;l1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function r(t,e){var n=s.get(t);if(!n){return null}return n}var a=n(44),s=(n(22),n(123)),l=(n(74),n(68)),A=(n(46),n(56),{isMounted:function(t){var e=s.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){A.validateCallback(e,n);var i=r(t);return i?(i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],void o(i)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],o(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,o(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(e),o(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,o(t)},validateCallback:function(t,e){t&&"function"!=typeof t?a("122",e,i(t)):void 0}});t.exports=A},function(t,e,n){"use strict";var o=(n(16),n(57)),i=(n(56),o);t.exports=i},function(t,e,n){"use strict";var o=n(16),i=n(88),r=n(43),a=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(a.prototype,{mountComponent:function(t,e,n,o){var a=n._idCounter++;this._domID=a,this._hostParent=e,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(t.useCreateElement){var l=n._ownerDocument,A=l.createComment(s);return r.precacheNode(this,A),i(A)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=a},function(t,e,n){"use strict";function o(t,e){"_hostNode"in t?void 0:l("33"),"_hostNode"in e?void 0:l("33");for(var n=0,o=t;o;o=o._hostParent)n++;for(var i=0,r=e;r;r=r._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t?void 0:l("35"),"_hostNode"in e?void 0:l("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:l("36"),t._hostParent}function a(t,e,n){for(var o=[];t;)o.push(t),t=t._hostParent;var i;for(i=o.length;i-- >0;)e(o[i],"captured",n);for(i=0;i0;)n(l[A],"captured",r)}var l=n(44);n(46);t.exports={isAncestor:i,getLowestCommonAncestor:o,getParentInstance:r,traverseTwoPhase:a,traverseEnterLeave:s}},function(t,e,n){"use strict";var o=n(44),i=n(16),r=n(87),a=n(88),s=n(43),l=n(93),A=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(A.prototype,{mountComponent:function(t,e,n,o){var i=n._idCounter++,r=" react-text: "+i+" ",A=" /react-text ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(r),d=c.createComment(A),g=a(c.createDocumentFragment());return a.queueChild(g,a(u)),this._stringText&&a.queueChild(g,a(c.createTextNode(this._stringText))),a.queueChild(g,a(d)),s.precacheNode(this,u),this._closingComment=d,g}var h=l(this._stringText);return t.renderToStaticMarkup?h:""+h+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();r.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=s.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function o(){this.reinitializeTransaction()}var i=n(16),r=n(68),a=n(75),s=n(57),l={initialize:s,close:function(){d.isBatchingUpdates=!1}},A={initialize:s,close:r.flushBatchedUpdates.bind(r)},c=[A,l];i(o.prototype,a,{getTransactionWrappers:function(){return c}});var u=new o,d={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,o,i,r){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?t(e,n,o,i,r):u.perform(t,null,e,n,o,i,r)}};t.exports=d},function(t,e,n){"use strict";function o(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=g(t.nativeEvent),n=u.getClosestInstanceFromNode(e),i=n;do t.ancestors.push(i),i=i&&o(i);while(i);for(var r=0;re.end?(n=e.end,o=e.start):(n=e.start,o=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",o-n),i.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),o=t[c()].length,i=Math.min(e.start,o),r=void 0===e.end?i:Math.min(e.end,o);if(!n.extend&&i>r){var a=r;r=i,i=a}var s=A(t,i),l=A(t,r);if(s&&l){var u=document.createRange();u.setStart(s.node,s.offset),n.removeAllRanges(),i>r?(n.addRange(u),n.extend(l.node,l.offset)):(u.setEnd(l.node,l.offset),n.addRange(u))}}}var l=n(60),A=n(156),c=n(63),u=l.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:u?i:r,setOffsets:u?a:s};t.exports=d},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var i=n(t),r=0,a=0;i;){if(3===i.nodeType){if(a=r+i.textContent.length,r<=e&&a>=e)return{node:i,offset:e-r};r=a}i=n(o(i))}}t.exports=i},function(t,e,n){"use strict";function o(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?o(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(158);t.exports=o},function(t,e,n){"use strict";function o(t){return i(t)&&3==t.nodeType}var i=n(159);t.exports=o},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function o(t){if("selectionStart"in t&&l.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(t,e){if(w||null==p||p!==c())return null;var n=o(p);if(!M||!d(M,n)){M=n;var i=A.getPooled(h.select,f,t,e);return i.type="select",i.target=p,r.accumulateTwoPhaseDispatches(i),i}return null}var r=n(51),a=n(60),s=n(43),l=n(154),A=n(65),c=n(160),u=n(78),d=n(130),g=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,f=null,M=null,w=!1,T=!1,C={eventTypes:h,extractEvents:function(t,e,n,o){if(!T)return null;var r=e?s.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,f=e,M=null);break;case"topBlur":p=null,f=null,M=null;break;case"topMouseDown":w=!0;break;case"topContextMenu":case"topMouseUp":return w=!1,i(n,o);case"topSelectionChange":if(g)break;case"topKeyDown":case"topKeyUp":return i(n,o)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(T=!0)}};t.exports=C},function(t,e,n){"use strict";function o(t){return"."+t._rootNodeID}function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),a=n(150),s=n(51),l=n(43),A=n(164),c=n(165),u=n(65),d=n(166),g=n(167),h=n(81),p=n(170),f=n(171),M=n(172),w=n(82),T=n(173),C=n(57),I=n(168),y=(n(46),{}),E={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,o="top"+e,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};y[t]=i,E[o]=i});var N={},m={eventTypes:y,extractEvents:function(t,e,n,o){var i=E[t];if(!i)return null;var a;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=u;break;case"topKeyPress":if(0===I(n))return null;case"topKeyDown":case"topKeyUp":a=g;break;case"topBlur":case"topFocus":a=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=f;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=A;break;case"topTransitionEnd":a=M;break;case"topScroll":a=w;break;case"topWheel":a=T;break;case"topCopy":case"topCut":case"topPaste":a=c}a?void 0:r("86",t);var l=a.getPooled(i,e,n,o);return s.accumulateTwoPhaseDispatches(l),l},didPutListener:function(t,e,n){if("onClick"===e&&!i(t._tag)){var r=o(t),s=l.getNodeFromInstance(t);N[r]||(N[r]=a.listen(s,"click",C))}},willDeleteListener:function(t,e){if("onClick"===e&&!i(t._tag)){var n=o(t);N[n].remove(),delete N[n]}}};t.exports=m},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r={relatedTarget:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(168),a=n(169),s=n(84),l={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};i.augmentClass(o,l),t.exports=o},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function o(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=i(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var i=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={dataTransfer:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(84),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};i.augmentClass(o,a),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e){for(var n=Math.min(t.length,e.length),o=0;o.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=f.createElement(z,{child:e});if(t){var l=y.get(t);a=l._processChildContext(l._context)}else a=D;var c=d(n);if(c){var u=c._currentElement,h=u.props.child;if(B(h,e)){var p=c._renderedComponent.getPublicInstance(),M=o&&function(){o.call(p)};return Y._updateRootComponent(c,s,a,n,M),p}Y.unmountComponentAtNode(n)}var w=i(n),T=w&&!!r(w),C=A(n),I=T&&!c&&!C,E=Y._renderNewRootComponent(s,n,I,a)._renderedComponent.getPublicInstance();return o&&o.call(E),E},render:function(t,e,n){return Y._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:g("40");var e=d(t);if(!e){A(t),1===t.nodeType&&t.hasAttribute(S);return!1}return delete k[e._instance.rootID],b.batchedUpdates(l,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,a){if(c(e)?void 0:g("41"),r){var s=i(e);if(E.canReuseMarkup(t,s))return void w.precacheNode(n,s);var l=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var A=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,l);var u=t,d=o(u,A),p=" (client) "+u.substring(d-20,d+20)+"\n (server) "+A.substring(d-20,d+20);e.nodeType===j?g("42",p):void 0}if(e.nodeType===j?g("43"):void 0,a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);h.insertTreeBefore(e,t,null)}else v(e,t),w.precacheNode(n,e.firstChild)}};t.exports=Y},function(t,e,n){"use strict";function o(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===i?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var i=(n(144),9);t.exports=o},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var o=n(178),i=/\/?>/,r=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=o(t);return r.test(t)?t:t.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=o(t);return i===n}};t.exports=a},function(t,e){"use strict";function n(t){for(var e=1,n=0,i=0,r=t.length,a=r&-4;i服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=o,e.ajaxSave=i,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(){var t="_ui_"+c++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){s(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function a(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){s(t),e(t)},error:function(){alert("加载资源失败.")}})}function s(t){switch(t.type){case"root":t._icon=A.default.frameStyle.getRootIcon(),t._style=A.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=A.default.frameStyle.getFolderIcon(),t._style=A.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=A.default.frameStyle.getRuleIcon(),t._style=A.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=A.default.frameStyle.getProjectIcon(),t._style=A.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=A.default.frameStyle.getResourceIcon(),t._style=A.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=A.default.frameStyle.getResourcePackageIcon(),t._style=A.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=A.default.frameStyle.getLibIcon(),t._style=A.default.frameStyle.getLibIconStyle();break;case"action":t._icon=A.default.frameStyle.getActionIcon(),t._style=A.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=A.default.frameStyle.getParameterIcon(),t._style=A.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=A.default.frameStyle.getConstantIcon(),t._style=A.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=A.default.frameStyle.getVariableIcon(),t._style=A.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=A.default.frameStyle.getRuleLibIcon(),t._style=A.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=A.default.frameStyle.getDecisionTableLibIcon(),t._style=A.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=A.default.frameStyle.getDecisionTreeLibIcon(),t._style=A.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=A.default.frameStyle.getFlowLibIcon(),t._style=A.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=A.default.frameStyle.getUlIcon(),t._style=A.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=A.default.frameStyle.getDecisionTableIcon(),t._style=A.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=A.default.frameStyle.getScriptDecisionTableIcon(),t._style=A.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=A.default.frameStyle.getDecisionTreeIcon(),t._style=A.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=A.default.frameStyle.getFlowIcon(),t._style=A.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=A.default.frameStyle.getScorecardIcon(),t._style=A.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){s(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=i,e.loadFileVersions=r,e.loadResourceTreeData=a;var l=n(228),A=o(l),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=o},,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?A.show():A.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,o=e.operationConfig,i=e.dispatch,r=e.selectFirst,a=(e.uniqueKey,this.props.rows||[]),s=[],l=[];n.forEach(function(e,n){e.editable?s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:e.width}},A.default.createElement("label",null,e.label),A.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:e.width}},A.default.createElement("label",null,e.label)))}),o&&s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:o.width}},A.default.createElement("label",null,"操作列")));var c=A.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?A.default.createElement("td",{key:(0,f.uniqueID)()},A.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):A.default.createElement("td",{key:(0,f.uniqueID)()}," ")}),o?A.default.createElement("td",null):null);l.push(c),a.forEach(function(e,a){e.id||(e.id=(0,f.uniqueID)());var s=e.id;0===a&&r?l.push(A.default.createElement(g.default,{key:s,select:!0,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:a})):l.push(A.default.createElement(g.default,{key:s,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:a}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return A.default.createElement("table",{className:"table table-bordered",style:u},A.default.createElement("thead",null,A.default.createElement("tr",{className:"well"},s)),A.default.createElement("tbody",null,l))}}]),e}(l.Component);M.propTypes={headers:A.default.PropTypes.array.isRequired,operationConfig:l.PropTypes.object},e.default=M},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var o=e[t];o&&""!==o||(o="{}");var i=JSON.parse(o)||{},r=i.rows||[],a=i.type,s=function(o){var i={type:a,rows:o},r=JSON.stringify(i);e[t]=r;var s=n.find("div");s.html(r)};if(a){var l=null,A=!0,c=!1,u=void 0;try{for(var d,g=simulatorCategoryData[Symbol.iterator]();!(A=(d=g.next()).done);A=!0){var h=d.value;if(a===h.clazz){l=h;break}}}catch(t){c=!0,u=t}finally{try{!A&&g.return&&g.return()}finally{if(c)throw u}}var f=l.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:f,rows:r,callback:s})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,o=!1,i=void 0;try{for(var l,A=t[Symbol.iterator]();!(n=(l=A.next()).done);n=!0){var c=l.value;e.append('")}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}e.append(''),M.MsgBox.dialog("选择子对象类型",e,function(){if(a=e.val(),!a||""===a)return void M.MsgBox.alert("请先选择子对象类型!");var n=null,o=!0,i=!1,l=void 0; +try{for(var A,c=t[Symbol.iterator]();!(o=(A=c.next()).done);o=!0){var u=A.value;if(a===u.clazz){n=u;break}}}catch(t){i=!0,l=t}finally{try{!o&&c.return&&c.return()}finally{if(i)throw l}}var d=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:d,rows:r,callback:s})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var o=n.find("div");o.html(e[t]),o.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,o=e.header,i=o.dateFormat,r=n[o.name];if(i){var a=new Date(r);r=(0,f.formatDate)(a,i)}r&&"object"===("undefined"==typeof r?"undefined":l(r))&&(r=JSON.stringify(r));var s={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:s,onClick:function(e){if(o.editable){var i=e.target;$(i).css({display:"none"}),n._editorType?t._showEditor(o.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:i,rowData:n,colId:o.id})}}},r))}}]),e}(c.Component);e.default=w},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var i=n(240),r=o(i);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,l,A;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],a(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(r(n))for(s=Array.prototype.slice.call(arguments,1),A=n.slice(),i=A.length,l=0;l0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var o=n(242).default,i=n(243).default,r=n(251),a=n(252).default,s=n(302);t.exports={Tool:o,Node:i,MsgBox:r,Event:s,FlowDesigner:a}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_newNodeInstance",value:function(t,e,n){var o=this.newNode();return o?(o._tool=this,o._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),o._createFigure(this.context,{x:t,y:e},n),o):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,o=!1,i=void 0;try{for(var r,a=this.context.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s instanceof Node&&s.name===t){e=!0;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e?this._buildNodeName():t}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);el-c&&sl-c&&s>A-c?this.attr("cursor","se-resize"):aA-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},o=function(n){if(!this.dragging){var o=t.currentTool;if(o){if(o instanceof g.default||o instanceof u.default||(t.currentTool=t.selectTool,o=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),o instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var i=!1,r=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var d=l.value;if(d===e){i=!0;break}}}catch(t){a=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(a)throw s}}i||(t.resetSelection(),t.selectFigure(e))}if(o instanceof g.default){var h=n.offsetX,f=n.offsetY,M=t.currentConnection;if(M){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");M.endX=h,M.endY=f,M.from!==e?!function(){M.endPath(e),t.currentConnection=null;var n=M.from.uuid,o=e.uuid,i=M.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(o);M=new A.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),M.uuid=i,M.endPath(r)},undo:function(){e.context.removeFigureByUUID(i)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");M=new A.default(e,{endX:h,endY:f}),t.currentConnection=M}}}}};this.rect.mouseover(n),this.rect.mousedown(o),this.icon.mouseover(n),this.icon.mousedown(o);var i=function(){var n=e.rect,o=t.currentTool;if(o&&o instanceof u.default){var i=!1,r=t.selectionFigures,a=!0,s=!1,l=void 0;try{for(var c,d=r[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var g=c.value;if(g===e){i=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&d.return&&d.return()}finally{if(s)throw l}}if(!i)return void t.resetSelection();r.forEach(function(t,e){t instanceof A.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,o){var i=t.currentTool;if(i&&i instanceof u.default){e.context.snapto&&(n-=n%10,o-=o%10);var r=t.selectionFigures,a=e.rect,s=(e.icon,a.ox+n),l=a.oy+o;if(!(s<1||l<1)){e.context.resizePaper(s+150,l+150);var c=void 0,d=void 0;switch(this.attr("cursor")){case"nw-resize":c=a.ow-n,d=a.oh-o,c>20&&d>20&&a.attr({x:s,y:l,width:c,height:d});break;case"ne-resize":c=a.ow+n,d=a.oh-o,c>20&&d>20&&a.attr({y:l,width:c,height:d});break;case"se-resize":c=a.ow+n,d=a.oh+o,c>20&&d>20&&a.attr({width:c,height:d});break;case"sw-resize":c=a.ow-n,d=a.oh+o,c>20&&d>20&&a.attr({x:s,width:c,height:d});break;default:r.forEach(function(t,e){t instanceof A.default||t._moveRect(n,o)})}r.forEach(function(t,e){t instanceof A.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},a=function(){e.rect.dragging=!1;var n=[],o=new Map,i=new Map,r=e.rect.ow,a=e.rect.oh,s=e.rect.attr("width"),l=e.rect.attr("height"),c=e.uuid,u=!0,d=!1,g=void 0;try{for(var h,p=t.selectionFigures[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var f=h.value;if(!(f instanceof A.default)){n.push(f.uuid);var M=f.rect.ox,w=f.rect.oy;M=M?M:0,w=w?w:0;var T=f.rect.attr("x"),C=f.rect.attr("y");o.set(f.uuid,{x:T,y:C}),i.set(f.uuid,{x:M,y:w})}}}catch(t){d=!0,g=t}finally{try{!u&&p.return&&p.return()}finally{if(d)throw g}}e.context.addRedoUndo({redo:function(){var e=!0,i=!1,r=void 0;try{for(var a,A=n[Symbol.iterator]();!(e=(a=A.next()).done);e=!0){var u=a.value,d=t.getNodeByUUID(u),g=o.get(u);d.rect.attr({x:g.x,y:g.y}),u===c&&d.rect.attr({width:s,height:l})}}catch(t){i=!0,r=t}finally{try{!e&&A.return&&A.return()}finally{if(i)throw r}}var h=!0,p=!1,f=void 0;try{for(var M,w=n[Symbol.iterator]();!(h=(M=w.next()).done);h=!0){var T=M.value,C=t.getNodeByUUID(T);C._moveAndResizeTextAndIcon(),C._resetConnections()}}catch(t){p=!0,f=t}finally{try{!h&&w.return&&w.return()}finally{if(p)throw f}}},undo:function(){var e=!0,o=!1,s=void 0;try{for(var l,A=n[Symbol.iterator]();!(e=(l=A.next()).done);e=!0){var u=l.value,d=t.getNodeByUUID(u),g=i.get(u);d.rect.attr({x:g.x,y:g.y}),u===c&&d.rect.attr({width:r,height:a})}}catch(t){o=!0,s=t}finally{try{!e&&A.return&&A.return()}finally{if(o)throw s}}var h=!0,p=!1,f=void 0;try{for(var M,w=n[Symbol.iterator]();!(h=(M=w.next()).done);h=!0){var T=M.value,C=t.getNodeByUUID(T);C._moveAndResizeTextAndIcon(),C._resetConnections()}}catch(t){p=!0,f=t}finally{try{!h&&w.return&&w.return()}finally{if(p)throw f}}}})};this.rect.drag(r,i,a),this.icon.drag(r,i,a)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,o=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,o=this.rect.oy+e):(n=this.rect.attr("x")+t,o=this.rect.attr("x")+e),this.rect.attr({x:n,y:o})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),o=this.rect.attr("width"),i=this.rect.attr("height");return t&&(e-=5,n-=5,o+=10,i+=10),"M "+e+" "+n+" L "+(e+o)+" "+n+" L "+(e+o)+" "+(n+i)+" L "+e+" "+(n+i)+" L "+e+" "+n}}]),t}();e.default=f},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,o=n.attr("x"),i=n.attr("y"),r=n.attr("width"),a=n.attr("height");o+=r/2,i+=a/2-10;var s=t.x,A=t.y;t=[],t.push(["M",s,A]),t.push(["L",o,i])}var c=this.to.getPathInfo(!0),u=l.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),o=t.attr("width"),i=t.attr("height");e+=o/2,n+=i/2-10;var r=this.endX,a=this.endY,s=0,A=0,c=null;if(this.to){var u=this.to.rect;r=u.attr("x"),a=u.attr("y"),s=u.attr("width"),A=u.attr("height"),r+=s/2,a+=A/2-10}var d=this.from.getPathInfo(!0),g=Math.abs(e+o/2-(r-s/2)),h=Math.abs(n+i/2-(a-A/2)),p="M"+e+" "+n;if(g>=h){var f=p+" L"+r+" "+n,M=l.default.pathIntersection(d,f);if(M.length>0&&(e=M[0].x,n=M[0].y,p="M"+M[0].x+" "+M[0].y),this.to){var w="M"+e+" "+a+" L"+r+" "+a,T=this.to.getPathInfo(!0);M=l.default.pathIntersection(T,w),M.length>0&&(r=M[0].x,a=M[0].y,e0&&(e=E[0].x,n=E[0].y,p="M"+E[0].x+" "+E[0].y),this.to){var N="M"+r+" "+n+" L"+r+" "+a,m=this.to.getPathInfo(!0);E=l.default.pathIntersection(m,N),E.length>0&&(r=E[0].x,a=E[0].y,n=1e3&&delete s[l.shift()],l.push(a),s[a]=t[x](e,r),n?n(s[a]):s[a])}return i}function r(){return this.hex}function a(t,e){for(var n=[],o=0,i=t.length;i-2*!e>o;o+=2){var r=[{x:+t[o-2],y:+t[o-1]},{x:+t[o],y:+t[o+1]},{x:+t[o+2],y:+t[o+3]},{x:+t[o+4],y:+t[o+5]}];e?o?i-4==o?r[3]={x:+t[0],y:+t[1]}:i-2==o&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[i-2],y:+t[i-1]}:i-4==o?r[3]=r[2]:o||(r[0]={x:+t[o],y:+t[o+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function s(t,e,n,o,i){var r=-3*e+9*n-9*o+3*i,a=t*r+6*e-12*n+6*o;return t*a-3*e+3*n}function l(t,e,n,o,i,r,a,l,A){null==A&&(A=1),A=A>1?1:A<0?0:A;for(var c=A/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;ph;)d/=2,g+=(cY(i,a)||Y(e,o)Y(r,s))){var l=(t*o-e*n)*(i-a)-(t-n)*(i*s-r*a),A=(t*o-e*n)*(r-s)-(e-o)*(i*s-r*a),c=(t-n)*(r-s)-(e-o)*(i-a);if(c){var u=l/c,d=A/c,g=+u.toFixed(2),h=+d.toFixed(2);if(!(g<+O(t,n).toFixed(2)||g>+Y(t,n).toFixed(2)||g<+O(i,a).toFixed(2)||g>+Y(i,a).toFixed(2)||h<+O(e,o).toFixed(2)||h>+Y(e,o).toFixed(2)||h<+O(r,s).toFixed(2)||h>+Y(r,s).toFixed(2)))return{x:u,y:d}}}}function u(t,n,o){var i=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(i,r))return o?0:[];for(var a=l.apply(0,t),s=l.apply(0,n),A=Y(~~(a/5),1),u=Y(~~(s/5),1),d=[],g=[],h={},p=o?0:[],f=0;f=0&&b<=1.001&&D>=0&&D<=1.001&&(o?p++:p.push({x:m.x,y:m.y,t1:O(b,1),t2:O(D,1)}))}}return p}function d(t,n,o){t=e._path2curve(t),n=e._path2curve(n);for(var i,r,a,s,l,A,c,d,g,h,p=o?0:[],f=0,M=t.length;fo)return o;for(;nr?n=i:o=i,i=(o-n)/2+n}return i}var A=3*e,c=3*(o-e)-A,u=1-A-c,d=3*n,g=3*(i-n)-d,h=1-d-g;return s(t,1/(200*r))}function f(t,e){var n=[],o={};if(this.ms=e,this.times=1,t){for(var i in t)t[N](i)&&(o[q(i)]=t[i],n.push(q(i)));n.sort(ct)}this.anim=o,this.top=n[n.length-1],this.percents=n}function M(n,o,i,r,a,s){i=q(i);var l,A,c,u,d,h,f=n.ms,M={},w={},T={};if(r)for(y=0,E=re.length;yr*n.top){i=n.percents[y],d=n.percents[y-1]||0,f=f/n.top*(i-d),u=n.percents[y+1],l=n.anim[i];break}r&&o.attr(n.anim[n.percents[y]])}if(l){if(A)A.initstatus=r,A.start=new Date-A.ms*r;else{for(var m in l)if(l[N](m)&&(nt[N](m)||o.paper.customAttributes[N](m)))switch(M[m]=o.attr(m),null==M[m]&&(M[m]=et[m]),w[m]=l[m],nt[m]){case P:T[m]=(w[m]-M[m])/f;break;case"colour":M[m]=e.getRGB(M[m]);var b=e.getRGB(w[m]);T[m]={r:(b.r-M[m].r)/f,g:(b.g-M[m].g)/f,b:(b.b-M[m].b)/f};break;case"path":var D=jt(M[m],w[m]),x=D[1];for(M[m]=D[0],T[m]=[],y=0,E=M[m].length;y',ft=Mt.firstChild,ft.style.behavior="url(#default#VML)",!ft||"object"!=typeof ft.adj)return e.type=L;Mt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=D,e.fn=C=D.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=R.call(e),"finite"==e?!Z[N](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,o,i,r,a){if(null==r){var s=t-o,l=n-i;return s||l?(180+180*z.atan2(-l,-s)/V+360)%360:0}return e.angle(t,n,r,a)-e.angle(o,i,r,a)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,n,o){if(o=e.is(o,"finite")?o:10,e.is(t,X)){for(var i=t.length;i--;)if(F(t[i]-n)<=o)return t[i]}else{t=+t;var r=n%t;if(rt-o)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*z.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,m.win,n),m.win=n,m.doc=m.win.document,e._engine.initWin&&e._engine.initWin(m.win)};var wt=function(t){if(e.vml){var n,o=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var a=n.createTextRange();wt=i(function(t){try{n.style.color=Q(t).replace(o,L);var e=a.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=m.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",m.doc.body.appendChild(s),wt=i(function(t){return s.style.color=t,m.doc.defaultView.getComputedStyle(s,L).getPropertyValue("color")})}return wt(t)},Tt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ct=function(){return"hsl("+[this.h,this.s,this.l]+")"},It=function(){return this.hex},yt=function(t,n,o){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(o=t.b,n=t.g,t=t.r),null==n&&e.is(t,G)){var i=e.getRGB(t);t=i.r,n=i.g,o=i.b}return(t>1||n>1||o>1)&&(t/=255,n/=255,o/=255),[t,n,o]},Et=function(t,n,o,i){t*=255,n*=255,o*=255;var r={r:t,g:n,b:o,hex:e.rgb(t,n,o),toString:It};return e.is(i,"finite")&&(r.opacity=i),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=It,t},e.hsb2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,o=t.o,t=t.h),t*=360;var i,r,a,s,l;return t=t%360/60,l=n*e,s=l*(1-F(t%2-1)),i=r=a=n-l,t=~~t,i+=[l,s,0,0,s,l][t],r+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],Et(i,r,a,o)},e.hsl2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,r,a,s,l;return t=t%360/60,l=2*e*(n<.5?n:1-n),s=l*(1-F(t%2-1)),i=r=a=n-l/2,t=~~t,i+=[l,s,0,0,s,l][t],r+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],Et(i,r,a,o)},e.rgb2hsb=function(t,e,n){n=yt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,a;return r=Y(t,e,n),a=r-O(t,e,n),o=0==a?null:r==t?(e-n)/a:r==e?(n-t)/a+2:(t-e)/a+4,o=(o+360)%6*60/360,i=0==a?0:a/r,{h:o,s:i,b:r,toString:Tt}},e.rgb2hsl=function(t,e,n){n=yt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,a,s,l;return a=Y(t,e,n),s=O(t,e,n),l=a-s,o=0==l?null:a==t?(e-n)/l:a==e?(n-t)/l+2:(t-e)/l+4,o=(o+360)%6*60/360,r=(a+s)/2,i=0==l?0:r<.5?l/(2*r):l/(2-2*r),{h:o,s:i,l:r,toString:Ct}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=m.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,m.doc.body.removeChild(this)},n.onerror=function(){m.doc.body.removeChild(this)},m.doc.body.appendChild(n),n.src=t};e.getRGB=i(function(t){if(!t||(t=Q(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(it[N](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=wt(t));var n,o,i,a,s,l,A=t.match(J);return A?(A[2]&&(i=$(A[2].substring(5),16),o=$(A[2].substring(3,5),16),n=$(A[2].substring(1,3),16)),A[3]&&(i=$((s=A[3].charAt(3))+s,16),o=$((s=A[3].charAt(2))+s,16),n=$((s=A[3].charAt(1))+s,16)),A[4]&&(l=A[4][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),"rgba"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),A[5]?(l=A[5][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsba"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsb2rgb(n,o,i,a)):A[6]?(l=A[6][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsla"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsl2rgb(n,o,i,a)):(A={r:n,g:o,b:i,toString:r},A.hex="#"+(16777216|i|o<<8|n<<16).toString(16).slice(1),e.is(a,"finite")&&(A.opacity=a),A)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=i(function(t,n,o){return e.hsb2rgb(t,n,o).hex}),e.hsl=i(function(t,n,o){return e.hsl2rgb(t,n,o).hex}),e.rgb=i(function(t,e,n){function o(t){return t+.5|0}return"#"+(16777216|o(n)|o(e)<<8|o(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=Nt(t);if(n.arr)return bt(n.arr);var o={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,X)&&e.is(t[0],X)&&(i=bt(t)),i.length||Q(t).replace(at,function(t,e,n){var r=[],a=e.toLowerCase();if(n.replace(lt,function(t,e){e&&r.push(+e)}),"m"==a&&r.length>2&&(i.push([e][v](r.splice(0,2))),a="l",e="m"==e?"l":"L"),"r"==a)i.push([e][v](r));else for(;r.length>=o[a]&&(i.push([e][v](r.splice(0,o[a]))),o[a]););}),i.toString=e._path2string,n.arr=bt(i),i},e.parseTransformString=i(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=bt(t)),n.length||Q(t).replace(st,function(t,e,o){var i=[];R.call(e);o.replace(lt,function(t,e){e&&i.push(+e)}),n.push([e][v](i))}),n.toString=e._path2string,n});var Nt=function(t){var e=Nt.ps=Nt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[N](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,o,i,r,a,s,l){var A=1-l,c=H(A,3),u=H(A,2),d=l*l,g=d*l,h=c*t+3*u*l*n+3*A*l*l*i+g*a,p=c*e+3*u*l*o+3*A*l*l*r+g*s,f=t+2*l*(n-t)+d*(i-2*n+t),M=e+2*l*(o-e)+d*(r-2*o+e),w=n+2*l*(i-n)+d*(a-2*i+n),T=o+2*l*(r-o)+d*(s-2*r+o),C=A*t+l*n,I=A*e+l*o,y=A*i+l*a,E=A*r+l*s,N=90-180*z.atan2(f-w,M-T)/V;return(f>w||M=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var o=e.isPointInsideBBox;return o(n,t.x,t.y)||o(n,t.x2,t.y)||o(n,t.x,t.y2)||o(n,t.x2,t.y2)||o(t,n.x,n.y)||o(t,n.x2,n.y)||o(t,n.x,n.y2)||o(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,n,o){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,o)&&d(t,[["M",n,o],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var mt=e.pathBBox=function(t){var e=Nt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=jt(t);for(var o,i=0,r=0,a=[],s=[],l=0,A=t.length;l1&&(w=z.sqrt(w),n*=w,o*=w);var T=n*n,C=o*o,I=(a==s?-1:1)*z.sqrt(F((T*C-T*M*M-C*f*f)/(T*M*M+C*f*f))),y=I*n*M/o+(t+l)/2,E=I*-o*f/n+(e+A)/2,N=z.asin(((e-E)/o).toFixed(9)),m=z.asin(((A-E)/o).toFixed(9));N=tm&&(N-=2*V),!s&&m>N&&(m-=2*V)}var b=m-N;if(F(b)>d){var D=m,x=l,B=A;m=N+d*(s&&m>N?1:-1),l=y+n*z.cos(m),A=E+o*z.sin(m),h=Lt(l,A,n,o,r,0,s,x,B,[m,D,y,E])}b=m-N;var L=z.cos(N),S=z.sin(N),Q=z.cos(m),U=z.sin(m),k=z.tan(b/4),R=4/3*n*k,Y=4/3*o*k,O=[t,e],H=[t+R*S,e-Y*L],P=[l+R*U,A-Y*Q],G=[l,A];if(H[0]=2*O[0]-H[0],H[1]=2*O[1]-H[1],c)return[H,P,G][v](h);h=[H,P,G][v](h).join()[j](",");for(var X=[],W=0,J=h.length;W"1e12"&&(d=.5),F(g)>"1e12"&&(g=.5),d>0&&d<1&&(l=St(t,e,n,o,i,r,a,s,d),p.push(l.x),h.push(l.y)),g>0&&g<1&&(l=St(t,e,n,o,i,r,a,s,g),p.push(l.x),h.push(l.y)),A=r-2*o+e-(s-2*r+o),c=2*(o-e)-2*(r-o),u=e-o,d=(-c+z.sqrt(c*c-4*A*u))/2/A,g=(-c-z.sqrt(c*c-4*A*u))/2/A,F(d)>"1e12"&&(d=.5),F(g)>"1e12"&&(g=.5),d>0&&d<1&&(l=St(t,e,n,o,i,r,a,s,d),p.push(l.x),h.push(l.y)),g>0&&g<1&&(l=St(t,e,n,o,i,r,a,s,g),p.push(l.x),h.push(l.y)),{min:{x:O[x](0,p),y:O[x](0,h)},max:{x:Y[x](0,p),y:Y[x](0,h)}}}),jt=e._path2curve=i(function(t,e){var n=!e&&Nt(t);if(!e&&n.curve)return bt(n.curve);for(var o=xt(t),i=e&&xt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=(function(t,e,n){var o,i,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][v](Lt[x](0,[e.x,e.y][v](t.slice(1))));break;case"S":"C"==n||"S"==n?(o=2*e.x-e.bx,i=2*e.y-e.by):(o=e.x,i=e.y),t=["C",o,i][v](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][v](Bt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][v](Bt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][v](vt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][v](vt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][v](vt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][v](vt(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"][v](n.splice(0,6)));t.splice(e,1),p=Y(o.length,i&&i.length||0)}},A=function(t,e,n,r,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],p=Y(o.length,i&&i.length||0))},c=[],u=[],d="",g="",h=0,p=Y(o.length,i&&i.length||0);hi){if(n&&!d.start){if(c=$t(a,s,l[1],l[2],l[3],l[4],l[5],l[6],i-g),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],r)return u;d.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,l[5],l[6]].join(),g+=A,a=+l[5],s=+l[6];continue}if(!t&&!n)return c=$t(a,s,l[1],l[2],l[3],l[4],l[5],l[6],i-g),{x:c.x,y:c.y,alpha:c.alpha}}g+=A,a=+l[5],s=+l[6]}u+=l.shift()+l}return d.end=u,c=t?g:n?d:e.findDotsAtSegment(a,s,l[0],l[1],l[2],l[3],l[4],l[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),oe=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return oe(t,e).end;var o=oe(t,n,1);return e?oe(o,e).end:o},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var o=this.getPath();if(o)return e.getSubpath(o,t,n)};var ie=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,n=z.sqrt(.1734+e*e),o=n-e,i=H(F(o),1/3)*(o<0?-1:1),r=-n-e,a=H(F(r),1/3)*(r<0?-1:1),s=i+a+.5;return 3*(1-s)*s*s+s*s*s},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*z.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,n=7.5625,o=2.75;return t<1/o?e=n*t*t:t<2/o?(t-=1.5/o,e=n*t*t+.75):t<2.5/o?(t-=2.25/o,e=n*t*t+.9375):(t-=2.625/o,e=n*t*t+.984375),e}};ie.easeIn=ie["ease-in"]=ie["<"],ie.easeOut=ie["ease-out"]=ie[">"],ie.easeInOut=ie["ease-in-out"]=ie["<>"],ie["back-in"]=ie.backIn,ie["back-out"]=ie.backOut;var re=[],ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},se=function(){for(var n=+new Date,o=0;o1&&!i.next){for(a in d)d[N](a)&&(p[a]=i.totalOrigin[a]);i.el.attr(p),M(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&M(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}re.length&&ae(se)},le=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,o,i,r,a){var s=this;if(s.removed)return a&&a.call(s),s;var l=o instanceof f?o:e.animation(o,i,r,a);M(l,s,l.percents[0],null,s.attr());for(var A=0,c=re.length;Al&&(l=c)}l+="%",!t[l].callback&&(t[l].callback=i)}return new f(t,n)},Zt.animate=function(t,n,o,i){var r=this;if(r.removed)return i&&i.call(r),r;var a=t instanceof f?t:e.animation(t,n,o,i);return M(a,r,a.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,O(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,o,i=[],r=0;if(null!=e)return M(t,this,-1,O(e,1)),this;for(n=re.length;r1)for(var o=0,i=n.length;o.5)-1;l(d-.5,2)+l(g-.5,2)>.25&&(g=r.sqrt(.25-l(d-.5,2))*i+.5)&&.5!=g&&(g=g.toFixed(5)-1e-5*i)}return u}),i=i.split(/\s*\-\s*/),"linear"==A){var C=i.shift();if(C=-o(C),isNaN(C))return null;var I=[0,0,r.cos(t.rad(C)),r.sin(t.rad(C))],y=1/(a(s(I[2]),s(I[3]))||1);I[2]*=y,I[3]*=y,I[2]<0&&(I[0]=-I[2],I[2]=0),I[3]<0&&(I[1]=-I[3],I[3]=0)}var E=t._parseDots(i);if(!E)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){w=f(A+"Gradient",{id:c}),e.gradient=w,f(w,"radial"==A?{fx:d,fy:g}:{x1:I[0],y1:I[1],x2:I[2],y2:I[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(w);for(var N=0,m=E.length;N1?Q.opacity/100:Q.opacity});case"stroke":Q=t.getRGB(p),l.setAttribute(h,Q.hex),"stroke"==h&&Q[e]("opacity")&&f(l,{"stroke-opacity":Q.opacity>1?Q.opacity/100:Q.opacity}),"stroke"==h&&o._.arrows&&("startString"in o._.arrows&&I(o,o._.arrows.startString),"endString"in o._.arrows&&I(o,o._.arrows.endString,1));break;case"gradient":("circle"==o.type||"ellipse"==o.type||"r"!=n(p).charAt())&&M(o,p);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&f(l,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(c.gradient){j=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,u)),j&&(U=j.getElementsByTagName("stop"),f(U[U.length-1],{"stop-opacity":p}));break}default:"font-size"==h&&(p=i(p,10)+"px");var k=h.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[k]=p,o._.dirty=1,l.setAttribute(h,p)}}b(o,r),l.style.visibility=d},m=1.2,b=function(o,r){if("text"==o.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var a=o.attrs,s=o.node,l=s.firstChild?i(t._g.doc.defaultView.getComputedStyle(s.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(a.text=r.text;s.firstChild;)s.removeChild(s.firstChild);for(var A,c=n(r.text).split("\n"),d=[],g=0,h=c.length;g"));var Z=X.getBoundingClientRect();w.W=d.w=(Z.right-Z.left)/W,w.H=d.h=(Z.bottom-Z.top)/W,w.X=d.x,w.Y=d.y+w.H/2,("x"in l||"y"in l)&&(w.path.v=t.format("m{0},{1}l{2},{1}",r(d.x*C),r(d.y*C),r(d.x*C)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=i.sqrt(.25-s(e-.5,2))*(2*(n>.5)-1)+.5),A=e+g+n),h}),r=r.split(/\s*\-\s*/),"linear"==l){var c=r.shift();if(c=-o(c),isNaN(c))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(a),a.on=!0,a.method="none",a.color=u[0].color,a.color2=u[u.length-1].color;for(var d=[],p=0,f=u.length;p')}}catch(t){L=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,o=e.height,i=e.width,r=e.x,a=e.y;if(!n)throw new Error("VML container not found.");var s=new t._Paper,l=s.canvas=t._g.doc.createElement("div"),A=l.style;return r=r||0,a=a||0,i=i||512,o=o||342,s.width=i,s.height=o,i==+i&&(i+="px"),o==+o&&(o+="px"),s.coordsize=1e3*C+g+1e3*C,s.coordorigin="0 0",s.span=t._g.doc.createElement("span"),s.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(s.span),A.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,o),1==n?(t._g.doc.body.appendChild(l),A.left=r+"px",A.top=a+"px",A.position="absolute"):n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),s.renderfix=function(){},s},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=h,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var S=t.st;for(var Q in B)B[e](Q)&&!S[e](Q)&&(S[Q]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(Q))}}.apply(e,o),!(void 0!==i&&(t.exports=i))}])})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(i=(t+1)/2),o.splice(i,1),2===o.length)o=e.connection._buildStraightLinePathInfo();else{var r=o[1],a=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),s=o[0];s[1]=a.x,s[2]=a.y;var l=o[o.length-2],A=e.connection._buildToFigureIntersetion({x:l[1],y:l[2]},!0),c=o[o.length-1];c[1]=A.x,c[2]=A.y}e.path.attr("path",o),e.remove()});var d=function(o,i){e.context.snapto&&(o-=o%10,i-=i%10);var s=this.ox+o,l=this.oy+i;if(!(s<1||l<1)){e.context.resizePaper(s+15,l+15),this.attr("x",s),this.attr("y",l),a=Math.round(t/2);var A=e.path.attr("path"),c=A.length,u=void 0,d=void 0,g=void 0,h=2*(n.length-1)-1;if(0===t||1===t){if(g=A[1],u=e.connection._buildFromFigureIntersetion({x:g[1],y:g[2]},!0),d=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:s,y:l},!0);if(p){var f=n[n.length-1];f[1]=p.x,f[2]=p.y}}}else h!==t&&h!==t+1&&h!==t+2||(g=A[c-2],u=e.connection._buildToFigureIntersetion({x:s,y:l},!0),d=n[n.length-1]);u&&(d[1]=u.x,d[2]=u.y);var M=[];n.forEach(function(t,e){r?e===a?M.push(["L",s,l]):M.push(t):(M.push(t),e===a&&M.push(["L",s,l]))}),e.path.attr("path",M),e.connection._buildText()}},g=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},h=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,o=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(o);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(o);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(d,g,h)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=i},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n'}}]),e}(A.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n'}}]),e}(A.default);e.default=c},function(t,e){"use strict";function n(t){var e=a("消息提示",t);e.modal("show")}function o(t,e){var n=a("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function i(t,e,n){var o=a(t,e,[{name:"确认",click:function(){n.call(this)}}]);o.modal("show")}function r(t,e,n,o,i){var r=a(t,e,n,i);if(r.modal("show"),o){var s=!0,l=!1,A=void 0;try{for(var c,u=o[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;r.on(d.name,d.callback)}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}}}function a(t,e,n,o){var i=this,r="modal-dialog"+(o?" modal-lg":""),a=$(''),l=$('
');a.append(l); +var A=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
'),n.append(this.nodeToolbar),this.canvasContainer=$('
'),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new l.default(this.context),this.context.flowDesigner=this;var o="_prop_container",i=$('
');this.canvasContainer.append(i);var a=$('');i.append(a),a.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
');var s=$('
');s.append('
属性值修改后,请回车以确认
'),s.append(this.propContainer),i.append(s),i.draggable();var A=$("#__prop_panel_tool__");A.click(function(){s.toggle();var t=s.css("display");t&&"none"!==t?(A.removeClass("glyphicon-circle-arrow-left"),A.addClass("glyphicon-circle-arrow-down")):(A.removeClass("glyphicon-circle-arrow-down"),A.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return a(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void w.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void w.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void w.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,o=t.y,i=t.width,r=t.height,a=t.name;n=parseInt(n),o=parseInt(o),i=parseInt(i),r=parseInt(r);var s=n+i+10,l=o+r+10;this.context.resizePaper(s+50,l+50);var A=e._newNodeInstance(n,o,a);A.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;d.eventEmitter.on(d.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
"}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,o=!0,i=!1,r=void 0;try{for(var a,s=function(){var e=a.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},l=this.buttons[Symbol.iterator]();!(o=(a=l.next()).done);o=!0)s()}catch(t){i=!0,r=t}finally{try{!o&&l.return&&l.return()}finally{if(i)throw r}}var A=$('');this.toolbar.append(A),A.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var g=$('');this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var w=$('');this.toolbar.append(w),w.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,o=void 0;try{for(var i,r=function(){var e=i.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){d.eventEmitter.emit(d.TRIGGER_TOOL,e.getType())})},a=this.context.toolsMap.values()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)r()}catch(t){n=!0,o=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw o}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;d.eventEmitter.on(d.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof h.default){var o=n.name||n.text.attr("text"),i=$('
'),r=$('');i.append(r),t.propContainer.append(i),r.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,a=!1,s=!0,l=!1,A=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;if(d instanceof h.default&&d!==n&&d.name===o){a=!0;break}}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}return a?void w.alert("节点名已存在!"):(n.name=o,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t.text.attr("text",i)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof f.default){var a=$('
'),s=$('');a.append(s),t.propContainer.append(a),s.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,a=n.from.fromConnections,s=!1,l=!0,A=!1,c=void 0;try{for(var u,d=a[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var g=u.value;if(g!==n&&g.name===o){s=!0;break}}}catch(t){A=!0,c=t}finally{try{!l&&d.return&&d.return()}finally{if(A)throw c}}return s?void w.alert("连线名已存在"):(n.name=o,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t._buildText()}}))});var l=$('
'),A=$('');l.append(A),A.val(n.type),A.change(function(t){var o=$(this).val(),i=n.uuid,r=n.type;n.type=o,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.type=o,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(i);t.type=r,t.updatePath()}})}),t.propContainer.append(l),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),d.eventEmitter.on(d.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),d.eventEmitter.emit(d.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(w.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,o=void 0;try{for(var i,r=this.context.allFigures[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var a=i.value;if(a instanceof h.default){var s=a.validate();s&&t.push(s)}}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}if(t.length>0){var l="";return t.forEach(function(t,e){l+=e+1+"."+t+"
"}),l='错误:
'+l+"
",w.alert(l),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof h.default&&t.push(e.toJSON())}),t}}]),t}();e.default=T},function(t,e,n){var o=n(254);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var o=n(260);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,o=this;t(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||t(o).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var n='[data-dismiss="alert"]',o=function(e){t(e).on("click",n,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var i=t(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var a=t("#"===r?[]:r);e&&e.preventDefault(),a.length||(a=i.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(o.TRANSITION_DURATION):n())};var i=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,o.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.button"),r="object"==typeof e&&e;i||o.data("bs.button",i=new n(this,r)),"toggle"==e?i.toggle():e&&i.setState(e)})}var n=function(e,o){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,o),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();e+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(t.proxy(function(){o[i](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var o=t(n.target).closest(".btn");e.call(o,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.carousel"),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:r.slide;i||o.data("bs.carousel",i=new n(this,r)),"number"==typeof e?i.to(e):a?i[a]():r.interval&&i.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),o="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(o&&!this.options.wrap)return e;var i="prev"==t?-1:1,r=(n+i)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(e,i),a=this.interval,s="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var A=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:A,direction:s});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:A,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,i.addClass(s),r.addClass(s),i.one("bsTransitionEnd",function(){r.removeClass([e,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var i=function(n){var o,i=t(this),r=t(i.attr("data-target")||(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var a=t.extend({},r.data(),i.data()),s=i.attr("data-slide-to");s&&(a.interval=!1),e.call(r,a),s&&r.data("bs.carousel").to(s),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,o=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function n(e){return this.each(function(){var n=t(this),i=n.data("bs.collapse"),r=t.extend({},o.DEFAULTS,n.data(),"object"==typeof e&&e);!i&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),i||n.data("bs.collapse",i=new o(this,r)),"string"==typeof e&&i[e]()})}var o=function(e,n){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),e||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(o.TRANSITION_DURATION):i.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,o){var i=t(o);this.addAriaAndCollapsedClass(e(i),i)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var i=t(this);i.attr("data-target")||o.preventDefault();var r=e(i),a=r.data("bs.collapse"),s=a?"toggle":i.data();n.call(r,s)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o=n&&t(n);return o&&o.length?o:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(r).each(function(){var o=t(this),i=e(o),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(o.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function o(e){return this.each(function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(n)})}var i=".dropdown-backdrop",r='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.7",a.prototype.toggle=function(o){var i=t(this);if(!i.is(".disabled, :disabled")){var r=e(i),a=r.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(r.trigger(o=t.Event("show.bs.dropdown",s)),o.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var i=e(o),a=i.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&i.find(r).trigger("focus"),o.trigger("click");var s=" li:not(.disabled):visible a",l=i.find(".dropdown-menu"+s);if(l.length){var A=l.index(n.target);38==n.which&&A>0&&A--,40==n.which&&Adocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,o){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var a=i[r];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,o){n[t]!=o&&(e[t]=o)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var i=this,r=this.tip(),a=this.getUID(this.type);this.setContent(),r.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,A=l.test(s);A&&(s=s.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=r[0].offsetWidth,d=r[0].offsetHeight;if(A){var g=s,h=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+d>h.bottom?"top":"top"==s&&c.top-dh.width?"left":"left"==s&&c.left-ua.top+a.height&&(i.top=a.top+a.height-l)}else{var A=e.left-r,c=e.left+r+n;Aa.right&&(i.left=a.left+a.width-c)}return i},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.popover"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||o.data("bs.popover",i=new n(this,r)),"string"==typeof e&&i[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,o){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var o=t(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new e(this,r)),"string"==typeof n&&i[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),r=/^#./.test(i)&&t(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=o)return a!=(t=r[r.length-1])&&this.activate(t);if(a&&e=i[t]&&(void 0===i[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var a=o.find("> .active"),s=i&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var i=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.affix"),r="object"==typeof e&&e;i||o.data("bs.affix",i=new n(this,r)),"string"==typeof e&&i[e]()})}var n=function(e,o){this.options=t.extend({},n.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i=t-o&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var s=this.getState(a,e,i,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),A=t.Event(l+".bs.affix");if(this.$element.trigger(A),A.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-r})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),o=n.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(n,o)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,o,i=t(this),r=n.handle?t(n.handle,i):i;r.on({mousedown:function(r){var a=r.target,s="",l=!1;if(a&&(s=a.className,s&&(s=s.trim(),s.indexOf("cm-")>-1?l=!0:s.indexOf("CodeMirror-")>-1&&(l=!0))),(!s||"form-control"!==s&&"presentation"!==s&&!l)&&!(s.indexOf("ureport")>-1||s.indexOf("ds_name")>-1||s.indexOf("dataset_name")>-1||"A"===a.tagName||"INPUT"===a.tagName||a&&"presentation"===t(a).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,i)))){var A=i.offset();e=r.pageX-A.left,o=r.pageY-A.top,t(document).on("mousemove.drag",function(t){i.offset({top:t.pageY-o,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&a.push(u)}else{var f=u.rect,M=f.getBBox();(M.x>=n.x&&M.x<=n.x2||M.x2>=n.x&&M.x2<=n.x2)&&(M.y>=n.y&&M.y<=n.y2||M.y2>=n.y&&M.y2<=n.y2)&&l.push(u)}}l.length>0?l.forEach(function(t,e){i.addSelection(t)}):a.forEach(function(t,e){i.addSelection(t)}),i.endSelect()}}var o=null,i=this.context,r=i.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=i.currentTool;if(!(!e||e instanceof u.default||e instanceof A.default)){var n=t.offsetX,o=t.offsetY,r=e._newNodeInstance(n,o);r&&!function(){var t=r.uuid,a=r.name,s=r.toJSON();i.addRedoUndo({redo:function(){r=e._newNodeInstance(n,o,a),r.initFromJson(s)},undo:function(){i.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(i.currentTool&&i.currentTool instanceof u.default){var e=i.currentConnection;if(e){var n=t.offsetX,o=t.offsetY;e.endX=n,e.endY=o,e.updatePath()}}})}}]),t}();e.default=h},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>o&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof T.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof T.default&&e.select()}),t&&I.eventEmitter.emit(I.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof T.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),I.eventEmitter.emit(I.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return g.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,a=this.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s instanceof E.default&&(s.rect.id===t||s.icon.id===t||s.text.id===t)){e=s;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,a=this.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s.uuid===t){e=s;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;I.eventEmitter.on(I.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),I.eventEmitter.on(I.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var o=e.toJSON(),i=e.uuid,r=t;e instanceof T.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(i),e=t.from.uuid,n=t.to.uuid,a=r.context.getNodeByUUID(e),s=r.context.getNodeByUUID(n),l=new T.default(a,{x:a.rect.attr("x"),y:a.rect.attr("y")});a.fromConnections.push(l),s.toConnections.push(l),l.to=s,l.fromJSON(o)},undo:function(){r.removeFigureByUUID(i)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(i)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(o),t._buildConnections())}})}(),t.removeFigureByUUID(i)}))}),I.eventEmitter.on(I.ALIGN_CENTER,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,a=!0,s=!1,l=void 0;try{for(var A,c=t.selectionFigures[Symbol.iterator]();!(a=(A=c.next()).done);a=!0){var u=A.value;if(u instanceof T.default)break;var d={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),o=u.rect.attr("width"),e+=o/2):u.moveTo(e,n),d.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,d),r++}}catch(t){s=!0,l=t}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.newXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.oldXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),I.eventEmitter.on(I.ALIGN_MIDDLE,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,a=!0,s=!1,l=void 0;try{for(var A,c=t.selectionFigures[Symbol.iterator]();!(a=(A=c.next()).done);a=!0){var u=A.value;if(u instanceof T.default)break;var d={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),o=u.rect.attr("height"),n+=o/2):u.moveTo(e,n),d.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,d),r++}}catch(t){s=!0,l=t}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.newXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.oldXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),I.eventEmitter.on(I.UNIFY_SIZE,function(){var e=void 0,n=void 0,o=new Map,i=0,r=!0,a=!1,s=void 0;try{for(var l,A=t.selectionFigures[Symbol.iterator]();!(r=(l=A.next()).done);r=!0){var c=l.value;if(c instanceof T.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===i?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},o.set(c.uuid,u),i++}}catch(t){a=!0,s=t}finally{try{!r&&A.return&&A.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,s=d.getNodeByUUID(a),l=o.get(a),A=l.newWH;s.changeSize(A.w,A.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,s=d.getNodeByUUID(a),l=o.get(a),A=l.oldWH;s.changeSize(A.w,A.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new M.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=N},function(t,e,n){var o;!function(){"use strict";function i(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],o=-1,r=0,a=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(a=!0,t[e](),a=!1,this):this},{add:function(e){return a?this:(n.splice(o+1,n.length-o),n.push(e),r&&n.length>r&&i(n,0,-(r+1)),o=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var i=n[o];return i?(e(i,"undo"),o-=1,t&&t(),this):this},redo:function(){var i=n[o+1];return i?(e(i,"redo"),o+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],o=-1,t&&e>0&&t()},hasUndo:function(){return o!==-1},hasRedo:function(){return o>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function s(){try{var t=n(284).randomBytes;h=d=t&&function(){return t(16)},d()}catch(t){}}function l(t,e,n){var o=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[o+i++]=w[t])});i<16;)e[o+i++]=0;return e}function A(t,e){var n=e||0,o=M;return o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]}function c(t,e,n){var o=e&&n||0,i=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:y,a=null!=t.msecs?t.msecs:(new Date).getTime(),s=null!=t.nsecs?t.nsecs:N+1,l=a-E+(s-N)/1e4;if(l<0&&null==t.clockseq&&(r=r+1&16383),(l<0||a>E)&&null==t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");E=a,N=s,y=r,a+=122192928e5;var c=(1e4*(268435455&a)+s)%4294967296;i[o++]=c>>>24&255,i[o++]=c>>>16&255,i[o++]=c>>>8&255,i[o++]=255&c;var u=a/4294967296*1e4&268435455;i[o++]=u>>>8&255,i[o++]=255&u,i[o++]=u>>>24&15|16,i[o++]=u>>>16&255,i[o++]=r>>>8|128,i[o++]=255&r;for(var d=t.node||I,g=0;g<6;g++)i[o+g]=d[g];return e?e:A(i)}function u(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new f(16):null,t=null),t=t||{};var i=t.random||(t.rng||d)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var r=0;r<16;r++)e[o+r]=i[r];return e||A(i)}var d,g,h,p;r?a():s();for(var f="function"==typeof i?i:Array,M=[],w={},T=0;T<256;T++)M[T]=(T+256).toString(16).substr(1),w[M[T]]=T;var C=d(),I=[1|C[0],C[1],C[2],C[3],C[4],C[5]],y=16383&(C[6]<<8|C[7]),E=0,N=0,m=u;m.v1=c,m.v4=u,m.parse=l,m.unparse=A,m.BufferClass=f,m._rng=d,m._mathRNG=g,m._nodeRNG=h,m._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=m:(o=function(){return m}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,o){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function f(e){return+e!=e&&(e=0),t.alloc(+e)}function M(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return J(e).length;default:if(i)return G(e).length;n=(""+n).toLowerCase(),i=!0}}function w(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,e,n);case"utf8":case"utf-8":return v(this,e,n);case"ascii":return L(this,e,n);case"latin1":case"binary":return S(this,e,n);case"base64":return x(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function T(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function C(e,n,o,i,r){if(0===e.length)return-1;if("string"==typeof o?(i=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=r?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(o<0){if(!r)return-1;o=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:I(e,n,o,i,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,o):Uint8Array.prototype.lastIndexOf.call(e,n,o):I(e,[n],o,i,r); +throw new TypeError("val must be string, number or Buffer")}function I(t,e,n,o,i){function r(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,l=e.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}var A;if(i){var c=-1;for(A=n;As&&(n=s-l),A=n;A>=0;A--){for(var u=!0,d=0;di&&(o=i)):o=i;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var a=0;a239?4:r>223?3:r>191?2:1;if(i+s<=n){var l,A,c,u;switch(s){case 1:r<128&&(a=r);break;case 2:l=t[i+1],128===(192&l)&&(u=(31&r)<<6|63&l,u>127&&(a=u));break;case 3:l=t[i+1],A=t[i+2],128===(192&l)&&128===(192&A)&&(u=(15&r)<<12|(63&l)<<6|63&A,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:l=t[i+1],A=t[i+2],c=t[i+3],128===(192&l)&&128===(192&A)&&128===(192&c)&&(u=(15&r)<<18|(63&l)<<12|(63&A)<<6|63&c,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,o.push(a>>>10&1023|55296),a=56320|1023&a),o.push(a),i+=s}return B(o)}function B(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",o=0;oo)&&(n=o);for(var i="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,o,i,r,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function R(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i>>8*(o?i:1-i)}function z(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i>>8*(o?i:3-i)&255}function Y(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function O(t,e,n,o,i){return i||Y(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,o,23,4),n+4}function F(t,e,n,o,i){return i||Y(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,o,52,8),n+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function P(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var n,o=t.length,i=null,r=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){for(var e=[],n=0;n>8,i=n%256,r.push(i),r.push(o);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,n,o){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=f,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==o.TYPED_ARRAY_SUPPORT?o.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return s(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return A(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var o=e.length,i=n.length,r=0,a=Math.min(o,i);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,o,i,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===o&&(o=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),n<0||o>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&n>=o)return 0;if(i>=r)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var a=r-i,s=o-n,l=Math.min(a,s),A=this.slice(i,r),c=e.slice(n,o),u=0;ui)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":return N(this,t,e,n);case"latin1":case"binary":return m(this,t,e,n);case"base64":return b(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return D(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var o=this.length;e=~~e,n=void 0===n?o:~~n,e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n0&&(i*=256);)o+=this[t+--e]*i;return o},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var o=this[t],i=1,r=0;++r=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e|=0,n|=0,!o){var i=Math.pow(2,8*n)-1;k(this,t,e,n,i,0)}var r=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+r]=t/a&255;return e+n},t.prototype.writeUInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):z(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):z(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=0,a=1,s=0;for(this[e]=255&t;++r>0)-s&255;return e+n},t.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=n-1,a=1,s=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},t.prototype.writeInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):z(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):z(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return O(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return O(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.copy=function(e,n,o,i){if(o||(o=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--r)e[r+n]=this[r+o];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,o=void 0===o?this.length:o>>>0,e||(e=0);var a;if("number"==typeof e)for(a=n;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,o,i,r,a,s,l=t.length;a=n(t),s=new c(3*l/4-a),i=a>0?l-4:l;var u=0;for(e=0,o=0;e>16&255,s[u++]=r>>8&255,s[u++]=255&r;return 2===a?(r=A[t.charCodeAt(e)]<<2|A[t.charCodeAt(e+1)]>>4,s[u++]=255&r):1===a&&(r=A[t.charCodeAt(e)]<<10|A[t.charCodeAt(e+1)]<<4|A[t.charCodeAt(e+2)]>>2,s[u++]=r>>8&255,s[u++]=255&r),s}function r(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function a(t,e,n){for(var o,i=[],a=e;ac?c:A+s));return 1===o?(e=t[n-1],i+=l[e>>2],i+=l[e<<4&63],i+="=="):2===o&&(e=(t[n-2]<<8)+t[n-1],i+=l[e>>10],i+=l[e>>4&63],i+=l[e<<2&63],i+="="),r.push(i),r.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=s;for(var l=[],A=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,g=u.length;d>1,c=-7,u=n?i-1:0,d=n?-1:1,g=t[e+u];for(u+=d,r=g&(1<<-c)-1,g>>=-c,c+=s;c>0;r=256*r+t[e+u],u+=d,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=o;c>0;a=256*a+t[e+u],u+=d,c-=8);if(0===r)r=1-A;else{if(r===l)return a?NaN:(g?-1:1)*(1/0);a+=Math.pow(2,o),r-=A}return(g?-1:1)*a*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var a,s,l,A=8*r-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=o?0:r-1,h=o?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),e+=a+u>=1?d/l:d*Math.pow(2,1-u),e*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[n+g]=255&s,g+=h,s/=256,i-=8);for(a=a<0;t[n+g]=255&a,g+=h,a/=256,A-=8);t[n+g-h]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function o(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=n(300)(e);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){o("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,o){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new o(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function o(t){return function(){var n=[],o={update:function(t,o){return e.isBuffer(t)||(t=new e(t,o)),n.push(t),this},digest:function(o){var i=e.concat(n),r=t(i);return n=null,o?r.toString(o):r}};return o}}var i=n(288),r=o(n(296)),a=o(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new a:i(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},o=n(280).Buffer,i=n(289)(o);e.sha1=n(290)(o,i),e.sha256=n(294)(o,i),e.sha512=n(295)(o,i)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var o=this._len+=e.length,i=this._s=this._s||0,r=0,a=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){return h.length?h.pop().init():this instanceof n?(this._w=g,e.call(this,64,56),this._h=null,void this.init()):new n}function i(t,e,n,o){return t<20?e&n|~e&o:t<40?e^n^o:t<60?e&n|e&o|n&o:e^n^o}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function a(t,e){return t+e|0}function s(t,e){return t<>>32-e}var l=0,A=4,c=8,u=12,d=16,g=new("undefined"==typeof Int32Array?Array:Int32Array)(80),h=[];return o(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=h,n.prototype._update=function(t){var e,n,o,l,A,c,u,d,g,h;e=c=this._a,n=u=this._b,o=d=this._c,l=g=this._d,A=h=this._e;for(var p=this._w,f=0;f<80;f++){var M=p[f]=f<16?t.readInt32BE(4*f):s(p[f-3]^p[f-8]^p[f-14]^p[f-16],1),w=a(a(s(e,5),i(f,n,o,l)),a(a(A,M),r(f)));A=l,l=o,o=s(n,30),n=e,e=w}this._a=a(e,c),this._b=a(n,u),this._c=a(o,d),this._d=a(l,g),this._e=a(A,h)},n.prototype._hash=function(){h.length<100&&h.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,l),e.writeInt32BE(0|this._b,A),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,d),e},n}},function(t,e,n){(function(t,o){function i(t,n){var o={seen:[],stylize:a};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),p(n)?o.showHidden=n:n&&e._extend(o,n),I(o.showHidden)&&(o.showHidden=!1),I(o.depth)&&(o.depth=2),I(o.colors)&&(o.colors=!1),I(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=r),l(o,t,o.depth)}function r(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function l(t,n,o){if(t.customInspect&&n&&b(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(o,t);return T(i)||(i=l(t,i,o)),i}var r=A(t,n);if(r)return r;var a=Object.keys(n),p=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),m(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(b(n)){var f=n.name?": "+n.name:"";return t.stylize("[Function"+f+"]","special")}if(y(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(N(n))return t.stylize(Date.prototype.toString.call(n),"date");if(m(n))return c(n)}var M="",w=!1,C=["{","}"];if(h(n)&&(w=!0,C=["[","]"]),b(n)){var I=n.name?": "+n.name:"";M=" [Function"+I+"]"}if(y(n)&&(M=" "+RegExp.prototype.toString.call(n)),N(n)&&(M=" "+Date.prototype.toUTCString.call(n)),m(n)&&(M=" "+c(n)),0===a.length&&(!w||0==n.length))return C[0]+M+C[1];if(o<0)return y(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var E;return E=w?u(t,n,o,p,a):a.map(function(e){return d(t,n,o,p,e,w)}),t.seen.pop(),g(E,M,C)}function A(t,e){if(I(e))return t.stylize("undefined","undefined");if(T(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return w(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):f(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,o,i){for(var r=[],a=0,s=e.length;a-1&&(s=r?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),I(a)){if(r&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function g(t,e,n){var o=0,i=t.reduce(function(t,e){return o++,e.indexOf("\n")>=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function h(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function f(t){return null===t}function M(t){return null==t}function w(t){return"number"==typeof t}function T(t){return"string"==typeof t}function C(t){return"symbol"==typeof t}function I(t){return void 0===t}function y(t){return E(t)&&"[object RegExp]"===x(t)}function E(t){return"object"==typeof t&&null!==t}function N(t){return E(t)&&"[object Date]"===x(t)}function m(t){return E(t)&&("[object Error]"===x(t)||t instanceof Error)}function b(t){return"function"==typeof t}function D(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function x(t){return Object.prototype.toString.call(t)}function v(t){return t<10?"0"+t.toString(10):t.toString(10)}function B(){var t=new Date,e=[v(t.getHours()),v(t.getMinutes()),v(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function L(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var S=/%[sdj%]/g;e.format=function(t){if(!T(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return t}}),s=o[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function a(t,e,n){return t&e^~t&n}function s(t,e,n){return t&e^t&n^e&n}function l(t){return i(t,2)^i(t,13)^i(t,22)}function A(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^r(t,3)}function u(t){return i(t,17)^i(t,19)^r(t,10)}var d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=new Array(64);return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,i,r,g,h,p,f,M,w=this._w;e=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,r=0|this._e,g=0|this._f,h=0|this._g,p=0|this._h;for(var T=0;T<64;T++){var C=w[T]=T<16?t.readInt32BE(4*T):u(w[T-2])+w[T-7]+c(w[T-15])+w[T-16];f=p+A(r)+a(r,g,h)+d[T]+C,M=l(e)+s(e,n,o),p=h,h=g,g=r,r=i+f,i=o,o=n,n=e,e=f+M}this._a=e+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=r+this._e|0,this._f=g+this._f|0,this._g=h+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=l,e.call(this,128,112)}function i(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}var s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160); +return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,l,A,c,u,d,g,h,p,f,M,w,T,C,I=this._w;e=0|this._a,n=0|this._b,o=0|this._c,l=0|this._d,A=0|this._e,c=0|this._f,u=0|this._g,d=0|this._h,g=0|this._al,h=0|this._bl,p=0|this._cl,f=0|this._dl,M=0|this._el,w=0|this._fl,T=0|this._gl,C=0|this._hl;for(var y=0;y<80;y++){var E,N,m=2*y;if(y<16)E=I[m]=t.readInt32BE(4*m),N=I[m+1]=t.readInt32BE(4*m+4);else{var b=I[m-30],D=I[m-30+1],x=i(b,D,1)^i(b,D,8)^b>>>7,v=i(D,b,1)^i(D,b,8)^i(D,b,7);b=I[m-4],D=I[m-4+1];var B=i(b,D,19)^i(D,b,29)^b>>>6,L=i(D,b,19)^i(b,D,29)^i(D,b,6),S=I[m-14],Q=I[m-14+1],j=I[m-32],U=I[m-32+1];N=v+Q,E=x+S+(N>>>0>>0?1:0),N+=L,E=E+B+(N>>>0>>0?1:0),N+=U,E=E+j+(N>>>0>>0?1:0),I[m]=E,I[m+1]=N}var k=a(e,n,o),R=a(g,h,p),z=i(e,g,28)^i(g,e,2)^i(g,e,7),Y=i(g,e,28)^i(e,g,2)^i(e,g,7),O=i(A,M,14)^i(A,M,18)^i(M,A,9),F=i(M,A,14)^i(M,A,18)^i(A,M,9),H=s[m],V=s[m+1],P=r(A,c,u),G=r(M,w,T),X=C+F,W=d+O+(X>>>0>>0?1:0);X+=G,W=W+P+(X>>>0>>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=N,W=W+E+(X>>>0>>0?1:0);var J=Y+R,Z=z+k+(J>>>0>>0?1:0);d=u,C=T,u=c,T=w,c=A,w=M,M=f+X|0,A=l+W+(M>>>0>>0?1:0)|0,l=o,f=p,o=n,p=h,n=e,h=g,g=X+J|0,e=W+Z+(g>>>0>>0?1:0)|0}this._al=this._al+g|0,this._bl=this._bl+h|0,this._cl=this._cl+p|0,this._dl=this._dl+f|0,this._el=this._el+M|0,this._fl=this._fl+w|0,this._gl=this._gl+T|0,this._hl=this._hl+C|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+o+(this._cl>>>0

>>0?1:0)|0,this._d=this._d+l+(this._dl>>>0>>0?1:0)|0,this._e=this._e+A+(this._el>>>0>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+d+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,o){n.writeInt32BE(t,o),n.writeInt32BE(e,o+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function o(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,o=-271733879,i=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return o<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,o,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var o=t.length+(r-t.length%r);t=e.concat([t,a],o)}for(var i=[],s=n?t.readInt32BE:t.readInt32LE,l=0;l>>32-e}function l(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=p(t),i=8*t.length,r=8*t.length;o[i>>>5]|=128<<24-i%32,o[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var a=0;a>>24)|4278255360&(s<<24|s>>>8)}var l=f(n);return new e(l)}t.exports=l;var A=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],g=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,o=0;n>>5]|=t[n]<<24-o%32;return e},f=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},M=function(t,e,l){for(var p=0;p<16;p++){var f=l+p,M=e[f];e[f]=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8)}var w,T,C,I,y,E,N,m,b,D;E=w=t[0],N=T=t[1],m=C=t[2],b=I=t[3],D=y=t[4];for(var x,p=0;p<80;p+=1)x=w+e[l+A[p]]|0,x+=p<16?n(T,C,I)+g[0]:p<32?o(T,C,I)+g[1]:p<48?i(T,C,I)+g[2]:p<64?r(T,C,I)+g[3]:a(T,C,I)+g[4],x|=0,x=s(x,u[p]),x=x+y|0,w=y,y=I,I=s(C,10),C=T,T=x,x=E+e[l+c[p]]|0,x+=p<16?a(N,m,b)+h[0]:p<32?r(N,m,b)+h[1]:p<48?i(N,m,b)+h[2]:p<64?o(N,m,b)+h[3]:n(N,m,b)+h[4],x|=0,x=s(x,d[p]),x=x+D|0,E=D,D=b,b=s(m,10),m=N,N=x;x=t[1]+C+b|0,t[1]=t[2]+I+D|0,t[2]=t[3]+y+E|0,t[3]=t[4]+w+N|0,t[4]=t[0]+T+m|0,t[0]=x}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function o(t,n){if(!(this instanceof o))return new o(t,n);this._opad=l,this._alg=t;var a="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>a?n=i(t).update(n).digest():n.length(Math.pow(2,32)-1)*s))throw new TypeError("keylen exceeds maximum length");h.copy(A,0,0,s);for(var p=1;pe&&(e=i)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,o){e.push(A.default.createElement("button",{type:"button",key:o,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},A.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,o="modal-dialog"+(n?" modal-lg":"");return A.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},A.default.createElement("div",{className:o},A.default.createElement("div",{className:"modal-content"},A.default.createElement("div",{className:"modal-header"},A.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),A.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,A.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),A.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),A.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(l.Component);e.default=d},,,,,,,,,function(t,e,n){var o=n(316);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"/*!\r\n * Handsontable 0.11.2\r\n * Handsontable is a simple jQuery plugin for editable tables with basic copy-paste compatibility with Excel and Google Docs\r\n *\r\n * Copyright 2012-2014 Marcin Warpechowski\r\n * Licensed under the MIT license.\r\n * http://handsontable.com/\r\n *\r\n * Date: Thu Sep 11 2014 23:41:54 GMT+0200 (CEST)\r\n */.handsontable,.handsontable .relative{position:relative}.handsontable.htAutoColumnSize{visibility:hidden;left:0;position:absolute;top:0}.handsontable div,.handsontable table,.handsontable tbody,.handsontable td,.handsontable th,.handsontable thead{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable table.htCore{border-collapse:separate;position:relative;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;max-width:none;max-height:none}.handsontable col,.handsontable col.rowHeader{width:50px}.handsontable td,.handsontable th{border-right:1px solid #ccc;border-bottom:1px solid #ccc;height:22px;empty-cells:show;line-height:21px;padding:0 4px;background-color:#fff;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line}.handsontable td.htInvalid{background-color:#ff4c42!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #ccc;border-bottom:1px solid #ccc}.handsontable th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable tr:first-child th.htNoFrame{border-left-width:0;background-color:#fff;border-color:#fff}.handsontable .htNoFrame+td,.handsontable .htNoFrame+th,.handsontable td:first-child,.handsontable th:first-child{border-left:1px solid #ccc}.handsontable tr:first-child td,.handsontable tr:first-child th{border-top:1px solid #ccc}.handsontable thead tr.lastChild th,.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable th{background-color:#eee;color:#222;text-align:center;font-weight:400;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#ccc}.handsontable thead th .relative{padding:2px 4px}.handsontable .manualColumnMover{left:0;width:5px;height:25px}.handsontable .manualColumnMover,.handsontable .manualRowMover{position:fixed;top:0;background-color:transparent;z-index:999;cursor:move}.handsontable .manualRowMover{left:-4px;height:5px;width:50px}.handsontable .manualColumnMoverGuide,.handsontable .manualRowMoverGuide{position:fixed;left:0;top:0;background-color:#ccc;width:25px;height:25px;opacity:.7;display:none}.handsontable .manualColumnMoverGuide.active,.handsontable .manualRowMoverGuide.active{display:block}.handsontable .manualColumnMover.active,.handsontable .manualColumnMover:hover,.handsontable .manualRowMover.active,.handsontable .manualRowMover:hover{background-color:#88f}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer.active,.handsontable .manualColumnResizer:hover,.handsontable .manualRowResizer.active,.handsontable .manualRowResizer:hover{background-color:#aab}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#aab;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#aab;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none!important}.handsontable td.area{background-color:#eef4ff}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:2px solid #5292f7;outline-width:0;margin:0;padding:1px 4px 0 2px;font-family:inherit;line-height:inherit;font-size:inherit;box-shadow:1px 2px 5px rgba(0,0,0,.4);resize:none;display:inline-block;color:#000;border-radius:0;background-color:#fff}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:100}.htSelectEditor{-webkit-appearance:menulist-button!important;position:absolute}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu :after{content:'\\25B6';color:#777;position:absolute;right:5px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#eee;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htNumeric{text-align:right}.htCommentCell{position:relative}.htCommentCell:after{content:'';position:absolute;top:0;right:0;border-left:6px solid transparent;border-top:6px solid red}.handsontable .handsontable .wtHider{padding:0 0 5px}.handsontable .handsontable table{box-shadow:1px 2px 5px rgba(0,0,0,.4)}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:#fff}.handsontable.listbox td,.handsontable.listbox th,.handsontable.listbox tr:first-child td,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th{border-width:0}.handsontable.listbox td,.handsontable.listbox th{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr:hover td,.handsontable.listbox tr td.current{background:#eee}.htContextMenu{display:none;position:absolute;z-index:1060}.htContextMenu .ht_clone_corner,.htContextMenu .ht_clone_left,.htContextMenu .ht_clone_top{display:none}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_corner{z-index:103}.htContextMenu table.htCore{outline:1px solid #bbb}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:#fff;border-width:0;padding:4px 6px 0;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.htContextMenu table tbody tr td:first-child{border:0}.htContextMenu table tbody tr td.htDimmed{font-style:normal;color:#323232}.htContextMenu table tbody tr td.current{background:#e9e9e9}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #bbb;height:0;padding:0}.htContextMenu table tbody tr td.htDisabled{color:#999}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htContextMenu table tbody tr td div{padding-left:10px}.htContextMenu table tbody tr td div span.selected{margin-top:-2px;position:absolute;left:4px}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.htCommentTextArea{background-color:#fffacd;box-shadow:1px 1px 2px #bbb;font-family:Arial;-webkit-box-shadow:1px 1px 2px #bbb;-moz-box-shadow:1px 1px 2px #bbb}.wtDebugHidden{display:none}.wtDebugVisible{display:block;-webkit-animation-duration:.5s;-webkit-animation-name:wtFadeInFromNone;animation-duration:.5s;animation-name:wtFadeInFromNone}@keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}@-webkit-keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}",""])},function(t,e,n){var o=n(318);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #ddd;border-collapse:collapse!important;border-radius:1px}.bootstrap-table .table,.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td{padding:8px!important}.fixed-table-container{position:relative;clear:both;border:1px solid #ddd;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.fixed-table-footer,.fixed-table-header{height:37px;overflow:hidden;border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0}.fixed-table-header{border-bottom:1px solid #ddd}.fixed-table-footer{border-top:1px solid #ddd}.fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.fixed-table-container table{width:100%}.fixed-table-container thead th{height:0;padding:0;margin:0;border-left:1px solid #ddd}.fixed-table-container thead th:first-child{border-left:none;border-top-left-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px}.fixed-table-container thead th .th-inner{padding:8px;line-height:24px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-table-container thead th .sortable{cursor:pointer}.fixed-table-container tbody td{border-left:1px solid #ddd}.fixed-table-container tbody tr:first-child td{border-top:none}.fixed-table-container tbody td:first-child{border-left:none}.fixed-table-container tbody .selected td{background-color:#f5f5f5}.fixed-table-container .bs-checkbox{text-align:center}.fixed-table-container .bs-checkbox .th-inner{padding:8px 0}.fixed-table-container input[type=checkbox],.fixed-table-container input[type=radio]{margin:0 auto!important}.fixed-table-container .no-records-found{text-align:center}.fixed-table-pagination .pagination,.fixed-table-pagination .pagination-detail{margin-top:10px;margin-bottom:10px}.fixed-table-pagination .pagination a{padding:6px 12px;line-height:1.428571429}.fixed-table-pagination .pagination-info{line-height:34px;margin-right:5px}.fixed-table-pagination .btn-group{position:relative;display:inline-block;vertical-align:middle}.fixed-table-pagination .dropup .dropdown-menu{margin-bottom:0}.fixed-table-pagination .page-list{display:inline-block}.fixed-table-toolbar .columns-left{margin-right:5px}.fixed-table-toolbar .columns-right{margin-left:5px}.fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429}.fixed-table-toolbar .bars,.fixed-table-toolbar .columns,.fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px;line-height:34px}.fixed-table-pagination li.disabled a{pointer-events:none;cursor:default}.fixed-table-loading{display:none;position:absolute;top:42px;right:0;bottom:0;left:0;z-index:99;background-color:#fff;text-align:center}.fixed-table-body .card-view .title{font-weight:700;display:inline-block;min-width:30%;text-align:left!important}.fixed-table-body thead th .th-inner,.table td,.table th{box-sizing:border-box}.table td,.table th{vertical-align:middle}.fixed-table-toolbar .dropdown-menu{text-align:left;max-height:300px;overflow:auto}.fixed-table-toolbar .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.fixed-table-toolbar .btn-group>.btn-group>.btn{border-radius:0}.fixed-table-toolbar .btn-group>.btn-group:first-child>.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.fixed-table-toolbar .btn-group>.btn-group:last-child>.btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.bootstrap-table .table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.bootstrap-table .table thead>tr>th{padding:0;margin:0}.pull-right .dropdown-menu{right:0;left:auto}p.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}",""])},function(t,e,n){var o=n(320);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box;text-align:left}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;*border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{filter:progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-o-linear-gradient(top,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:\"\\2191\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu>.dropdown-menu.drop-left{left:-80%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:\" \"}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context-up:before,.dropdown-context:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.dropdown-context-up:after,.dropdown-context:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.dropdown-context-up:after,.dropdown-context-up:before{top:auto;bottom:-7px;z-index:9999}.dropdown-context-up:before{border-right:7px solid transparent;border-top:7px solid #ccc;border-bottom:none;border-left:7px solid transparent}.dropdown-context-up:after{border-right:6px solid transparent;border-top:6px solid #fff;border-left:6px solid transparent;border-bottom:none}.dropdown-context-sub:after,.dropdown-context-sub:before,.dropdown-context .dropdown-submenu:hover .dropdown-menu,.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:none}.compressed-context a{padding-left:14px;padding-top:0;padding-bottom:0;font-size:13px}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}",""]); +},function(t,e,n){var o=n(322);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".rule-delete{color:#f44336;vertical-align:text-top;cursor:pointer}.rule-text-editor{width:260px;display:inline-block;height:26px;padding:3px}.rule-property{padding-right:10px;padding-left:10px;line-height:28px;display:inline-block;border:1px solid gray;margin-left:5px}.rule-add-property{cursor:pointer;padding-left:10px;line-height:30px;color:blue}.rule-property-del{padding:5px;cursor:pointer;color:#ff0600}.rule-add-action{color:blue;cursor:pointer;padding-left:5px;padding-bottom:5px}.rule-action{padding:1px;line-height:27px}.rule-delete-action{font-size:10pt;cursor:pointer;color:#ff9800}.rule-join-node{color:#795548;font-size:10pt;vertical-align:text-top;margin-left:2px}.rule-join-container{border:1px solid #999;padding:1px;background:#fff}",""])},function(t,e){"use strict";!function(t){window.URule||(window.URule={}),URule.setDomContent=function(t,e){navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent",e):t.prop("innerText",e)},URule.getDomContent=function(t){return navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent"):t.prop("innerText")}}($)},function(t,e,n){var o,i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};window.Handsontable={plugins:{},helper:{}},function(t,n,o){"use strict";function i(){this.refCounter=0,this.init()}function a(){function t(){var t=this;t._registerTimeout(setTimeout(function(){t.updateSettings({observeChanges:!0})},0))}function e(t){return function(e,n){return e[1]===n[1]?0:null===e[1]?1:null===n[1]?-1:e[1]n[1]?t?1:-1:0}}function n(t){return function(e,n){if(e[1]===n[1])return 0;if(null===e[1])return 1;if(null===n[1])return-1;var o=new Date(e[1]),i=new Date(n[1]);return oi?t?1:-1:0}}function i(t){return"undefined"!=typeof t.sortColumn}var r=this;this.init=function(e){var n,o,i=this,a=i.getSettings().columnSorting;if(i.sortingEnabled=!!a,i.sortingEnabled){i.sortIndex=[];var A=s.call(i);"undefined"!=typeof A?(n=A.sortColumn,o=A.sortOrder):(n=a.column,o=a.sortOrder),r.sortByColumn.call(i,n,o),i.sort=function(){var t=Array.prototype.slice.call(arguments);return r.sortByColumn.apply(i,t)},"undefined"==typeof i.getSettings().observeChanges&&t.call(i),"afterInit"==e&&(l.call(i),i.addHook("afterCreateRow",r.afterCreateRow),i.addHook("afterRemoveRow",r.afterRemoveRow),i.addHook("afterLoadData",r.init))}else delete i.sort,i.removeHook("afterCreateRow",r.afterCreateRow),i.removeHook("afterRemoveRow",r.afterRemoveRow),i.removeHook("afterLoadData",r.init)},this.setSortingColumn=function(t,e){var n=this;return"undefined"==typeof t?(delete n.sortColumn,void delete n.sortOrder):(n.sortColumn===t&&"undefined"==typeof e?n.sortOrder=!n.sortOrder:n.sortOrder="undefined"==typeof e||e,void(n.sortColumn=t))},this.sortByColumn=function(t,e){var n=this;r.setSortingColumn.call(n,t,e),"undefined"!=typeof n.sortColumn&&(o.hooks.run(n,"beforeColumnSort",n.sortColumn,n.sortOrder),r.sort.call(n),n.render(),a.call(n),o.hooks.run(n,"afterColumnSort",n.sortColumn,n.sortOrder))};var a=function(){var t=this,e={};"undefined"!=typeof t.sortColumn&&(e.sortColumn=t.sortColumn),"undefined"!=typeof t.sortOrder&&(e.sortOrder=t.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&o.hooks.run(t,"persistentStateSave","columnSorting",e)},s=function(){var t=this,e={};return o.hooks.run(t,"persistentStateLoad","columnSorting",e),e.value},l=function(){function t(){var t=n.view.TBODY.querySelector("tr").querySelectorAll("th");return t.length}function e(e){var n=o.Dom.closest(e,"TH");return o.Dom.index(n)-t()}var n=this;n.rootElement.on("click.handsontable",".columnSorting",function(t){if(o.Dom.hasClass(t.target,"columnSorting")){var i=e(t.target);r.sortByColumn.call(n,i)}})};this.sort=function(){var t=this;if("undefined"!=typeof t.sortOrder){t.sortingEnabled=!1,t.sortIndex.length=0;for(var o=this.colOffset(),i=0,r=this.countRows()-t.getSettings().minSpareRows;i=t&&(n.sortIndex[o][0]+=e);for(var o=0;oo&&(n.sortIndex[s][0]-=e);a.call(n)}},this.afterChangeSort=function(t){var e=this,n=!1,o={};if(t){for(var i=0;i1&&i(n,a,e),s(),r()}}t(document).on("mousedown.htCommment",o.helper.proxy(a))},s=function(){t(document).off("mousedown.htCommment"),t(document).on("mouseover.htCommment",o.helper.proxy(c))},l=function(t,n){var i=e.view.wt.wtTable.getCell(t.from),r=o.Dom.offset(i),s=e.getColWidth(t.from.col);n.style.position="absolute",n.style.left=r.left+s+"px",n.style.top=r.top+"px",n.style.zIndex=2,a(t,n)},A=function(t){var e=document.getElementsByClassName("htComments")[0];if(!e){e=document.createElement("DIV");var n=document.createElement("TEXTAREA");o.Dom.addClass(n,"htCommentTextArea"),e.appendChild(n),o.Dom.addClass(e,"htComments"),document.getElementsByTagName("body")[0].appendChild(e)}return t=t||"",document.getElementsByClassName("htCommentTextArea")[0].value=t,e},c=function(t){if(t.target.className.indexOf("htCommentCell")!=-1){s();var n=e.view.wt.wtTable.getCoords(t.target),i={from:new p(n.row,n.col)};o.Comments.showComment(i)}else"htCommentTextArea"!=t.target.className&&r()};return{init:function(){t(document).on("mouseover.htCommment",o.helper.proxy(c))},showComment:function(t){var n=e.getCellMeta(t.from.row,t.from.col),o="";n.comment&&(o=n.comment);var i=A(o);i.style.display="block",l(t,i)},removeComment:function(t,n){e.removeCellMeta(t,n,"comment"),e.render()},checkSelectionCommentsConsistency:function(){var t=!1,n=e.getSelectedRange().from;return e.getCellMeta(n.row,n.col).comment&&(t=!0),t}}}function l(t){var e,o=function(){n.localStorage[t+"__persistentStateKeys"]=JSON.stringify(e)},i=function(){var o=n.localStorage[t+"__persistentStateKeys"],i="string"==typeof o?JSON.parse(o):void 0;e=i?i:[]},r=function(){e=[],o()};i(),this.saveValue=function(i,r){n.localStorage[t+"_"+i]=JSON.stringify(r),e.indexOf(i)==-1&&(e.push(i),o())},this.loadValue=function(e,o){e="undefined"!=typeof e?e:o;var i=n.localStorage[t+"_"+e];return"undefined"==typeof i?void 0:JSON.parse(i)},this.reset=function(e){n.localStorage.removeItem(t+"_"+e)},this.resetAll=function(){for(var o=0;o=t&&this[n].col<=e&&this[n].col+this[n].colspan-1>=e)return this[n]},t.setInfo=function(t){for(var e=0,n=this.length;eMath.ceil(o.top+o.height)||(t.clientXMath.ceil(o.left+o.width)||void 0)))};A.on("mousemove.border."+e.guid,function(t){r(t)&&(A.off("mousemove.border."+e.guid),i.show())})}})}}function p(t,e){"undefined"!=typeof t&&"undefined"!=typeof e?(this.row=t,this.col=e):(this.row=null,this.col=null)}function f(t,e,n){this.highlight=t,this.from=e,this.to=n}function M(){this.cache=[]}function w(t,e){this.total=t,this.countTH=e}function T(t,e,n,o){var i,r=0;for(g.apply(this,arguments),this.containerSizeFn=e,this.cellSizesSum=0,this.cellSizes=[],this.cellStretch=[],this.cellCount=0,this.visibleCellCount=0,this.remainingSize=0,this.strategy=o;;){if(i=n(r),void 0===i)break;this.cellSizesSum-5&&t.clientX-i<5&&t.clientY-r>-5&&t.clientY-r<5||(i=t.clientX,r=t.clientY,o.Dom.addClass(a,"wtDebugHidden"),o.Dom.removeClass(a,"wtDebugVisible"),clearTimeout(this.lastTimeout),this.lastTimeout=setTimeout(function(){o.Dom.removeClass(a,"wtDebugHidden"),o.Dom.addClass(a,"wtDebugVisible")},1e3)))})}function y(e){var i=this;this.instance=e;var r=[null,null];this.dblClickTimeout=[null,null];var a,s=function(t){var e=i.parentCell(t.target);o.Dom.hasClass(t.target,"corner")?i.instance.getSetting("onCellCornerMouseDown",t,t.target):e.TD&&i.instance.hasSetting("onCellMouseDown")&&i.instance.getSetting("onCellMouseDown",t,e.coords,e.TD,i.instance),2!==t.button&&e.TD&&(r[0]=e.TD,clearTimeout(i.dblClickTimeout[0]),i.dblClickTimeout[0]=setTimeout(function(){r[0]=null},1e3))},l=function(t){if(i.instance.hasSetting("onCellMouseOver")){var e=i.instance.wtTable.TABLE,n=o.Dom.closest(t.target,["TD","TH"],e);n&&n!==a&&o.Dom.isChildOf(n,e)&&(a=n,i.instance.getSetting("onCellMouseOver",t,i.instance.wtTable.getCoords(n),n,i.instance))}},A=function(t){if(2!==t.button){var e=i.parentCell(t.target);e.TD===r[0]&&e.TD===r[1]?(o.Dom.hasClass(t.target,"corner")?i.instance.getSetting("onCellCornerDblClick",t,e.coords,e.TD,i.instance):i.instance.getSetting("onCellDblClick",t,e.coords,e.TD,i.instance),r[0]=null,r[1]=null):e.TD===r[0]&&(r[1]=e.TD,clearTimeout(i.dblClickTimeout[1]),i.dblClickTimeout[1]=setTimeout(function(){r[1]=null},500))}};t(this.instance.wtTable.holder).on("mousedown",s),t(this.instance.wtTable.TABLE).on("mouseover",l),t(this.instance.wtTable.holder).on("mouseup",A),t(n).on("resize."+this.instance.guid,function(){i.instance.draw()})}function E(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()}function N(t,e,n){this.offset=t,this.total=e,this.countTH=n}function m(t,e,n){g.apply(this,arguments),this.containerSizeFn=e,this.sizeAtIndex=n,this.cellSizesSum=0,this.cellSizes=[],this.cellCount=0,this.visiblCellCount=0,this.remainingSize=-(1/0),this.maxOuts=10,this.curOuts=this.maxOuts}function b(t){this.instance=t}function D(t){this.instance=t,this.type="corner",this.init(),this.clone=this.makeClone("corner")}function x(t){this.instance=t,this.type="horizontal",this.cellSize=50,this.offset=0,this.init(),this.clone=this.makeClone("left")}function v(t){this.instance=t,this.type="vertical",this.cellSize=this.instance.wtSettings.settings.defaultRowHeight,this.offset,this.total,this.init(),this.clone=this.makeClone("top")}function B(t){this.instance=t,t.update("scrollbarWidth",o.Dom.getScrollbarWidth()),t.update("scrollbarHeight",o.Dom.getScrollbarWidth()),this.vertical=new v(t),this.horizontal=new x(t),this.corner=new D(t),t.getSetting("debug")&&(this.debug=new I(t)),this.registerListeners()}function L(t,e){this.settings=t,this.cellRange=e||null,this.instanceBorders={}}function S(t,e){var n=this;this.instance=t,this.defaults={table:void 0,debug:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,data:void 0,offsetRow:0,fixedColumnsLeft:0,fixedRowsTop:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,width:null,height:null,cellRenderer:function(t,e,i){var r=n.getSetting("data",t,e);o.Dom.fastInnerText(i,void 0===r||null===r?"":r)},columnWidth:50,rowHeight:function(t){return 23},defaultRowHeight:23,selections:null,hideBorderOnMouseDownOver:!1,onCellMouseDown:null,onCellMouseOver:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1},this.settings={};for(var i in this.defaults)if(this.defaults.hasOwnProperty(i))if(void 0!==e[i])this.settings[i]=e[i];else{if(void 0===this.defaults[i])throw new Error('A required setting "'+i+'" was not provided');this.settings[i]=this.defaults[i]}}function Q(t,e){this.instance=t,this.TABLE=e,o.Dom.removeTextNodes(this.TABLE);var n=this.TABLE.parentNode;if(!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var i=document.createElement("DIV");i.className="wtSpreader",n&&n.insertBefore(i,this.TABLE),i.appendChild(this.TABLE)}if(this.spreader=this.TABLE.parentNode,n=this.spreader.parentNode,!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var r=document.createElement("DIV");r.className="wtHider",n&&n.insertBefore(r,this.spreader),r.appendChild(this.spreader)}if(this.hider=this.spreader.parentNode,this.hiderStyle=this.hider.style,this.hiderStyle.position="relative",n=this.hider.parentNode,!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var a=document.createElement("DIV");a.style.position="relative",a.className="wtHolder",t.cloneSource||(a.className+=" ht_master"),n&&n.insertBefore(a,this.hider),a.appendChild(this.hider)}if(this.holder=this.hider.parentNode,this.TBODY=this.TABLE.getElementsByTagName("TBODY")[0],this.TBODY||(this.TBODY=document.createElement("TBODY"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.getElementsByTagName("THEAD")[0],this.THEAD||(this.THEAD=document.createElement("THEAD"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.getElementsByTagName("COLGROUP")[0],this.COLGROUP||(this.COLGROUP=document.createElement("COLGROUP"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.instance.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length){var s=document.createElement("TR");this.THEAD.appendChild(s)}this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.oldCellCache=new M,this.currentCellCache=new M,this.rowFilter=null,this.columnFilter=null,this.columnWidthCache=[]}function j(t){this.wtTable=t,this.instance=t.instance,this.rowFilter=t.rowFilter,this.columnFilter=t.columnFilter,this.TABLE=t.TABLE,this.THEAD=t.THEAD,this.TBODY=t.TBODY,this.COLGROUP=t.COLGROUP,this.utils=j.utils}function U(e){this.instance=e,this.resetSettings();var o=this;t(n).on("resize.walkontable."+this.instance.guid,function(){o.clientHeight=o.getWorkspaceHeight()})}Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=this.length>>>0,n=Number(arguments[1])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=e);n>>0)+(o++ +"__"),e||(this._wmCache=[])};e?i.prototype={set:function(e,n){var o=e[this.name];o&&o[0]===e?o[1]=n:t(e,this.name,{value:[e,n],writable:!0})},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){this.set(t,void 0)}}:i.prototype={set:function(t,e){if("undefined"!=typeof t&&"undefined"!=typeof e){for(var n=0,o=this._wmCache.length;n=0;l--)if(null===e[l])e.splice(l,1);else{var A=e[l][0],c=M.propToCol(e[l][1]),u=I.runHooksAndReturn("modifyCol",c),d=I.getCellMeta(A,u);if("numeric"===d.type&&"string"==typeof e[l][3]&&e[l][3].length>0&&/^-?[\d\s]*(\.|\,)?\d*$/.test(e[l][3])){var g=e[l][3].length;"undefined"==typeof d.language?numeral.language("en"):e[l][3].indexOf(".")===g-3&&e[l][3].indexOf(",")===-1?numeral.language("en"):numeral.language(d.language),e[l][3]=numeral().unformat(e[l][3]||"0")}I.getCellValidator(d)&&(s.addValidatorToQueue(),I.validateCell(e[l][3],d,function(t,n){return function(o){if("boolean"!=typeof o)throw new Error("Validation error: result is not boolean");o===!1&&n.allowInvalid===!1&&(e.splice(t,1),n.valid=!0,--t),s.removeValidatorFormQueue()}}(l,d),n))}s.checkIfQueueIsEmpty()}function l(t,e){var n=t.length-1;if(!(n<0)){for(;0<=n;n--)if(null!==t[n]){if(null!=t[n][2]||null!=t[n][3]){if(h.settings.minSpareRows)for(;t[n][0]>I.countRows()-1;)M.createRow();if("array"===I.dataType&&h.settings.minSpareCols)for(;M.propToCol(t[n][1])>I.countCols()-1;)M.createCol();M.set(t[n][0],t[n][1],t[n][3])}}else t.splice(n,1);I.forceFullRender=!0,w.adjustRowsAndCols(),o.hooks.run(I,"beforeChangeRender",t,e),T.refreshBorders(null,!0),o.hooks.run(I,"afterChange",t,e||"edit")}}function A(e,n,o){return"object"===("undefined"==typeof e?"undefined":r(e))?e:t.isPlainObject(o)?o:[[e,n,o]]}function c(t){if(t.hasOwnProperty("type")){var e,n={};if("object"===r(t.type))e=t.type;else if("string"==typeof t.type&&(e=o.cellTypes[t.type],void 0===e))throw new Error('You declared cell type "'+t.type+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(n[i]=e[i]);return n}}function u(t){return o.hooks.execute(I,"modifyRow",t)}function d(t){return o.hooks.execute(I,"modifyCol",t)}function g(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var h,M,w,T,C,I=this,y=function(){},E=t(document.documentElement),N=t(document.body);o.helper.extend(y.prototype,k.prototype),o.helper.extend(y.prototype,i),o.helper.extend(y.prototype,c(i)),this.rootElement=e,this.container=document.createElement("DIV"),this.container.className="htContainer",e.prepend(this.container),this.container=t(this.container),this.guid="ht_"+o.helper.randomString(),this.rootElement[0].id||(this.rootElement[0].id=this.guid),h={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new y,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},w={alter:function(t,e,n,i,r){var a;switch(n=n||1,t){case"insert_row":a=M.createRow(e,n),a&&(T.isSelected()&&h.selRange.from.row>=e?(h.selRange.from.row=h.selRange.from.row+a,T.transformEnd(a,0)):T.refreshBorders());break;case"insert_col":if(a=M.createCol(e,n)){if(o.helper.isArray(I.getSettings().colHeaders)){var s=[e,0];s.length+=a,Array.prototype.splice.apply(I.getSettings().colHeaders,s)}T.isSelected()&&h.selRange.from.col>=e?(h.selRange.from.col=h.selRange.from.col+a,T.transformEnd(0,a)):T.refreshBorders()}break;case"remove_row":M.removeRow(e,n),h.cellSettings.splice(e,n),w.adjustRowsAndCols(),T.refreshBorders();break;case"remove_col":M.removeCol(e,n);for(var l=0,A=M.getAll().length;li-1?(s=i-1,a=!0,A>s&&(A=s)):A>i-1&&(A=i-1,a=!0,s>A&&(s=A)),l>r-1?(l=r-1,a=!0,c>l&&(c=l)):c>r-1&&(c=r-1,a=!0,l>c&&(l=c)),a&&I.selectCell(s,l,A,c)}},populateFromArray:function(t,e,n,i,r){var a,s,l,A,c=[],u={};if(s=e.length,0===s)return!1;var d,g,p,f;switch(r){case"shift_down":for(d=n?n.col-t.col+1:0,g=n?n.row-t.row+1:0,e=o.helper.translateRowsToColumns(e),l=0,A=e.length,p=Math.max(A,d);ln.row||!h.settings.minSpareRows&&u.row>I.countRows()-1||u.row>=h.settings.maxRows);a++){for(u.col=t.col,A=e[a]?e[a].length:0,l=0;ln.col||!h.settings.minSpareCols&&u.col>I.countCols()-1||u.col>=h.settings.maxCols);l++)I.getCellMeta(u.row,u.col).readOnly||c.push([u.row,u.col,e[a][l]]),u.col++,n&&l===A-1&&(l=-1);u.row++,n&&a===s-1&&(a=-1)}I.setDataAtCell(c,null,null,i||"populateFromArray")}}},this.selection=T={inProgress:!1,begin:function(){I.selection.inProgress=!0},finish:function(){var t=I.getSelected();o.hooks.run(I,"afterSelectionEnd",t[0],t[1],t[2],t[3]),o.hooks.run(I,"afterSelectionEndByProp",t[0],I.colToProp(t[1]),t[2],I.colToProp(t[3])),I.selection.inProgress=!1},isInProgress:function(){return I.selection.inProgress},setRangeStart:function(t){o.hooks.run(I,"beforeSetRangeStart",t),h.selRange=new f(t,t,t),T.setRangeEnd(t)},setRangeEnd:function(t,e){o.hooks.run(I,"beforeSetRangeEnd",t),I.selection.begin(),h.selRange.to=t,h.settings.multiSelect||(h.selRange.from=t),I.view.wt.selections.current.clear(),I.view.wt.selections.current.add(h.selRange.highlight),I.view.wt.selections.area.clear(),T.isMultiple()&&(I.view.wt.selections.area.add(h.selRange.from),I.view.wt.selections.area.add(h.selRange.to)),(h.settings.currentRowClassName||h.settings.currentColClassName)&&(I.view.wt.selections.highlight.clear(),I.view.wt.selections.highlight.add(h.selRange.from),I.view.wt.selections.highlight.add(h.selRange.to)),o.hooks.run(I,"afterSelection",h.selRange.from.row,h.selRange.from.col,h.selRange.to.row,h.selRange.to.col),o.hooks.run(I,"afterSelectionByProp",h.selRange.from.row,M.colToProp(h.selRange.from.col),h.selRange.to.row,M.colToProp(h.selRange.to.col)),e!==!1&&I.view.mainViewIsActive()&&I.view.scrollViewport(t),T.refreshBorders()},refreshBorders:function(t,e){e||C.destroyEditor(t),I.view.render(),T.isSelected()&&!e&&C.prepareEditor()},isMultiple:function t(){var t=!(h.selRange.to.col===h.selRange.from.col&&h.selRange.to.row===h.selRange.from.row),e=o.hooks.execute(I,"afterIsMultipleSelection",t);if(t)return e},transformStart:function(t,e,n){var o=new p(t,e);I.runHooks("modifyTransformStart",o),h.selRange.highlight.row+t>I.countRows()-1?n&&h.settings.minSpareRows>0?I.alter("insert_row",I.countRows()):h.settings.autoWrapCol&&(o.row=1-I.countRows(),o.col=h.selRange.highlight.col+o.col==I.countCols()-1?1-I.countCols():1):h.settings.autoWrapCol&&h.selRange.highlight.row+o.row<0&&h.selRange.highlight.col+o.col>=0&&(o.row=I.countRows()-1,o.col=h.selRange.highlight.col+o.col==0?I.countCols()-1:-1),h.selRange.highlight.col+o.col>I.countCols()-1?n&&h.settings.minSpareCols>0?I.alter("insert_col",I.countCols()):h.settings.autoWrapRow&&(o.row=h.selRange.highlight.row+o.row==I.countRows()-1?1-I.countRows():1,o.col=1-I.countCols()):h.settings.autoWrapRow&&h.selRange.highlight.col+o.col<0&&h.selRange.highlight.row+o.row>=0&&(o.row=h.selRange.highlight.row+o.row==0?I.countRows()-1:-1,o.col=I.countCols()-1);var i=I.countRows(),r=I.countCols(),a=new p(h.selRange.highlight.row+o.row,h.selRange.highlight.col+o.col);a.row<0?a.row=0:a.row>0&&a.row>=i&&(a.row=i-1),a.col<0?a.col=0:a.col>0&&a.col>=r&&(a.col=r-1),T.setRangeStart(a)},transformEnd:function(t,e){var n=new p(t,e);I.runHooks("modifyTransformEnd",n);var o=I.countRows(),i=I.countCols(),r=new p(h.selRange.to.row+n.row,h.selRange.to.col+n.col);r.row<0?r.row=0:r.row>0&&r.row>=o&&(r.row=o-1),r.col<0?r.col=0:r.col>0&&r.col>=i&&(r.col=i-1),T.setRangeEnd(r)},isSelected:function(){return null!==h.selRange},inInSelection:function(t){return!!T.isSelected()&&h.selRange.includes(t)},deselect:function(){T.isSelected()&&(I.selection.inProgress=!1,h.selRange=null,I.view.wt.selections.current.clear(),I.view.wt.selections.area.clear(),(h.settings.currentRowClassName||h.settings.currentColClassName)&&I.view.wt.selections.highlight.clear(),C.destroyEditor(),T.refreshBorders(),o.hooks.run(I,"afterDeselect"))},selectAll:function(){h.settings.multiSelect&&(T.setRangeStart(new p(0,0)),T.setRangeEnd(new p(I.countRows()-1,I.countCols()-1),!1))},empty:function(){if(T.isSelected()){var t,e,n=h.selRange.getTopLeftCorner(),o=h.selRange.getBottomRightCorner(),i=[];for(t=n.row;t<=o.row;t++)for(e=n.col;e<=o.col;e++)I.getCellMeta(t,e).readOnly||i.push([t,e,""]);I.setDataAtCell(i)}}},this.init=function(){o.hooks.run(I,"beforeInit"),this.updateSettings(h.settings,!0),this.view=new o.TableView(this),C=new o.EditorManager(I,h,T,M),this.forceFullRender=!0,this.view.render(),"object"===r(h.firstRun)&&(o.hooks.run(I,"afterChange",h.firstRun[0],h.firstRun[1]),h.firstRun=!1),o.hooks.run(I,"afterInit")},this.validateCell=function(t,e,n,i){var r=I.getCellValidator(e);"[object RegExp]"===Object.prototype.toString.call(r)&&(r=function(t){return function(e,n){n(t.test(e))}}(r)),"function"==typeof r?(t=o.hooks.execute(I,"beforeValidate",t,e.row,e.prop,i),I._registerTimeout(setTimeout(function(){return r.call(e,t,function(r){e.valid=r,r=o.hooks.execute(I,"afterValidate",r,t,e.row,e.prop,i),n(r)}),t},0))):(e.valid=!0,n(!0))},this.setDataAtCell=function(t,e,n,o){var i,a,c,u=A(t,e,n),d=[];for(i=0,a=u.length;i0){var r,a;for(n=0;n=0;){for(var o=I.countCols()-1;o>=0;)e.addValidatorToQueue(),I.validateCell(I.getDataAtCell(n,o),I.getCellMeta(n,o),function(){e.removeValidatorFormQueue()},"validateCells"),o--;n--}e.checkIfQueueIsEmpty()},this.getRowHeader=function(t){if(void 0===t){for(var e=[],n=0,o=I.countRows();n=0;){if(e=o.hooks.execute(this,"modifyRow",n),I.isEmptyRow(e))i++;else if(t)break;n--}return i},this.countEmptyCols=function(t){if(I.countRows()<1)return 0;for(var e=I.countCols()-1,n=0;e>=0;){if(I.isEmptyCol(e))n++;else if(t)break;e--}return n},this.isEmptyRow=function(t){return h.settings.isEmptyRow.call(I,t)},this.isEmptyCol=function(t){return h.settings.isEmptyCol.call(I,t)},this.selectCell=function(t,e,n,o,i){if("number"!=typeof t||t<0||t>=I.countRows())return!1;if("number"!=typeof e||e<0||e>=I.countCols())return!1;if("undefined"!=typeof n){if("number"!=typeof n||n<0||n>=I.countRows())return!1;if("number"!=typeof o||o<0||o>=I.countCols())return!1}var r=new p(t,e);return h.selRange=new f(r,r,r),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),I.listen(),"undefined"==typeof n?T.setRangeEnd(h.selRange.from,i):T.setRangeEnd(new p(n,o),i),I.selection.finish(),!0},this.selectCellByProp=function(t,e,n,o,i){return arguments[1]=M.propToCol(arguments[1]),"undefined"!=typeof arguments[3]&&(arguments[3]=M.propToCol(arguments[3])),I.selectCell.apply(I,arguments)},this.deselectCell=function(){T.deselect()},this.destroy=function(){I._clearTimeouts(),I.view&&I.view.wt.destroy(),I.rootElement.empty(),I.rootElement.removeData("handsontable"),I.rootElement.off(".handsontable"),t(n).off("."+I.guid),E.off("."+I.guid),N.off("."+I.guid),o.hooks.run(I,"afterDestroy"),o.hooks.destroy(I);for(var e in I)I.hasOwnProperty(e)&&("function"==typeof I[e]?"runHooks"!==e&&"runHooksAndReturn"!==e&&(I[e]=g):"guid"!==e&&(I[e]=null));h=null,M=null,w=null,T=null,C=null,I=null,y=null,E=null,N=null},this.getActiveEditor=function(){return C.getActiveEditor()},this.getInstance=function(){return I},this.addHook=function(t,e){o.hooks.add(t,e,I)},this.addHookOnce=function(t,e){o.hooks.once(t,e,I)},this.removeHook=function(t,e){o.hooks.remove(t,e,I)},this.runHooks=function(t,e,n,i,r,a,s){o.hooks.run(I,t,e,n,i,r,a,s)},this.runHooksAndReturn=function(t,e,n,i,r,a,s){return o.hooks.execute(I,t,e,n,i,r,a,s)},this.timeouts=[],this._registerTimeout=function(t){this.timeouts.push(t)},this._clearTimeouts=function(){for(var t=0,e=this.timeouts.length;t1)for(e=1,n=arguments.length;e-1)return t;t=t.parentNode}return null},o.Dom.isChildOf=function(t,e){for(var n=t.parentNode;null!=n;){if(n==e)return!0;n=n.parentNode}return!1},o.Dom.index=function(t){for(var e=0;t=t.previousSibling;)++e;return e},document.documentElement.classList?(o.Dom.hasClass=function(t,e){return t.classList.contains(e)},o.Dom.addClass=function(t,e){t.classList.add(e)},o.Dom.removeClass=function(t,e){t.classList.remove(e)}):(o.Dom.hasClass=function(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},o.Dom.addClass=function(t,e){""==t.className?t.className=e:this.hasClass(t,e)||(t.className+=" "+e)},o.Dom.removeClass=function(t,e){if(this.hasClass(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}}),o.Dom.removeTextNodes=function(t,e){if(3===t.nodeType)e.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var n=t.childNodes,o=n.length-1;o>=0;o--)this.removeTextNodes(n[o],t)},o.Dom.empty=function(t){for(var e;e=t.lastChild;)t.removeChild(e)},o.Dom.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,o.Dom.fastInnerHTML=function(t,e){this.HTML_CHARACTERS.test(e)?t.innerHTML=e:this.fastInnerText(t,e)},document.createTextNode("test").textContent?o.Dom.fastInnerText=function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=e:(this.empty(t),t.appendChild(document.createTextNode(e)))}:o.Dom.fastInnerText=function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.data=e:(this.empty(t),t.appendChild(document.createTextNode(e)))},o.Dom.isVisible=function(t){for(var e=t;e!==document.documentElement;){if(null===e)return!1;if(11===e.nodeType){if(e.host){if(e.host.impl)return o.Dom.isVisible(e.host.impl);if(e.host)return o.Dom.isVisible(e.host);throw new Error("Lost in Web Components world")}return!1}if("none"===e.style.display)return!1;e=e.parentNode}return!0},o.Dom.offset=function(t){if(this.hasCaptionProblem()&&t.firstChild&&"CAPTION"===t.firstChild.nodeName){var e=t.getBoundingClientRect();return{top:e.top+(n.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),left:e.left+(n.pageXOffset||document.documentElement.scrollLeft)-(document.documentElement.clientLeft||0)}}for(var o=t.offsetLeft,i=t.offsetTop,r=t;(t=t.offsetParent)&&t!==document.body;)o+=t.offsetLeft,i+=t.offsetTop,r=t;return r&&"fixed"===r.style.position&&(o+=n.pageXOffset||document.documentElement.scrollLeft,i+=n.pageYOffset||document.documentElement.scrollTop),{left:o,top:i}},o.Dom.getWindowScrollTop=function(){var t=n.scrollY;return void 0==t&&(t=document.documentElement.scrollTop),t},o.Dom.getWindowScrollLeft=function(){var t=n.scrollX;return void 0==t&&(t=document.documentElement.scrollLeft),t},o.Dom.getScrollTop=function(t){return t===n?o.Dom.getWindowScrollTop(t):t.scrollTop},o.Dom.getScrollLeft=function(t){return t===n?o.Dom.getWindowScrollLeft(t):t.scrollLeft},o.Dom.getComputedStyle=function(t){return t.currentStyle||document.defaultView.getComputedStyle(t)},o.Dom.outerWidth=function(t){return t.offsetWidth},o.Dom.outerHeight=function(t){return this.hasCaptionProblem()&&t.firstChild&&"CAPTION"===t.firstChild.nodeName?t.offsetHeight+t.firstChild.offsetHeight:t.offsetHeight},o.Dom.innerHeight=function(t){return t.clientHeight},o.Dom.innerWidth=function(t){return t.innerWidth},function(){function t(){var t=document.createElement("TABLE");t.style.borderSpacing=0,t.style.borderWidth=0,t.style.padding=0;var e=document.createElement("TBODY");t.appendChild(e),e.appendChild(document.createElement("TR")),e.firstChild.appendChild(document.createElement("TD")),e.firstChild.firstChild.innerHTML="t
t";var o=document.createElement("CAPTION");o.innerHTML="c
c
c
c",o.style.padding=0,o.style.margin=0,t.insertBefore(o,e),document.body.appendChild(t),n=t.offsetHeight<2*t.lastChild.offsetHeight,document.body.removeChild(t)}function e(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),(document.body||document.documentElement).appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return n==o&&(o=e.clientWidth),(document.body||document.documentElement).removeChild(e),n-o}var n;o.Dom.hasCaptionProblem=function(){return void 0===n&&t(),n},o.Dom.getCaretPosition=function(t){if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange();if(null==e)return 0;var n=t.createTextRange(),o=n.duplicate();return n.moveToBookmark(e.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0},o.Dom.getSelectionEndPosition=function(t){if(t.selectionEnd)return t.selectionEnd;if(document.selection){var e=document.selection.createRange();if(null==e)return 0;var n=t.createTextRange();return n.text.indexOf(e.text)+e.text.length}},o.Dom.setCaretPosition=function(t,e,n){if(void 0===n&&(n=e),t.setSelectionRange)t.focus(),t.setSelectionRange(e,n);else if(t.createTextRange){var o=t.createTextRange();o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o.select()}};var i;o.Dom.getScrollbarWidth=function(){return void 0===i&&(i=e()),i}}(),o.TableView=function(e){var i=this,r=t(document.documentElement);this.instance=e,this.settings=e.getSettings(),e.rootElement.data("originalStyle",e.rootElement[0].getAttribute("style")),e.rootElement.addClass("handsontable");var a=document.createElement("TABLE");a.className="htCore",this.THEAD=document.createElement("THEAD"),a.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),a.appendChild(this.TBODY),e.$table=t(a),e.container.prepend(e.$table),e.rootElement.on("mousedown.handsontable",function(t){i.isTextSelectionAllowed(t.target)||(l(),t.preventDefault(),n.focus())}),r.on("keyup."+e.guid,function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var s;this.isMouseDown=function(){return s},r.on("mouseup."+e.guid,function(t){e.selection.isInProgress()&&1===t.which&&e.selection.finish(),s=!1,o.helper.isOutsideInput(document.activeElement)&&e.unlisten()}),r.on("mousedown."+e.guid,function(t){var n=t.target;if(!n.shadowRoot){if(n!==i.wt.wtTable.spreader)for(;n!==document.documentElement;){if(null===n)return;if(n===e.rootElement[0])return;n=n.parentNode}i.settings.outsideClickDeselects?e.deselectCell():e.destroyEditor()}}),e.$table.on("selectstart",function(t){i.settings.fragmentSelection||t.preventDefault()});var l=function(){n.getSelection?n.getSelection().empty?n.getSelection().empty():n.getSelection().removeAllRanges&&n.getSelection().removeAllRanges():document.selection&&document.selection.empty()},A=[new L({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return i.settings.fillHandle&&!i.isCellEdited()&&!e.selection.isMultiple()}}}),new L({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return i.settings.fillHandle&&!i.isCellEdited()&&e.selection.isMultiple()}}}),new L({className:"highlight",highlightRowClassName:i.settings.currentRowClassName,highlightColumnClassName:i.settings.currentColClassName}),new L({className:"fill",border:{width:1,color:"red"}})];A.current=A[0],A.area=A[1],A.highlight=A[2],A.fill=A[3];var c={debug:function(){return i.settings.debug},table:a,stretchH:this.settings.stretchH,data:e.getDataAtCell,totalRows:e.countRows,totalColumns:e.countCols,offsetRow:0,fixedColumnsLeft:function(){return i.settings.fixedColumnsLeft},fixedRowsTop:function(){return i.settings.fixedRowsTop},renderAllRows:i.settings.renderAllRows,rowHeaders:function(){return e.hasRowHeaders()?[function(t,e){i.appendRowHeader(t,e)}]:[]},columnHeaders:function(){return e.hasColHeaders()?[function(t,e){i.appendColHeader(t,e)}]:[]},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(t,e,n){var r=i.instance.colToProp(e),a=i.instance.getCellMeta(t,e),s=i.instance.getCellRenderer(a),l=i.instance.getDataAtRowProp(t,r);s(i.instance,n,t,e,r,l,a),o.hooks.run(i.instance,"afterRenderer",n,t,e,r,l,a)},selections:A,hideBorderOnMouseDownOver:function(){return i.settings.fragmentSelection},onCellMouseDown:function(t,n,r,a){e.listen(),i.activeWt=a,s=!0,2===t.button&&e.selection.inInSelection(n)||(t.shiftKey?n.row>=0&&n.col>=0&&e.selection.setRangeEnd(n):n.row<0||n.col<0?(n.row<0&&e.selectCell(0,n.col,e.countRows()-1,n.col),n.col<0&&e.selectCell(n.row,0,n.row,e.countCols()-1)):e.selection.setRangeStart(n)),o.hooks.run(e,"afterOnCellMouseDown",t,n,r),i.activeWt=i.wt},onCellMouseOver:function(t,n,r,a){i.activeWt=a,n.row>=0&&n.col>=0&&s&&e.selection.setRangeEnd(n),o.hooks.run(e,"afterOnCellMouseOver",t,n,r),i.activeWt=i.wt},onCellCornerMouseDown:function(t){t.preventDefault(),o.hooks.run(e,"afterOnCellCornerMouseDown",t)},beforeDraw:function(t){i.beforeRender(t)},onDraw:function(t){i.onDraw(t)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)}};o.hooks.run(e,"beforeInitWalkontable",c),this.wt=new C(c),this.activeWt=this.wt,t(i.wt.wtTable.spreader).on("mousedown.handsontable, contextmenu.handsontable",function(t){t.target===i.wt.wtTable.spreader&&3===t.which&&t.stopPropagation()}),r.on("click."+e.guid,function(){i.settings.observeDOMVisibility&&i.wt.drawInterrupted&&(i.instance.forceFullRender=!0,i.render())})},o.TableView.prototype.isTextSelectionAllowed=function(t){return!!o.helper.isInput(t)||!(!this.settings.fragmentSelection||!o.Dom.isChildOf(t,this.TBODY))},o.TableView.prototype.isCellEdited=function(){var t=this.instance.getActiveEditor();return t&&t.isOpened()},o.TableView.prototype.beforeRender=function(t){t&&o.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender)},o.TableView.prototype.onDraw=function(t){t&&o.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},o.TableView.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.rootElement.triggerHandler("render.handsontable")},o.TableView.prototype.getCellAtCoords=function(t){var e=this.wt.wtTable.getCell(t);return e<0?null:e},o.TableView.prototype.scrollViewport=function(t){this.wt.scrollViewport(t)},o.TableView.prototype.appendRowHeader=function(t,e){var n=document.createElement("DIV"),i=document.createElement("SPAN");n.className="relative",i.className="rowHeader",t>-1?o.Dom.fastInnerHTML(i,this.instance.getRowHeader(t)):o.Dom.fastInnerText(i," "),n.appendChild(i),o.Dom.empty(e),e.appendChild(n),o.hooks.run(this.instance,"afterGetRowHeader",t,e)},o.TableView.prototype.appendColHeader=function(t,e){var n=document.createElement("DIV"),i=document.createElement("SPAN");n.className="relative",i.className="colHeader",o.Dom.fastInnerHTML(i,this.instance.getColHeader(t)),n.appendChild(i),o.Dom.empty(e),e.appendChild(n),o.hooks.run(this.instance,"afterGetColHeader",t,e)},o.TableView.prototype.maximumVisibleElementWidth=function(t){this.wt.wtScrollbars.horizontal.readWindowSize();var e=this.wt.wtViewport.getWorkspaceWidth(),n=e-t;return n>0?n:0},o.TableView.prototype.maximumVisibleElementHeight=function(t){this.wt.wtScrollbars.vertical.readWindowSize();var e=this.wt.wtViewport.getWorkspaceHeight(),n=e-t;return n>0?n:0},o.TableView.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},function(t){function e(t){var e,n;n={},e=t,this.getInstance=function(t){return t.guid in n||(n[t.guid]=new e(t)),n[t.guid]}}var n={},o=new WeakMap;t.editors={registerEditor:function(t,i){var r=new e(i);"string"==typeof t&&(n[t]=r),o.set(i,r)},getEditor:function(t,e){var i;if("function"==typeof t)o.get(t)||this.registerEditor(null,t),i=o.get(t);else{if("string"!=typeof t)throw Error('Only strings and functions can be passed as "editor" parameter ');i=n[t]}if(!i)throw Error('No editor registered under name "'+t+'"');return i.getInstance(e)}}}(o),function(e){e.EditorManager=function(n,o,i){var r,a=this,s=t(document),l=e.helper.keyCode,A=!1,c=function(){function t(t){if(n.isListening()&&(o.settings.beforeOnKeyDown&&o.settings.beforeOnKeyDown.call(n,t),e.hooks.run(n,"beforeKeyDown",t),!A&&!t.isImmediatePropagationStopped()&&(o.lastKeyCode=t.keyCode,i.isSelected()))){var s=(t.ctrlKey||t.metaKey)&&!t.altKey;if(!(r.isWaiting()||e.helper.isMetaKey(t.keyCode)||s||a.isEditorOpened()))return void a.openEditor("");var c=t.shiftKey?i.setRangeEnd:i.setRangeStart;switch(t.keyCode){case l.A:if(s){i.selectAll(),t.preventDefault(),t.stopPropagation();break}case l.ARROW_UP:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),d(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_DOWN:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),g(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_RIGHT:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),h(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_LEFT:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),f(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.TAB:var M="function"==typeof o.settings.tabMoves?o.settings.tabMoves(t):o.settings.tabMoves;t.shiftKey?i.transformStart(-M.row,-M.col):i.transformStart(M.row,M.col,!0),t.preventDefault(),t.stopPropagation();break;case l.BACKSPACE:case l.DELETE:i.empty(t),a.prepareEditor(),t.preventDefault();break;case l.F2:a.openEditor(),t.preventDefault();break;case l.ENTER:a.isEditorOpened()?(r.state!==e.EditorState.WAITING&&a.closeEditorAndSaveChanges(s),u(t.shiftKey)):n.getSettings().enterBeginsEditing?a.openEditor():u(t.shiftKey),t.preventDefault(),t.stopImmediatePropagation();break;case l.ESCAPE:a.isEditorOpened()&&a.closeEditorAndRestoreOriginalValue(s),t.preventDefault();break;case l.HOME:c(t.ctrlKey||t.metaKey?new p(0,o.selRange.from.col):new p(o.selRange.from.row,0)),t.preventDefault(),t.stopPropagation();break;case l.END:c(t.ctrlKey||t.metaKey?new p(n.countRows()-1,o.selRange.from.col):new p(o.selRange.from.row,n.countCols()-1)),t.preventDefault(),t.stopPropagation();break;case l.PAGE_UP:i.transformStart(-n.countVisibleRows(),0),n.view.wt.scrollVertical(-n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation();break;case l.PAGE_DOWN:i.transformStart(n.countVisibleRows(),0),n.view.wt.scrollVertical(n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation()}}}function c(t,e,n){"TD"==n.nodeName&&a.openEditor()}function u(t){var e="function"==typeof o.settings.enterMoves?o.settings.enterMoves(event):o.settings.enterMoves;t?i.transformStart(-e.row,-e.col):i.transformStart(e.row,e.col,!0)}function d(t){t?i.transformEnd(-1,0):i.transformStart(-1,0)}function g(t){t?i.transformEnd(1,0):i.transformStart(1,0)}function h(t){t?i.transformEnd(0,1):i.transformStart(0,1)}function f(t){t?i.transformEnd(0,-1):i.transformStart(0,-1)}n.addHook("afterDocumentKeyDown",function(e){t(e)}),s.on("keydown."+n.guid,function(t){n.runHooks("afterDocumentKeyDown",t)}),n.view.wt.update("onCellDblClick",c),n.addHook("afterDestroy",function(){A=!0})};this.destroyEditor=function(t){this.closeEditor(t)},this.getActiveEditor=function(){return r},this.prepareEditor=function(){if(r&&r.isWaiting())return void this.closeEditor(!1,!1,function(t){t&&a.prepareEditor()});var t=o.selRange.highlight.row,i=o.selRange.highlight.col,s=n.colToProp(i),l=n.getCell(t,i),A=n.getDataAtCell(t,i),c=n.getCellMeta(t,i),u=n.getCellEditor(c);r=e.editors.getEditor(u,n),r.prepare(t,i,s,l,A,c)},this.isEditorOpened=function(){return r.isOpened()},this.openEditor=function(t){r.cellProperties.readOnly||r.beginEditing(t)},this.closeEditor=function(t,e,n){r?r.finishEditing(t,e,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(t){return this.closeEditor(!1,t)},this.closeEditorAndRestoreOriginalValue=function(t){return this.closeEditor(!0,t)},c()}}(o),function(t){var e={};t.renderers={registerRenderer:function(t,n){e[t]=n},getRenderer:function(t){if("function"==typeof t)return t;if("string"!=typeof t)throw Error('Only strings and functions can be passed as "renderer" parameter ');if(!(t in e))throw Error('No editor registered under name "'+t+'"');return e[t]}}}(o),o.helper.isPrintableChar=function(t){return 32==t||t>=48&&t<=57||t>=96&&t<=111||t>=186&&t<=192||t>=219&&t<=222||t>=226||t>=65&&t<=90},o.helper.isMetaKey=function(t){var e=o.helper.keyCode,n=[e.ARROW_DOWN,e.ARROW_UP,e.ARROW_LEFT,e.ARROW_RIGHT,e.HOME,e.END,e.DELETE,e.BACKSPACE,e.F1,e.F2,e.F3,e.F4,e.F5,e.F6,e.F7,e.F8,e.F9,e.F10,e.F11,e.F12,e.TAB,e.PAGE_DOWN,e.PAGE_UP,e.ENTER,e.ESCAPE,e.SHIFT,e.CAPS_LOCK,e.ALT];return n.indexOf(t)!=-1},o.helper.isCtrlKey=function(t){var e=o.helper.keyCode;return[e.CONTROL_LEFT,224,e.COMMAND_LEFT,e.COMMAND_RIGHT].indexOf(t)!=-1},o.helper.stringify=function(t){switch("undefined"==typeof t?"undefined":r(t)){ +case"string":case"number":return t+"";case"object":return null===t?"":t.toString();case"undefined":return"";default:return t.toString()}},o.helper.spreadsheetColumnLabel=function(t){for(var e,n=t+1,o="";n>0;)e=(n-1)%26,o=String.fromCharCode(65+e)+o,n=parseInt((n-e)/26,10);return o},o.helper.isNumeric=function(t){var e="undefined"==typeof t?"undefined":r(t);return"number"==e?!isNaN(t)&&isFinite(t):"string"==e?!!t.length&&(1==t.length?/\d/.test(t):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(t)):"object"==e&&!(!t||"number"!=typeof t.valueOf()||t instanceof Date)},o.helper.isDescendant=function(t,e){for(var n=e.parentNode;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},o.helper.randomString=function(){return E()},o.helper.inherit=function(t,e){return e.prototype.constructor=e,t.prototype=new e,t.prototype.constructor=t,t},o.helper.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},o.helper.getPrototypeOf=function(t){var e;if("object"==r(t.__proto__))e=t.__proto__;else{var n,o=t.constructor;"function"==typeof t.constructor&&(n=o,delete t.constructor&&(o=t.constructor,t.constructor=n)),e=o?o.prototype:null}return e},o.helper.columnFactory=function(t,e){function n(){}o.helper.inherit(n,t);for(var i=0,r=e.length;i-1},o.helper.isOutsideInput=function(t){return o.helper.isInput(t)&&t.className.indexOf("handsontableInput")==-1},o.helper.keyCode={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86},o.helper.isObject=function(t){return"[object Object]"==Object.prototype.toString.call(t)},o.helper.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"==Object.prototype.toString.call(t)},o.helper.pivot=function(t){var e=[];if(!t||0==t.length||!t[0]||0==t[0].length)return e;for(var n=t.length,o=t[0].length,i=0;i=this.instance.countRows())&&(n=this.instance.countRows()),a=n;for(var A=this.instance.getSettings().maxRows;l=this.instance.countCols()){for(var c=0;c-1){var o=n.split("."),i=this.dataSource[t];if(!i)return null;for(var r=0,a=o.length;r-1){for(var r=n.split("."),a=this.dataSource[t],s=0,l=r.length-1;s0&&!a.readOnly){n.isImmediatePropagationStopped()||(n.stopImmediatePropagation(),n.preventDefault());for(var d=0,g=r.length;d0&&parseInt(n.css("border-top-width"),10)>0&&(r+=1),A>0&&parseInt(n.css("border-left-width"),10)>0&&(a+=1),this.textareaParentStyle.top=r+"px",this.textareaParentStyle.left=a+"px";var c=this.TD.offsetTop,u=this.TD.offsetLeft-this.instance.view.wt.wtScrollbars.horizontal.getScrollPosition(),d=n.width(),g=this.instance.view.maximumVisibleElementWidth(u)-10,h=n.outerHeight()-4,p=this.instance.view.maximumVisibleElementHeight(c)-2;parseInt(n.css("border-top-width"),10)>0&&(h-=1),parseInt(n.css("border-left-width"),10)>0&&l>0&&(d-=1),this.TEXTAREA.style.fontSize=e.Dom.getComputedStyle(this.TD).fontSize,this.TEXTAREA.style.fontFamily=e.Dom.getComputedStyle(this.TD).fontFamily,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(h,p),maxHeight:p,minWidth:Math.min(d,g),maxWidth:g}),this.textareaParentStyle.display="block"}},n.prototype.bindEvents=function(){var t=this;this.$textarea.on("cut.editor",function(t){t.stopPropagation()}),this.$textarea.on("paste.editor",function(t){t.stopPropagation()}),this.instance.addHook("afterScrollVertically",function(){t.refreshDimensions()})},e.editors.TextEditor=n,e.editors.registerEditor("text",e.editors.TextEditor)}(o),function(e){var n=e.editors.BaseEditor.prototype.extend();n.prototype.beginEditing=function(){var e=this.TD.querySelector('input[type="checkbox"]');e&&t(e).trigger("click")},n.prototype.finishEditing=function(){},n.prototype.init=function(){},n.prototype.open=function(){},n.prototype.close=function(){},n.prototype.getValue=function(){},n.prototype.setValue=function(){},n.prototype.focus=function(){},e.editors.CheckboxEditor=n,e.editors.registerEditor("checkbox",n)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.init=function(){if(!t.datepicker)throw new Error("jQuery UI Datepicker dependency not found. Did you forget to include jquery-ui.custom.js or its substitute?");e.editors.TextEditor.prototype.init.apply(this,arguments),this.isCellEdited=!1;var n=this;this.instance.addHook("afterDestroy",function(){n.destroyElements()})},n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.datePicker=document.createElement("DIV"),e.Dom.addClass(this.datePicker,"htDatepickerHolder"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=99,document.body.appendChild(this.datePicker),this.$datePicker=t(this.datePicker);var n=this,o={dateFormat:"yy-mm-dd",showButtonPanel:!0,changeMonth:!0,changeYear:!0,onSelect:function(t){n.setValue(t),n.finishEditing(!1)}};this.$datePicker.datepicker(o),this.$datePicker.on("mousedown",function(t){t.stopPropagation()}),this.hideDatepicker()},n.prototype.destroyElements=function(){this.$datePicker.datepicker("destroy"),this.$datePicker.remove()},n.prototype.open=function(){e.editors.TextEditor.prototype.open.call(this),this.showDatepicker()},n.prototype.finishEditing=function(t,n){this.hideDatepicker(),e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},n.prototype.showDatepicker=function(){var e=t(this.TD),n=e.offset();this.datePickerStyle.top=n.top+e.height()+"px",this.datePickerStyle.left=n.left+"px";var o={defaultDate:this.originalValue||void 0};t.extend(o,this.cellProperties),this.$datePicker.datepicker("option",o),this.originalValue&&this.$datePicker.datepicker("setDate",this.originalValue),this.datePickerStyle.display="block"},n.prototype.hideDatepicker=function(){this.datePickerStyle.display="none"},e.editors.DateEditor=n,e.editors.registerEditor("date",n)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments);var n=document.createElement("DIV");n.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(n),this.$htContainer=t(n),this.$htContainer.handsontable()},n.prototype.prepare=function(n,o,i,r,a,s){e.editors.TextEditor.prototype.prepare.apply(this,arguments);var l=this,A={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,cells:function(){return{readOnly:!0}},fillHandle:!1,afterOnCellMouseDown:function(){var t=this.getValue();void 0!==t&&l.setValue(t),l.instance.destroyEditor()}};this.cellProperties.handsontable&&(A=t.extend(A,s.handsontable)),this.$htContainer.handsontable("destroy"),this.$htContainer.handsontable(A)};var o=function(t){if(!t.isImmediatePropagationStopped()){var n,o=this.getActiveEditor(),i=o.$htContainer.handsontable("getInstance");if(t.keyCode==e.helper.keyCode.ARROW_DOWN)if(i.getSelected()){var r=i.getSelected()[0],a=i.countRows()-1;n=Math.min(a,r+1)}else n=0;else if(t.keyCode==e.helper.keyCode.ARROW_UP&&i.getSelected()){var r=i.getSelected()[0];n=r-1}void 0!==n&&(n<0?i.deselectCell():i.selectCell(n,0),t.preventDefault(),t.stopImmediatePropagation(),o.instance.listen(),o.TEXTAREA.focus())}};n.prototype.open=function(){this.instance.addHook("beforeKeyDown",o),e.editors.TextEditor.prototype.open.apply(this,arguments),this.$htContainer.handsontable("render"),this.cellProperties.strict?(this.$htContainer.handsontable("selectCell",0,0),this.TEXTAREA.style.visibility="hidden"):(this.$htContainer.handsontable("deselectCell"),this.TEXTAREA.style.visibility="visible"),e.Dom.setCaretPosition(this.TEXTAREA,0,this.TEXTAREA.value.length)},n.prototype.close=function(){this.instance.removeHook("beforeKeyDown",o),this.instance.listen(),e.editors.TextEditor.prototype.close.apply(this,arguments)},n.prototype.focus=function(){this.instance.listen(),e.editors.TextEditor.prototype.focus.apply(this,arguments)},n.prototype.beginEditing=function(t){var n=this.instance.getSettings().onBeginEditing;n&&n()===!1||e.editors.TextEditor.prototype.beginEditing.apply(this,arguments)},n.prototype.finishEditing=function(t,n){if(this.$htContainer.handsontable("isListening")&&this.instance.listen(),this.$htContainer.handsontable("getSelected")){var o=this.$htContainer.handsontable("getInstance").getValue();void 0!==o&&this.setValue(o)}return e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},e.editors.HandsontableEditor=n,e.editors.registerEditor("handsontable",n)}(o),function(t){var e=t.editors.HandsontableEditor.prototype.extend();e.prototype.init=function(){t.editors.HandsontableEditor.prototype.init.apply(this,arguments),this.query=null,this.choices=[]},e.prototype.createElements=function(){t.editors.HandsontableEditor.prototype.createElements.apply(this,arguments);var e=function(){return n.navigator.platform.indexOf("Mac")!=-1?"htMacScroll":""};this.$htContainer.addClass("autocompleteEditor"),this.$htContainer.addClass(e())};var o=!1,i=function(e){o=!1;var n=this.getActiveEditor(),i=t.helper.keyCode;(t.helper.isPrintableChar(e.keyCode)||e.keyCode===i.BACKSPACE||e.keyCode===i.DELETE||e.keyCode===i.INSERT)&&n.instance._registerTimeout(setTimeout(function(){n.queryChoices(n.TEXTAREA.value),o=!0},0))};e.prototype.prepare=function(){this.instance.addHook("beforeKeyDown",i),t.editors.HandsontableEditor.prototype.prepare.apply(this,arguments)},e.prototype.open=function(){t.editors.HandsontableEditor.prototype.open.apply(this,arguments),this.TEXTAREA.style.visibility="visible",this.focus();var e=this.$htContainer.handsontable("getInstance"),n=this;e.updateSettings({colWidths:[t.Dom.outerWidth(this.TEXTAREA)-2],afterRenderer:function(t,e,o,i,r){var a=this.getCellMeta(e,o).filteringCaseSensitive===!0,s=a?r.indexOf(this.query):r.toLowerCase().indexOf(n.query.toLowerCase());if(s!=-1){var l=r.substr(s,n.query.length);t.innerHTML=r.replace(l,""+l+"")}}}),o&&(o=!1),n.instance._registerTimeout(setTimeout(function(){n.queryChoices(n.TEXTAREA.value)},0))},e.prototype.close=function(){t.editors.HandsontableEditor.prototype.close.apply(this,arguments)},e.prototype.queryChoices=function(e){if(this.query=e,"function"==typeof this.cellProperties.source){var n=this;this.cellProperties.source(e,function(t){n.updateChoicesList(t)})}else if(t.helper.isArray(this.cellProperties.source)){var o;if(e&&this.cellProperties.filter!==!1){var i=this.cellProperties.filteringCaseSensitive===!0,r=e.toLowerCase();o=this.cellProperties.source.filter(function(t){return i?t.indexOf(e)!=-1:t.toLowerCase().indexOf(r)!=-1})}else o=this.cellProperties.source;this.updateChoicesList(o)}else this.updateChoicesList([])},e.prototype.updateChoicesList=function(e){var n=t.Dom.getCaretPosition(this.TEXTAREA),o=t.Dom.getSelectionEndPosition(this.TEXTAREA);this.choices=e,this.$htContainer.handsontable("loadData",t.helper.pivot([e])),this.$htContainer.handsontable("updateSettings",{height:this.getDropdownHeight()}),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(),this.instance.listen(),this.TEXTAREA.focus(),t.Dom.setCaretPosition(this.TEXTAREA,n,n!=o?o:void 0)},e.prototype.finishEditing=function(e){e||this.instance.removeHook("beforeKeyDown",i),t.editors.HandsontableEditor.prototype.finishEditing.apply(this,arguments)},e.prototype.highlightBestMatchingChoice=function(){var t=this.findBestMatchingChoice();"undefined"==typeof t&&this.cellProperties.allowInvalid===!1&&(t=0),"undefined"==typeof t?this.$htContainer.handsontable("deselectCell"):this.$htContainer.handsontable("selectCell",t,0)},e.prototype.findBestMatchingChoice=function(){for(var t,e,n,o={},i=this.getValue().length,r=0,a=this.choices.length;r0?t.indexOf(this.getValue()):t===this.getValue()?0:-1,e!=-1&&(n=t.length-e-i,("undefined"==typeof o.indexOfValue||o.indexOfValue>e||o.indexOfValue==e&&o.charsLeft>n)&&(o.indexOfValue=e,o.charsLeft=n,o.index=r));return o.index},e.prototype.getDropdownHeight=function(){var t=this.$htContainer.handsontable("getInstance").getRowHeight(0)||23;return this.choices.length>=10?10*t:this.choices.length*t+8},t.editors.AutocompleteEditor=e,t.editors.registerEditor("autocomplete",e)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.$textarea=t(this.TEXTAREA),e.Dom.empty(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)},e.editors.PasswordEditor=n,e.editors.registerEditor("password",n)}(o),function(t){var e=t.editors.BaseEditor.prototype.extend();e.prototype.init=function(){this.select=document.createElement("SELECT"),t.Dom.addClass(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement[0].appendChild(this.select)},e.prototype.prepare=function(){t.editors.BaseEditor.prototype.prepare.apply(this,arguments);var e,n=this.cellProperties.selectOptions; +e="function"==typeof n?this.prepareOptions(n(this.row,this.col,this.prop)):this.prepareOptions(n),t.Dom.empty(this.select);for(var o in e)if(e.hasOwnProperty(o)){var i=document.createElement("OPTION");i.value=o,t.Dom.fastInnerHTML(i,e[o]),this.select.appendChild(i)}},e.prototype.prepareOptions=function(e){var n={};if(t.helper.isArray(e))for(var o=0,i=e.length;on?t.style.width=e.minWidth+"px":n>e.maxWidth?t.style.width=e.maxWidth+"px":t.style.width=n+"px";var s=t.scrollHeight;e.minHeight>s?t.style.height=e.minHeight+"px":e.maxHeight1&&""===i[i.length-1]&&i.pop(),n=0,o=i.length;n0&&(a+="\t"),r=t[e][o],a+="string"==typeof r?r.indexOf("\n")>-1?'"'+r.replace(/"/g,'""')+'"':r:null===r||void 0===r?"":r;e0&&(t.patches=[],t.callback&&t.callback(i)),i}function h(t,n,o,i){for(var r=y(n),a=y(t),s=!1,l=!1,A=a.length-1;A>=0;A--){var c=a[A],u=t[c];if(n.hasOwnProperty(c)){var d=n[c];u instanceof Object?h(u,d,o,i+"/"+e(c)):u!=d&&(s=!0,o.push({op:"replace",path:i+"/"+e(c),value:d}),t[c]=d)}else o.push({op:"remove",path:i+"/"+e(c)}),delete t[c],l=!0}if(l||r.length!=a.length)for(var A=0;A=A){o=M[n.op].call(n,s,c,t);break}s=s[c]}else{var u=a[l];if(u.indexOf("~")!=-1&&(u=u.replace(/~1/g,"/").replace(/~0/g,"~")),l++,l>=A){o=f[n.op].call(n,s,u,t);break}s=s[u]}i++}return o}var f={add:function(t,e){return t[e]=this.value,!0},remove:function(t,e){return delete t[e],!0},replace:function(t,e){return t[e]=this.value,!0},move:function(t,e,n){var o={op:"_get",path:this.from};return p(n,[o]),p(n,[{op:"remove",path:this.from}]),p(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(t,e,n){var o={op:"_get",path:this.from};return p(n,[o]),p(n,[{op:"add",path:this.path,value:o.value}]),!0},test:function(t,e){return JSON.stringify(t[e])===JSON.stringify(this.value)},_get:function(t,e){this.value=t[e]}},M={add:function(t,e){return t.splice(e,0,this.value),!0},remove:function(t,e){return t.splice(e,1),!0},replace:function(t,e){return t[e]=this.value,!0},move:f.move,copy:f.copy,test:f.test,_get:f._get},w={add:function(t,n){var o={op:"add",path:n+e(this.name),value:this.object[this.name]};t.push(o)},delete:function(t,n){var o={op:"remove",path:n+e(this.name)};t.push(o)},update:function(t,n){var o={op:"replace",path:n+e(this.name),value:this.object[this.name]};t.push(o)}},T=[];t.intervals;var C=function(){function t(t){this.observers=[],this.obj=t}return t}(),I=function(){function t(t,e){this.callback=t,this.observer=e}return t}();t.unobserve=A,t.observe=c,t.generate=g;var y;y=Object.keys?Object.keys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};var E;E=Array.isArray?Array.isArray:function(t){return t.push&&"number"==typeof t.length},t.apply=p}(O||(O={})),e.apply=O.apply,e.observe=O.observe,e.unobserve=O.unobserve,e.generate=O.generate,o.PluginHookClass=function(){function t(){this.hooks=e(),this.globalBucket={},this.legacy=n}var e=function(){return{beforeInitWalkontable:[],beforeInit:[],beforeRender:[],beforeSetRangeEnd:[],beforeDrawBorders:[],beforeChange:[],beforeChangeRender:[],beforeRemoveCol:[],beforeRemoveRow:[],beforeValidate:[],beforeGetCellMeta:[],beforeAutofill:[],beforeKeyDown:[],afterInit:[],afterLoadData:[],afterUpdateSettings:[],afterRender:[],afterRenderer:[],afterChange:[],afterValidate:[],afterGetCellMeta:[],afterSetCellMeta:[],afterGetColHeader:[],afterGetRowHeader:[],afterDestroy:[],afterRemoveRow:[],afterCreateRow:[],afterRemoveCol:[],afterCreateCol:[],afterDeselect:[],afterSelection:[],afterSelectionByProp:[],afterSelectionEnd:[],afterSelectionEndByProp:[],afterOnCellMouseDown:[],afterOnCellMouseOver:[],afterOnCellCornerMouseDown:[],afterScrollVertically:[],afterScrollHorizontally:[],afterCellMetaReset:[],afterIsMultipleSelectionCheck:[],afterDocumentKeyDown:[],modifyColWidth:[],modifyRowHeight:[],modifyRow:[],modifyCol:[]}},n={onBeforeChange:"beforeChange",onChange:"afterChange",onCreateRow:"afterCreateRow",onCreateCol:"afterCreateCol",onSelection:"afterSelection",onCopyLimit:"afterCopyLimit",onSelectionEnd:"afterSelectionEnd",onSelectionByProp:"afterSelectionByProp",onSelectionEndByProp:"afterSelectionEndByProp"};return t.prototype.getBucket=function(t){return t?(t.pluginHookBucket||(t.pluginHookBucket={}),t.pluginHookBucket):this.globalBucket},t.prototype.add=function(t,e,i){if(o.helper.isArray(e))for(var r=0,a=e.length;rl&&(l=u),s[u]||(s[u]={needed:i,strings:[]}),s[u].needed&&(s[u].strings.push({value:c,row:A}),s[u].needed--)}var d=o.getSettings();d.colHeaders&&o.view.appendColHeader(n,r.theadTh),t.Dom.empty(r.tbody);for(var g in s)if(s.hasOwnProperty(g))for(var h=0,p=s[g].strings.length;ht?this.autoColumnWidths[e]:t},this.afterDestroy=function(){var t=this;t.autoColumnSizeTmp&&t.autoColumnSizeTmp.container&&t.autoColumnSizeTmp.container.parentNode&&t.autoColumnSizeTmp.container.parentNode.removeChild(t.autoColumnSizeTmp.container),t.autoColumnSizeTmp=null}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterUpdateSettings",n.beforeInit)}(o);var F=new a;o.hooks.add("afterInit",function(){F.init.call(this,"afterInit")}),o.hooks.add("afterUpdateSettings",function(){F.init.call(this,"afterUpdateSettings")}),o.hooks.add("modifyRow",F.translateRow),o.hooks.add("afterGetColHeader",F.getColHeader),o.hooks.register("beforeColumnSort"),o.hooks.register("afterColumnSort"),function(e){function n(t,e){return t.indexOf(e)!=-1?t:(t=t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),t+=" "+e)}function o(t,e){return t.indexOf(e)!=-1?t:(t=t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),t+=" "+e)}function i(t,e,i,r){var a=this.getCellMeta(t,e),s=r;a.className&&(s="vertical"===i?n(a.className,r):o(a.className,r)),this.setCellMeta(t,e,"className",s),this.render()}function r(t,e,n){if(t.from.row==t.to.row&&t.from.col==t.to.col)i.call(this,t.from.row,t.from.col,e,n);else for(var o=t.from.row;o<=t.to.row;o++)for(var r=t.from.col;r<=t.to.col;r++)i.call(this,o,r,e,n)}function a(t,n){this.instance=t;var o=this;o.menus=[],o.triggerRows=[],this.enabled=!0,this.instance.addHook("afterDestroy",function(){o.destroy()}),this.defaultOptions={items:{row_above:{name:"Insert row above",callback:function(t,e){this.alter("insert_row",e.start.row)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return t[0]<0||this.countRows()>=this.getSettings().maxRows||n}},row_below:{name:"Insert row below",callback:function(t,e){this.alter("insert_row",e.end.row+1)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return this.getSelected()[0]<0||this.countRows()>=this.getSettings().maxRows||n}},hsep1:a.SEPARATOR,col_left:{name:"Insert column on the left",callback:function(t,e){this.alter("insert_col",e.start.col)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return this.getSelected()[1]<0||this.countCols()>=this.getSettings().maxCols||n}},col_right:{name:"Insert column on the right",callback:function(t,e){this.alter("insert_col",e.end.col+1)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return t[1]<0||this.countCols()>=this.getSettings().maxCols||n}},hsep2:a.SEPARATOR,remove_row:{name:"Remove row",callback:function(t,e){var n=e.end.row-e.start.row+1;this.alter("remove_row",e.start.row,n)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return t[0]<0||n}},remove_col:{name:"Remove column",callback:function(t,e){var n=e.end.col-e.start.col+1;this.alter("remove_col",e.start.col,n)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return t[1]<0||n}},hsep3:a.SEPARATOR,undo:{name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},redo:{name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}},hsep4:a.SEPARATOR,make_read_only:{name:function(){var t="Read only",e=o.checkSelectionReadOnlyConsistency(this);return e&&(t=o.markSelected(t)),t},callback:function(){var t=o.checkSelectionReadOnlyConsistency(this),e=this;this.getSelectedRange().forAll(function(n,o){e.getCellMeta(n,o).readOnly=!t}),this.render()}},hsep5:a.SEPARATOR,aligment:{name:"Alignment",submenu:{items:{left:{name:function(){var t="Left",e=o.checkSelectionAlignment(this,"htLeft");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htLeft")},disabled:!1},center:{name:function(){var t="Center",e=o.checkSelectionAlignment(this,"htCenter");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htCenter")},disabled:!1},right:{name:function(){var t="Right",e=o.checkSelectionAlignment(this,"htRight");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htRight")},disabled:!1},justify:{name:function(){var t="Justify",e=o.checkSelectionAlignment(this,"htJustify");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htJustify")},disabled:!1},hsep1:a.SEPARATOR,top:{name:function(){var t="Top",e=o.checkSelectionAlignment(this,"htTop");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htTop")},disabled:!1},middle:{name:function(){var t="Middle",e=o.checkSelectionAlignment(this,"htMiddle");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htMiddle")},disabled:!1},bottom:{name:function(){var t="Bottom",e=o.checkSelectionAlignment(this,"htBottom");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htBottom")},disabled:!1}}}}}},o.options={},e.helper.extend(o.options,this.defaultOptions),this.updateOptions(n,this.options),this.bindMouseEvents(),this.markSelected=function(t){return""+t},this.checkSelectionAlignment=function(t,e){var n=!1;return t.getSelectedRange().forAll(function(o,i){var r=t.getCellMeta(o,i).className;if(r&&r.indexOf(e)!=-1)return n=!0,!1}),n},this.checkSelectionReadOnlyConsistency=function(t){var e=!1;return t.getSelectedRange().forAll(function(n,o){if(t.getCellMeta(n,o).readOnly)return e=!0,!1}),e},e.hooks.run(t,"afterContextMenuDefaultOptions",this.defaultOptions)}function s(){if(!this.rootElement[0].className.indexOf("htContextMenu")){for(var t=0,e=0,n=this.getSettings().data.length,o=0;o .htContextMenu."+n)[0]:t("body > .htContextMenu")[0],i||(i=document.createElement("DIV"),e.Dom.addClass(i,"htContextMenu"),n&&e.Dom.addClass(i,n),document.getElementsByTagName("body")[0].appendChild(i)),this.menus.indexOf(i)<0&&(this.menus.push(i),o=o||0,this.triggerRows.push(o)),i},a.prototype.bindMouseEvents=function(){function n(n){this.closeAll(),n.preventDefault(),n.stopPropagation();var o=this.instance.getSettings().rowHeaders,i=this.instance.getSettings().colHeaders;if(o||i||"TD"==n.target.nodeName||e.Dom.hasClass(n.target,"current")&&e.Dom.hasClass(n.target,"wtBorder")){var r=this.createMenu(),s=this.getItems(this.options);this.show(r,s),this.setMenuPosition(n,r),t(document).on("mousedown.htContextMenu",e.helper.proxy(a.prototype.closeAll,this))}}this.instance.rootElement.on("contextmenu.htContextMenu",e.helper.proxy(n,this))},a.prototype.bindTableEvents=function(){this._afterScrollCallback=function(){},this.instance.addHook("afterScrollVertically",this._afterScrollCallback),this.instance.addHook("afterScrollHorizontally",this._afterScrollCallback)},a.prototype.unbindTableEvents=function(){this._afterScrollCallback&&(this.instance.removeHook("afterScrollVertically",this._afterScrollCallback),this.instance.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},a.prototype.performAction=function(e,n){var o=this,i=t(n).handsontable("getInstance"),r=i.getSelected()[0],s=i.getData()[r];if(s.disabled!==!0&&("function"!=typeof s.disabled||s.disabled.call(this.instance)!==!0)&&!s.hasOwnProperty("submenu")){if("function"!=typeof s.callback)return;var l=this.instance.getSelectedRange(),A=a.utils.normalizeSelection(l);s.callback.call(this.instance,s.key,A,e),o.closeAll(),this.instance.deselectCell()}},a.prototype.unbindMouseEvents=function(){this.instance.rootElement.off("contextmenu.htContextMenu"),t(document).off("mousedown.htContextMenu")},a.prototype.show=function(n,o){n.style.display="block";var i=this;t(n).off("mousedown.htContextMenu").on("mousedown.htContextMenu",function(t){i.performAction(t,n)}),t(n).handsontable({data:a.utils.convertItemsToArray(o),colHeaders:!1,colWidths:[200],readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:e.helper.proxy(this.renderer,this)}],beforeKeyDown:function(t){i.onBeforeKeyDown(t,n)},afterOnCellMouseOver:function(t,e,o){i.onCellMouseOver(t,e,o,n)},renderAllRows:!0}),this.bindTableEvents(),t(n).handsontable("listen")},a.prototype.close=function(e){this.hide(e),t(document).off("mousedown.htContextMenu"),this.unbindTableEvents(),this.instance.listen()},a.prototype.closeAll=function(){for(;this.menus.length>0;){var t=this.menus.pop();t&&this.close(t)}this.triggerRows=[]},a.prototype.closeLastOpenedSubMenu=function(){var t=this.menus.pop();t&&this.hide(t)},a.prototype.hide=function(e){e.style.display="none",t(e).handsontable("destroy")},a.prototype.renderer=function(n,o,i,r,s,l){function A(t){return t.hasOwnProperty("submenu")}function c(t){return new RegExp(a.SEPARATOR,"i").test(t.name)}function u(t){return t.disabled===!0||"function"==typeof t.disabled&&t.disabled.call(d.instance)===!0}var d=this,g=n.getData()[i],h=document.createElement("DIV");"function"==typeof l&&(l=l.call(this.instance)),e.Dom.empty(o),o.appendChild(h),c(g)?e.Dom.addClass(o,"htSeparator"):e.Dom.fastInnerHTML(h,l),u(g)?(e.Dom.addClass(o,"htDisabled"),t(h).on("mouseenter",function(){n.deselectCell()})):A(g)?(e.Dom.addClass(o,"htSubmenu"),t(h).on("mouseenter",function(){n.selectCell(i,r)})):(e.Dom.removeClass(o,"htSubmenu"),e.Dom.removeClass(o,"htDisabled"),t(h).on("mouseenter",function(){n.selectCell(i,r)}))},a.prototype.onCellMouseOver=function(e,n,o,i){var r=t(i).handsontable("getInstance"),a=this.menus.length;if(a>0){var s=this.menus[a-1];s.id!=i.id&&this.closeLastOpenedSubMenu()}else this.closeLastOpenedSubMenu();if(o.className.indexOf("htSubmenu")!=-1){var l=r.getData()[n.row],A=this.getItems(l.submenu),c=this.createMenu(l.name,n.row),u=o.getBoundingClientRect();this.show(c,A),this.setSubMenuPosition(u,c)}},a.prototype.onBeforeKeyDown=function(n,o){function i(t){var e=t.getCell(0,0);a.utils.isSeparator(e)||a.utils.isDisabled(e)?s(0,0,t):t.selectCell(0,0)}function r(t){var e=t.countRows()-1,n=t.getCell(e,0);a.utils.isSeparator(n)||a.utils.isDisabled(n)?l(e,0,t):t.selectCell(e,0)}function s(t,e,n){var o=t+1,i=o=0?n.getCell(o,e):null;i&&(a.utils.isSeparator(i)||a.utils.isDisabled(i)?l(o,e,n):n.selectCell(o,e))}function A(e,n,o,i){var r=e.getData()[i],a=n.getItems(r.submenu),s=n.createMenu(r.name,i),l=o.getBoundingClientRect();n.show(s,a),n.setSubMenuPosition(l,s);var A=t(s).handsontable("getInstance");A.selectCell(0,0)}var c=this,u=t(o).handsontable("getInstance"),d=u.getSelected();switch(n.keyCode){ +case e.helper.keyCode.ESCAPE:c.closeAll(),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ENTER:d&&c.performAction(n,o);break;case e.helper.keyCode.ARROW_DOWN:d?s(d[0],d[1],u,c):i(u,c),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_UP:d?l(d[0],d[1],u,c):r(u,c),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_RIGHT:if(d){var g=d[0],h=u.getCell(d[0],0);a.utils.hasSubMenu(h)&&A(u,c,h,g)}n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_LEFT:if(d){if(o.className.indexOf("htContextSubMenu_")!=-1){c.closeLastOpenedSubMenu();var p=c.menus.length;if(p>0){o=c.menus[p-1];var f=c.triggerRows.pop();u=t(o).handsontable("getInstance"),u.selectCell(f,0)}}n.preventDefault(),n.stopImmediatePropagation()}}},a.prototype.getItems=function(t){function n(t){"string"==typeof t?this.name=t:e.helper.extend(this,t)}var o={};n.prototype=t;for(var i in t.items)!t.items.hasOwnProperty(i)||this.itemsFilter&&this.itemsFilter.indexOf(i)==-1||(o[i]=new n(t.items[i]));return o},a.prototype.updateOptions=function(t,n){if(t=t||{},t.items)for(var o in t.items){var i={};t.items.hasOwnProperty(o)&&this.defaultOptions.items.hasOwnProperty(o)&&e.helper.isObject(t.items[o])&&(e.helper.extend(i,this.defaultOptions.items[o]),e.helper.extend(i,t.items[o]),t.items[o]=i)}e.helper.extend(n,t)},a.prototype.setSubMenuPosition=function(t,n){var o=e.Dom.getWindowScrollTop(),i=e.Dom.getWindowScrollLeft(),r={top:o+t.top,topRelative:t.top,left:t.left,leftRelative:t.left-i,scrollTop:o,scrollLeft:i,cellHeight:t.height,cellWidth:t.width};this.menuFitsBelowCursor(r,n)?this.positionMenuBelowCursor(r,n,!0):this.menuFitsAboveCursor(r,n)?this.positionMenuAboveCursor(r,n,!0):this.positionMenuBelowCursor(r,n,!0),this.menuFitsOnRightOfCursor(r,n)?this.positionMenuOnRightOfCursor(r,n,!0):this.positionMenuOnLeftOfCursor(r,n,!0)},a.prototype.setMenuPosition=function(t,n){var o=t.pageY,i=t.pageX,r=e.Dom.getWindowScrollTop(),a=e.Dom.getWindowScrollLeft(),s={top:o,topRelative:o-r,left:i,leftRelative:i-a,scrollTop:r,scrollLeft:a,cellHeight:t.target.clientHeight,cellWidth:t.target.clientWidth};this.menuFitsBelowCursor(s,n)?this.positionMenuBelowCursor(s,n):this.menuFitsAboveCursor(s,n)?this.positionMenuAboveCursor(s,n):this.positionMenuBelowCursor(s,n),this.menuFitsOnRightOfCursor(s,n)?this.positionMenuOnRightOfCursor(s,n):this.positionMenuOnLeftOfCursor(s,n)},a.prototype.menuFitsAboveCursor=function(t,e){return t.topRelative>=e.offsetHeight},a.prototype.menuFitsBelowCursor=function(t,e){return t.topRelative+e.offsetHeight<=t.scrollTop+document.body.clientHeight},a.prototype.menuFitsOnRightOfCursor=function(t,e){return t.leftRelative+e.offsetWidth<=t.scrollLeft+document.body.clientWidth},a.prototype.positionMenuBelowCursor=function(t,e){e.style.top=t.top+"px"},a.prototype.positionMenuAboveCursor=function(t,e,n){n?e.style.top=t.top+t.cellHeight-e.offsetHeight+"px":e.style.top=t.top-e.offsetHeight+"px"},a.prototype.positionMenuOnRightOfCursor=function(t,e,n){n?e.style.left=1+t.left+t.cellWidth+"px":e.style.left=1+t.left+"px"},a.prototype.positionMenuOnLeftOfCursor=function(t,e,n){n?e.style.left=t.left-e.offsetWidth+"px":e.style.left=t.left-e.offsetWidth+"px"},a.utils={},a.utils.convertItemsToArray=function(t){var e,n=[];for(var o in t)if(t.hasOwnProperty(o)){if("string"==typeof t[o])e={name:t[o]};else{if(t[o].visible===!1)continue;e=t[o]}e.key=o,n.push(e)}return n},a.utils.normalizeSelection=function(t){return{start:t.getTopLeftCorner(),end:t.getBottomRightCorner()}},a.utils.isSeparator=function(t){return e.Dom.hasClass(t,"htSeparator")},a.utils.hasSubMenu=function(t){return e.Dom.hasClass(t,"htSubmenu")},a.utils.isDisabled=function(t){return e.Dom.hasClass(t,"htDisabled")},a.prototype.enable=function(){this.enabled||(this.enabled=!0,this.bindMouseEvents())},a.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.closeAll(),this.unbindMouseEvents(),this.unbindTableEvents())},a.prototype.destroy=function(){for(this.closeAll();this.menus.length>0;){var t=this.menus.pop();this.triggerRows.pop(),t&&(this.close(t),this.isMenuEnabledByOtherHotInstance()||this.removeMenu(t))}this.unbindMouseEvents(),this.unbindTableEvents()},a.prototype.isMenuEnabledByOtherHotInstance=function(){for(var e=t(".handsontable"),n=!1,o=0,i=e.length;o=0){d=e;var n=h.getBoundingClientRect();u=n.left,p.style.top=n.top+"px",p.style.left=u+"px",g.rootElement[0].appendChild(p)}}function i(t){var e=t.getBoundingClientRect();p.style.left=e.left+"px"}function r(){var t=this;e.Dom.addClass(p,"active"),e.Dom.addClass(f,"active");var n=h.getBoundingClientRect();f.style.width=n.width+"px",f.style.height=t.view.maximumVisibleElementHeight(0)+"px",f.style.top=p.style.top,f.style.left=u+"px",t.rootElement[0].appendChild(f)}function a(t){f.style.left=u+t+"px"}function s(){e.Dom.removeClass(p,"active"),e.Dom.removeClass(f,"active")}var l,A,c,u,d,g,h,p=document.createElement("DIV"),f=document.createElement("DIV"),M=t(n);p.className="manualColumnMover",f.className="manualColumnMoverGuide";var w=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualColumnPositions",t.manualColumnPositions)},T=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualColumnPositions",n),n.value},C=function(){var t,n=this;n.rootElement.on("mouseenter.manualColumnMove."+n.guid,"table thead tr > th",function(e){t?(A=n.view.wt.wtTable.getCoords(e.currentTarget).col,i(e.currentTarget)):o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualColumnMove."+n.guid,".manualColumnMover",function(e){c=e.pageX,r.call(n),t=n,l=d,A=d}),M.on("mousemove.manualColumnMove."+n.guid,function(e){t&&a(e.pageX-c)}),M.on("mouseup.manualColumnMove."+n.guid,function(){t&&(s(),t=!1,l th"),t.rootElement.off("mousedown.manualColumnMove."+t.guid,".manualColumnMover"),M.off("mousemove.manualColumnMove."+t.guid),M.off("mouseup.manualColumnMove."+t.guid)},y=function(t,e){if(t.length0&&(this.forceFullRender=!0,this.render()))}else I.call(this),this.manualColumnPositions=[]},this.modifyCol=function(t){return this.getSettings().manualColumnMove?("undefined"==typeof this.manualColumnPositions[t]&&y(this.manualColumnPositions,t+1),this.manualColumnPositions[t]):t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyCol",i.modifyCol),e.hooks.register("afterColumnMove")}(o),function(e){function o(){function o(t){u=this,l=t;var e=this.view.wt.wtTable.getCoords(t).col;if(e>=0){A=e;var n=l.getBoundingClientRect();p=n.left-6,h=parseInt(n.width,10),f.style.top=n.top+"px",f.style.left=p+h+"px",u.rootElement[0].appendChild(f)}}function i(){f.style.left=p+c+"px"}function r(){var t=this;e.Dom.addClass(f,"active"),e.Dom.addClass(M,"active"),M.style.top=f.style.top,M.style.left=f.style.left,M.style.height=t.view.maximumVisibleElementHeight(0)+"px",t.rootElement[0].appendChild(M)}function a(){M.style.left=f.style.left}function s(){e.Dom.removeClass(f,"active"),e.Dom.removeClass(M,"active")}var l,A,c,u,d,g,h,p,f=document.createElement("DIV"),M=document.createElement("DIV"),w=t(n);f.className="manualColumnResizer",M.className="manualColumnResizerGuide";var T=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualColumnWidths",t.manualColumnWidths)},C=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualColumnWidths",n),n.value},I=function(){var t,n=this,u=0,p=null;n.rootElement.on("mouseenter.manualColumnResize."+n.guid,"table thead tr > th",function(e){t||o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualColumnResize."+n.guid,".manualColumnResizer",function(o){r.call(n),t=n,null==p&&(p=setTimeout(function(){u>=2&&(d=n.determineColumnWidth.call(n,A),E(A,d),n.forceFullRender=!0,n.view.render(),e.hooks.run(n,"afterColumnResize",A,d)),u=0,p=null},500),n._registerTimeout(p)),u++,g=o.pageX,d=h}),w.on("mousemove.manualColumnResize."+n.guid,function(e){t&&(c=h+(e.pageX-g),d=E(A,c),i(),a())}),w.on("mouseup.manualColumnResize."+n.guid,function(){t&&(s(),t=!1,d!=h&&(n.forceFullRender=!0,n.view.render(),T.call(n),e.hooks.run(n,"afterColumnResize",A,d)),o.call(n,l))}),n.addHook("afterDestroy",y)},y=function(){var t=this;t.rootElement.off("mouseenter.manualColumnResize."+t.guid,"table thead tr > th"),t.rootElement.off("mousedown.manualColumnResize."+t.guid,".manualColumnResizer"),w.off("mousemove.manualColumnResize."+t.guid),w.off("mouseup.manualColumnResize."+t.guid)};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnResize;if(n){var o=this.getSettings().manualColumnResize,i=C.call(e);"undefined"!=typeof i?this.manualColumnWidths=i:o instanceof Array?this.manualColumnWidths=o:this.manualColumnWidths=[],"afterInit"==t&&(I.call(this),this.manualColumnWidths.length>0&&(this.forceFullRender=!0,this.render()))}else y.call(this),this.manualColumnWidths=[]};var E=function(t,n){return n=Math.max(n,20),t=e.hooks.execute(u,"modifyCol",t),u.manualColumnWidths[t]=n,n};this.modifyColWidth=function(t,e){return e=this.runHooksAndReturn("modifyCol",e),this.getSettings().manualColumnResize&&this.manualColumnWidths[e]?this.manualColumnWidths[e]:t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyColWidth",i.modifyColWidth),e.hooks.register("afterColumnResize")}(o),function(e){function o(){function o(t){u=this,l=t;var e=this.view.wt.wtTable.getCoords(t).row;if(e>=0){A=e;var n=l.getBoundingClientRect();p=n.top-6,h=parseInt(n.height,10),f.style.left=n.left+"px",f.style.top=p+h+"px",u.rootElement[0].appendChild(f)}}function i(){f.style.top=p+c+"px"}function r(){var t=this;e.Dom.addClass(f,"active"),e.Dom.addClass(M,"active"),M.style.top=f.style.top,M.style.left=f.style.left,M.style.width=t.view.maximumVisibleElementWidth(0)+"px",t.rootElement[0].appendChild(M)}function a(){M.style.top=f.style.top}function s(){e.Dom.removeClass(f,"active"),e.Dom.removeClass(M,"active")}var l,A,c,u,d,g,h,p,f=document.createElement("DIV"),M=document.createElement("DIV"),w=t(n);f.className="manualRowResizer",M.className="manualRowResizerGuide";var T=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualRowHeights",t.manualRowHeights)},C=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualRowHeights",n),n.value},I=function(){var t,n=this,u=0,p=null;n.rootElement.on("mouseenter.manualRowResize."+n.guid,"table tbody tr > th",function(e){t||o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualRowResize."+n.guid,".manualRowResizer",function(o){r.call(n),t=n,null==p&&(p=setTimeout(function(){u>=2&&(E(A,null),n.forceFullRender=!0,n.view.render(),e.hooks.run(n,"afterRowResize",A,d)),u=0,p=null},500),n._registerTimeout(p)),u++,g=o.pageY,d=h}),w.on("mousemove.manualRowResize."+n.guid,function(e){t&&(c=h+(e.pageY-g),d=E(A,c),i(),a())}),w.on("mouseup.manualRowResize."+n.guid,function(){t&&(s(),t=!1,d!=h&&(n.forceFullRender=!0,n.view.render(),T.call(n),e.hooks.run(n,"afterRowResize",A,d)),o.call(n,l))}),n.addHook("afterDestroy",y)},y=function(){var t=this;t.rootElement.off("mouseenter.manualRowResize."+t.guid,"table tbody tr > th"),t.rootElement.off("mousedown.manualRowResize."+t.guid,".manualRowResizer"),w.off("mousemove.manualRowResize."+t.guid),w.off("mouseup.manualRowResize."+t.guid)};this.beforeInit=function(){this.manualRowHeights=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualRowResize;if(n){var o=this.getSettings().manualRowResize,i=C.call(e);"undefined"!=typeof i?this.manualRowHeights=i:o instanceof Array?this.manualRowHeights=o:this.manualRowHeights=[],"afterInit"===t?(I.call(this),this.manualRowHeights.length>0&&(this.forceFullRender=!0,this.render())):(this.forceFullRender=!0,this.render())}else y.call(this),this.manualRowHeights=[]};var E=function(t,n){return t=e.hooks.execute(u,"modifyRow",t),u.manualRowHeights[t]=n,n};this.modifyRowHeight=function(t,e){return this.getSettings().manualRowResize&&(e=this.runHooksAndReturn("modifyRow",e),void 0!==this.manualRowHeights[e])?this.manualRowHeights[e]:t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyRowHeight",i.modifyRowHeight),e.hooks.register("afterRowResize")}(o),function(){function t(){var t=this,n=t.getSettings().observeChanges;n?(t.observer&&i.call(t),e.call(t),a.call(t)):n||i.call(t)}function e(){var t=this;t.observeChangesActive=!0,t.pauseObservingChanges=function(){t.observeChangesActive=!1},t.resumeObservingChanges=function(){t.observeChangesActive=!0},t.observedData=t.getData(),t.observer=O.observe(t.observedData,function(e){t.observeChangesActive&&(n.call(t,e),t.render()),t.runHooks("afterChangesObserved")})}function n(t){function e(t){var e;return e=o(t),e=n(e)}function n(t){var e=[];return t.filter(function(t){var n=i(t.path);if(["add","remove"].indexOf(t.op)!=-1&&!isNaN(n.col)){if(e.indexOf(n.col)!=-1)return!1;e.push(n.col)}return!0})}function o(t){return t.filter(function(t){return!/[\/]length/gi.test(t.path)})}function i(t){var e=t.match(/^\/(\d+)\/?(.*)?$/);return{row:parseInt(e[1],10),col:/^\d*$/.test(e[2])?parseInt(e[2],10):e[2]}}for(var r=this,a=e(t),s=0,l=a.length;s0},e.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},e.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},e.UndoRedo.Action=function(){},e.UndoRedo.Action.prototype.undo=function(){},e.UndoRedo.Action.prototype.redo=function(){},e.UndoRedo.ChangeAction=function(t){this.changes=t},e.helper.inherit(e.UndoRedo.ChangeAction,e.UndoRedo.Action),e.UndoRedo.ChangeAction.prototype.undo=function(e,n){for(var o=t.extend(!0,[],this.changes),i=e.countEmptyRows(!0),r=e.countEmptyCols(!0),a=0,s=o.length;athis.boundaries.bottom&&(o=e-this.boundaries.bottom),tthis.boundaries.right&&(n=t-this.boundaries.right),this.callback(n,o)};var G,X;if("undefined"!=typeof o){var W=function(t){t.dragToScrollListening=!1;var e=t.view.wt.wtScrollbars.vertical.scrollHandler;G=new A,e!==n&&(e?G.setBoundaries(e.getBoundingClientRect()):G.setBoundaries(t.$table[0].getBoundingClientRect()),G.setCallback(function(n,o){n<0?e?e.scrollLeft-=50:t.view.wt.scrollHorizontal(-1).draw():n>0&&(e?e.scrollLeft+=50:t.view.wt.scrollHorizontal(1).draw()),o<0?e?e.scrollTop-=20:t.view.wt.scrollVertical(-1).draw():o>0&&(e?e.scrollTop+=20:t.view.wt.scrollVertical(1).draw())}),t.dragToScrollListening=!0)};o.hooks.add("afterInit",function(){var e=this;t(document).on("mouseup."+this.guid,function(){e.dragToScrollListening=!1}),t(document).on("mousemove."+this.guid,function(t){e.dragToScrollListening&&G.check(t.clientX,t.clientY)})}),o.hooks.add("afterDestroy",function(){t(document).off("."+this.guid)}),o.hooks.add("afterOnCellMouseDown",function(){W(this)}),o.hooks.add("afterOnCellCornerMouseDown",function(){W(this)}),o.plugins.DragToScroll=A}if(function(t,e,n){function o(o){function i(){o.isListening()&&o.selection.empty()}function r(t){if(o.isListening()&&o.selection.isSelected()){var e=t.replace(/^[\r\n]*/g,"").replace(/[\r\n]*$/g,""),i=n.parse(e),r=o.getSelected(),a=new p(r[0],r[1]),s=new p(r[2],r[3]),l=new f(a,a,s),A=l.getTopLeftCorner(),c=l.getBottomRightCorner(),u=A,d=new p(Math.max(c.row,i.length-1+A.row),Math.max(c.col,i[0].length-1+A.col));o.addHookOnce("afterChange",function(t,e){t&&t.length&&this.selectCell(u.row,u.col,d.row,d.col)}),o.populateFromArray(u.row,u.col,i,d.row,d.col,"paste",o.getSettings().pasteMode)}}function a(e){if(t.helper.isCtrlKey(e.keyCode)&&o.getSelected())return s.setCopyableText(),void e.stopImmediatePropagation();var n=(e.ctrlKey||e.metaKey)&&!e.altKey;e.keyCode==t.helper.keyCode.A&&n&&o._registerTimeout(setTimeout(t.helper.proxy(s.setCopyableText,s),0))}this.copyPasteInstance=e.getInstance(),this.copyPasteInstance.onCut(i),this.copyPasteInstance.onPaste(r);var s=this;o.addHook("beforeKeyDown",a),this.destroy=function(){this.copyPasteInstance.removeCallback(i),this.copyPasteInstance.removeCallback(r),this.copyPasteInstance.destroy(),o.removeHook("beforeKeyDown",a)},o.addHook("afterDestroy",t.helper.proxy(this.destroy,this)),this.triggerPaste=t.helper.proxy(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=t.helper.proxy(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var e=o.getSettings(),n=e.copyRowsLimit,i=e.copyColsLimit,r=o.getSelectedRange(),a=r.getTopLeftCorner(),s=r.getBottomRightCorner(),l=a.row,A=a.col,c=s.row,u=s.col,d=Math.min(c,l+n-1),g=Math.min(u,A+i-1);o.copyPaste.copyPasteInstance.copyable(o.getCopyableData(l,A,d,g)),c===d&&u===g||t.hooks.run(o,"afterCopyLimit",c-l+1,u-A+1,n,i)}}function i(){var t=this,e=t.getSettings().copyPaste!==!1;e&&!t.copyPaste?t.copyPaste=new o(t):!e&&t.copyPaste&&(t.copyPaste.destroy(),delete t.copyPaste)}t.hooks.add("afterInit",i),t.hooks.add("afterUpdateSettings",i),t.hooks.register("afterCopyLimit")}(o,Y,SheetClip),function(t){function e(){var e=this,n=!!e.getSettings().search;n?e.search=new t.Search(e):delete e.search}t.Search=function(e){this.query=function(n,o,i){var r=e.countRows(),a=e.countCols(),s=[];o||(o=t.Search.global.getDefaultCallback()),i||(i=t.Search.global.getDefaultQueryMethod());for(var l=0;li.row?(this.lastDesiredCoords=new p(o.row+n.row,o.col+n.col),n.row+=i.row-o.row-n.row):o.row==i.row&&n.row>0?n.row+=i.row-o.row+i.rowspan-1:this.lastDesiredCoords&&0===n.row&&(n.row+=this.lastDesiredCoords.row-o.row,this.lastDesiredCoords=null),o.col>i.col?(this.lastDesiredCoords||(this.lastDesiredCoords=new p(o.row+n.row,o.col+n.col)),n.col+=i.col-o.col-n.col):o.col==i.col&&n.col>0?n.col+=i.col-o.col+i.colspan-1:this.lastDesiredCoords&&0===n.col&&(n.col+=this.lastDesiredCoords.col-o.col,this.lastDesiredCoords=null)):this.lastDesiredCoords&&(0==n.col?n.col+=this.lastDesiredCoords.col-o.col:0==n.row&&(n.row+=this.lastDesiredCoords.row-o.row),this.lastDesiredCoords=null)}else{var r=this.mergedCellInfoCollection.getInfo(e.highlight.row,e.highlight.col);r&&e.isSingle()&&(e.from=new p(r.row,r.col),e.to=new p(r.row+r.rowspan-1,r.col+r.colspan-1)),e.isSingle()&&(e.from=new p(e.highlight.row,e.highlight.col),e.to=new p(e.highlight.row,e.highlight.col));var a=function(t){function o(e,n,o){e[i]=n,e[t]=o}var i="col"==t?"row":"col";if(0!=n[t]){var r,a,s=function(){r=e.getTopLeftCorner(),a=e.getBottomRightCorner()};s();var l,A=!1;if(n[t]<0)if(l=a[t]+n[t],a[t]==e.highlight[t])l=r[t]+n[t],A=!0;else for(var c=r[i];c<=a[i];c++){var u=this.mergedCellInfoCollection.getInfo(c,a[t]);if(u&&u[t]<=e.highlight[t]){l=r[t]+n[t],A=!0;break}}else if(n[t]>0)if(l=r[t]+n[t],r[t]==e.highlight[t])l=a[t]+n[t],A=!0;else for(var c=r[i];c<=a[i];c++){var u=this.mergedCellInfoCollection.getInfo(c,r[t]);if(u&&u[t]+u[t+"span"]>e.highlight[t]){l=a[t]+n[t],A=!0;break}}A?n[t]>0?(o(e.from,r[i],r[t]),o(e.to,a[i],Math.max(a[t],l)),s()):(o(e.from,r[i],Math.min(r[t],l)),o(e.to,a[i],a[t]),s()):n[t]>0?(o(e.from,r[i],Math.max(r[t],l)),o(e.to,a[i],a[t]),s()):(o(e.from,r[i],r[t]), +o(e.to,a[i],Math.min(a[t],l)),s());for(var c=r[i];c<=a[i];c++){var u="col"==t?this.mergedCellInfoCollection.getInfo(c,l):this.mergedCellInfoCollection.getInfo(l,c);u&&(A?n[t]>0?(o(e.from,Math.min(r[i],u[i]),Math.min(r[t],u[t])),l>u[t]?o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"])):o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"]-1)),s()):(o(e.from,Math.min(r[i],u[i]),Math.min(r[t],u[t])),o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"]-1)),s()):n[t]>0?(l>u[t]?(o(e.from,r[i],Math.max(r[t],u[t]+u[t+"span"])),o(e.to,a[i],Math.max(a[t],u[t]+u[t+"span"]))):(o(e.from,r[i],Math.max(r[t],u[t])),o(e.to,a[i],Math.max(a[t],u[t]+u[t+"span"]-1))),s()):(l0&&o.from.row>=i&&(o.from.row=o.from-1),o.from.col<0?o.from.col=0:o.from.col>0&&o.from.col>=r&&(o.from.col=r-1)}}}},$=function(t){this.lastDesiredCoords=null;var e=this.getSettings().mergeCells;if(e){var n=this.getSelectedRange();n.highlight=new p(n.highlight.row,n.highlight.col),n.to=t;for(var o=0,i=this.mergeCells.mergedCellInfoCollection.length;o0},i=function(){n(this.getSettings().customBorders)&&(this.customBorders||(e=this,this.customBorders=new t))},a=function(t){for(var n=0;n=0?e.view.wt.selections[i]=o:e.view.wt.selections.push(o)},l=function(t,e,n){var o=h(t,e);o=p(o,n),this.setCellMeta(t,e,"borders",o),s(o)},A=function(t){for(var e=t.range,n=e.from.row;n<=e.to.row;n++)for(var o=e.from.col;o<=e.to.col;o++){var i=h(n,o),r=0;n==e.from.row&&(r++,t.hasOwnProperty("top")&&(i.top=t.top)),n==e.to.row&&(r++,t.hasOwnProperty("bottom")&&(i.bottom=t.bottom)),o==e.from.col&&(r++,t.hasOwnProperty("left")&&(i.left=t.left)),o==e.to.col&&(r++,t.hasOwnProperty("right")&&(i.right=t.right)),r>0&&(this.setCellMeta(n,o,"borders",i),s(i))}},c=function(t,e){return"border_row"+t+"col"+e},u=function(){return{width:1,color:"#000"}},d=function(){return{hide:!0}},g=function(){return{width:1,color:"#000",cornerVisible:!1}},h=function(t,e){return{className:c(t,e),border:g(),row:t,col:e,top:d(),right:d(),bottom:d(),left:d()}},p=function(t,e){return e.hasOwnProperty("border")&&(t.border=e.border),e.hasOwnProperty("top")&&(t.top=e.top),e.hasOwnProperty("right")&&(t.right=e.right),e.hasOwnProperty("bottom")&&(t.bottom=e.bottom),e.hasOwnProperty("left")&&(t.left=e.left),t},M=function(t){for(var e=document.getElementsByClassName(t),n=0;n✓"+t},E=function(t){this.getSettings().customBorders&&(t.items.bordersCellsSeparator=o.ContextMenu.SEPARATOR,t.items.borders={name:"Borders",submenu:{items:{top:{name:function(){var t="Top",e=I(this,"top");return e&&(t=y(t)),t},callback:function(){var t=I(this,"top");C.call(this,this.getSelectedRange(),"top",t)},disabled:!1},right:{name:function(){var t="Right",e=I(this,"right");return e&&(t=y(t)),t},callback:function(){var t=I(this,"right");C.call(this,this.getSelectedRange(),"right",t)},disabled:!1},bottom:{name:function(){var t="Bottom",e=I(this,"bottom");return e&&(t=y(t)),t},callback:function(){var t=I(this,"bottom");C.call(this,this.getSelectedRange(),"bottom",t)},disabled:!1},left:{name:function(){var t="Left",e=I(this,"left");return e&&(t=y(t)),t},callback:function(){var t=I(this,"left");C.call(this,this.getSelectedRange(),"left",t)},disabled:!1},remove:{name:"Remove border(s)",callback:function(){C.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!I(this)}}}}})};o.hooks.add("beforeInit",i),o.hooks.add("afterContextMenuDefaultOptions",E),o.hooks.add("afterInit",function(){var t=this.getSettings().customBorders;if(t){for(var e=0;e=0){d=e;var n=g.getBoundingClientRect();u=n.top,h.style.top=u+"px",h.style.left=n.left+"px",X.rootElement[0].appendChild(h)}}function i(t){var e=t.getBoundingClientRect();h.style.top=e.top+"px"}function r(){var t=this;e.Dom.addClass(h,"active"),e.Dom.addClass(p,"active");var n=g.getBoundingClientRect();p.style.width=t.view.maximumVisibleElementWidth(0)+"px",p.style.height=n.height+"px",p.style.top=u+"px",p.style.left=h.style.left,t.rootElement[0].appendChild(p)}function a(t){p.style.top=u+t+"px"}function s(){e.Dom.removeClass(h,"active"),e.Dom.removeClass(p,"active")}var l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=t(n);h.className="manualRowMover",p.className="manualRowMoverGuide";var M=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualRowPositions",t.manualRowPositions)},w=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualRowPositions",n),n.value},T=function(){var t,n=this;n.rootElement.on("mouseenter.manualRowMove."+n.guid,"table tbody tr > th",function(e){t?(A=n.view.wt.wtTable.getCoords(e.currentTarget).row,i(e.currentTarget)):o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualRowMove."+n.guid,".manualRowMover",function(e){c=e.pageY,r.call(n),t=n,l=d,A=d}),f.on("mousemove.manualRowMove."+n.guid,function(e){t&&a(e.pageY-c)}),f.on("mouseup.manualRowMove."+n.guid,function(){t&&(s(),t=!1,l th"),t.rootElement.off("mousedown.manualRowMove."+t.guid,".manualRowMover"),f.off("mousemove.manualRowMove."+t.guid),f.off("mouseup.manualRowMove."+t.guid)},I=function(t,e){if(t.length0&&(e.forceFullRender=!0,e.render()))}else C.call(this),e.manualRowPositions=[]},this.modifyRow=function(t){var e=this;return e.getSettings().manualRowMove?("undefined"==typeof e.manualRowPositions[t]&&I(this.manualRowPositions,t+1),e.manualRowPositions[t]):t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyRow",i.modifyRow),e.hooks.register("afterRowMove")}(o),function(e){function o(o){this.instance=o,this.addingStarted=!1;var i,r,a=(t(document),!1),s=this,l=function(t){return!o.autofill||void(o.autofill.handle&&o.autofill.handle.isDragged&&(o.autofill.handle.isDragged>1&&o.autofill.apply(),o.autofill.handle.isDragged=0,a=!1))};t(document).off("mouseup.autofill."+o.guid,this.instance.rootElement).on("mouseup.autofill."+o.guid,this.instance.rootElement,function(t){l(t)}),t(document).off("mousemove.moveOutside_"+o.guid).on("mousemove.moveOutside_"+o.guid,function(t){if(!s.instance.autofill)return 0;var o=e.Dom.offset(s.instance.$table[0]).top-(n.pageYOffset||document.documentElement.scrollTop)+e.Dom.outerHeight(s.instance.$table[0]),i=e.Dom.offset(s.instance.$table[0]).left-(n.pageXOffset||document.documentElement.scrollLeft)+e.Dom.outerWidth(s.instance.$table[0]);s.addingStarted===!1&&s.instance.autofill.handle.isDragged>0&&t.clientY>o&&t.clientX<=i?(this.mouseDragOutside=!0,s.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&setTimeout(function(){s.addingStarted=!1,s.instance.alter("insert_row")},200)}),i=this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown,this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown=function(t){o.autofill.handle.isDragged=1,a=!0,i(t)},r=this.instance.view.wt.wtSettings.settings.onCellMouseOver,this.instance.view.wt.wtSettings.settings.onCellMouseOver=function(t,e,n,i){o.autofill&&a&&!o.view.isMouseDown()&&o.autofill.handle&&o.autofill.handle.isDragged&&(o.autofill.handle.isDragged++,o.autofill.showBorder(e),o.autofill.checkIfNewRowNeeded()),r(t,e,n,i)},this.instance.view.wt.wtSettings.settings.onCellCornerDblClick=function(){o.autofill.selectAdjacent()}}o.prototype.init=function(){this.handle={}},o.prototype.disable=function(){this.handle.disabled=!0},o.prototype.selectAdjacent=function(){var t,e,n,o,i;t=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),e=this.instance.getData();t:for(n=t[2]+1;nn[3]?(o=new p(t[0],n[3]+1),i=new p(t[2],t[3])):t[0]n[2]&&t[1]===n[1]&&(o=new p(n[2]+1,t[1]),i=new p(t[2],t[3])),o)){var a={from:this.instance.getSelectedRange().from,to:this.instance.getSelectedRange().to};r=this.instance.getData(a.from.row,a.from.col,a.to.row,a.to.col),e.hooks.run(this.instance,"beforeAutofill",o,i,r),this.instance.populateFromArray(o.row,o.col,r,i.row,i.col,"autofill"),this.instance.selection.setRangeStart(new p(t[0],t[1])),this.instance.selection.setRangeEnd(new p(t[2],t[3]))}},o.prototype.showBorder=function(t){var e=this.instance.getSelectedRange().getTopLeftCorner(),n=this.instance.getSelectedRange().getBottomRightCorner();if("horizontal"!==this.instance.getSettings().fillHandle&&(n.rowt.row))t=new p(t.row,n.col);else{if("vertical"===this.instance.getSettings().fillHandle)return;t=new p(n.row,t.col)}this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().from),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().to),this.instance.view.wt.selections.fill.add(t),this.instance.view.render()},o.prototype.checkIfNewRowNeeded=function(){var t,e=this.instance.countRows(),n=this;this.instance.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&(t=this.instance.view.wt.selections.fill.getCorners(),t[2]===e-1&&(this.addingStarted=!0,this.instance._registerTimeout(setTimeout(function(){n.instance.alter("insert_row"),n.addingStarted=!1},200))))},e.hooks.add("afterInit",function(){var t=new o(this);"undefined"!=typeof this.getSettings().fillHandle&&(t.handle&&this.getSettings().fillHandle===!1?t.disable():t.handle||this.getSettings().fillHandle===!1||(this.autofill=t,this.autofill.init()))}),e.Autofill=o}(o),d.prototype.init=function(){this.TABLE=this.instance.wtTable.TABLE,this.fixed=this.instance.wtTable.hider,this.fixedContainer=this.instance.wtTable.holder,this.scrollHandler=this.getScrollableElement(this.TABLE),this.$scrollHandler=t(this.scrollHandler)},d.prototype.makeClone=function(t){var e=document.createElement("DIV");e.className="ht_clone_"+t+" handsontable",e.style.position="absolute",e.style.overflow="hidden";var n=document.createElement("TABLE");return n.className=this.instance.wtTable.TABLE.className,e.appendChild(n),this.instance.wtTable.holder.parentNode.appendChild(e),new C({cloneSource:this.instance,cloneOverlay:this,table:n})},d.prototype.getScrollableElement=function(t){for(var e=t.parentNode;e&&e.style;){if("visible"!==e.style.overflow&&""!==e.style.overflow)return e;if(this instanceof x&&"visible"!==e.style.overflowX&&""!==e.style.overflowX)return e;e=e.parentNode}return n},d.prototype.onScroll=function(){this.windowScrollPosition=this.getScrollPosition(),this.readSettings(),this.resetFixedPosition()},d.prototype.availableSize=function(){var t;return t=this.windowScrollPosition>this.tableParentOffset?this.instance.wtTable.getLastVisibleRow()===this.total-1?o.Dom.outerHeight(this.TABLE):this.windowSize:this.windowSize-this.tableParentOffset},d.prototype.refresh=function(t){this.clone&&this.clone.draw(t)},d.prototype.destroy=function(){this.$scrollHandler.off("."+this.clone.guid),t(n).off("."+this.clone.guid),t(document).off("."+this.clone.guid),t(document.body).off("."+this.clone.guid)},g.prototype.getSize=function(t){return this.cellSizes[t]},g.prototype.getContainerSize=function(t){return"function"==typeof this.containerSizeFn?this.containerSizeFn(t):this.containerSizeFn},g.prototype.countVisible=function(){return this.cellCount},g.prototype.isLastIncomplete=function(){return this.remainingSize>0},h.prototype.appear=function(t){var e,n,i,r,a,s,l,A,c,u,d,g;if(!this.disabled){var h,f,M,w,T,C,I,y=this.instance;for(C=y.cloneOverlay instanceof v||y.cloneOverlay instanceof D?y.getSetting("fixedRowsTop"):y.wtTable.getRowStrategy().countVisible(),T=0;T=t[0]&&I<=t[2]){h=I;break}for(T=C-1;T>=0;T--)if(I=y.wtTable.rowFilter.visibleToSource(T),I>=t[0]&&I<=t[2]){M=I;break}for(C=y.cloneOverlay instanceof x||y.cloneOverlay instanceof D?y.getSetting("fixedColumnsLeft"):y.wtTable.getColumnStrategy().cellCount,T=0;T=t[1]&&I<=t[3]){f=I;break}for(T=C-1;T>=0;T--)if(I=y.wtTable.columnFilter.visibleToSource(T),I>=t[1]&&I<=t[3]){w=I;break}if(void 0===h||void 0===f)return void this.disappear();e=h!==M||f!==w,n=y.wtTable.getCell(new p(h,f)),i=e?y.wtTable.getCell(new p(M,w)):n,r=o.Dom.offset(n),a=e?o.Dom.offset(i):r,s=o.Dom.offset(y.wtTable.TABLE),A=r.top,d=a.top+o.Dom.outerHeight(i)-A,u=r.left,g=a.left+o.Dom.outerWidth(i)-u,l=A-s.top-1,c=u-s.left-1;var E=o.Dom.getComputedStyle(n);parseInt(E.borderTopWidth,10)>0&&(l+=1,d=d>0?d-1:0),parseInt(E.borderLeftWidth,10)>0&&(c+=1,g=g>0?g-1:0),this.topStyle.top=l+"px",this.topStyle.left=c+"px",this.topStyle.width=g+"px",this.topStyle.display="block",this.leftStyle.top=l+"px",this.leftStyle.left=c+"px",this.leftStyle.height=d+"px",this.leftStyle.display="block";var N=Math.floor(this.settings.border.width/2);this.bottomStyle.top=l+d-N+"px",this.bottomStyle.left=c+"px",this.bottomStyle.width=g+"px",this.bottomStyle.display="block",this.rightStyle.top=l+"px",this.rightStyle.left=c+g-N+"px",this.rightStyle.height=d+1+"px",this.rightStyle.display="block",this.hasSetting(this.settings.border.cornerVisible)?(this.cornerStyle.top=l+d-4+"px",this.cornerStyle.left=c+g-4+"px",this.cornerStyle.display="block"):this.cornerStyle.display="none"}},h.prototype.disappear=function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none"},h.prototype.hasSetting=function(t){return"function"==typeof t?t():!!t},p.prototype.isValid=function(t){return!(this.row<0||this.col<0)&&!(this.row>=t.getSetting("totalRows")||this.col>=t.getSetting("totalColumns"))},p.prototype.isEqual=function(t){return t===this||this.row===t.row&&this.col===t.col},p.prototype.isSouthEastOf=function(t){return this.row>=t.row&&this.col>=t.col},p.prototype.isNorthWestOf=function(t){return this.row<=t.row&&this.col<=t.col},n.WalkontableCellCoords=p,f.prototype.isValid=function(t){return this.from.isValid(t)&&this.to.isValid(t)},f.prototype.isSingle=function(){return this.from.row===this.to.row&&this.from.col===this.to.col},f.prototype.includes=function(t){var e=this.getTopLeftCorner(),n=this.getBottomRightCorner();return e.row<=t.row&&n.row>=t.row&&e.col<=t.col&&n.col>=t.col},f.prototype.includesRange=function(t){return this.includes(t.getTopLeftCorner())&&this.includes(t.getBottomRightCorner())},f.prototype.overlaps=function(t){return t.isSouthEastOf(this.getTopLeftCorner())&&t.isNorthWestOf(this.getBottomRightCorner())},f.prototype.isSouthEastOf=function(t){return this.getTopLeftCorner().isSouthEastOf(t)||this.getBottomRightCorner().isSouthEastOf(t)},f.prototype.isNorthWestOf=function(t){return this.getTopLeftCorner().isNorthWestOf(t)||this.getBottomRightCorner().isNorthWestOf(t)},f.prototype.expand=function(t){var e=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(t.rown.row||t.col>n.col)&&(this.from=new p(Math.min(e.row,t.row),Math.min(e.col,t.col)),this.to=new p(Math.max(n.row,t.row),Math.max(n.col,t.col)),!0)},f.prototype.expandByRange=function(t){if(this.includesRange(t)||!this.overlaps(t))return!1;var e=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.getTopLeftCorner(),i=t.getBottomRightCorner(),r=Math.min(e.row,o.row),a=Math.min(e.col,o.col),s=Math.max(n.row,i.row),l=Math.max(n.col,i.col);return this.from=new p(r,a),this.to=new p(s,l),!0},f.prototype.getTopLeftCorner=function(){return new p(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},f.prototype.getBottomRightCorner=function(){return new p(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},f.prototype.getInner=function(){for(var t=this.getTopLeftCorner(),e=this.getBottomRightCorner(),n=[],o=t.row;o<=e.row;o++)for(var i=t.col;i<=e.col;i++)this.from.row===o&&this.from.col===i||this.to.row===o&&this.to.col===i||n.push(new p(o,i));return n},f.prototype.getAll=function(){for(var t=this.getTopLeftCorner(),e=this.getBottomRightCorner(),n=[],o=t.row;o<=e.row;o++)for(var i=t.col;i<=e.col;i++)t.row===o&&t.col===i?n.push(t):e.row===o&&e.col===i?n.push(e):n.push(new p(o,i));return n},f.prototype.forAll=function(t){for(var e=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=e.row;o<=n.row;o++)for(var i=e.col;i<=n.col;i++){var r=t(o,i);if(r===!1)return}},n.WalkontableCellRange=f,M.prototype.add=function(t,e,n){this.cache[t]||(this.cache[t]=[]),this.cache[t][e]||(this.cache[t][e]=[]),this.cache[t][e][n]=!0},M.prototype.remove=function(t,e,n){this.test(t,e,n)&&(this.cache[t][e][n]=void 0)},M.prototype.test=function(t,e,n){return this.cache[t]&&this.cache[t][e]&&this.cache[t][e][n]},w.prototype.visibleToSource=function(t){return t},w.prototype.sourceToVisible=function(t){return t},w.prototype.offsettedTH=function(t){return t-this.countTH},w.prototype.unOffsettedTH=function(t){return t+this.countTH},w.prototype.visibleRowHeadedColumnToSourceColumn=function(t){return this.visibleToSource(this.offsettedTH(t))},w.prototype.sourceColumnToVisibleRowHeadedColumn=function(t){return this.unOffsettedTH(this.sourceToVisible(t))},T.prototype=new g,T.prototype.getSize=function(t){return this.cellSizes[t]+(this.cellStretch[t]||0)},T.prototype.stretch=function(){var t,e=0;if(t=this.instance.wtTable.allRowsInViewport()?this.getContainerSize():this.getContainerSize(1/0),this.remainingSize=this.cellSizesSum-t,this.cellStretch.length=0,"all"===this.strategy){if(this.remainingSize<0){for(var n,o=t/this.cellSizesSum;e=a},C.prototype.draw=function(t){if(this.drawInterrupted=!1,!t&&!o.Dom.isVisible(this.wtTable.TABLE))return void(this.drawInterrupted=!0);t=t&&this.getSetting("offsetRow")===this.lastOffsetRow,this.lastOffsetRow=this.getSetting("offsetRow");var e=this.getSetting("totalRows");return this.lastOffsetRow>e&&e>0&&(this.scrollVertical(-(1/0)),this.scrollViewport(new p(e-1,0))),this.wtTable.draw(t),this},C.prototype.update=function(t,e){return this.wtSettings.update(t,e)},C.prototype.scrollVertical=function(t){var e=this.wtScroll.scrollVertical(t);return this.getSetting("onScrollVertically"),e},C.prototype.scrollHorizontal=function(t){var e=this.wtScroll.scrollHorizontal(t);return this.getSetting("onScrollHorizontally"),e},C.prototype.scrollViewport=function(t){return this.wtScroll.scrollViewport(t),this},C.prototype.getViewport=function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},C.prototype.getSetting=function(t,e,n,o,i){return this.wtSettings.getSetting(t,e,n,o,i)},C.prototype.hasSetting=function(t){return this.wtSettings.has(t)},C.prototype.destroy=function(){t(n).off("."+this.guid),t(document.body).off("."+this.guid),this.wtScrollbars.destroy(),this.wtEvent&&this.wtEvent.destroy()},I.prototype=new d,I.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode,e=this.instance.wtTable.holder.getBoundingClientRect();t.style.top=Math.ceil(e.top,10)+"px",t.style.left=Math.ceil(e.left,10)+"px"}},I.prototype.getScrollPosition=function(){},I.prototype.getLastCell=function(){},I.prototype.applyToDOM=function(){},I.prototype.scrollTo=function(){},I.prototype.readWindowSize=function(){},I.prototype.readSettings=function(){},I.prototype.destroy=function(){d.prototype.destroy.call(this),clearTimeout(this.lastTimeout)},y.prototype.parentCell=function(t){var e={},n=this.instance.wtTable.TABLE,i=o.Dom.closest(t,["TD","TH"],n);return i&&o.Dom.isChildOf(i,n)?(e.coords=this.instance.wtTable.getCoords(i),e.TD=i):o.Dom.hasClass(t,"wtBorder")&&o.Dom.hasClass(t,"current")?(e.coords=this.instance.selections[0].cellRange.highlight,e.TD=this.instance.wtTable.getCell(e.coords)):o.Dom.hasClass(t,"wtBorder")&&o.Dom.hasClass(t,"area")&&(e.coords=this.instance.selections[1].cellRange.to,e.TD=this.instance.wtTable.getCell(e.coords)),e},y.prototype.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1])},n.requestAnimFrame=function(){return n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t,e){return n.setTimeout(t,1e3/60)}}(),n.cancelRequestAnimFrame=function(){return n.cancelAnimationFrame||n.webkitCancelRequestAnimationFrame||n.mozCancelRequestAnimationFrame||n.oCancelRequestAnimationFrame||n.msCancelRequestAnimationFrame||clearTimeout}(),n.getComputedStyle||!function(){var t,e={getPropertyValue:function(e){return"float"==e&&(e="styleFloat"),t.currentStyle[e.toUpperCase()]||null}};n.getComputedStyle=function(n){return t=n,e}}(),!String.prototype.trim){var ot=/^\s+|\s+$/g;String.prototype.trim=function(){return this.replace(ot,"")}}N.prototype.offsetted=function(t){return t+this.offset},N.prototype.unOffsetted=function(t){return t-this.offset},N.prototype.visibleToSource=function(t){return this.offsetted(t)},N.prototype.sourceToVisible=function(t){return this.unOffsetted(t)},N.prototype.offsettedTH=function(t){return t-this.countTH},N.prototype.visibleColHeadedRowToSourceRow=function(t){return this.visibleToSource(this.offsettedTH(t))},N.prototype.sourceRowToVisibleColHeadedRow=function(t){return this.unOffsettedTH(this.sourceToVisible(t))},m.prototype=new g,m.prototype.add=function(t,e){var n=this.sizeAtIndex(t,e);if(void 0===n)return!1;var o=this.getContainerSize(this.cellSizesSum+n);return this.cellSizes.push(n),this.cellSizesSum+=n,this.cellCount++,this.remainingSize=this.cellSizesSum-o,this.visiblCellCount++,!0},m.prototype.canRenderMoreRows=function(){return this.remainingSize<=0||this.cellCount-this.visiblCellCountthis.curOuts;)this.remove()},m.prototype.countRendered=function(){return this.cellCount},m.prototype.countVisible=function(){return this.visiblCellCount},m.prototype.isLastIncomplete=function(){var t=this.instance.wtTable.getLastVisibleRow(),e=this.instance.wtTable.getFirstVisibleColumn(),n=this.instance.wtTable.getCell(new p(t,e)),i=o.Dom.offset(n).top,r=o.Dom.outerHeight(n),a=i+r,s=this.instance.wtScrollbars.horizontal.scrollHandler.offsetTop+this.instance.wtScrollbars.vertical.getScrollPosition(),l=this.instance.wtViewport.getViewportHeight(),A=s+l;return A0&&!this.instance.wtTable.isLastRowFullyVisible()?this.scrollLogicVertical(t,o,r,i,a,function(t){return t-o=0?n.getSetting("rowHeight",t-o):n.getSetting("rowHeight",t)}):0,e!==o&&this.instance.wtScrollbars.vertical.scrollTo(e),n},b.prototype.scrollHorizontal=function(t){return this.instance.wtScrollbars.horizontal.scrollTo(t),this.instance},b.prototype.scrollLogicVertical=function(t,e,n,o,i,r){var a=e+t;return a>=n-o&&(a=n-o-1),a<0&&(a=0),a},b.prototype.scrollViewport=function(t){if(!this.instance.drawn,0){var e=(this.instance.getSetting("offsetRow"),this.instance.getSetting("totalRows")),n=this.instance.getSetting("totalColumns");if(t.row<0||t.row>e-1)throw new Error("row "+t.row+" does not exist");if(t.col<0||t.col>n-1)throw new Error("column "+t.col+" does not exist");var o=this.instance.wtTable.getCell(t);"object"===("undefined"==typeof o?"undefined":r(o))?t.col>=this.instance.getSetting("fixedColumnsLeft")&&this.scrollToRenderedCell(o):t.row>=this.instance.wtTable.getLastVisibleRow()?(this.scrollVertical(t.row-this.instance.wtTable.getLastVisibleRow()),t.row==this.instance.wtTable.getLastVisibleRow()&&this.instance.wtTable.getRowStrategy().isLastIncomplete()&&this.scrollViewport(t)):t.row>=this.instance.getSetting("fixedRowsTop")&&this.scrollVertical(t.row-this.instance.wtTable.getFirstVisibleRow())}},b.prototype.scrollToRenderedCell=function(t){var e=o.Dom.offset(t),i=o.Dom.outerWidth(t),r=o.Dom.outerHeight(t),a=o.Dom.offset(this.instance.wtTable.TABLE),s={left:this.instance.wtScrollbars.horizontal.getScrollPosition(),top:this.instance.wtScrollbars.vertical.getScrollPosition()},l=this.instance.wtViewport.getWorkspaceWidth(),A=this.instance.wtViewport.getWorkspaceHeight(),c=o.Dom.outerWidth(this.instance.wtScrollbars.horizontal.clone.wtTable.TABLE),u=o.Dom.outerHeight(this.instance.wtScrollbars.vertical.clone.wtTable.TABLE);if(this.instance.wtScrollbars.horizontal.scrollHandler!==n&&(a.left=0,e.left-=o.Dom.offset(this.instance.wtScrollbars.horizontal.scrollHandler).left),this.instance.wtScrollbars.vertical.scrollHandler!==n&&(a.top=0,e.top=e.top-o.Dom.offset(this.instance.wtScrollbars.vertical.scrollHandler).top),ia.left+s.left+l){var d=e.left+i-(a.left+s.left+l);this.instance.wtScrollbars.horizontal.setScrollPosition(s.left+d)}rs.top+A&&(this.instance.wtScrollbars.vertical.setScrollPosition(e.top-A+r),this.instance.wtScrollbars.vertical.onScroll()))},D.prototype=new d,D.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.top),r=Math.ceil(e.left);r<0?t.style.left=-r+"px":t.style.left="0",i<0?t.style.top=-i+"px":t.style.top="0"}else t.style.top=this.instance.wtScrollbars.vertical.windowScrollPosition+"px",t.style.left=this.instance.wtScrollbars.horizontal.windowScrollPosition+"px";t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+4+"px",t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+4+"px"}},D.prototype.refresh=function(t){d.prototype.refresh.call(this,t)},D.prototype.getScrollPosition=function(){},D.prototype.getLastCell=function(){},D.prototype.applyToDOM=function(){},D.prototype.scrollTo=function(){},D.prototype.readWindowSize=function(){},D.prototype.readSettings=function(){},x.prototype=new d,x.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.left);i<0?t.style.left=-i+"px":t.style.left="0",t.style.top=this.instance.wtTable.hider.style.top}else t.style.top=this.instance.wtTable.hider.style.top,t.style.left=this.windowScrollPosition+"px";t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+"px",t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+4+"px"}},x.prototype.refresh=function(t){d.prototype.refresh.call(this,t)},x.prototype.getScrollPosition=function(){return o.Dom.getScrollLeft(this.scrollHandler)},x.prototype.setScrollPosition=function(t){this.scrollHandler===n?n.scrollTo(t,o.Dom.getWindowScrollTop()):this.scrollHandler.scrollLeft=t},x.prototype.onScroll=function(){d.prototype.onScroll.call(this),this.instance.getSetting("onScrollHorizontally")},x.prototype.getLastCell=function(){return this.instance.wtTable.getLastVisibleColumn()},x.prototype.applyToDOM=function(){this.readWindowSize()},x.prototype.scrollTo=function(t){this.setScrollPosition(this.tableParentOffset+t*this.cellSize)},x.prototype.readWindowSize=function(){this.scrollHandler===n?(this.windowSize=document.documentElement.clientWidth,this.tableParentOffset=this.instance.wtTable.holderOffset.left):(this.windowSize=this.scrollHandler.clientWidth,this.tableParentOffset=0),this.windowScrollPosition=this.getScrollPosition()},x.prototype.readSettings=function(){this.readWindowSize(),this.total=this.instance.getSetting("totalColumns")},v.prototype=new d,v.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.top);t.style.left="0",i<0?t.style.top=-i+"px":t.style.top="0"}else t.style.top=this.windowScrollPosition+"px",t.style.left="0";this.instance.wtScrollbars.horizontal.scrollHandler===n?t.style.width=this.instance.wtViewport.getWorkspaceActualWidth()+"px":t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+"px",t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+4+"px"}},v.prototype.getScrollPosition=function(){return o.Dom.getScrollTop(this.scrollHandler)},v.prototype.setScrollPosition=function(t){this.scrollHandler===n?n.scrollTo(o.Dom.getWindowScrollLeft(),t):this.scrollHandler.scrollTop=t},v.prototype.onScroll=function(){},v.prototype.getLastCell=function(){return this.instance.getSetting("offsetRow")+this.instance.wtTable.tbodyChildrenLength-1},v.prototype.sumCellSizes=function(t,e){for(var n=0;t0&&this.scrollHandler.clientHeight>0?this.scrollHandler.clientHeight:1/0,this.tableParentOffset=0}this.windowScrollPosition=this.getScrollPosition()},v.prototype.readSettings=function(){this.readWindowSize(),this.offset=this.instance.getSetting("offsetRow"),this.total=this.instance.getSetting("totalRows");for(var t,e=this.windowScrollPosition-this.tableParentOffset,n=0,o=0;oe));o++);this.offset=Math.min(o,this.total),this.instance.update("offsetRow",this.offset)},B.prototype.registerListeners=function(){function e(){if(s.instance.drawn){if(!s.instance.wtTable.holder.parentNode)return void s.destroy();s.vertical.windowScrollPosition=s.vertical.getScrollPosition(),s.horizontal.windowScrollPosition=s.horizontal.getScrollPosition(),s.box=s.instance.wtTable.hider.getBoundingClientRect(),s.vertical.windowScrollPosition===o&&s.horizontal.windowScrollPosition===i&&s.box.top===r&&s.box.left===a||(s.vertical.onScroll(),s.horizontal.onScroll(),s.corner.onScroll(),o=s.vertical.windowScrollPosition,i=s.horizontal.windowScrollPosition,r=s.box.top,a=s.box.left)}}var o,i,r,a,s=this,l=t(n);this.vertical.$scrollHandler.on("scroll."+this.instance.guid,e),this.vertical.scrollHandler!==this.horizontal.scrollHandler&&this.horizontal.$scrollHandler.on("scroll."+this.instance.guid,e),this.vertical.scrollHandler!==n&&this.horizontal.scrollHandler!==n&&l.on("scroll."+this.instance.guid,e)},B.prototype.destroy=function(){this.vertical&&(this.vertical.destroy(),this.vertical.$scrollHandler.off("scroll."+this.instance.guid)),this.horizontal&&(this.horizontal.destroy(),this.vertical.$scrollHandler.off("scroll."+this.instance.guid)),t(n).off("scroll."+this.instance.guid),this.corner&&this.corner.destroy(),this.debug&&this.debug.destroy()},B.prototype.refresh=function(t){},B.prototype.applyToDOM=function(){this.horizontal&&this.horizontal.applyToDOM(),this.vertical&&this.vertical.applyToDOM(),this.corner&&this.corner.applyToDOM(),this.debug&&this.debug.applyToDOM()},L.prototype.getBorder=function(t){return this.instanceBorders[t.guid]?this.instanceBorders[t.guid]:void(this.instanceBorders[t.guid]=new h(t,this.settings))},L.prototype.isEmpty=function(){return null===this.cellRange},L.prototype.add=function(t){this.isEmpty()?this.cellRange=new f(t,t,t):this.cellRange.expand(t)},L.prototype.replace=function(t,e){if(!this.isEmpty()){if(this.cellRange.from.isEqual(t))return this.cellRange.from=e,!0;if(this.cellRange.to.isEqual(t))return this.cellRange.to=e,!0}return!1},L.prototype.clear=function(){this.cellRange=null},L.prototype.getCorners=function(){var t=this.cellRange.getTopLeftCorner(),e=this.cellRange.getBottomRightCorner();return[t.row,t.col,e.row,e.col]},L.prototype.draw=function(t){var e,n,o,i,r,a=t.wtTable.getRowStrategy().countVisible(),s=t.wtTable.getColumnStrategy().cellCount;if(this.isEmpty()){if(this.settings.border){var l=this.getBorder(t);l&&l.disappear()}}else{for(e=this.getCorners(),n=0;n=e[0]&&i<=e[2]&&r>=e[1]&&r<=e[3]?this.settings.className&&t.wtTable.currentCellCache.add(n,o,this.settings.className):i>=e[0]&&i<=e[2]?(t.wtTable.currentCellCache.add(n,o,this.settings.highlightRowClassName),t.wtTable.currentCellCache.add(n,s,this.settings.highlightRowClassName)):r>=e[1]&&r<=e[3]&&(t.wtTable.currentCellCache.add(n,o,this.settings.highlightColumnClassName),t.wtTable.currentCellCache.add(a,o,this.settings.highlightColumnClassName));if(t.getSetting("onBeforeDrawBorders",e,this.settings.className),this.settings.border){var l=this.getBorder(t);l&&l.appear(e)}}},S.prototype.update=function(t,e){if(void 0===e)for(var n in t)t.hasOwnProperty(n)&&(this.settings[n]=t[n]);else this.settings[t]=e;return this.instance},S.prototype.getSetting=function(t,e,n,o,i){return"function"==typeof this.settings[t]?this.settings[t](e,n,o,i):void 0!==e&&"[object Array]"===Object.prototype.toString.call(this.settings[t])?this.settings[t][e]:this.settings[t]},S.prototype.has=function(t){return!!this.settings[t]},Q.prototype.getRowStrategy=function(){return this.isWorkingOnClone()?this.instance.cloneSource.wtTable.rowStrategy:this.rowStrategy},Q.prototype.getColumnStrategy=function(){return this.isWorkingOnClone()?this.instance.cloneSource.wtTable.columnStrategy:this.columnStrategy},Q.prototype.isWorkingOnClone=function(){return!!this.instance.cloneSource},Q.prototype.refreshHiderDimensions=function(){var t=this.spreader.style;t.position="relative",t.width="auto",t.height="auto"},Q.prototype.draw=function(t){if(t)this.instance.wtScrollbars&&this.instance.wtScrollbars.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.instance.cloneSource.wtTable.tableOffset:(this.holderOffset=o.Dom.offset(this.holder),this.tableOffset=o.Dom.offset(this.TABLE),this.instance.wtScrollbars.vertical.readSettings(),this.instance.wtScrollbars.horizontal.readSettings(),this.instance.wtViewport.resetSettings());var e;e=this.instance.cloneOverlay instanceof I||this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof D?0:this.instance.wtSettings.settings.offsetRow,this.rowFilter=new N(0,this.instance.getSetting("totalRows"),this.instance.getSetting("columnHeaders").length),this.columnFilter=new w(this.instance.getSetting("totalColumns"),this.instance.getSetting("rowHeaders").length),this._doDraw()}return this.refreshPositions(t),t||this.isWorkingOnClone()||(this.instance.wtScrollbars.vertical.resetFixedPosition(),this.instance.wtScrollbars.horizontal.resetFixedPosition(),this.instance.wtScrollbars.corner.resetFixedPosition(),this.instance.wtScrollbars.debug&&this.instance.wtScrollbars.debug.resetFixedPosition()),this.instance.drawn=!0,this},Q.prototype._doDraw=function(){var t=new j(this);t.render()},Q.prototype.refreshPositions=function(t){this.refreshHiderDimensions(),this.refreshSelections(t)},Q.prototype.refreshSelections=function(t){var e,n,i,a,s,l,A,c=[],u=this.getRowStrategy().countVisible(),d=this.getColumnStrategy().cellCount;if(this.oldCellCache=this.currentCellCache,this.currentCellCache=new M(this.instance),this.instance.selections)for(var g=0,h=this.instance.selections.length;g=0},Q.prototype.isRowAfterViewport=function(t){return t>this.getLastVisibleRow()},Q.prototype.isColumnBeforeViewport=function(t){return this.columnFilter.sourceToVisible(t)<0&&t>=0},Q.prototype.isColumnAfterViewport=function(t){return t>this.getLastVisibleColumn()},Q.prototype.isRowInViewport=function(t){return!this.isRowBeforeViewport(t)&&!this.isRowAfterViewport(t)},Q.prototype.isColumnInViewport=function(t){return!this.isColumnBeforeViewport(t)&&!this.isColumnAfterViewport(t)},Q.prototype.isLastRowFullyVisible=function(){return this.getLastVisibleRow()===this.instance.getSetting("totalRows")-1&&!this.getRowStrategy().isLastIncomplete()},Q.prototype.isLastColumnFullyVisible=function(){return this.getLastVisibleColumn()===this.instance.getSetting("totalColumns")-1&&!this.getColumnStrategy().isLastIncomplete()},Q.prototype.getVisibleRowsCount=function(){return this.getRowStrategy().countVisible()},Q.prototype.allRowsInViewport=function(){return this.getRowStrategy().cellCount==this.getVisibleRowsCount()},j.prototype.render=function(){this.wtTable.isWorkingOnClone()||this.instance.getSetting("beforeDraw",!0),this.rowHeaders=this.instance.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.instance.getSetting("fixedRowsTop"),this.columnHeaders=this.instance.getSetting("columnHeaders");var t,e,n,o=this.instance.getSetting("totalRows"),i=this.instance.getSetting("totalColumns"),r=!1;if(i>0){var a;this.wtTable.isWorkingOnClone()&&(this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof D?a=this.fixedRowsTop:this.instance.cloneOverlay instanceof x&&(a=this.wtTable.getRowStrategy().cellCount)),this.adjustAvailableNodes(),r=!0,this.renderColGroups(),this.renderColumnHeaders(),e=this.getColumnCount(),this.renderRows(o,a,e),this.wtTable.isWorkingOnClone()||(n=this.instance.wtViewport.getWorkspaceWidth(),this.instance.wtViewport.containerWidth=null,this.wtTable.getColumnStrategy().stretch()),this.adjustColumnWidths(e)}if(r||this.adjustAvailableNodes(),this.instance.cloneOverlay instanceof I||this.removeRedundantRows(),!this.wtTable.isWorkingOnClone()){if(this.markOversizedRows(),n!==this.instance.wtViewport.getWorkspaceWidth()){this.instance.wtViewport.containerWidth=null,this.wtTable.getColumnStrategy().stretch();var s=this.instance.wtTable.columnWidthCache;for(t=0;tt;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},j.prototype.renderRows=function(t,e,n){for(var o,i,r,a=this.instance.getSetting("offsetRow"),s=0,l=this.rowFilter.visibleToSource(s),A=this.wtTable.isWorkingOnClone();l=0;){if(s>1e3)throw new Error("Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.");if(void 0!==e&&s===e)break;if(i=this.getOrCreateTrForRow(s,i),this.renderRowHeaders(l,i),this.adjustColumns(i,n+this.rowHeaderCount),o=this.renderCells(l,i,n),a=this.instance.getSetting("offsetRow"),!A){if(r=this.wtTable.getRowStrategy().add(s,o),r===!1)break;0==s&&this.instance.wtScrollbars.vertical.readWindowSize(),this.resetOversizedRow(l)}if(i.firstChild){var c=this.instance.getSetting("rowHeight",l);c?i.firstChild.style.height=c+"px":i.firstChild.style.height=""}s++,l=this.rowFilter.visibleToSource(s)}},j.prototype.resetOversizedRow=function(t){this.instance.wtTable.oversizedRows&&this.instance.wtTable.oversizedRows[t]&&(this.instance.wtTable.oversizedRows[t]=void 0)},j.prototype.markOversizedRows=function(){for(var t,e,n,i,r=this.instance.wtTable.TBODY.childNodes.length;r;)r--,n=this.instance.wtTable.rowFilter.visibleToSource(r),t=this.instance.wtSettings.settings.rowHeight(n),i=this.instance.wtTable.getTrForRow(n),e=o.Dom.innerHeight(i)-1,(!t&&this.instance.wtSettings.settings.defaultRowHeight=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===t?this.TBODY.firstChild:e.nextSibling,n},j.prototype.createRow=function(){for(var t=document.createElement("TR"),e=0;et+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--,this.wtTable.columnWidthCache&&this.wtTable.columnWidthCache.splice(-1,1)},j.prototype.adjustThead=function(){var t=this.getColumnCount(),e=this.THEAD.firstChild;if(this.columnHeaders.length){for(e||(e=document.createElement("TR"),this.THEAD.appendChild(e)),this.theadChildrenLength=e.childNodes.length;this.theadChildrenLengtht+this.rowHeaderCount;)e.removeChild(e.lastChild),this.theadChildrenLength--}else e&&o.Dom.empty(e)},j.prototype.getTrForColumnHeaders=function(){var t=this.THEAD.firstChild;return this.rowHeaderCount&&this.renderRowHeaders(-1,t),t},j.prototype.renderColumnHeader=function(t,e){return this.columnHeaders[0](t,e)},j.prototype.getColumnCount=function(){return this.wtTable.isWorkingOnClone()&&(this.instance.cloneOverlay instanceof x||this.instance.cloneOverlay instanceof D)?this.instance.getSetting("fixedColumnsLeft"):this.wtTable.getColumnStrategy().cellCount},j.prototype.renderColGroups=function(){for(var t=0;te;)t.removeChild(t.lastChild),n--},j.prototype.refreshStretching=function(){if(!this.wtTable.isWorkingOnClone()){var t=this.instance,e=t.getSetting("stretchH"),n=(t.getSetting("totalRows"),t.getSetting("totalColumns")),o=function(t){var e=i.instance.wtViewport.getViewportWidth(t);return e},i=this,r=function(e){var o=i.columnFilter.visibleToSource(e);if(o0&&(e-=n),e},U.prototype.getRowHeaderWidth=function(){if(this.instance.cloneSource)return this.instance.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var t=this.instance.getSetting("rowHeaders");if(t.length){var e=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var n=0,i=t.length;n0?e-n:e},U.prototype.resetSettings=function(){this.rowHeaderWidth=NaN,this.columnHeaderHeight=NaN}}(jQuery,window,Handsontable),function(){function n(t){this._value=t}function r(t,e,n,o){var i,r,a=Math.pow(10,e);return r=(n(t*a)/a).toFixed(e),o&&(i=new RegExp("0{1,"+o+"}$"),r=r.replace(i,"")),r}function a(t,e,n){var o;return o=e.indexOf("$")>-1?l(t,e,n):e.indexOf("%")>-1?A(t,e,n):e.indexOf(":")>-1?c(t,e):d(t._value,e,n)}function s(t,e){var n,o,i,r,a,s=e,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],A=!1;if(e.indexOf(":")>-1)t._value=u(e);else if(e===C)t._value=0;else{for("."!==w[T].delimiters.decimal&&(e=e.replace(/\./g,"").replace(w[T].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+w[T].abbreviations.thousand+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+w[T].abbreviations.million+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+w[T].abbreviations.billion+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+w[T].abbreviations.trillion+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),a=0;a<=l.length&&!(A=e.indexOf(l[a])>-1&&Math.pow(1024,a+1));a++);t._value=(A?A:1)*(s.match(n)?Math.pow(10,3):1)*(s.match(o)?Math.pow(10,6):1)*(s.match(i)?Math.pow(10,9):1)*(s.match(r)?Math.pow(10,12):1)*(e.indexOf("%")>-1?.01:1)*((e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1)*Number(e.replace(/[^0-9\.]+/g,"")),t._value=A?Math.ceil(t._value):t._value}return t._value}function l(t,e,n){var o,i,r=e.indexOf("$"),a=e.indexOf("("),s=e.indexOf("-"),l="";return e.indexOf(" $")>-1?(l=" ",e=e.replace(" $","")):e.indexOf("$ ")>-1?(l=" ",e=e.replace("$ ","")):e=e.replace("$",""),i=d(t._value,e,n),r<=1?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),o=1,(r-1?(i=i.split(""),i.splice(-1,0,l+w[T].currency.symbol),i=i.join("")):i=i+l+w[T].currency.symbol,i}function A(t,e,n){var o,i="",r=100*t._value;return e.indexOf(" %")>-1?(i=" ",e=e.replace(" %","")):e=e.replace("%",""),o=d(r,e,n),o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o}function c(t){var e=Math.floor(t._value/60/60),n=Math.floor((t._value-60*e*60)/60),o=Math.round(t._value-60*e*60-60*n);return e+":"+(n<10?"0"+n:n)+":"+(o<10?"0"+o:o)}function u(t){var e=t.split(":"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}function d(t,e,n){var o,i,a,s,l,A,c=!1,u=!1,d=!1,g="",h=!1,p=!1,f=!1,M=!1,I=!1,y="",E="",N=Math.abs(t),m=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],b="",D=!1;if(0===t&&null!==C)return C;if(e.indexOf("(")>-1?(c=!0,e=e.slice(1,-1)):e.indexOf("+")>-1&&(u=!0,e=e.replace(/\+/g,"")),e.indexOf("a")>-1&&(h=e.indexOf("aK")>=0,p=e.indexOf("aM")>=0,f=e.indexOf("aB")>=0,M=e.indexOf("aT")>=0,I=h||p||f||M,e.indexOf(" a")>-1?(g=" ",e=e.replace(" a","")):e=e.replace("a",""),N>=Math.pow(10,12)&&!I||M?(g+=w[T].abbreviations.trillion,t/=Math.pow(10,12)):N=Math.pow(10,9)&&!I||f?(g+=w[T].abbreviations.billion,t/=Math.pow(10,9)):N=Math.pow(10,6)&&!I||p?(g+=w[T].abbreviations.million,t/=Math.pow(10,6)):(N=Math.pow(10,3)&&!I||h)&&(g+=w[T].abbreviations.thousand,t/=Math.pow(10,3))),e.indexOf("b")>-1)for(e.indexOf(" b")>-1?(y=" ",e=e.replace(" b","")):e=e.replace("b",""),a=0;a<=m.length;a++)if(o=Math.pow(1024,a),i=Math.pow(1024,a+1),t>=o&&t0&&(t/=o);break}return e.indexOf("o")>-1&&(e.indexOf(" o")>-1?(E=" ",e=e.replace(" o","")):e=e.replace("o",""),E+=w[T].ordinal(t)),e.indexOf("[.]")>-1&&(d=!0,e=e.replace("[.]",".")),s=t.toString().split(".")[0],l=e.split(".")[1],A=e.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),b=r(t,l[0].length+l[1].length,n,l[1].length)):b=r(t,l.length,n),s=b.split(".")[0],b=b.split(".")[1].length?w[T].delimiters.decimal+b.split(".")[1]:"",d&&0===Number(b.slice(1))&&(b="")):s=r(t,null,n),s.indexOf("-")>-1&&(s=s.slice(1),D=!0),A>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+w[T].delimiters.thousands)),0===e.indexOf(".")&&(s=""),(c&&D?"(":"")+(!c&&D?"-":"")+(!D&&u?"+":"")+s+b+(E?E:"")+(g?g:"")+(y?y:"")+(c&&D?")":"")}function g(t,e){w[t]=e}function h(t){var e=t.toString().split(".");return e.length<2?1:Math.pow(10,e[1].length)}function p(){var t=Array.prototype.slice.call(arguments);return t.reduce(function(t,e){var n=h(t),o=h(e);return n>o?n:o},-(1/0))}var f,M="1.5.3",w={},T="en",C=null,I="0,0",y="undefined"!=typeof t&&t.exports;f=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return f.isNumeral(t)?t=t.value():0===t||"undefined"==typeof t?t=0:Number(t)||(t=f.fn.unformat(t)),new n(Number(t))}),f.version=M,f.isNumeral=function(t){return t instanceof n},f.language=function(t,e){if(!t)return T;if(t&&!e){if(!w[t])throw new Error("Unknown language : "+t);T=t}return!e&&w[t]||g(t,e),f},f.languageData=function(t){if(!t)return w[T];if(!w[t])throw new Error("Unknown language : "+t);return w[t]},f.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),f.zeroFormat=function(t){C="string"==typeof t?t:null},f.defaultFormat=function(t){I="string"==typeof t?t:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(t,e){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,o,i=this.length>>>0,r=!1;for(1n;++n)this.hasOwnProperty(n)&&(r?o=t(o,this[n],n,this):(o=this[n],r=!0));if(!r)throw new TypeError("Reduce of empty array with no initial value");return o}),f.fn=n.prototype={clone:function(){return f(this)},format:function(t,e){ +return a(this,t?t:I,void 0!==e?e:Math.round)},unformat:function(t){return"[object Number]"===Object.prototype.toString.call(t)?t:s(this,t?t:I)},value:function(){return this._value},valueOf:function(){return this._value},set:function(t){return this._value=Number(t),this},add:function(t){function e(t,e,o,i){return t+n*e}var n=p.call(null,this._value,t);return this._value=[this._value,t].reduce(e,0)/n,this},subtract:function(t){function e(t,e,o,i){return t-n*e}var n=p.call(null,this._value,t);return this._value=[t].reduce(e,this._value*n)/n,this},multiply:function(t){function e(t,e,n,o){var i=p(t,e);return t*i*(e*i)/(i*i)}return this._value=[this._value,t].reduce(e,1),this},divide:function(t){function e(t,e,n,o){var i=p(t,e);return t*i/(e*i)}return this._value=[this._value,t].reduce(e),this},difference:function(t){return Math.abs(f(this._value).subtract(t).value())}},y&&(t.exports=f),"undefined"==typeof ender&&(this.numeral=f),o=[],i=function(){return f}.apply(e,o),!(void 0!==i&&(t.exports=i))}.call(void 0)},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){var e=37,o=null,i=function t(e){var n=arguments,o=!0,t=1;return e=e.replace(/%s/g,function(){var e=n[t++];return"undefined"==typeof e?(o=!1,""):e}),o?e:""},r=function(e,n,o,i){var r="";return t.each(e,function(t,e){return e[n]!==i||(r=e[o],!1)}),r},a=function(e,n){var o=-1;return t.each(e,function(t,e){return e.field!==n||(o=t,!1)}),o},s=function(){if(null===o){var e,n,i=t("

").addClass("fixed-table-scroll-inner"),r=t("

").addClass("fixed-table-scroll-outer");r.append(i),t("body").append(r),e=i[0].offsetWidth,r.css("overflow","scroll"),n=i[0].offsetWidth,e===n&&(n=r[0].clientWidth),r.remove(),o=e-n}return o},l=function(e,o,i,r){if("string"==typeof o){var a=o.split(".");a.length>1?(o=window,t.each(a,function(t,e){o=o[e]})):o=window[o]}return"object"==("undefined"==typeof o?"undefined":n(o))?o:"function"==typeof o?o.apply(e,i):r},A=function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):t},c=function(e,n){this.options=n,this.$el=t(e),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};c.DEFAULTS={classes:"table table-hover",height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",striped:!1,columns:[],data:[],method:"get",url:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(t){return t},queryParamsType:"limit",responseHandler:function(t){return t},pagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",search:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,maintainSelected:!1,searchTimeOut:500,keyEvents:!1,searchText:"",iconSize:void 0,iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th"},rowStyle:function(){return{}},rowAttributes:function(){return{}},onAll:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onColumnSearch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1}},c.LOCALES=[],c.LOCALES["en-US"]={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(t){return i("%s records per page",t)},formatShowingRows:function(t,e,n){return i("Showing %s to %s of %s rows",t,e,n)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},t.extend(c.DEFAULTS,c.LOCALES["en-US"]),c.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,class:void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,cellStyle:void 0,searchable:!0,cardVisible:!0,filterControl:void 0},c.EVENTS={"all.bs.table":"onAll","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","column-search.bs.table":"onColumnSearch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader"},c.prototype.init=function(){this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initServer(),this.initKeyEvents()},c.prototype.initContainer=function(){this.$container=t(['
','
',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"",'
','
','
','
',this.options.formatLoadingMessage(),"
","
",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
':"","
","
"].join("")),this.$container.insertAfter(this.$el),this.$container.find(".fixed-table-body").append(this.$el),this.$container.after('
'),this.$loading=this.$container.find(".fixed-table-loading"),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped")},c.prototype.initTable=function(){var e=this,n=[],o=[];this.$header=this.$el.find("thead"),this.$header.length||(this.$header=t("").appendTo(this.$el)),this.$header.find("tr").length||this.$header.append(""),this.$header.find("th").each(function(){var e=t.extend({},{title:t(this).html(),class:t(this).attr("class")},t(this).data());n.push(e)}),this.options.columns=t.extend(!0,[],n,this.options.columns),t.each(this.options.columns,function(n,o){e.options.columns[n]=t.extend({},c.COLUMN_DEFAULTS,{field:n},o)}),this.options.data.length||(this.$el.find("tbody tr").each(function(){var n={};n._id=t(this).attr("id"),n._class=t(this).attr("class"),t(this).find("td").each(function(o){var i=e.options.columns[o].field;n[i]=t(this).html(),n["_"+i+"_id"]=t(this).attr("id"),n["_"+i+"_class"]=t(this).attr("class"),n["_"+i+"_data"]=t(this).data()}),o.push(n)}),this.options.data=o)},c.prototype.initHeader=function(){var n=this,o=[],r=[],a=!1,s=0;this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],cellStyles:[],clickToSelects:[],searchables:[]},t.each(this.options.columns,function(t,e){var s="",l="",A="",c="",u=i(' class="%s"',e.class),d=(n.options.sortOrder||e.order,"px"),g="hidden";if(e.visible&&(!n.options.cardView||e.cardVisible)){if(void 0!==e.width&&"string"==typeof e.width&&(e.width.indexOf("%")>-1&&(d="%"),e.width=e.width.replace("%","").replace("px","")),l=i("text-align: %s; ",e.halign?e.halign:e.align),A=i("text-align: %s; ",e.align),c=i("vertical-align: %s; ",e.valign),c+=i("width: %s"+d+"; ",e.checkbox||e.radio?36:e.width),o.push(e),n.header.fields.push(e.field),n.header.styles.push(A+c),n.header.classes.push(u),n.header.formatters.push(e.formatter),n.header.events.push(e.events),n.header.sorters.push(e.sorter),n.header.cellStyles.push(e.cellStyle),n.header.clickToSelects.push(e.clickToSelect),n.header.searchables.push(e.searchable),r.push(""),r.push(i('
',n.options.sortable&&e.sortable?"sortable":"")),s=e.title,n.options.sortName===e.field&&n.options.sortable&&e.sortable&&(s+=n.getCaretHtml()),e.checkbox&&(!n.options.singleSelect&&n.options.checkboxHeader&&(s=''),n.header.stateField=e.field),e.radio&&(s="",n.header.stateField=e.field,n.options.singleSelect=!0),r.push(s),r.push("
"),r.push('
'),r.push('
'),e.filterControl&&e.searchable&&(a=!0,g="visible"),void 0!==e.filterControl)switch(e.filterControl.toLowerCase()){case"input":r.push(i('',g));break;case"select":r.push(i('',e.field,g))}else r.push('
');r.push("
"),r.push("")}}),this.$header.find("tr").html(r.join("")),this.$header.find("th").each(function(e){t(this).data(o[e])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){n.options.sortable&&t(this).parent().data().sortable&&n.onSort(e)}),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$container.find(".fixed-table-header").hide(),this.$loading.css("top",0)):(this.$header.show(),this.$container.find(".fixed-table-header").show(),this.$loading.css("top",e+"px")),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$container.off("click",'[name="btSelectAll"]').on("click",'[name="btSelectAll"]',function(){var e=t(this).prop("checked");n[e?"checkAll":"uncheckAll"]()}),a?(this.$header.off("keyup","input").on("keyup","input",function(t){clearTimeout(s),s=setTimeout(function(){n.onColumnSearch(t)},n.options.searchTimeOut)}),this.$header.off("change","select").on("change","select",function(t){clearTimeout(s),s=setTimeout(function(){n.onColumnSearch(t)},n.options.searchTimeOut)})):this.$header.find(".filterControl").hide()},c.prototype.initFooter=function(){this.$footer=this.$container.find(".fixed-table-footer"),!this.options.showFooter||this.options.cardView?this.$footer.hide():this.$footer.show()},c.prototype.initData=function(t,e){this.data="append"===e?this.data.concat(t):"prepend"===e?[].concat(t).concat(this.data):t||this.options.data,this.options.data=this.data,"server"!==this.options.sidePagination&&this.initSort()},c.prototype.initSort=function(){var e=this,n=this.options.sortName,o="desc"===this.options.sortOrder?-1:1,i=t.inArray(this.options.sortName,this.header.fields);-1!==i&&this.data.sort(function(r,a){var s=r[n],A=a[n],c=l(e.header,e.header.sorters[i],[s,A]);return void 0!==c?o*c:void 0!==c?o*c:((void 0===s||null===s)&&(s=""),(void 0===A||null===A)&&(A=""),t.isNumeric(s)&&t.isNumeric(A)?(s=parseFloat(s),A=parseFloat(A),A>s?-1*o:o):s===A?0:("string"!=typeof s&&(s=s.toString()),-1===s.localeCompare(A)?-1*o:o))})},c.prototype.onSort=function(e){var n=t(e.currentTarget).parent(),o=this.$header.find("th").eq(n.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===n.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=n.data("field"),this.options.sortOrder="asc"===n.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),n.add(o).data("order",this.options.sortOrder).find(".th-inner").append(this.getCaretHtml()),"server"===this.options.sidePagination?void this.initServer():(this.initSort(),void this.initBody())},c.prototype.initToolbar=function(){var e,n,o=this,r=[],a=0,s=0;this.$toolbar=this.$container.find(".fixed-table-toolbar").html(""),"string"==typeof this.options.toolbar&&t(i('
',this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),r=[i('
',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=l(null,this.options.icons)),this.options.showPaginationSwitch&&r.push(i('"),this.options.showRefresh&&r.push(i('"),this.options.showToggle&&r.push(i('"),this.options.showColumns&&(r.push(i('
',this.options.formatColumns()),'",'","
")),r.push("
"),(this.showToolbar||r.length>2)&&this.$toolbar.append(r.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",t.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",t.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){o.toggleView()}),this.options.showColumns&&(e=this.$toolbar.find(".keep-open"),s<=this.options.minimumCountColumns&&e.find("input").prop("disabled",!0),e.find("li").off("click").on("click",function(t){t.stopImmediatePropagation()}),e.find("input").off("click").on("click",function(){var e=t(this);o.toggleColumn(e.val(),e.prop("checked"),!1),o.trigger("column-switch",t(this).data("field"),e.prop("checked"))})),this.options.search&&(r=[],r.push('"),this.$toolbar.append(r.join("")),n=this.$toolbar.find(".search input"),n.off("keyup").on("keyup",function(t){clearTimeout(a),a=setTimeout(function(){o.onSearch(t)},o.options.searchTimeOut)}),""!==this.options.searchText&&(n.val(this.options.searchText),clearTimeout(a),a=setTimeout(function(){n.trigger("keyup")},o.options.searchTimeOut)))},c.prototype.onSearch=function(e){var n=t.trim(t(e.currentTarget).val());this.options.trimOnSearch&&t(e.currentTarget).val()!==n&&t(e.currentTarget).val(n),n!==this.searchText&&(this.searchText=n,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",n))},c.prototype.onColumnSearch=function(e){var n=t.trim(t(e.currentTarget).val()),o=t(e.currentTarget).parent().parent().data("field");t.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),n?this.filterColumnsPartial[o]=n:delete this.filterColumnsPartial[o],this.options.pageNumber=1,this.initSearch(),this.updatePagination()},c.prototype.initSearch=function(){var e=this;if("server"!==this.options.sidePagination){var n=this.searchText&&this.searchText.toLowerCase(),o=t.isEmptyObject(this.filterColumns)?null:this.filterColumns,i=t.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=o?t.grep(this.options.data,function(t){for(var e in o)if(t[e]!==o[e])return!1;return!0}):this.options.data,this.data=i?t.grep(this.data,function(n,o){for(var r in i){var a=i[r].toLowerCase(),s=n[r];if(s=l(e.header,e.header.formatters[t.inArray(r,e.header.fields)],[s,n,o],s),-1===t.inArray(r,e.header.fields)||"string"!=typeof s&&"number"!=typeof s||-1===(s+"").toLowerCase().indexOf(a))return!1}return!0}):this.data,this.data=n?t.grep(this.data,function(o,i){for(var r in o){r=t.isNumeric(r)?parseInt(r,10):r;var a=o[r];a=l(e.header,e.header.formatters[t.inArray(r,e.header.fields)],[a,o,i],a);var s=t.inArray(r,e.header.fields);if(-1!==s&&e.header.searchables[s]&&("string"==typeof a||"number"==typeof a)&&-1!==(a+"").toLowerCase().indexOf(n))return!0}return!1}):this.data}},c.prototype.initPagination=function(){if(this.$pagination=this.$container.find(".fixed-table-pagination"),!this.options.pagination)return void this.$pagination.hide();this.$pagination.show();var e,n,o,r,a,s,l,A,c,u=this,d=[],g=!1,h=this.getData();if("server"!==this.options.sidePagination&&(this.options.totalRows=h.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,g=!0;else if(this.options.pageSize===this.options.totalRows){var p="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;p.indexOf(this.options.formatAllRows().toLowerCase())>-1&&(g=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),d.push('
','',this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),d.push('');var f=[i('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",'"),d.push(this.options.formatRecordsPerPage(f.join(""))),d.push(""),d.push("
",'
','
    ','
  • <<
  • ','
  • <
  • '),this.totalPages<5?(n=1,o=this.totalPages):(n=this.options.pageNumber-2,o=n+4,1>n&&(n=1,o=5),o>this.totalPages&&(o=this.totalPages,n=o-4)),e=n;o>=e;e++)d.push('
  • ','',e,"","
  • ");d.push('
  • >
  • ','
  • >>
  • ',"
","
"),this.$pagination.html(d.join("")),r=this.$pagination.find(".page-list a"),a=this.$pagination.find(".page-first"),s=this.$pagination.find(".page-pre"),l=this.$pagination.find(".page-next"),A=this.$pagination.find(".page-last"),c=this.$pagination.find(".page-number"),this.options.pageNumber<=1&&(a.addClass("disabled"),s.addClass("disabled")),this.options.pageNumber>=this.totalPages&&(l.addClass("disabled"),A.addClass("disabled")),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(M.length<2||this.options.totalRows<=M[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),g&&(this.options.pageSize=this.options.formatAllRows()),r.off("click").on("click",t.proxy(this.onPageListChange,this)),a.off("click").on("click",t.proxy(this.onPageFirst,this)),s.off("click").on("click",t.proxy(this.onPagePre,this)),l.off("click").on("click",t.proxy(this.onPageNext,this)),A.off("click").on("click",t.proxy(this.onPageLast,this)),c.off("click").on("click",t.proxy(this.onPageNumber,this))},c.prototype.updatePagination=function(e){e&&t(e.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},c.prototype.onPageListChange=function(e){var n=t(e.currentTarget);n.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=n.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+n.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(e)},c.prototype.onPageFirst=function(t){this.options.pageNumber=1,this.updatePagination(t)},c.prototype.onPagePre=function(t){this.options.pageNumber--,this.updatePagination(t)},c.prototype.onPageNext=function(t){this.options.pageNumber++,this.updatePagination(t)},c.prototype.onPageLast=function(t){this.options.pageNumber=this.totalPages,this.updatePagination(t)},c.prototype.onPageNumber=function(e){this.options.pageNumber!==+t(e.currentTarget).text()&&(this.options.pageNumber=+t(e.currentTarget).text(),this.updatePagination(e))},c.prototype.initBody=function(e){var n=this,o=[],s=this.getData();this.trigger("pre-body",s),this.$body=this.$el.find("tbody"),this.$body.length||(this.$body=t("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=s.length);for(var c=this.pageFrom-1;c"),this.options.cardView&&o.push(i('',this.header.fields.length)),t.each(this.header.fields,function(e,s){var A="",u=d[s],p="",f={},M="",w=n.header.classes[e],T="",C=n.options.columns[a(n.options.columns,s)];if(g=i('style="%s"',h.concat(n.header.styles[e]).join("; ")),u=l(n.header,n.header.formatters[e],[u,d,c],u),d["_"+s+"_id"]&&(M=i(' id="%s"',d["_"+s+"_id"])),d["_"+s+"_class"]&&(w=i(' class="%s"',d["_"+s+"_class"])),f=l(n.header,n.header.cellStyles[e],[u,d,c],f),f.classes&&(w=i(' class="%s"',f.classes)),f.css){var I=[];for(var y in f.css)I.push(y+": "+f.css[y]);g=i('style="%s"',I.concat(n.header.styles[e]).join("; "))}if(d["_"+s+"_data"]&&!t.isEmptyObject(d["_"+s+"_data"])&&t.each(d["_"+s+"_data"],function(t,e){"index"!==t&&(T+=i(' data-%s="%s"',t,e))}),C.checkbox||C.radio)p=C.checkbox?"checkbox":p,p=C.radio?"radio":p,A=[n.options.cardView?'
':'',"",n.options.cardView?"
":""].join("");else{if(u="undefined"==typeof u||null===u?n.options.undefinedText:u,A=n.options.cardView?['
',n.options.showHeader?i('%s',g,r(n.options.columns,"field","title",s)):"",i('%s',u),"
"].join(""):[i("",M,w,g,T),u,""].join(""),void 0!==C.filterControl&&"select"===C.filterControl.toLowerCase()&&C.searchable){var E,N=t("."+C.field),m=0,b=!1;if(void 0!==N)if(E=N.get(0).options,0===E.length)N.append(t("").attr("value","").text("")),N.append(t("").attr("value",u).text(u));else{for(;m").attr("value",u).text(u))}}n.options.cardView&&n.options.smartDisplay&&""===u&&(A="")}o.push(A)}),this.options.cardView&&o.push(""),o.push("")}o.length||o.push('',i('%s',this.header.fields.length,this.options.formatNoMatches()),""),this.$body.html(o.join("")),e||this.scrollTo(0),this.$body.find("> tr > td").off("click").on("click",function(){var e=t(this).parent();n.trigger("click-row",n.data[e.data("index")],e),n.options.clickToSelect&&n.header.clickToSelects[e.children().index(t(this))]&&e.find(i('[name="%s"]',n.options.selectItemName))[0].click()}),this.$body.find("tr").off("dblclick").on("dblclick",function(){n.trigger("dbl-click-row",n.data[t(this).data("index")],t(this))}),this.$selectItem=this.$body.find(i('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var o=t(this).prop("checked"),i=n.data[t(this).data("index")];i[n.header.stateField]=o,n.trigger(o?"check":"uncheck",i),n.options.singleSelect&&(n.$selectItem.not(this).each(function(){n.data[t(this).data("index")][n.header.stateField]=!1}),n.$selectItem.filter(":checked").not(this).prop("checked",!1)),n.updateSelected()}),t.each(this.header.events,function(e,o){if(o){"string"==typeof o&&(o=l(null,o));for(var i in o)n.$body.find("tr").each(function(){var r=t(this),a=r.find(n.options.cardView?".card-view":"td").eq(e),s=i.indexOf(" "),l=i.substring(0,s),A=i.substring(s+1),c=o[i];a.find(A).off(l).on(l,function(t){var o=r.data("index"),i=n.data[o],a=i[n.header.fields[e]];c.apply(this,[t,a,i,o])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body")},c.prototype.initServer=function(e,n){var o=this,i={},r={pageSize:this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,pageNumber:this.options.pageNumber,searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.url&&("limit"===this.options.queryParamsType&&(r={search:r.searchText,sort:r.sortName,order:r.sortOrder},this.options.pagination&&(r.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,r.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1))),t.isEmptyObject(this.filterColumnsPartial)||(r.filter=JSON.stringify(this.filterColumnsPartial,null)),i=l(this.options,this.options.queryParams,[r],i),t.extend(i,n||{}),i!==!1&&(e||this.$loading.show(),t.ajax(t.extend({},l(null,this.options.ajaxOptions),{type:this.options.method,url:this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(i):i,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=l(o.options,o.options.responseHandler,[t],t),o.load(t),o.trigger("load-success",t)},error:function(t){o.trigger("load-error",t.status)},complete:function(){e||o.$loading.hide()}}))))},c.prototype.initKeyEvents=function(){if(this.options.keyEvents){var e=this;t(document).off("keypress").on("keypress",function(t){var n=e.$toolbar.find(".search input"),o=e.$toolbar.find('button[name="refresh"]'),i=e.$toolbar.find('button[name="toggle"]'),r=e.$toolbar.find('button[name="paginationSwitch"]');switch(t.keyCode){case 115:case 83:if(!e.options.search)return;return document.activeElement===n.get(0)||(n.focus(),!1);case 114:case 82:if(!e.options.showRefresh)return;return document.activeElement===n.get(0)||(o.click(),!1);case 116:case 84:if(!e.options.showToggle)return;return document.activeElement===n.get(0)||(i.click(),!1);case 112:case 80:if(!e.options.showPaginationSwitch)return;return document.activeElement===n.get(0)||(r.click(),!1)}})}},c.prototype.getCaretHtml=function(){return['','',""].join("")},c.prototype.updateSelected=function(){var e=this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",e),this.$selectItem.each(function(){t(this).parents("tr")[t(this).prop("checked")?"addClass":"removeClass"]("selected")})},c.prototype.updateRows=function(e){var n=this;this.$selectItem.each(function(){n.data[t(this).data("index")][n.header.stateField]=e})},c.prototype.resetRows=function(){var e=this;t.each(this.data,function(t,n){e.$selectAll.prop("checked",!1),e.$selectItem.prop("checked",!1),n[e.header.stateField]=!1})},c.prototype.trigger=function(e){var n=Array.prototype.slice.call(arguments,1);e+=".bs.table",this.options[c.EVENTS[e]].apply(this.options,n),this.$el.trigger(t.Event(e),n),this.options.onAll(e,n),this.$el.trigger(t.Event("all.bs.table"),[e,n])},c.prototype.resetHeader=function(){this.$el.css("margin-top",-this.$header.height()),clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(t.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},c.prototype.fitHeader=function(){var e,n,o,i=this;return i.$el.is(":hidden")?void(i.timeoutFooter_=setTimeout(t.proxy(i.fitHeader,i),100)):(e=i.$container.find(".fixed-table-header"),n=i.$container.find(".fixed-table-body"),o=i.$el.width()>n.width()?s():0,i.$header_=i.$header.clone(!0,!0),i.$selectAll_=i.$header_.find('[name="btSelectAll"]'),e.css({"margin-right":o}).find("table").css("width",i.$el.css("width")).html("").attr("class",i.$el.attr("class")).append(i.$header_),i.$header.find("th").each(function(e){i.$header_.find("th").eq(e).data(t(this).data())}),i.$body.find("tr:first-child:not(.no-records-found) > *").each(function(e){i.$header_.find("div.fht-cell").eq(e).width(t(this).innerWidth())}),n.off("scroll").on("scroll",function(){ +e.scrollLeft(t(this).scrollLeft())}),void i.trigger("post-header"))},c.prototype.resetFooter=function(){var e=this,n=e.getData(),o=[];this.options.showFooter&&!this.options.cardView&&(t.each(this.options.columns,function(t,r){var a="",s="",A=i(' class="%s"',r.class);r.visible&&(!e.options.cardView||r.cardVisible)&&(a=i("text-align: %s; ",r.falign?r.falign:r.align),s=i("vertical-align: %s; ",r.valign),o.push(""),o.push(l(r,r.footerFormatter,[n]," ")||" "),o.push(""))}),this.$footer.find("tr").html(o.join("")),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},c.prototype.fitFooter=function(){var e,n,o,i;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100)):(e=this.$container.find(".fixed-table-body"),o=this.$el.css("width"),i=o>e.width()?s():0,this.$footer.css({"margin-right":i}).find("table").css("width",o).attr("class",this.$el.attr("class")),n=this.$footer.find("td"),void e.find("tbody tr:first-child:not(.no-records-found) > td").each(function(e){n.eq(e).outerWidth(t(this).outerWidth())}))},c.prototype.toggleColumn=function(t,e,n){if(-1!==t&&(this.options.columns[t].visible=e,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var o=this.$toolbar.find(".keep-open input").prop("disabled",!1);n&&o.filter(i('[value="%s"]',t)).prop("checked",e),o.filter(":checked").length<=this.options.minimumCountColumns&&o.filter(":checked").prop("disabled",!0)}},c.prototype.toggleRow=function(e,n,o){-1!==e&&t(this.$body[0]).children().filter(i(n?'[value="%s"]':'[data-index="%s"]',e))[o?"show":"hide"]()},c.prototype.resetView=function(t){var n=this,o=0,i=n.$container.find(".fixed-table-container");if(t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var r=+this.$toolbar.children().outerHeight(!0),a=+this.$pagination.children().outerHeight(!0),s=this.options.height-r-a;i.css("height",s+"px")}return this.options.cardView?(n.$el.css("margin-top","0"),void i.css("padding-bottom","0")):(this.options.showHeader&&this.options.height?(this.$container.find(".fixed-table-header").show(),this.resetHeader(),o+=e):(this.$container.find(".fixed-table-header").hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(o+=e)),void i.css("padding-bottom",o+"px"))},c.prototype.getData=function(){return!this.searchText&&t.isEmptyObject(this.filterColumns)&&t.isEmptyObject(this.filterColumnsPartial)?this.options.data:this.data},c.prototype.load=function(e){var n=!1;"server"===this.options.sidePagination?(this.options.totalRows=e.total,n=e.fixedScroll,e=e.rows):t.isArray(e)||(n=e.fixedScroll,e=e.data),this.initData(e),this.initSearch(),this.initPagination(),this.initBody(n)},c.prototype.append=function(t){this.initData(t,"append"),this.initSearch(),this.initPagination(),this.initBody(!0)},c.prototype.prepend=function(t){this.initData(t,"prepend"),this.initSearch(),this.initPagination(),this.initBody(!0)},c.prototype.remove=function(e){var n,o,i=this.options.data.length;if(e.hasOwnProperty("field")&&e.hasOwnProperty("values")){for(n=i-1;n>=0;n--)o=this.options.data[n],o.hasOwnProperty(e.field)&&-1!==t.inArray(o[e.field],e.values)&&this.options.data.splice(n,1);i!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))}},c.prototype.insertRow=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(this.data.splice(t.index,0,t.row),this.initSearch(),this.initPagination(),this.initBody(!0))},c.prototype.updateRow=function(e){e.hasOwnProperty("index")&&e.hasOwnProperty("row")&&(t.extend(this.data[e.index],e.row),this.initBody(!0))},c.prototype.showRow=function(t){t.hasOwnProperty("index")&&this.toggleRow(t.index,void 0!==t.isIdField,!0)},c.prototype.hideRow=function(t){t.hasOwnProperty("index")&&this.toggleRow(t.index,void 0!==t.isIdField,!1)},c.prototype.getRowsHidden=function(e){var n=t(this.$body[0]).children().filter(":hidden"),o=0;if(e)for(;oi||0>r||i>=this.data.length)){for(n=i;i+a>n;n++)for(o=r;r+s>o;o++)l.eq(n).find("td").eq(o).hide();A.attr("rowspan",a).attr("colspan",s).show()}},c.prototype.getOptions=function(){return this.options},c.prototype.getSelections=function(){var e=this;return t.grep(this.data,function(t){return t[e.header.stateField]})},c.prototype.checkAll=function(){this.checkAll_(!0)},c.prototype.uncheckAll=function(){this.checkAll_(!1)},c.prototype.checkAll_=function(t){var e;t||(e=this.getSelections()),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(t),this.updateSelected(),t&&(e=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",e)},c.prototype.check=function(t){this.check_(!0,t)},c.prototype.uncheck=function(t){this.check_(!1,t)},c.prototype.check_=function(t,e){this.$selectItem.filter(i('[data-index="%s"]',e)).prop("checked",t),this.data[e][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[e])},c.prototype.checkBy=function(t){this.checkBy_(!0,t)},c.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},c.prototype.checkBy_=function(e,n){if(n.hasOwnProperty("field")&&n.hasOwnProperty("values")){var o=this;t.each(this.options.data,function(r,a){return!!a.hasOwnProperty(n.field)&&void(-1!==t.inArray(a[n.field],n.values)&&(o.$selectItem.filter(i('[data-index="%s"]',r)).prop("checked",e),a[o.header.stateField]=e,o.trigger(e?"check":"uncheck",a)))}),this.updateSelected()}},c.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},c.prototype.showLoading=function(){this.$loading.show()},c.prototype.hideLoading=function(){this.$loading.hide()},c.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},c.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url,this.options.pageNumber=1),this.initServer(t&&t.silent,t&&t.query)},c.prototype.showColumn=function(t){this.toggleColumn(a(this.options.columns,t),!0,!0)},c.prototype.hideColumn=function(t){this.toggleColumn(a(this.options.columns,t),!1,!0)},c.prototype.filterBy=function(e){this.filterColumns=t.isEmptyObject(e)?{}:e,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},c.prototype.scrollTo=function(t){var e=this.$container.find(".fixed-table-body");"string"==typeof t&&(t="bottom"===t?e[0].scrollHeight:0),"number"==typeof t&&e.scrollTop(t)},c.prototype.selectPage=function(t){t>0&&t<=this.options.totalPages&&(this.options.pageNumber=t,this.updatePagination())},c.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},c.prototype.nextPage=function(){this.options.pageNumber>=4,o[r]=n[19==r?3&e|8:e]);return o.join("")},Math.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}}()},function(t,e){"use strict";window.Remark=function(t){this.remark="",this.defaultRemark="请输入备注内容",this.init(t)},Remark.prototype.init=function(t){var e=$("
备注
");t.append(e);var n=$("");e.append(n);var o=$("
");t.append(o),this.remarkLabel=$("
"+this.defaultRemark+"
"),o.append(this.remarkLabel),this.remarkEditor=$(""),o.append(this.remarkEditor),this.remarkEditor.hide();var i=this;this.remarkLabel.click(function(){i.remarkEditor.show(),i.remarkEditor.focus(),i.remarkLabel.hide()}),this.remarkEditor.change(function(){i.remark=$(this).val(),""===i.remark?i.remarkLabel.text(i.defaultRemark):i.remarkLabel.html(i.parseBreak(i.remark)),window.setDirty&&window.setDirty(),window._setDirty&&window._setDirty()}),this.remarkEditor.blur(function(){i.remarkEditor.hide(),i.remarkLabel.show()}),e.click(function(){o.collapse("toggle")}),o.on("show.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-right"),n.addClass("glyphicon-circle-arrow-down")}),o.on("hide.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-down"),n.addClass("glyphicon-circle-arrow-right")}),o.collapse("hide")},Remark.prototype.setData=function(t){t&&""!==t&&(this.remark=t,this.remarkEditor.val(t),this.remarkLabel.html(this.parseBreak(t)))},Remark.prototype.toXml=function(){return""},Remark.prototype.parseBreak=function(t){return t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("\n","gm"),"
")}},function(t,e,n){"use strict";var o=n(241);window._ConstantValueArray=[],window._ActionTypeArray=[],window._VariableValueArray=[],window._ParameterValueArray=[],window._FunctionValueArray=[],window.actionLibraries=[],window.variableLibraries=[],window.constantLibraries=[],window.parameterLibraries=[],window.urule={},window.generateContainer=function(){var t=$(".");return t.css({height:"20px",cursor:"pointer",margin:"0px",color:"white",border:"dashed transparent 1px"}),t.mouseover(function(){t.css({border:"dashed gray 1px"})}),t.mouseout(function(){t.css({border:"dashed transparent 1px"})}),t},window.refreshParameterLibraries=function(){for(var t="",e=0;e"),e=o[0],this._dom=e,n=this.menuItems;var i=this;if(n.length>20){var r=$("
");r.append(" "),this.search=$(""),r.append(this.search),o.append(r),this.search.click(function(t){t.stopPropagation()}),this.search.dblclick(function(t){t.stopPropagation()}),this.search.keypress(function(t){var e=t.keyCode?t.keyCode:t.which;if("13"===e||13===e){var o=$(this).val();if(!i.oldSearchValue||i.oldSearchValue!==o){for(i.oldSearchValue=o;i.menuItems.length>0;)i.menuItems[0].remove();for(var r=0;r-1&&i.addMenuItem(a):i.addMenuItem(a)}}}})}this.menuItems=[];for(var a=0;a$("html").height()+10&&t.pageY>r?e.addClass("dropdown-context-up").css({top:t.pageY-20-r,left:t.pageX-13}).fadeIn(this.fadeSpeed):e.css({top:t.pageY+10,left:t.pageX-13}).fadeIn(this.fadeSpeed)}this.onShow&&this.onShow(this)},URule.menu.Menu.prototype.hide=function(){var t=$(this._dom);t.is(":visible")&&(this.onHide&&this.onHide(this),t.fadeOut(this.fadeSpeed,function(){t.css({display:""}).find(".drop-left").removeClass("drop-left")}),this.parent&&this.parent.parent.hide())},URule.menu.MenuItem=function(t){URule.menu.MenuItem.prototype.superClass.call(this,t),$.extend(this,t)},URule.menu.MenuItem.prototype=new URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.superClass=URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.constructor=URule.menu.MenuItem,URule.menu.MenuItem.prototype.createDom=function(){var t,e,n;return n=this,t=$("
  • "),this._dom=t[0],e=this.icon?" "+this.label:this.label,t.on("mouseenter",function(){t.siblings(".dropdown-submenu").each(function(){$(this).find("ul.dropdown-context-sub").each(function(){var t=$(this).data("ref");$(this).fadeOut(t.fadeSpeed)})})}),"divider"===this.type?(t.addClass("divider"),t.append(e)):"header"==this.type?(t.addClass("nav-header"),t.append(e)):(t.append(""+e+""),this.subMenu&&this.setSubMenu(this.subMenu)),n.onClick&&(this.parent&&this.parent.search?(t.click(function(t){t.stopPropagation()}),t.dblclick(function(t){n.onClick(n,{event:t}),t.preventDefault(),t.stopPropagation(),n.parent.hide()})):t.click(function(t){t.preventDefault(),t.stopPropagation(),n.onClick(n,{event:t}),n.parent.hide()})),t[0]},URule.menu.MenuItem.prototype.setSubMenu=function(t){var e,n;return n=this,e=n.getDom(),t instanceof URule.menu.Menu?n.subMenu=t:n.subMenu=new URule.menu.Menu(t),n.subMenu.parent=this,$(e).attr("class","dropdown-submenu").on("mouseenter",function(){var t=$(this).find(".dropdown-context-sub:first"),e=t.width(),o=t.offset().left,i=e+o>window.innerWidth;i&&t.addClass("drop-left"),$(n.subMenu.getDom()).fadeIn(n.subMenu.fadeSpeed)}),this.subMenu.render(e),$(this.subMenu.getDom()).addClass("dropdown-context-sub"),this.subMenu},URule.menu.MenuItem.prototype.remove=function(){URule.menu.MenuItem.prototype.superClass.prototype.remove.call(this);var t;t=this.parent.menuItems.indexOf(this),this.parent.menuItems.splice(t,1)},URule.menu.MenuItem.prototype.show=function(){$(this._dom).show()},URule.menu.MenuItem.prototype.hide=function(){$(this._dom).hide()},$(document).on("dblclick","html",function(){$(".dropdown-context").each(function(){var t;t=$(this).data("ref"),t.hide()})}),URule.menu.AbstractMenu.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",function(t){t.preventDefault()})}()},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(245),r=o(i);urule.Context=function(t,e){this.container=t,this.paper=new r.default(this.container.get(0),"100%","100%"),this.rule=e,this.rootJoin=null},urule.Context.prototype.putToNamedMap=function(t,e){this.rule.namedMap.set(t,e)},urule.Context.prototype.deleteFromNamedMap=function(t){this.rule.namedMap.delete(t)},urule.Context.prototype.getVariableCategoryFromNamedMap=function(t){return this.rule.namedMap.get(t)},urule.Context.prototype.getCanvas=function(){return this.container},urule.Context.prototype.getPaper=function(){return this.paper},urule.Context.prototype.setRootJoin=function(t){this.rootJoin=t},urule.Context.prototype.getRootJoin=function(){return this.rootJoin},urule.Context.prototype.getTotalChildrenCount=function(){return this.rootJoin.getChildrenCount()}},function(t,e,n){"use strict";var o=n(226),i=n(241);!function(t){t.fn.urule=function(){function e(e){if(t("#saveButton").hasClass("disabled"))return!1;var r='';r+="",t.each(parameterLibraries,function(t,e){r+=''}),t.each(variableLibraries,function(t,e){r+=''}),t.each(constantLibraries,function(t,e){r+=''}),t.each(actionLibraries,function(t,e){r+=''}),r+=d.remark.toXml();try{for(var a=0;a 保存"),t("#saveButton").addClass("disabled"),t("#saveButtonNewVersion").html(" 保存新版本"),t("#saveButtonNewVersion").addClass("disabled"))}function r(e){var n=t("
    ");d.append(n);var o=new urule.Rule(d,n,e);return d.rules.push(o),window._setDirty(),o}function a(e){var n=t("
    ");d.append(n);var o=new urule.LoopRule(d,n,e);return d.rules.push(o),window._setDirty(),o}function s(){var e=window._server+"/common/loadXml";t.ajax({url:e,type:"POST",data:{files:l},error:function(t){t&&t.responseText?bootbox.alert("加载文件失败,服务端错误:"+t.responseText+""):bootbox.alert("加载文件失败,服务端出错")},success:function(t){var e=t[0],o=e.libraries;if(d.remark.setData(e.remark),o)for(var i=0;i\n
    \n \t",u=t(c);u.css({diaplay:"inline-block"}),this.append(u);var d=this;t("#addRuleButton").click(function(){var t=r();t.initTopJoin()}),t("#addLoopRuleButton").click(function(){var t=a();t.initTopJoin()}),t("#configVarButton").click(function(){d.configVarDialog||(d.configVarDialog=new urule.ConfigVariableDialog(d)),d.configVarDialog.open()}),t("#configConstantsButton").click(function(){d.configConstantDialog||(d.configConstantDialog=new urule.ConfigConstantDialog(d)),d.configConstantDialog.open()}),t("#configActionButton").click(function(){d.configActionDialog||(d.configActionDialog=new urule.ConfigActionDialog(d)),d.configActionDialog.open()}),t("#configParameterButton").click(function(){d.configParameterDialog||(d.configParameterDialog=new urule.ConfigParameterDialog(d)),d.configParameterDialog.open()}),t("#saveButton").click(function(){e(!1)}),t("#saveButtonNewVersion").click(function(){e(!0)}),t("#saveButton").addClass("disabled"),t("#saveButtonNewVersion").addClass("disabled");var g=t("
    ");this.append(g),this.remark=new Remark(g),s();var h=this;this.sortable({delay:200,update:function(e,n){var o=h.children("div");o.each(function(e,n){var o=t(n),i=o.prop("id"),r=h.rules,a=null,s=!0,l=!1,A=void 0;try{for(var c,u=r[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;if(d.uuid===i){a=d;break}}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}if(a){var g=r.indexOf(a);r.splice(g,1),r.splice(e,0,a)}}),window._setDirty()}}),window._setDirty=function(){d._dirty||(d._dirty=!0,window._dirty=!0,t("#saveButton").html(" *保存"),t("#saveButton").removeClass("disabled"),t("#saveButtonNewVersion").html(" *保存新版本"),t("#saveButtonNewVersion").removeClass("disabled"))}}}(jQuery)},function(t,e){"use strict";urule.ComparisonOperator=function(t){this.inputType=null,this.operator="",this.container=generateContainer(),URule.setDomContent(this.container,"请选择比较操作符"),this.container.css({"font-size":"13px",color:"red",fontWeight:"bold","margin-right":"3px"});var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({onHide:function(){t()},menuItems:[{label:"大于",name:"GreaterThen",onClick:n},{label:"大于或等于",name:"GreaterThenEquals",onClick:n},{label:"小于",name:"LessThen",onClick:n},{label:"小于或等于",name:"LessThenEquals",onClick:n},{label:"等于",name:"Equals",onClick:n},{label:"等于(不分大小写)",name:"EqualsIgnoreCase",onClick:n},{label:"开始于",name:"StartWith",onClick:n},{label:"不开始于",name:"NotStartWith",onClick:n},{label:"结束于",name:"EndWith",onClick:n},{label:"不结束于",name:"NotEndWith",onClick:n},{label:"不等于",name:"NotEquals",onClick:n},{label:"不等于(不分大小写)",name:"NotEqualsIgnoreCase",onClick:n},{label:"在集合",name:"In",onClick:n},{label:"不在集合",name:"NotIn",onClick:n},{label:"为空",name:"Null",onClick:n},{label:"不为空",name:"NotNull",onClick:n},{label:"匹配正则表达式",name:"Match",onClick:n},{label:"不匹配正则表达式",name:"NotMatch",onClick:n},{label:"包含",name:"Contain",onClick:n},{label:"不包含",name:"NotContain",onClick:n}]}),this.container.click(function(t){e.menu.show(t)})},urule.ComparisonOperator.prototype.initRightValue=function(t){this.inputType&&this.inputType.setValueType(t.valueType,t)},urule.ComparisonOperator.prototype.setOperator=function(t){switch(t){case"GreaterThen":this.operator="GreaterThen",URule.setDomContent(this.container,"大于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"GreaterThenEquals":this.operator="GreaterThenEquals",URule.setDomContent(this.container,"大于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThen":this.operator="LessThen",URule.setDomContent(this.container,"小于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThenEquals":this.operator="LessThenEquals",URule.setDomContent(this.container,"小于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"StartWith":this.operator="StartWith",URule.setDomContent(this.container,"开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Equals":this.operator="Equals",URule.setDomContent(this.container,"等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EqualsIgnoreCase":this.operator="EqualsIgnoreCase",URule.setDomContent(this.container,"等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotStartWith":this.operator="NotStartWith",URule.setDomContent(this.container,"不开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EndWith":this.operator="EndWith",URule.setDomContent(this.container,"结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEndWith":this.operator="NotEndWith",URule.setDomContent(this.container,"不结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEquals":this.operator="NotEquals",URule.setDomContent(this.container,"不等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEqualsIgnoreCase":this.operator="NotEqualsIgnoreCase",URule.setDomContent(this.container,"不等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"In":this.operator="In",URule.setDomContent(this.container,"在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"NotIn":this.operator="NotIn",URule.setDomContent(this.container,"不在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"Null":this.operator="Null",URule.setDomContent(this.container,"为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"NotNull":this.operator="NotNull",URule.setDomContent(this.container,"不为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"Match":this.operator="Match",URule.setDomContent(this.container,"匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotMatch":this.operator="NotMatch",URule.setDomContent(this.container,"不匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Contain":this.operator="Contain",URule.setDomContent(this.container,"包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break; +case"NotContain":this.operator="NotContain",URule.setDomContent(this.container,"不包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType}window._setDirty()},urule.ComparisonOperator.prototype.getOperator=function(){if(""==this.operator)throw"请选择比较操作符!";return this.operator},urule.ComparisonOperator.prototype.getInputType=function(){return this.inputType},urule.ComparisonOperator.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ComplexArithmetic=function(t){this.container=$(""),this.operator="",this.rule=t,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod"}),this.container.append(this.selectorLabel),this.nextType=null;var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:n},{label:"-",name:"Sub",onClick:n},{label:"x",name:"Mul",onClick:n},{label:"÷",name:"Div",onClick:n},{label:"%",name:"Mod",onClick:n},{label:"删除",onClick:function(){window._setDirty(),e.nextType&&(e.nextType.getContainer().remove(),e.nextType=null,URule.setDomContent(e.selectorLabel,"."),e.selectorLabel.css({color:"#fff","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.ComplexArithmetic.prototype.setOperator=function(t){switch(window._setDirty(),this.operator=t,this.info="",t){case"Add":this.info="+";break;case"Sub":this.info="-";break;case"Mul":this.info="x";break;case"Div":this.info="÷";break;case"Mod":this.info="%"}URule.setDomContent(this.selectorLabel,this.info),this.selectorLabel.css({color:"green","padding-left":"4px","padding-right":"4px"}),this.nextType||(this.nextType=new urule.NextType(this.rule),this.container.append(this.nextType.getContainer()))},urule.ComplexArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.nextType.initData(t)}},urule.ComplexArithmetic.prototype.getDisplayContainer=function(){if(this.nextType){var t=$(""+this.info+"");return t.append(this.nextType.getDisplayContainer()),t}return null},urule.ComplexArithmetic.prototype.toXml=function(){if(!this.nextType)return"";var t='';return t+=this.nextType.toXml(),t+=""},urule.ComplexArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.VariableValue=function(t,e,n,o){this.arithmetic=t,this.container=$("");this.label=generateContainer(),this.functionProperty=o,this.container.append(this.label),this.label.css({color:"darkcyan"}),URule.setDomContent(this.label,"请选择变量"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._VariableValueArray.push(this),this.act=n,this.initMenu()},urule.VariableValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.variableLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.VariableValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.VariableValue.prototype.initMenu=function(t){var e=window._uruleEditorVariableLibraries;if(t&&(e=t),e){var n,o,i,r;n=this,o=function(t){n.setValue({variableCategory:t.label,variables:t.variables})},i=function(t){n.setValue({variables:t.parent.parent.variables,variableCategory:t.parent.parent.label,variableLabel:t.label,variableName:t.name,datatype:t.datatype})},r={menuItems:[]},$.each(e,function(t,e){$.each(e,function(t,e){var a=e.variables;n.functionProperty&&n.category&&e.name==n.category&&n.functionProperty.initMenu(a);var s={label:e.name,variables:a,onClick:o};$.each(a||[],function(t,e){if(s.subMenu||(s.subMenu={menuItems:[]}),n.matchAct(e.act)){var o={name:e.name,label:e.label,datatype:e.type,act:e.act,variables:a,onClick:i};s.subMenu.menuItems.push(o)}}),r.menuItems.push(s)})}),n.menu?n.menu.setConfig(r):n.menu=new URule.menu.Menu(r),this.label.click(function(t){n.menu.show(t)})}},urule.VariableValue.prototype.setValue=function(t){this.category=t.variableCategory,this.variableName=t.variableName,this.variableLabel=t.variableLabel,this.datatype=t.datatype,this.functionProperty&&this.functionProperty.initMenu(t.variables),this.variableLabel?URule.setDomContent(this.label,this.category+"."+this.variableLabel):URule.setDomContent(this.label,this.category),window._setDirty()},urule.VariableValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.VariableValue.prototype.toXml=function(){if(!this.category||""==this.category)throw"变量不能为空!";var t='var-category="'+this.category+'"';return this.variableName&&(t+=' var="'+this.variableName+'" var-label="'+this.variableLabel+'" datatype="'+this.datatype+'"'),t},urule.VariableValue.prototype.getType=function(){return this.variableName?"Variable":"VariableCategory"},urule.VariableValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ResourceListDialog=function(t,e,n){this.type=t,this.select=e,this.doSuccess=n,this.init()},urule.ResourceListDialog.prototype.open=function(){this.initData(),this.dialog.dialog("open")},urule.ResourceListDialog.prototype.close=function(){this.dialog.dialog("close")},urule.ResourceListDialog.prototype.getSelectedFile=function(){var t=!1,e=null,n=this.tree.getSelectedNodes();return n&&n.length>0&&(e=n[0],e.isParent||(t=!0)),t?e.fullPath:(URule.alert("请先选择一个库文件!"),null)},urule.ResourceListDialog.prototype.init=function(){var t=this;this.dialog=$("
    "),this.treeContainer=$("
    "),this.dialog.append(this.treeContainer),this.dialog.dialog({title:"库列表",height:500,width:400,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var e=t.getSelectedFile();e&&t.doSelectFile(e)}},{text:"选择版本",click:function(){var e=t.getSelectedFile();if(e){var n=new urule.ResourceVersionDialog(e);n.open(function(e){t.doSelectFile(e)})}}},{text:"取消",click:function(){$(this).dialog("close")}}]})},urule.ResourceListDialog.prototype.doSelectFile=function(t){var e="jcr:"+t;if(this.doSuccess)return this.doSuccess(this.type,e),void this.dialog.dialog("close");var n=!1;if(this.select.each(function(){$(this.childNodes).each(function(){var t=this.textContent;t==e&&(n=!0)})}),n)URule.alert("当前库文件已被添加!");else{var o=this,i=$(""+e+"");i.click(function(){o.select.find(".active").removeClass("active"),i.addClass("active")}),this.select.append(i),this.dialog.dialog("close")}},urule.ResourceListDialog.prototype.initData=function(){var t=this,e=(uruleServer||"")+"urule?action=loadrepo&filetype="+this.type+"&path="+t.getRequestParameter("file");$.ajax({cache:!1,dataType:"json",url:e,error:function(t,e){URule.alert("加载资源失败:"+e)},success:function(e){t.tree=$.fn.zTree.init(t.treeContainer,{},e)}})},urule.ResourceListDialog.prototype.getRequestParameter=function(t){for(var e=null,n=window.location.search.substring(1).split("&"),o=0;o");var t='';t+="",t+='',t+='',t+='',t+='',t+="
    版本号创建人创建时间
    ",this.table=$(t);var e="urule?action=loadversion&file="+this.path;this.table.bootstrapTable({url:e,onLoadSuccess:function(){n.table.css("margin-top","")}}),this.dialog.append(this.table);var n=this;this.dialog.dialog({title:"版本列表【"+n.path+"】",height:400,width:700,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var t=n.table.bootstrapTable("getSelections");return 0==t.length?void URule.alert("请选择一个版本!"):(n.doSuccess(n.path+":"+t[0].name),void $(this).dialog("close"))}},{text:"取消",click:function(){$(this).dialog("close")}}]})}},function(t,e){"use strict";urule.ConstantValue=function(t,e){this.arithmetic=t,this.container=$(""),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#0174DF"}),this.label.prop("innerText","请选择常量"),t&&this.container.append(t.getContainer()),e&&(this.setValue(e),t.initData(e.arithmetic)),this.initMenu(),window._ConstantValueArray.push(this)},urule.ConstantValue.prototype.setValue=function(t){this.category=t.constantCategory,this.constantName=t.constantName,this.constantLabel=t.constantLabel,URule.setDomContent(this.label,this.category+"."+this.constantLabel),window._setDirty()},urule.ConstantValue.prototype.initMenu=function(t){var e=window._uruleEditorConstantLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({constantCategory:t.parent.parent.label,constantLabel:t.label,constantName:t.name})},i={menuItems:[]},$.each(e,function(t,e){var n=e.categories;$.each(n,function(t,e){var n={label:e.label},r=e.constants;$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.name,label:e.label,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ConstantValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.constantLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ConstantValue.prototype.toXml=function(){if(!this.category)throw"常量不能为空!";var t='const-category="'+this.category+'" const="'+this.constantName+'" const-label="'+this.constantLabel+'"';return t},urule.ConstantValue.prototype.getContainer=function(){return this.container}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigActionDialog=function(t){this.parent=t,this.init()},urule.ConfigActionDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("动作库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ActionLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.actionLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("动作库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.actionLibraries.push(o),window.refreshActionLibraries(),void window._setDirty())}})}}])},urule.ConfigActionDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    动作库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.actionLibraries.indexOf(t);window.actionLibraries.splice(n,1),e.remove(),window.refreshActionLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var i=n(240),r=o(i);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigConstantDialog=function(t){this.parent=t,this.init()},urule.ConfigConstantDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("常量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ConstantLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.constantLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("常量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.constantLibraries.push(o),window.refreshConstantLibraries(),void window._setDirty())}})}}])},urule.ConfigConstantDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    常量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.constantLibraries.indexOf(t);window.constantLibraries.splice(n,1),e.remove(),window.refreshConstantLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigParameterDialog=function(t){this.parent=t,this.init()},urule.ConfigParameterDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("参数库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ParameterLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.parameterLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("参数库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.parameterLibraries.push(o),window.refreshParameterLibraries(),void window._setDirty())}})}}])},urule.ConfigParameterDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    参数库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.parameterLibraries.indexOf(t);window.parameterLibraries.splice(n,1),e.remove(),window.refreshParameterLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigVariableDialog=function(t){this.parent=t,this.init()},urule.ConfigVariableDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("变量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"VariableLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.variableLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("变量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.variableLibraries.push(o),window.refreshVariableLibraries(),void window._setDirty())}})}}])},urule.ConfigVariableDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    变量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.variableLibraries.indexOf(t);window.variableLibraries.splice(n,1),e.remove(),window.refreshVariableLibraries(),window._setDirty()}),e.append(n),e}},function(t,e){"use strict";urule.ActionType=function(t,e){this.uuid=Math.uuid(),t.prop("id",this.uuid),this.rule=e,this.parentContainer=t,this.type="",this.init(),window._ActionTypeArray.push(this),this.initMenu()},urule.ActionType.prototype.toXml=function(){if("execute-function"==this.type){var t="",t+=this.action.getParameter().toXml(),t+=""}return this.action.toXml()},urule.ActionType.prototype.initData=function(t){if(t){var e=t.actionType;this.setAction(e,t)}},urule.ActionType.prototype.init=function(){this.container=generateContainer(),URule.setDomContent(this.container,"请选择动作类型"),this.container.css({color:"green"}),this.parentContainer.append(this.container),this.action=null},urule.ActionType.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction("ExecuteMethod",{beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[{label:"打印内容到控制台",onClick:function(){n.setAction("ConsolePrint")}},{label:"变量赋值",onClick:function(){n.setAction("VariableAssign")}},{label:"执行函数",onClick:function(){n.setAction("ExecuteCommonFunction")}}]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.container.click(function(t){n.menu.show(t)})},urule.ActionType.prototype.initDefaultMenuData=function(){var t=this,e=[];return e.push({name:"打印内容到控制台",fun:function(){t.setAction("ConsolePrint")}}),e.push({name:"变量赋值",fun:function(){t.setAction("VariableAssign")}}),e},urule.ActionType.prototype.setAction=function(t,e){switch(window._setDirty(),this.action&&this.action.getContainer().remove(),t){case"ConsolePrint":this.action=new urule.PrintAction(this.rule),URule.setDomContent(this.container,"输出:"),this.type="console-print";break;case"ExecuteMethod":this.action=new urule.MethodAction(this.rule),URule.setDomContent(this.container,"执行方法:"),this.type="execute-method";break;case"VariableAssign":this.action=new urule.AssignmentAction(this.rule),URule.setDomContent(this.container,"变量赋值:"),this.type="var-assign";break;case"ExecuteCommonFunction":this.action=new urule.FunctionValue(null,null,this.rule),URule.setDomContent(this.container,"执行函数:"),this.type="execute-function"}this.parentContainer.append(this.action.getContainer()),this.action.initData(e)}},function(t,e){"use strict";urule.PrintAction=function(t){this.container=$(""),this.beforeContainer=$(""),URule.setDomContent(this.beforeContainer,""),this.container.append(this.beforeContainer),this.inputType=new urule.InputType(null,null,null,t),this.inputTypeContainer=this.inputType.getContainer(),this.container.append(this.inputTypeContainer),this.afterContainer=$(""),URule.setDomContent(this.afterContainer,""),this.container.append(this.afterContainer)},urule.PrintAction.prototype.initData=function(t){if(t){var e=t.value;e&&this.inputType.setValueType(e.valueType,e)}},urule.PrintAction.prototype.toXml=function(){var t="";return t+=this.inputType.toXml(),t+=""},urule.PrintAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.AssignmentAction=function(t){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"请选择值类型"),this.label.css({color:"blue"}),this.valueContainer=$(""),this.container.append(this.valueContainer),this.leftVariable=new urule.VariableValue(null,null,"Out"),this.leftParameter=new urule.ParameterValue(null,null,"Out"),this.leftReference=new urule.NamedReferenceValue(null,null,t),this.valueContainer.append(this.leftVariable.getContainer()),this.valueContainer.append(this.leftParameter.getContainer()),this.valueContainer.append(this.leftReference.getContainer()),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide();var e=$("");URule.setDomContent(e,"="),e.css({color:"red",fontWeight:"blod"}),this.container.append(e),this.inputType=new urule.InputType(null,null,null,t),this.container.append(this.inputType.getContainer());var n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){n.leftParameter.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftVariable.getContainer().show(),n.type="variable",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}},{label:"选择参数",onClick:function(){n.leftVariable.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftParameter.getContainer().show(),n.type="parameter",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}}]}),this.label.click(function(t){n.menu.show(t)})},urule.AssignmentAction.prototype.initData=function(t){if(t){this.type=t.type,this.type&&"parameter"==this.type?(this.leftParameter.setValue(t),this.leftVariable.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftParameter.getContainer().show()):this.type&&"NamedReference"==this.type?(this.leftReference.initData(t),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().show()):(this.type="variable",this.leftVariable.setValue(t),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftVariable.getContainer().show());var e=t.value;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}URule.setDomContent(this.label,"."),this.label.css({color:"white"})}},urule.AssignmentAction.prototype.toXml=function(){var t="',t+=this.inputType.toXml(),t+=""},urule.AssignmentAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleArithmetic=function(){this.container=$(""),this.selectorLabel=generateContainer(),URule.setDomContent(this.selectorLabel,"."),this.selectorLabel.css({color:"#FFF"}),this.operator="",this.container.append(this.selectorLabel),this.value=null;var t=this,e=function(e){t.setOperator(e.name)};t.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:e},{label:"-",name:"Sub",onClick:e},{label:"x",name:"Mul",onClick:e},{label:"÷",name:"Div",onClick:e},{label:"%",name:"Mod",onClick:e},{label:"删除",onClick:function(){t.value&&(t.value.getContainer().remove(),t.operator=null,t.value=null,URule.setDomContent(t.selectorLabel,"."),t.selectorLabel.css({color:"#FFF","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(e){t.menu.show(e)})},urule.SimpleArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.value.initData(t.value)}},urule.SimpleArithmetic.prototype.setOperator=function(t){window._setDirty(),this.operator=t;var e="";switch(t){case"Add":e="+";break;case"Sub":e="-";break;case"Mul":e="x";break;case"Div":e="÷";break;case"Mod":e="%"}this.selectorLabel.css({color:"green",fontWeight:"blod","padding-left":"5px","padding-right":"5px"}),URule.setDomContent(this.selectorLabel,e),this.value||(this.simpleArithmetic=new urule.SimpleArithmetic,this.value=new urule.SimpleValue(this.simpleArithmetic),this.container.append(this.value.getContainer()))},urule.SimpleArithmetic.prototype.toXml=function(){if(!this.operator||""==this.operator)return"";if(!this.value)throw"请输入具体值!";var t=this.value.getValue();if(""==t)throw"请输入具体值!";var e='';return e+=this.simpleArithmetic.toXml(),e+=""},urule.SimpleArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.RuleProperty=function(t,e,n,o){this.parent=t,this.value=n,this.editorType=o,this.container=$("");var i=$("");this.name=e;var r=this.getLabel();URule.setDomContent(i,r+":"),this.container.append(i);var a=$(""),s=generateContainer();""==n&&(n="无"),s.css({color:"#000"}),URule.setDomContent(s,n),a.append(s),this.container.append(a);var l=null;this.radioName=Math.uuid(15),this.yesRadio=null,this.noRadio=null,1==o?l=$(""):2==o?l=$(""):3==o&&(this.yesRadio=$(" 是 "),this.noRadio=$(" 否"));var A=this;if(3!=o){if(l.blur(function(){A.value=l.prop("value"),l.hide(),""==A.value?URule.setDomContent(s,"无"):URule.setDomContent(s,A.value),s.show(),window._setDirty()}),s.click(function(){s.hide(),l.prop("value",A.value),l.show(),l.focus()}),this.container.append(l),l.hide(),2==o&&"无"!==n){new Date(n);this.value=n,URule.setDomContent(s,this.value)}}else 1==n?this.yesRadio.prop("checked",!0):this.noRadio.prop("checked",!0),this.yesRadio.change(function(){window._setDirty()}),this.noRadio.change(function(){window._setDirty()}),s.hide(),this.container.append(this.yesRadio),this.container.append(this.noRadio);var c=$('');c.click(function(){A.container.remove();var t=A.parent.properties.indexOf(A);A.parent.properties.splice(t,1),window._setDirty()}),this.container.append(c)},urule.RuleProperty.prototype.getLabel=function(){var t="";return"salience"==this.name?t="优先级":"loop"==this.name?t="允许循环触发":"effective-date"==this.name?t="生效日期":"expires-date"==this.name?t="失效日期":"enabled"==this.name?t="是否启用":"debug"==this.name?t="允许调试信息输出":"activation-group"==this.name?t="互斥组":"agenda-group"==this.name?t="执行组":"auto-focus"==this.name?t="自动获取焦点":"ruleflow-group"==this.name&&(t="规则流组"),t},urule.RuleProperty.prototype.toXml=function(){var t=this.name;if(3==this.editorType)t+=this.yesRadio.prop("checked")?'="true"':'="false"';else{if(!this.value||""==this.value)throw"请输入属性"+this.name+"的具体值!";t+='="'+this.value+'"'}return t},urule.RuleProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.Join=function(t){this.type="and",this.context=t,this.H=30,this.W=60,this.children=[],this.joinContainer=$(""),this.joinContainer.css({border:"solid gray 1px",padding:"3px",background:"#fff"}),this.joinLabel=$("并且"),this.joinContainer.append(this.joinLabel)},urule.Join.prototype.initData=function(t){var e=[],n=t.conditions,o=t.joints;if(this.setType(t.type),n&&(e=n),o&&(e=e.concat(o)),0!=e.length)for(var i=0;i'),n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"并且",onClick:function(){n.setType("and")}},{label:"或者",onClick:function(){n.setType("or")}},{label:"添加条件",onClick:function(){n.addItem(!1)}}]}),this.joinContainer.click(function(t){n.menu.show(t)}),this.joinContainer.append(e)},urule.Join.prototype.clean=function(){for(;this.children.length>0;){var t=this.children[0];this.removeConnection(t)}},urule.Join.prototype.removeConnection=function(t){var e=this.children.indexOf(t);this.children.length>1&&this.resetItemPosition(e+1,!1),t.remove(),this.children.splice(e,1),this.resetContainerSize(),window._setDirty()},urule.Join.prototype.addItem=function(t){window._setDirty();var e=this.getChildrenCount();if(e>0&&this.parent){var n=this.parent.getChildren(),o=n.indexOf(this.parentConnection);this.parent.resetItemPosition(o+1,!0)}var i=e*this.H,r=parseInt(this.joinContainer.css("left")),a=parseInt(this.joinContainer.css("top")),s=r+this.W/2,l=a+this.H/5,A=s+this.W-25,c=l+i;t&&(c-=5);var u=new urule.Connection(this.context,t,this);return u.drawPath(s,l,A,c),this.children.push(u),this.resetContainerSize(),u},urule.Join.prototype.toXml=function(){for(var t='',e=0;e0&&this.parent){var r=this.parent.getChildren(),a=r.indexOf(this.parentConnection),s=this.parentConnection.getParentJoin();s.resetItemPosition(a+1,e)}window._setDirty()}},urule.Join.prototype.resetContainerSize=function(){var t=this.context.getCanvas(),e=t.css("height");e=parseInt(e);var n=this.context.getTotalChildrenCount();0==n&&(n=1);var o=n*this.H+10;t.css({height:o+"px"})},urule.Join.prototype.getChildrenCount=function(){for(var t=0,e=0;e"),e=0;e0&&("or"==this.type?t.append($(" 或 ")):t.append($(" 并且 "))),t.append(o))}return t},urule.Join.prototype.getChildren=function(){return this.children},urule.Join.prototype.getContainer=function(){return this.joinContainer}},function(t,e){"use strict";urule.Connection=function(t,e,n){this.isJoin=e,this.context=t,this.parentJoin=n},urule.Connection.prototype.drawPath=function(t,e,n,o){this.startX=t,this.endX=n,this.isJoin?(this.startY=e-3,this.endY=o+2):(this.startY=e-3,this.endY=o-3),this.path=this.context.getPaper().path(this.buildPathInfo()),this.path.attr({stroke:"#777"}),this.isJoin?this.initJoin():this.initCondition(); +},urule.Connection.prototype.toXml=function(){var t="";return t=this.isJoin?this.join.toXml():this.condition.toXml()},urule.Connection.prototype.initJoin=function(){this.join=new urule.Join(this.context),this.join.init(this);var t=this.join.getContainer(),e=this.endX+10+"px",n=this.endY+"px";t.css({position:"absolute",left:e,top:n}),this.context.getCanvas().append(t)},urule.Connection.prototype.getDisplayContainer=function(){return this.join?this.join.getDisplayContainer():this.condition.getDisplayContainer()},urule.Connection.prototype.remove=function(){this.path.remove(),this.join?this.join.getContainer().remove():this.conditionContainer.remove(),window._setDirty()},urule.Connection.prototype.initCondition=function(){this.conditionContainer=$("
    ");var t=this.endX+10+"px",e=this.endY+"px";this.conditionContainer.css({position:"absolute",left:t,top:e}),this.condition=new urule.Condition(this.conditionContainer);var n=$(''),o=this;n.click(function(){o.parentJoin.removeConnection(o)}),this.conditionContainer.append(n),this.context.getCanvas().append(this.conditionContainer)},urule.Connection.prototype.update=function(t){var e=this.buildPathInfo();this.path.attr("path",e);var n=this.endY+"px";this.conditionContainer?this.conditionContainer.css({top:n}):this.join.getContainer().css({top:n}),this.join&&this.join.resetItemPosition(0,t)},urule.Connection.prototype.getParentJoin=function(){return this.parentJoin},urule.Connection.prototype.getCondition=function(){return this.condition},urule.Connection.prototype.getJoin=function(){return this.join},urule.Connection.prototype.getStartX=function(){return this.startX},urule.Connection.prototype.getStartY=function(){return this.startY},urule.Connection.prototype.getEndX=function(){return this.endX},urule.Connection.prototype.getEndY=function(){return this.endY},urule.Connection.prototype.setStartX=function(t){this.startX=t},urule.Connection.prototype.setStartY=function(t){this.startY=t},urule.Connection.prototype.setEndX=function(t){this.endX=t},urule.Connection.prototype.setEndY=function(t){this.endY=t},urule.Connection.prototype.buildPathInfo=function(){var t=10,e=8;return"M"+(this.startX+t)+","+(this.startY+e)+" C"+(this.startX+t)+","+(this.endY+e)+","+(this.startX+t)+","+(this.endY+e)+","+(this.endX+t)+","+(this.endY+e)}},function(t,e){"use strict";urule.InputType=function(t,e,n,o){this.container=$(""),this.label=generateContainer(),this.rule=o,this.container.append(this.label),e?(URule.setDomContent(this.label,e),this.label.css({color:"gray"})):(URule.setDomContent(this.label,"选择值类型"),this.label.css({color:"blue"})),this.functionProperty=n,this.variableValue=null,this.simpleValue=null,this.referenceValue=null,this.methodValue=null,this.constantValue=null,this.functionValue=null,this.dataContainer=$(""),this.container.append(this.dataContainer),this.type="";var i=this,r=function(t){i.setValueType(t.name)};if(i.menu=new URule.menu.Menu({menuItems:[{label:"输入值",name:"Input",onClick:r},{label:"选择变量",name:"Variable",onClick:r},{label:"选择常量",name:"Constant",onClick:r},{label:"选择参数",name:"Parameter",onClick:r}]}),i.menu.menuItems.push({label:"选择方法",name:"Method",onClick:r},{label:"选择函数",name:"CommonFunction",onClick:r}),this.label.click(function(t){i.menu.show(t)}),t){var a=$(""+t+"");this.container.append(a)}},urule.InputType.prototype.getDisplayContainer=function(){var t=$("");return"Input"==this.type?t.append(this.simpleValue.getDisplayContainer()):"Variable"==this.type||"VariableCategory"==this.type?t.append(this.variableValue.getDisplayContainer()):"Constant"==this.type?t.append(this.constantValue.getDisplayContainer()):"Method"==this.type?t.append(this.methodValue.getDisplayContainer()):"Parameter"==this.type?t.append(this.parameterValue.getDisplayContainer()):"CommonFunction"==this.type?t.append(this.functionValue.getDisplayContainer()):"NamedReference"==this.type&&t.append(this.referenceValue.getDisplayContainer()),t},urule.InputType.prototype.setValueType=function(t,e){switch(window._setDirty(),this.type=t,this.variableValue&&this.variableValue.getContainer().hide(),this.constantValue&&this.constantValue.getContainer().hide(),this.simpleValue&&this.simpleValue.getContainer().hide(),this.referenceValue&&this.referenceValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.parameterValue&&this.parameterValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),URule.setDomContent(this.label,"."),this.label.css({color:"#FDFDFD"}),t){case"Input":this.simpleValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.simpleValue=new urule.SimpleValue(this.arithmetic,e),this.dataContainer.append(this.simpleValue.getContainer())),this.simpleValue.getContainer().show(),this.type="Input";break;case"NamedReference":this.referenceValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.referenceValue=new urule.NamedReferenceValue(this.arithmetic,e,this.rule),this.dataContainer.append(this.referenceValue.getContainer())),this.referenceValue.getContainer().show(),this.type="NamedReference";break;case"Constant":this.constantValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.constantValue=new urule.ConstantValue(this.arithmetic,e),this.dataContainer.append(this.constantValue.getContainer())),this.constantValue.getContainer().show(),this.type="Constant";break;case"Method":this.methodValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.methodValue=new urule.MethodValue(this.arithmetic,e,this.dataContainer),this.dataContainer.append(this.methodValue.getContainer())),this.methodValue.getContainer().show(),this.type="Method";break;case"Parameter":this.parameterValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.parameterValue=new urule.ParameterValue(this.arithmetic,e,"In"),this.dataContainer.append(this.parameterValue.getContainer())),this.parameterValue.getContainer().show(),this.type="Parameter";break;case"CommonFunction":this.functionValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.functionValue=new urule.FunctionValue(this.arithmetic,e,"In"),this.dataContainer.append(this.functionValue.getContainer())),this.functionValue.getContainer().show(),this.type="CommonFunction";break;default:this.variableValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.variableValue=new urule.VariableValue(this.arithmetic,e,"In",this.functionProperty),this.dataContainer.append(this.variableValue.getContainer())),this.variableValue.getContainer().show(),this.type="Variable"}},urule.InputType.prototype.toXml=function(){if(""==this.type)return"";var t=""),this.rule=t,this.inputType=null,this.paren=null,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod",color:"#fff"}),this.container.append(this.selectorLabel),URule.setDomContent(this.selectorLabel,".");var e=this,n=function(t){var n=t.name;e.doNext(n),window._setDirty()};e.menu=new URule.menu.Menu({menuItems:[{label:"值",name:"value",onClick:n},{label:"括号",name:"paren",onClick:n}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.NextType.prototype.initData=function(t){var e=t.value,n=e.valueType;"Paren"==n?(this.doNext("paren"),this.paren.initData(e)):(this.doNext("value"),this.inputType.setValueType(n,e))},urule.NextType.prototype.toXml=function(){return this.paren?this.paren.toXml():this.inputType?this.inputType.toXml():""},urule.NextType.prototype.getDisplayContainer=function(){return this.inputType?this.inputType.getDisplayContainer():this.paren?this.paren.getDisplayContainer():null},urule.NextType.prototype.getContainer=function(){return this.container},urule.NextType.prototype.doNext=function(t){"value"==t?(this.paren&&(this.paren.getContainer().remove(),this.paren=null),this.inputType||(this.inputType=new urule.InputType(null,null,null,this.rule),this.container.append(this.inputType.getContainer()))):"paren"==t&&(this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null),this.paren||(this.paren=new urule.Paren(this.rule),this.container.append(this.paren.getContainer())))}},function(t,e){"use strict";urule.Paren=function(t){this.container=$(""),this.leftParen=$("("),this.leftParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.rightParen=$(")"),this.rightParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.parenContainer=$(""),this.container.append(this.leftParen),this.container.append(this.parenContainer),this.container.append(this.rightParen),this.inputType=new urule.InputType(null,null,null,t),this.parenContainer.append(this.inputType.getContainer()),this.arithmetic=new urule.ComplexArithmetic(t),this.container.append(this.arithmetic.getContainer())},urule.Paren.prototype.initData=function(t){var e=t.value,n=e.valueType;this.inputType.setValueType(n,e),this.arithmetic.initData(t.arithmetic)},urule.Paren.prototype.getDisplayContainer=function(){return this.inputType.getDisplayContainer()},urule.Paren.prototype.toXml=function(){if(!this.inputType)throw"请输入括号内容!";var t="";return t+=this.inputType.toXml(),this.arithmetic&&(t+=this.arithmetic.toXml()),t+=""},urule.Paren.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodParameter=function(t){this.inputType=new urule.InputType(null,null,null,t),this.container=this.inputType.getContainer()},urule.MethodParameter.prototype.initData=function(t){if(t&&(this.name=t.name,this.type=t.type,t.value)){var e=t.value;e.valueType&&this.inputType.setValueType(e.valueType,e)}},urule.MethodParameter.prototype.toXml=function(){var t='';return t+=this.inputType.toXml(),t+=""},urule.MethodParameter.prototype.getContainer=function(){return this.container},urule.MethodParameter.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";urule.MethodAction=function(t){this.parameters=[],this.rule=t,this.init()},urule.MethodAction.prototype.init=function(){this.container=$(""),this.nameContainer=$(""),this.container.append(this.nameContainer),this.nameContainer.css({color:"darkblue"})},urule.MethodAction.prototype.initData=function(t){if(t){this.bean=t.beanId,this.name=t.beanLabel,this.method=t.methodName,this.methodLabel=t.methodLabel;var e=t.parameters;if(this.parameterCount=0,e&&(this.parameterCount=e.length),0===this.parameterCount){URule.setDomContent(this.nameContainer,this.methodLabel);var n=$("(无参数)");this.container.append(n)}else URule.setDomContent(this.nameContainer,this.methodLabel+"(");if(0!=this.parameterCount){for(var o=0;o0){var r=$(";");this.container.append(r)}if(this.parameterCount>0){var a=$(" "+i.name+":");this.container.append(a)}var s=new urule.MethodParameter(this.rule);this.parameters.push(s),this.container.append(s.getContainer()),s.initData(i)}this.container.append(")")}}},urule.MethodAction.prototype.toXml=function(){if(!this.name||""==this.name)throw"请选择要执行的方法!";for(var t='',e=0;e"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#6b3db0"}),URule.setDomContent(this.label,"请选择参数"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._ParameterValueArray.push(this),this.act=n,this.initMenu()},urule.ParameterValue.prototype.getDisplayContainer=function(){var t=$("参数."+this.parameterLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ParameterValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.ParameterValue.prototype.initMenu=function(t){var e=window._uruleEditorParameterLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({variableName:t.name,variableLabel:t.label,datatype:t.datatype})},i={menuItems:[]},$.each(e,function(t,e){$.each(e||[],function(t,e){if(n.matchAct(e.act)){var r={name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:o};i.menuItems.push(r)}})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ParameterValue.prototype.setValue=function(t){this.parameterName=t.variableName,this.parameterLabel=t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.label,"参数."+this.parameterLabel),window._setDirty()},urule.ParameterValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.ParameterValue.prototype.toXml=function(){if(!this.parameterLabel||""==this.parameterLabel)throw"参数不能为空!";var t=' var-category="参数" var="'+this.parameterName+'" var-label="'+this.parameterLabel+'" datatype="'+this.datatype+'"';return t},urule.ParameterValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodValue=function(t,e){this.arithmetic=t,this.container=$(""),this.rightParn=$("]"),this.label=generateContainer(),this.fetchLength=!1,this.uppercase=!1,this.lowercase=!1,this.fetchSize=!1,this.container.append(this.label),this.label.css({color:"blue"}),this.actionContainer=$(""),this.container.append(this.actionContainer),URule.setDomContent(this.label,"请选择方法"),t&&this.container.append(t.getContainer()),e&&(this.setAction(e),t.initData(e.arithmetic)),window._ActionTypeArray.push(this),this.initMenu()},urule.MethodValue.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction({beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.MethodValue.prototype.setAction=function(t){window._setDirty(),this.action&&this.action.getContainer().remove(),this.action=new urule.MethodAction,URule.setDomContent(this.label,"["),this.actionContainer.append(this.action.getContainer()),this.actionContainer.append(this.rightParn),this.action.initData(t)},urule.MethodValue.prototype.getDisplayContainer=function(){var t="",e="";this.action&&(t=this.action.name,e=this.action.methodLabel);var n=$(""+e+"");if(this.arithmetic){var o=this.arithmetic.getDisplayContainer();o&&n.append(o)}return n},urule.MethodValue.prototype.toXml=function(){if(!this.action.bean||""==this.action.name)throw"执行方法不能为空!";var t='bean-name="'+this.action.bean+'"';return t+=' bean-label="'+this.action.name+'"',t+=' method-name="'+this.action.method+'"',t+=' method-label="'+this.action.methodLabel+'"'},urule.MethodValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionProperty=function(){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"选择属性"),this.label.css({color:"#004C85"})},urule.FunctionProperty.prototype.toXml=function(){if(!this.variableName)throw"请选择函数属性";var t='property-name="'+this.variableName+'"';return t+=' property-label="'+this.variableLabel+'"'},urule.FunctionProperty.prototype.initMenu=function(t){if(t){var e=this,n=function(t){e.setProperty({name:t.name,label:t.label,datatype:t.type})},o={menuItems:[]};$.each(t,function(t,e){o.menuItems.push({name:e.name,label:e.label,datatype:e.type,onClick:n})}),this.menu=new URule.menu.Menu(o),this.label.click(function(t){e.menu.show(t)})}},urule.FunctionProperty.prototype.setProperty=function(t){window._setDirty(),this.variableName=t.name,this.variableLabel=t.label,URule.setDomContent(this.label,this.variableLabel)},urule.FunctionProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionParameter=function(t){this.container=$(""),this.nameContainer=$(""),this.rule=t,this.container.append(this.nameContainer),this.nameContainer.css({color:"gray"})},urule.FunctionParameter.prototype.initData=function(t){if(t){this.name=t.name,URule.setDomContent(this.nameContainer,this.name+":"),(t.needProperty||t.property)&&(this.functionProperty=new urule.FunctionProperty,this.functionProperty.setProperty({name:t.property,label:t.propertyLabel})),this.inputType=new urule.InputType(null,null,this.functionProperty,this.rule);var e=t.objectParameter;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}this.container.append(this.inputType.getContainer()),this.functionProperty&&(this.container.append($("")),this.container.append($("属性:")),this.container.append(this.functionProperty.getContainer()))}},urule.FunctionParameter.prototype.toXml=function(){if(!this.name)return"";var t="",t+=this.inputType.toXml(),t+=""},urule.FunctionParameter.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionValue=function(t,e,n){this.arithmetic=t,this.container=$(""),this.rule=n,this.leftParn=$("("),this.rightParn=$(")"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#008080"}),this.functionContainer=$(""),this.container.append(this.functionContainer),URule.setDomContent(this.label,"请选择函数"),t&&this.container.append(t.getContainer()),e&&(this.setFunction(e),t&&t.initData(e.arithmetic)),window._FunctionValueArray.push(this),this.initMenu()},urule.FunctionValue.prototype.getDisplayContainer=function(){var t=$(""+this.functionName+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.FunctionValue.prototype.toXml=function(){if(!this.functionLabel)throw"请选择函数";if(!this.functionName)throw"请选择函数";var t=' function-label="'+this.functionLabel+'"';return t+=' function-name="'+this.functionName+'"'},urule.FunctionValue.prototype.initMenu=function(t){var e=window._uruleEditorFunctionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){n.setFunction({parameter:t.parameter,label:t.label,name:t.name})},i={menuItems:[]},$.each(e||[],function(t,e){i.menuItems.push({name:e.name,label:e.label,parameter:e.argument,onClick:o})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.FunctionValue.prototype.initData=function(t){t&&this.setFunction(t)},urule.FunctionValue.prototype.setFunction=function(t){window._setDirty(),this.functionContainer.empty(),URule.setDomContent(this.label,t.label),this.functionContainer.append(this.leftParn),this.functionLabel=t.label,this.functionName=t.name,this.parameter=new urule.FunctionParameter(this.rule),this.parameter.initData(t.parameter),this.functionContainer.append(this.parameter.getContainer()),this.functionContainer.append(this.rightParn)},urule.FunctionValue.prototype.getFirstParameter=function(){return this.firstParameter},urule.FunctionValue.prototype.getParameter=function(){return this.parameter},urule.FunctionValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleValue=function(t,e){var n="请输入值";this.container=$(""),this.valueContainer=generateContainer(),this.valueContainer.css({color:"rgb(180,95,4)"}),this.editor=$('');var o=this;this.container.append(this.valueContainer).append(this.editor),this.editor.blur(function(){o.editor.hide();var t=o.editor.prop("value");""!=t&&URule.setDomContent(o.valueContainer,t),o.valueContainer.show(),$(this).trigger("DOMSubtreeModified"),window._setDirty()}).mousedown(function(t){t.stopPropagation()}).keydown(function(t){t.stopPropagation()}),o.editor.hide(),this.valueContainer.prop("innerText",n),this.valueContainer.click(function(){o.valueContainer.hide();var t=o.container.parent(),e=120;if(t&&t.parent()&&t.parent().parent()){t=t.parent().parent();var n=t.prop("class");n&&"htMiddle htDimmed current"==n&&(e=t.width()-20)}o.editor.css({width:e}),o.editor.css({display:"inline"}),o.editor.focus(),$(this).trigger("DOMSubtreeModified")}),this.arithmetic=t,this.container.append(t.getContainer()),this.initData(e)},urule.SimpleValue.prototype.getDisplayContainer=function(){var t=$(""+this.editor.prop("value")+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.SimpleValue.prototype.initData=function(t){if(t){var e=t.content;URule.setDomContent(this.valueContainer,e),this.editor.prop("value",e),this.arithmetic&&this.arithmetic.initData(t.arithmetic)}},urule.SimpleValue.prototype.getValue=function(){var t=this.editor.prop("value");return t=t.replace(new RegExp("&","gm"),"&"),t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("'","gm"),"'"),t=t.replace(new RegExp('"',"gm"),""")},urule.SimpleValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.Condition=function(t){this.container=$(""),t.append(this.container);var e=this;this.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(this.operator.getContainer())},urule.Condition.prototype.initData=function(t){var e=t.op;this.operator.setOperator(e),this.operator.initRightValue(t.value),this.inputType=this.operator.getInputType(),this.inputType&&this.container.append(this.inputType.getContainer())},urule.Condition.prototype.getDisplayContainer=function(){var t=$(""),e=URule.getDomContent(this.operator.getContainer());return t.append($(""+e+"")),this.inputType&&t.append(this.inputType.getDisplayContainer()),t},urule.Condition.prototype.toXml=function(){var t='';return this.inputType&&(t+=this.inputType.toXml()),t+=""},urule.Condition.prototype.getOperator=function(){return this.operator},urule.Condition.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";window._conditionId=0,urule.CellCondition=function(t){this.container=$(t),this.container.css({height:"40px",position:"relative"});var e=new urule.Context(this.container);this.join=new urule.Join(e),this.join.init(null),this.join.initTopJoin(this.container),this.join.setType("and"),this.id=window._conditionId++},urule.CellCondition.prototype.clean=function(){this.join.clean(),window._setDirty()},urule.CellCondition.prototype.getId=function(){return this.id},urule.CellCondition.prototype.renderTo=function(t){t.append(this.container)},urule.CellCondition.prototype.getDisplayContainer=function(){var t=null;return this.join&&(t=this.join.getDisplayContainer()),t||(t=$("")),t},urule.CellCondition.prototype.initData=function(t){this.join&&this.join.initData(t)},urule.CellCondition.prototype.toXml=function(){return this.join.toXml()}},function(t,e){"use strict";urule.CellContent=function(t){this.container=$(t),this.container.css({height:"40px",width:"100%"}),this.inputType=new urule.InputType(null,"无"),this.container.append(this.inputType.getContainer())},urule.CellContent.prototype.clean=function(t){this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType(null,"无"),this.container.append(this.inputType.getContainer()),window._setDirty()},urule.CellContent.prototype.initData=function(t){this.inputType.setValueType(t.valueType,t)},urule.CellContent.prototype.toXml=function(){return""==this.inputType.type?"":this.inputType.toXml()}},function(t,e){"use strict";urule.CellExecuteMethod=function(t){this.parentContainer=$(t),this.parentContainer.css({height:"40px",width:"100%"}),this.container=generateContainer(),URule.setDomContent(this.container,"无"),this.container.css({color:"gray"}),this.parentContainer.append(this.container),window._ActionTypeArray.push(this),this.initMenu()},urule.CellExecuteMethod.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction({beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.container.click(function(t){n.menu.show(t)})},urule.CellExecuteMethod.prototype.clean=function(){window._setDirty(),this.action&&this.action.getContainer().remove(),URule.setDomContent(this.container,"无"),this.container.css({color:"gray"}),this.action=null},urule.CellExecuteMethod.prototype.setAction=function(t){window._setDirty(),this.action&&this.action.getContainer().remove(),this.action=new urule.MethodAction,URule.setDomContent(this.container,"."),this.container.css({color:"white"}),this.parentContainer.append(this.action.getContainer()),this.action.initData(t)},urule.CellExecuteMethod.prototype.toXml=function(){return this.action?this.action.toXml():""}},function(t,e){"use strict";!function(t){var e=function(e,o,i,r,a,s,l){t.renderers.cellDecorator.apply(this,arguments),!s&&l.placeholder&&(s=l.placeholder);var A,c=ht.getCellData(i,r);if(n(o,c),c)if(c.container=o,A=ht.getCellContent(c),A instanceof urule.CellCondition){$(o).empty();var u=A.getDisplayContainer();$(o).append($("
    ").append(u))}else A instanceof urule.CellContent},n=function(t,e){if(e){var n=e.rowspan;t.style.display="table-cell",n>1?t.setAttribute("rowspan",n):t.removeAttribute("rowspan")}else t.style.display="none",t.removeAttribute("rowspan"),t.removeAttribute("colspan")};t.renderers.URuleRenderer=e,t.renderers.registerRenderer("urule",e)}(Handsontable),function(){Handsontable.URuleCell={editor:Handsontable.editors.TextEditor,renderer:Handsontable.renderers.URuleRenderer},Handsontable.cellTypes.urule=Handsontable.URuleCell}()},function(t,e){"use strict";!function(t){function e(){function e(t){A=this,a=t;var e=this.view.wt.wtTable.getCoords(t).col;if(e>=0){s=e;var n=a.getBoundingClientRect();g=n.left-6,d=parseInt(n.width,10),h.style.top=n.top+"px",h.style.left=g+d+"px",A.rootElement[0].appendChild(h)}}function n(){h.style.left=g+l+"px"}function o(){var e=this;t.Dom.addClass(h,"active"),t.Dom.addClass(p,"active"),p.style.top=h.style.top,p.style.left=h.style.left,p.style.height=e.view.maximumVisibleElementHeight(0)+"px",e.rootElement[0].appendChild(p)}function i(){p.style.left=h.style.left}function r(){t.Dom.removeClass(h,"active"),t.Dom.removeClass(p,"active")}var a,s,l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=$(window);h.className="manualColumnResizer",p.className="manualColumnResizerGuide";var M=function(){var e=this;t.hooks.run(e,"persistentStateSave","manualColumnWidths",e.manualColumnWidths)},w=function(){var e=this,n={};return t.hooks.run(e,"persistentStateLoad","manualColumnWidths",n),n.value},T=function(){var A,g=this,h=0,p=null;g.rootElement.on("mouseenter.manualColumnResize."+g.guid,"table thead tr > th",function(t){A||e.call(g,t.currentTarget)}),g.rootElement.on("mousedown.manualColumnResize."+g.guid,".manualColumnResizer",function(e){o.call(g),A=g,null==p&&(p=setTimeout(function(){h>=2&&(c=g.determineColumnWidth.call(g,s),I(s,c),g.forceFullRender=!0,g.view.render(),t.hooks.run(g,"afterColumnResize",s,c)),h=0,p=null},500),g._registerTimeout(p)),h++,u=e.pageX,c=d}),f.on("mousemove.manualColumnResize."+g.guid,function(t){A&&(l=d+(t.pageX-u),c=I(s,l),n(),i())}),f.on("mouseup.manualColumnResize."+g.guid,function(){A&&(r(),A=!1,c!=d&&(t.hooks.run(g,"beforeColumnResize",s,c),g.forceFullRender=!0,g.view.render(),M.call(g),t.hooks.run(g,"afterColumnResize",s,c)),e.call(g,a))}),g.addHook("afterDestroy",C)},C=function(){var t=this;t.rootElement.off("mouseenter.manualColumnResize."+t.guid,"table thead tr > th"),t.rootElement.off("mousedown.manualColumnResize."+t.guid,".manualColumnResizer"),f.off("mousemove.manualColumnResize."+t.guid),f.off("mouseup.manualColumnResize."+t.guid)};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnResize;if(n){var o=this.getSettings().manualColumnResize,i=w.call(e);"undefined"!=typeof i?this.manualColumnWidths=i:o instanceof Array?this.manualColumnWidths=o:this.manualColumnWidths=[],"afterInit"==t&&(T.call(this),this.manualColumnWidths.length>0&&(this.forceFullRender=!0,this.render()))}else C.call(this),this.manualColumnWidths=[]};var I=function(e,n){return n=Math.max(n,20),e=t.hooks.execute(A,"modifyCol",e),A.manualColumnWidths[e]=n,n};this.modifyColWidth=function(t,e){return e=this.runHooksAndReturn("modifyCol",e),this.getSettings().manualColumnResize&&this.manualColumnWidths[e]?this.manualColumnWidths[e]:t}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterInit",function(){n.init.call(this,"afterInit")}),t.hooks.add("afterUpdateSettings",function(){n.init.call(this,"afterUpdateSettings")}),t.hooks.add("modifyColWidth",n.modifyColWidth),t.hooks.register("afterColumnResize"),t.hooks.register("beforeColumnResize")}(Handsontable)},function(t,e){"use strict";!function(t){function e(){function e(t){A=this,a=t;var e=this.view.wt.wtTable.getCoords(t).row;if(e>=0){s=e;var n=a.getBoundingClientRect();g=n.top-6,d=parseInt(n.height,10),h.style.left=n.left+"px",h.style.top=g+d+"px",A.rootElement[0].appendChild(h)}}function n(){h.style.top=g+l+"px"}function o(){var e=this;t.Dom.addClass(h,"active"),t.Dom.addClass(p,"active"),p.style.top=h.style.top,p.style.left=h.style.left,p.style.width=e.view.maximumVisibleElementWidth(0)+"px",e.rootElement[0].appendChild(p); +}function i(){p.style.top=h.style.top}function r(){t.Dom.removeClass(h,"active"),t.Dom.removeClass(p,"active")}var a,s,l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=$(window);h.className="manualRowResizer",p.className="manualRowResizerGuide";var M=function(){var e=this;t.hooks.run(e,"persistentStateSave","manualRowHeights",e.manualRowHeights)},w=function(){var e=this,n={};return t.hooks.run(e,"persistentStateLoad","manualRowHeights",n),n.value},T=function(){var A,g=this,h=0,p=null;g.rootElement.on("mouseenter.manualRowResize."+g.guid,"table tbody tr > th",function(t){A||e.call(g,t.currentTarget)}),g.rootElement.on("mousedown.manualRowResize."+g.guid,".manualRowResizer",function(e){o.call(g),A=g,null==p&&(p=setTimeout(function(){h>=2&&(I(s,null),g.forceFullRender=!0,g.view.render(),t.hooks.run(g,"afterRowResize",s,c)),h=0,p=null},500),g._registerTimeout(p)),h++,u=e.pageY,c=d}),f.on("mousemove.manualRowResize."+g.guid,function(t){A&&(l=d+(t.pageY-u),c=I(s,l),n(),i())}),f.on("mouseup.manualRowResize."+g.guid,function(){A&&(r(),A=!1,c!=d&&(t.hooks.run(g,"beforeRowResize",s,c),g.forceFullRender=!0,g.view.render(),M.call(g),t.hooks.run(g,"afterRowResize",s,c)),e.call(g,a))}),g.addHook("afterDestroy",C)},C=function(){var t=this;t.rootElement.off("mouseenter.manualRowResize."+t.guid,"table tbody tr > th"),t.rootElement.off("mousedown.manualRowResize."+t.guid,".manualRowResizer"),f.off("mousemove.manualRowResize."+t.guid),f.off("mouseup.manualRowResize."+t.guid)};this.beforeInit=function(){this.manualRowHeights=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualRowResize;if(n){var o=this.getSettings().manualRowResize,i=w.call(e);"undefined"!=typeof i?this.manualRowHeights=i:o instanceof Array?this.manualRowHeights=o:this.manualRowHeights=[],"afterInit"===t?(T.call(this),this.manualRowHeights.length>0&&(this.forceFullRender=!0,this.render())):(this.forceFullRender=!0,this.render())}else C.call(this),this.manualRowHeights=[]};var I=function(e,n){return e=t.hooks.execute(A,"modifyRow",e),A.manualRowHeights[e]=n,n};this.modifyRowHeight=function(t,e){return this.getSettings().manualRowResize&&(e=this.runHooksAndReturn("modifyRow",e),void 0!==this.manualRowHeights[e])?this.manualRowHeights[e]:t}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterInit",function(){n.init.call(this,"afterInit")}),t.hooks.add("afterUpdateSettings",function(){n.init.call(this,"afterUpdateSettings")}),t.hooks.add("modifyRowHeight",n.modifyRowHeight),t.hooks.register("afterRowResize"),t.hooks.register("beforeRowResize")}(Handsontable)},function(t,e,n){"use strict";var o=n(241);urule.Rule=function(t,e,n){this.uuid=Math.uuid(),this.namedMap=new Map,this.namedReferenceValues=[],e.prop("id",this.uuid),this.parent=t,this.container=e,this.data=n,this.actions=[],this.elseActions=[],this.properties=[],this.init(),this.initData()},urule.Rule.prototype.init=function(){this.ruleContainer=$("
    "),this.container.append(this.ruleContainer),this.initRemark(),this.initHeader(),this.initIf(),this.initThen(),this.initElse()},urule.Rule.prototype.initData=function(){if(this.data){this.name=this.data.name,this.nameLabel.prop("innerText",this.name);var t=this.data.salience;t&&this.addProperty(new urule.RuleProperty(this,"salience",t,1));var e=this.data.loop;null!=e&&this.addProperty(new urule.RuleProperty(this,"loop",e,3));var n=this.data.effectiveDate;n&&this.addProperty(new urule.RuleProperty(this,"effective-date",n,2));var o=this.data.expiresDate;o&&this.addProperty(new urule.RuleProperty(this,"expires-date",o,2));var i=this.data.enabled;null!=i&&this.addProperty(new urule.RuleProperty(this,"enabled",i,3));var r=this.data.debug;null!=r&&this.addProperty(new urule.RuleProperty(this,"debug",r,3));var a=this.data.activationGroup;a&&this.addProperty(new urule.RuleProperty(this,"activation-group",a,1));var s=this.data.agendaGroup;s&&this.addProperty(new urule.RuleProperty(this,"agenda-group",s,1));var l=this.data.autoFocus;null!=l&&this.addProperty(new urule.RuleProperty(this,"auto-focus",l,3));var A=this.data.ruleflowGroup;A&&this.addProperty(new urule.RuleProperty(this,"ruleflow-group",l,1));var c=this.data.remark;this.remark.setData(c);var u=this.data.lhs;if(u){var d=u.criterion;d?this.initCriterion(d):this.initCriterion()}else this.initCriterion();var g=this.data.rhs;if(g){var h=g.actions;if(h)for(var p=0;p
    ");this.remark=new Remark(t),this.ruleContainer.append(t)},urule.Rule.prototype.initHeader=function(){this.nameContainer=$("
    "),this.ruleContainer.append(this.nameContainer),this.label=$("规则 "),this.nameContainer.append(this.label),this.nameEditor=$("").hide(),this.name="rule",this.nameLabel=$(""+this.name+""),this.label.append(this.nameEditor),this.label.append(this.nameLabel);var t=this;this.nameLabel.click(function(){t.nameLabel.hide(),t.nameEditor.show(),t.nameEditor.prop("value",t.name),t.nameEditor.focus()}),this.nameEditor.blur(function(){var e=t.nameEditor.prop("value");return!e||e.length<2?void bootbox.alert("规则名不合法"):(t.name=e,t.nameEditor.hide(),t.nameLabel.show(),URule.setDomContent(t.nameLabel,t.name),void window._setDirty())}),this.nameEditor.hide();var e=$('');e.click(function(){var e="真的要删除规则"+t.name+"?";o.MsgBox.confirm(e,function(){var e=t.parent.rules.indexOf(t);t.parent.rules.splice(e,1),t.container.remove(),window._setDirty()})}),this.nameContainer.append(e),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var n=$("添加属性"),i=function(e){var n=new urule.RuleProperty(t,e.name,e.defaultValue,e.editorType);t.addProperty(n)};t.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:i},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:i},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:i},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:i},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:i},{label:"互斥组",name:"activation-group",defaultValue:"",editorType:1,onClick:i},{label:"执行组",name:"agenda-group",defaultValue:"",editorType:1,onClick:i},{label:"自动获取焦点",name:"auto-focus",defaultValue:!0,editorType:3,onClick:i},{label:"允许循环触发",name:"loop",defaultValue:!1,editorType:3,onClick:i}]}),n.click(function(e){t.menu.show(e)}),this.ruleContainer.append(n),this.ruleContainer.append(this.propertyContainer)},urule.Rule.prototype.initIf=function(){this.ifLabel=$("
    如果
    "),this.ruleContainer.append(this.ifLabel),this.conditionContainer=$("
    "),this.conditionContainer.css({height:"40px",position:"relative"}),this.ruleContainer.append(this.conditionContainer)},urule.Rule.prototype.initThen=function(){this.thenLabel=$("那么"),this.ruleContainer.append(this.thenLabel),this.actionContainer=$("
    "),this.ruleContainer.append(this.actionContainer);var t=this;this.actionContainer.sortable({delay:200,update:function(e,n){var o=t.actionContainer.children("div");o.each(function(e,n){var o=$(n),i=o.prop("id"),r=t.actions,a=null,s=!0,l=!1,A=void 0;try{for(var c,u=r[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;if(d.uuid===i){a=d;break}}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}if(a){var g=r.indexOf(a);r.splice(g,1),r.splice(e,0,a)}}),window._setDirty()}}),this.addActionButton=$("添加动作");var e=this;this.addActionButton.click(function(){e.addAction()}),this.thenLabel.append(this.addActionButton)},urule.Rule.prototype.initElse=function(){this.elseContainer=$("
    "),this.ruleContainer.append(this.elseContainer),this.elseLabel=$("否则"),this.elseContainer.append(this.elseLabel),this.elseActionContainer=$("
    "),this.elseContainer.append(this.elseActionContainer);var t=this;this.elseActionContainer.sortable({delay:200,update:function(e,n){var o=t.elseActionContainer.children("div");o.each(function(e,n){var o=$(n),i=o.prop("id"),r=t.elseActions,a=null,s=!0,l=!1,A=void 0;try{for(var c,u=r[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;if(d.uuid===i){a=d;break}}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}if(a){var g=r.indexOf(a);r.splice(g,1),r.splice(e,0,a)}}),window._setDirty()}}),this.addElseActionButton=$("添加动作");var e=this;this.addElseActionButton.click(function(){e.addAction(null,!0)}),this.elseLabel.append(this.addElseActionButton)},urule.Rule.prototype.addAction=function(t,e){var n=this,o=$("
    "),i=$('');o.append(i);var r=null;r=e?new urule.ActionType(o):new urule.ActionType(o,this),i.click(function(){if(e){var t=n.elseActions.indexOf(r);n.elseActions.splice(t,1)}else{var t=n.actions.indexOf(r);n.actions.splice(t,1)}o.remove(),window._setDirty()}),e?(this.elseActions.push(r),this.elseActionContainer.append(o)):(this.actions.push(r),this.actionContainer.append(o)),t&&r.initData(t),window._setDirty()},urule.Rule.prototype.toXml=function(){for(var t='",t+=this.join.toXml(),t+="",t+="";for(var e=0;e",t+="";for(var e=0;e *保存"),$("#saveButton").removeClass("disabled"),$("#saveButtonNewVersion").html(" *保存新版本"),$("#saveButtonNewVersion").removeClass("disabled"))},function(t){window.URule||(window.URule={}),URule.DecisionTable=function(t){function e(t){if($("#saveButton").hasClass("disabled"))return!1;var e=(0,i.getParameter)("file"),n=r.toXml(),o={content:n,file:e,newVersion:t},a=window._server+"/common/saveFile";t?bootbox.prompt("请输入新版本描述.",function(t){t&&(o.versionComment=t,(0,i.ajaxSave)(a,o,function(){r.resetState()}))}):(0,i.ajaxSave)(a,o,function(){r.resetState()})}var n;window._VariableValueArray.push(this),window._ParameterValueArray.push(this);var o=$("#"+t);this.hasMod=!0,this.container=o;var r=this,a='',s='',l='',A='";o.append(A);var c=$("
    ");o.append(c),this.remark=new Remark(c),this.properties=[];var u=$("
    ");o.append(u),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var d=$("");u.append(d),u.append(this.propertyContainer);var g=function(t){var e=new urule.RuleProperty(r,t.name,t.defaultValue,t.editorType);r.addProperty(e)};r.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:g},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:g},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:g},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:g},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:g}]}),d.click(function(t){r.menu.show(t)}),$("#addCriteriaButton").click(function(){var t=r.getCurrentCellData(),e=t.row+t.rowspan,n=t.col;r.mergeRange(n-1),r.translateRow(e),r.createRowData(e),r.createCellDataRange(e,e,n,r.getLastColIndex()),r.insertRow(e-1),r.renderCells(),r.setDirty(),$("#deleteCriteriaButton").removeClass("disabled"),r.invoke("render")}),$("#deleteCriteriaButton").click(function(){var t=r.getHighlight(),e=t.row,n=t.col,o=r.getCellData(e,n),i=o.rowspan;r.mergeRange(n-1,-i),r.removeRowDataRange(e,i),r.removeCellDataRange(e,e+i-1,n,r.getLastColIndex()),r.translateRow(e+i,-i),r.removeRow(e,i),r.renderCells(),r.setDirty(),r.invoke("render"),1==r.countRows()&&$(this).addClass("disabled")}),$("#configVarButton").click(function(){r.configVarDialog||(r.configVarDialog=new urule.ConfigVariableDialog(r)),r.configVarDialog.open()}),$("#configConstantsButton").click(function(){r.configConstantDialog||(r.configConstantDialog=new urule.ConfigConstantDialog(r)),r.configConstantDialog.open()}),$("#configActionButton").click(function(){r.configActionDialog||(r.configActionDialog=new urule.ConfigActionDialog(r)),r.configActionDialog.open()}),$("#configParameterButton").click(function(){r.configParameterDialog||(r.configParameterDialog=new urule.ConfigParameterDialog(r)),r.configParameterDialog.open()}),$("#saveButton").click(function(){e(!1)}),$("#saveButtonNewVersion").click(function(){e(!0)}),r.load(),window.ht=r;var h={type:"urule",manualRowResize:!0,manualColumnResize:!0,autoWrapCol:!0,startCols:r.getColDatas().length,maxRows:2147483647,startRows:r.getRowDatas().length,fillHandle:!1,multiSelect:!1,className:"htMiddle",rowHeaders:!0,maxCols:2147483647,mergeCells:!0,autoWrapRow:!0,outsideClickDeselects:!1,colWidths:120};n=$("
    "),o.append(n),n.handsontable(h),r._handsontable=n.handsontable("getInstance"),r._handsontable.ht=r,h.colHeaders=function(t){var e,n,o=r.getColData(t),i=o.type,a="parameter"==o.variableCategory?"参数":o.variableCategory,s=o.variableLabel,l=o.width,A=a+"."+s;return r.setColWidth(t,l),a&&s||(A=""),"Criteria"==i?(n="glyphicon glyphicon-filter",e="glyphicon glyphicon-filter"):"ExecuteMethod"==i?(A="执行方法",n="glyphicon glyphicon-flash"):"Assignment"==i?n="glyphicon glyphicon-tasks":"ConsolePrint"==i&&(A="控制台输出",n="glyphicon glyphicon-print")," "+A},h.rowHeaders=function(t){var e=r.getRowData(t),n=e.height;return r.setRowHeight(t,n),t+1},h.cells=function(t,e,n){return{readOnly:!0}},r.updateSettings(h),r.renderCells(),r.addHook("afterSelectionEnd",function(){var t=r.getCurrentColData();r.getCurrentRowData(),r.getCurrentCellData();"Criteria"==t.type?$("#addCriteriaButton").removeClass("disabled"):$("#addCriteriaButton").addClass("disabled")}),r.addHook("beforeColumnResize",function(t,e){var n=r.getColData(t);n.width=e,r.setDirty(),r.invoke("render")}),r.addHook("beforeRowResize",function(t,e){var n=r.getRowData(t);n.height=e,r.setDirty()}),r.addHook("afterRender",function(){$(".htCore tr").each(function(){$(this).children().css({"border-right-width":""}),$(this).children().eq(r.countCriteriaCols()).css({"border-right-width":"4px"})})}),r.initMenu(),r.resetState(),n.find(".handsontable").remove(),r.invoke("render")},URule.DecisionTable.prototype={addProperty:function(t){this.propertyContainer.append(t.getContainer()),this.properties.push(t),window._setDirty()},updateSettings:function(t){this._handsontable.updateSettings(t)},getCellRenderer:function(t){return this._handsontable.getCellRenderer(t)},getValue:function(){return this._handsontable.getValue()},alter:function(t,e,n,o){this._handsontable.alter(t,e,n,o)},getCell:function(t,e){return this._handsontable.getCell(t,e)},getCellMeta:function(t,e){return this._handsontable.getCellMeta(t,e)},selectCell:function(t,e,n,o,i){this._handsontable.selectCell(t,e,n,o,i)},deselectCell:function(){this._handsontable.deselectCell()},getSelected:function(){return this._handsontable.getSelected()},getSelectedRange:function(){return this._handsontable.getSelectedRange()},getMergeInfo:function(t,e){return this._handsontable.mergeCells.mergedCellInfoCollection.getInfo(t,e)},setMergeInfo:function(t){this._handsontable.mergeCells.mergedCellInfoCollection.setInfo(t)},removeMergeInfo:function(t,e){return this._handsontable.mergeCells.mergedCellInfoCollection.removeInfo(t,e)},clear:function(){this._handsontable.clear()},countRows:function(){return this._handsontable.countRows()},countCols:function(){return this._handsontable.countCols()},colToProp:function(t){return this._handsontable.colToProp()},getRowHeader:function(t){return this._handsontable.getRowHeader(t)},getColHeader:function(t){return this._handsontable.getColHeader(t)},getColWidth:function(t){return this._handsontable.getColWidth()},getRowHeight:function(t){return this._handsontable.getRowHeight()},propToCol:function(t){return this._handsontable.propToCol(t)},addHook:function(t,e){this._handsontable.addHook(t,e)},invoke:function(t,e){"render"==t?e===!0?(this._handsontable.forceFullRender=!1,this._handsontable.view.render()):this._handsontable.render():jQuery(this._dom).handsontable(t,e)},getInstance:function(){return this._handsontable},setDirty:function(){window._setDirty()},resetState:function(){window._dirty=!1,$("#saveButton").html(" 保存"),$("#saveButton").addClass("disabled"),$("#saveButtonNewVersion").html(" 保存新版本"),$("#saveButtonNewVersion").addClass("disabled")},insertRow:function(t){this.alter("insert_row"),$(".htCore > tbody > tr:eq("+this.getLastRowIndex()+")").insertAfter(".htCore > tbody > tr:eq("+t+")")},removeRow:function(t,e){for(var n=t;n tbody > tr:eq("+t+")").insertAfter(".htCore > tbody > tr:last");this.alter("remove_row",t,e)},insertCol:function(t){this.alter("insert_col"),$(".htCore > tbody > tr").each(function(){$(this).find("td:last").insertAfter($(this).find("td:eq("+t+")"))})},removeCol:function(t){$(".htCore > tbody > tr").each(function(){$(this).find("td:eq("+t+")").insertAfter($(this).find("td:last"))}),this.alter("remove_col")},renderSelection:function(){var t=this.getSelectedRange();if(t)for(var e=t.getTopLeftCorner(),n=t.getBottomRightCorner(),o=e.row;o<=n.row;o++)for(var i=e.col;i<=n.col;i++)this.renderCell(o,i)},getTableData:function(){return this.decisionTable},getCurrentCellData:function(){var t=this.getHighlight(),e=t.row,n=t.col;return this.getCellData(e,n)},getCurrentRowData:function(){var t=this.getHighlight(),e=t.row;return this.getRowData(e)},getCurrentColData:function(){var t=this.getHighlight(),e=t.col;return this.getColData(e)},getCellDatas:function(){var t=this.decisionTable.cellMap;if(!this.decisionTable.cells&&t){this.decisionTable.cells=[];for(var e in t)this.decisionTable.cells.push(t[e])}return this.decisionTable.cells},getRowDatas:function(){return this.decisionTable.rows||[]},getColDatas:function(){return this.decisionTable.columns||[]},getColData:function(t){for(var e=this.getColDatas(),n=0;n0){for(var n=this.getLastRowIndex();n>=t;n--)this.translateRowHeader(n,e);for(var n=this.getLastRowIndex();n>=t;n--)for(var o=0;o0){for(var n=this.getLastColIndex();n>=t;n--)this.translateColHeader(n,e);for(var o=0;o=t;n--)this.translateCell(o,n,0,e)}else if(e<0){for(var n=t;n"),n.joint&&n.cellContent.initData(n.joint)):"Assignment"==r?(n.cellContent=new urule.CellContent(a),n.value&&n.cellContent.initData(n.value)):"ConsolePrint"==r?(n.cellContent=new urule.CellContent(a),n.value&&n.cellContent.initData(n.value)):"ExecuteMethod"==r&&(n.cellContent=new urule.CellExecuteMethod(a),n.action&&n.cellContent.setAction(n.action)),n.cellContent.initData}return n.cellContent},countCriteriaCols:function(){for(var t=this.getColDatas(),e=0,n=0;n':"Constant"==o?t+='':"Action"==o?t+='':"Parameter"==o&&(t+='')}),$.each(n,function(e,n){t+='',t+=a.getCellContent(n).toXml(),t+=""}),$.each(o,function(e,n){t+=''}),$.each(i,function(e,n){var o=n.variableName;t+=o?'':''}),t+=""},load:function(t){var e,n,o,r;o=this,e=(0,i.getParameter)("file"),n=(0,i.getParameter)("version"),r=window._server+"/common/loadXml",$.ajax({url:r,async:!1,type:"POST",data:{files:e},error:function(t){t&&t.responseText?bootbox.alert("加载文件失败:"+t.responseText+""):bootbox.alert("加载文件失败,服务端出错")},success:function(e){var n=e[0];o.remark.setData(n.remark);var i=n.salience;i&&o.addProperty(new urule.RuleProperty(o,"salience",i,1));var r=n.loop;null!=r&&o.addProperty(new urule.RuleProperty(o,"loop",r,3));var a=n.effectiveDate;a&&o.addProperty(new urule.RuleProperty(o,"effective-date",a,2));var s=n.expiresDate;s&&o.addProperty(new urule.RuleProperty(o,"expires-date",s,2));var l=n.enabled;null!=l&&o.addProperty(new urule.RuleProperty(o,"enabled",l,3));var A=n.debug;null!=A&&o.addProperty(new urule.RuleProperty(o,"debug",A,3));var c=n.libraries||[];$.each(c,function(t,e){var n,o;switch(n=e.type,o=e.path,n){case"Constant":constantLibraries.push(o);break;case"Action":actionLibraries.push(o);break;case"Variable":variableLibraries.push(o);break;case"Parameter":parameterLibraries.push(o)}}),o.decisionTable=n,refreshActionLibraries(),refreshConstantLibraries(),refreshVariableLibraries(),refreshParameterLibraries(),refreshFunctionLibraries(),t&&t()}})},initMenu:function(){var t=this,e=[],n=window._uruleEditorVariableLibraries||[];$.each(n,function(t,n){"parameter"!=n.type&&e.push(n)});var o=window._uruleEditorParameterLibraries||[];o.length>0&&$.each(o,function(t,n){e.push([{name:"参数",type:"parameter",variables:o.length?n:[]}])});var i=function(e,n,o){var i=t.getHighlight(),r=(i.row,i.col+(o||0));t.translateCol(r);var a=t.createColData(r);a.type=e,a.width=n||200,"Criteria"==e?t.createCellDataByCopyNextCol(r):t.createCellDataRange(0,t.getLastRowIndex(),r,r),t.insertCol(r-1),t.renderCells(null,r),t.setDirty(),t.invoke("render")},r=function(){var e=t.countActionCols(),n=t.countCriteriaCols(),o=this.getMenuItem("delete");o&&("删除动作列"==o.label?1==e?o.hide():o.show():1==n?o.hide():o.show())},s=[{label:"插入条件列",icon:"glyphicon glyphicon-filter",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){i("Criteria",120)}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){i("Criteria",120,1)}}]}},{label:"删除条件列",icon:"glyphicon glyphicon-minus-sign",name:"delete",onClick:function(){var e=t.getHighlight(),n=e.col;t.removeCellDataRange(0,t.getLastRowIndex(),n,n),t.removeColData(n),t.translateCol(n,-1),t.removeCol(n),t.setDirty(),t.invoke("render")}},{label:"插入执行方法动作列",icon:"glyphicon glyphicon-flash",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){i("ExecuteMethod")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){i("ExecuteMethod",200,1)}}]}},{label:"插入变量赋值动作列",icon:"glyphicon glyphicon-tasks",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){i("Assignment")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){i("Assignment",200,1)}}]}},{label:"插入控制台输出动作列",icon:"glyphicon glyphicon-print",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){i("ConsolePrint")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){i("ConsolePrint",200,1)}}]}},{label:"删除动作列",name:"delete",icon:"glyphicon glyphicon-minus-sign",onClick:function(){var e=t.getHighlight(),n=e.col;t.removeColData(n),t.removeCellDataRange(0,t.getLastRowIndex(),n,n),t.translateCol(n,-1),t.removeCol(n),t.setDirty(),t.invoke("render")}},{label:"配置条件",icon:"glyphicon glyphicon-cog",onClick:function(){var e=t.getCurrentColData();if(!e.variableCategory)return void a.MsgBox.alert("当前条件列未定义对应的参数或变量,不能进行[配置条件]操作.");var n=$("
    "),o=t.getCurrentCellData(),i=t.getCellContent(o);i.renderTo(n);var r="parameter"===e.variableCategory?"参数":e.variableCategory,s=r+"."+e.variableLabel;a.MsgBox.showDialog(s,n,[],[{name:"hide.bs.modal",callback:function(){t.renderSelection()}}],!0)}},{label:"清空",icon:"glyphicon glyphicon-trash",name:"clean",onClick:function(){var e=t.getCurrentCellData(); +a.MsgBox.confirm("确定要清空当前单元格吗?",function(){t.getCellContent(e).clean(),t.renderSelection()})}}],l=function(e){var n=t.getHighlight(),o=(n.row,n.col),i=e.parent.parent,r=t.getColData(o);r.variableCategory="参数"==i.label?"parameter":i.label,r.variableLabel=e.label,r.variableName=e.name,r.datatype=e.datatype,t.setDirty(),t.invoke("render")},A=[];$.each(e,function(t,e){$.each(e,function(t,e){var n={label:"parameter"==e.name?"参数":e.name,icon:"parameter"==e.type?"glyphicon glyphicon-th-list":"glyphicon glyphicon-tasks"},o=e.variables;$.each(o||[],function(t,e){n.subMenu||(n.subMenu={menuItems:[]});var o={icon:"glyphicon glyphicon-tasks",name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:l};n.subMenu.menuItems.push(o)}),A.push(n)})});var c={onShow:r,menuItems:[]};c.menuItems.push(s[0]),c.menuItems.push(s[1]),c.menuItems=c.menuItems.concat(A);var u={onShow:r,menuItems:[]},d={onShow:r};u.menuItems.push(s[2]),u.menuItems.push(s[3]),u.menuItems.push(s[4]),u.menuItems.push(s[5]),d.menuItems=u.menuItems,d.menuItems=d.menuItems.concat(A);var g={menuItems:[s[6],s[7]]},h={menuItems:[s[7]]};t.criteriaMenu?t.criteriaMenu.setConfig(c):t.criteriaMenu=new URule.menu.Menu(c),t.assignmentMenu?t.assignmentMenu.setConfig(d):t.assignmentMenu=new URule.menu.Menu(d),t.actionMenu?t.actionMenu.setConfig(u):t.actionMenu=new URule.menu.Menu(u),t.criteriaCellMenu?t.criteriaCellMenu.setConfig(g):t.criteriaCellMenu=new URule.menu.Menu(g),t.actionCellMenu?t.actionCellMenu.setConfig(h):t.actionCellMenu=new URule.menu.Menu(h),this.container.contextmenu(function(e){for(var n=$(e.target),o=0;o<50&&!n.is("th")&&!n.is("tr");o++)n=n.parent();if(n.is("th")||n.is("tr")){var i=n.has("span.colHeader .glyphicon-filter").length,r=n.has("span.colHeader .glyphicon-tasks").length,a=n.has("span.colHeader").length,s=(n.has("span.rowHeader").length&&$.trim(n.has(".rowHeader").text()),n.has("td").length),l=(t.getCurrentColData(),t.getHighlight()),A=l.col,c=t.countCriteriaCols();s&&t.hasMod?c>A&&t.criteriaCellMenu.menuItems.length>0?t.criteriaCellMenu.show(e):t.actionCellMenu.menuItems.length>0&&t.actionCellMenu.show(e):i&&t.criteriaMenu.menuItems.length>0?t.criteriaMenu.show(e):r&&t.assignmentMenu.menuItems.length>0?t.assignmentMenu.show(e):a&&t.actionMenu.menuItems.length>0&&t.actionMenu.show(e)}})}}}(Handsontable)},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n ul > li");o.is(":visible")?(o.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(o.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var i=this.props.expandLevel;if(o._level>=i){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(o)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var o="treenodemenu"+t.id;e.contextmenu({target:"#"+o})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,o=e.dispatch,i=n.children,r="node-"+n.id,a="treenodemenu"+n.id,s=[];if(n.contextMenu&&s.push(u.default.createElement(M.default,{items:n.contextMenu,key:n.id,data:n,dispatch:o,menuId:a})),i&&i.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),s,u.default.createElement(p.default,{dispatch:o,children:i,expandLevel:this.props.expandLevel}));var A=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var o=window._server+n.editorPath+"?file="+n.fullPath;T.eventEmitter.emit(T.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:o,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),s)}}();return"object"===("undefined"==typeof A?"undefined":l(A))?A.v:void 0}}]),e}(c.Component);e.default=C},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&f.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function l(t,e){var n,o,i;if(e.singleton){var r=T++;n=I||(I=a(e)),o=c.bind(null,n,r,!1),i=c.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(e),o=g.bind(null,n),i=function(){A(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),o=u.bind(null,n),i=function(){A(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function c(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=E(e,i);else{var r=document.createTextNode(i),A=t.childNodes;A[e]&&t.removeChild(A[e]),A.length?t.insertBefore(r,A[e]):t.appendChild(r)}}function u(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var d={},M=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=M(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=M(function(){return document.head||document.getElementsByTagName("head")[0]}),I=null,T=0,f=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return o(n,e),function(t){for(var r=[],A=0;A1){for(var h=Array(p),I=0;I1){for(var f=Array(T),E=0;E>"),b={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:a(),arrayOf:s,element:l(),instanceOf:c,node:M(),objectOf:g,oneOf:u,oneOfType:d,shape:p};i.prototype=Error.prototype,t.exports=b},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function o(t){return r.isValidElement(t)?void 0:i("143"),t}var i=n(19),r=n(21);n(20);t.exports=o},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var o=n(43),i=n(48),r=n(174),A=n(71),a=n(68),s=n(179),l=n(180),c=n(181),u=n(182);n(56);i.inject();var g={findDOMNode:l,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?o.getNodeFromInstance(t):null}},Mount:r,Reconciler:A});t.exports=g},function(t,e,n){"use strict";function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function A(t,e){if(!(t._flags&M.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var A in n)if(n.hasOwnProperty(A)){var a=n[A],s=o(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(d)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){i(a,r);continue t}c("32",s)}}t._flags|=M.hasCachedChildNodes}}function a(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,o;t&&(o=t[p]);t=e.pop())n=o,e.length&&A(o,t);return n}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())A(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),g=n(47),d=(n(46),u.ID_ATTRIBUTE_NAME),M=g,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),h={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:A,precacheNode:i,uncacheNode:r};t.exports=h},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,o=0;o8&&N<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},b=!1,B=null,L={eventTypes:x,extractEvents:function(t,e,n,o){return[l(t,e,n,o),g(t,e,n,o)]}};t.exports=L},function(t,e,n){"use strict";function o(t,e,n){var o=e.dispatchConfig.phasedRegistrationNames[n];return I(t,o)}function i(t,e,n){var i=o(t,n,e);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&M.traverseTwoPhase(t._targetInst,i,t)}function A(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?M.getParentInstance(e):null;M.traverseTwoPhase(n,i,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,i=I(t,o);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function l(t){h(t,r)}function c(t){h(t,A)}function u(t,e,n,o){M.traverseEnterLeave(n,o,a,t,e)}function g(t){h(t,s)}var d=n(52),M=n(54),p=n(58),h=n(59),I=(n(56),d.getListener),T={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=T},function(t,e,n){"use strict";function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function i(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(e));default:return!1}}var r=n(44),A=n(53),a=n(54),s=n(55),l=n(58),c=n(59),u=(n(46),{}),g=null,d=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},M=function(t){return d(t,!0)},p=function(t){return d(t,!1)},h=function(t){return"."+t._rootNodeID},I={injection:{injectEventPluginOrder:A.injectEventPluginOrder,injectEventPluginsByName:A.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var o=h(t),i=u[e]||(u[e]={});i[o]=n;var a=A.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(i(e,t._currentElement.type,t._currentElement.props))return null;var o=h(t);return n&&n[o]},deleteListener:function(t,e){var n=A.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var o=u[e];if(o){var i=h(t);delete o[i]}},deleteAllListeners:function(t){var e=h(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var o=A.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,o){for(var i,r=A.plugins,a=0;a-1?void 0:A("96",t),!l.plugins[n]){e.extractEvents?void 0:A("97",t),l.plugins[n]=e;var o=e.eventTypes;for(var r in o)i(o[r],e,r)?void 0:A("98",r,t)}}}function i(t,e,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?A("99",n):void 0,l.eventNameDispatchConfigs[n]=t;var o=t.phasedRegistrationNames;if(o){for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];r(a,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){l.registrationNameModules[t]?A("100",t):void 0,l.registrationNameModules[t]=e,l.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var A=n(44),a=(n(46),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?A("101"):void 0,a=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];s.hasOwnProperty(n)&&s[n]===i||(s[n]?A("102",n):void 0,s[n]=i,e=!0)}e&&o()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return l.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var i=l.registrationNameModules[n[o]];if(i)return i}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];l.plugins.length=0;var e=l.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var o=l.registrationNameModules;for(var i in o)o.hasOwnProperty(i)&&delete o[i]}};t.exports=l},function(t,e,n){"use strict";function o(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function A(t,e,n,o){var i=t.type||"unknown-event";t.currentTarget=I.getNodeFromInstance(o),e?p.invokeGuardedCallbackWithCatch(i,n,t):p.invokeGuardedCallback(i,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,o=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-e:void 0;return this._fallbackText=i.slice(t,a),this._fallbackText}}),r.addPoolingTo(o),t.exports=o},function(t,e,n){"use strict";var o=n(44),i=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e),o}return new n(t,e)},A=function(t,e,n){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n),i}return new o(t,e,n)},a=function(t,e,n,o){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,n,o),r}return new i(t,e,n,o)},s=function(t,e,n,o,i){var r=this;if(r.instancePool.length){var A=r.instancePool.pop();return r.call(A,t,e,n,o,i),A}return new r(t,e,n,o,i)},l=function(t){var e=this;t instanceof e?void 0:o("25"),t.destructor(),e.instancePool.length8));var v=!1;E.canUseDOM&&(v=D("input")&&(!document.documentMode||document.documentMode>11));var U={get:function(){return Q.get.call(this)},set:function(t){m=""+t,Q.set.call(this,t)}},S={eventTypes:b,extractEvents:function(t,e,n,i){var r,A,a=e?N.getNodeFromInstance(e):window;if(o(a)?j?r=s:A=l:x(a)?v?r=d:(r=p,A=M):h(a)&&(r=I),r){var c=r(t,e);if(c){var u=C.getPooled(b.change,c,n,i);return u.type="change",f.accumulateTwoPhaseDispatches(u),u}}A&&A(t,a,e)}};t.exports=S},function(t,e,n){"use strict";function o(){b.ReactReconcileTransaction&&N?void 0:c("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=b.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,i,r,A){return o(),N.batchedUpdates(t,e,n,i,r,A)}function A(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==I.length?c("124",e,I.length):void 0,I.sort(A),T++;for(var n=0;n]/,s=n(91),l=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{o=o||document.createElement("div"),o.innerHTML=""+e+"";for(var n=o.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),A.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=l},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,o,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,o,i)})}:t};t.exports=n},function(t,e,n){"use strict";var o=n(60),i=n(93),r=n(90),A=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};o.canUseDOM&&("textContent"in document.documentElement||(A=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,i(e))})),t.exports=A},function(t,e){"use strict";function n(t){var e=""+t,n=i.exec(e);if(!n)return e;var o,r="",A=0,a=0;for(A=n.index;A]/;t.exports=o},function(t,e,n){"use strict";var o=n(44),i=n(88),r=n(60),A=n(95),a=n(57),s=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:o("56"),e?void 0:o("57"),"HTML"===t.nodeName?o("58"):void 0,"string"==typeof e){var n=A(e,a)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";function o(t){var e=t.match(c);return e&&e[1].toLowerCase()}function i(t,e){var n=l;l?void 0:s(!1);var i=o(t),r=i&&a(i);if(r){n.innerHTML=r[1]+t+r[2];for(var c=r[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:s(!1),A(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var r=n(60),A=n(96),a=n(97),s=n(46),l=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=i},function(t,e,n){"use strict";function o(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?A(!1):void 0,"number"!=typeof e?A(!1):void 0,0===e||e-1 in t?void 0:A(!1),"function"==typeof t.callee?A(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),o=0;o":A.innerHTML="<"+t+">",a[t]=!A.firstChild),a[t]?g[t]:null}var i=n(60),r=n(46),A=i.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],l=[1,"","
    "],c=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=o},function(t,e,n){"use strict";var o=n(87),i=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=i.getNodeFromInstance(t);o.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function o(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&V in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",o(t)):void 0)}function r(t,e,n,o){if(!(o instanceof v)){var i=t._hostContainerInfo,r=i._node&&i._node.nodeType===G,a=r?i._node:i._ownerDocument;Y(e,a),o.getReactMountReady().enqueue(A,{inst:t,registrationName:e,listener:n})}}function A(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;B.postMountWrapper(t)}function s(){var t=this;Q.postMountWrapper(t)}function l(){var t=this;L.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:p("63");var e=z(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in P)P.hasOwnProperty(n)&&t._wrapperState.listeners.push(D.trapBubbledEvent(n,P[n],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){m.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function d(t,e){return t.indexOf("-")>=0||null!=e.is}function M(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),h=n(16),I=n(100),T=n(102),f=n(88),E=n(89),N=n(45),w=n(110),C=n(52),y=n(53),D=n(112),x=n(47),b=n(43),B=n(115),L=n(118),m=n(119),Q=n(120),j=(n(74),n(121)),v=n(141),U=(n(57),n(93)),S=(n(46),n(77),n(130),n(144),n(56),x),k=C.deleteListener,z=b.getNodeFromInstance,Y=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",V="__html",H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=h({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;M.displayName="ReactDOMComponent",M.Mixin={mountComponent:function(t,e,n,o){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":B.mountWrapper(this,r,e),r=B.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"option":L.mountWrapper(this,r,e),r=L.getHostProps(this,r);break;case"select":m.mountWrapper(this,r,e),r=m.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"textarea":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(c,this)}i(this,r);var A,u;null!=e?(A=e._namespaceURI,u=e._tag):n._tag&&(A=n._namespaceURI,u=n._tag),(null==A||A===E.svg&&"foreignobject"===u)&&(A=E.html),A===E.html&&("svg"===this._tag?A=E.svg:"math"===this._tag&&(A=E.mathml)),this._namespaceURI=A;var g;if(t.useCreateElement){var d,M=n._ownerDocument;if(A===E.html)if("script"===this._tag){var p=M.createElement("div"),h=this._currentElement.type;p.innerHTML="<"+h+">",d=p.removeChild(p.firstChild)}else d=r.is?M.createElement(this._currentElement.type,r.is):M.createElement(this._currentElement.type);else d=M.createElementNS(A,this._currentElement.type);b.precacheNode(this,d),this._flags|=S.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(d),this._updateDOMProperties(null,r,t);var T=f(d);this._createInitialChildren(t,r,o,T),g=T}else{var N=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,o);g=!C&&X[this._tag]?N+"/>":N+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(l,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];if(null!=i)if(R.hasOwnProperty(o))i&&r(this,o,i,t);else{o===O&&(i&&(i=this._previousStyleCopy=h({},e.style)),i=T.createMarkupForStyles(i,this));var A=null;null!=this._tag&&d(this._tag,e)?H.hasOwnProperty(o)||(A=w.createMarkupForCustomAttribute(o,i)):A=w.createMarkupForProperty(o,i),A&&(n+=" "+A)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var o="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(o=i.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)o=U(r);else if(null!=A){var a=this.mountChildren(A,t,n);o=a.join("")}}return W[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(t,e,n,o){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&f.queueHTML(o,i.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)f.queueText(o,r);else if(null!=A)for(var a=this.mountChildren(A,t,n),s=0;s1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function r(t,e){var n=a.get(t);if(!n){return null}return n}var A=n(44),a=(n(22),n(123)),s=(n(74),n(68)),l=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){l.validateCallback(e,n);var i=r(t);return i?(i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],void o(i)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],o(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,o(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(e),o(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,o(t)},validateCallback:function(t,e){t&&"function"!=typeof t?A("122",e,i(t)):void 0}});t.exports=l},function(t,e,n){"use strict";var o=(n(16),n(57)),i=(n(56),o);t.exports=i},function(t,e,n){"use strict";var o=n(16),i=n(88),r=n(43),A=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(A.prototype,{mountComponent:function(t,e,n,o){var A=n._idCounter++;this._domID=A,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=n._ownerDocument,l=s.createComment(a);return r.precacheNode(this,l),i(l)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function o(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var n=0,o=t;o;o=o._hostParent)n++;for(var i=0,r=e;r;r=r._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var A=n;A--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function A(t,e,n){for(var o=[];t;)o.push(t),t=t._hostParent;var i;for(i=o.length;i-- >0;)e(o[i],"captured",n);for(i=0;i0;)n(s[l],"captured",r)}var s=n(44);n(46);t.exports={isAncestor:i,getLowestCommonAncestor:o,getParentInstance:r,traverseTwoPhase:A,traverseEnterLeave:a}},function(t,e,n){"use strict";var o=n(44),i=n(16),r=n(87),A=n(88),a=n(43),s=n(93),l=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(l.prototype,{mountComponent:function(t,e,n,o){var i=n._idCounter++,r=" react-text: "+i+" ",l=" /react-text ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(r),g=c.createComment(l),d=A(c.createDocumentFragment());return A.queueChild(d,A(u)),this._stringText&&A.queueChild(d,A(c.createTextNode(this._stringText))),A.queueChild(d,A(g)),a.precacheNode(this,u),this._closingComment=g,d}var M=s(this._stringText);return t.renderToStaticMarkup?M:""+M+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();r.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=l},function(t,e,n){"use strict";function o(){this.reinitializeTransaction()}var i=n(16),r=n(68),A=n(75),a=n(57),s={initialize:a,close:function(){g.isBatchingUpdates=!1}},l={initialize:a,close:r.flushBatchedUpdates.bind(r)},c=[l,s];i(o.prototype,A,{getTransactionWrappers:function(){return c}});var u=new o,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,o,i,r){var A=g.isBatchingUpdates;return g.isBatchingUpdates=!0,A?t(e,n,o,i,r):u.perform(t,null,e,n,o,i,r)}};t.exports=g},function(t,e,n){"use strict";function o(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=d(t.nativeEvent),n=u.getClosestInstanceFromNode(e),i=n;do t.ancestors.push(i),i=i&&o(i);while(i);for(var r=0;re.end?(n=e.end,o=e.start):(n=e.start,o=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",o-n),i.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),o=t[c()].length,i=Math.min(e.start,o),r=void 0===e.end?i:Math.min(e.end,o);if(!n.extend&&i>r){var A=r;r=i,i=A}var a=l(t,i),s=l(t,r);if(a&&s){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),i>r?(n.addRange(u),n.extend(s.node,s.offset)):(u.setEnd(s.node,s.offset),n.addRange(u))}}}var s=n(60),l=n(156),c=n(63),u=s.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?i:r,setOffsets:u?A:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var i=n(t),r=0,A=0;i;){if(3===i.nodeType){if(A=r+i.textContent.length,r<=e&&A>=e)return{node:i,offset:e-r};r=A}i=n(o(i))}}t.exports=i},function(t,e,n){"use strict";function o(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?o(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(158);t.exports=o},function(t,e,n){"use strict";function o(t){return i(t)&&3==t.nodeType}var i=n(159);t.exports=o},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function o(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(t,e){if(T||null==p||p!==c())return null;var n=o(p);if(!I||!g(I,n)){I=n;var i=l.getPooled(M.select,h,t,e);return i.type="select",i.target=p,r.accumulateTwoPhaseDispatches(i),i}return null}var r=n(51),A=n(60),a=n(43),s=n(154),l=n(65),c=n(160),u=n(78),g=n(130),d=A.canUseDOM&&"documentMode"in document&&document.documentMode<=11,M={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,h=null,I=null,T=!1,f=!1,E={eventTypes:M,extractEvents:function(t,e,n,o){if(!f)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,h=e,I=null);break;case"topBlur":p=null,h=null,I=null;break;case"topMouseDown":T=!0;break;case"topContextMenu":case"topMouseUp":return T=!1,i(n,o);case"topSelectionChange":if(d)break;case"topKeyDown":case"topKeyUp":return i(n,o)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(f=!0)}};t.exports=E},function(t,e,n){"use strict";function o(t){return"."+t._rootNodeID}function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),A=n(150),a=n(51),s=n(43),l=n(164),c=n(165),u=n(65),g=n(166),d=n(167),M=n(81),p=n(170),h=n(171),I=n(172),T=n(82),f=n(173),E=n(57),N=n(168),w=(n(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,o="top"+e,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};w[t]=i,C[o]=i});var y={},D={eventTypes:w,extractEvents:function(t,e,n,o){var i=C[t];if(!i)return null;var A;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":A=u;break;case"topKeyPress":if(0===N(n))return null;case"topKeyDown":case"topKeyUp":A=d;break;case"topBlur":case"topFocus":A=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":A=M;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":A=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":A=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":A=l;break;case"topTransitionEnd":A=I;break;case"topScroll":A=T;break;case"topWheel":A=f;break;case"topCopy":case"topCut":case"topPaste":A=c}A?void 0:r("86",t);var s=A.getPooled(i,e,n,o);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,n){if("onClick"===e&&!i(t._tag)){var r=o(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=A.listen(a,"click",E))}},willDeleteListener:function(t,e){if("onClick"===e&&!i(t._tag)){var n=o(t);y[n].remove(),delete y[n]}}};t.exports=D},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r={relatedTarget:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(168),A=n(169),a=n(84),s={key:A,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};i.augmentClass(o,s),t.exports=o},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function o(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=i(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?A[t.keyCode]||"Unidentified":""}var i=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={dataTransfer:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(84),A={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};i.augmentClass(o,A),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e){for(var n=Math.min(t.length,e.length),o=0;o.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var A,a=h.createElement(Y,{child:e});if(t){var s=w.get(t);A=s._processChildContext(s._context)}else A=b;var c=g(n);if(c){var u=c._currentElement,M=u.props.child;if(m(M,e)){var p=c._renderedComponent.getPublicInstance(),I=o&&function(){o.call(p)};return R._updateRootComponent(c,a,A,n,I),p}R.unmountComponentAtNode(n)}var T=i(n),f=T&&!!r(T),E=l(n),N=f&&!c&&!E,C=R._renderNewRootComponent(a,n,N,A)._renderedComponent.getPublicInstance();return o&&o.call(C),C},render:function(t,e,n){return R._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:d("40");var e=g(t);if(!e){l(t),1===t.nodeType&&t.hasAttribute(j);return!1}return delete k[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,A){if(c(e)?void 0:d("41"),r){var a=i(e);if(C.canReuseMarkup(t,a))return void T.precacheNode(n,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var l=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var u=t,g=o(u,l),p=" (client) "+u.substring(g-20,g+20)+"\n (server) "+l.substring(g-20,g+20);e.nodeType===U?d("42",p):void 0}if(e.nodeType===U?d("43"):void 0,A.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);M.insertTreeBefore(e,t,null)}else L(e,t),T.precacheNode(n,e.firstChild)}};t.exports=R},function(t,e,n){"use strict";function o(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===i?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var i=(n(144),9);t.exports=o},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var o=n(178),i=/\/?>/,r=/^<\!\-\-/,A={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=o(t);return r.test(t)?t:t.replace(i," "+A.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(A.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=o(t);return i===n}};t.exports=A},function(t,e){"use strict";function n(t){for(var e=1,n=0,i=0,r=t.length,A=r&-4;i服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=o,e.ajaxSave=i,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(){var t="_ui_"+c++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function A(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=l.default.frameStyle.getRootIcon(),t._style=l.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=l.default.frameStyle.getFolderIcon(),t._style=l.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=l.default.frameStyle.getRuleIcon(),t._style=l.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=l.default.frameStyle.getProjectIcon(),t._style=l.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=l.default.frameStyle.getResourceIcon(),t._style=l.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=l.default.frameStyle.getResourcePackageIcon(),t._style=l.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=l.default.frameStyle.getLibIcon(),t._style=l.default.frameStyle.getLibIconStyle();break;case"action":t._icon=l.default.frameStyle.getActionIcon(),t._style=l.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=l.default.frameStyle.getParameterIcon(),t._style=l.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=l.default.frameStyle.getConstantIcon(),t._style=l.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=l.default.frameStyle.getVariableIcon(),t._style=l.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=l.default.frameStyle.getRuleLibIcon(),t._style=l.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=l.default.frameStyle.getDecisionTableLibIcon(),t._style=l.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=l.default.frameStyle.getDecisionTreeLibIcon(),t._style=l.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=l.default.frameStyle.getFlowLibIcon(),t._style=l.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=l.default.frameStyle.getUlIcon(),t._style=l.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=l.default.frameStyle.getDecisionTableIcon(),t._style=l.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=l.default.frameStyle.getScriptDecisionTableIcon(),t._style=l.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=l.default.frameStyle.getDecisionTreeIcon(),t._style=l.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=l.default.frameStyle.getFlowIcon(),t._style=l.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=l.default.frameStyle.getScorecardIcon(),t._style=l.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=i,e.loadFileVersions=r,e.loadResourceTreeData=A;var s=n(228),l=o(s),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=o},,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?l.show():l.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,o=e.operationConfig,i=e.dispatch,r=e.selectFirst,A=(e.uniqueKey,this.props.rows||[]),a=[],s=[];n.forEach(function(e,n){e.editable?a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label),l.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label)))}),o&&a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:o.width}},l.default.createElement("label",null,"操作列")));var c=l.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?l.default.createElement("td",{key:(0,h.uniqueID)()},l.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):l.default.createElement("td",{key:(0,h.uniqueID)()}," ")}),o?l.default.createElement("td",null):null);s.push(c),A.forEach(function(e,A){e.id||(e.id=(0,h.uniqueID)());var a=e.id;0===A&&r?s.push(l.default.createElement(d.default,{key:a,select:!0,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:A})):s.push(l.default.createElement(d.default,{key:a,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:A}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return l.default.createElement("table",{className:"table table-bordered",style:u},l.default.createElement("thead",null,l.default.createElement("tr",{className:"well"},a)),l.default.createElement("tbody",null,s))}}]),e}(s.Component);I.propTypes={headers:l.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=I},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var o=e[t];o&&""!==o||(o="{}");var i=JSON.parse(o)||{},r=i.rows||[],A=i.type,a=function(o){var i={type:A,rows:o},r=JSON.stringify(i);e[t]=r;var a=n.find("div");a.html(r)};if(A){var s=null,l=!0,c=!1,u=void 0;try{for(var g,d=simulatorCategoryData[Symbol.iterator]();!(l=(g=d.next()).done);l=!0){var M=g.value;if(A===M.clazz){s=M;break}}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}var h=s.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:h,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var c=s.value;e.append('")}}catch(t){o=!0,i=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}e.append(''),I.MsgBox.dialog("选择子对象类型",e,function(){if(A=e.val(),!A||""===A)return void I.MsgBox.alert("请先选择子对象类型!");var n=null,o=!0,i=!1,s=void 0; +try{for(var l,c=t[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value;if(A===u.clazz){n=u;break}}}catch(t){i=!0,s=t}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}var g=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:g,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var o=n.find("div");o.html(e[t]),o.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,o=e.header,i=o.dateFormat,r=n[o.name];if(i){var A=new Date(r);r=(0,h.formatDate)(A,i)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:a,onClick:function(e){if(o.editable){var i=e.target;$(i).css({display:"none"}),n._editorType?t._showEditor(o.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:i,rowData:n,colId:o.id})}}},r))}}]),e}(c.Component);e.default=T},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var i=n(240),r=o(i);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function A(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,a,s,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],A(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,s=0;s0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,A,a;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],A=n.length,i=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=A;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var o=n(242).default,i=n(243).default,r=n(251),A=n(252).default,a=n(302);t.exports={Tool:o,Node:i,MsgBox:r,Event:a,FlowDesigner:A}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var o=this.newNode();return o?(o._tool=this,o._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),o._createFigure(this.context,{x:t,y:e},n),o):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,o=!1,i=void 0;try{for(var r,A=this.context.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e?this._buildNodeName():t}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);es-c&&as-c&&a>l-c?this.attr("cursor","se-resize"):Al-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},o=function(n){if(!this.dragging){var o=t.currentTool;if(o){if(o instanceof d.default||o instanceof u.default||(t.currentTool=t.selectTool,o=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),o instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var i=!1,r=!0,A=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var g=s.value;if(g===e){i=!0;break}}}catch(t){A=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(A)throw a}}i||(t.resetSelection(),t.selectFigure(e))}if(o instanceof d.default){var M=n.offsetX,h=n.offsetY,I=t.currentConnection;if(I){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");I.endX=M,I.endY=h,I.from!==e?!function(){I.endPath(e),t.currentConnection=null;var n=I.from.uuid,o=e.uuid,i=I.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(o);I=new l.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),I.uuid=i,I.endPath(r)},undo:function(){e.context.removeFigureByUUID(i)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");I=new l.default(e,{endX:M,endY:h}),t.currentConnection=I}}}}};this.rect.mouseover(n),this.rect.mousedown(o),this.icon.mouseover(n),this.icon.mousedown(o);var i=function(){var n=e.rect,o=t.currentTool;if(o&&o instanceof u.default){var i=!1,r=t.selectionFigures,A=!0,a=!1,s=void 0;try{for(var c,g=r[Symbol.iterator]();!(A=(c=g.next()).done);A=!0){var d=c.value;if(d===e){i=!0;break}}}catch(t){a=!0,s=t}finally{try{!A&&g.return&&g.return()}finally{if(a)throw s}}if(!i)return void t.resetSelection();r.forEach(function(t,e){t instanceof l.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,o){var i=t.currentTool;if(i&&i instanceof u.default){e.context.snapto&&(n-=n%10,o-=o%10);var r=t.selectionFigures,A=e.rect,a=(e.icon,A.ox+n),s=A.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var c=void 0,g=void 0;switch(this.attr("cursor")){case"nw-resize":c=A.ow-n,g=A.oh-o,c>20&&g>20&&A.attr({x:a,y:s,width:c,height:g});break;case"ne-resize":c=A.ow+n,g=A.oh-o,c>20&&g>20&&A.attr({y:s,width:c,height:g});break;case"se-resize":c=A.ow+n,g=A.oh+o,c>20&&g>20&&A.attr({width:c,height:g});break;case"sw-resize":c=A.ow-n,g=A.oh+o,c>20&&g>20&&A.attr({x:a,width:c,height:g});break;default:r.forEach(function(t,e){t instanceof l.default||t._moveRect(n,o)})}r.forEach(function(t,e){t instanceof l.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},A=function(){e.rect.dragging=!1;var n=[],o=new Map,i=new Map,r=e.rect.ow,A=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),c=e.uuid,u=!0,g=!1,d=void 0;try{for(var M,p=t.selectionFigures[Symbol.iterator]();!(u=(M=p.next()).done);u=!0){var h=M.value;if(!(h instanceof l.default)){n.push(h.uuid);var I=h.rect.ox,T=h.rect.oy;I=I?I:0,T=T?T:0;var f=h.rect.attr("x"),E=h.rect.attr("y");o.set(h.uuid,{x:f,y:E}),i.set(h.uuid,{x:I,y:T})}}}catch(t){g=!0,d=t}finally{try{!u&&p.return&&p.return()}finally{if(g)throw d}}e.context.addRedoUndo({redo:function(){var e=!0,i=!1,r=void 0;try{for(var A,l=n[Symbol.iterator]();!(e=(A=l.next()).done);e=!0){var u=A.value,g=t.getNodeByUUID(u),d=o.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:a,height:s})}}catch(t){i=!0,r=t}finally{try{!e&&l.return&&l.return()}finally{if(i)throw r}}var M=!0,p=!1,h=void 0;try{for(var I,T=n[Symbol.iterator]();!(M=(I=T.next()).done);M=!0){var f=I.value,E=t.getNodeByUUID(f);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&T.return&&T.return()}finally{if(p)throw h}}},undo:function(){var e=!0,o=!1,a=void 0;try{for(var s,l=n[Symbol.iterator]();!(e=(s=l.next()).done);e=!0){var u=s.value,g=t.getNodeByUUID(u),d=i.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:r,height:A})}}catch(t){o=!0,a=t}finally{try{!e&&l.return&&l.return()}finally{if(o)throw a}}var M=!0,p=!1,h=void 0;try{for(var I,T=n[Symbol.iterator]();!(M=(I=T.next()).done);M=!0){var f=I.value,E=t.getNodeByUUID(f);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&T.return&&T.return()}finally{if(p)throw h}}}})};this.rect.drag(r,i,A),this.icon.drag(r,i,A)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,o=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,o=this.rect.oy+e):(n=this.rect.attr("x")+t,o=this.rect.attr("x")+e),this.rect.attr({x:n,y:o})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),o=this.rect.attr("width"),i=this.rect.attr("height");return t&&(e-=5,n-=5,o+=10,i+=10),"M "+e+" "+n+" L "+(e+o)+" "+n+" L "+(e+o)+" "+(n+i)+" L "+e+" "+(n+i)+" L "+e+" "+n}}]),t}();e.default=h},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,o=n.attr("x"),i=n.attr("y"),r=n.attr("width"),A=n.attr("height");o+=r/2,i+=A/2-10;var a=t.x,l=t.y;t=[],t.push(["M",a,l]),t.push(["L",o,i])}var c=this.to.getPathInfo(!0),u=s.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),o=t.attr("width"),i=t.attr("height");e+=o/2,n+=i/2-10;var r=this.endX,A=this.endY,a=0,l=0,c=null;if(this.to){var u=this.to.rect;r=u.attr("x"),A=u.attr("y"),a=u.attr("width"),l=u.attr("height"),r+=a/2,A+=l/2-10}var g=this.from.getPathInfo(!0),d=Math.abs(e+o/2-(r-a/2)),M=Math.abs(n+i/2-(A-l/2)),p="M"+e+" "+n;if(d>=M){var h=p+" L"+r+" "+n,I=s.default.pathIntersection(g,h);if(I.length>0&&(e=I[0].x,n=I[0].y,p="M"+I[0].x+" "+I[0].y),this.to){var T="M"+e+" "+A+" L"+r+" "+A,f=this.to.getPathInfo(!0);I=s.default.pathIntersection(f,T),I.length>0&&(r=I[0].x,A=I[0].y,e0&&(e=C[0].x,n=C[0].y,p="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+n+" L"+r+" "+A,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,A=C[0].y,n=1e3&&delete a[s.shift()],s.push(A),a[A]=t[B](e,r),n?n(a[A]):a[A])}return i}function r(){return this.hex}function A(t,e){for(var n=[],o=0,i=t.length;i-2*!e>o;o+=2){var r=[{x:+t[o-2],y:+t[o-1]},{x:+t[o],y:+t[o+1]},{x:+t[o+2],y:+t[o+3]},{x:+t[o+4],y:+t[o+5]}];e?o?i-4==o?r[3]={x:+t[0],y:+t[1]}:i-2==o&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[i-2],y:+t[i-1]}:i-4==o?r[3]=r[2]:o||(r[0]={x:+t[o],y:+t[o+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function a(t,e,n,o,i){var r=-3*e+9*n-9*o+3*i,A=t*r+6*e-12*n+6*o;return t*A-3*e+3*n}function s(t,e,n,o,i,r,A,s,l){null==l&&(l=1),l=l>1?1:l<0?0:l;for(var c=l/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],M=0,p=0;pM;)g/=2,d+=(cR(i,A)||R(e,o)R(r,a))){var s=(t*o-e*n)*(i-A)-(t-n)*(i*a-r*A),l=(t*o-e*n)*(r-a)-(e-o)*(i*a-r*A),c=(t-n)*(r-a)-(e-o)*(i-A);if(c){var u=s/c,g=l/c,d=+u.toFixed(2),M=+g.toFixed(2);if(!(d<+F(t,n).toFixed(2)||d>+R(t,n).toFixed(2)||d<+F(i,A).toFixed(2)||d>+R(i,A).toFixed(2)||M<+F(e,o).toFixed(2)||M>+R(e,o).toFixed(2)||M<+F(r,a).toFixed(2)||M>+R(r,a).toFixed(2)))return{x:u,y:g}}}}function u(t,n,o){var i=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(i,r))return o?0:[];for(var A=s.apply(0,t),a=s.apply(0,n),l=R(~~(A/5),1),u=R(~~(a/5),1),g=[],d=[],M={},p=o?0:[],h=0;h=0&&x<=1.001&&b>=0&&b<=1.001&&(o?p++:p.push({x:D.x,y:D.y,t1:F(x,1),t2:F(b,1)}))}}return p}function g(t,n,o){t=e._path2curve(t),n=e._path2curve(n);for(var i,r,A,a,s,l,c,g,d,M,p=o?0:[],h=0,I=t.length;ho)return o;for(;nr?n=i:o=i,i=(o-n)/2+n}return i}var l=3*e,c=3*(o-e)-l,u=1-l-c,g=3*n,d=3*(i-n)-g,M=1-g-d;return a(t,1/(200*r))}function h(t,e){var n=[],o={};if(this.ms=e,this.times=1,t){for(var i in t)t[y](i)&&(o[q(i)]=t[i],n.push(q(i)));n.sort(ct)}this.anim=o,this.top=n[n.length-1],this.percents=n}function I(n,o,i,r,A,a){i=q(i);var s,l,c,u,g,M,h=n.ms,I={},T={},f={};if(r)for(w=0,C=re.length;wr*n.top){i=n.percents[w],g=n.percents[w-1]||0,h=h/n.top*(i-g),u=n.percents[w+1],s=n.anim[i];break}r&&o.attr(n.anim[n.percents[w]])}if(s){if(l)l.initstatus=r,l.start=new Date-l.ms*r;else{for(var D in s)if(s[y](D)&&(nt[y](D)||o.paper.customAttributes[y](D)))switch(I[D]=o.attr(D),null==I[D]&&(I[D]=et[D]),T[D]=s[D],nt[D]){case G:f[D]=(T[D]-I[D])/h;break;case"colour":I[D]=e.getRGB(I[D]);var x=e.getRGB(T[D]);f[D]={r:(x.r-I[D].r)/h,g:(x.g-I[D].g)/h,b:(x.b-I[D].b)/h};break;case"path":var b=Ut(I[D],T[D]),B=b[1];for(I[D]=b[0],f[D]=[],w=0,C=I[D].length;w',ht=It.firstChild,ht.style.behavior="url(#default#VML)",!ht||"object"!=typeof ht.adj)return e.type=Q;It=null}e.svg=!(e.vml="VML"==e.type),e._Paper=b,e.fn=E=b.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=z.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,o,i,r,A){if(null==r){var a=t-o,s=n-i;return a||s?(180+180*Y.atan2(-s,-a)/H+360)%360:0}return e.angle(t,n,r,A)-e.angle(o,i,r,A)},e.rad=function(t){return t%360*H/180},e.deg=function(t){return Math.round(180*t/H%360*1e3)/1e3},e.snapTo=function(t,n,o){if(o=e.is(o,"finite")?o:10,e.is(t,X)){for(var i=t.length;i--;)if(O(t[i]-n)<=o)return t[i]}else{t=+t;var r=n%t;if(rt-o)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,D.win,n),D.win=n,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var Tt=function(t){if(e.vml){var n,o=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var A=n.createTextRange();Tt=i(function(t){try{n.style.color=v(t).replace(o,Q);var e=A.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),Tt=i(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,Q).getPropertyValue("color")})}return Tt(t)},ft=function(){return"hsb("+[this.h,this.s,this.b]+")"},Et=function(){return"hsl("+[this.h,this.s,this.l]+")"},Nt=function(){return this.hex},wt=function(t,n,o){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(o=t.b,n=t.g,t=t.r),null==n&&e.is(t,P)){var i=e.getRGB(t);t=i.r,n=i.g,o=i.b}return(t>1||n>1||o>1)&&(t/=255,n/=255,o/=255),[t,n,o]},Ct=function(t,n,o,i){t*=255,n*=255,o*=255;var r={r:t,g:n,b:o,hex:e.rgb(t,n,o),toString:Nt};return e.is(i,"finite")&&(r.opacity=i),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Nt,t},e.hsb2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,o=t.o,t=t.h),t*=360;var i,r,A,a,s;return t=t%360/60,s=n*e,a=s*(1-O(t%2-1)),i=r=A=n-s,t=~~t,i+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],Ct(i,r,A,o)},e.hsl2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,r,A,a,s;return t=t%360/60,s=2*e*(n<.5?n:1-n),a=s*(1-O(t%2-1)),i=r=A=n-s/2,t=~~t,i+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],Ct(i,r,A,o)},e.rgb2hsb=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,A;return r=R(t,e,n),A=r-F(t,e,n),o=0==A?null:r==t?(e-n)/A:r==e?(n-t)/A+2:(t-e)/A+4,o=(o+360)%6*60/360,i=0==A?0:A/r,{h:o,s:i,b:r,toString:ft}},e.rgb2hsl=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,A,a,s;return A=R(t,e,n),a=F(t,e,n),s=A-a,o=0==s?null:A==t?(e-n)/s:A==e?(n-t)/s+2:(t-e)/s+4,o=(o+360)%6*60/360,r=(A+a)/2,i=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:o,s:i,l:r,toString:Et}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=D.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},n.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(n),n.src=t};e.getRGB=i(function(t){if(!t||(t=v(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(it[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=Tt(t));var n,o,i,A,a,s,l=t.match(J);return l?(l[2]&&(i=$(l[2].substring(5),16),o=$(l[2].substring(3,5),16),n=$(l[2].substring(1,3),16)),l[3]&&(i=$((a=l[3].charAt(3))+a,16),o=$((a=l[3].charAt(2))+a,16),n=$((a=l[3].charAt(1))+a,16)),l[4]&&(s=l[4][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100)),l[5]?(s=l[5][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsb2rgb(n,o,i,A)):l[6]?(s=l[6][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsl2rgb(n,o,i,A)):(l={r:n,g:o,b:i,toString:r},l.hex="#"+(16777216|i|o<<8|n<<16).toString(16).slice(1),e.is(A,"finite")&&(l.opacity=A),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=i(function(t,n,o){return e.hsb2rgb(t,n,o).hex}),e.hsl=i(function(t,n,o){return e.hsl2rgb(t,n,o).hex}),e.rgb=i(function(t,e,n){function o(t){return t+.5|0}return"#"+(16777216|o(n)|o(e)<<8|o(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=yt(t);if(n.arr)return xt(n.arr);var o={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,X)&&e.is(t[0],X)&&(i=xt(t)),i.length||v(t).replace(At,function(t,e,n){var r=[],A=e.toLowerCase();if(n.replace(st,function(t,e){e&&r.push(+e)}),"m"==A&&r.length>2&&(i.push([e][L](r.splice(0,2))),A="l",e="m"==e?"l":"L"),"r"==A)i.push([e][L](r));else for(;r.length>=o[A]&&(i.push([e][L](r.splice(0,o[A]))),o[A]););}),i.toString=e._path2string,n.arr=xt(i),i},e.parseTransformString=i(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=xt(t)),n.length||v(t).replace(at,function(t,e,o){var i=[];z.call(e);o.replace(st,function(t,e){e&&i.push(+e)}),n.push([e][L](i))}),n.toString=e._path2string,n});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[y](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,o,i,r,A,a,s){var l=1-s,c=V(l,3),u=V(l,2),g=s*s,d=g*s,M=c*t+3*u*s*n+3*l*s*s*i+d*A,p=c*e+3*u*s*o+3*l*s*s*r+d*a,h=t+2*s*(n-t)+g*(i-2*n+t),I=e+2*s*(o-e)+g*(r-2*o+e),T=n+2*s*(i-n)+g*(A-2*i+n),f=o+2*s*(r-o)+g*(a-2*r+o),E=l*t+s*n,N=l*e+s*o,w=l*i+s*A,C=l*r+s*a,y=90-180*Y.atan2(h-T,I-f)/H;return(h>T||I=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var o=e.isPointInsideBBox;return o(n,t.x,t.y)||o(n,t.x2,t.y)||o(n,t.x,t.y2)||o(n,t.x2,t.y2)||o(t,n.x,n.y)||o(t,n.x2,n.y)||o(t,n.x,n.y2)||o(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return g(t,e)},e.pathIntersectionNumber=function(t,e){return g(t,e,1)},e.isPointInsidePath=function(t,n,o){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,o)&&g(t,[["M",n,o],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ut(t);for(var o,i=0,r=0,A=[],a=[],s=0,l=t.length;s1&&(T=Y.sqrt(T),n*=T,o*=T);var f=n*n,E=o*o,N=(A==a?-1:1)*Y.sqrt(O((f*E-f*I*I-E*h*h)/(f*I*I+E*h*h))),w=N*n*I/o+(t+s)/2,C=N*-o*h/n+(e+l)/2,y=Y.asin(((e-C)/o).toFixed(9)),D=Y.asin(((l-C)/o).toFixed(9));y=tD&&(y-=2*H),!a&&D>y&&(D-=2*H)}var x=D-y;if(O(x)>g){var b=D,B=s,m=l;D=y+g*(a&&D>y?1:-1),s=w+n*Y.cos(D),l=C+o*Y.sin(D),M=Qt(s,l,n,o,r,0,a,B,m,[D,b,w,C])}x=D-y;var Q=Y.cos(y),j=Y.sin(y),v=Y.cos(D),S=Y.sin(D),k=Y.tan(x/4),z=4/3*n*k,R=4/3*o*k,F=[t,e],V=[t+z*j,e-R*Q],G=[s+z*S,l-R*v],P=[s,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],c)return[V,G,P][L](M);M=[V,G,P][L](M).join()[U](",");for(var X=[],W=0,J=M.length;W"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=jt(t,e,n,o,i,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=jt(t,e,n,o,i,r,A,a,d),p.push(s.x),M.push(s.y)),l=r-2*o+e-(a-2*r+o),c=2*(o-e)-2*(r-o),u=e-o,g=(-c+Y.sqrt(c*c-4*l*u))/2/l,d=(-c-Y.sqrt(c*c-4*l*u))/2/l,O(g)>"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=jt(t,e,n,o,i,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=jt(t,e,n,o,i,r,A,a,d),p.push(s.x),M.push(s.y)),{min:{x:F[B](0,p),y:F[B](0,M)},max:{x:R[B](0,p),y:R[B](0,M)}}}),Ut=e._path2curve=i(function(t,e){var n=!e&&yt(t);if(!e&&n.curve)return xt(n.curve);for(var o=Bt(t),i=e&&Bt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},A={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var o,i,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][L](Qt[B](0,[e.x,e.y][L](t.slice(1))));break;case"S":"C"==n||"S"==n?(o=2*e.x-e.bx,i=2*e.y-e.by):(o=e.x,i=e.y),t=["C",o,i][L](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][L](mt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][L](mt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][L](Lt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][L](Lt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][L](Lt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][L](Lt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"][L](n.splice(0,6)));t.splice(e,1),p=R(o.length,i&&i.length||0)}},l=function(t,e,n,r,A){t&&e&&"M"==t[A][0]&&"M"!=e[A][0]&&(e.splice(A,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[A][1],n.y=t[A][2],p=R(o.length,i&&i.length||0))},c=[],u=[],g="",d="",M=0,p=R(o.length,i&&i.length||0);Mi){if(n&&!g.start){if(c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],i-d),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],r)return u;g.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,s[5],s[6]].join(),d+=l,A=+s[5],a=+s[6];continue}if(!t&&!n)return c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],i-d),{x:c.x,y:c.y,alpha:c.alpha}}d+=l,A=+s[5],a=+s[6]}u+=s.shift()+s}return g.end=u,c=t?d:n?g:e.findDotsAtSegment(A,a,s[0],s[1],s[2],s[3],s[4],s[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),oe=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return oe(t,e).end;var o=oe(t,n,1);return e?oe(o,e).end:o},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var o=this.getPath();if(o)return e.getSubpath(o,t,n)};var ie=e.easing_formulas={linear:function(t){return t},"<":function(t){return V(t,1.7)},">":function(t){return V(t,.48)},"<>":function(t){var e=.48-t/1.04,n=Y.sqrt(.1734+e*e),o=n-e,i=V(O(o),1/3)*(o<0?-1:1),r=-n-e,A=V(O(r),1/3)*(r<0?-1:1),a=i+A+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:V(2,-10*t)*Y.sin((t-.075)*(2*H)/.3)+1},bounce:function(t){var e,n=7.5625,o=2.75;return t<1/o?e=n*t*t:t<2/o?(t-=1.5/o,e=n*t*t+.75):t<2.5/o?(t-=2.25/o,e=n*t*t+.9375):(t-=2.625/o,e=n*t*t+.984375),e}};ie.easeIn=ie["ease-in"]=ie["<"],ie.easeOut=ie["ease-out"]=ie[">"],ie.easeInOut=ie["ease-in-out"]=ie["<>"],ie["back-in"]=ie.backIn,ie["back-out"]=ie.backOut;var re=[],Ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var n=+new Date,o=0;o1&&!i.next){for(A in g)g[y](A)&&(p[A]=i.totalOrigin[A]);i.el.attr(p),I(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&I(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}re.length&&Ae(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,o,i,r,A){var a=this;if(a.removed)return A&&A.call(a),a;var s=o instanceof h?o:e.animation(o,i,r,A);I(s,a,s.percents[0],null,a.attr());for(var l=0,c=re.length;ls&&(s=c)}s+="%",!t[s].callback&&(t[s].callback=i)}return new h(t,n)},Zt.animate=function(t,n,o,i){var r=this;if(r.removed)return i&&i.call(r),r;var A=t instanceof h?t:e.animation(t,n,o,i);return I(A,r,A.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,o,i=[],r=0;if(null!=e)return I(t,this,-1,F(e,1)),this;for(n=re.length;r1)for(var o=0,i=n.length;o.5)-1;s(g-.5,2)+s(d-.5,2)>.25&&(d=r.sqrt(.25-s(g-.5,2))*i+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*i)}return u}),i=i.split(/\s*\-\s*/),"linear"==l){var E=i.shift();if(E=-o(E),isNaN(E))return null;var N=[0,0,r.cos(t.rad(E)),r.sin(t.rad(E))],w=1/(A(a(N[2]),a(N[3]))||1);N[2]*=w,N[3]*=w,N[2]<0&&(N[0]=-N[2],N[2]=0),N[3]<0&&(N[1]=-N[3],N[3]=0)}var C=t._parseDots(i);if(!C)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){T=h(l+"Gradient",{id:c}),e.gradient=T,h(T,"radial"==l?{fx:g,fy:d}:{x1:N[0],y1:N[1],x2:N[2],y2:N[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(T);for(var y=0,D=C.length;y1?v.opacity/100:v.opacity});case"stroke":v=t.getRGB(p),s.setAttribute(M,v.hex),"stroke"==M&&v[e]("opacity")&&h(s,{"stroke-opacity":v.opacity>1?v.opacity/100:v.opacity}),"stroke"==M&&o._.arrows&&("startString"in o._.arrows&&N(o,o._.arrows.startString),"endString"in o._.arrows&&N(o,o._.arrows.endString,1));break;case"gradient":("circle"==o.type||"ellipse"==o.type||"r"!=n(p).charAt())&&I(o,p);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&h(s,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(c.gradient){U=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,u)),U&&(S=U.getElementsByTagName("stop"),h(S[S.length-1],{"stop-opacity":p}));break}default:"font-size"==M&&(p=i(p,10)+"px");var k=M.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[k]=p,o._.dirty=1,s.setAttribute(M,p)}}x(o,r),s.style.visibility=g},D=1.2,x=function(o,r){if("text"==o.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var A=o.attrs,a=o.node,s=a.firstChild?i(t._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(A.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var l,c=n(r.text).split("\n"),g=[],d=0,M=c.length;d"));var Z=X.getBoundingClientRect();T.W=g.w=(Z.right-Z.left)/W,T.H=g.h=(Z.bottom-Z.top)/W,T.X=g.x,T.Y=g.y+T.H/2,("x"in s||"y"in s)&&(T.path.v=t.format("m{0},{1}l{2},{1}",r(g.x*E),r(g.y*E),r(g.x*E)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=i.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),l=e+d+n),M}),r=r.split(/\s*\-\s*/),"linear"==s){var c=r.shift();if(c=-o(c),isNaN(c))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(A),A.on=!0,A.method="none",A.color=u[0].color,A.color2=u[u.length-1].color;for(var g=[],p=0,h=u.length;p')}}catch(t){Q=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,o=e.height,i=e.width,r=e.x,A=e.y;if(!n)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),l=s.style;return r=r||0,A=A||0,i=i||512,o=o||342,a.width=i,a.height=o,i==+i&&(i+="px"),o==+o&&(o+="px"),a.coordsize=1e3*E+d+1e3*E,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),l.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,o),1==n?(t._g.doc.body.appendChild(s),l.left=r+"px",l.top=A+"px",l.position="absolute"):n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var j=t.st;for(var v in m)m[e](v)&&!j[e](v)&&(j[v]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(v))}}.apply(e,o),!(void 0!==i&&(t.exports=i))}])})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(i=(t+1)/2),o.splice(i,1),2===o.length)o=e.connection._buildStraightLinePathInfo();else{var r=o[1],A=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=o[0];a[1]=A.x,a[2]=A.y;var s=o[o.length-2],l=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),c=o[o.length-1];c[1]=l.x,c[2]=l.y}e.path.attr("path",o),e.remove()});var g=function(o,i){e.context.snapto&&(o-=o%10,i-=i%10);var a=this.ox+o,s=this.oy+i;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),A=Math.round(t/2);var l=e.path.attr("path"),c=l.length,u=void 0,g=void 0,d=void 0,M=2*(n.length-1)-1;if(0===t||1===t){if(d=l[1],u=e.connection._buildFromFigureIntersetion({x:d[1],y:d[2]},!0),g=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(p){var h=n[n.length-1];h[1]=p.x,h[2]=p.y}}}else M!==t&&M!==t+1&&M!==t+2||(d=l[c-2],u=e.connection._buildToFigureIntersetion({x:a,y:s},!0),g=n[n.length-1]);u&&(g[1]=u.x,g[2]=u.y);var I=[];n.forEach(function(t,e){r?e===A?I.push(["L",a,s]):I.push(t):(I.push(t),e===A&&I.push(["L",a,s]))}),e.path.attr("path",I),e.connection._buildText()}},d=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},M=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,o=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(o);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(o);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(g,d,M)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=i},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e){"use strict";function n(t){var e=A("消息提示",t);e.modal("show")}function o(t,e){var n=A("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function i(t,e,n){var o=A(t,e,[{name:"确认",click:function(){n.call(this)}}]);o.modal("show")}function r(t,e,n,o,i){var r=A(t,e,n,i);if(r.modal("show"),o){var a=!0,s=!1,l=void 0;try{for(var c,u=o[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;r.on(g.name,g.callback)}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}}}function A(t,e,n,o){var i=this,r="modal-dialog"+(o?" modal-lg":""),A=$(''),s=$('
    ');A.append(s); +var l=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var o="_prop_container",i=$('
    ');this.canvasContainer.append(i);var A=$('');i.append(A),A.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),i.append(a),i.draggable();var l=$("#__prop_panel_tool__");l.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(l.removeClass("glyphicon-circle-arrow-left"),l.addClass("glyphicon-circle-arrow-down")):(l.removeClass("glyphicon-circle-arrow-down"),l.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return A(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void T.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void T.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void T.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,o=t.y,i=t.width,r=t.height,A=t.name;n=parseInt(n),o=parseInt(o),i=parseInt(i),r=parseInt(r);var a=n+i+10,s=o+r+10;this.context.resizePaper(a+50,s+50);var l=e._newNodeInstance(n,o,A);l.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;g.eventEmitter.on(g.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,o=!0,i=!1,r=void 0;try{for(var A,a=function(){var e=A.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},s=this.buttons[Symbol.iterator]();!(o=(A=s.next()).done);o=!0)a()}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,o=void 0;try{for(var i,r=function(){var e=i.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){g.eventEmitter.emit(g.TRIGGER_TOOL,e.getType())})},A=this.context.toolsMap.values()[Symbol.iterator]();!(e=(i=A.next()).done);e=!0)r()}catch(t){n=!0,o=t}finally{try{!e&&A.return&&A.return()}finally{if(n)throw o}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;g.eventEmitter.on(g.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof M.default){var o=n.name||n.text.attr("text"),i=$('
    '),r=$('');i.append(r),t.propContainer.append(i),r.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,A=!1,a=!0,s=!1,l=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g instanceof M.default&&g!==n&&g.name===o){A=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}return A?void T.alert("节点名已存在!"):(n.name=o,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t.text.attr("text",i)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof h.default){var A=$('
    '),a=$('');A.append(a),t.propContainer.append(A),a.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,A=n.from.fromConnections,a=!1,s=!0,l=!1,c=void 0;try{for(var u,g=A[Symbol.iterator]();!(s=(u=g.next()).done);s=!0){var d=u.value;if(d!==n&&d.name===o){a=!0;break}}}catch(t){l=!0,c=t}finally{try{!s&&g.return&&g.return()}finally{if(l)throw c}}return a?void T.alert("连线名已存在"):(n.name=o,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t._buildText()}}))});var s=$('
    '),l=$('');s.append(l),l.val(n.type),l.change(function(t){var o=$(this).val(),i=n.uuid,r=n.type;n.type=o,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.type=o,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(i);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),g.eventEmitter.on(g.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),g.eventEmitter.emit(g.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(T.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,o=void 0;try{for(var i,r=this.context.allFigures[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var A=i.value;if(A instanceof M.default){var a=A.validate();a&&t.push(a)}}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",T.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof M.default&&t.push(e.toJSON())}),t}}]),t}();e.default=f},function(t,e,n){var o=n(254);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var o=n(260);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,o=this;t(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||t(o).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var n='[data-dismiss="alert"]',o=function(e){t(e).on("click",n,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function n(){A.detach().trigger("closed.bs.alert").remove()}var i=t(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var A=t("#"===r?[]:r);e&&e.preventDefault(),A.length||(A=i.closest(".alert")),A.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(A.removeClass("in"),t.support.transition&&A.hasClass("fade")?A.one("bsTransitionEnd",n).emulateTransitionEnd(o.TRANSITION_DURATION):n())};var i=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,o.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.button"),r="object"==typeof e&&e;i||o.data("bs.button",i=new n(this,r)),"toggle"==e?i.toggle():e&&i.setState(e)})}var n=function(e,o){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,o),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();e+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(t.proxy(function(){o[i](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var o=t(n.target).closest(".btn");e.call(o,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.carousel"),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e),A="string"==typeof e?e:r.slide;i||o.data("bs.carousel",i=new n(this,r)),"number"==typeof e?i.to(e):A?i[A]():r.interval&&i.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),o="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(o&&!this.options.wrap)return e;var i="prev"==t?-1:1,r=(n+i)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(e,i),A=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var l=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:l,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,A&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var g=t.Event("slid.bs.carousel",{relatedTarget:l,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(g)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(g)),A&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var i=function(n){var o,i=t(this),r=t(i.attr("data-target")||(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var A=t.extend({},r.data(),i.data()),a=i.attr("data-slide-to");a&&(A.interval=!1),e.call(r,A),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,o=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function n(e){return this.each(function(){var n=t(this),i=n.data("bs.collapse"),r=t.extend({},o.DEFAULTS,n.data(),"object"==typeof e&&e);!i&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),i||n.data("bs.collapse",i=new o(this,r)),"string"==typeof e&&i[e]()})}var o=function(e,n){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),e||i.data("bs.collapse",null));var A=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[A](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[A](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",A].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[A](this.$element[0][s])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(o.TRANSITION_DURATION):i.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,o){var i=t(o);this.addAriaAndCollapsedClass(e(i),i)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var i=t(this);i.attr("data-target")||o.preventDefault();var r=e(i),A=r.data("bs.collapse"),a=A?"toggle":i.data();n.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o=n&&t(n);return o&&o.length?o:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(r).each(function(){var o=t(this),i=e(o),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(o.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function o(e){return this.each(function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new A(this)),"string"==typeof e&&o[e].call(n)})}var i=".dropdown-backdrop",r='[data-toggle="dropdown"]',A=function(e){t(e).on("click.bs.dropdown",this.toggle)};A.VERSION="3.3.7",A.prototype.toggle=function(o){var i=t(this);if(!i.is(".disabled, :disabled")){var r=e(i),A=r.hasClass("open");if(n(),!A){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(o=t.Event("show.bs.dropdown",a)),o.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},A.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var i=e(o),A=i.hasClass("open");if(!A&&27!=n.which||A&&27==n.which)return 27==n.which&&i.find(r).trigger("focus"),o.trigger("click");var a=" li:not(.disabled):visible a",s=i.find(".dropdown-menu"+a);if(s.length){var l=s.index(n.target);38==n.which&&l>0&&l--,40==n.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,o){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var A=i[r];if("click"==A)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=A){var a="hover"==A?"mouseenter":"focusin",s="hover"==A?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,o){n[t]!=o&&(e[t]=o)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var i=this,r=this.tip(),A=this.getUID(this.type);this.setContent(),r.attr("id",A),this.$element.attr("aria-describedby",A),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=r[0].offsetWidth,g=r[0].offsetHeight;if(l){var d=a,M=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+g>M.bottom?"top":"top"==a&&c.top-gM.width?"left":"left"==a&&c.left-uA.top+A.height&&(i.top=A.top+A.height-s)}else{var l=e.left-r,c=e.left+r+n;lA.right&&(i.left=A.left+A.width-c)}return i},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.popover"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||o.data("bs.popover",i=new n(this,r)),"string"==typeof e&&i[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,o){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var o=t(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new e(this,r)),"string"==typeof n&&i[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),r=/^#./.test(i)&&t(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,A=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=o)return A!=(t=r[r.length-1])&&this.activate(t);if(A&&e=i[t]&&(void 0===i[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var A=o.find("> .active"),a=i&&t.support.transition&&(A.length&&A.hasClass("fade")||!!o.find("> .fade").length);A.length&&a?A.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),A.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var i=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.affix"),r="object"==typeof e&&e;i||o.data("bs.affix",i=new n(this,r)),"string"==typeof e&&i[e]()})}var n=function(e,o){this.options=t.extend({},n.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),A=this.$target.height();if(null!=n&&"top"==this.affixed)return i=t-o&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,A=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var a=this.getState(A,e,i,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),l=t.Event(s+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:A-e-r})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),o=n.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(n,o)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,o,i=t(this),r=n.handle?t(n.handle,i):i;r.on({mousedown:function(r){var A=r.target,a="",s=!1;if(A&&(a=A.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===A.tagName||"INPUT"===A.tagName||A&&"presentation"===t(A).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,i)))){var l=i.offset();e=r.pageX-l.left,o=r.pageY-l.top,t(document).on("mousemove.drag",function(t){i.offset({top:t.pageY-o,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&A.push(u)}else{var h=u.rect,I=h.getBBox();(I.x>=n.x&&I.x<=n.x2||I.x2>=n.x&&I.x2<=n.x2)&&(I.y>=n.y&&I.y<=n.y2||I.y2>=n.y&&I.y2<=n.y2)&&s.push(u)}}s.length>0?s.forEach(function(t,e){i.addSelection(t)}):A.forEach(function(t,e){i.addSelection(t)}),i.endSelect()}}var o=null,i=this.context,r=i.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=i.currentTool;if(!(!e||e instanceof u.default||e instanceof l.default)){var n=t.offsetX,o=t.offsetY,r=e._newNodeInstance(n,o);r&&!function(){var t=r.uuid,A=r.name,a=r.toJSON();i.addRedoUndo({redo:function(){r=e._newNodeInstance(n,o,A),r.initFromJson(a)},undo:function(){i.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(i.currentTool&&i.currentTool instanceof u.default){var e=i.currentConnection;if(e){var n=t.offsetX,o=t.offsetY;e.endX=n,e.endY=o,e.updatePath()}}})}}]),t}();e.default=M},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>o&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof f.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof f.default&&e.select()}),t&&N.eventEmitter.emit(N.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof f.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),N.eventEmitter.emit(N.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return d.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;N.eventEmitter.on(N.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),N.eventEmitter.on(N.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var o=e.toJSON(),i=e.uuid,r=t;e instanceof f.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(i),e=t.from.uuid,n=t.to.uuid,A=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(n),s=new f.default(A,{x:A.rect.attr("x"),y:A.rect.attr("y")});A.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(o)},undo:function(){r.removeFigureByUUID(i)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(i)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(o),t._buildConnections())}})}(),t.removeFigureByUUID(i)}))}),N.eventEmitter.on(N.ALIGN_CENTER,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof f.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),o=u.rect.attr("width"),e+=o/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.ALIGN_MIDDLE,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof f.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),o=u.rect.attr("height"),n+=o/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.UNIFY_SIZE,function(){var e=void 0,n=void 0,o=new Map,i=0,r=!0,A=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c instanceof f.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===i?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},o.set(c.uuid,u),i++}}catch(t){A=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(A)throw a}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=g.getNodeByUUID(A),s=o.get(A),l=s.newWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=g.getNodeByUUID(A),s=o.get(A),l=s.oldWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new I.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,n){var o;!function(){"use strict";function i(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],o=-1,r=0,A=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(A=!0,t[e](),A=!1,this):this},{add:function(e){return A?this:(n.splice(o+1,n.length-o),n.push(e),r&&n.length>r&&i(n,0,-(r+1)),o=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var i=n[o];return i?(e(i,"undo"),o-=1,t&&t(),this):this},redo:function(){var i=n[o+1];return i?(e(i,"redo"),o+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],o=-1,t&&e>0&&t()},hasUndo:function(){return o!==-1},hasRedo:function(){return o>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=n(284).randomBytes;M=g=t&&function(){return t(16)},g()}catch(t){}}function s(t,e,n){var o=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[o+i++]=T[t])});i<16;)e[o+i++]=0;return e}function l(t,e){var n=e||0,o=I;return o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]}function c(t,e,n){var o=e&&n||0,i=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,A=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=A-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||A>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=A,y=a,w=r,A+=122192928e5;var c=(1e4*(268435455&A)+a)%4294967296;i[o++]=c>>>24&255,i[o++]=c>>>16&255,i[o++]=c>>>8&255,i[o++]=255&c;var u=A/4294967296*1e4&268435455;i[o++]=u>>>8&255,i[o++]=255&u,i[o++]=u>>>24&15|16,i[o++]=u>>>16&255,i[o++]=r>>>8|128,i[o++]=255&r;for(var g=t.node||N,d=0;d<6;d++)i[o+d]=g[d];return e?e:l(i)}function u(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new h(16):null,t=null),t=t||{};var i=t.random||(t.rng||g)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var r=0;r<16;r++)e[o+r]=i[r];return e||l(i)}var g,d,M,p;r?A():a();for(var h="function"==typeof i?i:Array,I=[],T={},f=0;f<256;f++)I[f]=(f+256).toString(16).substr(1),T[I[f]]=f;var E=g(),N=[1|E[0],E[1],E[2],E[3],E[4],E[5]],w=16383&(E[6]<<8|E[7]),C=0,y=0,D=u;D.v1=c,D.v4=u,D.parse=s,D.unparse=l,D.BufferClass=h,D._rng=g,D._mathRNG=d,D._nodeRNG=M,D._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=D:(o=function(){return D}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,o){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function A(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function h(e){return+e!=e&&(e=0),t.alloc(+e)}function I(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return J(e).length;default:if(i)return P(e).length;n=(""+n).toLowerCase(),i=!0}}function T(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return v(this,e,n);case"utf8":case"utf-8":return L(this,e,n);case"ascii":return Q(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return B(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function f(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function E(e,n,o,i,r){if(0===e.length)return-1;if("string"==typeof o?(i=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=r?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(o<0){if(!r)return-1;o=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:N(e,n,o,i,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,o):Uint8Array.prototype.lastIndexOf.call(e,n,o):N(e,[n],o,i,r); +throw new TypeError("val must be string, number or Buffer")}function N(t,e,n,o,i){function r(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}var A=1,a=t.length,s=e.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;A=2,a/=2,s/=2,n/=2}var l;if(i){var c=-1;for(l=n;la&&(n=a-s),l=n;l>=0;l--){for(var u=!0,g=0;gi&&(o=i)):o=i;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var A=0;A239?4:r>223?3:r>191?2:1;if(i+a<=n){var s,l,c,u;switch(a){case 1:r<128&&(A=r);break;case 2:s=t[i+1],128===(192&s)&&(u=(31&r)<<6|63&s,u>127&&(A=u));break;case 3:s=t[i+1],l=t[i+2],128===(192&s)&&128===(192&l)&&(u=(15&r)<<12|(63&s)<<6|63&l,u>2047&&(u<55296||u>57343)&&(A=u));break;case 4:s=t[i+1],l=t[i+2],c=t[i+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(u=(15&r)<<18|(63&s)<<12|(63&l)<<6|63&c,u>65535&&u<1114112&&(A=u))}}null===A?(A=65533,a=1):A>65535&&(A-=65536,o.push(A>>>10&1023|55296),A=56320|1023&A),o.push(A),i+=a}return m(o)}function m(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",o=0;oo)&&(n=o);for(var i="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,o,i,r,A){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function z(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i>>8*(o?i:1-i)}function Y(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i>>8*(o?i:3-i)&255}function R(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,o,i){return i||R(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,o,23,4),n+4}function O(t,e,n,o,i){return i||R(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,o,52,8),n+8}function V(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,o=t.length,i=null,r=[],A=0;A55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(A+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){for(var e=[],n=0;n>8,i=n%256,r.push(i),r.push(o);return r}function J(t){return _.toByteArray(V(t))}function Z(t,e,n,o){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==o.TYPED_ARRAY_SUPPORT?o.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return l(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var o=e.length,i=n.length,r=0,A=Math.min(o,i);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,o,i,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===o&&(o=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),n<0||o>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&n>=o)return 0;if(i>=r)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var A=r-i,a=o-n,s=Math.min(A,a),l=this.slice(i,r),c=e.slice(n,o),u=0;ui)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return C(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return D(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var o=this.length;e=~~e,n=void 0===n?o:~~n,e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n0&&(i*=256);)o+=this[t+--e]*i;return o},t.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var o=this[t],i=1,r=0;++r=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e|=0,n|=0,!o){var i=Math.pow(2,8*n)-1;k(this,t,e,n,i,0)}var r=1,A=0;for(this[e]=255&t;++A=0&&(A*=256);)this[e+r]=t/A&255;return e+n},t.prototype.writeUInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Y(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=0,A=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=n-1,A=1,a=0;for(this[e+r]=255&t;--r>=0&&(A*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/A>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Y(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return O(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return O(this,t,e,!1,n)},t.prototype.copy=function(e,n,o,i){if(o||(o=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--r)e[r+n]=this[r+o];else if(A<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,o=void 0===o?this.length:o>>>0,e||(e=0);var A;if("number"==typeof e)for(A=n;A0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,o,i,r,A,a,s=t.length;A=n(t),a=new c(3*s/4-A),i=A>0?s-4:s;var u=0;for(e=0,o=0;e>16&255,a[u++]=r>>8&255,a[u++]=255&r;return 2===A?(r=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[u++]=255&r):1===A&&(r=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function A(t,e,n){for(var o,i=[],A=e;Ac?c:l+a));return 1===o?(e=t[n-1],i+=s[e>>2],i+=s[e<<4&63],i+="=="):2===o&&(e=(t[n-2]<<8)+t[n-1],i+=s[e>>10],i+=s[e>>4&63],i+=s[e<<2&63],i+="="),r.push(i),r.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=a;for(var s=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,d=u.length;g>1,c=-7,u=n?i-1:0,g=n?-1:1,d=t[e+u];for(u+=g,r=d&(1<<-c)-1,d>>=-c,c+=a;c>0;r=256*r+t[e+u],u+=g,c-=8);for(A=r&(1<<-c)-1,r>>=-c,c+=o;c>0;A=256*A+t[e+u],u+=g,c-=8);if(0===r)r=1-l;else{if(r===s)return A?NaN:(d?-1:1)*(1/0);A+=Math.pow(2,o),r-=l}return(d?-1:1)*A*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var A,a,s,l=8*r-i-1,c=(1<>1,g=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=o?0:r-1,M=o?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,A=c):(A=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-A))<1&&(A--,s*=2),e+=A+u>=1?g/s:g*Math.pow(2,1-u),e*s>=2&&(A++,s/=2),A+u>=c?(a=0,A=c):A+u>=1?(a=(e*s-1)*Math.pow(2,i),A+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,i),A=0));i>=8;t[n+d]=255&a,d+=M,a/=256,i-=8);for(A=A<0;t[n+d]=255&A,d+=M,A/=256,l-=8);t[n+d-M]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function o(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var A=n(300)(e);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){o("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,o){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new o(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function o(t){return function(){var n=[],o={update:function(t,o){return e.isBuffer(t)||(t=new e(t,o)),n.push(t),this},digest:function(o){var i=e.concat(n),r=t(i);return n=null,o?r.toString(o):r}};return o}}var i=n(288),r=o(n(296)),A=o(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new A:i(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},o=n(280).Buffer,i=n(289)(o);e.sha1=n(290)(o,i),e.sha256=n(294)(o,i),e.sha512=n(295)(o,i)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var o=this._len+=e.length,i=this._s=this._s||0,r=0,A=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){return M.length?M.pop().init():this instanceof n?(this._w=d,e.call(this,64,56),this._h=null,void this.init()):new n}function i(t,e,n,o){return t<20?e&n|~e&o:t<40?e^n^o:t<60?e&n|e&o|n&o:e^n^o}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function A(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,l=4,c=8,u=12,g=16,d=new("undefined"==typeof Int32Array?Array:Int32Array)(80),M=[];return o(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=M,n.prototype._update=function(t){var e,n,o,s,l,c,u,g,d,M;e=c=this._a,n=u=this._b,o=g=this._c,s=d=this._d,l=M=this._e;for(var p=this._w,h=0;h<80;h++){var I=p[h]=h<16?t.readInt32BE(4*h):a(p[h-3]^p[h-8]^p[h-14]^p[h-16],1),T=A(A(a(e,5),i(h,n,o,s)),A(A(l,I),r(h)));l=s,s=o,o=a(n,30),n=e,e=T}this._a=A(e,c),this._b=A(n,u),this._c=A(o,g),this._d=A(s,d),this._e=A(l,M)},n.prototype._hash=function(){M.length<100&&M.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,l),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,g),e},n}},function(t,e,n){(function(t,o){function i(t,n){var o={seen:[],stylize:A};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),p(n)?o.showHidden=n:n&&e._extend(o,n),N(o.showHidden)&&(o.showHidden=!1),N(o.depth)&&(o.depth=2),N(o.colors)&&(o.colors=!1),N(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=r),s(o,t,o.depth)}function r(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function A(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function s(t,n,o){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(o,t);return f(i)||(i=s(t,i,o)),i}var r=l(t,n);if(r)return r;var A=Object.keys(n),p=a(A);if(t.showHidden&&(A=Object.getOwnPropertyNames(n)),D(n)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(n);if(0===A.length){if(x(n)){var h=n.name?": "+n.name:"";return t.stylize("[Function"+h+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return t.stylize(Date.prototype.toString.call(n),"date");if(D(n))return c(n)}var I="",T=!1,E=["{","}"];if(M(n)&&(T=!0,E=["[","]"]),x(n)){var N=n.name?": "+n.name:"";I=" [Function"+N+"]"}if(w(n)&&(I=" "+RegExp.prototype.toString.call(n)),y(n)&&(I=" "+Date.prototype.toUTCString.call(n)),D(n)&&(I=" "+c(n)),0===A.length&&(!T||0==n.length))return E[0]+I+E[1];if(o<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var C;return C=T?u(t,n,o,p,A):A.map(function(e){return g(t,n,o,p,e,T)}),t.seen.pop(),d(C,I,E)}function l(t,e){if(N(e))return t.stylize("undefined","undefined");if(f(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return T(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,o,i){for(var r=[],A=0,a=e.length;A-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),N(A)){if(r&&i.match(/^\d+$/))return a;A=JSON.stringify(""+i),A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=t.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=t.stylize(A,"string"))}return A+": "+a}function d(t,e,n){var o=0,i=t.reduce(function(t,e){return o++,e.indexOf("\n")>=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function M(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function h(t){return null===t}function I(t){return null==t}function T(t){return"number"==typeof t}function f(t){return"string"==typeof t}function E(t){return"symbol"==typeof t}function N(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===B(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===B(t)}function D(t){return C(t)&&("[object Error]"===B(t)||t instanceof Error)}function x(t){return"function"==typeof t}function b(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function B(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function m(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function Q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;e.format=function(t){if(!f(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return t}}),a=o[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function A(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function s(t){return i(t,2)^i(t,13)^i(t,22)}function l(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^r(t,3)}function u(t){return i(t,17)^i(t,19)^r(t,10)}var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,i,r,d,M,p,h,I,T=this._w;e=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,r=0|this._e,d=0|this._f,M=0|this._g,p=0|this._h;for(var f=0;f<64;f++){var E=T[f]=f<16?t.readInt32BE(4*f):u(T[f-2])+T[f-7]+c(T[f-15])+T[f-16];h=p+l(r)+A(r,d,M)+g[f]+E,I=s(e)+a(e,n,o),p=M,M=d,d=r,r=i+h,i=o,o=n,n=e,e=h+I}this._a=e+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=r+this._e|0,this._f=d+this._f|0,this._g=M+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=s,e.call(this,128,112)}function i(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function A(t,e,n){return t&e^t&n^e&n}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,s,l,c,u,g,d,M,p,h,I,T,f,E,N=this._w;e=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,l=0|this._e,c=0|this._f,u=0|this._g,g=0|this._h,d=0|this._al,M=0|this._bl,p=0|this._cl,h=0|this._dl,I=0|this._el,T=0|this._fl,f=0|this._gl,E=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=N[D]=t.readInt32BE(4*D),y=N[D+1]=t.readInt32BE(4*D+4);else{var x=N[D-30],b=N[D-30+1],B=i(x,b,1)^i(x,b,8)^x>>>7,L=i(b,x,1)^i(b,x,8)^i(b,x,7);x=N[D-4],b=N[D-4+1];var m=i(x,b,19)^i(b,x,29)^x>>>6,Q=i(b,x,19)^i(x,b,29)^i(b,x,6),j=N[D-14],v=N[D-14+1],U=N[D-32],S=N[D-32+1];y=L+v,C=B+j+(y>>>0>>0?1:0),y+=Q,C=C+m+(y>>>0>>0?1:0),y+=S,C=C+U+(y>>>0>>0?1:0),N[D]=C,N[D+1]=y}var k=A(e,n,o),z=A(d,M,p),Y=i(e,d,28)^i(d,e,2)^i(d,e,7),R=i(d,e,28)^i(e,d,2)^i(e,d,7),F=i(l,I,14)^i(l,I,18)^i(I,l,9),O=i(I,l,14)^i(I,l,18)^i(l,I,9),V=a[D],H=a[D+1],G=r(l,c,u),P=r(I,T,f),X=E+O,W=g+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=H,W=W+V+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+z,Z=Y+k+(J>>>0>>0?1:0);g=u,E=f,u=c,f=T,c=l,T=I,I=h+X|0,l=s+W+(I>>>0>>0?1:0)|0,s=o,h=p,o=n,p=M,n=e,M=d,d=X+J|0,e=W+Z+(d>>>0>>0?1:0)|0}this._al=this._al+d|0,this._bl=this._bl+M|0,this._cl=this._cl+p|0,this._dl=this._dl+h|0,this._el=this._el+I|0,this._fl=this._fl+T|0,this._gl=this._gl+f|0,this._hl=this._hl+E|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+o+(this._cl>>>0

    >>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+l+(this._el>>>0>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+g+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,o){n.writeInt32BE(t,o),n.writeInt32BE(e,o+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function o(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,o=-271733879,i=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return o<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,o,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var o=t.length+(r-t.length%r);t=e.concat([t,A],o)}for(var i=[],a=n?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=p(t),i=8*t.length,r=8*t.length;o[i>>>5]|=128<<24-i%32,o[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var A=0;A>>24)|4278255360&(a<<24|a>>>8)}var s=h(n);return new e(s)}t.exports=s;var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,o=0;n>>5]|=t[n]<<24-o%32;return e},h=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},I=function(t,e,s){for(var p=0;p<16;p++){var h=s+p,I=e[h];e[h]=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8)}var T,f,E,N,w,C,y,D,x,b;C=T=t[0],y=f=t[1],D=E=t[2],x=N=t[3],b=w=t[4];for(var B,p=0;p<80;p+=1)B=T+e[s+l[p]]|0,B+=p<16?n(f,E,N)+d[0]:p<32?o(f,E,N)+d[1]:p<48?i(f,E,N)+d[2]:p<64?r(f,E,N)+d[3]:A(f,E,N)+d[4],B|=0,B=a(B,u[p]),B=B+w|0,T=w,w=N,N=a(E,10),E=f,f=B,B=C+e[s+c[p]]|0,B+=p<16?A(y,D,x)+M[0]:p<32?r(y,D,x)+M[1]:p<48?i(y,D,x)+M[2]:p<64?o(y,D,x)+M[3]:n(y,D,x)+M[4],B|=0,B=a(B,g[p]),B=B+b|0,C=b,b=x,x=a(D,10),D=y,y=B;B=t[1]+E+x|0,t[1]=t[2]+N+b|0,t[2]=t[3]+w+C|0,t[3]=t[4]+T+y|0,t[4]=t[0]+f+D|0,t[0]=B}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function o(t,n){if(!(this instanceof o))return new o(t,n);this._opad=s,this._alg=t;var A="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>A?n=i(t).update(n).digest():n.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");M.copy(l,0,0,a);for(var p=1;pe&&(e=i)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,o){e.push(l.default.createElement("button",{type:"button",key:o,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},l.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,o="modal-dialog"+(n?" modal-lg":"");return l.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},l.default.createElement("div",{className:o},l.default.createElement("div",{className:"modal-content"},l.default.createElement("div",{className:"modal-header"},l.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),l.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,l.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),l.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),l.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=g},,,,,,,,,,,,,function(t,e,n){var o=n(320);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box;text-align:left}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;*border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{filter:progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-o-linear-gradient(top,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:\"\\2191\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu>.dropdown-menu.drop-left{left:-80%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:\" \"}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context-up:before,.dropdown-context:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.dropdown-context-up:after,.dropdown-context:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.dropdown-context-up:after,.dropdown-context-up:before{top:auto;bottom:-7px;z-index:9999}.dropdown-context-up:before{border-right:7px solid transparent;border-top:7px solid #ccc;border-bottom:none;border-left:7px solid transparent}.dropdown-context-up:after{border-right:6px solid transparent;border-top:6px solid #fff;border-left:6px solid transparent;border-bottom:none}.dropdown-context-sub:after,.dropdown-context-sub:before,.dropdown-context .dropdown-submenu:hover .dropdown-menu,.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:none}.compressed-context a{padding-left:14px;padding-top:0;padding-bottom:0;font-size:13px}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}",""])},function(t,e,n){var o=n(322);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".rule-delete{color:#f44336;vertical-align:text-top;cursor:pointer}.rule-text-editor{width:260px;display:inline-block;height:26px;padding:3px}.rule-property{padding-right:10px;padding-left:10px;line-height:28px;display:inline-block;border:1px solid gray;margin-left:5px}.rule-add-property{cursor:pointer;padding-left:10px;line-height:30px;color:blue}.rule-property-del{padding:5px;cursor:pointer;color:#ff0600}.rule-add-action{color:blue;cursor:pointer;padding-left:5px;padding-bottom:5px}.rule-action{padding:1px;line-height:27px}.rule-delete-action{font-size:10pt;cursor:pointer;color:#ff9800}.rule-join-node{color:#795548;font-size:10pt;vertical-align:text-top;margin-left:2px}.rule-join-container{border:1px solid #999;padding:1px;background:#fff}",""])},function(t,e){"use strict";!function(t){window.URule||(window.URule={}),URule.setDomContent=function(t,e){navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent",e):t.prop("innerText",e)},URule.getDomContent=function(t){return navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent"):t.prop("innerText")}}($)},,,function(t,e){"use strict";!function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(e,n){var o,i=t,r=[];if(n=n||i.length,e)for(o=0;o>=4,o[r]=n[19==r?3&e|8:e]);return o.join("")},Math.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}}()},function(t,e){"use strict";window.Remark=function(t){this.remark="",this.defaultRemark="请输入备注内容",this.init(t)},Remark.prototype.init=function(t){var e=$("

    备注
    ");t.append(e);var n=$("");e.append(n);var o=$("
    ");t.append(o),this.remarkLabel=$("
    "+this.defaultRemark+"
    "),o.append(this.remarkLabel),this.remarkEditor=$(""),o.append(this.remarkEditor),this.remarkEditor.hide();var i=this;this.remarkLabel.click(function(){i.remarkEditor.show(),i.remarkEditor.focus(),i.remarkLabel.hide()}),this.remarkEditor.change(function(){i.remark=$(this).val(),""===i.remark?i.remarkLabel.text(i.defaultRemark):i.remarkLabel.html(i.parseBreak(i.remark)),window.setDirty&&window.setDirty(),window._setDirty&&window._setDirty()}),this.remarkEditor.blur(function(){i.remarkEditor.hide(),i.remarkLabel.show()}),e.click(function(){o.collapse("toggle")}),o.on("show.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-right"),n.addClass("glyphicon-circle-arrow-down")}),o.on("hide.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-down"),n.addClass("glyphicon-circle-arrow-right")}),o.collapse("hide")},Remark.prototype.setData=function(t){t&&""!==t&&(this.remark=t,this.remarkEditor.val(t),this.remarkLabel.html(this.parseBreak(t)))},Remark.prototype.toXml=function(){return""},Remark.prototype.parseBreak=function(t){return t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("\n","gm"),"
    ")}},function(t,e,n){"use strict";var o=n(241);window._ConstantValueArray=[],window._ActionTypeArray=[],window._VariableValueArray=[],window._ParameterValueArray=[],window._FunctionValueArray=[],window.actionLibraries=[],window.variableLibraries=[],window.constantLibraries=[],window.parameterLibraries=[],window.urule={},window.generateContainer=function(){var t=$(".");return t.css({height:"20px",cursor:"pointer",margin:"0px",color:"white",border:"dashed transparent 1px"}),t.mouseover(function(){t.css({border:"dashed gray 1px"})}),t.mouseout(function(){t.css({border:"dashed transparent 1px"})}),t},window.refreshParameterLibraries=function(){for(var t="",e=0;e"),e=o[0],this._dom=e,n=this.menuItems;var i=this;if(n.length>20){var r=$("
    ");r.append(" "),this.search=$(""),r.append(this.search),o.append(r),this.search.click(function(t){t.stopPropagation()}),this.search.dblclick(function(t){t.stopPropagation()}),this.search.keypress(function(t){var e=t.keyCode?t.keyCode:t.which;if("13"===e||13===e){var o=$(this).val();if(!i.oldSearchValue||i.oldSearchValue!==o){for(i.oldSearchValue=o;i.menuItems.length>0;)i.menuItems[0].remove();for(var r=0;r-1&&i.addMenuItem(A):i.addMenuItem(A)}}}})}this.menuItems=[];for(var A=0;A$("html").height()+10&&t.pageY>r?e.addClass("dropdown-context-up").css({top:t.pageY-20-r,left:t.pageX-13}).fadeIn(this.fadeSpeed):e.css({top:t.pageY+10,left:t.pageX-13}).fadeIn(this.fadeSpeed)}this.onShow&&this.onShow(this)},URule.menu.Menu.prototype.hide=function(){var t=$(this._dom);t.is(":visible")&&(this.onHide&&this.onHide(this),t.fadeOut(this.fadeSpeed,function(){t.css({display:""}).find(".drop-left").removeClass("drop-left")}),this.parent&&this.parent.parent.hide())},URule.menu.MenuItem=function(t){URule.menu.MenuItem.prototype.superClass.call(this,t),$.extend(this,t)},URule.menu.MenuItem.prototype=new URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.superClass=URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.constructor=URule.menu.MenuItem,URule.menu.MenuItem.prototype.createDom=function(){var t,e,n;return n=this,t=$("
  • "),this._dom=t[0],e=this.icon?" "+this.label:this.label,t.on("mouseenter",function(){t.siblings(".dropdown-submenu").each(function(){$(this).find("ul.dropdown-context-sub").each(function(){var t=$(this).data("ref");$(this).fadeOut(t.fadeSpeed)})})}),"divider"===this.type?(t.addClass("divider"),t.append(e)):"header"==this.type?(t.addClass("nav-header"),t.append(e)):(t.append(""+e+""),this.subMenu&&this.setSubMenu(this.subMenu)),n.onClick&&(this.parent&&this.parent.search?(t.click(function(t){t.stopPropagation()}),t.dblclick(function(t){n.onClick(n,{event:t}),t.preventDefault(),t.stopPropagation(),n.parent.hide()})):t.click(function(t){t.preventDefault(),t.stopPropagation(),n.onClick(n,{event:t}),n.parent.hide()})),t[0]},URule.menu.MenuItem.prototype.setSubMenu=function(t){var e,n;return n=this,e=n.getDom(),t instanceof URule.menu.Menu?n.subMenu=t:n.subMenu=new URule.menu.Menu(t),n.subMenu.parent=this,$(e).attr("class","dropdown-submenu").on("mouseenter",function(){ +var t=$(this).find(".dropdown-context-sub:first"),e=t.width(),o=t.offset().left,i=e+o>window.innerWidth;i&&t.addClass("drop-left"),$(n.subMenu.getDom()).fadeIn(n.subMenu.fadeSpeed)}),this.subMenu.render(e),$(this.subMenu.getDom()).addClass("dropdown-context-sub"),this.subMenu},URule.menu.MenuItem.prototype.remove=function(){URule.menu.MenuItem.prototype.superClass.prototype.remove.call(this);var t;t=this.parent.menuItems.indexOf(this),this.parent.menuItems.splice(t,1)},URule.menu.MenuItem.prototype.show=function(){$(this._dom).show()},URule.menu.MenuItem.prototype.hide=function(){$(this._dom).hide()},$(document).on("dblclick","html",function(){$(".dropdown-context").each(function(){var t;t=$(this).data("ref"),t.hide()})}),URule.menu.AbstractMenu.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",function(t){t.preventDefault()})}()},,,function(t,e){"use strict";urule.ComparisonOperator=function(t){this.inputType=null,this.operator="",this.container=generateContainer(),URule.setDomContent(this.container,"请选择比较操作符"),this.container.css({"font-size":"13px",color:"red",fontWeight:"bold","margin-right":"3px"});var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({onHide:function(){t()},menuItems:[{label:"大于",name:"GreaterThen",onClick:n},{label:"大于或等于",name:"GreaterThenEquals",onClick:n},{label:"小于",name:"LessThen",onClick:n},{label:"小于或等于",name:"LessThenEquals",onClick:n},{label:"等于",name:"Equals",onClick:n},{label:"等于(不分大小写)",name:"EqualsIgnoreCase",onClick:n},{label:"开始于",name:"StartWith",onClick:n},{label:"不开始于",name:"NotStartWith",onClick:n},{label:"结束于",name:"EndWith",onClick:n},{label:"不结束于",name:"NotEndWith",onClick:n},{label:"不等于",name:"NotEquals",onClick:n},{label:"不等于(不分大小写)",name:"NotEqualsIgnoreCase",onClick:n},{label:"在集合",name:"In",onClick:n},{label:"不在集合",name:"NotIn",onClick:n},{label:"为空",name:"Null",onClick:n},{label:"不为空",name:"NotNull",onClick:n},{label:"匹配正则表达式",name:"Match",onClick:n},{label:"不匹配正则表达式",name:"NotMatch",onClick:n},{label:"包含",name:"Contain",onClick:n},{label:"不包含",name:"NotContain",onClick:n}]}),this.container.click(function(t){e.menu.show(t)})},urule.ComparisonOperator.prototype.initRightValue=function(t){this.inputType&&this.inputType.setValueType(t.valueType,t)},urule.ComparisonOperator.prototype.setOperator=function(t){switch(t){case"GreaterThen":this.operator="GreaterThen",URule.setDomContent(this.container,"大于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"GreaterThenEquals":this.operator="GreaterThenEquals",URule.setDomContent(this.container,"大于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThen":this.operator="LessThen",URule.setDomContent(this.container,"小于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThenEquals":this.operator="LessThenEquals",URule.setDomContent(this.container,"小于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"StartWith":this.operator="StartWith",URule.setDomContent(this.container,"开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Equals":this.operator="Equals",URule.setDomContent(this.container,"等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EqualsIgnoreCase":this.operator="EqualsIgnoreCase",URule.setDomContent(this.container,"等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotStartWith":this.operator="NotStartWith",URule.setDomContent(this.container,"不开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EndWith":this.operator="EndWith",URule.setDomContent(this.container,"结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEndWith":this.operator="NotEndWith",URule.setDomContent(this.container,"不结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEquals":this.operator="NotEquals",URule.setDomContent(this.container,"不等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEqualsIgnoreCase":this.operator="NotEqualsIgnoreCase",URule.setDomContent(this.container,"不等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"In":this.operator="In",URule.setDomContent(this.container,"在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"NotIn":this.operator="NotIn",URule.setDomContent(this.container,"不在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"Null":this.operator="Null",URule.setDomContent(this.container,"为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"NotNull":this.operator="NotNull",URule.setDomContent(this.container,"不为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"Match":this.operator="Match",URule.setDomContent(this.container,"匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotMatch":this.operator="NotMatch",URule.setDomContent(this.container,"不匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Contain":this.operator="Contain",URule.setDomContent(this.container,"包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotContain":this.operator="NotContain",URule.setDomContent(this.container,"不包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType}window._setDirty()},urule.ComparisonOperator.prototype.getOperator=function(){if(""==this.operator)throw"请选择比较操作符!";return this.operator},urule.ComparisonOperator.prototype.getInputType=function(){return this.inputType},urule.ComparisonOperator.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ComplexArithmetic=function(t){this.container=$(""),this.operator="",this.rule=t,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod"}),this.container.append(this.selectorLabel),this.nextType=null;var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:n},{label:"-",name:"Sub",onClick:n},{label:"x",name:"Mul",onClick:n},{label:"÷",name:"Div",onClick:n},{label:"%",name:"Mod",onClick:n},{label:"删除",onClick:function(){window._setDirty(),e.nextType&&(e.nextType.getContainer().remove(),e.nextType=null,URule.setDomContent(e.selectorLabel,"."),e.selectorLabel.css({color:"#fff","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.ComplexArithmetic.prototype.setOperator=function(t){switch(window._setDirty(),this.operator=t,this.info="",t){case"Add":this.info="+";break;case"Sub":this.info="-";break;case"Mul":this.info="x";break;case"Div":this.info="÷";break;case"Mod":this.info="%"}URule.setDomContent(this.selectorLabel,this.info),this.selectorLabel.css({color:"green","padding-left":"4px","padding-right":"4px"}),this.nextType||(this.nextType=new urule.NextType(this.rule),this.container.append(this.nextType.getContainer()))},urule.ComplexArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.nextType.initData(t)}},urule.ComplexArithmetic.prototype.getDisplayContainer=function(){if(this.nextType){var t=$(""+this.info+"");return t.append(this.nextType.getDisplayContainer()),t}return null},urule.ComplexArithmetic.prototype.toXml=function(){if(!this.nextType)return"";var t='';return t+=this.nextType.toXml(),t+=""},urule.ComplexArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.VariableValue=function(t,e,n,o){this.arithmetic=t,this.container=$("");this.label=generateContainer(),this.functionProperty=o,this.container.append(this.label),this.label.css({color:"darkcyan"}),URule.setDomContent(this.label,"请选择变量"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._VariableValueArray.push(this),this.act=n,this.initMenu()},urule.VariableValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.variableLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.VariableValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.VariableValue.prototype.initMenu=function(t){var e=window._uruleEditorVariableLibraries;if(t&&(e=t),e){var n,o,i,r;n=this,o=function(t){n.setValue({variableCategory:t.label,variables:t.variables})},i=function(t){n.setValue({variables:t.parent.parent.variables,variableCategory:t.parent.parent.label,variableLabel:t.label,variableName:t.name,datatype:t.datatype})},r={menuItems:[]},$.each(e,function(t,e){$.each(e,function(t,e){var A=e.variables;n.functionProperty&&n.category&&e.name==n.category&&n.functionProperty.initMenu(A);var a={label:e.name,variables:A,onClick:o};$.each(A||[],function(t,e){if(a.subMenu||(a.subMenu={menuItems:[]}),n.matchAct(e.act)){var o={name:e.name,label:e.label,datatype:e.type,act:e.act,variables:A,onClick:i};a.subMenu.menuItems.push(o)}}),r.menuItems.push(a)})}),n.menu?n.menu.setConfig(r):n.menu=new URule.menu.Menu(r),this.label.click(function(t){n.menu.show(t)})}},urule.VariableValue.prototype.setValue=function(t){this.category=t.variableCategory,this.variableName=t.variableName,this.variableLabel=t.variableLabel,this.datatype=t.datatype,this.functionProperty&&this.functionProperty.initMenu(t.variables),this.variableLabel?URule.setDomContent(this.label,this.category+"."+this.variableLabel):URule.setDomContent(this.label,this.category),window._setDirty()},urule.VariableValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.VariableValue.prototype.toXml=function(){if(!this.category||""==this.category)throw"变量不能为空!";var t='var-category="'+this.category+'"';return this.variableName&&(t+=' var="'+this.variableName+'" var-label="'+this.variableLabel+'" datatype="'+this.datatype+'"'),t},urule.VariableValue.prototype.getType=function(){return this.variableName?"Variable":"VariableCategory"},urule.VariableValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ResourceListDialog=function(t,e,n){this.type=t,this.select=e,this.doSuccess=n,this.init()},urule.ResourceListDialog.prototype.open=function(){this.initData(),this.dialog.dialog("open")},urule.ResourceListDialog.prototype.close=function(){this.dialog.dialog("close")},urule.ResourceListDialog.prototype.getSelectedFile=function(){var t=!1,e=null,n=this.tree.getSelectedNodes();return n&&n.length>0&&(e=n[0],e.isParent||(t=!0)),t?e.fullPath:(URule.alert("请先选择一个库文件!"),null)},urule.ResourceListDialog.prototype.init=function(){var t=this;this.dialog=$("
    "),this.treeContainer=$("
    "),this.dialog.append(this.treeContainer),this.dialog.dialog({title:"库列表",height:500,width:400,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var e=t.getSelectedFile();e&&t.doSelectFile(e)}},{text:"选择版本",click:function(){var e=t.getSelectedFile();if(e){var n=new urule.ResourceVersionDialog(e);n.open(function(e){t.doSelectFile(e)})}}},{text:"取消",click:function(){$(this).dialog("close")}}]})},urule.ResourceListDialog.prototype.doSelectFile=function(t){var e="jcr:"+t;if(this.doSuccess)return this.doSuccess(this.type,e),void this.dialog.dialog("close");var n=!1;if(this.select.each(function(){$(this.childNodes).each(function(){var t=this.textContent;t==e&&(n=!0)})}),n)URule.alert("当前库文件已被添加!");else{var o=this,i=$(""+e+"");i.click(function(){o.select.find(".active").removeClass("active"),i.addClass("active")}),this.select.append(i),this.dialog.dialog("close")}},urule.ResourceListDialog.prototype.initData=function(){var t=this,e=(uruleServer||"")+"urule?action=loadrepo&filetype="+this.type+"&path="+t.getRequestParameter("file");$.ajax({cache:!1,dataType:"json",url:e,error:function(t,e){URule.alert("加载资源失败:"+e)},success:function(e){t.tree=$.fn.zTree.init(t.treeContainer,{},e)}})},urule.ResourceListDialog.prototype.getRequestParameter=function(t){for(var e=null,n=window.location.search.substring(1).split("&"),o=0;o");var t='';t+="",t+='',t+='',t+='',t+='',t+="
    版本号创建人创建时间
    ",this.table=$(t);var e="urule?action=loadversion&file="+this.path;this.table.bootstrapTable({url:e,onLoadSuccess:function(){n.table.css("margin-top","")}}),this.dialog.append(this.table);var n=this;this.dialog.dialog({title:"版本列表【"+n.path+"】",height:400,width:700,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var t=n.table.bootstrapTable("getSelections");return 0==t.length?void URule.alert("请选择一个版本!"):(n.doSuccess(n.path+":"+t[0].name),void $(this).dialog("close"))}},{text:"取消",click:function(){$(this).dialog("close")}}]})}},function(t,e){"use strict";urule.ConstantValue=function(t,e){this.arithmetic=t,this.container=$(""),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#0174DF"}),this.label.prop("innerText","请选择常量"),t&&this.container.append(t.getContainer()),e&&(this.setValue(e),t.initData(e.arithmetic)),this.initMenu(),window._ConstantValueArray.push(this)},urule.ConstantValue.prototype.setValue=function(t){this.category=t.constantCategory,this.constantName=t.constantName,this.constantLabel=t.constantLabel,URule.setDomContent(this.label,this.category+"."+this.constantLabel),window._setDirty()},urule.ConstantValue.prototype.initMenu=function(t){var e=window._uruleEditorConstantLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({constantCategory:t.parent.parent.label,constantLabel:t.label,constantName:t.name})},i={menuItems:[]},$.each(e,function(t,e){var n=e.categories;$.each(n,function(t,e){var n={label:e.label},r=e.constants;$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.name,label:e.label,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ConstantValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.constantLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ConstantValue.prototype.toXml=function(){if(!this.category)throw"常量不能为空!";var t='const-category="'+this.category+'" const="'+this.constantName+'" const-label="'+this.constantLabel+'"';return t},urule.ConstantValue.prototype.getContainer=function(){return this.container}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigActionDialog=function(t){this.parent=t,this.init()},urule.ConfigActionDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("动作库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ActionLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.actionLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("动作库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.actionLibraries.push(o),window.refreshActionLibraries(),void window._setDirty())}})}}])},urule.ConfigActionDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    动作库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.actionLibraries.indexOf(t);window.actionLibraries.splice(n,1),e.remove(),window.refreshActionLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var i=n(240),r=o(i);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigConstantDialog=function(t){this.parent=t,this.init()},urule.ConfigConstantDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("常量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ConstantLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.constantLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("常量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.constantLibraries.push(o),window.refreshConstantLibraries(),void window._setDirty())}})}}])},urule.ConfigConstantDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    常量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.constantLibraries.indexOf(t);window.constantLibraries.splice(n,1),e.remove(),window.refreshConstantLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigParameterDialog=function(t){this.parent=t,this.init()},urule.ConfigParameterDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("参数库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ParameterLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.parameterLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("参数库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.parameterLibraries.push(o),window.refreshParameterLibraries(),void window._setDirty())}})}}])},urule.ConfigParameterDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    参数库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.parameterLibraries.indexOf(t);window.parameterLibraries.splice(n,1),e.remove(),window.refreshParameterLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigVariableDialog=function(t){this.parent=t,this.init()},urule.ConfigVariableDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("变量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"VariableLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.variableLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("变量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.variableLibraries.push(o),window.refreshVariableLibraries(),void window._setDirty())}})}}])},urule.ConfigVariableDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    变量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.variableLibraries.indexOf(t);window.variableLibraries.splice(n,1),e.remove(),window.refreshVariableLibraries(),window._setDirty()}),e.append(n),e}},function(t,e){"use strict";urule.ActionType=function(t,e){this.uuid=Math.uuid(),t.prop("id",this.uuid),this.rule=e,this.parentContainer=t,this.type="",this.init(),window._ActionTypeArray.push(this),this.initMenu()},urule.ActionType.prototype.toXml=function(){if("execute-function"==this.type){var t="",t+=this.action.getParameter().toXml(),t+=""}return this.action.toXml()},urule.ActionType.prototype.initData=function(t){if(t){var e=t.actionType;this.setAction(e,t)}},urule.ActionType.prototype.init=function(){this.container=generateContainer(),URule.setDomContent(this.container,"请选择动作类型"),this.container.css({color:"green"}),this.parentContainer.append(this.container),this.action=null},urule.ActionType.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction("ExecuteMethod",{beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[{label:"打印内容到控制台",onClick:function(){n.setAction("ConsolePrint")}},{label:"变量赋值",onClick:function(){n.setAction("VariableAssign")}},{label:"执行函数",onClick:function(){n.setAction("ExecuteCommonFunction")}}]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.container.click(function(t){n.menu.show(t)})},urule.ActionType.prototype.initDefaultMenuData=function(){var t=this,e=[];return e.push({name:"打印内容到控制台",fun:function(){t.setAction("ConsolePrint")}}),e.push({name:"变量赋值",fun:function(){t.setAction("VariableAssign")}}),e},urule.ActionType.prototype.setAction=function(t,e){switch(window._setDirty(),this.action&&this.action.getContainer().remove(),t){case"ConsolePrint":this.action=new urule.PrintAction(this.rule),URule.setDomContent(this.container,"输出:"),this.type="console-print";break;case"ExecuteMethod":this.action=new urule.MethodAction(this.rule),URule.setDomContent(this.container,"执行方法:"),this.type="execute-method";break;case"VariableAssign":this.action=new urule.AssignmentAction(this.rule),URule.setDomContent(this.container,"变量赋值:"),this.type="var-assign";break;case"ExecuteCommonFunction":this.action=new urule.FunctionValue(null,null,this.rule),URule.setDomContent(this.container,"执行函数:"),this.type="execute-function"}this.parentContainer.append(this.action.getContainer()),this.action.initData(e)}},function(t,e){"use strict";urule.PrintAction=function(t){this.container=$(""),this.beforeContainer=$(""),URule.setDomContent(this.beforeContainer,""),this.container.append(this.beforeContainer),this.inputType=new urule.InputType(null,null,null,t),this.inputTypeContainer=this.inputType.getContainer(),this.container.append(this.inputTypeContainer),this.afterContainer=$(""),URule.setDomContent(this.afterContainer,""),this.container.append(this.afterContainer)},urule.PrintAction.prototype.initData=function(t){if(t){var e=t.value;e&&this.inputType.setValueType(e.valueType,e)}},urule.PrintAction.prototype.toXml=function(){var t="";return t+=this.inputType.toXml(),t+=""},urule.PrintAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.AssignmentAction=function(t){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"请选择值类型"),this.label.css({color:"blue"}),this.valueContainer=$(""),this.container.append(this.valueContainer),this.leftVariable=new urule.VariableValue(null,null,"Out"),this.leftParameter=new urule.ParameterValue(null,null,"Out"),this.leftReference=new urule.NamedReferenceValue(null,null,t),this.valueContainer.append(this.leftVariable.getContainer()),this.valueContainer.append(this.leftParameter.getContainer()),this.valueContainer.append(this.leftReference.getContainer()),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide();var e=$("");URule.setDomContent(e,"="),e.css({color:"red",fontWeight:"blod"}),this.container.append(e),this.inputType=new urule.InputType(null,null,null,t),this.container.append(this.inputType.getContainer());var n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){n.leftParameter.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftVariable.getContainer().show(),n.type="variable",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}},{label:"选择参数",onClick:function(){n.leftVariable.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftParameter.getContainer().show(),n.type="parameter",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}}]}),this.label.click(function(t){n.menu.show(t)})},urule.AssignmentAction.prototype.initData=function(t){if(t){this.type=t.type,this.type&&"parameter"==this.type?(this.leftParameter.setValue(t),this.leftVariable.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftParameter.getContainer().show()):this.type&&"NamedReference"==this.type?(this.leftReference.initData(t),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().show()):(this.type="variable",this.leftVariable.setValue(t),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftVariable.getContainer().show());var e=t.value;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}URule.setDomContent(this.label,"."),this.label.css({color:"white"})}},urule.AssignmentAction.prototype.toXml=function(){var t="',t+=this.inputType.toXml(),t+=""},urule.AssignmentAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleArithmetic=function(){this.container=$(""),this.selectorLabel=generateContainer(),URule.setDomContent(this.selectorLabel,"."),this.selectorLabel.css({color:"#FFF"}),this.operator="",this.container.append(this.selectorLabel),this.value=null;var t=this,e=function(e){t.setOperator(e.name)};t.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:e},{label:"-",name:"Sub",onClick:e},{label:"x",name:"Mul",onClick:e},{label:"÷",name:"Div",onClick:e},{label:"%",name:"Mod",onClick:e},{label:"删除",onClick:function(){t.value&&(t.value.getContainer().remove(),t.operator=null,t.value=null,URule.setDomContent(t.selectorLabel,"."),t.selectorLabel.css({color:"#FFF","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(e){t.menu.show(e)})},urule.SimpleArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.value.initData(t.value)}},urule.SimpleArithmetic.prototype.setOperator=function(t){window._setDirty(),this.operator=t;var e="";switch(t){case"Add":e="+";break;case"Sub":e="-";break;case"Mul":e="x";break;case"Div":e="÷";break;case"Mod":e="%"}this.selectorLabel.css({color:"green",fontWeight:"blod","padding-left":"5px","padding-right":"5px"}),URule.setDomContent(this.selectorLabel,e),this.value||(this.simpleArithmetic=new urule.SimpleArithmetic,this.value=new urule.SimpleValue(this.simpleArithmetic),this.container.append(this.value.getContainer()))},urule.SimpleArithmetic.prototype.toXml=function(){if(!this.operator||""==this.operator)return"";if(!this.value)throw"请输入具体值!";var t=this.value.getValue();if(""==t)throw"请输入具体值!";var e='';return e+=this.simpleArithmetic.toXml(),e+=""},urule.SimpleArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.RuleProperty=function(t,e,n,o){this.parent=t,this.value=n,this.editorType=o,this.container=$("");var i=$("");this.name=e;var r=this.getLabel();URule.setDomContent(i,r+":"),this.container.append(i);var A=$(""),a=generateContainer();""==n&&(n="无"),a.css({color:"#000"}),URule.setDomContent(a,n),A.append(a),this.container.append(A);var s=null;this.radioName=Math.uuid(15),this.yesRadio=null,this.noRadio=null,1==o?s=$(""):2==o?s=$(""):3==o&&(this.yesRadio=$(" 是 "), +this.noRadio=$(" 否"));var l=this;if(3!=o){if(s.blur(function(){l.value=s.prop("value"),s.hide(),""==l.value?URule.setDomContent(a,"无"):URule.setDomContent(a,l.value),a.show(),window._setDirty()}),a.click(function(){a.hide(),s.prop("value",l.value),s.show(),s.focus()}),this.container.append(s),s.hide(),2==o&&"无"!==n){new Date(n);this.value=n,URule.setDomContent(a,this.value)}}else 1==n?this.yesRadio.prop("checked",!0):this.noRadio.prop("checked",!0),this.yesRadio.change(function(){window._setDirty()}),this.noRadio.change(function(){window._setDirty()}),a.hide(),this.container.append(this.yesRadio),this.container.append(this.noRadio);var c=$('');c.click(function(){l.container.remove();var t=l.parent.properties.indexOf(l);l.parent.properties.splice(t,1),window._setDirty()}),this.container.append(c)},urule.RuleProperty.prototype.getLabel=function(){var t="";return"salience"==this.name?t="优先级":"loop"==this.name?t="允许循环触发":"effective-date"==this.name?t="生效日期":"expires-date"==this.name?t="失效日期":"enabled"==this.name?t="是否启用":"debug"==this.name?t="允许调试信息输出":"activation-group"==this.name?t="互斥组":"agenda-group"==this.name?t="执行组":"auto-focus"==this.name?t="自动获取焦点":"ruleflow-group"==this.name&&(t="规则流组"),t},urule.RuleProperty.prototype.toXml=function(){var t=this.name;if(3==this.editorType)t+=this.yesRadio.prop("checked")?'="true"':'="false"';else{if(!this.value||""==this.value)throw"请输入属性"+this.name+"的具体值!";t+='="'+this.value+'"'}return t},urule.RuleProperty.prototype.getContainer=function(){return this.container}},,,function(t,e){"use strict";urule.InputType=function(t,e,n,o){this.container=$(""),this.label=generateContainer(),this.rule=o,this.container.append(this.label),e?(URule.setDomContent(this.label,e),this.label.css({color:"gray"})):(URule.setDomContent(this.label,"选择值类型"),this.label.css({color:"blue"})),this.functionProperty=n,this.variableValue=null,this.simpleValue=null,this.referenceValue=null,this.methodValue=null,this.constantValue=null,this.functionValue=null,this.dataContainer=$(""),this.container.append(this.dataContainer),this.type="";var i=this,r=function(t){i.setValueType(t.name)};if(i.menu=new URule.menu.Menu({menuItems:[{label:"输入值",name:"Input",onClick:r},{label:"选择变量",name:"Variable",onClick:r},{label:"选择常量",name:"Constant",onClick:r},{label:"选择参数",name:"Parameter",onClick:r}]}),i.menu.menuItems.push({label:"选择方法",name:"Method",onClick:r},{label:"选择函数",name:"CommonFunction",onClick:r}),this.label.click(function(t){i.menu.show(t)}),t){var A=$(""+t+"");this.container.append(A)}},urule.InputType.prototype.getDisplayContainer=function(){var t=$("");return"Input"==this.type?t.append(this.simpleValue.getDisplayContainer()):"Variable"==this.type||"VariableCategory"==this.type?t.append(this.variableValue.getDisplayContainer()):"Constant"==this.type?t.append(this.constantValue.getDisplayContainer()):"Method"==this.type?t.append(this.methodValue.getDisplayContainer()):"Parameter"==this.type?t.append(this.parameterValue.getDisplayContainer()):"CommonFunction"==this.type?t.append(this.functionValue.getDisplayContainer()):"NamedReference"==this.type&&t.append(this.referenceValue.getDisplayContainer()),t},urule.InputType.prototype.setValueType=function(t,e){switch(window._setDirty(),this.type=t,this.variableValue&&this.variableValue.getContainer().hide(),this.constantValue&&this.constantValue.getContainer().hide(),this.simpleValue&&this.simpleValue.getContainer().hide(),this.referenceValue&&this.referenceValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.parameterValue&&this.parameterValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),URule.setDomContent(this.label,"."),this.label.css({color:"#FDFDFD"}),t){case"Input":this.simpleValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.simpleValue=new urule.SimpleValue(this.arithmetic,e),this.dataContainer.append(this.simpleValue.getContainer())),this.simpleValue.getContainer().show(),this.type="Input";break;case"NamedReference":this.referenceValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.referenceValue=new urule.NamedReferenceValue(this.arithmetic,e,this.rule),this.dataContainer.append(this.referenceValue.getContainer())),this.referenceValue.getContainer().show(),this.type="NamedReference";break;case"Constant":this.constantValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.constantValue=new urule.ConstantValue(this.arithmetic,e),this.dataContainer.append(this.constantValue.getContainer())),this.constantValue.getContainer().show(),this.type="Constant";break;case"Method":this.methodValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.methodValue=new urule.MethodValue(this.arithmetic,e,this.dataContainer),this.dataContainer.append(this.methodValue.getContainer())),this.methodValue.getContainer().show(),this.type="Method";break;case"Parameter":this.parameterValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.parameterValue=new urule.ParameterValue(this.arithmetic,e,"In"),this.dataContainer.append(this.parameterValue.getContainer())),this.parameterValue.getContainer().show(),this.type="Parameter";break;case"CommonFunction":this.functionValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.functionValue=new urule.FunctionValue(this.arithmetic,e,"In"),this.dataContainer.append(this.functionValue.getContainer())),this.functionValue.getContainer().show(),this.type="CommonFunction";break;default:this.variableValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.variableValue=new urule.VariableValue(this.arithmetic,e,"In",this.functionProperty),this.dataContainer.append(this.variableValue.getContainer())),this.variableValue.getContainer().show(),this.type="Variable"}},urule.InputType.prototype.toXml=function(){if(""==this.type)return"";var t=""),this.rule=t,this.inputType=null,this.paren=null,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod",color:"#fff"}),this.container.append(this.selectorLabel),URule.setDomContent(this.selectorLabel,".");var e=this,n=function(t){var n=t.name;e.doNext(n),window._setDirty()};e.menu=new URule.menu.Menu({menuItems:[{label:"值",name:"value",onClick:n},{label:"括号",name:"paren",onClick:n}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.NextType.prototype.initData=function(t){var e=t.value,n=e.valueType;"Paren"==n?(this.doNext("paren"),this.paren.initData(e)):(this.doNext("value"),this.inputType.setValueType(n,e))},urule.NextType.prototype.toXml=function(){return this.paren?this.paren.toXml():this.inputType?this.inputType.toXml():""},urule.NextType.prototype.getDisplayContainer=function(){return this.inputType?this.inputType.getDisplayContainer():this.paren?this.paren.getDisplayContainer():null},urule.NextType.prototype.getContainer=function(){return this.container},urule.NextType.prototype.doNext=function(t){"value"==t?(this.paren&&(this.paren.getContainer().remove(),this.paren=null),this.inputType||(this.inputType=new urule.InputType(null,null,null,this.rule),this.container.append(this.inputType.getContainer()))):"paren"==t&&(this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null),this.paren||(this.paren=new urule.Paren(this.rule),this.container.append(this.paren.getContainer())))}},function(t,e){"use strict";urule.Paren=function(t){this.container=$(""),this.leftParen=$("("),this.leftParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.rightParen=$(")"),this.rightParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.parenContainer=$(""),this.container.append(this.leftParen),this.container.append(this.parenContainer),this.container.append(this.rightParen),this.inputType=new urule.InputType(null,null,null,t),this.parenContainer.append(this.inputType.getContainer()),this.arithmetic=new urule.ComplexArithmetic(t),this.container.append(this.arithmetic.getContainer())},urule.Paren.prototype.initData=function(t){var e=t.value,n=e.valueType;this.inputType.setValueType(n,e),this.arithmetic.initData(t.arithmetic)},urule.Paren.prototype.getDisplayContainer=function(){return this.inputType.getDisplayContainer()},urule.Paren.prototype.toXml=function(){if(!this.inputType)throw"请输入括号内容!";var t="";return t+=this.inputType.toXml(),this.arithmetic&&(t+=this.arithmetic.toXml()),t+=""},urule.Paren.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodParameter=function(t){this.inputType=new urule.InputType(null,null,null,t),this.container=this.inputType.getContainer()},urule.MethodParameter.prototype.initData=function(t){if(t&&(this.name=t.name,this.type=t.type,t.value)){var e=t.value;e.valueType&&this.inputType.setValueType(e.valueType,e)}},urule.MethodParameter.prototype.toXml=function(){var t='';return t+=this.inputType.toXml(),t+=""},urule.MethodParameter.prototype.getContainer=function(){return this.container},urule.MethodParameter.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";urule.MethodAction=function(t){this.parameters=[],this.rule=t,this.init()},urule.MethodAction.prototype.init=function(){this.container=$(""),this.nameContainer=$(""),this.container.append(this.nameContainer),this.nameContainer.css({color:"darkblue"})},urule.MethodAction.prototype.initData=function(t){if(t){this.bean=t.beanId,this.name=t.beanLabel,this.method=t.methodName,this.methodLabel=t.methodLabel;var e=t.parameters;if(this.parameterCount=0,e&&(this.parameterCount=e.length),0===this.parameterCount){URule.setDomContent(this.nameContainer,this.methodLabel);var n=$("(无参数)");this.container.append(n)}else URule.setDomContent(this.nameContainer,this.methodLabel+"(");if(0!=this.parameterCount){for(var o=0;o0){var r=$(";");this.container.append(r)}if(this.parameterCount>0){var A=$(" "+i.name+":");this.container.append(A)}var a=new urule.MethodParameter(this.rule);this.parameters.push(a),this.container.append(a.getContainer()),a.initData(i)}this.container.append(")")}}},urule.MethodAction.prototype.toXml=function(){if(!this.name||""==this.name)throw"请选择要执行的方法!";for(var t='',e=0;e"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#6b3db0"}),URule.setDomContent(this.label,"请选择参数"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._ParameterValueArray.push(this),this.act=n,this.initMenu()},urule.ParameterValue.prototype.getDisplayContainer=function(){var t=$("参数."+this.parameterLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ParameterValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.ParameterValue.prototype.initMenu=function(t){var e=window._uruleEditorParameterLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({variableName:t.name,variableLabel:t.label,datatype:t.datatype})},i={menuItems:[]},$.each(e,function(t,e){$.each(e||[],function(t,e){if(n.matchAct(e.act)){var r={name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:o};i.menuItems.push(r)}})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ParameterValue.prototype.setValue=function(t){this.parameterName=t.variableName,this.parameterLabel=t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.label,"参数."+this.parameterLabel),window._setDirty()},urule.ParameterValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.ParameterValue.prototype.toXml=function(){if(!this.parameterLabel||""==this.parameterLabel)throw"参数不能为空!";var t=' var-category="参数" var="'+this.parameterName+'" var-label="'+this.parameterLabel+'" datatype="'+this.datatype+'"';return t},urule.ParameterValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodValue=function(t,e){this.arithmetic=t,this.container=$(""),this.rightParn=$("]"),this.label=generateContainer(),this.fetchLength=!1,this.uppercase=!1,this.lowercase=!1,this.fetchSize=!1,this.container.append(this.label),this.label.css({color:"blue"}),this.actionContainer=$(""),this.container.append(this.actionContainer),URule.setDomContent(this.label,"请选择方法"),t&&this.container.append(t.getContainer()),e&&(this.setAction(e),t.initData(e.arithmetic)),window._ActionTypeArray.push(this),this.initMenu()},urule.MethodValue.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction({beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.MethodValue.prototype.setAction=function(t){window._setDirty(),this.action&&this.action.getContainer().remove(),this.action=new urule.MethodAction,URule.setDomContent(this.label,"["),this.actionContainer.append(this.action.getContainer()),this.actionContainer.append(this.rightParn),this.action.initData(t)},urule.MethodValue.prototype.getDisplayContainer=function(){var t="",e="";this.action&&(t=this.action.name,e=this.action.methodLabel);var n=$(""+e+"");if(this.arithmetic){var o=this.arithmetic.getDisplayContainer();o&&n.append(o)}return n},urule.MethodValue.prototype.toXml=function(){if(!this.action.bean||""==this.action.name)throw"执行方法不能为空!";var t='bean-name="'+this.action.bean+'"';return t+=' bean-label="'+this.action.name+'"',t+=' method-name="'+this.action.method+'"',t+=' method-label="'+this.action.methodLabel+'"'},urule.MethodValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionProperty=function(){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"选择属性"),this.label.css({color:"#004C85"})},urule.FunctionProperty.prototype.toXml=function(){if(!this.variableName)throw"请选择函数属性";var t='property-name="'+this.variableName+'"';return t+=' property-label="'+this.variableLabel+'"'},urule.FunctionProperty.prototype.initMenu=function(t){if(t){var e=this,n=function(t){e.setProperty({name:t.name,label:t.label,datatype:t.type})},o={menuItems:[]};$.each(t,function(t,e){o.menuItems.push({name:e.name,label:e.label,datatype:e.type,onClick:n})}),this.menu=new URule.menu.Menu(o),this.label.click(function(t){e.menu.show(t)})}},urule.FunctionProperty.prototype.setProperty=function(t){window._setDirty(),this.variableName=t.name,this.variableLabel=t.label,URule.setDomContent(this.label,this.variableLabel)},urule.FunctionProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionParameter=function(t){this.container=$(""),this.nameContainer=$(""),this.rule=t,this.container.append(this.nameContainer),this.nameContainer.css({color:"gray"})},urule.FunctionParameter.prototype.initData=function(t){if(t){this.name=t.name,URule.setDomContent(this.nameContainer,this.name+":"),(t.needProperty||t.property)&&(this.functionProperty=new urule.FunctionProperty,this.functionProperty.setProperty({name:t.property,label:t.propertyLabel})),this.inputType=new urule.InputType(null,null,this.functionProperty,this.rule);var e=t.objectParameter;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}this.container.append(this.inputType.getContainer()),this.functionProperty&&(this.container.append($("")),this.container.append($("属性:")),this.container.append(this.functionProperty.getContainer()))}},urule.FunctionParameter.prototype.toXml=function(){if(!this.name)return"";var t="",t+=this.inputType.toXml(),t+=""},urule.FunctionParameter.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionValue=function(t,e,n){this.arithmetic=t,this.container=$(""),this.rule=n,this.leftParn=$("("),this.rightParn=$(")"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#008080"}),this.functionContainer=$(""),this.container.append(this.functionContainer),URule.setDomContent(this.label,"请选择函数"),t&&this.container.append(t.getContainer()),e&&(this.setFunction(e),t&&t.initData(e.arithmetic)),window._FunctionValueArray.push(this),this.initMenu()},urule.FunctionValue.prototype.getDisplayContainer=function(){var t=$(""+this.functionName+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.FunctionValue.prototype.toXml=function(){if(!this.functionLabel)throw"请选择函数";if(!this.functionName)throw"请选择函数";var t=' function-label="'+this.functionLabel+'"';return t+=' function-name="'+this.functionName+'"'},urule.FunctionValue.prototype.initMenu=function(t){var e=window._uruleEditorFunctionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){n.setFunction({parameter:t.parameter,label:t.label,name:t.name})},i={menuItems:[]},$.each(e||[],function(t,e){i.menuItems.push({name:e.name,label:e.label,parameter:e.argument,onClick:o})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.FunctionValue.prototype.initData=function(t){t&&this.setFunction(t)},urule.FunctionValue.prototype.setFunction=function(t){window._setDirty(),this.functionContainer.empty(),URule.setDomContent(this.label,t.label),this.functionContainer.append(this.leftParn),this.functionLabel=t.label,this.functionName=t.name,this.parameter=new urule.FunctionParameter(this.rule),this.parameter.initData(t.parameter),this.functionContainer.append(this.parameter.getContainer()),this.functionContainer.append(this.rightParn)},urule.FunctionValue.prototype.getFirstParameter=function(){return this.firstParameter},urule.FunctionValue.prototype.getParameter=function(){return this.parameter},urule.FunctionValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleValue=function(t,e){var n="请输入值";this.container=$(""),this.valueContainer=generateContainer(),this.valueContainer.css({color:"rgb(180,95,4)"}),this.editor=$('');var o=this;this.container.append(this.valueContainer).append(this.editor),this.editor.blur(function(){o.editor.hide();var t=o.editor.prop("value");""!=t&&URule.setDomContent(o.valueContainer,t),o.valueContainer.show(),$(this).trigger("DOMSubtreeModified"),window._setDirty()}).mousedown(function(t){t.stopPropagation()}).keydown(function(t){t.stopPropagation()}),o.editor.hide(),this.valueContainer.prop("innerText",n),this.valueContainer.click(function(){o.valueContainer.hide();var t=o.container.parent(),e=120;if(t&&t.parent()&&t.parent().parent()){t=t.parent().parent();var n=t.prop("class");n&&"htMiddle htDimmed current"==n&&(e=t.width()-20)}o.editor.css({width:e}),o.editor.css({display:"inline"}),o.editor.focus(),$(this).trigger("DOMSubtreeModified")}),this.arithmetic=t,this.container.append(t.getContainer()),this.initData(e)},urule.SimpleValue.prototype.getDisplayContainer=function(){var t=$(""+this.editor.prop("value")+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.SimpleValue.prototype.initData=function(t){if(t){var e=t.content;URule.setDomContent(this.valueContainer,e),this.editor.prop("value",e),this.arithmetic&&this.arithmetic.initData(t.arithmetic)}},urule.SimpleValue.prototype.getValue=function(){var t=this.editor.prop("value");return t=t.replace(new RegExp("&","gm"),"&"),t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("'","gm"),"'"),t=t.replace(new RegExp('"',"gm"),""")},urule.SimpleValue.prototype.getContainer=function(){return this.container}},,,,,,,,,,function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n ul > li");o.is(":visible")?(o.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(o.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var i=this.props.expandLevel;if(o._level>=i){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(o)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var o="treenodemenu"+t.id;e.contextmenu({target:"#"+o})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,o=e.dispatch,i=n.children,r="node-"+n.id,A="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(I.default,{items:n.contextMenu,key:n.id,data:n,dispatch:o,menuId:A})),i&&i.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style +}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(p.default,{dispatch:o,children:i,expandLevel:this.props.expandLevel}));var l=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var o=window._server+n.editorPath+"?file="+n.fullPath;f.eventEmitter.emit(f.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:o,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof l?"undefined":s(l))?l.v:void 0}}]),e}(c.Component);e.default=E},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n"),this.referenceName=null,this.propertyName=null,this.propertyLabel=null,this.rule=n,n&&n.namedReferenceValues.push(this),this.referenceNamelabel=generateContainer(),this.container.append(this.referenceNamelabel),this.referenceNamelabel.css({color:"#9C27B0"}),URule.setDomContent(this.referenceNamelabel,"请选择引用变量名"),this.referencePropertylabel=generateContainer(),this.referencePropertylabel.css({color:"#673AB7"}),this.container.append(this.referencePropertylabel),URule.setDomContent(this.referencePropertylabel,"请选择变量属性"),t&&this.container.append(t.getContainer()),e&&this.initData(e),this.initMenu()},urule.NamedReferenceValue.prototype.getDisplayContainer=function(){var t=$(""+this.propertyName+"."+this.propertyLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.NamedReferenceValue.prototype.initMenu=function(){if(this.rule){var t=this,e={menuItems:[]},n=!0,o=!1,i=void 0;try{for(var r,A=function(){var n=r.value;e.menuItems.push({label:n,onClick:function(e){t.referenceName=n,URule.setDomContent(t.referenceNamelabel,t.referenceName+".");var o=t.rule.namedMap.get(n)||{},i=o.variables||[];t.initPropertyMenu(i),window._setDirty()}})},a=this.rule.namedMap.keys()[Symbol.iterator]();!(n=(r=a.next()).done);n=!0)A()}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}if(this.referenceName&&this.rule){var s=this.rule.namedMap.get(this.referenceName)||{},l=s.variables;l&&t.initPropertyMenu(l)}t.menu?t.menu.setConfig(e):t.menu=new URule.menu.Menu(e),this.referenceNamelabel.click(function(e){t.menu.show(e)})}},urule.NamedReferenceValue.prototype.initPropertyMenu=function(t){var e=this,n={menuItems:[]},o=!0,i=!1,r=void 0;try{for(var A,a=function(){var t=A.value;n.menuItems.push({label:t.label,onClick:function(n){e.propertyName=t.name,e.propertyLabel=t.label,e.datatype=t.type,URule.setDomContent(e.referencePropertylabel,e.propertyLabel),window._setDirty()}})},s=t[Symbol.iterator]();!(o=(A=s.next()).done);o=!0)a()}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}e.propertyMenu?e.propertyMenu.setConfig(n):e.propertyMenu=new URule.menu.Menu(n),e.referencePropertylabel.click(function(t){e.propertyMenu.show(t)})},urule.NamedReferenceValue.prototype.setValue=function(t){this.referenceName=t.referenceName,this.propertyName=t.propertyName||t.variableName,this.propertyLabel=t.propertyLabel||t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.referenceNamelabel,this.referenceName+"."),URule.setDomContent(this.referencePropertylabel,this.propertyLabel),window._setDirty()},urule.NamedReferenceValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.NamedReferenceValue.prototype.toXml=function(){if(!this.referenceName||!this.propertyName||""===this.propertyName)throw"引用变量信息不能为空!";var t='reference-name="'+this.referenceName+'" property-name="'+this.propertyName+'" property-label="'+this.propertyLabel+'" datatype="'+this.datatype+'"';return t},urule.NamedReferenceValue.prototype.getType=function(){return"NamedReference"},urule.NamedReferenceValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ConditionLeft=function(t){this.container=$(""),t.append(this.container),this.arithmetic=new urule.SimpleArithmetic,this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"blue"}),URule.setDomContent(this.label,"请选择类型"),this.valueContainer=$(""),this.container.append(this.valueContainer),this.initMenu()},urule.ConditionLeft.prototype.initMenu=function(t){var e=this;e.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){e.type="variable",e.parameterValue&&e.parameterValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.variableValue?e.variableValue.getContainer().show():(e.variableValue=new urule.VariableValue(e.arithmetic,null,"In"),e.valueContainer.append(e.variableValue.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择参数",onClick:function(){e.type="parameter",e.variableValue&&e.variableValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.parameterValue?e.parameterValue.getContainer().show():(e.parameterValue=new urule.ParameterValue(e.arithmetic,null,"In"),e.valueContainer.append(e.parameterValue.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择方法",onClick:function(){e.type="method",e.variableValue&&e.variableValue.getContainer().hide(),e.parameterValue&&e.parameterValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.methodValue?e.methodValue.getContainer().show():(e.methodValue=new urule.MethodValue(e.arithmetic,null),e.valueContainer.append(e.methodValue.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择函数",onClick:function(){e.type="commonfunction",e.variableValue&&e.variableValue.getContainer().hide(),e.parameterValue&&e.parameterValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.functionValue?e.functionValue.getContainer().show():(e.functionValue=new urule.FunctionValue(e.arithmetic,null,"In"),e.valueContainer.append(e.functionValue.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}}]}),this.label.click(function(t){e.menu.show(t)})},urule.ConditionLeft.prototype.initData=function(t){if(t){this.label.css({color:"white"}),URule.setDomContent(this.label,".");var e=t.leftPart;e.arithmetic=t.arithmetic,this.type=t.type,this.type||(this.type="variable"),"parameter"==this.type?(this.variableValue&&this.variableValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.parameterValue=new urule.ParameterValue(this.arithmetic,e,"In"),this.valueContainer.append(this.parameterValue.getContainer())):"variable"==this.type?(this.parameterValue&&this.parameterValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.variableValue=new urule.VariableValue(this.arithmetic,e,"In"),this.valueContainer.append(this.variableValue.getContainer())):"method"==this.type?(this.parameterValue&&this.parameterValue.getContainer().hide(),this.variableValue&&this.variableValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.methodValue=new urule.MethodValue(this.arithmetic,e),this.valueContainer.append(this.methodValue.getContainer())):"commonfunction"==this.type&&(this.parameterValue&&this.parameterValue.getContainer().hide(),this.variableValue&&this.variableValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue=new urule.FunctionValue(this.arithmetic,e),this.valueContainer.append(this.functionValue.getContainer()))}},urule.ConditionLeft.prototype.toXml=function(){var t="";if(t+="',"method"==this.type)for(var e=this.methodValue.action.parameters,n=0;n",this.inputType&&(t+=this.inputType.toXml()),t},urule.ConditionLeft.prototype.getVariableValue=function(){return this.variableValue},urule.ConditionLeft.prototype.getOperator=function(){return this.operator},urule.ConditionLeft.prototype.getInputType=function(){return this.inputType}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(){window._dirty&&(window._dirty=!1,$("#saveButton").html(" 保存"),$("#saveButton").addClass("disabled"),$("#saveButtonNewVersion").html(" 保存新版本"),$("#saveButtonNewVersion").addClass("disabled"))}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var n=0;n");this.container.append(n);var o=new l.default(n);this.topNode=new u.default(o,null,!0),o.topNode=this.topNode;var r=10,A=10;this.topNode.nodeContainer.css({position:"absolute",left:r,top:A})}return A(t,[{key:"initRemarkContainer",value:function(){var t=$("
    ");this.container.append(t),this.remark=new Remark(t)}},{key:"initPropertyContainer",value:function(){var t=$("
    ");this.container.append(t),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var e=$("");t.append(e),t.append(this.propertyContainer);var n=this,o=function(t){var e=new urule.RuleProperty(n,t.name,t.defaultValue,t.editorType);n.addProperty(e)};n.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:o},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:o},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:o},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:o},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:o}]}),e.click(function(t){n.menu.show(t)})}},{key:"addProperty",value:function(t){this.propertyContainer.append(t.getContainer()),this.properties.push(t),window._setDirty()}},{key:"initToolbar",value:function(){function t(t){if($("#saveButton").hasClass("disabled"))return!1;var e='';e+="'}),$.each(variableLibraries,function(t,n){e+=''}),$.each(constantLibraries,function(t,n){e+=''}),$.each(actionLibraries,function(t,n){e+=''});try{e+=l.topNode.toXml()}catch(t){return void alert(t)}e+="";var A={content:e,file:n,newVersion:t},s=window._server+"/common/saveFile";t?bootbox.prompt("请输入新版本描述.",function(t){t&&(A.versionComment=t,(0,a.ajaxSave)(s,A,function(){r()}))}):(0,a.ajaxSave)(s,A,function(){r()})}function e(){var t=window._server+"/common/loadXml";$.ajax({data:{files:n},type:"POST",url:t,error:function(t,e){alert("加载文件失败!")},success:function(t){var e=t[0];l.remark.setData(e.remark);var n=e.salience;n&&l.addProperty(new urule.RuleProperty(l,"salience",n,1));var o=e.loop;null!=o&&l.addProperty(new urule.RuleProperty(l,"loop",o,3));var i=e.effectiveDate;i&&l.addProperty(new urule.RuleProperty(l,"effective-date",i,2));var A=e.expiresDate;A&&l.addProperty(new urule.RuleProperty(l,"expires-date",A,2));var a=e.enabled;null!=a&&l.addProperty(new urule.RuleProperty(l,"enabled",a,3));var s=e.debug;null!=s&&l.addProperty(new urule.RuleProperty(l,"debug",s,3));var c=e.libraries;if(c)for(var u=0;u\n
    \n ",A=$(i);A.css({diaplay:"inline-block"});var s=$("
    ");s.append(A),this.container.append(s);var l=this;$("#configVarButton").click(function(){l.configVarDialog||(l.configVarDialog=new urule.ConfigVariableDialog(l)),l.configVarDialog.open()}),$("#configConstantsButton").click(function(){l.configConstantDialog||(l.configConstantDialog=new urule.ConfigConstantDialog(l)),l.configConstantDialog.open()}),$("#configActionButton").click(function(){l.configActionDialog||(l.configActionDialog=new urule.ConfigActionDialog(l)),l.configActionDialog.open()}),$("#configParameterButton").click(function(){l.configParameterDialog||(l.configParameterDialog=new urule.ConfigParameterDialog(l)),l.configParameterDialog.open()}),$("#saveButton").click(function(){t(!1)}),$("#saveButtonNewVersion").click(function(){t(!0)}),$("#saveButton").addClass("disabled"),$("#saveButtonNewVersion").addClass("disabled"),e()}}]),t}();e.default=g,window._setDirty=function(){window._dirty||(window._dirty=!0,$("#saveButton").html(" *保存"),$("#saveButton").removeClass("disabled"),$("#saveButtonNewVersion").html(" *保存新版本"),$("#saveButtonNewVersion").removeClass("disabled"))}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n"),this.context.container.append(this.nodeContainer),this.initBindResizeEvent();var t=$("");this.nodeContainer.append(t),this.condition=new urule.ConditionLeft(t);var e=this,n=$("");this.nodeContainer.append(n);var o=[];o.push({name:"addCondition",label:"添加条件",onClick:function(){e.addChild("condition")}}),this.disabledDel||o.push({name:"delete",label:"删除",onClick:function(){l.MsgBox.confirm("真的要删除当前节点?",function(){e.delete()})}});var i=new URule.menu.Menu({menuItems:o});n.click(function(t){i.show(t)}),this.nodeHeight=this.nodeContainer.height()+15,this.nodeWidth=this.nodeContainer.width()}},{key:"initData",value:function(t){if(t){var n=t.left;this.condition.initData(n),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"initChildrenNodeData",this).call(this,t)}}},{key:"toXml",value:function(){if(0==this.children.length)throw"变量节点下至少要有一个条件节点.";var t="";return t+=this.condition.toXml(),$.each(this.children,function(e,n){t+=n.node.toXml()}),t+=""}}]),e}(u.default);e.default=g},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0;){var t=this.children[this.children.length-1];t.node.delete()}var e=0;if(this.children.length>1)for(var n=0;n0){var l=this.children[0];s=l.startX}var c=n+A/2,u=0,g=this.findLastChildrenNode();if(g){var d=g.nodeContainer;u=parseInt(d.css("top"))+d.height()+15,c=g.connection.startX}var M=s+40;if(this.children.length>0){var l=this.children[0];M=l.endX}var p=c;if(u>0&&(p=u+A/2+3),o.drawPath(s,c,M,p),this.children.push(o),i>0){if(this.parentNode){var h=o.node.nodeContainer.height()+15,I=this.parentNode.children,T=I.indexOf(this.connection);this.parentNode.resetItemPosition(T+1,h)}this.resetParentNodePosition()}if(this.context.lastLeftNode){var f=parseInt(o.node.nodeContainer.css("left")),E=parseInt(this.context.lastLeftNode.nodeContainer.css("left"));f>E&&(this.context.lastLeftNode=o.node)}else this.context.lastLeftNode=o.node;if(this.context.lastBottomNode){var N=parseInt(o.node.nodeContainer.css("top")),w=parseInt(this.context.lastBottomNode.nodeContainer.css("top"));N>w&&(this.context.lastBottomNode=o.node)}else this.context.lastBottomNode=o.node;return this.resetCanvasSize(),window._setDirty(),o.node}},{key:"resizeNode",value:function(){if(this.nodeHeight){var t=this.nodeContainer.height()+15;if(this.parentNode&&t!==this.nodeHeight){var e=t-this.nodeHeight,n=this.parentNode.children.indexOf(this.connection);this.parentNode.resetItemPosition(n+1,e),this.resetParentNodePosition(),this.nodeHeight=t}var o=this.nodeContainer.width();if(o!==this.nodeWidth){var i=o-this.nodeWidth;this.resetItemWidth(i),this.nodeWidth=o}this.resetCanvasSize()}}},{key:"resetCanvasSize",value:function(){if(this.context.lastLeftNode){var t=parseInt(this.context.lastLeftNode.nodeContainer.css("left"));this.context.container.css("width",t+this.context.lastLeftNode.nodeContainer.width()+30)}if(this.context.lastBottomNode){var e=parseInt(this.context.lastBottomNode.nodeContainer.css("top"));this.context.container.css("height",e+this.context.lastBottomNode.nodeContainer.height()+30)}}},{key:"resetItemWidth",value:function(t){for(var e=0;e0&&this.parentNode){var i=this.parentNode.children,r=i.indexOf(this.connection); +this.parentNode.resetItemPosition(r+1,e)}}}},{key:"resetParentNodePosition",value:function(){var t;if(this.children.length>1){var e=this.children[0].node.nodeContainer,n=this.children[this.children.length-1].node.nodeContainer,o=parseInt(e.css("top")),i=parseInt(n.css("top"))+n.height(),r=i-o;t=parseInt(e.css("top"))+r/2-this.nodeContainer.height()/2}else if(1===this.children.length){var e=this.children[0].node.nodeContainer;t=parseInt(e.css("top"))}if(t){this.nodeContainer.css("top",t-2),this.connection&&(this.connection.endY=t+this.nodeContainer.height()/2,this.connection.updatePath()),1===this.children.length?t=this.children[0].endY:t+=this.nodeContainer.height()/2;for(var A=0;A"),this.context.container.append(this.nodeContainer),this.initBindResizeEvent(),this.actionsContainer=$(""),this.nodeContainer.append(this.actionsContainer),this.addAction();var t=this,e=$("");this.nodeContainer.append(e);var n=[];n.push({name:"delete",label:"删除",onClick:function(){c.MsgBox.confirm("真的要删除当前节点?",function(){t.delete()})}}),n.push({name:"addAction",label:"添加动作",onClick:function(){t.addAction(!0)}});var o=new URule.menu.Menu({menuItems:n});e.click(function(t){o.show(t)}),this.nodeHeight=this.nodeContainer.height()+15,this.nodeWidth=this.nodeContainer.width()}},{key:"addAction",value:function(t){var e=$("");t&&e.css("display","block"),window._setDirty();var n=$("");e.append(n),this.actionsContainer.append(e);var o=new urule.ActionType(e);this.actionTypes.push(o),e.actionType=o;var i=this;return n.click(function(){if(1===i.actionTypes.length)return void c.MsgBox.alert("动作至少要有一个.");var t=-1;$.each(i.actionTypes,function(n,o){if(o===e.actionType)return t=n,!1}),t!==-1?(i.actionTypes.splice(t,1),e.remove(),window._setDirty()):c.MsgBox.alert("未找到要删除的动作对象.")}),o}},{key:"initData",value:function(t){if(t){var e=t.actions;if(e&&0!==e.length){this.actionTypes[0].parentContainer.remove(),this.actionTypes.splice(0,1);for(var n=0;n"}}]),e}(l.default);e.default=u},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n"),this.context.container.append(this.nodeContainer),this.initBindResizeEvent();var t=this;this.contentContainer=$(""),this.nodeContainer.append(this.contentContainer),this.operator=new urule.ComparisonOperator(function(){t.inputType=t.operator.getInputType(),t.inputType&&t.contentContainer.append(t.inputType.getContainer())}),this.contentContainer.append(this.operator.getContainer());var e=$("");this.nodeContainer.append(e);var n=[];n.push({name:"addCondition",label:"添加条件",onClick:function(){t.addChild("condition")}}),n.push({name:"addVariable",label:"添加变量",onClick:function(){t.addChild("variable")}}),n.push({name:"addAction",label:"添加动作",onClick:function(){t.addChild("action")}}),n.push({name:"delete",label:"删除",onClick:function(){l.MsgBox.confirm("真的要删除当前节点?",function(){t.delete()})}});var o=new URule.menu.Menu({menuItems:n});e.click(function(t){o.show(t)}),this.nodeHeight=this.nodeContainer.height()+15,this.nodeWidth=this.nodeContainer.width()}},{key:"initData",value:function(t){if(t){var n=t.op;this.operator.setOperator(n);var o=t.value;this.operator.initRightValue(o),this.inputType=this.operator.getInputType(),this.inputType&&this.contentContainer.append(this.inputType.getContainer()),s(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"initChildrenNodeData",this).call(this,t)}}},{key:"toXml",value:function(){if(0==this.children.length)throw"条件节点下至少要有一个动作节点.";var t='';return this.inputType&&(t+=this.inputType.toXml()),$.each(this.children,function(e,n){t+=n.node.toXml()}),t+=""}}]),e}(u.default);e.default=g}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/flowDesigner.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/flowDesigner.bundle.js new file mode 100644 index 0000000..8d0bf07 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/flowDesigner.bundle.js @@ -0,0 +1,29 @@ +!function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}n(10),n(1),n(390),n(392),n(394),n(396);var i=n(398),A=o(i),a=n(403),l=o(a),s=n(409),c=o(s),u=n(412),g=o(u),d=n(415),M=o(d),f=n(418),h=o(f),p=n(424),I=o(p),N=n(427),T=o(N),E=n(430),y=o(E),w=n(14),C=o(w),D=n(41),x=o(D),m=n(241),L=n(370),b=o(L),v=n(339),B=r(v),j=n(226);$(document).ready(function(){var t="container",e=new A.default(t),n=(0,j.getParameter)("file");e.addButton({icon:'',tip:"保存",click:function(){B.eventEmitter.emit(B.SHOW_LOADING,"数据保存中");var t=e.toXML();if(!t)return void B.eventEmitter.emit(B.HIDE_LOADING);var r={content:t,file:n,newVersion:!1},o=window._server+"/common/saveFile";(0,j.ajaxSave)(o,r,function(){B.eventEmitter.emit(B.HIDE_LOADING),m.MsgBox.alert("保存成功")})}}),e.addButton({icon:'',tip:"保存为新版本",click:function(){B.eventEmitter.emit(B.SHOW_LOADING,"数据保存中");var t=e.toXML();if(!t)return void B.eventEmitter.emit(B.HIDE_LOADING);var r={content:t,file:n,newVersion:!0},o=window._server+"/common/saveFile";bootbox.prompt("请输入新版本描述.",function(t){t&&(r.versionComment=t,(0,j.ajaxSave)(o,r,function(){B.eventEmitter.emit(B.HIDE_LOADING)}))})}}),e.addTool(new l.default),e.addTool(new c.default),e.addTool(new g.default),e.addTool(new M.default),e.addTool(new h.default),e.addTool(new I.default),e.addTool(new T.default),e.addTool(new y.default),e.buildDesigner();var r=$("#"+t);r.append('
    '),x.default.render(C.default.createElement("div",null,C.default.createElement(b.default,null)),document.getElementById("__dialog_container")),$.ajax({url:window._server+"/ruleflowdesigner/loadFlowDefinition",data:{file:n},success:function(t){e.fromJson(t),m.Event.eventEmitter.emit(m.Event.CANVAS_SELECTED)},error:function(){alert("加载决策流"+n+"失败!")}})})},function(t,e,n){var r=n(2);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&N.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function s(t,e){var n,r,o;if(e.singleton){var i=I++;n=p||(p=a(e)),r=c.bind(null,n,i,!1),o=c.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(e),r=g.bind(null,n),o=function(){A(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),r=u.bind(null,n),o=function(){A(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}function c(t,e,n,r){var o=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=T(e,o);else{var i=document.createTextNode(o),A=t.childNodes;A[e]&&t.removeChild(A[e]),A.length?t.insertBefore(i,A[e]):t.appendChild(i)}}function u(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,r=e.sourceMap;r&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var o=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var d={},M=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},f=M(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=M(function(){return document.head||document.getElementsByTagName("head")[0]}),p=null,I=0,N=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=f()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return r(n,e),function(t){for(var i=[],A=0;A1){for(var h=Array(f),p=0;p1){for(var N=Array(I),T=0;T>"),m={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:a(),arrayOf:l,element:s(),instanceOf:c,node:M(),objectOf:g,oneOf:u,oneOfType:d,shape:f};o.prototype=Error.prototype,t.exports=m},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function r(t){return i.isValidElement(t)?void 0:o("143"),t}var o=n(19),i=n(21);n(20);t.exports=r},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var r=n(43),o=n(48),i=n(174),A=n(71),a=n(68),l=n(179),s=n(180),c=n(181),u=n(182);n(56);o.inject();var g={findDOMNode:s,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:l,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:r.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?r.getNodeFromInstance(t):null}},Mount:i,Reconciler:A});t.exports=g},function(t,e,n){"use strict";function r(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var n=r(t);n._hostNode=e,e[f]=n}function i(t){var e=t._hostNode;e&&(delete e[f],t._hostNode=null)}function A(t,e){if(!(t._flags&M.hasCachedChildNodes)){var n=t._renderedChildren,i=e.firstChild;t:for(var A in n)if(n.hasOwnProperty(A)){var a=n[A],l=r(a)._domID;if(0!==l){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(d)===String(l)||8===i.nodeType&&i.nodeValue===" react-text: "+l+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+l+" "){o(a,i);continue t}c("32",l)}}t._flags|=M.hasCachedChildNodes}}function a(t){if(t[f])return t[f];for(var e=[];!t[f];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,r;t&&(r=t[f]);t=e.pop())n=r,e.length&&A(r,t);return n}function l(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function s(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())A(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),g=n(47),d=(n(46),u.ID_ATTRIBUTE_NAME),M=g,f="__reactInternalInstance$"+Math.random().toString(36).slice(2),h={getClosestInstanceFromNode:a,getInstanceFromNode:l,getNodeFromInstance:s,precacheChildNodes:A,precacheNode:o,uncacheNode:i};t.exports=h},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,r=0;r8&&E<=11),C=32,D=String.fromCharCode(C),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},m=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,n,r){return[s(t,e,n,r),g(t,e,n,r)]}};t.exports=b},function(t,e,n){"use strict";function r(t,e,n){var r=e.dispatchConfig.phasedRegistrationNames[n];return p(t,r)}function o(t,e,n){var o=r(t,n,e);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchInstances=f(n._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&M.traverseTwoPhase(t._targetInst,o,t)}function A(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?M.getParentInstance(e):null;M.traverseTwoPhase(n,o,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var r=n.dispatchConfig.registrationName,o=p(t,r);o&&(n._dispatchListeners=f(n._dispatchListeners,o),n._dispatchInstances=f(n._dispatchInstances,t))}}function l(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function s(t){h(t,i)}function c(t){h(t,A)}function u(t,e,n,r){M.traverseEnterLeave(n,r,a,t,e)}function g(t){h(t,l)}var d=n(52),M=n(54),f=n(58),h=n(59),p=(n(56),d.getListener),I={accumulateTwoPhaseDispatches:s,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=I},function(t,e,n){"use strict";function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!r(e));default:return!1}}var i=n(44),A=n(53),a=n(54),l=n(55),s=n(58),c=n(59),u=(n(46),{}),g=null,d=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},M=function(t){return d(t,!0)},f=function(t){return d(t,!1)},h=function(t){return"."+t._rootNodeID},p={injection:{injectEventPluginOrder:A.injectEventPluginOrder,injectEventPluginsByName:A.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?i("94",e,typeof n):void 0;var r=h(t),o=u[e]||(u[e]={});o[r]=n;var a=A.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var r=h(t);return n&&n[r]},deleteListener:function(t,e){var n=A.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var r=u[e];if(r){var o=h(t);delete r[o]}},deleteAllListeners:function(t){var e=h(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var r=A.registrationNameModules[n];r&&r.willDeleteListener&&r.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,r){for(var o,i=A.plugins,a=0;a-1?void 0:A("96",t),!s.plugins[n]){e.extractEvents?void 0:A("97",t),s.plugins[n]=e;var r=e.eventTypes;for(var i in r)o(r[i],e,i)?void 0:A("98",i,t)}}}function o(t,e,n){s.eventNameDispatchConfigs.hasOwnProperty(n)?A("99",n):void 0,s.eventNameDispatchConfigs[n]=t;var r=t.phasedRegistrationNames;if(r){for(var o in r)if(r.hasOwnProperty(o)){var a=r[o];i(a,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){s.registrationNameModules[t]?A("100",t):void 0,s.registrationNameModules[t]=e,s.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var A=n(44),a=(n(46),null),l={},s={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?A("101"):void 0,a=Array.prototype.slice.call(t),r()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];l.hasOwnProperty(n)&&l[n]===o||(l[n]?A("102",n):void 0,l[n]=o,e=!0)}e&&r()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return s.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var r in n)if(n.hasOwnProperty(r)){var o=s.registrationNameModules[n[r]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in l)l.hasOwnProperty(t)&&delete l[t];s.plugins.length=0;var e=s.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var r=s.registrationNameModules;for(var o in r)r.hasOwnProperty(o)&&delete r[o]}};t.exports=s},function(t,e,n){"use strict";function r(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function A(t,e,n,r){var o=t.type||"unknown-event";t.currentTarget=p.getNodeFromInstance(r),e?f.invokeGuardedCallbackWithCatch(o,n,t):f.invokeGuardedCallback(o,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,r=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),i.addPoolingTo(r),t.exports=r},function(t,e,n){"use strict";var r=n(44),o=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var r=n.instancePool.pop();return n.call(r,t,e),r}return new n(t,e)},A=function(t,e,n){var r=this;if(r.instancePool.length){var o=r.instancePool.pop();return r.call(o,t,e,n),o}return new r(t,e,n)},a=function(t,e,n,r){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n,r),i}return new o(t,e,n,r)},l=function(t,e,n,r,o){var i=this;if(i.instancePool.length){var A=i.instancePool.pop();return i.call(A,t,e,n,r,o),A}return new i(t,e,n,r,o)},s=function(t){var e=this;t instanceof e?void 0:r("25"),t.destructor(),e.instancePool.length8));var Q=!1;T.canUseDOM&&(Q=D("input")&&(!document.documentMode||document.documentMode>11));var S={get:function(){return B.get.call(this)},set:function(t){v=""+t,B.set.call(this,t)}},U={eventTypes:m,extractEvents:function(t,e,n,o){var i,A,a=e?E.getNodeFromInstance(e):window;if(r(a)?j?i=l:A=s:x(a)?Q?i=d:(i=f,A=M):h(a)&&(i=p),i){var c=i(t,e);if(c){var u=w.getPooled(m.change,c,n,o);return u.type="change",N.accumulateTwoPhaseDispatches(u),u}}A&&A(t,a,e)}};t.exports=U},function(t,e,n){"use strict";function r(){m.ReactReconcileTransaction&&E?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=m.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,o,i,A){return r(),E.batchedUpdates(t,e,n,o,i,A)}function A(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==p.length?c("124",e,p.length):void 0,p.sort(A),I++;for(var n=0;n]/,l=n(91),s=l(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{r=r||document.createElement("div"),r.innerHTML=""+e+"";for(var n=r.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(s=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),A.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=s},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,r,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,o)})}:t};t.exports=n},function(t,e,n){"use strict";var r=n(60),o=n(93),i=n(90),A=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};r.canUseDOM&&("textContent"in document.documentElement||(A=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void i(t,o(e))})),t.exports=A},function(t,e){"use strict";function n(t){var e=""+t,n=o.exec(e);if(!n)return e;var r,i="",A=0,a=0;for(A=n.index;A]/;t.exports=r},function(t,e,n){"use strict";var r=n(44),o=n(88),i=n(60),A=n(95),a=n(57),l=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(i.canUseDOM?void 0:r("56"),e?void 0:r("57"),"HTML"===t.nodeName?r("58"):void 0,"string"==typeof e){var n=A(e,a)[0];t.parentNode.replaceChild(n,t)}else o.replaceChildWithTree(t,e)}});t.exports=l},function(t,e,n){"use strict";function r(t){var e=t.match(c);return e&&e[1].toLowerCase()}function o(t,e){var n=s;s?void 0:l(!1);var o=r(t),i=o&&a(o);if(i){n.innerHTML=i[1]+t+i[2];for(var c=i[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:l(!1),A(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var i=n(60),A=n(96),a=n(97),l=n(46),s=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function r(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?A(!1):void 0,"number"!=typeof e?A(!1):void 0,0===e||e-1 in t?void 0:A(!1),"function"==typeof t.callee?A(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),r=0;r":A.innerHTML="<"+t+">",a[t]=!A.firstChild),a[t]?g[t]:null}var o=n(60),i=n(46),A=o.canUseDOM?document.createElement("div"):null,a={},l=[1,'"],s=[1,"","
    "],c=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:l,option:l,caption:s,colgroup:s,tbody:s,tfoot:s,thead:s,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=r},function(t,e,n){"use strict";var r=n(87),o=n(43),i={dangerouslyProcessChildrenUpdates:function(t,e){var n=o.getNodeFromInstance(t);r.processUpdates(n,e)}};t.exports=i},function(t,e,n){"use strict";function r(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?f("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?f("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:f("61")),null!=e.style&&"object"!=typeof e.style?f("62",r(t)):void 0)}function i(t,e,n,r){if(!(r instanceof Q)){var o=t._hostContainerInfo,i=o._node&&o._node.nodeType===G,a=i?o._node:o._ownerDocument;O(e,a),r.getReactMountReady().enqueue(A,{inst:t,registrationName:e,listener:n})}}function A(){var t=this;w.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function l(){var t=this;B.postMountWrapper(t)}function s(){var t=this;b.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:f("63");var e=k(t);switch(e?void 0:f("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in P)P.hasOwnProperty(n)&&t._wrapperState.listeners.push(D.trapBubbledEvent(n,P[n],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){v.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:f("65",t),K[t]=!0)}function d(t,e){return t.indexOf("-")>=0||null!=e.is}function M(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var f=n(44),h=n(16),p=n(100),I=n(102),N=n(88),T=n(89),E=n(45),y=n(110),w=n(52),C=n(53),D=n(112),x=n(47),m=n(43),L=n(115),b=n(118),v=n(119),B=n(120),j=(n(74),n(121)),Q=n(141),S=(n(57),n(93)),U=(n(46),n(77),n(130),n(144),n(56),x),z=w.deleteListener,k=m.getNodeFromInstance,O=D.listenTo,Y=C.registrationNameModules,R={string:!0,number:!0},F="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=h({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;M.displayName="ReactDOMComponent",M.Mixin={mountComponent:function(t,e,n,r){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":L.mountWrapper(this,i,e),i=L.getHostProps(this,i),t.getReactMountReady().enqueue(c,this);break;case"option":b.mountWrapper(this,i,e),i=b.getHostProps(this,i);break;case"select":v.mountWrapper(this,i,e),i=v.getHostProps(this,i),t.getReactMountReady().enqueue(c,this);break;case"textarea":B.mountWrapper(this,i,e),i=B.getHostProps(this,i),t.getReactMountReady().enqueue(c,this)}o(this,i);var A,u;null!=e?(A=e._namespaceURI,u=e._tag):n._tag&&(A=n._namespaceURI,u=n._tag),(null==A||A===T.svg&&"foreignobject"===u)&&(A=T.html),A===T.html&&("svg"===this._tag?A=T.svg:"math"===this._tag&&(A=T.mathml)),this._namespaceURI=A;var g;if(t.useCreateElement){var d,M=n._ownerDocument;if(A===T.html)if("script"===this._tag){var f=M.createElement("div"),h=this._currentElement.type;f.innerHTML="<"+h+">",d=f.removeChild(f.firstChild)}else d=i.is?M.createElement(this._currentElement.type,i.is):M.createElement(this._currentElement.type);else d=M.createElementNS(A,this._currentElement.type);m.precacheNode(this,d),this._flags|=U.hasCachedChildNodes,this._hostParent||y.setAttributeForRoot(d),this._updateDOMProperties(null,i,t);var I=N(d);this._createInitialChildren(t,i,r,I),g=I}else{var E=this._createOpenTagMarkupAndPutListeners(t,i),w=this._createContentMarkup(t,i,r);g=!w&&X[this._tag]?E+"/>":E+">"+w+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(l,this),i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"select":i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"button":i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(s,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var r in e)if(e.hasOwnProperty(r)){var o=e[r];if(null!=o)if(Y.hasOwnProperty(r))o&&i(this,r,o,t);else{r===F&&(o&&(o=this._previousStyleCopy=h({},e.style)),o=I.createMarkupForStyles(o,this));var A=null;null!=this._tag&&d(this._tag,e)?V.hasOwnProperty(r)||(A=y.createMarkupForCustomAttribute(r,o)):A=y.createMarkupForProperty(r,o),A&&(n+=" "+A)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+y.createMarkupForRoot()),n+=" "+y.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var r="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(r=o.__html);else{var i=R[typeof e.children]?e.children:null,A=null!=i?null:e.children;if(null!=i)r=S(i);else if(null!=A){var a=this.mountChildren(A,t,n);r=a.join("")}}return W[this._tag]&&"\n"===r.charAt(0)?"\n"+r:r},_createInitialChildren:function(t,e,n,r){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&N.queueHTML(r,o.__html);else{var i=R[typeof e.children]?e.children:null,A=null!=i?null:e.children;if(null!=i)N.queueText(r,i);else if(null!=A)for(var a=this.mountChildren(A,t,n),l=0;l1)for(var n=1;n0&&r.length<20?n+" (keys: "+r.join(", ")+")":n}function i(t,e){var n=a.get(t);if(!n){return null}return n}var A=n(44),a=(n(22),n(123)),l=(n(74),n(68)),s=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){s.validateCallback(e,n);var o=i(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void r(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],r(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,r(e))},enqueueReplaceState:function(t,e){var n=i(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,r(n))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(e),r(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,r(t)},validateCallback:function(t,e){t&&"function"!=typeof t?A("122",e,o(t)):void 0}});t.exports=s},function(t,e,n){"use strict";var r=(n(16),n(57)),o=(n(56),r);t.exports=o},function(t,e,n){"use strict";var r=n(16),o=n(88),i=n(43),A=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};r(A.prototype,{mountComponent:function(t,e,n,r){var A=n._idCounter++;this._domID=A,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var l=n._ownerDocument,s=l.createComment(a);return i.precacheNode(this,s),o(s)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function r(t,e){"_hostNode"in t?void 0:l("33"),"_hostNode"in e?void 0:l("33");for(var n=0,r=t;r;r=r._hostParent)n++;for(var o=0,i=e;i;i=i._hostParent)o++;for(;n-o>0;)t=t._hostParent,n--;for(;o-n>0;)e=e._hostParent,o--;for(var A=n;A--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:l("35"),"_hostNode"in e?void 0:l("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function i(t){return"_hostNode"in t?void 0:l("36"),t._hostParent}function A(t,e,n){for(var r=[];t;)r.push(t),t=t._hostParent;var o;for(o=r.length;o-- >0;)e(r[o],"captured",n);for(o=0;o0;)n(l[s],"captured",i)}var l=n(44);n(46);t.exports={isAncestor:o,getLowestCommonAncestor:r,getParentInstance:i,traverseTwoPhase:A,traverseEnterLeave:a}},function(t,e,n){"use strict";var r=n(44),o=n(16),i=n(87),A=n(88),a=n(43),l=n(93),s=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(s.prototype,{mountComponent:function(t,e,n,r){var o=n._idCounter++,i=" react-text: "+o+" ",s=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(i),g=c.createComment(s),d=A(c.createDocumentFragment());return A.queueChild(d,A(u)),this._stringText&&A.queueChild(d,A(c.createTextNode(this._stringText))),A.queueChild(d,A(g)),a.precacheNode(this,u),this._closingComment=g,d}var M=l(this._stringText);return t.renderToStaticMarkup?M:""+M+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var r=this.getHostNode();i.replaceDelimitedText(r[0],r[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?r("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=s},function(t,e,n){"use strict";function r(){this.reinitializeTransaction()}var o=n(16),i=n(68),A=n(75),a=n(57),l={initialize:a,close:function(){g.isBatchingUpdates=!1}},s={initialize:a,close:i.flushBatchedUpdates.bind(i)},c=[s,l];o(r.prototype,A,{getTransactionWrappers:function(){return c}});var u=new r,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,r,o,i){var A=g.isBatchingUpdates;return g.isBatchingUpdates=!0,A?t(e,n,r,o,i):u.perform(t,null,e,n,r,o,i)}};t.exports=g},function(t,e,n){"use strict";function r(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){var e=d(t.nativeEvent),n=u.getClosestInstanceFromNode(e),o=n;do t.ancestors.push(o),o=o&&r(o);while(o);for(var i=0;ie.end?(n=e.end,r=e.start):(n=e.start,r=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",r-n),o.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),r=t[c()].length,o=Math.min(e.start,r),i=void 0===e.end?o:Math.min(e.end,r);if(!n.extend&&o>i){var A=i;i=o,o=A}var a=s(t,o),l=s(t,i);if(a&&l){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),o>i?(n.addRange(u),n.extend(l.node,l.offset)):(u.setEnd(l.node,l.offset),n.addRange(u))}}}var l=n(60),s=n(156),c=n(63),u=l.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?o:i,setOffsets:u?A:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function r(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=n(t),i=0,A=0;o;){if(3===o.nodeType){if(A=i+o.textContent.length,i<=e&&A>=e)return{node:o,offset:e-i};i=A}o=n(r(o))}}t.exports=o},function(t,e,n){"use strict";function r(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?r(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(158);t.exports=r},function(t,e,n){"use strict";function r(t){return o(t)&&3==t.nodeType}var o=n(159);t.exports=r},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},r={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(r).forEach(function(t){o.Properties[t]=0,r[t]&&(o.DOMAttributeNames[t]=r[t])}),t.exports=o},function(t,e,n){"use strict";function r(t){if("selectionStart"in t&&l.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t,e){if(I||null==f||f!==c())return null;var n=r(f);if(!p||!g(p,n)){p=n;var o=s.getPooled(M.select,h,t,e);return o.type="select",o.target=f,i.accumulateTwoPhaseDispatches(o),o}return null}var i=n(51),A=n(60),a=n(43),l=n(154),s=n(65),c=n(160),u=n(78),g=n(130),d=A.canUseDOM&&"documentMode"in document&&document.documentMode<=11,M={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},f=null,h=null,p=null,I=!1,N=!1,T={eventTypes:M,extractEvents:function(t,e,n,r){if(!N)return null;var i=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(i)||"true"===i.contentEditable)&&(f=i,h=e,p=null);break;case"topBlur":f=null,h=null,p=null;break;case"topMouseDown":I=!0;break;case"topContextMenu":case"topMouseUp":return I=!1,o(n,r);case"topSelectionChange":if(d)break;case"topKeyDown":case"topKeyUp":return o(n,r)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(N=!0)}};t.exports=T},function(t,e,n){"use strict";function r(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var i=n(44),A=n(150),a=n(51),l=n(43),s=n(164),c=n(165),u=n(65),g=n(166),d=n(167),M=n(81),f=n(170),h=n(171),p=n(172),I=n(82),N=n(173),T=n(57),E=n(168),y=(n(46),{}),w={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,r="top"+e,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[r]};y[t]=o,w[r]=o});var C={},D={eventTypes:y,extractEvents:function(t,e,n,r){var o=w[t];if(!o)return null;var A;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":A=u;break;case"topKeyPress":if(0===E(n))return null;case"topKeyDown":case"topKeyUp":A=d;break;case"topBlur":case"topFocus":A=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":A=M;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":A=f;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":A=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":A=s;break;case"topTransitionEnd":A=p;break;case"topScroll":A=I;break;case"topWheel":A=N;break;case"topCopy":case"topCut":case"topPaste":A=c}A?void 0:i("86",t);var l=A.getPooled(o,e,n,r);return a.accumulateTwoPhaseDispatches(l),l},didPutListener:function(t,e,n){if("onClick"===e&&!o(t._tag)){var i=r(t),a=l.getNodeFromInstance(t);C[i]||(C[i]=A.listen(a,"click",T))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var n=r(t);C[n].remove(),delete C[n]}}};t.exports=D},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(65),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(65),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(82),i={relatedTarget:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(82),i=n(168),A=n(169),a=n(84),l={key:A,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(r,l),t.exports=r},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function r(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?A[t.keyCode]||"Unidentified":""}var o=n(168),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(81),i={dataTransfer:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(82),i=n(84),A={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(r,A),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(65),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e,n,r){return o.call(this,t,e,n,r)}var o=n(81),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(r,i),t.exports=r},function(t,e,n){"use strict";function r(t,e){for(var n=Math.min(t.length,e.length),r=0;r.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var A,a=h.createElement(O,{child:e});if(t){var l=y.get(t);A=l._processChildContext(l._context)}else A=m;var c=g(n);if(c){var u=c._currentElement,M=u.props.child;if(v(M,e)){var f=c._renderedComponent.getPublicInstance(),p=r&&function(){r.call(f)};return Y._updateRootComponent(c,a,A,n,p),f}Y.unmountComponentAtNode(n)}var I=o(n),N=I&&!!i(I),T=s(n),E=N&&!c&&!T,w=Y._renderNewRootComponent(a,n,E,A)._renderedComponent.getPublicInstance();return r&&r.call(w),w},render:function(t,e,n){return Y._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:d("40");var e=g(t);if(!e){s(t),1===t.nodeType&&t.hasAttribute(j);return!1}return delete z[e._instance.rootID],x.batchedUpdates(l,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,i,A){if(c(e)?void 0:d("41"),i){var a=o(e);if(w.canReuseMarkup(t,a))return void I.precacheNode(n,a);var l=a.getAttribute(w.CHECKSUM_ATTR_NAME);a.removeAttribute(w.CHECKSUM_ATTR_NAME);var s=a.outerHTML;a.setAttribute(w.CHECKSUM_ATTR_NAME,l);var u=t,g=r(u,s),f=" (client) "+u.substring(g-20,g+20)+"\n (server) "+s.substring(g-20,g+20);e.nodeType===S?d("42",f):void 0}if(e.nodeType===S?d("43"):void 0,A.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);M.insertTreeBefore(e,t,null)}else b(e,t),I.precacheNode(n,e.firstChild)}};t.exports=Y},function(t,e,n){"use strict";function r(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var o=(n(144),9);t.exports=r},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var r=n(178),o=/\/?>/,i=/^<\!\-\-/,A={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=r(t);return i.test(t)?t:t.replace(o," "+A.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(A.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=r(t);return o===n}};t.exports=A},function(t,e){"use strict";function n(t){for(var e=1,n=0,o=0,i=t.length,A=i&-4;o服务端错误:"+t.responseText+"
    "):bootbox.alert("服务端出错")}})}function i(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var r in n)new RegExp("("+r+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[r]:("00"+n[r]).substr((""+n[r]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=r,e.ajaxSave=o,e.formatDate=i,window.iframe_id_=1},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+c++;return t}function i(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function A(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=s.default.frameStyle.getRootIcon(),t._style=s.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=s.default.frameStyle.getFolderIcon(),t._style=s.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=s.default.frameStyle.getRuleIcon(),t._style=s.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=s.default.frameStyle.getProjectIcon(),t._style=s.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=s.default.frameStyle.getResourceIcon(),t._style=s.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=s.default.frameStyle.getResourcePackageIcon(),t._style=s.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=s.default.frameStyle.getLibIcon(),t._style=s.default.frameStyle.getLibIconStyle();break;case"action":t._icon=s.default.frameStyle.getActionIcon(),t._style=s.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=s.default.frameStyle.getParameterIcon(),t._style=s.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=s.default.frameStyle.getConstantIcon(),t._style=s.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=s.default.frameStyle.getVariableIcon(),t._style=s.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=s.default.frameStyle.getRuleLibIcon(),t._style=s.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=s.default.frameStyle.getDecisionTableLibIcon(),t._style=s.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=s.default.frameStyle.getDecisionTreeLibIcon(),t._style=s.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=s.default.frameStyle.getFlowLibIcon(),t._style=s.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=s.default.frameStyle.getUlIcon(),t._style=s.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=s.default.frameStyle.getDecisionTableIcon(),t._style=s.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=s.default.frameStyle.getScriptDecisionTableIcon(),t._style=s.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=s.default.frameStyle.getDecisionTreeIcon(),t._style=s.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=s.default.frameStyle.getFlowIcon(),t._style=s.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=s.default.frameStyle.getScorecardIcon(),t._style=s.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=i,e.loadResourceTreeData=A;var l=n(228),s=r(l),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var r={};r.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=r},,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?s.show():s.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,r=e.operationConfig,o=e.dispatch,i=e.selectFirst,A=(e.uniqueKey,this.props.rows||[]),a=[],l=[];n.forEach(function(e,n){e.editable?a.push(s.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},s.default.createElement("label",null,e.label),s.default.createElement(f.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(s.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},s.default.createElement("label",null,e.label)))}),r&&a.push(s.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:r.width}},s.default.createElement("label",null,"操作列")));var c=s.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?s.default.createElement("td",{key:(0,h.uniqueID)()},s.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):s.default.createElement("td",{key:(0,h.uniqueID)()}," ")}),r?s.default.createElement("td",null):null);l.push(c),A.forEach(function(e,A){e.id||(e.id=(0,h.uniqueID)());var a=e.id;0===A&&i?l.push(s.default.createElement(d.default,{key:a,select:!0,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:r?r.operations:null,rowData:e,rowIndex:A})):l.push(s.default.createElement(d.default,{key:a,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:r?r.operations:null,rowData:e,rowIndex:A}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return s.default.createElement("table",{className:"table table-bordered",style:u},s.default.createElement("thead",null,s.default.createElement("tr",{className:"well"},a)),s.default.createElement("tbody",null,l))}}]),e}(l.Component);p.propTypes={headers:s.default.PropTypes.array.isRequired,operationConfig:l.PropTypes.object},e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var r=e[t];r&&""!==r||(r="{}");var o=JSON.parse(r)||{},i=o.rows||[],A=o.type,a=function(r){var o={type:A,rows:r},i=JSON.stringify(o);e[t]=i;var a=n.find("div");a.html(i)};if(A){var l=null,s=!0,c=!1,u=void 0;try{for(var g,d=simulatorCategoryData[Symbol.iterator]();!(s=(g=d.next()).done);s=!0){var M=g.value;if(A===M.clazz){l=M;break}}}catch(t){c=!0,u=t}finally{try{!s&&d.return&&d.return()}finally{if(c)throw u}}var h=l.variables||[];f.eventEmitter.emit(f.SHOW_CHILD_LIST_DIALOG,{variables:h,rows:i,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,r=!1,o=void 0;try{for(var l,s=t[Symbol.iterator]();!(n=(l=s.next()).done);n=!0){var c=l.value;e.append('")}}catch(t){r=!0,o=t}finally{try{!n&&s.return&&s.return()}finally{if(r)throw o}}e.append(''),p.MsgBox.dialog("选择子对象类型",e,function(){if(A=e.val(),!A||""===A)return void p.MsgBox.alert("请先选择子对象类型!");var n=null,r=!0,o=!1,l=void 0; +try{for(var s,c=t[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var u=s.value;if(A===u.clazz){n=u;break}}}catch(t){o=!0,l=t}finally{try{!r&&c.return&&c.return()}finally{if(o)throw l}}var g=n.variables||[];f.eventEmitter.emit(f.SHOW_CHILD_LIST_DIALOG,{variables:g,rows:i,callback:a})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var r=n.find("div");r.html(e[t]),r.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,r=e.header,o=r.dateFormat,i=n[r.name];if(o){var A=new Date(i);i=(0,h.formatDate)(A,o)}i&&"object"===("undefined"==typeof i?"undefined":l(i))&&(i=JSON.stringify(i));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:a,onClick:function(e){if(r.editable){var o=e.target;$(o).css({display:"none"}),n._editorType?t._showEditor(r.name):f.eventEmitter.emit(f.SHOW_CELL_EDITOR,{targetDiv:o,rowData:n,colId:r.id})}}},i))}}]),e}(c.Component);e.default=I},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=n(240),i=r(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new i.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function r(t){return"function"==typeof t}function o(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function A(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,o,a,l,s;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],A(n))return!1;if(r(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(i(n))for(a=Array.prototype.slice.call(arguments,1),s=n.slice(),o=s.length,l=0;l0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}if(!r(e))throw TypeError("listener must be a function");var o=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,o,A,a;if(!r(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],A=n.length,o=-1,n===e||r(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=A;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],r(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?r(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(r(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var r=n(242).default,o=n(243).default,i=n(251),A=n(252).default,a=n(302);t.exports={Tool:r,Node:o,MsgBox:i,Event:a,FlowDesigner:A}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var r=this.newNode();return r?(r._tool=this,r._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),r._createFigure(this.context,{x:t,y:e},n),r):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,r=!1,o=void 0;try{for(var i,A=this.context.allFigures[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);el-c&&al-c&&a>s-c?this.attr("cursor","se-resize"):As-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},r=function(n){if(!this.dragging){var r=t.currentTool;if(r){if(r instanceof d.default||r instanceof u.default||(t.currentTool=t.selectTool,r=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),r instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,i=!0,A=!1,a=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var g=l.value;if(g===e){o=!0;break}}}catch(t){A=!0,a=t}finally{try{!i&&c.return&&c.return()}finally{if(A)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(r instanceof d.default){var M=n.offsetX,h=n.offsetY,p=t.currentConnection;if(p){if(0===e.in)return void f.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void f.alert("当前节点进入的连线最多只能有"+e.in+"条.");p.endX=M,p.endY=h,p.from!==e?!function(){p.endPath(e),t.currentConnection=null;var n=p.from.uuid,r=e.uuid,o=p.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),i=t.getNodeByUUID(r);p=new s.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),p.uuid=o,p.endPath(i)},undo:function(){e.context.removeFigureByUUID(o)}})}():f.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void f.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void f.alert("当前节点出去的连线最多只能有"+e.out+"条.");p=new s.default(e,{endX:M,endY:h}),t.currentConnection=p}}}}};this.rect.mouseover(n),this.rect.mousedown(r),this.icon.mouseover(n),this.icon.mousedown(r);var o=function(){var n=e.rect,r=t.currentTool;if(r&&r instanceof u.default){var o=!1,i=t.selectionFigures,A=!0,a=!1,l=void 0;try{for(var c,g=i[Symbol.iterator]();!(A=(c=g.next()).done);A=!0){var d=c.value;if(d===e){o=!0;break}}}catch(t){a=!0,l=t}finally{try{!A&&g.return&&g.return()}finally{if(a)throw l}}if(!o)return void t.resetSelection();i.forEach(function(t,e){t instanceof s.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},i=function(n,r){var o=t.currentTool;if(o&&o instanceof u.default){e.context.snapto&&(n-=n%10,r-=r%10);var i=t.selectionFigures,A=e.rect,a=(e.icon,A.ox+n),l=A.oy+r;if(!(a<1||l<1)){e.context.resizePaper(a+150,l+150);var c=void 0,g=void 0;switch(this.attr("cursor")){case"nw-resize":c=A.ow-n,g=A.oh-r,c>20&&g>20&&A.attr({x:a,y:l,width:c,height:g});break;case"ne-resize":c=A.ow+n,g=A.oh-r,c>20&&g>20&&A.attr({y:l,width:c,height:g});break;case"se-resize":c=A.ow+n,g=A.oh+r,c>20&&g>20&&A.attr({width:c,height:g});break;case"sw-resize":c=A.ow-n,g=A.oh+r,c>20&&g>20&&A.attr({x:a,width:c,height:g});break;default:i.forEach(function(t,e){t instanceof s.default||t._moveRect(n,r)})}i.forEach(function(t,e){t instanceof s.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},A=function(){e.rect.dragging=!1;var n=[],r=new Map,o=new Map,i=e.rect.ow,A=e.rect.oh,a=e.rect.attr("width"),l=e.rect.attr("height"),c=e.uuid,u=!0,g=!1,d=void 0;try{for(var M,f=t.selectionFigures[Symbol.iterator]();!(u=(M=f.next()).done);u=!0){var h=M.value;if(!(h instanceof s.default)){n.push(h.uuid);var p=h.rect.ox,I=h.rect.oy;p=p?p:0,I=I?I:0;var N=h.rect.attr("x"),T=h.rect.attr("y");r.set(h.uuid,{x:N,y:T}),o.set(h.uuid,{x:p,y:I})}}}catch(t){g=!0,d=t}finally{try{!u&&f.return&&f.return()}finally{if(g)throw d}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,i=void 0;try{for(var A,s=n[Symbol.iterator]();!(e=(A=s.next()).done);e=!0){var u=A.value,g=t.getNodeByUUID(u),d=r.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:a,height:l})}}catch(t){o=!0,i=t}finally{try{!e&&s.return&&s.return()}finally{if(o)throw i}}var M=!0,f=!1,h=void 0;try{for(var p,I=n[Symbol.iterator]();!(M=(p=I.next()).done);M=!0){var N=p.value,T=t.getNodeByUUID(N);T._moveAndResizeTextAndIcon(),T._resetConnections()}}catch(t){f=!0,h=t}finally{try{!M&&I.return&&I.return()}finally{if(f)throw h}}},undo:function(){var e=!0,r=!1,a=void 0;try{for(var l,s=n[Symbol.iterator]();!(e=(l=s.next()).done);e=!0){var u=l.value,g=t.getNodeByUUID(u),d=o.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:i,height:A})}}catch(t){r=!0,a=t}finally{try{!e&&s.return&&s.return()}finally{if(r)throw a}}var M=!0,f=!1,h=void 0;try{for(var p,I=n[Symbol.iterator]();!(M=(p=I.next()).done);M=!0){var N=p.value,T=t.getNodeByUUID(N);T._moveAndResizeTextAndIcon(),T._resetConnections()}}catch(t){f=!0,h=t}finally{try{!M&&I.return&&I.return()}finally{if(f)throw h}}}})};this.rect.drag(i,o,A),this.icon.drag(i,o,A)}},{key:"remove",value:function(){var t=this,e=[].concat(i(this.toConnections)),n=[].concat(i(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,r=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,r=this.rect.oy+e):(n=this.rect.attr("x")+t,r=this.rect.attr("x")+e),this.rect.attr({x:n,y:r})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(i(this.fromConnections),i(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),r=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,n-=5,r+=10,o+=10),"M "+e+" "+n+" L "+(e+r)+" "+n+" L "+(e+r)+" "+(n+o)+" L "+e+" "+(n+o)+" L "+e+" "+n}}]),t}();e.default=h},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,r=n.attr("x"),o=n.attr("y"),i=n.attr("width"),A=n.attr("height");r+=i/2,o+=A/2-10;var a=t.x,s=t.y;t=[],t.push(["M",a,s]),t.push(["L",r,o])}var c=this.to.getPathInfo(!0),u=l.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),r=t.attr("width"),o=t.attr("height");e+=r/2,n+=o/2-10;var i=this.endX,A=this.endY,a=0,s=0,c=null;if(this.to){var u=this.to.rect;i=u.attr("x"),A=u.attr("y"),a=u.attr("width"),s=u.attr("height"),i+=a/2,A+=s/2-10}var g=this.from.getPathInfo(!0),d=Math.abs(e+r/2-(i-a/2)),M=Math.abs(n+o/2-(A-s/2)),f="M"+e+" "+n;if(d>=M){var h=f+" L"+i+" "+n,p=l.default.pathIntersection(g,h);if(p.length>0&&(e=p[0].x,n=p[0].y,f="M"+p[0].x+" "+p[0].y),this.to){var I="M"+e+" "+A+" L"+i+" "+A,N=this.to.getPathInfo(!0);p=l.default.pathIntersection(N,I),p.length>0&&(i=p[0].x,A=p[0].y,e0&&(e=w[0].x,n=w[0].y,f="M"+w[0].x+" "+w[0].y),this.to){var C="M"+i+" "+n+" L"+i+" "+A,D=this.to.getPathInfo(!0);w=l.default.pathIntersection(D,C),w.length>0&&(i=w[0].x,A=w[0].y,n=1e3&&delete a[l.shift()],l.push(A),a[A]=t[L](e,i),n?n(a[A]):a[A])}return o}function i(){return this.hex}function A(t,e){for(var n=[],r=0,o=t.length;o-2*!e>r;r+=2){var i=[{x:+t[r-2],y:+t[r-1]},{x:+t[r],y:+t[r+1]},{x:+t[r+2],y:+t[r+3]},{x:+t[r+4],y:+t[r+5]}];e?r?o-4==r?i[3]={x:+t[0],y:+t[1]}:o-2==r&&(i[2]={x:+t[0],y:+t[1]},i[3]={x:+t[2],y:+t[3]}):i[0]={x:+t[o-2],y:+t[o-1]}:o-4==r?i[3]=i[2]:r||(i[0]={x:+t[r],y:+t[r+1]}),n.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return n}function a(t,e,n,r,o){var i=-3*e+9*n-9*r+3*o,A=t*i+6*e-12*n+6*r;return t*A-3*e+3*n}function l(t,e,n,r,o,i,A,l,s){null==s&&(s=1),s=s>1?1:s<0?0:s;for(var c=s/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],M=0,f=0;fM;)g/=2,d+=(cY(o,A)||Y(e,r)Y(i,a))){var l=(t*r-e*n)*(o-A)-(t-n)*(o*a-i*A),s=(t*r-e*n)*(i-a)-(e-r)*(o*a-i*A),c=(t-n)*(i-a)-(e-r)*(o-A);if(c){var u=l/c,g=s/c,d=+u.toFixed(2),M=+g.toFixed(2);if(!(d<+R(t,n).toFixed(2)||d>+Y(t,n).toFixed(2)||d<+R(o,A).toFixed(2)||d>+Y(o,A).toFixed(2)||M<+R(e,r).toFixed(2)||M>+Y(e,r).toFixed(2)||M<+R(i,a).toFixed(2)||M>+Y(i,a).toFixed(2)))return{x:u,y:g}}}}function u(t,n,r){var o=e.bezierBBox(t),i=e.bezierBBox(n);if(!e.isBBoxIntersect(o,i))return r?0:[];for(var A=l.apply(0,t),a=l.apply(0,n),s=Y(~~(A/5),1),u=Y(~~(a/5),1),g=[],d=[],M={},f=r?0:[],h=0;h=0&&x<=1.001&&m>=0&&m<=1.001&&(r?f++:f.push({x:D.x,y:D.y,t1:R(x,1),t2:R(m,1)}))}}return f}function g(t,n,r){t=e._path2curve(t),n=e._path2curve(n);for(var o,i,A,a,l,s,c,g,d,M,f=r?0:[],h=0,p=t.length;hr)return r;for(;ni?n=o:r=o,o=(r-n)/2+n}return o}var s=3*e,c=3*(r-e)-s,u=1-s-c,g=3*n,d=3*(o-n)-g,M=1-g-d;return a(t,1/(200*i))}function h(t,e){var n=[],r={};if(this.ms=e,this.times=1,t){for(var o in t)t[C](o)&&(r[q(o)]=t[o],n.push(q(o)));n.sort(ct)}this.anim=r,this.top=n[n.length-1],this.percents=n}function p(n,r,o,i,A,a){o=q(o);var l,s,c,u,g,M,h=n.ms,p={},I={},N={};if(i)for(y=0,w=ie.length;yi*n.top){o=n.percents[y],g=n.percents[y-1]||0,h=h/n.top*(o-g),u=n.percents[y+1],l=n.anim[o];break}i&&r.attr(n.anim[n.percents[y]])}if(l){if(s)s.initstatus=i,s.start=new Date-s.ms*i;else{for(var D in l)if(l[C](D)&&(nt[C](D)||r.paper.customAttributes[C](D)))switch(p[D]=r.attr(D),null==p[D]&&(p[D]=et[D]),I[D]=l[D],nt[D]){case G:N[D]=(I[D]-p[D])/h;break;case"colour":p[D]=e.getRGB(p[D]);var x=e.getRGB(I[D]);N[D]={r:(x.r-p[D].r)/h,g:(x.g-p[D].g)/h,b:(x.b-p[D].b)/h};break;case"path":var m=St(p[D],I[D]),L=m[1];for(p[D]=m[0],N[D]=[],y=0,w=p[D].length;y',ht=pt.firstChild,ht.style.behavior="url(#default#VML)",!ht||"object"!=typeof ht.adj)return e.type=B;pt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=m,e.fn=T=m.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=k.call(e),"finite"==e?!Z[C](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,r,o,i,A){if(null==i){var a=t-r,l=n-o;return a||l?(180+180*O.atan2(-l,-a)/V+360)%360:0}return e.angle(t,n,i,A)-e.angle(r,o,i,A)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,n,r){if(r=e.is(r,"finite")?r:10,e.is(t,X)){for(var o=t.length;o--;)if(F(t[o]-n)<=r)return t[o]}else{t=+t;var i=n%t;if(it-r)return n-i+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*O.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,D.win,n),D.win=n,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var It=function(t){if(e.vml){var n,r=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write(""),i.close(),n=i.body}catch(t){n=createPopup().document.body}var A=n.createTextRange();It=o(function(t){try{n.style.color=Q(t).replace(r,B);var e=A.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),It=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,B).getPropertyValue("color")})}return It(t)},Nt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Tt=function(){return"hsl("+[this.h,this.s,this.l]+")"},Et=function(){return this.hex},yt=function(t,n,r){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(r=t.b,n=t.g,t=t.r),null==n&&e.is(t,P)){var o=e.getRGB(t);t=o.r,n=o.g,r=o.b}return(t>1||n>1||r>1)&&(t/=255,n/=255,r/=255),[t,n,r]},wt=function(t,n,r,o){t*=255,n*=255,r*=255;var i={r:t,g:n,b:r,hex:e.rgb(t,n,r),toString:Et};return e.is(o,"finite")&&(i.opacity=o),i};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Et,t},e.hsb2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,r=t.o,t=t.h),t*=360;var o,i,A,a,l;return t=t%360/60,l=n*e,a=l*(1-F(t%2-1)),o=i=A=n-l,t=~~t,o+=[l,a,0,0,a,l][t],i+=[a,l,l,a,0,0][t],A+=[0,0,a,l,l,a][t],wt(o,i,A,r)},e.hsl2rgb=function(t,e,n,r){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var o,i,A,a,l;return t=t%360/60,l=2*e*(n<.5?n:1-n),a=l*(1-F(t%2-1)),o=i=A=n-l/2,t=~~t,o+=[l,a,0,0,a,l][t],i+=[a,l,l,a,0,0][t],A+=[0,0,a,l,l,a][t],wt(o,i,A,r)},e.rgb2hsb=function(t,e,n){n=yt(t,e,n),t=n[0],e=n[1],n=n[2];var r,o,i,A;return i=Y(t,e,n),A=i-R(t,e,n),r=0==A?null:i==t?(e-n)/A:i==e?(n-t)/A+2:(t-e)/A+4,r=(r+360)%6*60/360,o=0==A?0:A/i,{h:r,s:o,b:i,toString:Nt}},e.rgb2hsl=function(t,e,n){n=yt(t,e,n),t=n[0],e=n[1],n=n[2];var r,o,i,A,a,l;return A=Y(t,e,n),a=R(t,e,n),l=A-a,r=0==l?null:A==t?(e-n)/l:A==e?(n-t)/l+2:(t-e)/l+4,r=(r+360)%6*60/360,i=(A+a)/2,o=0==l?0:i<.5?l/(2*i):l/(2-2*i),{h:r,s:o,l:i,toString:Tt}},e._path2string=function(){return this.join(",").replace(it,"$1")};e._preload=function(t,e){var n=D.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},n.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(n),n.src=t};e.getRGB=o(function(t){if(!t||(t=Q(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:i};!(ot[C](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=It(t));var n,r,o,A,a,l,s=t.match(J);return s?(s[2]&&(o=$(s[2].substring(5),16),r=$(s[2].substring(3,5),16),n=$(s[2].substring(1,3),16)),s[3]&&(o=$((a=s[3].charAt(3))+a,16),r=$((a=s[3].charAt(2))+a,16),n=$((a=s[3].charAt(1))+a,16)),s[4]&&(l=s[4][S](rt),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),r=q(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),o=q(l[2]),"%"==l[2].slice(-1)&&(o*=2.55),"rgba"==s[1].toLowerCase().slice(0,4)&&(A=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(A/=100)),s[5]?(l=s[5][S](rt),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),r=q(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),o=q(l[2]),"%"==l[2].slice(-1)&&(o*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsba"==s[1].toLowerCase().slice(0,4)&&(A=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(A/=100),e.hsb2rgb(n,r,o,A)):s[6]?(l=s[6][S](rt),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),r=q(l[1]),"%"==l[1].slice(-1)&&(r*=2.55),o=q(l[2]),"%"==l[2].slice(-1)&&(o*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsla"==s[1].toLowerCase().slice(0,4)&&(A=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(A/=100),e.hsl2rgb(n,r,o,A)):(s={r:n,g:r,b:o,toString:i},s.hex="#"+(16777216|o|r<<8|n<<16).toString(16).slice(1),e.is(A,"finite")&&(s.opacity=A),s)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i}},e),e.hsb=o(function(t,n,r){return e.hsb2rgb(t,n,r).hex}),e.hsl=o(function(t,n,r){return e.hsl2rgb(t,n,r).hex}),e.rgb=o(function(t,e,n){function r(t){return t+.5|0}return"#"+(16777216|r(n)|r(e)<<8|r(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=Ct(t);if(n.arr)return xt(n.arr);var r={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||Q(t).replace(At,function(t,e,n){var i=[],A=e.toLowerCase();if(n.replace(lt,function(t,e){e&&i.push(+e)}),"m"==A&&i.length>2&&(o.push([e][b](i.splice(0,2))),A="l",e="m"==e?"l":"L"),"r"==A)o.push([e][b](i));else for(;i.length>=r[A]&&(o.push([e][b](i.splice(0,r[A]))),r[A]););}),o.toString=e._path2string,n.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=xt(t)),n.length||Q(t).replace(at,function(t,e,r){var o=[];k.call(e);r.replace(lt,function(t,e){e&&o.push(+e)}),n.push([e][b](o))}),n.toString=e._path2string,n});var Ct=function(t){var e=Ct.ps=Ct.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[C](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,r,o,i,A,a,l){var s=1-l,c=H(s,3),u=H(s,2),g=l*l,d=g*l,M=c*t+3*u*l*n+3*s*l*l*o+d*A,f=c*e+3*u*l*r+3*s*l*l*i+d*a,h=t+2*l*(n-t)+g*(o-2*n+t),p=e+2*l*(r-e)+g*(i-2*r+e),I=n+2*l*(o-n)+g*(A-2*o+n),N=r+2*l*(i-r)+g*(a-2*i+r),T=s*t+l*n,E=s*e+l*r,y=s*o+l*A,w=s*i+l*a,C=90-180*O.atan2(h-I,p-N)/V;return(h>I||p=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var r=e.isPointInsideBBox;return r(n,t.x,t.y)||r(n,t.x2,t.y)||r(n,t.x,t.y2)||r(n,t.x2,t.y2)||r(t,n.x,n.y)||r(t,n.x2,n.y)||r(t,n.x,n.y2)||r(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return g(t,e)},e.pathIntersectionNumber=function(t,e){return g(t,e,1)},e.isPointInsidePath=function(t,n,r){var o=e.pathBBox(t);return e.isPointInsideBBox(o,n,r)&&g(t,[["M",n,r],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=Ct(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=St(t);for(var r,o=0,i=0,A=[],a=[],l=0,s=t.length;l1&&(I=O.sqrt(I),n*=I,r*=I);var N=n*n,T=r*r,E=(A==a?-1:1)*O.sqrt(F((N*T-N*p*p-T*h*h)/(N*p*p+T*h*h))),y=E*n*p/r+(t+l)/2,w=E*-r*h/n+(e+s)/2,C=O.asin(((e-w)/r).toFixed(9)),D=O.asin(((s-w)/r).toFixed(9));C=tD&&(C-=2*V),!a&&D>C&&(D-=2*V)}var x=D-C;if(F(x)>g){var m=D,L=l,v=s;D=C+g*(a&&D>C?1:-1),l=y+n*O.cos(D),s=w+r*O.sin(D),M=Bt(l,s,n,r,i,0,a,L,v,[D,m,y,w])}x=D-C;var B=O.cos(C),j=O.sin(C),Q=O.cos(D),U=O.sin(D),z=O.tan(x/4),k=4/3*n*z,Y=4/3*r*z,R=[t,e],H=[t+k*j,e-Y*B],G=[l+k*U,s-Y*Q],P=[l,s];if(H[0]=2*R[0]-H[0],H[1]=2*R[1]-H[1],c)return[H,G,P][b](M);M=[H,G,P][b](M).join()[S](",");for(var X=[],W=0,J=M.length;W"1e12"&&(g=.5),F(d)>"1e12"&&(d=.5),g>0&&g<1&&(l=jt(t,e,n,r,o,i,A,a,g),f.push(l.x),M.push(l.y)),d>0&&d<1&&(l=jt(t,e,n,r,o,i,A,a,d),f.push(l.x),M.push(l.y)),s=i-2*r+e-(a-2*i+r),c=2*(r-e)-2*(i-r),u=e-r,g=(-c+O.sqrt(c*c-4*s*u))/2/s,d=(-c-O.sqrt(c*c-4*s*u))/2/s,F(g)>"1e12"&&(g=.5),F(d)>"1e12"&&(d=.5),g>0&&g<1&&(l=jt(t,e,n,r,o,i,A,a,g),f.push(l.x),M.push(l.y)),d>0&&d<1&&(l=jt(t,e,n,r,o,i,A,a,d),f.push(l.x),M.push(l.y)),{min:{x:R[L](0,f),y:R[L](0,M)},max:{x:Y[L](0,f),y:Y[L](0,M)}}}),St=e._path2curve=o(function(t,e){var n=!e&&Ct(t);if(!e&&n.curve)return xt(n.curve);for(var r=Lt(t),o=e&&Lt(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},A={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var r,o,i={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in i)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](Bt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==n||"S"==n?(r=2*e.x-e.bx,o=2*e.y-e.by):(r=e.x,o=e.y),t=["C",r,o][b](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](vt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](vt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",o&&(u[e]="A"),t.splice(e++,0,["C"][b](n.splice(0,6)));t.splice(e,1),f=Y(r.length,o&&o.length||0)}},s=function(t,e,n,i,A){t&&e&&"M"==t[A][0]&&"M"!=e[A][0]&&(e.splice(A,0,["M",i.x,i.y]),n.bx=0,n.by=0,n.x=t[A][1],n.y=t[A][2],f=Y(r.length,o&&o.length||0))},c=[],u=[],g="",d="",M=0,f=Y(r.length,o&&o.length||0);Mo){if(n&&!g.start){if(c=$t(A,a,l[1],l[2],l[3],l[4],l[5],l[6],o-d),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],i)return u;g.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,l[5],l[6]].join(),d+=s,A=+l[5],a=+l[6];continue}if(!t&&!n)return c=$t(A,a,l[1],l[2],l[3],l[4],l[5],l[6],o-d),{x:c.x,y:c.y,alpha:c.alpha}}d+=s,A=+l[5],a=+l[6]}u+=l.shift()+l}return g.end=u,c=t?d:n?g:e.findDotsAtSegment(A,a,l[0],l[1],l[2],l[3],l[4],l[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),re=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return re(t,e).end;var r=re(t,n,1);return e?re(r,e).end:r},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var r=this.getPath();if(r)return e.getSubpath(r,t,n)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,n=O.sqrt(.1734+e*e),r=n-e,o=H(F(r),1/3)*(r<0?-1:1),i=-n-e,A=H(F(i),1/3)*(i<0?-1:1),a=o+A+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*O.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,n=7.5625,r=2.75;return t<1/r?e=n*t*t:t<2/r?(t-=1.5/r,e=n*t*t+.75):t<2.5/r?(t-=2.25/r,e=n*t*t+.9375):(t-=2.625/r,e=n*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var ie=[],Ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var n=+new Date,r=0;r1&&!o.next){for(A in g)g[C](A)&&(f[A]=o.totalOrigin[A]);o.el.attr(f),p(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&p(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}ie.length&&Ae(ae)},le=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,r,o,i,A){var a=this;if(a.removed)return A&&A.call(a),a;var l=r instanceof h?r:e.animation(r,o,i,A);p(l,a,l.percents[0],null,a.attr());for(var s=0,c=ie.length;sl&&(l=c)}l+="%",!t[l].callback&&(t[l].callback=o)}return new h(t,n)},Zt.animate=function(t,n,r,o){var i=this;if(i.removed)return o&&o.call(i),i;var A=t instanceof h?t:e.animation(t,n,r,o);return p(A,i,A.percents[0],null,i.attr()),i},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,R(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,r,o=[],i=0;if(null!=e)return p(t,this,-1,R(e,1)),this;for(n=ie.length;i1)for(var r=0,o=n.length;r.5)-1;l(g-.5,2)+l(d-.5,2)>.25&&(d=i.sqrt(.25-l(g-.5,2))*o+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*o)}return u}),o=o.split(/\s*\-\s*/),"linear"==s){var T=o.shift();if(T=-r(T),isNaN(T))return null;var E=[0,0,i.cos(t.rad(T)),i.sin(t.rad(T))],y=1/(A(a(E[2]),a(E[3]))||1);E[2]*=y,E[3]*=y,E[2]<0&&(E[0]=-E[2],E[2]=0),E[3]<0&&(E[1]=-E[3],E[3]=0)}var w=t._parseDots(o);if(!w)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(f.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){I=h(s+"Gradient",{id:c}),e.gradient=I,h(I,"radial"==s?{fx:g,fy:d}:{x1:E[0],y1:E[1],x2:E[2],y2:E[3],gradientTransform:e.matrix.invert()}),f.defs.appendChild(I);for(var C=0,D=w.length;C1?Q.opacity/100:Q.opacity});case"stroke":Q=t.getRGB(f),l.setAttribute(M,Q.hex),"stroke"==M&&Q[e]("opacity")&&h(l,{"stroke-opacity":Q.opacity>1?Q.opacity/100:Q.opacity}),"stroke"==M&&r._.arrows&&("startString"in r._.arrows&&E(r,r._.arrows.startString),"endString"in r._.arrows&&E(r,r._.arrows.endString,1));break;case"gradient":("circle"==r.type||"ellipse"==r.type||"r"!=n(f).charAt())&&p(r,f);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&h(l,{"stroke-opacity":f>1?f/100:f});case"fill-opacity":if(c.gradient){S=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,u)),S&&(U=S.getElementsByTagName("stop"),h(U[U.length-1],{"stop-opacity":f}));break}default:"font-size"==M&&(f=o(f,10)+"px");var z=M.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[z]=f,r._.dirty=1,l.setAttribute(M,f)}}x(r,i),l.style.visibility=g},D=1.2,x=function(r,i){if("text"==r.type&&(i[e]("text")||i[e]("font")||i[e]("font-size")||i[e]("x")||i[e]("y"))){var A=r.attrs,a=r.node,l=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(i[e]("text")){for(A.text=i.text;a.firstChild;)a.removeChild(a.firstChild);for(var s,c=n(i.text).split("\n"),g=[],d=0,M=c.length;d"));var Z=X.getBoundingClientRect();I.W=g.w=(Z.right-Z.left)/W,I.H=g.h=(Z.bottom-Z.top)/W,I.X=g.x,I.Y=g.y+I.H/2,("x"in l||"y"in l)&&(I.path.v=t.format("m{0},{1}l{2},{1}",i(g.x*T),i(g.y*T),i(g.x*T)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=o.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),s=e+d+n),M}),i=i.split(/\s*\-\s*/),"linear"==l){var c=i.shift();if(c=-r(c),isNaN(c))return null}var u=t._parseDots(i);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(A),A.on=!0,A.method="none",A.color=u[0].color,A.color2=u[u.length-1].color;for(var g=[],f=0,h=u.length;f')}}catch(t){B=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,r=e.height,o=e.width,i=e.x,A=e.y;if(!n)throw new Error("VML container not found.");var a=new t._Paper,l=a.canvas=t._g.doc.createElement("div"),s=l.style;return i=i||0,A=A||0,o=o||512,r=r||342,a.width=o,a.height=r,o==+o&&(o+="px"),r==+r&&(r+="px"),a.coordsize=1e3*T+d+1e3*T,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(a.span),s.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,r),1==n?(t._g.doc.body.appendChild(l),s.left=i+"px",s.top=A+"px",s.position="absolute"):n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var j=t.st;for(var Q in v)v[e](Q)&&!j[e](Q)&&(j[Q]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(Q))}}.apply(e,r),!(void 0!==o&&(t.exports=o))}])})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n1&&(o=(t+1)/2),r.splice(o,1),2===r.length)r=e.connection._buildStraightLinePathInfo();else{var i=r[1],A=e.connection._buildFromFigureIntersetion({x:i[1],y:i[2]},!0),a=r[0];a[1]=A.x,a[2]=A.y;var l=r[r.length-2],s=e.connection._buildToFigureIntersetion({x:l[1],y:l[2]},!0),c=r[r.length-1];c[1]=s.x,c[2]=s.y}e.path.attr("path",r),e.remove()});var g=function(r,o){e.context.snapto&&(r-=r%10,o-=o%10);var a=this.ox+r,l=this.oy+o;if(!(a<1||l<1)){e.context.resizePaper(a+15,l+15),this.attr("x",a),this.attr("y",l),A=Math.round(t/2);var s=e.path.attr("path"),c=s.length,u=void 0,g=void 0,d=void 0,M=2*(n.length-1)-1;if(0===t||1===t){if(d=s[1],u=e.connection._buildFromFigureIntersetion({x:d[1],y:d[2]},!0),g=n[0],2===n.length){var f=e.connection._buildToFigureIntersetion({x:a,y:l},!0);if(f){var h=n[n.length-1];h[1]=f.x,h[2]=f.y}}}else M!==t&&M!==t+1&&M!==t+2||(d=s[c-2],u=e.connection._buildToFigureIntersetion({x:a,y:l},!0),g=n[n.length-1]);u&&(g[1]=u.x,g[2]=u.y);var p=[];n.forEach(function(t,e){i?e===A?p.push(["L",a,l]):p.push(t):(p.push(t),e===A&&p.push(["L",a,l]))}),e.path.attr("path",p),e.connection._buildText()}},d=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},M=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,r=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(r);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(g,d,M)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n'}}]),e}(s.default);e.default=c},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}}]),e}(s.default);e.default=c},function(t,e){"use strict";function n(t){var e=A("消息提示",t);e.modal("show")}function r(t,e){var n=A("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function o(t,e,n){var r=A(t,e,[{name:"确认",click:function(){n.call(this)}}]);r.modal("show")}function i(t,e,n,r,o){var i=A(t,e,n,o);if(i.modal("show"),r){var a=!0,l=!1,s=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;i.on(g.name,g.callback)}}catch(t){l=!0,s=t}finally{try{!a&&u.return&&u.return()}finally{if(l)throw s}}}}function A(t,e,n,r){var o=this,i="modal-dialog"+(r?" modal-lg":""),A=$(''),l=$('
    ');A.append(l); +var s=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new l.default(this.context),this.context.flowDesigner=this;var r="_prop_container",o=$('
    ');this.canvasContainer.append(o);var A=$('');o.append(A),A.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),o.append(a),o.draggable();var s=$("#__prop_panel_tool__");s.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(s.removeClass("glyphicon-circle-arrow-left"),s.addClass("glyphicon-circle-arrow-down")):(s.removeClass("glyphicon-circle-arrow-down"),s.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return A(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void I.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void I.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void I.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,r=t.y,o=t.width,i=t.height,A=t.name;n=parseInt(n),r=parseInt(r),o=parseInt(o),i=parseInt(i);var a=n+o+10,l=r+i+10;this.context.resizePaper(a+50,l+50);var s=e._newNodeInstance(n,r,A);s.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;g.eventEmitter.on(g.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,r=!0,o=!1,i=void 0;try{for(var A,a=function(){var e=A.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},l=this.buttons[Symbol.iterator]();!(r=(A=l.next()).done);r=!0)a()}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}var s=$('');this.toolbar.append(s),s.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,r=void 0;try{for(var o,i=function(){var e=o.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){g.eventEmitter.emit(g.TRIGGER_TOOL,e.getType())})},A=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=A.next()).done);e=!0)i()}catch(t){n=!0,r=t}finally{try{!e&&A.return&&A.return()}finally{if(n)throw r}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;g.eventEmitter.on(g.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof M.default){var r=n.name||n.text.attr("text"),o=$('
    '),i=$('');o.append(i),t.propContainer.append(o),i.change(function(t){var r=$(this).val(),o=n.name,i=n.uuid,A=!1,a=!0,l=!1,s=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g instanceof M.default&&g!==n&&g.name===r){A=!0;break}}}catch(t){l=!0,s=t}finally{try{!a&&u.return&&u.return()}finally{if(l)throw s}}return A?void I.alert("节点名已存在!"):(n.name=r,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.name=r,t.text.attr("text",r)},undo:function(){var t=e.context.getNodeByUUID(i);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof h.default){var A=$('
    '),a=$('');A.append(a),t.propContainer.append(A),a.change(function(t){var r=$(this).val(),o=n.name,i=n.uuid,A=n.from.fromConnections,a=!1,l=!0,s=!1,c=void 0;try{for(var u,g=A[Symbol.iterator]();!(l=(u=g.next()).done);l=!0){var d=u.value;if(d!==n&&d.name===r){a=!0;break}}}catch(t){s=!0,c=t}finally{try{!l&&g.return&&g.return()}finally{if(s)throw c}}return a?void I.alert("连线名已存在"):(n.name=r,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.name=r,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(i);t.name=o,t._buildText()}}))});var l=$('
    '),s=$('');l.append(s),s.val(n.type),s.change(function(t){var r=$(this).val(),o=n.uuid,i=n.type;n.type=r,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=i,t.updatePath()}})}),t.propContainer.append(l),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),g.eventEmitter.on(g.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),g.eventEmitter.emit(g.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(I.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,r=void 0;try{for(var o,i=this.context.allFigures[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var A=o.value;if(A instanceof M.default){var a=A.validate();a&&t.push(a)}}}catch(t){n=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}if(t.length>0){var l="";return t.forEach(function(t,e){l+=e+1+"."+t+"
    "}),l='错误:
    '+l+"
    ",I.alert(l),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof M.default&&t.push(e.toJSON())}),t}}]),t}();e.default=N},function(t,e,n){var r=n(254);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var r=n(260);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,r=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(r).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new r(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',r=function(e){t(e).on("click",n,this.close)};r.VERSION="3.3.7",r.TRANSITION_DURATION=150,r.prototype.close=function(e){function n(){A.detach().trigger("closed.bs.alert").remove()}var o=t(this),i=o.attr("data-target");i||(i=o.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,""));var A=t("#"===i?[]:i);e&&e.preventDefault(),A.length||(A=o.closest(".alert")),A.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(A.removeClass("in"),t.support.transition&&A.hasClass("fade")?A.one("bsTransitionEnd",n).emulateTransitionEnd(r.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=r,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,r.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var r=t(this),o=r.data("bs.button"),i="object"==typeof e&&e;o||r.data("bs.button",o=new n(this,i)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,r){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,r),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",r=this.$element,o=r.is("input")?"val":"html",i=r.data();e+="Text",null==i.resetText&&r.data("resetText",r[o]()),setTimeout(t.proxy(function(){r[o](null==i[e]?this.options[e]:i[e]),"loadingText"==e?(this.isLoading=!0,r.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,r.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var r=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=r,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var r=t(n.target).closest(".btn");e.call(r,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),r.is("input,button")?r.trigger("focus"):r.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var r=t(this),o=r.data("bs.carousel"),i=t.extend({},n.DEFAULTS,r.data(),"object"==typeof e&&e),A="string"==typeof e?e:i.slide;o||r.data("bs.carousel",o=new n(this,i)),"number"==typeof e?o.to(e):A?o[A]():i.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),r="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(r&&!this.options.wrap)return e;var o="prev"==t?-1:1,i=(n+o)%this.$items.length;return this.$items.eq(i)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,r){var o=this.$element.find(".item.active"),i=r||this.getItemForDirection(e,o),A=this.interval,a="next"==e?"left":"right",l=this;if(i.hasClass("active"))return this.sliding=!1;var s=i[0],c=t.Event("slide.bs.carousel",{relatedTarget:s,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,A&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(i)]);u&&u.addClass("active")}var g=t.Event("slid.bs.carousel",{relatedTarget:s,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(i.addClass(e),i[0].offsetWidth,o.addClass(a),i.addClass(a),o.one("bsTransitionEnd",function(){i.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(g)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger(g)),A&&this.cycle(),this}};var r=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=r,this};var o=function(n){var r,o=t(this),i=t(o.attr("data-target")||(r=o.attr("href"))&&r.replace(/.*(?=#[^\s]+$)/,""));if(i.hasClass("carousel")){var A=t.extend({},i.data(),o.data()),a=o.attr("data-slide-to");a&&(A.interval=!1),e.call(i,A),a&&i.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,r=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(r)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),i=t.extend({},r.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&i.toggle&&/show|hide/.test(e)&&(i.toggle=!1),o||n.data("bs.collapse",o=new r(this,i)),"string"==typeof e&&o[e]()})}var r=function(e,n){this.$element=t(e),this.options=t.extend({},r.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};r.VERSION="3.3.7",r.TRANSITION_DURATION=350,r.DEFAULTS={toggle:!0},r.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},r.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var i=t.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var A=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[A](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[A](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var l=t.camelCase(["scroll",A].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(r.TRANSITION_DURATION)[A](this.$element[0][l])}}}},r.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(r.TRANSITION_DURATION):o.call(this)}}},r.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},r.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,r){var o=t(r);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},r.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=r,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(r){var o=t(this);o.attr("data-target")||r.preventDefault();var i=e(o),A=i.data("bs.collapse"),a=A?"toggle":o.data();n.call(i,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var r=n&&t(n);return r&&r.length?r:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(i).each(function(){var r=t(this),o=e(r),i={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",i)),n.isDefaultPrevented()||(r.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",i)))))}))}function r(e){return this.each(function(){var n=t(this),r=n.data("bs.dropdown");r||n.data("bs.dropdown",r=new A(this)),"string"==typeof e&&r[e].call(n)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',A=function(e){t(e).on("click.bs.dropdown",this.toggle)};A.VERSION="3.3.7",A.prototype.toggle=function(r){var o=t(this);if(!o.is(".disabled, :disabled")){var i=e(o),A=i.hasClass("open");if(n(),!A){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(i.trigger(r=t.Event("show.bs.dropdown",a)),r.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},A.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var r=t(this);if(n.preventDefault(),n.stopPropagation(),!r.is(".disabled, :disabled")){var o=e(r),A=o.hasClass("open");if(!A&&27!=n.which||A&&27==n.which)return 27==n.which&&o.find(i).trigger("focus"),r.trigger("click");var a=" li:not(.disabled):visible a",l=o.find(".dropdown-menu"+a);if(l.length){var s=l.index(n.target);38==n.which&&s>0&&s--,40==n.which&&sdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,r){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(r),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),i=o.length;i--;){var A=o[i];if("click"==A)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=A){var a="hover"==A?"mouseenter":"focusin",l="hover"==A?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,r){n[t]!=r&&(e[t]=r)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var r=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!r)return;var o=this,i=this.tip(),A=this.getUID(this.type);this.setContent(),i.attr("id",A),this.$element.attr("aria-describedby",A),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,s=l.test(a);s&&(a=a.replace(l,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=i[0].offsetWidth,g=i[0].offsetHeight;if(s){var d=a,M=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+g>M.bottom?"top":"top"==a&&c.top-gM.width?"left":"left"==a&&c.left-uA.top+A.height&&(o.top=A.top+A.height-l)}else{var s=e.left-i,c=e.left+i+n;sA.right&&(o.left=A.left+A.width-c)}return o},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var r=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=r,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var r=t(this),o=r.data("bs.popover"),i="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||r.data("bs.popover",o=new n(this,i)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var r=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=r,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,r){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,r),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var r=t(this),o=r.data("bs.scrollspy"),i="object"==typeof n&&n;o||r.data("bs.scrollspy",o=new e(this,i)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",r=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",r=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),i=/^#./.test(o)&&t(o);return i&&i.length&&i.is(":visible")&&[[i[n]().top+r,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),r=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,i=this.targets,A=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=r)return A!=(t=i[i.length-1])&&this.activate(t);if(A&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var A=r.find("> .active"),a=o&&t.support.transition&&(A.length&&A.hasClass("fade")||!!r.find("> .fade").length);A.length&&a?A.one("bsTransitionEnd",i).emulateTransitionEnd(n.TRANSITION_DURATION):i(),A.removeClass("in")};var r=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=r,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var r=t(this),o=r.data("bs.affix"),i="object"==typeof e&&e;o||r.data("bs.affix",o=new n(this,i)),"string"==typeof e&&o[e]()})}var n=function(e,r){this.options=t.extend({},n.DEFAULTS,r),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,r){var o=this.$target.scrollTop(),i=this.$element.offset(),A=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-r&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),r=this.options.offset,o=r.top,i=r.bottom,A=Math.max(t(document).height(),t(document.body).height());"object"!=typeof r&&(i=o=r),"function"==typeof o&&(o=r.top(this.$element)),"function"==typeof i&&(i=r.bottom(this.$element));var a=this.getState(A,e,o,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var l="affix"+(a?"-"+a:""),s=t.Event(l+".bs.affix");if(this.$element.trigger(s),s.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:A-e-i})}};var r=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=r,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),r=n.data();r.offset=r.offset||{},null!=r.offsetBottom&&(r.offset.bottom=r.offsetBottom),null!=r.offsetTop&&(r.offset.top=r.offsetTop),e.call(n,r)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,r,o=t(this),i=n.handle?t(n.handle,o):o;i.on({mousedown:function(i){var A=i.target,a="",l=!1;if(A&&(a=A.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?l=!0:a.indexOf("CodeMirror-")>-1&&(l=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!l)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===A.tagName||"INPUT"===A.tagName||A&&"presentation"===t(A).attr("role")||n.exclude&&~t.inArray(i.target,t(n.exclude,o)))){var s=o.offset();e=i.pageX-s.left,r=i.pageY-s.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-r,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n0&&A.push(u)}else{var h=u.rect,p=h.getBBox();(p.x>=n.x&&p.x<=n.x2||p.x2>=n.x&&p.x2<=n.x2)&&(p.y>=n.y&&p.y<=n.y2||p.y2>=n.y&&p.y2<=n.y2)&&l.push(u)}}l.length>0?l.forEach(function(t,e){o.addSelection(t)}):A.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var r=null,o=this.context,i=o.paper;i.set();this.canvas=i.rect(0,0,i.width,i.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof u.default||e instanceof s.default)){var n=t.offsetX,r=t.offsetY,i=e._newNodeInstance(n,r);i&&!function(){var t=i.uuid,A=i.name,a=i.toJSON();o.addRedoUndo({redo:function(){i=e._newNodeInstance(n,r,A),i.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof u.default){var e=o.currentConnection;if(e){var n=t.offsetX,r=t.offsetY;e.endX=n,e.endY=r,e.updatePath()}}})}}]),t}();e.default=M},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>r&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof N.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof N.default&&e.select()}),t&&E.eventEmitter.emit(E.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof N.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),E.eventEmitter.emit(E.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return d.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,r=!1,o=void 0;try{for(var i,A=this.allFigures[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;if(a instanceof w.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,r=!1,o=void 0;try{for(var i,A=this.allFigures[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;if(a.uuid===t){e=a;break}}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;E.eventEmitter.on(E.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),E.eventEmitter.on(E.REMOVE_CLICKED,function(){var e=[].concat(i(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var r=e.toJSON(),o=e.uuid,i=t;e instanceof N.default?t.addRedoUndo({redo:function(){var t=i.getNodeByUUID(o),e=t.from.uuid,n=t.to.uuid,A=i.context.getNodeByUUID(e),a=i.context.getNodeByUUID(n),l=new N.default(A,{x:A.rect.attr("x"),y:A.rect.attr("y")});A.fromConnections.push(l),a.toConnections.push(l),l.to=a,l.fromJSON(r)},undo:function(){i.removeFigureByUUID(o)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){i.removeFigureByUUID(o)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(r),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),E.eventEmitter.on(E.ALIGN_CENTER,function(){var e=-1,n=-1,r=void 0,o=new Map,i=0,A=!0,a=!1,l=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var u=s.value;if(u instanceof N.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===i?(e=u.rect.attr("x"),r=u.rect.attr("width"),e+=r/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),i++}}catch(t){a=!0,l=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw l}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=o.keys()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var A=r.value,a=d.getNodeByUUID(A),l=o.get(A),s=l.newXY;a.move(s.x,s.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=o.keys()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var A=r.value,a=d.getNodeByUUID(A),l=o.get(A),s=l.oldXY;a.move(s.x,s.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}})}),E.eventEmitter.on(E.ALIGN_MIDDLE,function(){var e=-1,n=-1,r=void 0,o=new Map,i=0,A=!0,a=!1,l=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var u=s.value;if(u instanceof N.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===i?(n=u.rect.attr("y"),r=u.rect.attr("height"),n+=r/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),i++}}catch(t){a=!0,l=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw l}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=o.keys()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var A=r.value,a=d.getNodeByUUID(A),l=o.get(A),s=l.newXY;a.move(s.x,s.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var r,i=o.keys()[Symbol.iterator]();!(t=(r=i.next()).done);t=!0){var A=r.value,a=d.getNodeByUUID(A),l=o.get(A),s=l.oldXY;a.move(s.x,s.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}})}),E.eventEmitter.on(E.UNIFY_SIZE,function(){var e=void 0,n=void 0,r=new Map,o=0,i=!0,A=!1,a=void 0;try{for(var l,s=t.selectionFigures[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){var c=l.value;if(c instanceof N.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===o?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},r.set(c.uuid,u),o++}}catch(t){A=!0,a=t}finally{try{!i&&s.return&&s.return()}finally{if(A)throw a}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,i=r.keys()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var A=o.value,a=g.getNodeByUUID(A),l=r.get(A),s=l.newWH;a.changeSize(s.w,s.h)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,i=r.keys()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var A=o.value,a=g.getNodeByUUID(A),l=r.get(A),s=l.oldWH;a.changeSize(s.w,s.h)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new f.default,this.connectionTool=new p.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=C},function(t,e,n){var r;!function(){"use strict";function o(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var i=function(){var t,e,n=[],r=-1,i=0,A=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(A=!0,t[e](),A=!1,this):this},{add:function(e){return A?this:(n.splice(r+1,n.length-r),n.push(e),i&&n.length>i&&o(n,0,-(i+1)),r=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=n[r];return o?(e(o,"undo"),r-=1,t&&t(),this):this},redo:function(){var o=n[r+1];return o?(e(o,"redo"),r+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],r=-1,t&&e>0&&t()},hasUndo:function(){return r!==-1},hasRedo:function(){return r>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=n(284).randomBytes;M=g=t&&function(){return t(16)},g()}catch(t){}}function l(t,e,n){var r=e&&n||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[r+o++]=I[t])});o<16;)e[r+o++]=0;return e}function s(t,e){var n=e||0,r=p;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function c(t,e,n){var r=e&&n||0,o=e||[];t=t||{};var i=null!=t.clockseq?t.clockseq:y,A=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:C+1,l=A-w+(a-C)/1e4;if(l<0&&null==t.clockseq&&(i=i+1&16383),(l<0||A>w)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");w=A,C=a,y=i,A+=122192928e5;var c=(1e4*(268435455&A)+a)%4294967296;o[r++]=c>>>24&255,o[r++]=c>>>16&255,o[r++]=c>>>8&255,o[r++]=255&c;var u=A/4294967296*1e4&268435455;o[r++]=u>>>8&255,o[r++]=255&u,o[r++]=u>>>24&15|16,o[r++]=u>>>16&255,o[r++]=i>>>8|128,o[r++]=255&i;for(var g=t.node||E,d=0;d<6;d++)o[r+d]=g[d];return e?e:s(o)}function u(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"===t?new h(16):null,t=null),t=t||{};var o=t.random||(t.rng||g)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;i++)e[r+i]=o[i];return e||s(o)}var g,d,M,f;i?A():a();for(var h="function"==typeof o?o:Array,p=[],I={},N=0;N<256;N++)p[N]=(N+256).toString(16).substr(1),I[p[N]]=N;var T=g(),E=[1|T[0],T[1],T[2],T[3],T[4],T[5]],y=16383&(T[6]<<8|T[7]),w=0,C=0,D=u;D.v1=c,D.v4=u,D.parse=l,D.unparse=s,D.BufferClass=h,D._rng=g,D._mathRNG=d,D._nodeRNG=M,D._whatwgRNG=f,"undefined"!=typeof t&&t.exports?t.exports=D:(r=function(){return D}.call(e,n,e,t),!(void 0!==r&&(t.exports=r)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,r){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function A(e,n){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function h(e){return+e!=e&&(e=0),t.alloc(+e)}function p(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var o=!1;;)switch(n){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;n=(""+n).toLowerCase(),o=!0}}function I(t,e,n){var r=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,e,n);case"utf8":case"utf-8":return b(this,e,n);case"ascii":return B(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return L(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,n);default:if(r)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),r=!0}}function N(t,e,n){var r=t[e];t[e]=t[n],t[n]=r}function T(e,n,r,o,i){if(0===e.length)return-1;if("string"==typeof r?(o=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof n&&(n=t.from(n,o)),t.isBuffer(n))return 0===n.length?-1:E(e,n,r,o,i);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,n,r):Uint8Array.prototype.lastIndexOf.call(e,n,r):E(e,[n],r,o,i); +throw new TypeError("val must be string, number or Buffer")}function E(t,e,n,r,o){function i(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}var A=1,a=t.length,l=e.length;if(void 0!==r&&(r=String(r).toLowerCase(),"ucs2"===r||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(t.length<2||e.length<2)return-1;A=2,a/=2,l/=2,n/=2}var s;if(o){var c=-1;for(s=n;sa&&(n=a-l),s=n;s>=0;s--){for(var u=!0,g=0;go&&(r=o)):r=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var A=0;A239?4:i>223?3:i>191?2:1;if(o+a<=n){var l,s,c,u;switch(a){case 1:i<128&&(A=i);break;case 2:l=t[o+1],128===(192&l)&&(u=(31&i)<<6|63&l,u>127&&(A=u));break;case 3:l=t[o+1],s=t[o+2],128===(192&l)&&128===(192&s)&&(u=(15&i)<<12|(63&l)<<6|63&s,u>2047&&(u<55296||u>57343)&&(A=u));break;case 4:l=t[o+1],s=t[o+2],c=t[o+3],128===(192&l)&&128===(192&s)&&128===(192&c)&&(u=(15&i)<<18|(63&l)<<12|(63&s)<<6|63&c,u>65535&&u<1114112&&(A=u))}}null===A?(A=65533,a=1):A>65535&&(A-=65536,r.push(A>>>10&1023|55296),A=56320|1023&A),r.push(A),o+=a}return v(r)}function v(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",r=0;rr)&&(n=r);for(var o="",i=e;in)throw new RangeError("Trying to access beyond buffer length")}function z(e,n,r,o,i,A){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>i||ne.length)throw new RangeError("Index out of range")}function k(t,e,n,r){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-n,2);o>>8*(r?o:1-o)}function O(t,e,n,r){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-n,4);o>>8*(r?o:3-o)&255}function Y(t,e,n,r,o,i){if(n+r>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,r,o){return o||Y(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,r,23,4),n+4}function F(t,e,n,r,o){return o||Y(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,r,52,8),n+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,r=t.length,o=null,i=[],A=0;A55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(A+1===r){(e-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&i.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;i.push(n)}else if(n<2048){if((e-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function X(t){for(var e=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function J(t){return _.toByteArray(H(t))}function Z(t,e,n,r){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==r.TYPED_ARRAY_SUPPORT?r.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=i(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return s(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var r=e.length,o=n.length,i=0,A=Math.min(r,o);i0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,r,o,i){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===r&&(r=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),n<0||r>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&n>=r)return 0;if(o>=i)return-1;if(n>=r)return 1;if(n>>>=0,r>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var A=i-o,a=r-n,l=Math.min(A,a),s=this.slice(o,i),c=e.slice(n,r),u=0;uo)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return y(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return C(this,t,e,n);case"latin1":case"binary":return D(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return m(this,t,e,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var r=this.length;e=~~e,n=void 0===n?r:~~n,e<0?(e+=r,e<0&&(e=0)):e>r&&(e=r),n<0?(n+=r,n<0&&(n=0)):n>r&&(n=r),n0&&(o*=256);)r+=this[t+--e]*o;return r},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var r=this[t],o=1,i=0;++i=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var r=e,o=1,i=this[t+--r];r>0&&(o*=256);)i+=this[t+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,r){if(t=+t,e|=0,n|=0,!r){var o=Math.pow(2,8*n)-1;z(this,t,e,n,o,0)}var i=1,A=0;for(this[e]=255&t;++A=0&&(A*=256);)this[e+i]=t/A&255;return e+n},t.prototype.writeUInt8=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):k(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):k(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):O(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):O(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);z(this,t,e,n,o-1,-o)}var i=0,A=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,r){if(t=+t,e|=0,!r){var o=Math.pow(2,8*n-1);z(this,t,e,n,o-1,-o)}var i=n-1,A=1,a=0;for(this[e+i]=255&t;--i>=0&&(A*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/A>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):k(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):k(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):O(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,r){return e=+e,n|=0,r||z(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):O(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.copy=function(e,n,r,o){if(r||(r=0),o||0===o||(o=this.length),n>=e.length&&(n=e.length),n||(n=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n=0;--i)e[i+n]=this[i+r];else if(A<1e3||!t.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0);var A;if("number"==typeof e)for(A=n;A0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function r(t){return 3*t.length/4-n(t)}function o(t){var e,r,o,i,A,a,l=t.length;A=n(t),a=new c(3*l/4-A),o=A>0?l-4:l;var u=0;for(e=0,r=0;e>16&255,a[u++]=i>>8&255,a[u++]=255&i;return 2===A?(i=s[t.charCodeAt(e)]<<2|s[t.charCodeAt(e+1)]>>4,a[u++]=255&i):1===A&&(i=s[t.charCodeAt(e)]<<10|s[t.charCodeAt(e+1)]<<4|s[t.charCodeAt(e+2)]>>2,a[u++]=i>>8&255,a[u++]=255&i),a}function i(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function A(t,e,n){for(var r,o=[],A=e;Ac?c:s+a));return 1===r?(e=t[n-1],o+=l[e>>2],o+=l[e<<4&63],o+="=="):2===r&&(e=(t[n-2]<<8)+t[n-1],o+=l[e>>10],o+=l[e>>4&63],o+=l[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=r,e.toByteArray=o,e.fromByteArray=a;for(var l=[],s=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,d=u.length;g>1,c=-7,u=n?o-1:0,g=n?-1:1,d=t[e+u];for(u+=g,i=d&(1<<-c)-1,d>>=-c,c+=a;c>0;i=256*i+t[e+u],u+=g,c-=8);for(A=i&(1<<-c)-1,i>>=-c,c+=r;c>0;A=256*A+t[e+u],u+=g,c-=8);if(0===i)i=1-s;else{if(i===l)return A?NaN:(d?-1:1)*(1/0);A+=Math.pow(2,r),i-=s}return(d?-1:1)*A*Math.pow(2,i-r)},e.write=function(t,e,n,r,o,i){var A,a,l,s=8*i-o-1,c=(1<>1,g=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,M=r?1:-1,f=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,A=c):(A=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-A))<1&&(A--,l*=2),e+=A+u>=1?g/l:g*Math.pow(2,1-u),e*l>=2&&(A++,l/=2),A+u>=c?(a=0,A=c):A+u>=1?(a=(e*l-1)*Math.pow(2,o),A+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,o),A=0));o>=8;t[n+d]=255&a,d+=M,a/=256,o-=8);for(A=A<0;t[n+d]=255&A,d+=M,A/=256,s-=8);t[n+d-M]|=128*f}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function r(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var n in t)e(t[n],n)}var i=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(i(e));try{n.call(this,void 0,new t(i(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var A=n(300)(e);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){r("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,r){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new r(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function r(t){return function(){var n=[],r={update:function(t,r){return e.isBuffer(t)||(t=new e(t,r)),n.push(t),this},digest:function(r){var o=e.concat(n),i=t(o);return n=null,r?i.toString(r):i}};return r}}var o=n(288),i=r(n(296)),A=r(n(298));t.exports=function(t){return"md5"===t?new i:"rmd160"===t?new A:o(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},r=n(280).Buffer,o=n(289)(r);e.sha1=n(290)(r,o),e.sha256=n(294)(r,o),e.sha512=n(295)(r,o)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var r=this._len+=e.length,o=this._s=this._s||0,i=0,A=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var r=n(291).inherits;t.exports=function(t,e){function n(){return M.length?M.pop().init():this instanceof n?(this._w=d,e.call(this,64,56),this._h=null,void this.init()):new n}function o(t,e,n,r){return t<20?e&n|~e&r:t<40?e^n^r:t<60?e&n|e&r|n&r:e^n^r}function i(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function A(t,e){return t+e|0}function a(t,e){return t<>>32-e}var l=0,s=4,c=8,u=12,g=16,d=new("undefined"==typeof Int32Array?Array:Int32Array)(80),M=[];return r(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=M,n.prototype._update=function(t){var e,n,r,l,s,c,u,g,d,M;e=c=this._a,n=u=this._b,r=g=this._c,l=d=this._d,s=M=this._e;for(var f=this._w,h=0;h<80;h++){var p=f[h]=h<16?t.readInt32BE(4*h):a(f[h-3]^f[h-8]^f[h-14]^f[h-16],1),I=A(A(a(e,5),o(h,n,r,l)),A(A(s,p),i(h)));s=l,l=r,r=a(n,30),n=e,e=I}this._a=A(e,c),this._b=A(n,u),this._c=A(r,g),this._d=A(l,d),this._e=A(s,M)},n.prototype._hash=function(){M.length<100&&M.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,l),e.writeInt32BE(0|this._b,s),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,g),e},n}},function(t,e,n){(function(t,r){function o(t,n){var r={seen:[],stylize:A};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),f(n)?r.showHidden=n:n&&e._extend(r,n),E(r.showHidden)&&(r.showHidden=!1),E(r.depth)&&(r.depth=2),E(r.colors)&&(r.colors=!1),E(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=i),l(r,t,r.depth)}function i(t,e){var n=o.styles[e];return n?"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m":t}function A(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function l(t,n,r){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return N(o)||(o=l(t,o,r)),o}var i=s(t,n);if(i)return i;var A=Object.keys(n),f=a(A);if(t.showHidden&&(A=Object.getOwnPropertyNames(n)),D(n)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(n);if(0===A.length){if(x(n)){var h=n.name?": "+n.name:"";return t.stylize("[Function"+h+"]","special")}if(y(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(C(n))return t.stylize(Date.prototype.toString.call(n),"date");if(D(n))return c(n)}var p="",I=!1,T=["{","}"];if(M(n)&&(I=!0,T=["[","]"]),x(n)){var E=n.name?": "+n.name:"";p=" [Function"+E+"]"}if(y(n)&&(p=" "+RegExp.prototype.toString.call(n)),C(n)&&(p=" "+Date.prototype.toUTCString.call(n)),D(n)&&(p=" "+c(n)),0===A.length&&(!I||0==n.length))return T[0]+p+T[1];if(r<0)return y(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var w;return w=I?u(t,n,r,f,A):A.map(function(e){return g(t,n,r,f,e,I)}),t.seen.pop(),d(w,p,T)}function s(t,e){if(E(e))return t.stylize("undefined","undefined");if(N(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return I(e)?t.stylize(""+e,"number"):f(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,r,o){for(var i=[],A=0,a=e.length;A-1&&(a=i?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),E(A)){if(i&&o.match(/^\d+$/))return a;A=JSON.stringify(""+o),A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=t.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=t.stylize(A,"string"))}return A+": "+a}function d(t,e,n){var r=0,o=t.reduce(function(t,e){return r++,e.indexOf("\n")>=0&&r++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function M(t){return Array.isArray(t)}function f(t){return"boolean"==typeof t}function h(t){return null===t}function p(t){return null==t}function I(t){return"number"==typeof t}function N(t){return"string"==typeof t}function T(t){return"symbol"==typeof t}function E(t){return void 0===t}function y(t){return w(t)&&"[object RegExp]"===L(t)}function w(t){return"object"==typeof t&&null!==t}function C(t){return w(t)&&"[object Date]"===L(t)}function D(t){return w(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function m(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function v(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function B(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;e.format=function(t){if(!N(t)){for(var e=[],n=0;n=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),a=r[n];n>>e|t<<32-e}function i(t,e){return t>>>e}function A(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function l(t){return o(t,2)^o(t,13)^o(t,22)}function s(t){return o(t,6)^o(t,11)^o(t,25)}function c(t){return o(t,7)^o(t,18)^i(t,3)}function u(t){return o(t,17)^o(t,19)^i(t,10)}var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);return r(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,r,o,i,d,M,f,h,p,I=this._w;e=0|this._a,n=0|this._b,r=0|this._c,o=0|this._d,i=0|this._e,d=0|this._f,M=0|this._g,f=0|this._h;for(var N=0;N<64;N++){var T=I[N]=N<16?t.readInt32BE(4*N):u(I[N-2])+I[N-7]+c(I[N-15])+I[N-16];h=f+s(i)+A(i,d,M)+g[N]+T,p=l(e)+a(e,n,r),f=M,M=d,d=i,i=o+h,o=r,r=n,n=e,e=h+p}this._a=e+this._a|0,this._b=n+this._b|0,this._c=r+this._c|0,this._d=o+this._d|0,this._e=i+this._e|0,this._f=d+this._f|0,this._g=M+this._g|0,this._h=f+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var r=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=l,e.call(this,128,112)}function o(t,e,n){return t>>>n|e<<32-n}function i(t,e,n){return t&e^~t&n}function A(t,e,n){return t&e^t&n^e&n}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160); +return r(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,r,l,s,c,u,g,d,M,f,h,p,I,N,T,E=this._w;e=0|this._a,n=0|this._b,r=0|this._c,l=0|this._d,s=0|this._e,c=0|this._f,u=0|this._g,g=0|this._h,d=0|this._al,M=0|this._bl,f=0|this._cl,h=0|this._dl,p=0|this._el,I=0|this._fl,N=0|this._gl,T=0|this._hl;for(var y=0;y<80;y++){var w,C,D=2*y;if(y<16)w=E[D]=t.readInt32BE(4*D),C=E[D+1]=t.readInt32BE(4*D+4);else{var x=E[D-30],m=E[D-30+1],L=o(x,m,1)^o(x,m,8)^x>>>7,b=o(m,x,1)^o(m,x,8)^o(m,x,7);x=E[D-4],m=E[D-4+1];var v=o(x,m,19)^o(m,x,29)^x>>>6,B=o(m,x,19)^o(x,m,29)^o(m,x,6),j=E[D-14],Q=E[D-14+1],S=E[D-32],U=E[D-32+1];C=b+Q,w=L+j+(C>>>0>>0?1:0),C+=B,w=w+v+(C>>>0>>0?1:0),C+=U,w=w+S+(C>>>0>>0?1:0),E[D]=w,E[D+1]=C}var z=A(e,n,r),k=A(d,M,f),O=o(e,d,28)^o(d,e,2)^o(d,e,7),Y=o(d,e,28)^o(e,d,2)^o(e,d,7),R=o(s,p,14)^o(s,p,18)^o(p,s,9),F=o(p,s,14)^o(p,s,18)^o(s,p,9),H=a[D],V=a[D+1],G=i(s,c,u),P=i(p,I,N),X=T+F,W=g+R+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=C,W=W+w+(X>>>0>>0?1:0);var J=Y+k,Z=O+z+(J>>>0>>0?1:0);g=u,T=N,u=c,N=I,c=s,I=p,p=h+X|0,s=l+W+(p>>>0>>0?1:0)|0,l=r,h=f,r=n,f=M,n=e,M=d,d=X+J|0,e=W+Z+(d>>>0>>0?1:0)|0}this._al=this._al+d|0,this._bl=this._bl+M|0,this._cl=this._cl+f|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+I|0,this._gl=this._gl+N|0,this._hl=this._hl+T|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+r+(this._cl>>>0>>0?1:0)|0,this._d=this._d+l+(this._dl>>>0>>0?1:0)|0,this._e=this._e+s+(this._el>>>0

    >>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+g+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,r){n.writeInt32BE(t,r),n.writeInt32BE(e,r+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function r(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,r=-271733879,o=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return r<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,r,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%i!==0){var r=t.length+(i-t.length%i);t=e.concat([t,A],r)}for(var o=[],a=n?t.readInt32BE:t.readInt32LE,l=0;l>>32-e}function l(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var r=f(t),o=8*t.length,i=8*t.length;r[o>>>5]|=128<<24-o%32,r[(o+64>>>9<<4)+14]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(var A=0;A>>24)|4278255360&(a<<24|a>>>8)}var l=h(n);return new e(l)}t.exports=l;var s=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0],f=function(t){for(var e=[],n=0,r=0;n>>5]|=t[n]<<24-r%32;return e},h=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},p=function(t,e,l){for(var f=0;f<16;f++){var h=l+f,p=e[h];e[h]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}var I,N,T,E,y,w,C,D,x,m;w=I=t[0],C=N=t[1],D=T=t[2],x=E=t[3],m=y=t[4];for(var L,f=0;f<80;f+=1)L=I+e[l+s[f]]|0,L+=f<16?n(N,T,E)+d[0]:f<32?r(N,T,E)+d[1]:f<48?o(N,T,E)+d[2]:f<64?i(N,T,E)+d[3]:A(N,T,E)+d[4],L|=0,L=a(L,u[f]),L=L+y|0,I=y,y=E,E=a(T,10),T=N,N=L,L=w+e[l+c[f]]|0,L+=f<16?A(C,D,x)+M[0]:f<32?i(C,D,x)+M[1]:f<48?o(C,D,x)+M[2]:f<64?r(C,D,x)+M[3]:n(C,D,x)+M[4],L|=0,L=a(L,g[f]),L=L+m|0,w=m,m=x,x=a(D,10),D=C,C=L;L=t[1]+T+x|0,t[1]=t[2]+E+m|0,t[2]=t[3]+y+w|0,t[3]=t[4]+I+C|0,t[4]=t[0]+N+D|0,t[0]=L}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function r(t,n){if(!(this instanceof r))return new r(t,n);this._opad=l,this._alg=t;var A="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>A?n=o(t).update(n).digest():n.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");M.copy(s,0,0,a);for(var f=1;fe&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,r){e.push(s.default.createElement("button",{type:"button",key:r,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},s.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,r="modal-dialog"+(n?" modal-lg":"");return s.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},s.default.createElement("div",{className:r},s.default.createElement("div",{className:"modal-content"},s.default.createElement("div",{className:"modal-header"},s.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),s.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,s.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),s.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),s.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(l.Component);e.default=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var o=n(240),i=r(o);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new i.default.EventEmitter},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},s=function(){function t(t,e){for(var n=0;n ul > li");r.is(":visible")?(r.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(r.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var o=this.props.expandLevel;if(r._level>=o){var i=e.parent("li.parent_li").find(" > ul > li");i.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(r)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var r="treenodemenu"+t.id;e.contextmenu({target:"#"+r})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,r=e.dispatch,o=n.children,i="node-"+n.id,A="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(p.default,{items:n.contextMenu,key:n.id,data:n,dispatch:r,menuId:A})),o&&o.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:i},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(f.default,{dispatch:r,children:o,expandLevel:this.props.expandLevel}));var s=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:i,onClick:function(t){if(e){var r=window._server+n.editorPath+"?file="+n.fullPath;N.eventEmitter.emit(N.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:r,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+i).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof s?"undefined":l(s))?s.v:void 0}}]),e}(c.Component);e.default=T},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;nspan::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}",""])},function(t,e,n){var r=n(393);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}",""])},function(t,e,n){var r=n(395);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%}',""])},function(t,e,n){var r=n(397);"string"==typeof r&&(r=[[t.id,r,""]]);n(9)(r,{});r.locals&&(t.exports=r.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".CodeMirror{border:1px solid #ddd}.CodeMirror-hints{position:absolute;z-index:2000;overflow:hidden;list-style:none;margin:0;padding:2px;box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:2000;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-atom-2{color:#397}.cm-s-default .cm-atom-3{color:#fa1}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#019dff}.cm-s-default .cm-operator{color:#49adff}.cm-s-default .cm-property{color:#878696}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}",""])},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e';var n=!0,r=!1,o=void 0;try{for(var i,A=this.importVariableLibraries[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;e+=''}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}var l=!0,s=!1,u=void 0;try{for(var d,M=this.importConstantLibraries[Symbol.iterator]();!(l=(d=M.next()).done);l=!0){var f=d.value;e+=''}}catch(t){s=!0,u=t}finally{try{!l&&M.return&&M.return()}finally{if(s)throw u}}var h=!0,p=!1,I=void 0;try{for(var N,T=this.importParameterLibraries[Symbol.iterator]();!(h=(N=T.next()).done);h=!0){var E=N.value;e+=''}}catch(t){p=!0,I=t}finally{try{!h&&T.return&&T.return()}finally{if(p)throw I}}var y=!0,w=!1,C=void 0;try{for(var D,x=this.importActionLibraries[Symbol.iterator]();!(y=(D=x.next()).done);y=!0){var m=D.value;e+=''}}catch(t){w=!0,C=t}finally{try{!y&&x.return&&x.return()}finally{if(w)throw C}}var L=!0,b=!1,v=void 0;try{for(var B,j=this.context.allFigures[Symbol.iterator]();!(L=(B=j.next()).done);L=!0){var Q=B.value;Q instanceof g.default&&(e+=Q.toXML())}}catch(t){b=!0,v=t}finally{try{!L&&j.return&&j.return()}finally{if(b)throw v}}return e+=""}}},{key:"fromJson",value:function(t){this.flowId=t.id,this.debug=t.debug;var e=t.libraries||[],n=!0,r=!1,o=void 0;try{for(var i,A=e[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;switch(a.type){case"Variable":this.importVariableLibraries.push(a.path);break;case"Constant":this.importConstantLibraries.push(a.path);break;case"Action":this.importActionLibraries.push(a.path);break;case"Parameter":this.importParameterLibraries.push(a.path)}}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}this.importVariableLibraries.length>0&&this._refreshLibraries(this.importVariableLibraries,"vl.xml"),this.importConstantLibraries.length>0&&this._refreshLibraries(this.importConstantLibraries,"cl.xml"),this.importActionLibraries.length>0&&this._refreshLibraries(this.importActionLibraries,"al.xml"),this.importParameterLibraries.length>0&&this._refreshLibraries(this.importParameterLibraries,"pl.xml");var l=!0,s=!1,u=void 0;try{for(var g,d=t.nodes[Symbol.iterator]();!(l=(g=d.next()).done);l=!0){var M=g.value;switch(M.w=M.width,M.h=M.height,M.type){case"Action":M.type="动作";break;case"Script":M.type="脚本";break;case"Decision":M.type="决策";break;case"End":M.type="结束";break;case"Start":M.type="开始";break;case"Rule":M.type="规则";break;case"RulePackage":M.type="知识包";break;case"Fork":M.type="分支";break;case"Join":M.type="聚合"}var f=M.connections||[],h=!0,p=!1,I=void 0;try{for(var N,T=f[Symbol.iterator]();!(h=(N=T.next()).done);h=!0){var E=N.value;E.to=E.toName}}catch(t){p=!0,I=t}finally{try{!h&&T.return&&T.return()}finally{if(p)throw I}}this.addNode(M)}}catch(t){s=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(s)throw u}}var y=!0,w=!1,C=void 0;try{for(var D,x=this.context.allFigures[Symbol.iterator]();!(y=(D=x.next()).done);y=!0){var m=D.value;m instanceof c.Node&&m._buildConnections()}}catch(t){w=!0,C=t}finally{try{!y&&x.return&&x.return()}finally{if(w)throw C}}}},{key:"getPropertiesProducer",value:function(){return function(){function t(t){var e=!0,n=!1,r=void 0;try{for(var i,A=function(){var e=i.value,n=e.indexOf(":"),r=void 0;if(n>-1){var A=e.substring(n+1,e.length);n=A.indexOf(".")+1,r=A.substring(n,A.length)}else n=e.indexOf(".")+1,r=e.substring(n,e.length);var a=h.buildType(r),l=$('\n '+e+'\n '+a+"\n "),s=$('');l.append(s);var c=$('

    ');s.append(c),c.click(function(){var n=t.indexOf(e);t.splice(n,1),l.remove(),o._refreshLibraries(t,r)}),g.append(l)},a=t[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)A()}catch(t){n=!0,r=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw r}}}var e=$("
    "),n=$('
    '),r=$('');n.append(r);var o=this;r.change(function(){o.flowId=$(this).val()}),r.val(this.flowId),e.append(n);var i=$('
    '),A=$('");i.append(A),A.change(function(){o.debug=$(this).val()}),e.append(i);var a=$('
    '),l=$('');a.append(l),l.click(function(){M.eventEmitter.emit(M.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,forLib:!0,callback:function(t,e){var n=t+("LATEST"===e?"":":"+e),r=t.indexOf(".")+1,i=t.substring(r,t.length),A=null;if("vl.xml"===i)A=o.importVariableLibraries;else if("cl.xml"===i)A=o.importConstantLibraries;else if("pl.xml"===i)A=o.importParameterLibraries;else{if("al.xml"!==i)return void alert("Unknow lib ["+t+"]");A=o.importActionLibraries}n="jcr:"+n;var a=A.indexOf(n);if(a>-1)return void c.MsgBox.alert("库文件"+t+"已存在!");var l=h.buildType(i),s=$('\n '+n+'\n '+l+"\n ");A.push(n);var u=$('');s.append(u);var d=$('');u.append(d),d.click(function(){var t=A.indexOf(n);A.splice(t,1),s.remove(),o._refreshLibraries(A,i)}),g.append(s),o._refreshLibraries(A,i)}})});var s=$(''),u=$('\n \n \n \n ');s.append(u);var g=$("");return s.append(g),t(o.importVariableLibraries),t(o.importParameterLibraries),t(o.importConstantLibraries),t(o.importActionLibraries),a.append(s),e.append(a),e}}},{key:"_refreshLibraries",value:function(t,e){if(0!==t.length){var n=null,r=this;this._loadLibraries(t,function(o){if("vl.xml"===e){n=r.variableLibraries,n.splice(0,n.length);var A=!0,a=!1,l=void 0;try{for(var s,u=o[Symbol.iterator]();!(A=(s=u.next()).done);A=!0){var g,d=s.value;(g=n).push.apply(g,i(d))}}catch(t){a=!0,l=t}finally{try{!A&&u.return&&u.return()}finally{if(a)throw l}}}else if("cl.xml"===e){n=r.constantLibraries,n.splice(0,n.length);var M=!0,f=!1,h=void 0;try{for(var p,N=o[Symbol.iterator]();!(M=(p=N.next()).done);M=!0){var T,E=p.value;(T=n).push.apply(T,i(E.categories))}}catch(t){f=!0,h=t}finally{try{!M&&N.return&&N.return()}finally{if(f)throw h}}}else if("pl.xml"===e){n=r.variableLibraries;var y=void 0,w=void 0,C=!0,D=!1,x=void 0;try{for(var m,L=n[Symbol.iterator]();!(C=(m=L.next()).done);C=!0){var b=m.value;"参数"===b.name&&(y=b),"parameter"===b.name&&(w=b)}}catch(t){D=!0,x=t}finally{try{!C&&L.return&&L.return()}finally{if(D)throw x}}y||(y={type:"variable",name:"参数"},n.push(y)),w||(w={type:"variable",name:"parameter"},n.push(w)),y.variables=o[0],w.variables=o[0]}else if("al.xml"===e){var v;t=r.importActionLibraries,n=r.actionLibraries,n.splice(0,n.length),(v=n).push.apply(v,i(o))}c.Event.eventEmitter.emit(I.LIB_CHANGE,{actionLibraries:r.actionLibraries,constantCategories:r.constantLibraries,parameterLibraries:r.parameterLibraries,variableCategories:r.variableLibraries})})}}},{key:"_loadLibraries",value:function(t,e){for(var n="",r=0;r加载库文件失败,服务端错误:"+t.responseText+""):bootbox.alert("加载库文件失败,服务端出错")},success:function(t){e(t)}})}}}]),e}(c.FlowDesigner);e.default=N},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var n=0;n0?this.out===-1||this.out>0?0===this.fromConnections.length&&0===this.toConnections.length&&(t=this.name+"节点未和其它节点连接!"):0===this.toConnections.length&&(t=this.name+"节点未和其它节点连接!"):(this.out===-1||this.out>0)&&0===this.fromConnections.length&&(t=this.name+"节点未和其它节点连接!"),t)}},{key:"getFromConnectionsXML",value:function(){var t="",e=!0,n=!1,r=void 0;try{for(var o,i=this.fromConnections[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var A=o.value;t+=this.buildConnectionXML(A)}}catch(t){n=!0,r=t}finally{try{!e&&i.return&&i.return()}finally{if(n)throw r}}return t}},{key:"buildConnectionXML",value:function(t){var e=t.toJSON(),n=e.path,r="",o=0,i=!0,A=!1,a=void 0;try{for(var l,s=n[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){var c=l.value;o>0&&o!==n.length-1&&(""!==r&&(r+=","),r+=parseInt(c[1])+","+parseInt(c[2])),o++}}catch(t){A=!0,a=t}finally{try{!i&&s.return&&s.return()}finally{if(A)throw a}}var u='服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function A(t,e){return function(n){var r=window._server+"/frame/fileRename";$.ajax({url:r,type:"POST",data:{path:t,newPath:e,classify:window._classify,projectName:window._projectName,types:window._types},success:function(t){var e=t.repo.rootFile;h(e,1),n({data:e,type:z}),v.eventEmitter.emit(v.HIDE_RENAME_DIALOG),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function a(t,e){return function(n){var r=window._server+"/frame/createProject";$.ajax({url:r,type:"POST",data:{newProjectName:t},success:function(t){h(t,1),n({type:O,newProjectData:t,parentNodeData:e}),v.eventEmitter.emit(v.CLOSE_NEW_PROJECT_DIALOG),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function l(t,e){var n=e.fullPath+"/"+t;return function(t){var e=window._server+"/frame/createFolder";$.ajax({url:e,type:"POST",data:{fullFolderName:n,classify:window._classify,projectName:window._projectName,types:window._types},success:function(e){var n=e.repo.rootFile;h(n,1),t({data:n,type:z}),v.eventEmitter.emit(v.CLOSE_CREATE_FOLDER_DIALOG),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function s(t,e){return function(n){var r=t.fullPath,o=r.lastIndexOf(t.name),i=r.substring(0,o),A=i+e,a=window._server+"/frame/fileRename";$.ajax({url:a,type:"POST",data:{path:r,newPath:A,classify:window._classify,projectName:window._projectName,types:window._types},success:function(r){var o=e.indexOf(".");if(o!==-1)t.fullPath=A,t.name=e,n({data:t,type:k});else{var i=r.repo.rootFile;h(i,1),n({data:i,type:z})}v.eventEmitter.emit(v.CLOSE_UPDATE_PROJECT_DIALOG),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function c(t,e,n){var r=window._server+"/frame/fileRename";$.ajax({url:r,type:"POST",data:{path:t,newPath:e,classify:window._classify,projectName:window._projectName,types:window._types},success:function(t){var e=t.repo.rootFile;h(e,1),n({data:e,type:z}),v.eventEmitter.emit(v.CLOSE_UPDATE_PROJECT_DIALOG),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function u(t){return{data:t,type:Q}}function g(t){return{index:t,type:S}}function d(t,e){return{index:t,data:e,type:U}}function M(t,e,n,r){return null!==t&&"undefined"!==t||(t=!0),function(o){var i=window._server+"/frame/loadProjects";$.ajax({url:i,type:"POST",data:{classify:t,projectName:e,types:n,searchFileName:r},success:function(t){var e=t.classify,n=t.repo,r=n.rootFile,i=n.projectNames;v.eventEmitter.emit(v.CHANGE_CLASSIFY,e),i&&i.length>0&&v.eventEmitter.emit(v.PROJECT_LIST_CHANGE,i),h(r,1),o({data:r,type:z}),j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),t&&t.responseText?bootbox.alert("加载数据失败,服务端错误:"+t.responseText+""):bootbox.alert("加载数据失败,服务端出错")}})}}function f(t){var e=t.indexOf(":");e>-1&&(t=t.substring(0,e)); +var n=void 0;switch(t){case"vl.xml":n="变量库";break;case"cl.xml":n="常量库";break;case"pl.xml":n="参数库";break;case"al.xml":n="动作库";break;case"rs.xml":n="向导式决策集";break;case"ul":n="脚本式决策集";break;case"dt.xml":n="决策表";break;case"dts.xml":n="脚本式决策表";break;case"rl.xml":n="决策流";break;case"dtree.xml":n="决策树";break;case"sc":n="评分卡";break;case"知识包":n="package"}if(!n){var r="Unknow file type :"+t;throw alert(r),r}return n}function h(t,e){switch(t._level=e++,t.type){case"root":t._icon=L.default.frameStyle.getRootIcon(),t._style=L.default.frameStyle.getRootIconStyle(),t.contextMenu=[{name:"创建新项目",icon:"rf rf-createpro",click:function(t){v.eventEmitter.emit(v.OPEN_NEW_PROJECT_DIALOG,t)}},{name:"导入项目",icon:"rf rf-import",click:function(t){v.eventEmitter.emit(v.OPEN_IMPORT_PROJECT_DIALOG)}}];break;case"rule":t._icon=L.default.frameStyle.getRuleIcon(),t._style=L.default.frameStyle.getRuleIconStyle(),t.contextMenu=T(),t.editorPath="/ruleseteditor";break;case"project":t._icon=L.default.frameStyle.getProjectIcon(),t._style=L.default.frameStyle.getProjectIconStyle(),t.contextMenu=[{name:"导出项目备份",icon:"rf rf-export",click:function(t,e){bootbox.confirm("真的要导出项目"+t.name+"的备份文件吗?",function(e){if(e){var n=window._server+"/frame/exportProjectBackupFile?path="+encodeURI(encodeURI(t.fullPath));window.open(n,"_blank")}})}},{name:"修改项目名称",icon:"rf rf-rename",click:function(t){v.eventEmitter.emit(v.OPEN_UPDATE_PROJECT_DIALOG,t)}},{name:"删除项目",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("此操作将删除"+t.name+"项目及其下所有文件,你确定要这样做吗?",function(n){n&&x(t,e)})}},{name:"配置接收推送客户端",icon:"rf rf-operation",click:function(t,e){var n=window._server+"/clientconfig?project="+encodeURI(t.name);j.eventEmitter.emit(j.TREE_NODE_CLICK,{id:"client_config_",name:"推送客户端配置",fullPath:"client_config_/"+t.name,project:t.name,path:n})}}];break;case"resource":t._icon=L.default.frameStyle.getResourceIcon(),t._style=L.default.frameStyle.getResourceIconStyle();break;case"all":t._icon=L.default.frameStyle.getResourceIcon(),t._style=L.default.frameStyle.getResourceIconStyle(),t.contextMenu=I();break;case"folder":t._icon=L.default.frameStyle.getFolderIcon(),t._style=L.default.frameStyle.getFolderIconStyle(),t.contextMenu=I(!0,t.folderType);break;case"resourcePackage":t._icon=L.default.frameStyle.getResourcePackageIcon(),t._style=L.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=L.default.frameStyle.getLibIcon(),t._style=L.default.frameStyle.getLibIconStyle(),t.contextMenu=p();break;case"action":t._icon=L.default.frameStyle.getActionIcon(),t._style=L.default.frameStyle.getActionIconStyle(),t.contextMenu=T(),t.editorPath="/actioneditor";break;case"parameter":t._icon=L.default.frameStyle.getParameterIcon(),t._style=L.default.frameStyle.getParameterIconStyle(),t.contextMenu=T(),t.editorPath="/parametereditor";break;case"constant":t._icon=L.default.frameStyle.getConstantIcon(),t._style=L.default.frameStyle.getConstantIconStyle(),t.contextMenu=T(),t.editorPath="/constanteditor";break;case"variable":t._icon=L.default.frameStyle.getVariableIcon(),t._style=L.default.frameStyle.getVariableIconStyle(),t.contextMenu=T(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=L.default.frameStyle.getRuleLibIcon(),t._style=L.default.frameStyle.getRuleLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加向导式决策集",icon:L.default.frameStyle.getRuleIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"rs.xml",nodeData:t})}},{name:"添加脚本式决策集",icon:L.default.frameStyle.getUlIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"ul",nodeData:t})}}];break;case"decisionTableLib":t._icon=L.default.frameStyle.getDecisionTableLibIcon(),t._style=L.default.frameStyle.getDecisionTableLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策表",icon:L.default.frameStyle.getDecisionTableIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"dt.xml",nodeData:t})}}];break;case"decisionTreeLib":t._icon=L.default.frameStyle.getDecisionTreeLibIcon(),t._style=L.default.frameStyle.getDecisionTreeLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策树",icon:L.default.frameStyle.getDecisionTreeIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"dtree.xml",nodeData:t})}}];break;case"flowLib":t._icon=L.default.frameStyle.getFlowLibIcon(),t._style=L.default.frameStyle.getFlowLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策流",icon:L.default.frameStyle.getFlowIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"rl.xml",nodeData:t})}}];break;case"scorecardLib":t._icon=L.default.frameStyle.getScorecardLibIcon(),t._style=L.default.frameStyle.getScorecardLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加评分卡",icon:L.default.frameStyle.getScorecardIcon(),click:function(){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"sc",nodeData:t})}}];break;case"ul":t._icon=L.default.frameStyle.getUlIcon(),t._style=L.default.frameStyle.getUlIconStyle();var n=T();n.splice(0,1),t.contextMenu=n,t.editorPath="/uleditor";break;case"decisionTable":t._icon=L.default.frameStyle.getDecisionTableIcon(),t._style=L.default.frameStyle.getDecisionTableIconStyle(),t.contextMenu=T(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=L.default.frameStyle.getScriptDecisionTableIcon(),t._style=L.default.frameStyle.getScriptDecisionTableIconStyle(),t.contextMenu=T(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=L.default.frameStyle.getDecisionTreeIcon(),t._style=L.default.frameStyle.getDecisionTreeIconStyle(),t.contextMenu=T(),t.editorPath="/decisiontreeeditor";break;case"flow":t._icon=L.default.frameStyle.getFlowIcon(),t._style=L.default.frameStyle.getFlowIconStyle(),t.contextMenu=T(),t.editorPath="/ruleflowdesigner";break;case"scorecard":t._icon=L.default.frameStyle.getScorecardIcon(),t._style=L.default.frameStyle.getScorecardIconStyle(),t.contextMenu=T(),t.editorPath="/scorecardeditor"}var r=t.children;r&&r.forEach(function(t,n){h(t,e)})}function p(){var t=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加变量库",icon:L.default.frameStyle.getVariableIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"vl.xml",nodeData:t})}},{name:"添加常量库",icon:L.default.frameStyle.getConstantIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"cl.xml",nodeData:t})}},{name:"添加参数库",icon:L.default.frameStyle.getParameterIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"pl.xml",nodeData:t})}},{name:"添加动作库",icon:L.default.frameStyle.getActionIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"al.xml",nodeData:t})}}];return t}function I(t,e){var n=[{name:t?"添加子目录":"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}}],r=!1;return e&&"all"!==e&&"lib"!==e||(n.push({name:"添加变量库",icon:L.default.frameStyle.getVariableIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"vl.xml",nodeData:t})}},{name:"添加常量库",icon:L.default.frameStyle.getConstantIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"cl.xml",nodeData:t})}},{name:"添加参数库",icon:L.default.frameStyle.getParameterIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"pl.xml",nodeData:t})}},{name:"添加动作库",icon:L.default.frameStyle.getActionIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"al.xml",nodeData:t})}}),r||(n.push(N()),r=!0)),e&&"all"!==e&&"ruleLib"!==e||(n.push({name:"添加向导式决策集",icon:L.default.frameStyle.getRuleIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"rs.xml",nodeData:t})}},{name:"添加脚本式决策集",icon:L.default.frameStyle.getUlIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"ul",nodeData:t})}}),r||(n.push(N()),r=!0)),e&&"all"!==e&&"decisionTableLib"!==e||(n.push.apply(n,[{name:"添加决策表",icon:L.default.frameStyle.getDecisionTableIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"dt.xml",nodeData:t})}}]),r||(n.push(N()),r=!0)),e&&"all"!==e&&"decisionTreeLib"!==e||(n.push({name:"添加决策树",icon:L.default.frameStyle.getDecisionTreeIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"dtree.xml",nodeData:t})}}),r||(n.push(N()),r=!0)),e&&"all"!==e&&"scorecardLib"!==e||n.push({name:"添加评分卡",icon:L.default.frameStyle.getScorecardIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"sc",nodeData:t})}}),e&&"all"!==e&&"flowLib"!==e||(n.push({name:"添加决策流",icon:L.default.frameStyle.getFlowIcon(),click:function(t,e){v.eventEmitter.emit(v.OPEN_CREATE_FILE_DIALOG,{fileType:"rl.xml",nodeData:t})}}),r||(n.push(N()),r=!0)),t&&(n.push({name:"删除",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("删除目录["+t.name+"],将会同时删除其下所有子目录及文件,确认吗?",function(n){n&&x(t,e,!0)})}},{name:"修改目录名",icon:"rf rf-rename",click:function(t,e){v.eventEmitter.emit(v.SHOW_RENAME_DIALOG,t)}},{name:"锁定目录",icon:"rf rf-lock",click:function(t,e){E(t.fullPath,e)}},{name:"解锁目录",icon:"rf rf-unlock",click:function(t,e){y(t.fullPath,e)}}),r||(n.push(N()),r=!0)),n}function N(){return{name:"粘贴文件",icon:"rf rf-paste",click:function(t,e){var n=window.___cutFileData,r=!1;if(n||(n=window.___copyFileData,r=!0),!n)return void bootbox.alert("没有文件可供粘贴!");var o=t.fullPath,i=o+"/"+n.name,A=n.fullPath;if(A===i)return void bootbox.alert("目录未改变,不能进行此操作!");var a="真的要移动文件【"+n.name+"】到【"+o+"】目录吗?";r&&(a="真的要复制文件【"+n.name+"】到【"+o+"】目录吗?"),bootbox.confirm(a,function(t){t&&(window.___cutFileData=null,window.___copyFileData=null,r?$.ajax({url:window._server+"/frame/copyFile",type:"POST",data:{newFullPath:i,oldFullPath:A},success:function(t){var n=t.repo.rootFile;h(n,1),e({data:n,type:z})},error:function(t){t&&t.responseText?bootbox.alert("复制文件操作失败,服务端错误:"+t.responseText+""):bootbox.alert("复制文件操作失败,服务端出错")}}):c(A,i,e))})}}}function T(){return[{name:"查看源码",icon:"rf rf-code",click:function(t,e){C(t)}},{name:"查看版本信息",icon:"rf rf-version",click:function(t,e){D(t)}},{name:"删除文件",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("真的要删除["+t.name+"]文件吗?",function(n){n&&x(t,e)})}},{name:"修改文件名",icon:"rf rf-rename",click:function(t,e){v.eventEmitter.emit(v.SHOW_RENAME_DIALOG,t)}},{name:"复制文件",icon:"rf rf-copy",click:function(t,e){window.___copyFileData=t,window.___cutFileData=null}},{name:"剪切文件",icon:"rf rf-cut",click:function(t,e){window.___cutFileData=t,window.___copyFileData=null}},{name:"锁定文件",icon:"rf rf-lock",click:function(t,e){E(t.fullPath,e)}},{name:"解锁文件",icon:"rf rf-unlock",click:function(t,e){y(t.fullPath,e)}}]}function E(t,e){j.eventEmitter.emit(j.SHOW_LOADING);var n=window._server+"/frame/lockFile";$.ajax({url:n,type:"POST",data:{file:t},success:function(t){var n=t.repo.rootFile;h(n,1),e({data:n,type:z}),j.eventEmitter.emit(j.HIDE_LOADING),bootbox.alert("锁定成功!")},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function y(t,e){j.eventEmitter.emit(j.SHOW_LOADING);var n=window._server+"/frame/unlockFile";$.ajax({url:n,type:"POST",data:{file:t},success:function(t){var n=t.repo.rootFile;h(n,1),e({data:n,type:z}),j.eventEmitter.emit(j.HIDE_LOADING),bootbox.alert("解锁成功!")},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function w(t,e){var n=window._server+"/common/saveFile";$.ajax({url:n,type:"POST",data:{file:t,content:e},success:function(){bootbox.alert("保存成功!")},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function C(t){var e=window._server+"/frame/fileSource";$.ajax({url:e,type:"POST",data:{path:t.fullPath},success:function(e){v.eventEmitter.emit(v.OPEN_SOURCE_DIALOG,t.fullPath,e.content)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function D(t){var e=window._server+"/frame/fileVersions";$.ajax({url:e,type:"POST",data:{path:t.fullPath},success:function(e){v.eventEmitter.emit(v.OPEN_FILE_VERSION_DIALOG,{list:e,data:t})},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function x(t,e,n){j.eventEmitter.emit(j.SHOW_LOADING),setTimeout(function(){var r=window._server+"/frame/deleteFile";$.ajax({url:r,type:"POST",data:{isFolder:n,path:t.fullPath,classify:window._classify,projectName:window._projectName,types:window._types},success:function(r){if(n){var o=r.repo.rootFile;h(o,1),e({data:o,type:z})}else e({data:t,type:S});j.eventEmitter.emit(j.HIDE_LOADING)},error:function(t){j.eventEmitter.emit(j.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})},150)}Object.defineProperty(e,"__esModule",{value:!0}),e.CREATE_NEW_FILE=e.CREATE_NEW_PROJECT=e.FILE_RENAME=e.LOAD_END=e.UPDATE=e.DEL=e.ADD=void 0,e.createNewFile=i,e.rename=A,e.createNewProject=a,e.createNewFolder=l,e.fileRename=s,e.add=u,e.del=g,e.update=d,e.loadData=M,e.buildType=f,e.lockFile=E,e.unlockFile=y,e.saveFileSource=w,e.seeFileSource=C;var m=n(228),L=o(m),b=n(401),v=r(b),B=n(339),j=r(B),Q=e.ADD="add",S=e.DEL="del",U=e.UPDATE="upload",z=e.LOAD_END="load_end",k=e.FILE_RENAME="file_rename",O=e.CREATE_NEW_PROJECT="create_new_project",Y=e.CREATE_NEW_FILE="create_new_file"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.CHANGE_CLASSIFY=e.CLOSE_FILE_VERSION_DIALOG=e.OPEN_FILE_VERSION_DIALOG=e.CLOSE_SOURCE_DIALOG=e.OPEN_SOURCE_DIALOG=e.CLOSE_IMPORT_PROJECT_DIALOG=e.OPEN_IMPORT_PROJECT_DIALOG=e.PROJECT_FILTER_CHANGE=e.PROJECT_LIST_CHANGE=e.HIDE_RENAME_DIALOG=e.SHOW_RENAME_DIALOG=e.EXPAND_TREE_NODE=e.CLOSE_CREATE_FOLDER_DIALOG=e.OPEN_CREATE_FOLDER_DIALOG=e.CLOSE_CREATE_FILE_DIALOG=e.OPEN_CREATE_FILE_DIALOG=e.CLOSE_UPDATE_PROJECT_DIALOG=e.OPEN_UPDATE_PROJECT_DIALOG=e.CLOSE_NEW_PROJECT_DIALOG=e.OPEN_NEW_PROJECT_DIALOG=e.DIALOG_CONTNET_CHANGE=e.CLOSE_DIALOG=e.OPEN_DIALOG=void 0;var o=n(240),i=r(o);e.OPEN_DIALOG="open_dialog",e.CLOSE_DIALOG="close_dialog",e.DIALOG_CONTNET_CHANGE="dialog_content_change",e.OPEN_NEW_PROJECT_DIALOG="open_new_project_dialog",e.CLOSE_NEW_PROJECT_DIALOG="close_new_project_dialog",e.OPEN_UPDATE_PROJECT_DIALOG="open_update_project_dialog",e.CLOSE_UPDATE_PROJECT_DIALOG="close_update_project_dialog",e.OPEN_CREATE_FILE_DIALOG="create_file_dialog",e.CLOSE_CREATE_FILE_DIALOG="close_file_dialog",e.OPEN_CREATE_FOLDER_DIALOG="create_folder_dialog",e.CLOSE_CREATE_FOLDER_DIALOG="close_folder_dialog",e.EXPAND_TREE_NODE="expand_tree_node",e.SHOW_RENAME_DIALOG="SHOW_RENAME_DIALOG",e.HIDE_RENAME_DIALOG="HIDE_RENAME_DIALOG",e.PROJECT_LIST_CHANGE="project_list_change",e.PROJECT_FILTER_CHANGE="project_filter_change",e.OPEN_IMPORT_PROJECT_DIALOG="open_import_project_dialog",e.CLOSE_IMPORT_PROJECT_DIALOG="close_import_project_dialog",e.OPEN_SOURCE_DIALOG="open_source_dialog",e.CLOSE_SOURCE_DIALOG="close_source_dialog",e.OPEN_FILE_VERSION_DIALOG="open_file_version_dialog",e.CLOSE_FILE_VERSION_DIALOG="close_file_version_dialog",e.CHANGE_CLASSIFY="change_classify",e.eventEmitter=new i.default.EventEmitter},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.LIB_CHANGE="lib_change",e.LIBRARY={actionLibraries:[],variableCategories:[],constantCategories:[]}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}},{key:"newNode",value:function(){return new u.default}},{key:"getConfigs",value:function(){return{in:0,out:1,single:!0}}},{key:"getPropertiesProducer",value:function(){var t=this;return function(){var e=$("
    ");return e.append(t.getCommonProperties(this)),e}}}]),e}(s.default);e.default=g},function(t,e,n){"use strict";function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function o(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var n=0;n'),n=$('');return n.change(function(){t.eventBean=$(this).val()}),n.val(t.eventBean),e.append(n),e}},{key:"buildScriptLintFunction",value:function(t){return function(e,n,r,o){if(""===e)return void n(o,[]);var i=window._server+"/common/scriptValidation";$.ajax({url:i,data:{type:t,content:e},type:"POST",success:function(t){if(t){var e=!0,r=!1,i=void 0;try{for(var A,a=t[Symbol.iterator]();!(e=(A=a.next()).done);e=!0){var l=A.value;l.from={line:l.line-1},l.to={line:l.line-1}}}catch(t){r=!0,i=t}finally{try{!e&&a.return&&a.return()}finally{if(r)throw i}}n(o,t)}else n(o,[])},error:function(){alert("语法检查操作失败!")}})}}}]),e}(a.Tool);e.default=l},function(t,e,n){!function(t){t(n(406))}(function(t){"use strict";function e(e,n){function r(e){return o.parentNode?(o.style.top=Math.max(0,e.clientY-o.offsetHeight-5)+"px",void(o.style.left=e.clientX+5+"px")):t.off(document,"mousemove",r)}var o=document.createElement("div");return o.className="CodeMirror-lint-tooltip",o.appendChild(n.cloneNode(!0)),document.body.appendChild(o),t.on(document,"mousemove",r),r(e),null!=o.style.opacity&&(o.style.opacity=1),o}function n(t){t.parentNode&&t.parentNode.removeChild(t)}function r(t){t.parentNode&&(null==t.style.opacity&&n(t),t.style.opacity=0,setTimeout(function(){n(t)},600))}function o(n,o,i){function A(){t.off(i,"mouseout",A),a&&(r(a),a=null)}var a=e(n,o),l=setInterval(function(){if(a)for(var t=i;;t=t.parentNode){if(t&&11==t.nodeType&&(t=t.host),t==document.body)return;if(!t){A();break}}if(!a)return clearInterval(l)},400);t.on(i,"mouseout",A)}function i(t,e,n){this.marked=[],this.options=e,this.timeout=null,this.hasGutter=n,this.onMouseOver=function(e){p(t,e)},this.waitingFor=0}function A(t,e){return e instanceof Function?{getAnnotations:e}:(e&&e!==!0||(e={}),e)}function a(t){var e=t.state.lint;e.hasGutter&&t.clearGutter(I);for(var n=0;n1,n.options.tooltips))}}r.onUpdateLinting&&r.onUpdateLinting(e,o,t)}function f(t){var e=t.state.lint;e&&(clearTimeout(e.timeout),e.timeout=setTimeout(function(){d(t)},e.options.delay||500))}function h(t,e){for(var n=e.target||e.srcElement,r=document.createDocumentFragment(),i=0;i0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function r(t,e,n,r){var o=document.createElement(t);if(n&&(o.className=n),r&&(o.style.cssText=r),"string"==typeof e)o.appendChild(document.createTextNode(e));else if(e)for(var i=0;i=e)return A+(e-i);A+=a-i,A+=n-A%n,i=a+1}}function u(){this.id=null}function g(t,e){for(var n=0;n=e)return r+Math.min(A,e-o);if(o+=i-r,o+=n-o%n,r=i+1,o>=e)return r}}function M(t){for(;SA.length<=t;)SA.push(f(SA)+" ");return SA[t]}function f(t){return t[t.length-1]}function h(t,e){for(var n=[],r=0;r"€"&&(t.toUpperCase()!=t.toLowerCase()||UA.test(t))}function E(t,e){return e?!!(e.source.indexOf("\\w")>-1&&T(t))||e.test(t):T(t)}function y(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function w(t){return t.charCodeAt(0)>=768&&zA.test(t)}function C(t,e,n){var o=this;this.input=n,o.scrollbarFiller=r("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=r("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=r("div",null,"CodeMirror-code"),o.selectionDiv=r("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=r("div",null,"CodeMirror-cursors"),o.measure=r("div",null,"CodeMirror-measure"),o.lineMeasure=r("div",null,"CodeMirror-measure"),o.lineSpace=r("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none"),o.mover=r("div",[r("div",[o.lineSpace],"CodeMirror-lines")],null,"position: relative"),o.sizer=r("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=r("div",null,null,"position: absolute; height: "+bA+"px; width: 1px;"),o.gutters=r("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=r("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=r("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),aA&&lA<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),sA||oA&&pA||(o.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(o.wrapper):t(o.wrapper)),o.viewFrom=o.viewTo=e.first,o.reportedViewFrom=o.reportedViewTo=e.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,n.init(o)}function D(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var r=0;;++r){var o=n.children[r],i=o.chunkSize();if(e=t.first&&en?Q(n,D(t,n).text.length):R(e,D(t,e.line).text.length)}function R(t,e){var n=t.ch;return null==n||n>e?Q(t.line,e):n<0?Q(t.line,0):t}function F(t,e){for(var n=[],r=0;r=e:i.to>e);(r||(r=[])).push(new G(A,i.from,l?null:i.to))}}return r}function Z(t,e,n){var r;if(t)for(var o=0;o=e:i.to>e);if(a||i.from==e&&"bookmark"==A.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(A.inclusiveLeft?i.from<=e:i.from0&&a)for(var E=0;E0)){var c=[l,1],u=S(s.from,a.from),d=S(s.to,a.to);(u<0||!A.inclusiveLeft&&!u)&&c.push({from:s.from,to:a.from}),(d>0||!A.inclusiveRight&&!d)&&c.push({from:a.to,to:s.to}),o.splice.apply(o,c),l+=c.length-1}}return o}function $(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&u<=0||c<=0&&u>=0)&&(c<=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?S(s.to,n)>=0:S(s.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&o.inclusiveLeft?S(s.from,r)<=0:S(s.from,r)<0)))return!0}}}function lt(t){for(var e;e=it(t);)t=e.find(-1,!0).line;return t}function st(t){for(var e,n;e=At(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function ct(t,e){var n=D(t,e),r=lt(n);return n==r?e:b(r)}function ut(t,e){if(e>t.lastLine())return e;var n,r=D(t,e);if(!gt(t,r))return e;for(;n=At(r);)r=n.find(1,!0).line;return b(r)+1}function gt(t,e){var n=OA&&e.markedSpans;if(n)for(var r=void 0,o=0;oe.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function pt(t,e,n,r){if(!t)return r(e,n,"ltr");for(var o=!1,i=0;ie||e==n&&A.to==e)&&(r(Math.max(A.from,e),Math.min(A.to,n),1==A.level?"rtl":"ltr"),o=!0)}o||r(e,n,"ltr")}function It(t){return t.level%2?t.to:t.from}function Nt(t){return t.level%2?t.from:t.to}function Tt(t){var e=mt(t);return e?It(e[0]):0}function Et(t){var e=mt(t);return e?Nt(f(e)):t.text.length}function yt(t,e,n){var r=t[0].level;return e==r||n!=r&&ee)return r;if(o.from==e||o.to==e){if(null!=n)return yt(t,o.level,t[n].level)?(o.from!=o.to&&(YA=n),r):(o.from!=o.to&&(YA=r),n);n=r}}return n}function Ct(t,e,n,r){if(!r)return e+n;do e+=n;while(e>0&&w(t.text.charAt(e)));return e}function Dt(t,e,n,r){var o=mt(t);if(!o)return xt(t,e,n,r);for(var i=wt(o,e),A=o[i],a=Ct(t,e,A.level%2?-n:n,r);;){if(a>A.from&&a0==A.level%2?A.to:A.from);if(A=o[i+=n],!A)return null;a=n>0==A.level%2?Ct(t,A.to,-1,r):Ct(t,A.from,1,r)}}function xt(t,e,n,r){var o=e+n;if(r)for(;o>0&&w(t.text.charAt(o));)o+=n;return o<0||o>t.text.length?null:o}function mt(t){var e=t.order;return null==e&&(e=t.order=RA(t.text)),e}function Lt(t,e){return t._handlers&&t._handlers[e]||FA}function bt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var r=t._handlers,o=r&&r[e];if(o){var i=g(o,n);i>-1&&(r[e]=o.slice(0,i).concat(o.slice(i+1)))}}}function vt(t,e){var n=Lt(t,e);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),o=0;o0}function St(t){t.prototype.on=function(t,e){HA(this,t,e)},t.prototype.off=function(t,e){bt(this,t,e)}}function Ut(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function zt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function kt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ot(t){Ut(t),zt(t)}function Yt(t){return t.target||t.srcElement}function Rt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),IA&&t.ctrlKey&&1==e&&(e=3),e}function Ft(t){if(null==mA){var e=r("span","​");n(t,r("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(mA=e.offsetWidth<=1&&e.offsetHeight>2&&!(aA&&lA<8))}var o=mA?r("span","​"):r("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return o.setAttribute("cm-text",""),o}function Ht(t){if(null!=LA)return LA;var r=n(t,document.createTextNode("AخA")),o=yA(r,0,1).getBoundingClientRect(),i=yA(r,1,2).getBoundingClientRect();return e(t),!(!o||o.left==o.right)&&(LA=i.right-o.right<3)}function Vt(t){if(null!=WA)return WA;var e=n(t,r("span","x")),o=e.getBoundingClientRect(),i=yA(e,0,1).getBoundingClientRect();return WA=Math.abs(o.left-i.left)>1}function Gt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),JA[t]=e}function Pt(t,e){ZA[t]=e}function Xt(t){if("string"==typeof t&&ZA.hasOwnProperty(t))t=ZA[t];else if(t&&"string"==typeof t.name&&ZA.hasOwnProperty(t.name)){var e=ZA[t.name];"string"==typeof e&&(e={name:e}),t=N(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Xt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Xt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Wt(t,e){e=Xt(e);var n=JA[e.name];if(!n)return Wt(t,"text/plain");var r=n(t,e);if(KA.hasOwnProperty(e.name)){var o=KA[e.name];for(var i in o)o.hasOwnProperty(i)&&(r.hasOwnProperty(i)&&(r["_"+i]=r[i]),r[i]=o[i])}if(r.name=e.name,e.helperType&&(r.helperType=e.helperType),e.modeProps)for(var A in e.modeProps)r[A]=e.modeProps[A];return r}function Jt(t,e){var n=KA.hasOwnProperty(t)?KA[t]:KA[t]={};s(e,n)}function Zt(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var n={};for(var r in e){var o=e[r];o instanceof Array&&(o=o.concat([])),n[r]=o}return n}function Kt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e),n&&n.mode!=t);)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _t(t,e,n){return!t.startState||t.startState(e,n)}function qt(t,e,n,r){var o=[t.state.modeGen],i={};Ae(t,e.text,t.doc.mode,n,function(t,e){return o.push(t,e)},i,r);for(var A=function(n){var r=t.state.overlays[n],A=1,a=0;Ae(t,e.text,r.mode,!0,function(t,e){for(var n=A;at&&o.splice(A,1,t,o[A+1],i),A+=2,a=Math.min(t,i)}if(e)if(r.opaque)o.splice(n,A-n,t,"overlay "+e),A=n+2;else for(;nt.options.maxHighlightLength?Zt(t.doc.mode,r):r);e.stateAfter=r,e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function te(t,e,n){var r=t.doc,o=t.display;if(!r.mode.startState)return!0;var i=ae(t,e,n),A=i>r.first&&D(r,i-1).stateAfter;return A=A?Zt(r.mode,A):_t(r.mode),r.iter(i,e,function(n){ee(t,n.text,A);var a=i==e-1||i%5==0||i>=o.viewFrom&&ie.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}function oe(t,e,n,r){var o,i=function(t){return{start:u.start,end:u.pos,string:u.current(),type:o||null,state:t?Zt(A.mode,c):c}},A=t.doc,a=A.mode;e=Y(A,e);var l,s=D(A,e.line),c=te(t,e.line,n),u=new _A(s.text,t.options.tabSize);for(r&&(l=[]);(r||u.post.options.maxHighlightLength?(a=!1,A&&ee(t,e,r,u.pos),u.pos=e.length,l=null):l=ie(re(n,u,r,g),i),g){var d=g[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!a||c!=l){for(;sA;--a){if(a<=i.first)return i.first;var l=D(i,a-1);if(l.stateAfter&&(!n||a<=i.frontier))return a;var s=c(l.text,null,t.options.tabSize);(null==o||r>s)&&(o=a-1,r=s)}return o}function le(t,e,n){this.text=t,tt(this,e),this.height=n?n(this):1}function se(t,e,n,r){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),$(t),tt(t,n);var o=r?r(t):1;o!=t.height&&L(t,o)}function ce(t){t.parent=null,$(t)}function ue(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?ta:$A;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function ge(t,e){var n=r("span",null,null,sA?"padding-right: .1px":null),o={pre:r("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(aA||sA)&&t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var A=i?e.rest[i-1]:e.line,l=void 0;o.pos=0,o.addToken=Me,Ht(t.display.measure)&&(l=mt(A))&&(o.addToken=he(o.addToken,l)),o.map=[];var s=e!=t.display.externalMeasured&&b(A);Ie(A,o,$t(t,A,s)),A.styleClasses&&(A.styleClasses.bgClass&&(o.bgClass=a(A.styleClasses.bgClass,o.bgClass||"")),A.styleClasses.textClass&&(o.textClass=a(A.styleClasses.textClass,o.textClass||""))),0==o.map.length&&o.map.push(0,0,o.content.appendChild(Ft(t.display.measure))),0==i?(e.measure.map=o.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(o.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(sA){var c=o.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(o.content.className="cm-tab-wrap-hack")}return vt(t,"renderLine",t,e.line,o.pre),o.pre.className&&(o.textClass=a(o.pre.className,o.textClass||"")),o}function de(t){var e=r("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function Me(t,e,n,o,i,A,a){if(e){var l,s=t.splitSpaces?fe(e,t.trailingSpace):e,c=t.cm.state.specialChars,u=!1;if(c.test(e)){l=document.createDocumentFragment();for(var g=0;;){c.lastIndex=g;var d=c.exec(e),f=d?d.index-g:e.length-g;if(f){var h=document.createTextNode(s.slice(g,g+f));aA&&lA<9?l.appendChild(r("span",[h])):l.appendChild(h),t.map.push(t.pos,t.pos+f,h),t.col+=f,t.pos+=f}if(!d)break;g+=f+1;var p=void 0;if("\t"==d[0]){var I=t.cm.options.tabSize,N=I-t.col%I;p=l.appendChild(r("span",M(N),"cm-tab")),p.setAttribute("role","presentation"),p.setAttribute("cm-text","\t"),t.col+=N}else"\r"==d[0]||"\n"==d[0]?(p=l.appendChild(r("span","\r"==d[0]?"␍":"␤","cm-invalidchar")),p.setAttribute("cm-text",d[0]),t.col+=1):(p=t.cm.options.specialCharPlaceholder(d[0]),p.setAttribute("cm-text",d[0]),aA&&lA<9?l.appendChild(r("span",[p])):l.appendChild(p),t.col+=1);t.map.push(t.pos,t.pos+1,p),t.pos++}}else t.col+=e.length,l=document.createTextNode(s),t.map.push(t.pos,t.pos+e.length,l),aA&&lA<9&&(u=!0),t.pos+=e.length;if(t.trailingSpace=32==s.charCodeAt(e.length-1),n||o||i||u||a){var T=n||"";o&&(T+=o),i&&(T+=i);var E=r("span",[l],T,a);return A&&(E.title=A),t.content.appendChild(E)}t.content.appendChild(l)}}function fe(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,r="",o=0;os&&u.from<=s));g++);if(u.to>=c)return t(n,r,o,i,A,a,l);t(n,r.slice(0,u.to-s),o,i,null,a,l),i=null,r=r.slice(u.to-s),s=u.to}}}function pe(t,e,n,r){var o=!r&&n.widgetNode;o&&t.map.push(t.pos,t.pos+e,o),!r&&t.cm.display.input.needsContentAttribute&&(o||(o=t.content.appendChild(document.createElement("span"))),o.setAttribute("cm-marker",n.id)),o&&(t.cm.display.input.setUneditable(o),t.content.appendChild(o)),t.pos+=e,t.trailingSpace=!1}function Ie(t,e,n){var r=t.markedSpans,o=t.text,i=0;if(r)for(var A,a,l,s,c,u,g,d=o.length,M=0,f=1,h="",p=0;;){if(p==M){l=s=c=u=a="",g=null,p=1/0;for(var I=[],N=void 0,T=0;TM||y.collapsed&&E.to==M&&E.from==M)?(null!=E.to&&E.to!=M&&p>E.to&&(p=E.to,s=""),y.className&&(l+=" "+y.className),y.css&&(a=(a?a+";":"")+y.css),y.startStyle&&E.from==M&&(c+=" "+y.startStyle),y.endStyle&&E.to==p&&(N||(N=[])).push(y.endStyle,E.to),y.title&&!u&&(u=y.title),y.collapsed&&(!g||rt(g.marker,y)<0)&&(g=E)):E.from>M&&p>E.from&&(p=E.from)}if(N)for(var w=0;w=d)break;for(var D=Math.min(d,p);;){if(h){var x=M+h.length;if(!g){var m=x>D?h.slice(0,D-M):h;e.addToken(e,m,A?A+l:l,c,M+m.length==p?s:"",u,a)}if(x>=D){h=h.slice(D-M),M=D;break}M=x,c=""}h=o.slice(i,i=n[f++]),A=ue(n[f++],e.cm.options)}}else for(var L=1;L2&&i.push((l.bottom+s.top)/2-n.top)}}i.push(n.bottom-n.top)}}function We(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var r=0;rn)return{map:t.measure.maps[o],cache:t.measure.caches[o],before:!0}}function Je(t,e){e=lt(e);var r=b(e),o=t.display.externalMeasured=new Ne(t.doc,e,r);o.lineN=r;var i=o.built=ge(t,o);return o.text=i.pre,n(t.display.lineMeasure,i.pre),o}function Ze(t,e,n,r){return qe(t,_e(t,e),n,r)}function Ke(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(i=l-a,o=i-1,e>=l&&(A="right")),null!=o){if(r=t[s+2],a==l&&n==(r.insertLeft?"left":"right")&&(A=n),"left"==n&&0==o)for(;s&&t[s-2]==t[s-3]&&t[s-1].insertLeft;)r=t[(s-=3)+2],A="left";if("right"==n&&o==l-a)for(;s=0&&(n=t[o]).left==n.right;o--);return n}function en(t,e,n,r){var o,i=$e(e.map,n,r),A=i.node,a=i.start,l=i.end,s=i.collapse;if(3==A.nodeType){for(var c=0;c<4;c++){for(;a&&w(e.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l0&&(s=r="right");var u;o=t.options.lineWrapping&&(u=A.getClientRects()).length>1?u["right"==r?u.length-1:0]:A.getBoundingClientRect()}if(aA&&lA<9&&!a&&(!o||!o.left&&!o.right)){var g=A.parentNode.getClientRects()[0];o=g?{left:g.left,right:g.left+In(t.display),top:g.top,bottom:g.bottom}:ra}for(var d=o.top-e.rect.top,M=o.bottom-e.rect.top,f=(d+M)/2,h=e.view.measure.heights,p=0;pn.from?A(t-1):A(t,r)}r=r||D(t.doc,e.line),o||(o=_e(t,r));var l=mt(r),s=e.ch;if(!l)return A(s);var c=wt(l,s),u=a(s,c);return null!=YA&&(u.other=a(s,YA)),u}function dn(t,e){var n=0;e=Y(t.doc,e),t.options.lineWrapping||(n=In(t.display)*e.ch);var r=D(t.doc,e.line),o=Mt(r)+Re(t.display);return{left:n,right:n,top:o,bottom:o+r.height}}function Mn(t,e,n,r){var o=Q(t,e);return o.xRel=r,n&&(o.outside=!0),o}function fn(t,e,n){var r=t.doc;if(n+=t.display.viewOffset,n<0)return Mn(r.first,0,!0,-1);var o=v(r,n),i=r.first+r.size-1;if(o>i)return Mn(r.first+r.size-1,D(r,i).text.length,!0,1);e<0&&(e=0);for(var A=D(r,o);;){var a=hn(t,A,o,e,n),l=At(A),s=l&&l.find(0,!0);if(!l||!(a.ch>s.from.ch||a.ch==s.from.ch&&a.xRel>0))return a;o=b(A=s.to.line)}}function hn(t,e,n,r,o){function i(r){var o=gn(t,Q(n,r),"line",e,s);return a=!0,A>o.bottom?o.left-l:Ah)return Mn(n,d,p,1);for(;;){if(c?d==g||d==Dt(e,g,1):d-g<=1){var I=r0&&I1){var E=qe(t,s,I,"right");A<=E.bottom&&A>=E.top&&Math.abs(r-E.right)1?1:0);return y}var C=Math.ceil(u/2),D=g+C;if(c){D=g;for(var x=0;xr?(d=D,h=m,(p=a)&&(h+=1e3),u=C):(g=D,M=m,f=a,u-=C)}}function pn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qA){qA=r("pre");for(var o=0;o<49;++o)qA.appendChild(document.createTextNode("x")),qA.appendChild(r("br"));qA.appendChild(document.createTextNode("x"))}n(t.measure,qA);var i=qA.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),e(t.measure),i||1}function In(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=r("span","xxxxxxxxxx"),o=r("pre",[e]);n(t.measure,o);var i=e.getBoundingClientRect(),A=(i.right-i.left)/10;return A>2&&(t.cachedCharWidth=A),A||10}function Nn(t){for(var e=t.display,n={},r={},o=e.gutters.clientLeft,i=e.gutters.firstChild,A=0;i;i=i.nextSibling,++A)n[t.options.gutters[A]]=i.offsetLeft+i.clientLeft+o,r[t.options.gutters[A]]=i.clientWidth;return{fixedPos:Tn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:e.wrapper.clientWidth}}function Tn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function En(t){var e=pn(t.display),n=t.options.lineWrapping,r=n&&Math.max(5,t.display.scroller.clientWidth/In(t.display)-3);return function(o){if(gt(t.doc,o))return 0;var i=0;if(o.widgets)for(var A=0;A=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,r=0;r=t.display.viewTo||a.to().line3&&(o(d,f.top,null,f.bottom),d=c,f.bottoml.bottom||s.bottom==l.bottom&&s.right>l.right)&&(l=s),d0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function vn(t){t.state.focused||(t.display.input.focus(),jn(t))}function Bn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Qn(t))},100)}function jn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(vt(t,"focus",t,e),t.state.focused=!0,A(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),sA&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),bn(t))}function Qn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(vt(t,"blur",t,e),t.state.focused=!1,DA(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Sn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var r=Tn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,o=e.gutters.offsetWidth,i=r+"px",A=0;A.001||l<-.001)&&(L(o.line,i),kn(o.line),o.rest))for(var s=0;s=A&&(i=v(e,Mt(D(e,l))-t.wrapper.clientHeight),A=l)}return{from:i,to:Math.max(A,i+1)}}function Yn(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,oA||mr(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),oA&&mr(t),Er(t,100))}function Rn(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,Sn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fn(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Hn(t){var e=Fn(t);return e.x*=ia,e.y*=ia,e}function Vn(t,e){var n=Fn(e),r=n.x,o=n.y,i=t.display,A=i.scroller,a=A.scrollWidth>A.clientWidth,l=A.scrollHeight>A.clientHeight;if(r&&a||o&&l){if(o&&IA&&sA)t:for(var s=e.target,c=i.view;s!=A;s=s.parentNode)for(var u=0;u(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!fA){var A=r("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Re(t.display))+"px;\n height: "+(e.bottom-e.top+Ve(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(A),A.scrollIntoView(i),t.display.lineSpace.removeChild(A)}}}function _n(t,e,n,r){null==r&&(r=0);for(var o,i=0;i<5;i++){var A=!1;o=gn(t,e);var a=n&&n!=e?gn(t,n):o,l=$n(t,Math.min(o.left,a.left),Math.min(o.top,a.top)-r,Math.max(o.left,a.left),Math.max(o.bottom,a.bottom)+r),s=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=l.scrollTop&&(Yn(t,l.scrollTop),Math.abs(t.doc.scrollTop-s)>1&&(A=!0)),null!=l.scrollLeft&&(Rn(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(A=!0)),!A)break}return o}function qn(t,e,n,r,o){var i=$n(t,e,n,r,o);null!=i.scrollTop&&Yn(t,i.scrollTop),null!=i.scrollLeft&&Rn(t,i.scrollLeft)}function $n(t,e,n,r,o){var i=t.display,A=pn(t.display);n<0&&(n=0);var a=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,l=Pe(t),s={};o-n>l&&(o=n+l);var c=t.doc.height+Fe(i),u=nc-A;if(na+l){var d=Math.min(n,(g?c:o)-l);d!=a&&(s.scrollTop=d)}var M=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft,f=Ge(t)-(t.options.fixedGutter?i.gutters.offsetWidth:0),h=r-e>f;return h&&(r=e+f),e<10?s.scrollLeft=0:ef+M-3&&(s.scrollLeft=r+(h?0:10)-f),s}function tr(t,e,n){null==e&&null==n||nr(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function er(t){nr(t);var e=t.getCursor(),n=e,r=e;t.options.lineWrapping||(n=e.ch?Q(e.line,e.ch-1):e,r=Q(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:r,margin:t.options.cursorScrollMargin,isCursor:!0}}function nr(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=dn(t,e.from),r=dn(t,e.to),o=$n(t,Math.min(n.left,r.left),Math.min(n.top,r.top)-e.margin,Math.max(n.right,r.right),Math.max(n.bottom,r.bottom)+e.margin);t.scrollTo(o.scrollLeft,o.scrollTop)}}function rr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++aa},Ee(t.curOp)}function or(t){var e=t.curOp;we(e,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new wr(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function ar(t){t.updatedDisplay=t.mustUpdate&&Dr(t.cm,t.update)}function lr(t){var e=t.cm,n=e.display;t.updatedDisplay&&zn(e),t.barMeasure=Gn(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ze(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Ve(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Ge(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function sr(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(o.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=o.viewTo)OA&&ct(t.doc,e)o.viewFrom?pr(t):(o.viewFrom+=r,o.viewTo+=r);else if(e<=o.viewFrom&&n>=o.viewTo)pr(t);else if(e<=o.viewFrom){var i=Ir(t,n,n+r,1);i?(o.view=o.view.slice(i.index),o.viewFrom=i.lineN,o.viewTo+=r):pr(t)}else if(n>=o.viewTo){var A=Ir(t,e,e,-1);A?(o.view=o.view.slice(0,A.index),o.viewTo=A.lineN):pr(t)}else{var a=Ir(t,e,e,-1),l=Ir(t,n,n+r,1);a&&l?(o.view=o.view.slice(0,a.index).concat(Te(t,a.lineN,l.lineN)).concat(o.view.slice(l.index)),o.viewTo+=r):pr(t)}var s=o.externalMeasured;s&&(n=o.lineN&&e=r.viewTo)){var i=r.view[Cn(t,e)];if(null!=i.node){var A=i.changes||(i.changes=[]);g(A,n)==-1&&A.push(n)}}}function pr(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Ir(t,e,n,r){var o,i=Cn(t,e),A=t.display.view;if(!OA||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(i==A.length-1)return null;o=a+A[i].size-e,i++}else o=a-e;e+=o,n+=o}for(;ct(t.doc,n)!=n;){if(i==(r<0?0:A.length-1))return null;n+=r*A[i-(r<0?1:0)].size,i+=r}return{index:i,lineN:n}}function Nr(t,e,n){var r=t.display,o=r.view;0==o.length||e>=r.viewTo||n<=r.viewFrom?(r.view=Te(t,e,n),r.viewFrom=e):(r.viewFrom>e?r.view=Te(t,e,r.viewFrom).concat(r.view):r.viewFromn&&(r.view=r.view.slice(0,Cn(t,n)))),r.viewTo=n}function Tr(t){for(var e=t.display.view,n=0,r=0;r=t.display.viewTo)){var n=+new Date+t.options.workTime,r=Zt(e.mode,te(t,e.frontier)),o=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(i){if(e.frontier>=t.display.viewFrom){var A=i.styles,a=i.text.length>t.options.maxHighlightLength,l=qt(t,i,a?Zt(e.mode,r):r,!0);i.styles=l.styles;var s=i.styleClasses,c=l.classes;c?i.styleClasses=c:s&&(i.styleClasses=null);for(var u=!A||A.length!=i.styles.length||s!=c&&(!s||!c||s.bgClass!=c.bgClass||s.textClass!=c.textClass),g=0;!u&&gn)return Er(t,t.options.workDelay),!0}),o.length&&ur(t,function(){for(var e=0;e=r.viewFrom&&n.visible.to<=r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo)&&r.renderedView==r.view&&0==Tr(t))return!1;Un(t)&&(pr(t),n.dims=Nn(t));var A=o.first+o.size,a=Math.max(n.visible.from-t.options.viewportMargin,o.first),l=Math.min(A,n.visible.to+t.options.viewportMargin);r.viewFroml&&r.viewTo-l<20&&(l=Math.min(A,r.viewTo)),OA&&(a=ct(t.doc,a),l=ut(t.doc,l));var s=a!=r.viewFrom||l!=r.viewTo||r.lastWrapHeight!=n.wrapperHeight||r.lastWrapWidth!=n.wrapperWidth;Nr(t,a,l),r.viewOffset=Mt(D(t.doc,r.viewFrom)),t.display.mover.style.top=r.viewOffset+"px";var c=Tr(t);if(!s&&0==c&&!n.force&&r.renderedView==r.view&&(null==r.updateLineNumbers||r.updateLineNumbers>=r.viewTo))return!1;var u=i();return c>4&&(r.lineDiv.style.display="none"),Lr(t,r.updateLineNumbers,n.dims),c>4&&(r.lineDiv.style.display=""),r.renderedView=r.view,u&&i()!=u&&u.offsetHeight&&u.focus(),e(r.cursorDiv),e(r.selectionDiv),r.gutters.style.height=r.sizer.style.minHeight=0,s&&(r.lastWrapHeight=n.wrapperHeight,r.lastWrapWidth=n.wrapperWidth,Er(t,400)),r.updateLineNumbers=null,!0}function xr(t,e){for(var n=e.viewport,r=!0;(r&&t.options.lineWrapping&&e.oldDisplayWidth!=Ge(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Fe(t.display)-Pe(t),n.top)}),e.visible=On(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&Dr(t,e);r=!1){zn(t);var o=Gn(t);Dn(t),Wn(t,o),vr(t,o)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function mr(t,e){var n=new wr(t,e);if(Dr(t,n)){zn(t),xr(t,n);var r=Gn(t);Dn(t),Wn(t,r),vr(t,r),n.finish()}}function Lr(t,n,r){function o(e){var n=e.nextSibling;return sA&&IA&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var i=t.display,A=t.options.lineNumbers,a=i.lineDiv,l=a.firstChild,s=i.view,c=i.viewFrom,u=0;u-1&&(M=!1),xe(t,d,c,r)),M&&(e(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(j(t.options,c)))),l=d.node.nextSibling}else{var f=Se(t,d,c,r);a.insertBefore(f,l)}c+=d.size}for(;l;)l=o(l)}function br(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function vr(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ve(t)+"px"}function Br(t){var n=t.display.gutters,o=t.options.gutters;e(n);for(var i=0;i-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function Qr(t,e){this.ranges=t,this.primIndex=e}function Sr(t,e){this.anchor=t,this.head=e}function Ur(t,e){var n=t[e];t.sort(function(t,e){return S(t.from(),e.from())}),e=g(t,n);for(var r=1;r=0){var A=k(i.from(),o.from()),a=z(i.to(),o.to()),l=i.empty()?o.from()==o.head:i.from()==i.head;r<=e&&--e,t.splice(--r,2,new Sr(l?a:A,l?A:a))}}return new Qr(t,e)}function zr(t,e){return new Qr([new Sr(t,e||t)],0)}function kr(t){return t.text?Q(t.from.line+t.text.length-1,f(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Or(t,e){if(S(t,e.from)<0)return t;if(S(t,e.to)<=0)return kr(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,r=t.ch;return t.line==e.to.line&&(r+=kr(e).ch-e.to.ch),Q(n,r)}function Yr(t,e){for(var n=[],r=0;r1&&t.remove(a.line+1,M-1),t.insert(a.line+1,I)}Ce(t,"change",t,e)}function Xr(t,e,n){function r(t,o,i){if(t.linked)for(var A=0;A1&&!t.done[t.done.length-2].ranges?(t.done.pop(),f(t.done)):void 0}function qr(t,e,n,r){var o=t.history;o.undone.length=0;var i,A,a=+new Date;if((o.lastOp==r||o.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&o.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(i=_r(o,o.lastOp==r)))A=f(i.changes),0==S(e.from,e.to)&&0==S(e.from,A.to)?A.to=kr(e):i.changes.push(Zr(t,e));else{var l=f(o.done);for(l&&l.ranges||eo(t.sel,o.done),i={changes:[Zr(t,e)],generation:o.generation},o.done.push(i);o.done.length>o.undoDepth;)o.done.shift(),o.done[0].ranges||o.done.shift()}o.done.push(n),o.generation=++o.maxGeneration,o.lastModTime=o.lastSelTime=a,o.lastOp=o.lastSelOp=r,o.lastOrigin=o.lastSelOrigin=e.origin,A||vt(t,"historyAdded")}function $r(t,e,n,r){var o=e.charAt(0);return"*"==o||"+"==o&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function to(t,e,n,r){var o=t.history,i=r&&r.origin;n==o.lastSelOp||i&&o.lastSelOrigin==i&&(o.lastModTime==o.lastSelTime&&o.lastOrigin==i||$r(t,i,f(o.done),e))?o.done[o.done.length-1]=e:eo(e,o.done),o.lastSelTime=+new Date,o.lastSelOrigin=i,o.lastSelOp=n,r&&r.clearRedo!==!1&&Kr(o.undone)}function eo(t,e){var n=f(e);n&&n.ranges&&n.equals(t)||e.push(t)}function no(t,e,n,r){var o=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,r),function(n){n.markedSpans&&((o||(o=e["spans_"+t.id]={}))[i]=n.markedSpans),++i})}function ro(t){if(!t)return null;for(var e,n=0;n-1&&(f(a)[u]=s[u],delete s[u])}}}return r}function ao(t,e,n,r){if(t.cm&&t.cm.display.shift||t.extend){var o=e.anchor;if(r){var i=S(n,o)<0;i!=S(r,o)<0?(o=n,n=r):i!=S(n,r)<0&&(n=r)}return new Sr(o,n)}return new Sr(r||n,n)}function lo(t,e,n,r){fo(t,new Qr([ao(t,t.sel.primary(),e,n)],0),r)}function so(t,e,n){for(var r=[],o=0;o=e.ch:a.to>e.ch))){if(o&&(vt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--A;continue}break}if(!l.atomic)continue;if(n){var s=l.find(r<0?1:-1),c=void 0;if((r<0?l.inclusiveRight:l.inclusiveLeft)&&(s=yo(t,s,-r,s&&s.line==e.line?i:null)),s&&s.line==e.line&&(c=S(s,n))&&(r<0?c<0:c>0))return To(t,s,e,r,o)}var u=l.find(r<0?-1:1);return(r<0?l.inclusiveLeft:l.inclusiveRight)&&(u=yo(t,u,r,u.line==e.line?i:null)),u?To(t,u,e,r,o):null}}return e}function Eo(t,e,n,r,o){var i=r||1,A=To(t,e,n,i,o)||!o&&To(t,e,n,i,!0)||To(t,e,n,-i,o)||!o&&To(t,e,n,-i,!0);return A?A:(t.cantEdit=!0,Q(t.first,0))}function yo(t,e,n,r){return n<0&&0==e.ch?e.line>t.first?Y(t,Q(e.line-1)):null:n>0&&e.ch==(r||D(t,e.line)).text.length?e.line=0;--o)xo(t,{from:r[o].from,to:r[o].to,text:o?[""]:e.text});else xo(t,e)}}function xo(t,e){if(1!=e.text.length||""!=e.text[0]||0!=S(e.from,e.to)){var n=Yr(t,e);qr(t,e,n,t.cm?t.cm.curOp.id:NaN),bo(t,e,n,K(t,e));var r=[];Xr(t,function(t,n){n||g(r,t.history)!=-1||(So(t.history,e),r.push(t.history)),bo(t,e,null,K(t,e))})}}function mo(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var r,o=t.history,i=t.sel,A="undo"==e?o.done:o.undone,a="undo"==e?o.undone:o.done,l=0;l=0;--d){var M=u(d);if(M)return M.v}}}}function Lo(t,e){if(0!=e&&(t.first+=e,t.sel=new Qr(h(t.sel.ranges,function(t){return new Sr(Q(t.anchor.line+e,t.anchor.ch),Q(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){fr(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,r=n.viewFrom;rt.lastLine())){if(e.from.linei&&(e={from:e.from,to:Q(i,D(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=x(t,e.from,e.to),n||(n=Yr(t,e)),t.cm?vo(t.cm,e,r):Pr(t,e,r),ho(t,n,BA)}}function vo(t,e,n){var r=t.doc,o=t.display,i=e.from,A=e.to,a=!1,l=i.line;t.options.lineWrapping||(l=b(lt(D(r,i.line))),r.iter(l,A.line+1,function(t){if(t==o.maxLine)return a=!0,!0})),r.sel.contains(e.from,e.to)>-1&&jt(t),Pr(r,e,n,En(t)),t.options.lineWrapping||(r.iter(l,i.line+e.text.length,function(t){var e=ft(t);e>o.maxLineLength&&(o.maxLine=t,o.maxLineLength=e,o.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),r.frontier=Math.min(r.frontier,i.line),Er(t,400);var s=e.text.length-(A.line-i.line)-1;e.full?fr(t):i.line!=A.line||1!=e.text.length||Gr(t.doc,e)?fr(t,i.line,A.line+1,s):hr(t,i.line,"text");var c=Qt(t,"changes"),u=Qt(t,"change");if(u||c){var g={from:i,to:A,text:e.text,removed:e.removed,origin:e.origin};u&&Ce(t,"change",t,g),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(g)}t.display.selForContextMenu=null}function Bo(t,e,n,r,o){if(r||(r=n),S(r,n)<0){var i=r;r=n,n=i}"string"==typeof e&&(e=t.splitLines(e)),Do(t,{from:n,to:r,text:e,origin:o})}function jo(t,e,n,r){n0||0==a&&A.clearWhenEmpty!==!1)return A;if(A.replacedWith&&(A.collapsed=!0,A.widgetNode=r("span",[A.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||A.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(A.widgetNode.insertLeft=!0)),A.collapsed){if(at(t,e.line,e,n,A)||e.line!=n.line&&at(t,n.line,e,n,A))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}A.addToHistory&&qr(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,u=t.cm;if(t.iter(c,n.line+1,function(t){u&&A.collapsed&&!u.options.lineWrapping&<(t)==u.display.maxLine&&(l=!0),A.collapsed&&c!=e.line&&L(t,0),W(t,new G(A,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),A.collapsed&&t.iter(e.line,n.line+1,function(e){gt(t,e)&&L(e,0)}),A.clearOnEnter&&HA(A,"beforeCursorEnter",function(){return A.clear()}),A.readOnly&&(H(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),A.collapsed&&(A.id=++la,A.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),A.collapsed)fr(u,e.line,n.line+1);else if(A.className||A.title||A.startStyle||A.endStyle||A.css)for(var g=e.line;g<=n.line;g++)hr(u,g,"text");A.atomic&&Io(u.doc),Ce(u,"markerAdded",u,A)}return A}function Vo(t,e){var n=this;this.markers=t,this.primary=e;for(var r=0;r-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var s=t.dataTransfer.getData("Text");if(s){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),ho(e.doc,zr(n,n)),c)for(var u=0;u=0;e--)Bo(t.doc,"",r[e].from,r[e].to,"+delete");er(t)})}function si(t,e){var n=D(t.doc,e),r=lt(n);r!=n&&(e=b(r));var o=mt(r),i=o?o[0].level%2?Et(r):Tt(r):0;return Q(e,i)}function ci(t,e){for(var n,r=D(t.doc,e);n=At(r);)r=n.find(1,!0).line,e=null;var o=mt(r),i=o?o[0].level%2?Tt(r):Et(r):r.text.length;return Q(null==e?b(r):e,i)}function ui(t,e){var n=si(t,e.line),r=D(t.doc,n.line),o=mt(r);if(!o||0==o[0].level){var i=Math.max(0,r.text.search(/\S/)),A=e.line==n.line&&e.ch<=i&&e.ch;return Q(n.line,A?0:i)}return n}function gi(t,e,n){if("string"==typeof e&&(e=Ta[e],!e))return!1;t.display.input.ensurePolled();var r=t.display.shift,o=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),o=e(t)!=vA}finally{t.display.shift=r,t.state.suppressEdits=!1}return o}function di(t,e,n){for(var r=0;ro-400&&0==S(Na.pos,n)?r="triple":Ia&&Ia.time>o-400&&0==S(Ia.pos,n)?(r="double",Na={time:o,pos:n}):(r="single",Ia={time:o,pos:n});var A,a=t.doc.sel,s=IA?e.metaKey:e.ctrlKey;t.options.dragDrop&&VA&&!t.isReadOnly()&&"single"==r&&(A=a.contains(n))>-1&&(S((A=a.ranges[A]).from(),n)<0||n.xRel>0)&&(S(A.to(),n)>0||n.xRel<0)?wi(t,e,n,s):Ci(t,e,n,r,s)}function wi(t,e,n,r){var o=t.display,i=+new Date,A=gr(t,function(a){sA&&(o.scroller.draggable=!1),t.state.draggingText=!1,bt(document,"mouseup",A),bt(o.scroller,"drop",A),Math.abs(e.clientX-a.clientX)+Math.abs(e.clientY-a.clientY)<10&&(Ut(a),!r&&+new Date-200T&&o.push(new Sr(Q(h,T),Q(h,d(I,s,i))))}o.length||o.push(new Sr(n,n)),fo(u,Ur(f.ranges.slice(0,M).concat(o),M),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var E=g,y=E.anchor,w=e;if("single"!=r){var C;C="double"==r?t.findWordAt(e):new Sr(Q(e.line,0),Y(u,Q(e.line+1,0))),S(C.anchor,y)>0?(w=C.head,y=k(E.from(),C.anchor)):(w=C.anchor,y=z(E.to(),C.head))}var x=f.ranges.slice(0);x[M]=new Sr(Y(u,y),w),fo(u,Ur(x,M),jA)}}function a(e){var n=++E,o=wn(t,e,!0,"rect"==r);if(o)if(0!=S(o,N)){t.curOp.focus=i(),A(o);var l=On(s,u);(o.line>=l.to||o.lineT.bottom?20:0;c&&setTimeout(gr(t,function(){E==n&&(s.scroller.scrollTop+=c,a(e))}),50)}}function l(e){t.state.selectingText=!1,E=1/0,Ut(e),s.input.focus(),bt(document,"mousemove",y),bt(document,"mouseup",w),u.history.lastSelOrigin=null}var s=t.display,u=t.doc;Ut(e);var g,M,f=u.sel,h=f.ranges;if(o&&!e.shiftKey?(M=u.sel.contains(n),g=M>-1?h[M]:new Sr(n,n)):(g=u.sel.primary(),M=u.sel.primIndex),NA?e.shiftKey&&e.metaKey:e.altKey)r="rect",o||(g=new Sr(n,n)),n=wn(t,e,!0,!0),M=-1;else if("double"==r){var p=t.findWordAt(n);g=t.display.shift||u.extend?ao(u,g,p.anchor,p.head):p}else if("triple"==r){var I=new Sr(Q(n.line,0),Y(u,Q(n.line+1,0)));g=t.display.shift||u.extend?ao(u,g,I.anchor,I.head):I}else g=ao(u,g,n);o?M==-1?(M=h.length,fo(u,Ur(h.concat([g]),M),{scroll:!1,origin:"*mouse"})):h.length>1&&h[M].empty()&&"single"==r&&!e.shiftKey?(fo(u,Ur(h.slice(0,M).concat(h.slice(M+1)),0),{scroll:!1,origin:"*mouse"}),f=u.sel):co(u,M,g,jA):(M=0,fo(u,new Qr([g],0),jA),f=u.sel);var N=n,T=s.wrapper.getBoundingClientRect(),E=0,y=gr(t,function(t){Rt(t)?a(t):l(t)}),w=gr(t,l);t.state.selectingText=w,HA(document,"mousemove",y),HA(document,"mouseup",w)}function Di(t,e,n,r){var o,i;try{o=e.clientX,i=e.clientY}catch(t){return!1}if(o>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;r&&Ut(e);var A=t.display,a=A.lineDiv.getBoundingClientRect();if(i>a.bottom||!Qt(t,n))return kt(e);i-=a.top-A.viewOffset;for(var l=0;l=o){var c=v(t.doc,i),u=t.options.gutters[l];return vt(t,n,t,c,u,e),kt(e)}}}function xi(t,e){return Di(t,e,"gutterClick",!0)}function mi(t,e){Ye(t.display,e)||Li(t,e)||Bt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Li(t,e){return!!Qt(t,"gutterContextMenu")&&Di(t,e,"gutterContextMenu",!1)}function bi(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),An(t)}function vi(t){function e(e,r,o,i){t.defaults[e]=r,o&&(n[e]=i?function(t,e,n){n!=wa&&o(t,e,n)}:o)}var n=t.optionHandlers;t.defineOption=e,t.Init=wa,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Hr(t)},!0),e("indentUnit",2,Hr,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Vr(t),An(t),fr(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],r=t.doc.first;t.doc.iter(function(t){for(var o=0;;){var i=t.text.indexOf(e,o);if(i==-1)break;o=i+e.length,n.push(Q(r,i))}r++});for(var o=n.length-1;o>=0;o--)Bo(t.doc,e,n[o],Q(n[o].line,n[o].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=wa&&t.refresh()}),e("specialCharPlaceholder",de,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",pA?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!TA),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){bi(t),Bi(t)},!0),e("keyMap","default",function(t,e,n){var r=ai(e),o=n!=wa&&ai(n);o&&o.detach&&o.detach(t,r),r.attach&&r.attach(t,o||null)}),e("extraKeys",null),e("lineWrapping",!1,Qi,!0),e("gutters",[],function(t){jr(t.options),Bi(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Tn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return Wn(t)},!0),e("scrollbarStyle","native",function(t){Zn(t),Wn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){jr(t.options),Bi(t)},!0),e("firstLineNumber",1,Bi,!0),e("lineNumberFormatter",function(t){return t},Bi,!0),e("showCursorWhenSelecting",!1,Dn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("readOnly",!1,function(t,e){"nocursor"==e?(Qn(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,ji),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Dn,!0),e("singleCursorHeightPerLine",!0,Dn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Vr,!0),e("addModeClass",!1,Vr,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Vr,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null)}function Bi(t){Br(t),fr(t),setTimeout(function(){return Sn(t)},20)}function ji(t,e,n){var r=n&&n!=wa;if(!e!=!r){var o=t.display.dragFunctions,i=e?HA:bt;i(t.display.scroller,"dragstart",o.start),i(t.display.scroller,"dragenter",o.enter),i(t.display.scroller,"dragover",o.over),i(t.display.scroller,"dragleave",o.leave),i(t.display.scroller,"drop",o.drop)}}function Qi(t){t.options.lineWrapping?(A(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(DA(t.display.wrapper,"CodeMirror-wrap"),ht(t)),yn(t),fr(t),An(t),setTimeout(function(){return Wn(t)},100)}function Si(t,e){var n=this;if(!(this instanceof Si))return new Si(t,e);this.options=e=e?s(e):{},s(Ca,e,!1),jr(e);var r=e.value;"string"==typeof r&&(r=new ca(r,e.mode,null,e.lineSeparator)),this.doc=r;var o=new Si.inputStyles[e.inputStyle](this),i=this.display=new C(t,r,o);i.wrapper.CodeMirror=this,Br(this),bi(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),e.autofocus&&!pA&&i.input.focus(),Zn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new u,keySeq:null,specialChars:null},aA&&lA<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ui(this),$o(),rr(this),this.curOp.forceUpdate=!0,Wr(this,r),e.autofocus&&!pA||this.hasFocus()?setTimeout(l(jn,this),20):Qn(this);for(var A in Da)Da.hasOwnProperty(A)&&Da[A](n,e[A],wa);Un(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var o=t.display;HA(o.scroller,"mousedown",gr(t,Ei)),aA&&lA<11?HA(o.scroller,"dblclick",gr(t,function(e){if(!Bt(t,e)){var n=wn(t,e);if(n&&!xi(t,e)&&!Ye(t.display,e)){Ut(e);var r=t.findWordAt(n);lo(t.doc,r.anchor,r.head)}}})):HA(o.scroller,"dblclick",function(e){return Bt(t,e)||Ut(e)}),CA||HA(o.scroller,"contextmenu",function(e){return mi(t,e)});var i,A={end:0};HA(o.scroller,"touchstart",function(e){if(!Bt(t,e)&&!n(e)){o.input.ensurePolled(),clearTimeout(i);var r=+new Date;o.activeTouch={start:r,moved:!1,prev:r-A.end<=300?A:null},1==e.touches.length&&(o.activeTouch.left=e.touches[0].pageX,o.activeTouch.top=e.touches[0].pageY)}}),HA(o.scroller,"touchmove",function(){o.activeTouch&&(o.activeTouch.moved=!0)}),HA(o.scroller,"touchend",function(n){var i=o.activeTouch;if(i&&!Ye(o,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var A,a=t.coordsChar(o.activeTouch,"page");A=!i.prev||r(i,i.prev)?new Sr(a,a):!i.prev.prev||r(i,i.prev.prev)?t.findWordAt(a):new Sr(Q(a.line,0),Y(t.doc,Q(a.line+1,0))),t.setSelection(A.anchor,A.head),t.focus(),Ut(n)}e()}),HA(o.scroller,"touchcancel",e),HA(o.scroller,"scroll",function(){o.scroller.clientHeight&&(Yn(t,o.scroller.scrollTop),Rn(t,o.scroller.scrollLeft,!0),vt(t,"scroll",t))}),HA(o.scroller,"mousewheel",function(e){return Vn(t,e)}),HA(o.scroller,"DOMMouseScroll",function(e){return Vn(t,e)}),HA(o.wrapper,"scroll",function(){return o.wrapper.scrollTop=o.wrapper.scrollLeft=0}),o.dragFunctions={enter:function(e){Bt(t,e)||Ot(e)},over:function(e){Bt(t,e)||(Ko(t,e),Ot(e))},start:function(e){return Zo(t,e)},drop:gr(t,Jo),leave:function(e){Bt(t,e)||_o(t)}};var a=o.input.getField();HA(a,"keyup",function(e){return Ni.call(t,e)}),HA(a,"keydown",gr(t,pi)),HA(a,"keypress",gr(t,Ti)),HA(a,"focus",function(e){return jn(t,e)}),HA(a,"blur",function(e){return Qn(t,e)})}function zi(t,e,n,r){var o,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?o=te(t,e):n="prev");var A=t.options.tabSize,a=D(i,e),l=c(a.text,null,A);a.stateAfter&&(a.stateAfter=null);var s,u=a.text.match(/^\s*/)[0];if(r||/\S/.test(a.text)){if("smart"==n&&(s=i.mode.indent(o,a.text.slice(u.length),a.text),s==vA||s>150)){if(!r)return;n="prev"}}else s=0,n="not";"prev"==n?s=e>i.first?c(D(i,e-1).text,null,A):0:"add"==n?s=l+t.options.indentUnit:"subtract"==n?s=l-t.options.indentUnit:"number"==typeof n&&(s=l+n),s=Math.max(0,s);var g="",d=0;if(t.options.indentWithTabs)for(var f=Math.floor(s/A);f;--f)d+=A,g+="\t";if(d1)if(ma&&ma.text.join("\n")==e){if(r.ranges.length%ma.text.length==0){l=[];for(var s=0;s=0;u--){var g=r.ranges[u],d=g.from(),M=g.to();g.empty()&&(n&&n>0?d=Q(d.line,d.ch-n):t.state.overwrite&&!A?M=Q(M.line,Math.min(D(i,M.line).text.length,M.ch+f(a).length)):ma&&ma.lineWise&&ma.text.join("\n")==e&&(d=M=Q(d.line,0))),c=t.curOp.updateInput;var p={from:d,to:M,text:l?l[u%l.length]:a,origin:o||(A?"paste":t.state.cutIncoming?"cut":"+input")};Do(t.doc,p),Ce(t,"inputRead",t,p)}e&&!A&&Ri(t,e),er(t),t.curOp.updateInput=c,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Yi(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||ur(e,function(){return Oi(e,n,0,null,"paste")}),!0}function Ri(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,r=n.ranges.length-1;r>=0;r--){var o=n.ranges[r];if(!(o.head.ch>100||r&&n.ranges[r-1].head.line==o.head.line)){var i=t.getModeAt(o.head),A=!1;if(i.electricChars){for(var a=0;a-1){A=zi(t,o.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(D(t.doc,o.head.line).text.slice(0,o.head.ch))&&(A=zi(t,o.head.line,"smart"));A&&Ce(t,"electricInput",t,o.head.line)}}}function Fi(t){for(var e=[],n=[],r=0;rr&&(zi(e,i.head.line,t,!0),r=i.head.line,o==e.doc.sel.primIndex&&er(e));else{var A=i.from(),a=i.to(),l=Math.max(r,A.line);r=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s0&&co(e.doc,o,new Sr(A,c[o].to()),BA)}}}),getTokenAt:function(t,e){return oe(this,t,e)},getLineTokens:function(t,e){return oe(this,Q(t),e,!0)},getTokenTypeAt:function(t){t=Y(this.doc,t);var e,n=$t(this,D(this.doc,t.line)),r=0,o=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var A=r+o>>1;if((A?n[2*A-1]:0)>=i)o=A;else{if(!(n[2*A+1]i&&(t=i,o=!0),r=D(this.doc,t)}else r=t;return sn(this,r,{top:0,left:0},e||"page",n).top+(o?this.doc.height-Mt(r):0)},defaultTextHeight:function(){return pn(this.display)},defaultCharWidth:function(){return In(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,r,o){var i=this.display;t=gn(this,Y(this.doc,t));var A=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==r)A=t.top;else if("above"==r||"near"==r){var l=Math.max(i.wrapper.clientHeight,this.doc.height),s=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==r||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?A=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(A=t.bottom),a+e.offsetWidth>s&&(a=s-e.offsetWidth)}e.style.top=A+"px",e.style.left=e.style.right="","right"==o?(a=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==o?a=0:"middle"==o&&(a=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&qn(this,a,A,a+e.offsetWidth,A+e.offsetHeight)},triggerOnKeyDown:dr(pi),triggerOnKeyPress:dr(Ti),triggerOnKeyUp:Ni,execCommand:function(t){if(Ta.hasOwnProperty(t))return Ta[t].call(null,this)},triggerElectric:dr(function(t){Ri(this,t)}),findPosH:function(t,e,n,r){var o=this,i=1;e<0&&(i=-1,e=-e);for(var A=Y(this.doc,t),a=0;a0&&a(n.charAt(r-1));)--r;for(;o.5)&&yn(this),vt(this,"refresh",this)}),swapDoc:dr(function(t){var e=this.doc;return e.cm=null,Wr(this,t),An(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,Ce(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},St(t),t.registerHelper=function(e,r,o){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][r]=o},t.registerGlobalHelper=function(e,r,o,i){t.registerHelper(e,r,i),n[e]._global.push({pred:o,val:i})}}function Pi(t,e,n,r,o){function i(){var e=a+n;return!(e=t.first+t.size)&&(a=e,c=D(t,e))}function A(t){var e=(o?Dt:xt)(c,l,n,!0);if(null==e){if(t||!i())return!1;l=o?(n<0?Et:Tt)(c):n<0?c.text.length:0}else l=e;return!0}var a=e.line,l=e.ch,s=n,c=D(t,a);if("char"==r)A();else if("column"==r)A(!0);else if("word"==r||"group"==r)for(var u=null,g="group"==r,d=t.cm&&t.cm.getHelper(e,"wordChars"),M=!0;!(n<0)||A(!M);M=!1){var f=c.text.charAt(l)||"\n",h=E(f,d)?"w":g&&"\n"==f?"n":!g||/\s/.test(f)?null:"p";if(!g||M||h||(h="s"),u&&u!=h){n<0&&(n=1,A());break}if(h&&(u=h),n>0&&!A(!M))break}var p=Eo(t,Q(a,l),e,s,!0);return S(e,p)||(p.hitSide=!0),p}function Xi(t,e,n,r){var o,i=t.doc,A=e.left;if("page"==r){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*pn(t.display),3);o=(n>0?e.bottom:e.top)+n*l}else"line"==r&&(o=n>0?e.bottom+3:e.top-3);for(var s;s=fn(t,A,o),s.outside;){if(n<0?o<=0:o>=i.height){s.hitSide=!0;break}o+=5*n}return s}function Wi(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new u,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Ji(t,e){var n=Ke(t,e.line);if(!n||n.hidden)return null;var r=D(t.doc,e.line),o=We(n,r,e.line),i=mt(r),A="left";if(i){var a=wt(i,e.ch);A=a%2?"right":"left"}var l=$e(o.map,e.ch,A);return l.offset="right"==l.collapse?l.end:l.start,l}function Zi(t,e){return e&&(t.bad=!0),t}function Ki(t,e,n,r,o){function i(t){return function(e){return e.id==t}}function A(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void(a+=""==n?e.textContent.replace(/\u200b/g,""):n);var c,u=e.getAttribute("cm-marker");if(u){var g=t.findMarks(Q(r,0),Q(o+1,0),i(+u));return void(g.length&&(c=g[0].find())&&(a+=x(t.doc,c.from,c.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;for(var d=0;d=15&&(gA=!1,sA=!0);var yA,wA=IA&&(cA||gA&&(null==EA||EA<12.11)),CA=oA||aA&&lA>=9,DA=function(e,n){var r=e.className,o=t(n).exec(r);if(o){var i=r.slice(o.index+o[0].length);e.className=r.slice(0,o.index)+(i?o[1]+i:"")}};yA=document.createRange?function(t,e,n,r){var o=document.createRange();return o.setEnd(r||t,n),o.setStart(t,e),o}:function(t,e,n){var r=document.body.createTextRange();try{r.moveToElementText(t.parentNode)}catch(t){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",e),r};var xA=function(t){t.select()};hA?xA=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:aA&&(xA=function(t){try{t.select()}catch(t){}}),u.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var mA,LA,bA=30,vA={toString:function(){return"CodeMirror.Pass"}},BA={scroll:!1},jA={origin:"*mouse"},QA={origin:"+move"},SA=[""],UA=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,zA=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,kA=!1,OA=!1,YA=null,RA=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1773?r.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",r="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",o=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,A=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,s="L";return function(n){if(!o.test(n))return!1;for(var r=n.length,c=[],u=0;u=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(r&&e!==!1&&(this.pos+=r[0].length),r)}var o=function(t){return n?t.toLowerCase():t},i=this.string.substr(this.pos,t.length);if(o(i)==o(t))return e!==!1&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},St(le),le.prototype.lineNo=function(){return b(this)};var qA,$A={},ta={},ea=null,na=null,ra={left:0,right:0,top:0,bottom:0},oa=0,ia=null;aA?ia=-.53:oA?ia=15:uA?ia=-.7:dA&&(ia=-1/3),Pn.prototype=s({update:function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,r=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?r+"px":"0";var o=t.viewHeight-(e?r:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+o)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?r:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+i+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:e?r:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=IA&&!MA?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new u,this.disableVert=new u},enableZeroWidthBar:function(t,e){function n(){var r=t.getBoundingClientRect(),o=document.elementFromPoint(r.left+1,r.bottom-1);o!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},Pn.prototype),Xn.prototype=s({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Xn.prototype);var Aa={native:Pn,null:Xn},aa=0;wr.prototype.signal=function(t,e){Qt(t,e)&&this.events.push(arguments)},wr.prototype.finish=function(){for(var t=this,e=0;e=0&&S(t,o.to())<=0)return r}return-1}},Sr.prototype={from:function(){return k(this.anchor,this.head)},to:function(){return z(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},zo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,r=t,o=t+e;r1||!(this.children[0]instanceof zo))){var l=[];this.collapse(l),this.children=[new zo(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=i.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var r=this,o=0;oe.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=o&&e&&this.collapsed&&fr(e,o,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Io(e.doc)),e&&Ce(e,"markerCleared",e,this),n&&or(e),this.parent&&this.parent.clear()}},Fo.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var r,o,i=0;i=0;s--)Do(r,o[s]);l?Mo(this,l):this.cm&&er(this.cm)}),undo:Mr(function(){mo(this,"undo")}),redo:Mr(function(){mo(this,"redo")}),undoSelection:Mr(function(){mo(this,"undo",!0)}),redoSelection:Mr(function(){mo(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,r=0;r=t.ch)&&e.push(o.marker.parent||o.marker)}return e},findMarks:function(t,e,n){t=Y(this,t),e=Y(this,e);var r=[],o=t.line;return this.iter(t.line,e.line+1,function(i){var A=i.markedSpans;if(A)for(var a=0;a=l.to||null==l.from&&o!=t.line||null!=l.from&&o==e.line&&l.from>=e.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++o}),r},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var r=0;rt?(e=t,!0):(t-=i,void++n)}),Y(this,Q(n,e))},indexFromPos:function(t){t=Y(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)o=new Q(o.line,o.ch+1),t.replaceRange(i.charAt(o.ch-1)+i.charAt(o.ch-2),Q(o.line,o.ch-2),o,"+transpose");else if(o.line>t.doc.first){var A=D(t.doc,o.line-1).text;A&&(o=new Q(o.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+A.charAt(A.length-1),Q(o.line-1,A.length-1),o,"+transpose"))}n.push(new Sr(o,o))}t.setSelections(n)})},newlineAndIndent:function(t){return ur(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var r=0;rt.firstLine()&&(r=Q(r.line-1,D(t.doc,r.line-1).length)),o.ch==D(t.doc,o.line).text.length&&o.linee.viewTo-1)return!1;var i,A,a;r.line==e.viewFrom||0==(i=Cn(t,r.line))?(A=b(e.view[0].line),a=e.view[0].node):(A=b(e.view[i].line),a=e.view[i-1].node.nextSibling);var l,s,c=Cn(t,o.line);if(c==e.view.length-1?(l=e.viewTo-1,s=e.lineDiv.lastChild):(l=b(e.view[c+1].line)-1,s=e.view[c+1].node.previousSibling),!a)return!1;for(var u=t.doc.splitLines(Ki(t,a,s,A,l)),g=x(t.doc,Q(A,0),Q(l,D(t.doc,l).text.length));u.length>1&&g.length>1;)if(f(u)==f(g))u.pop(),g.pop(),l--;else{if(u[0]!=g[0])break;u.shift(),g.shift(),A++}for(var d=0,M=0,h=u[0],p=g[0],I=Math.min(h.length,p.length);d1||u[0]||S(y,w)?(Bo(t.doc,u,y,w,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&(this.composing=null,this.pollContent()||fr(this.cm),this.div.blur(),this.div.focus())},readFromDOMSoon:function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){t.readDOMTimeout=null,t.composing||!t.cm.isReadOnly()&&t.pollContent()||ur(t.cm,function(){return fr(t.cm)})},80))},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||gr(this.cm,Oi)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:I,resetPosition:I,needsContentAttribute:!0},Wi.prototype),$i.prototype=s({init:function(t){function e(t){if(!Bt(o,t)){if(o.somethingSelected())ki({lineWise:!1,text:o.getSelections()}),r.inaccurateSelection&&(r.prevInput="",r.inaccurateSelection=!1,A.value=ma.text.join("\n"),xA(A));else{if(!o.options.lineWiseCopyCut)return;var e=Fi(o);ki({lineWise:!0,text:e.text}),"cut"==t.type?o.setSelections(e.ranges,null,BA):(r.prevInput="",A.value=e.text.join("\n"),xA(A))}"cut"==t.type&&(o.state.cutIncoming=!0)}}var n=this,r=this,o=this.cm,i=this.wrapper=Vi(),A=this.textarea=i.firstChild;t.wrapper.insertBefore(i,t.wrapper.firstChild),hA&&(A.style.width="0px"),HA(A,"input",function(){aA&&lA>=9&&n.hasSelection&&(n.hasSelection=null),r.poll()}),HA(A,"paste",function(t){Bt(o,t)||Yi(t,o)||(o.state.pasteIncoming=!0,r.fastPoll())}),HA(A,"cut",e),HA(A,"copy",e),HA(t.scroller,"paste",function(e){Ye(t,e)||Bt(o,e)||(o.state.pasteIncoming=!0,r.focus())}),HA(t.lineSpace,"selectstart",function(e){Ye(t,e)||Ut(e)}),HA(A,"compositionstart",function(){var t=o.getCursor("from");r.composing&&r.composing.range.clear(),r.composing={start:t,range:o.markText(t,o.getCursor("to"),{className:"CodeMirror-composing"})}}),HA(A,"compositionend",function(){r.composing&&(r.poll(),r.composing.range.clear(),r.composing=null)})},prepareSelection:function(){var t=this.cm,e=t.display,n=t.doc,r=xn(t);if(t.options.moveInputWithCursor){var o=gn(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),A=e.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,o.top+A.top-i.top)),r.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,o.left+A.left-i.left))}return r},showSelection:function(t){var e=this.cm,r=e.display;n(r.cursorDiv,t.cursors),n(r.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,n,r=this.cm,o=r.doc;if(r.somethingSelected()){this.prevInput="";var i=o.sel.primary();e=XA&&(i.to().line-i.from().line>100||(n=r.getSelection()).length>1e3);var A=e?"-":n||r.getSelection();this.textarea.value=A,r.state.focused&&xA(this.textarea),aA&&lA>=9&&(this.hasSelection=A)}else t||(this.prevInput=this.textarea.value="",aA&&lA>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!pA||i()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},fastPoll:function(){function t(){var r=n.poll();r||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},poll:function(){var t=this,e=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!e.state.focused||PA(n)&&!r&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var o=n.value;if(o==r&&!e.somethingSelected())return!1;if(aA&&lA>=9&&this.hasSelection===o||IA&&/[\uf700-\uf7ff]/.test(o))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=o.charCodeAt(0);if(8203!=i||r||(r="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var A=0,a=Math.min(r.length,o.length);A1e3||o.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=o,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){aA&&lA>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=A.selectionStart){var t=o.somethingSelected(),e="​"+(t?A.value:"");A.value="⇚",A.value=e,r.prevInput=t?"":"​",A.selectionStart=1,A.selectionEnd=e.length,i.selForContextMenu=o.doc.sel}}function n(){if(r.contextMenuPending=!1,r.wrapper.style.cssText=u,A.style.cssText=c,aA&&lA<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=A.selectionStart){(!aA||aA&&lA<9)&&e();var t=0,n=function(){i.selForContextMenu==o.doc.sel&&0==A.selectionStart&&A.selectionEnd>0&&"​"==r.prevInput?gr(o,wo)(o):t++<10?i.detectingSelectAll=setTimeout(n,500):i.input.reset()};i.detectingSelectAll=setTimeout(n,200)}}var r=this,o=r.cm,i=o.display,A=r.textarea,a=wn(o,t),l=i.scroller.scrollTop;if(a&&!gA){var s=o.options.resetSelectionOnContextMenu;s&&o.doc.sel.contains(a)==-1&&gr(o,fo)(o.doc,zr(a),BA);var c=A.style.cssText,u=r.wrapper.style.cssText;r.wrapper.style.cssText="position: absolute";var g=r.wrapper.getBoundingClientRect();A.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-g.top-5)+"px; left: "+(t.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(aA?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var d;if(sA&&(d=window.scrollY),i.input.focus(),sA&&window.scrollTo(null,d),i.input.reset(),o.somethingSelected()||(A.value=r.prevInput=" "),r.contextMenuPending=!0,i.selForContextMenu=o.doc.sel,clearTimeout(i.detectingSelectAll),aA&&lA>=9&&e(),CA){Ot(t);var M=function(){bt(window,"mouseup",M),setTimeout(n,20)};HA(window,"mouseup",M)}else setTimeout(n,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:I,needsContentAttribute:!1},$i.prototype),vi(Si),Gi(Si);var La="iter insert remove copy getEditor constructor".split(" ");for(var ba in ca.prototype)ca.prototype.hasOwnProperty(ba)&&g(La,ba)<0&&(Si.prototype[ba]=function(t){return function(){return t.apply(this.doc,arguments)}}(ca.prototype[ba]));return St(ca),Si.inputStyles={textarea:$i,contenteditable:Wi},Si.defineMode=function(t){Si.defaults.mode||"null"==t||(Si.defaults.mode=t),Gt.apply(this,arguments)},Si.defineMIME=Pt,Si.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Si.defineMIME("text/plain","null"),Si.defineExtension=function(t,e){Si.prototype[t]=e},Si.defineDocExtension=function(t,e){ca.prototype[t]=e},Si.fromTextArea=tA,eA(Si),Si.version="5.21.0",Si})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n";return r+=this.getFromConnectionsXML(),r+=""}}]),e}(u.default);e.default=g},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48IVtDREFUQVsNCkBmb250LWZhY2UgeyBmb250LWZhbWlseTogaWZvbnQ7IHNyYzogdXJsKCJodHRwOi8vYXQuYWxpY2RuLmNvbS90L2ZvbnRfMTQ0MjM3Mzg5Nl80NzU0NDU1LmVvdD8jaWVmaXgiKSBmb3JtYXQoImVtYmVkZGVkLW9wZW50eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS53b2ZmIikgZm9ybWF0KCJ3b2ZmIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS50dGYiKSBmb3JtYXQoInRydWV0eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS5zdmcjaWZvbnQiKSBmb3JtYXQoInN2ZyIpOyB9DQoNCl1dPjwvc3R5bGU+PC9kZWZzPjxnIGNsYXNzPSJ0cmFuc2Zvcm0tZ3JvdXAiPjxnIHRyYW5zZm9ybT0ic2NhbGUoMC4xOTUzMTI1LCAwLjE5NTMxMjUpIj48cGF0aCBkPSJNODUxLjQ5NyAxNzIuNTcyYy05MC41ODMtOTAuNjUyLTIxMS4yLTE0MC41NzItMzM5LjM2LTE0MC41NzItMTI4LjIyOCAwLTI0OC43NzcgNDkuOTItMzM5LjM2IDE0MC41NzItOTAuNzIgOTAuNjUyLTE0MC43MDggMjExLjItMTQwLjcwOCAzMzkuNDI4czQ5LjkyIDI0OC44NDUgMTQwLjU3MiAzMzkuNDI4YzkwLjY1MiA5MC42NTIgMjExLjEzMiAxNDAuNTcyIDMzOS40MjggMTQwLjU3MiAxMjguMjI4IDAgMjQ4Ljc3Ny00OS45ODggMzM5LjU2NS0xNDAuNjQgMTg3LjA2My0xODcuMDYzIDE4Ny4wNjMtNDkxLjY1Ny0wLjEzNy02NzguNzg4ek03OTMuODk3IDc5My42OTJjLTc1LjI5MiA3NS4yOTItMTc1LjQ3NSAxMTYuNzc3LTI4MS44MjggMTE2Ljc3Ny0xMDYuNDIzIDAtMjA2LjUzNy00MS40MTctMjgxLjc2LTExNi43MDhzLTExNi43MDgtMTc1LjI2OC0xMTYuNzA4LTI4MS43NiA0MS40ODUtMjA2LjUzNyAxMTYuODQ1LTI4MS44MjhjNzUuMTU1LTc1LjIyMyAxNzUuMjY4LTExNi43MDggMjgxLjY5Mi0xMTYuNzA4IDEwNi40OTIgMCAyMDYuNTM3IDQxLjQxNyAyODEuNjkyIDExNi43MDggMTU1LjQ1MiAxNTUuMzgzIDE1NS40NTIgNDA4LjIwNSAwLjA2OCA1NjMuNTJ6TTQ4Ni4wODAgMjg4LjkzN2MtNy42MTItOC45ODMtMTguNTgzLTE1LjAxNy0zMS4yNjgtMTUuMDE3LTAuMDY4IDAtMC4yMDUgMC4wNjgtMC4yNzUgMC4wNjgtMTAuNTYtMC4wNjgtMjEuMTIgMy44NC0yOS4xNDMgMTEuOTMyLTguMDIzIDguMDIzLTExLjkzMiAxOC41ODMtMTEuOTMyIDI5LjE0MyAwIDAuMDY4LTAuMDY4IDAuMTM3LTAuMDY4IDAuMjc1djM5My4yNTdjMCAwLjEzNyAwLjA2OCAwLjIwNSAwLjA2OCAwLjM0My0wLjA2OCAxMC40OTIgMy44NCAyMS4xMiAxMS44NjMgMjkuMTQzIDcuOTU1IDguMDIzIDE4LjM3NyAxMiAyOC44IDEyIDAuMDY4IDAgMC4yMDUtMC4wNjggMC4zNDMtMC4wNjggMC4wNjggMCAwLjIwNSAwLjA2OCAwLjI3NSAwLjA2OCAxMi42ODUgMCAyMy42NTctNi4wMzUgMzEuMjY4LTE0Ljk0OGwxOTQuMzMyLTE5NC4zMzJjNy42MTItNy42MTIgMTEuOTMyLTE4LjAzNSAxMS45MzItMjguOHMtNC4zMi0yMS4xODgtMTEuOTMyLTI4LjhsLTE5NC4yNjMtMTk0LjI2M3oiIGZpbGw9IiMwMGJiOWMiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg=="},function(t,e,n){"use strict";function r(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n'}},{key:"newNode",value:function(){return new g.default}},{key:"getConfigs",value:function(){return{out:1}}},{key:"getPropertiesProducer",value:function(){var t=this;return function(){var e=$("
    "),n=$('
    '),r=$('
    ');n.append(r);var o=$(''),i=this;r.append(o),o.change(function(){i.file=$(this).val()}),o.val(this.file);var A=$('
    库文件路径类型删除
    ');A.append(d),d.hide(),d.append('百分比(%)流向');var f=$("");d.append(f);var h=0,p=!0,I=!1,N=void 0;try{for(var T,E=function(){var t=(T.value,e.decisionItems[h]);h++;var n=$("");f.append(n);var r=$("");n.append(r);var o=$('');r.append(o),o.change(function(){t.percent=$(this).val()}),o.val(t.percent);var i=$("");n.append(i);var A=$(''),a=!0,l=!1,s=void 0;try{for(var c,u=e.fromConnections[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;A.append("")}}catch(t){l=!0,s=t}finally{try{!a&&u.return&&u.return()}finally{if(l)throw s}}A.change(function(){t.to=$(this).val()}),A.val(t.to),i.append(A)},y=this.fromConnections[Symbol.iterator]();!(p=(T=y.next()).done);p=!0)E()}catch(t){I=!0,N=t}finally{try{!p&&y.return&&y.return()}finally{if(I)throw N}}var w=$('
    ');A.append(w),w.hide(),w.append('条件脚本流向');var C=$("");w.append(C),h=0;var D=!0,x=!1,m=void 0;try{for(var L,b=function(){var n=(L.value,e.decisionItems[h]);h++;var r=$("");C.append(r);var o=$("");r.append(o);var i=$('
    '),A=$('');i.append(A);var a=$('');i.append(a),a.click(function(){var e=$("
    "),r=$("");e.append(r);var o=null;M.MsgBox.dialog("编辑脚本",e,function(){if(o){var t=o.getValue();r.val(t),A.val(t),n.script=t}}),setTimeout(function(){o=s.default.fromTextArea(r[0],{lineNumbers:!0,mode:"if",extraKeys:{"Alt-/":"autocomplete"},gutters:["CodeMirror-linenumbers","CodeMirror-lint-markers"],lint:{getAnnotations:t.buildScriptLintFunction("DecisionNode"),async:!0}}),s.default.commands.autocomplete=function(t){t.showHint({hint:s.default.hint.if})},o.on("change",function(t,e){"."==e.text&&s.default.commands.autocomplete(t)})},500)}),o.append(i);var l=$("");r.append(l);var c=$(''),u=!0,g=!1,d=void 0;try{for(var f,p=e.fromConnections[Symbol.iterator]();!(u=(f=p.next()).done);u=!0){var I=f.value;c.append("")}}catch(t){g=!0,d=t}finally{try{!u&&p.return&&p.return()}finally{if(g)throw d}}c.change(function(){n.to=$(this).val()}),c.val(n.to||""),l.append(c)},v=this.fromConnections[Symbol.iterator]();!(D=(L=v.next()).done);D=!0)b()}catch(t){x=!0,m=t}finally{try{!D&&v.return&&v.return()}finally{if(x)throw m}}return o.change(function(){i.decisionItems.splice(0,i.decisionItems.length-1);var t=!0,e=!1,n=void 0;try{for(var r,o=i.fromConnections[Symbol.iterator]();!(t=(r=o.next()).done);t=!0){r.value;i.decisionItems.push({connection:"",content:""})}}catch(t){e=!0,n=t}finally{try{!t&&o.return&&o.return()}finally{if(e)throw n}}i.decisionType=$(this).val(),"Criteria"===i.decisionType?(d.hide(),w.show()):(w.hide(),d.show())}),"Criteria"===i.decisionType?(d.hide(),w.show()):"Percent"===i.decisionType&&(w.hide(),d.show()),n.append(r),n.append(A),n.append(t.getCommonProperties(this)),n}}}]),e}(u.default);e.default=f},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n',o="",i=!0,A=!1,a=void 0;try{for(var l,s=this.decisionItems[Symbol.iterator]();!(i=(l=s.next()).done);i=!0){var c=l.value,u=null;u="Percent"===this.decisionType?'':'",o+=u}}catch(t){A=!0,a=t}finally{try{!i&&s.return&&s.return()}finally{if(A)throw a}}return r+=o,r+=this.getFromConnectionsXML(),r+=""}},{key:"initFromJson",value:function(t){l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"initFromJson",this).call(this,t),this.decisionType=t.decisionType,this.decisionItems=t.items}},{key:"validate",value:function(){var t=l(e.prototype.__proto__||Object.getPrototypeOf(e.prototype),"validate",this).call(this);if(t)return t;if(!this.decisionType||""===this.decisionType)return t="节点"+this.name+"的决策类型属性不能为空";this.decisionItems.length<1&&(t="节点"+this.name+"的具体的决策项不能少于一个");var n=!0,r=!1,o=void 0;try{for(var i,A=this.decisionItems[Symbol.iterator]();!(n=(i=A.next()).done);n=!0){var a=i.value;if("Percent"===this.decisionType){if(!a.to||""===a.to||!a.percent||""===a.percent){t="节点"+this.name+"的决策项未正确配置";break}}else if(!a.to||""===a.to||!a.script||""===a.script){t="节点"+this.name+"的决策项未正确配置";break}}}catch(t){r=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(r)throw o}}return t}}]),e}(g.default);e.default=d},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48IVtDREFUQVsNCkBmb250LWZhY2UgeyBmb250LWZhbWlseTogaWZvbnQ7IHNyYzogdXJsKCJodHRwOi8vYXQuYWxpY2RuLmNvbS90L2ZvbnRfMTQ0MjM3Mzg5Nl80NzU0NDU1LmVvdD8jaWVmaXgiKSBmb3JtYXQoImVtYmVkZGVkLW9wZW50eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS53b2ZmIikgZm9ybWF0KCJ3b2ZmIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS50dGYiKSBmb3JtYXQoInRydWV0eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS5zdmcjaWZvbnQiKSBmb3JtYXQoInN2ZyIpOyB9DQoNCl1dPjwvc3R5bGU+PC9kZWZzPjxnIGNsYXNzPSJ0cmFuc2Zvcm0tZ3JvdXAiPjxnIHRyYW5zZm9ybT0ic2NhbGUoMC4xOTUzMTI1LCAwLjE5NTMxMjUpIj48cGF0aCBkPSJNNTA4Ljk4ODIzNSAxMDI0Yy0zMC4xMTc2NDcgMC01NC4yMTE3NjUtMTUuMDU4ODI0LTc1LjI5NDExOC0yNy4xMDU4ODJsLTY5LjI3MDU4OC0zOS4xNTI5NDFjLTEyLjA0NzA1OS02LjAyMzUyOS0xOC4wNzA1ODgtMjEuMDgyMzUzLTE1LjA1ODgyNC0zMy4xMjk0MTIgMy4wMTE3NjUtMTIuMDQ3MDU5IDE1LjA1ODgyNC0yMS4wODIzNTMgMzAuMTE3NjQ3LTIxLjA4MjM1M2wyNjIuMDIzNTI5IDBjMTUuMDU4ODI0IDAgMjcuMTA1ODgyIDkuMDM1Mjk0IDMwLjExNzY0NyAyMS4wODIzNTMgMy4wMTE3NjUgMTIuMDQ3MDU5LTMuMDExNzY1IDI3LjEwNTg4Mi0xNS4wNTg4MjQgMzMuMTI5NDEybC02Ni4yNTg4MjQgMzYuMTQxMTc2Yy0yMS4wODIzNTMgMTIuMDQ3MDU5LTQ1LjE3NjQ3MSAyNC4wOTQxMTgtNzIuMjgyMzUzIDI3LjEwNTg4MkM1MTUuMDExNzY1IDEwMjQgNTEyIDEwMjQgNTA4Ljk4ODIzNSAxMDI0ek01OTMuMzE3NjQ3IDc3MS4wMTE3NjVjLTE4LjA3MDU4OCAwLTM2LjE0MTE3NiAwLTUxLjIgMC0xOC4wNzA1ODggMC0zMy4xMjk0MTIgMC01MS4yIDBsLTg0LjMyOTQxMiAwYy0zLjAxMTc2NSAwLTYuMDIzNTI5IDAtOS4wMzUyOTQgMC0xOC4wNzA1ODggMC0zOS4xNTI5NDEgMy4wMTE3NjUtNTcuMjIzNTI5LTkuMDM1Mjk0LTIxLjA4MjM1My0xMi4wNDcwNTktMzAuMTE3NjQ3LTMzLjEyOTQxMi0zOS4xNTI5NDEtNDguMTg4MjM1LTMuMDExNzY1LTkuMDM1Mjk0LTYuMDIzNTI5LTE1LjA1ODgyNC05LjAzNTI5NC0xOC4wNzA1ODgtMy4wMTE3NjUtMy4wMTE3NjUtOS4wMzUyOTQtNi4wMjM1MjktMTIuMDQ3MDU5LTkuMDM1Mjk0LTMuMDExNzY1LTMuMDExNzY1LTYuMDIzNTI5LTYuMDIzNTI5LTkuMDM1Mjk0LTYuMDIzNTI5LTE4LjA3MDU4OC0xNS4wNTg4MjQtMzYuMTQxMTc2LTMwLjExNzY0Ny01MS4yLTQ1LjE3NjQ3MS02MC4yMzUyOTQtNjYuMjU4ODI0LTk2LjM3NjQ3MS0xNTYuNjExNzY1LTk2LjM3NjQ3MS0yNDkuOTc2NDcxIDAgMCAwIDAgMCAwQzEyMC40NzA1ODggMjcxLjA1ODgyNCAxNjUuNjQ3MDU5IDE3MS42NzA1ODggMjQ5Ljk3NjQ3MSA5OS4zODgyMzVjODcuMzQxMTc2LTc1LjI5NDExOCAyMDQuOC0xMTEuNDM1Mjk0IDMyMi4yNTg4MjQtOTMuMzY0NzA2IDEwNS40MTE3NjUgMTUuMDU4ODI0IDIwMS43ODgyMzUgNzUuMjk0MTE4IDI2NS4wMzUyOTQgMTY1LjY0NzA1OSA2MC4yMzUyOTQgODcuMzQxMTc2IDgxLjMxNzY0NyAxODYuNzI5NDEyIDYwLjIzNTI5NCAyODYuMTE3NjQ3LTE4LjA3MDU4OCA3OC4zMDU4ODItNjAuMjM1Mjk0IDE1MC41ODgyMzUtMTIwLjQ3MDU4OCAyMDQuOC02LjAyMzUyOSA2LjAyMzUyOS0xMi4wNDcwNTkgMTIuMDQ3MDU5LTIxLjA4MjM1MyAxNS4wNTg4MjQtOS4wMzUyOTQgNi4wMjM1MjktMTguMDcwNTg4IDE1LjA1ODgyNC0yNC4wOTQxMTggMjEuMDgyMzUzLTYuMDIzNTI5IDYuMDIzNTI5LTkuMDM1Mjk0IDEyLjA0NzA1OS0xMi4wNDcwNTkgMjEuMDgyMzUzLTkuMDM1Mjk0IDE4LjA3MDU4OC0yNC4wOTQxMTggNDguMTg4MjM1LTcyLjI4MjM1MyA1MS4yQzYyNi40NDcwNTkgNzcxLjAxMTc2NSA2MDguMzc2NDcxIDc3MS4wMTE3NjUgNTkzLjMxNzY0NyA3NzEuMDExNzY1ek00MDMuNTc2NDcxIDcwNy43NjQ3MDZsODQuMzI5NDEyIDBjMTguMDcwNTg4IDAgMzYuMTQxMTc2IDAgNTEuMiAwIDMzLjEyOTQxMiAwIDY5LjI3MDU4OCAwIDEwMi40IDAgMTIuMDQ3MDU5IDAgMTIuMDQ3MDU5IDAgMjEuMDgyMzUzLTE4LjA3MDU4OCA2LjAyMzUyOS05LjAzNTI5NCAxMi4wNDcwNTktMjEuMDgyMzUzIDIxLjA4MjM1My0zMy4xMjk0MTIgOS4wMzUyOTQtMTIuMDQ3MDU5IDI0LjA5NDExOC0yMS4wODIzNTMgMzYuMTQxMTc2LTMwLjExNzY0NyA2LjAyMzUyOS0zLjAxMTc2NSAxMi4wNDcwNTktOS4wMzUyOTQgMTUuMDU4ODI0LTEyLjA0NzA1OSA1MS4yLTQ1LjE3NjQ3MSA4Ny4zNDExNzYtMTA1LjQxMTc2NSAxMDIuNC0xNzEuNjcwNTg4IDE4LjA3MDU4OC04MS4zMTc2NDcgMC0xNjUuNjQ3MDU5LTUxLjItMjM3LjkyOTQxMi01MS4yLTc1LjI5NDExOC0xMzIuNTE3NjQ3LTEyNi40OTQxMTgtMjIyLjg3MDU4OC0xMzguNTQxMTc2LTk5LjM4ODIzNS0xNS4wNTg4MjQtMTk4Ljc3NjQ3MSAxNS4wNTg4MjQtMjc0LjA3MDU4OCA4MS4zMTc2NDdDMjE5Ljg1ODgyNCAyMDQuOCAxODAuNzA1ODgyIDI4OS4xMjk0MTIgMTgwLjcwNTg4MiAzNzkuNDgyMzUzYzAgNzUuMjk0MTE4IDMwLjExNzY0NyAxNTMuNiA4MS4zMTc2NDcgMjA3LjgxMTc2NSAxMi4wNDcwNTkgMTUuMDU4ODI0IDI3LjEwNTg4MiAyNy4xMDU4ODIgNDIuMTY0NzA2IDM5LjE1Mjk0MSAzLjAxMTc2NSAzLjAxMTc2NSA2LjAyMzUyOSAzLjAxMTc2NSA5LjAzNTI5NCA2LjAyMzUyOSA2LjAyMzUyOSA2LjAyMzUyOSAxNS4wNTg4MjQgMTIuMDQ3MDU5IDIxLjA4MjM1MyAxOC4wNzA1ODggOS4wMzUyOTQgMTIuMDQ3MDU5IDE1LjA1ODgyNCAyNC4wOTQxMTggMjEuMDgyMzUzIDM2LjE0MTE3NiAzLjAxMTc2NSA5LjAzNTI5NCA5LjAzNTI5NCAxOC4wNzA1ODggMTIuMDQ3MDU5IDIxLjA4MjM1MyAzLjAxMTc2NSAwIDE4LjA3MDU4OCAwIDI0LjA5NDExOCAwQzM5Ny41NTI5NDEgNzA3Ljc2NDcwNiA0MDAuNTY0NzA2IDcwNy43NjQ3MDYgNDAzLjU3NjQ3MSA3MDcuNzY0NzA2ek02MTQuNCA4OTcuNTA1ODgybC0yMDcuODExNzY1IDBjLTMzLjEyOTQxMiAwLTU3LjIyMzUyOS0yNy4xMDU4ODItNTcuMjIzNTI5LTU3LjIyMzUyOWwwLTkuMDM1Mjk0YzAtMzMuMTI5NDEyIDI3LjEwNTg4Mi01Ny4yMjM1MjkgNTcuMjIzNTI5LTU3LjIyMzUyOWwyMDcuODExNzY1IDBjMzMuMTI5NDEyIDAgNTcuMjIzNTI5IDI3LjEwNTg4MiA1Ny4yMjM1MjkgNTcuMjIzNTI5bDAgOS4wMzUyOTRDNjc0LjYzNTI5NCA4NzAuNCA2NDcuNTI5NDEyIDg5Ny41MDU4ODIgNjE0LjQgODk3LjUwNTg4MnpNNjE0LjQgODMxLjI0NzA1OWwtMjA0LjggMy4wMTE3NjUgMy4wMTE3NjUgNi4wMjM1MjkgMjAxLjc4ODIzNS0zLjAxMTc2NUw2MTQuNCA4MzEuMjQ3MDU5ek03MzQuODcwNTg4IDQwOS42Yy0xOC4wNzA1ODggMC0zMC4xMTc2NDctMTIuMDQ3MDU5LTMwLjExNzY0Ny0zMC4xMTc2NDdDNzA0Ljc1Mjk0MSAyNzEuMDU4ODI0IDYxMS4zODgyMzUgMTgwLjcwNTg4MiA0OTYuOTQxMTc2IDE4MC43MDU4ODJjLTE4LjA3MDU4OCAwLTMwLjExNzY0Ny0xMi4wNDcwNTktMzAuMTE3NjQ3LTMwLjExNzY0N3MxMi4wNDcwNTktMzAuMTE3NjQ3IDMwLjExNzY0Ny0zMC4xMTc2NDdjMTQ3LjU3NjQ3MSAwIDI2OC4wNDcwNTkgMTE3LjQ1ODgyNCAyNjguMDQ3MDU5IDI2Mi4wMjM1MjlDNzY0Ljk4ODIzNSAzOTcuNTUyOTQxIDc0OS45Mjk0MTIgNDA5LjYgNzM0Ljg3MDU4OCA0MDkuNnoiIGZpbGw9IiM1NmFiZTQiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg=="},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    '}},{key:"newNode",value:function(){return new u.default}},{key:"getPropertiesProducer",value:function(){var t=this;return function(){var e=$("
    ");return e.append(t.getCommonProperties(this)),e}}}]),e}(s.default);e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n";return r+=this.getFromConnectionsXML(),r+=""}}]),e}(u.default);e.default=g},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48IVtDREFUQVsNCkBmb250LWZhY2UgeyBmb250LWZhbWlseTogaWZvbnQ7IHNyYzogdXJsKCJodHRwOi8vYXQuYWxpY2RuLmNvbS90L2ZvbnRfMTQ0MjM3Mzg5Nl80NzU0NDU1LmVvdD8jaWVmaXgiKSBmb3JtYXQoImVtYmVkZGVkLW9wZW50eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS53b2ZmIikgZm9ybWF0KCJ3b2ZmIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS50dGYiKSBmb3JtYXQoInRydWV0eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS5zdmcjaWZvbnQiKSBmb3JtYXQoInN2ZyIpOyB9DQoNCl1dPjwvc3R5bGU+PC9kZWZzPjxnIGNsYXNzPSJ0cmFuc2Zvcm0tZ3JvdXAiPjxnIHRyYW5zZm9ybT0ic2NhbGUoMC4xOTUzMTI1LCAwLjE5NTMxMjUpIj48cGF0aCBkPSJNNzY4IDY5MC41MjhsMC03OC45NzZjMC04Mi4zMzYtNjYuOTc2LTE0OS4zNDQtMTQ5LjM0NC0xNDkuMzQ0LTM1LjI5NiAwLTY0LTI4LjcwNC02NC02NGwwLTY0LjczNmM0OS41MzYtMTcuNjk2IDg1LjM0NC02NC42MDggODUuMzQ0LTEyMC4xNiAwLTcwLjU2LTU3LjQ0LTEyOC0xMjgtMTI4cy0xMjggNTcuNDQtMTI4IDEyOGMwIDU1LjU1MiAzNS44MDggMTAyLjQzMiA4NS4zNDQgMTIwLjA5NmwwIDY0Ljc2OGMwIDM1LjI5Ni0yOC43MDQgNjQtNjQgNjQtODIuMzM2IDAtMTQ5LjM0NCA2Ni45NzYtMTQ5LjM0NCAxNDkuMzQ0bDAgNzguOTc2Yy00OS41MzYgMTcuNjk2LTg1LjM0NCA2NC42MDgtODUuMzQ0IDEyMC4xNiAwIDcwLjU2IDU3LjQ0IDEyOCAxMjggMTI4czEyOC01Ny40NCAxMjgtMTI4YzAtNTUuNTUyLTM1LjgwOC0xMDIuNDMyLTg1LjM0NC0xMjAuMTZsMC03OC45NzZjMC0zNS4yOTYgMjguNzA0LTY0IDY0LTY0IDQxLjc2IDAgNzkuNTItMTcuMzc2IDEwNi42NTYtNDUuMTUyIDI3LjEzNiAyNy43NzYgNjQuODk2IDQ1LjE1MiAxMDYuNjU2IDQ1LjE1MiAzNS4yOTYgMCA2NCAyOC43MDQgNjQgNjRsMCA3OC45NzZjLTQ5LjUzNiAxNy42OTYtODUuMzQ0IDY0LjYwOC04NS4zNDQgMTIwLjE2IDAgNzAuNTYgNTcuNDQgMTI4IDEyOCAxMjhzMTI4LTU3LjQ0IDEyOC0xMjhjMC01NS41NTItMzUuODA4LTEwMi40MzItODUuMzQ0LTEyMC4xNnpNMjk4LjY1NiA4NTMuMzQ0Yy0yMy41NTIgMC00Mi42NTYtMTkuMTY4LTQyLjY1Ni00Mi42NTZzMTkuMTA0LTQyLjY1NiA0Mi42NTYtNDIuNjU2IDQyLjY1NiAxOS4xNjggNDIuNjU2IDQyLjY1Ni0xOS4xMDQgNDIuNjU2LTQyLjY1NiA0Mi42NTZ6TTUxMiAxNzAuNjU2YzIzLjU1MiAwIDQyLjY1NiAxOS4xNjggNDIuNjU2IDQyLjY1NnMtMTkuMTA0IDQyLjY1Ni00Mi42NTYgNDIuNjU2LTQyLjY1Ni0xOS4xNjgtNDIuNjU2LTQyLjY1NiAxOS4xMDQtNDIuNjU2IDQyLjY1Ni00Mi42NTZ6TTcyNS4zNDQgODUzLjM0NGMtMjMuNTUyIDAtNDIuNjU2LTE5LjE2OC00Mi42NTYtNDIuNjU2czE5LjEwNC00Mi42NTYgNDIuNjU2LTQyLjY1NiA0Mi42NTYgMTkuMTY4IDQyLjY1NiA0Mi42NTYtMTkuMTA0IDQyLjY1Ni00Mi42NTYgNDIuNjU2eiIgZmlsbD0iIzg4MTQ3ZiI+PC9wYXRoPjwvZz48L2c+PC9zdmc+"},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    '}},{key:"newNode",value:function(){return new u.default}},{key:"getConfigs",value:function(){return{out:1}}},{key:"getPropertiesProducer",value:function(){var t=this;return function(){var e=$("
    ");return e.append(t.getCommonProperties(this)),e}}}]),e}(s.default);e.default=g},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n";return r+=this.getFromConnectionsXML(),r+=""}}]),e}(u.default);e.default=g},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDIwMCAyMDAiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHN0eWxlIHR5cGU9InRleHQvY3NzIj48IVtDREFUQVsNCkBmb250LWZhY2UgeyBmb250LWZhbWlseTogaWZvbnQ7IHNyYzogdXJsKCJodHRwOi8vYXQuYWxpY2RuLmNvbS90L2ZvbnRfMTQ0MjM3Mzg5Nl80NzU0NDU1LmVvdD8jaWVmaXgiKSBmb3JtYXQoImVtYmVkZGVkLW9wZW50eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS53b2ZmIikgZm9ybWF0KCJ3b2ZmIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS50dGYiKSBmb3JtYXQoInRydWV0eXBlIiksIHVybCgiaHR0cDovL2F0LmFsaWNkbi5jb20vdC9mb250XzE0NDIzNzM4OTZfNDc1NDQ1NS5zdmcjaWZvbnQiKSBmb3JtYXQoInN2ZyIpOyB9DQoNCl1dPjwvc3R5bGU+PC9kZWZzPjxnIGNsYXNzPSJ0cmFuc2Zvcm0tZ3JvdXAiPjxnIHRyYW5zZm9ybT0ic2NhbGUoMC4xOTUzMTI1LCAwLjE5NTMxMjUpIj48cGF0aCBkPSJNNjgyLjY2NjY2NyA4MTAuNjY2NjY3QzY4Mi42NjY2NjcgOTA0Ljk2IDYwNi4yOTMzMzMgOTgxLjMzMzMzMyA1MTIgOTgxLjMzMzMzMyA0MTcuNzA2NjY3IDk4MS4zMzMzMzMgMzQxLjMzMzMzMyA5MDQuOTYgMzQxLjMzMzMzMyA4MTAuNjY2NjY3IDM0MS4zMzMzMzMgNzMxLjMwNjY2NyAzOTUuNTIgNjY0LjMyIDQ2OS4zMzMzMzMgNjQ1LjU0NjY2NyA0NjkuMzMzMzMzIDYxNy4zODY2NjcgNDY5LjMzMzMzMyA1ODkuNjUzMzMzIDQzOS4wNCA1NDUuMjggNDA4LjMyIDUwMC45MDY2NjcgMzQ3LjMwNjY2NyA0NDAuNzQ2NjY3IDI4Ni4yOTMzMzMgMzgwLjE2IDI1Ny4yOCAzODUuMjggMjI2LjU2IDM4NCAxOTYuNjkzMzMzIDM3Mi40OCAxMDguMzczMzMzIDM0MS4zMzMzMzMgNjIuNzIgMjQyLjM0NjY2NyA5NC43MiAxNTMuNiAxMjggNjUuMjggMjI0Ljg1MzMzMyAxOS42MjY2NjcgMzEzLjYgNTEuNjI2NjY3IDQwMS45MiA4NC4wNTMzMzMgNDQ4IDE4MS43NiA0MTUuNTczMzMzIDI3MC41MDY2NjcgNDA1LjMzMzMzMyAzMDAuMzczMzMzIDM4Ni41NiAzMjUuMTIgMzYyLjY2NjY2NyAzNDMuODkzMzMzIDM4MS4wMTMzMzMgNDAyLjc3MzMzMyA1MTIgNTEyIDUxMiA1MzMuMzMzMzMzIDUxMiA1MTIgNjQyLjk4NjY2NyA0MDIuNzczMzMzIDY2MS4zMzMzMzMgMzQzLjg5MzMzMyA2MzcuNDQgMzI1LjEyIDYxOC42NjY2NjcgMzAwLjM3MzMzMyA2MDguNDI2NjY3IDI3MC41MDY2NjcgNTc2IDE4MS43NiA2MjIuMDggODQuMDUzMzMzIDcxMC40IDUxLjYyNjY2NyA3OTkuMTQ2NjY3IDE5LjYyNjY2NyA4OTYgNjUuMjggOTI5LjI4IDE1My42IDk2MS4yOCAyNDIuMzQ2NjY3IDkxNS42MjY2NjcgMzQxLjMzMzMzMyA4MjcuMzA2NjY3IDM3Mi40OCA3OTcuNDQgMzg0IDc2Ni43MiAzODUuMjggNzM3LjcwNjY2NyAzODAuMTYgNjc2LjY5MzMzMyA0NDAuNzQ2NjY3IDYxNS42OCA1MDAuOTA2NjY3IDU4NC45NiA1NDUuMjggNTU0LjY2NjY2NyA1ODkuNjUzMzMzIDU1NC42NjY2NjcgNjE3LjM4NjY2NyA1NTQuNjY2NjY3IDY0NS41NDY2NjcgNjI4LjQ4IDY2NC4zMiA2ODIuNjY2NjY3IDczMS4zMDY2NjcgNjgyLjY2NjY2NyA4MTAuNjY2NjY3TTUxMiA3MjUuMzMzMzMzQzQ2NS4wNjY2NjcgNzI1LjMzMzMzMyA0MjYuNjY2NjY3IDc2My43MzMzMzMgNDI2LjY2NjY2NyA4MTAuNjY2NjY3IDQyNi42NjY2NjcgODU3LjYgNDY1LjA2NjY2NyA4OTYgNTEyIDg5NiA1NTguOTMzMzMzIDg5NiA1OTcuMzMzMzMzIDg1Ny42IDU5Ny4zMzMzMzMgODEwLjY2NjY2NyA1OTcuMzMzMzMzIDc2My43MzMzMzMgNTU4LjkzMzMzMyA3MjUuMzMzMzMzIDUxMiA3MjUuMzMzMzMzTTI4NC4xNiAxMzEuODRDMjQwLjIxMzMzMyAxMTYuMDUzMzMzIDE5MiAxMzguNjY2NjY3IDE3NC45MzMzMzMgMTgzLjA0IDE1OC43MiAyMjcuNDEzMzMzIDE4MS43NiAyNzYuMDUzMzMzIDIyNi4xMzMzMzMgMjkyLjI2NjY2NyAyNzAuMDggMzA4LjQ4IDMyMCAyODUuNDQgMzM1LjM2IDI0MS40OTMzMzMgMzUxLjU3MzMzMyAxOTcuMTIgMzI4LjUzMzMzMyAxNDguMDUzMzMzIDI4NC4xNiAxMzEuODRNNzM5Ljg0IDEzMS44NEM2OTUuNDY2NjY3IDE0OC4wNTMzMzMgNjcyLjQyNjY2NyAxOTcuMTIgNjg4LjY0IDI0MS40OTMzMzMgNzA0IDI4NS40NCA3NTMuOTIgMzA4LjQ4IDc5Ny44NjY2NjcgMjkyLjI2NjY2NyA4NDIuMjQgMjc2LjA1MzMzMyA4NjUuMjggMjI3LjQxMzMzMyA4NDkuMDY2NjY3IDE4My4wNCA4MzIgMTM4LjY2NjY2NyA3ODMuNzg2NjY3IDExNi4wNTMzMzMgNzM5Ljg0IDEzMS44NFoiIGZpbGw9IiM4ODE0N2YiPjwvcGF0aD48L2c+PC9nPjwvc3ZnPg=="; +}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/frame.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/frame.bundle.js new file mode 100644 index 0000000..5e77e23 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/frame.bundle.js @@ -0,0 +1,18 @@ +!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={exports:{},id:o,loaded:!1};return t[o].call(r.exports,r,r.exports,e),r.loaded=!0,r.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}n(10),n(1),n(390),n(433),n(435);var i=n(14),A=r(i),a=n(41),l=r(a),c=n(183),s=n(205),u=n(400),g=o(u),M=n(436),d=r(M),p=n(204),T=r(p),f=n(437),I=r(f),N=n(230),E=r(N),h=n(438),w=r(h),C=n(441),D=r(C),y=n(401),x=o(y),m=n(339),L=o(m),b=n(452),B=r(b);$(document).ready(function(){function t(){var t=$(".fileSearchText").val();window.searchFileName=t,e.dispatch(g.loadData(window._classify,window._projectName,window._types,window.searchFileName))}window._types=null,window._projectName=null,window.componentEvent=L;var e=(0,c.createStore)(d.default,(0,c.applyMiddleware)(T.default));e.dispatch(g.loadData());$(document).height()+"px";x.eventEmitter.on(x.CHANGE_CLASSIFY,function(t){window._classify=t,t?($("#__classify_display").html(' 分类展示'),$("#__no_classify_display").html("    集中展示")):($("#__classify_display").html("    分类展示"),$("#__no_classify_display").html(' 集中展示'))}),x.eventEmitter.on(x.PROJECT_LIST_CHANGE,function(t){var n=$("#__project_filter_menu"),o=n.children("li");o.each(function(t,e){var n=$(e);n.hasClass("_firstItem")?n.find("a").css("margin-left","0px"):n.remove()}),$("#_show_all_projects_i").addClass("rf rf-check");var r=!0,i=!1,A=void 0;try{for(var a,l=function(){var t=a.value,o=$('
  • '),r=$(' '+t+"");o.append(r),n.append(o),r.click(function(){window._projectName=t,L.eventEmitter.emit(L.SHOW_LOADING),setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types,window.searchFileName)),x.eventEmitter.emit(x.PROJECT_FILTER_CHANGE,t),L.eventEmitter.emit(L.HIDE_LOADING)},200)})},c=t[Symbol.iterator]();!(r=(a=c.next()).done);r=!0)l()}catch(t){i=!0,A=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw A}}}),x.eventEmitter.on(x.PROJECT_FILTER_CHANGE,function(t){var e=$("#__project_filter_menu"),n=e.children("li");n.each(function(t,e){$(e).find("i").removeClass("rf rf-check"),$(e).find("a").css("margin-left","22px")});var o=e.find(".p_"+t);o.find("a").css("margin-left","0px"),o.find("i").addClass("rf rf-check")}),l.default.render(A.default.createElement("div",null,A.default.createElement(B.default,{show:!0}),A.default.createElement(s.Provider,{store:e},A.default.createElement(E.default,{orientation:"vertical",position:"20%"},A.default.createElement("div",null,A.default.createElement("div",{style:{border:"solid 1px #ddd",height:"35px",background:"#f5f5f5",padding:"5px 10px"}},A.default.createElement("span",{className:"dropdown",style:{margin:"5px"}},A.default.createElement("a",{href:"###",className:"dropdown-toggle","data-toggle":"dropdown",title:"知识库内容展示方式"},A.default.createElement("i",{className:"rf rf-display",style:{fontSize:"12pt"}})," ",A.default.createElement("b",{className:"caret"})),A.default.createElement("ul",{className:"dropdown-menu"},A.default.createElement("li",null,A.default.createElement("a",{href:"###",id:"__classify_display",onClick:function(){L.eventEmitter.emit(L.SHOW_LOADING),setTimeout(function(){e.dispatch(g.loadData(!0,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200)}},"✔ 分类展示")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",id:"__no_classify_display",onClick:function(){L.eventEmitter.emit(L.SHOW_LOADING),setTimeout(function(){e.dispatch(g.loadData(!1,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200)}},"    集中展示")))),A.default.createElement("span",{className:"dropdown",style:{margin:"5px"}},A.default.createElement("a",{href:"###",className:"dropdown-toggle","data-toggle":"dropdown",title:"项目过滤"},A.default.createElement("i",{className:"rf rf-list",style:{fontSize:"12pt"}})," ",A.default.createElement("b",{className:"caret"})),A.default.createElement("ul",{className:"dropdown-menu",id:"__project_filter_menu"},A.default.createElement("li",{className:"_firstItem"},A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),setTimeout(function(){e.dispatch(g.loadData(window._classify)),L.eventEmitter.emit(L.HIDE_LOADING)},200);var n=$("#__project_filter_menu"),o=n.children("li");o.each(function(t,e){$(e).find("i").removeClass("rf rf-check"),$(e).find("a").css("margin-left","22px")}),$(this).css("margin-left","0px"),$("#_show_all_projects_i").addClass("rf rf-check"),window._projectName=null}},A.default.createElement("i",{id:"_show_all_projects_i"})," 显示所有项目")))),A.default.createElement("span",{className:"dropdown",style:{margin:"5px"}},A.default.createElement("a",{href:"###",className:"dropdown-toggle","data-toggle":"dropdown",title:"文件类型过滤"},A.default.createElement("i",{className:"rf rf-type",style:{fontSize:"12pt"}})," ",A.default.createElement("b",{className:"caret"})),A.default.createElement("ul",{className:"dropdown-menu"},A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="all",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file rf rf-check"})," ",A.default.createElement("i",{className:"glyphicon glyphicon-th"})," 显示所有文件")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="lib",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file"})," ",A.default.createElement("i",{className:"rf rf-library"})," 库文件")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="rule",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file"})," ",A.default.createElement("i",{className:"rf rf-rule"})," 决策集")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="table",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file"})," ",A.default.createElement("i",{className:"rf rf-table"})," 决策表")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="tree",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file"})," ",A.default.createElement("i",{className:"rf rf-tree"})," 决策树")),A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){L.eventEmitter.emit(L.SHOW_LOADING),window._types="flow",setTimeout(function(){e.dispatch(g.loadData(window._classify,window._projectName,window._types)),L.eventEmitter.emit(L.HIDE_LOADING)},200),$(".filter_file").removeClass("rf rf-check"),$(t.target).children(".filter_file").addClass("rf rf-check")}},A.default.createElement("i",{className:"filter_file"})," ",A.default.createElement("i",{className:"rf rf-flow"})," 决策流")))),A.default.createElement("span",{className:"dropdown",style:{margin:"5px"}},A.default.createElement("a",{href:"###",className:"dropdown-toggle","data-toggle":"dropdown",title:"权限配置"},A.default.createElement("i",{className:"rf rf-authority",style:{fontSize:"12pt"}})," ",A.default.createElement("b",{className:"caret"})),A.default.createElement("ul",{className:"dropdown-menu",id:"__authority_config_menu"},A.default.createElement("li",null,A.default.createElement("a",{href:"###",onClick:function(t){var e=window._server+"/permission";L.eventEmitter.emit(L.TREE_NODE_CLICK,{id:"security_config_",name:"资源权限配置",fullPath:"security_config_",path:e})}},A.default.createElement("i",null)," 资源权限配置"))))),A.default.createElement("div",{className:"tree",style:{marginLeft:"10px"}},A.default.createElement("div",{style:{margin:"10px 0px 5px 2px"}},A.default.createElement("input",{type:"text",className:"form-control fileSearchText",placeholder:"输入要查询的文件名...",style:{display:"inline-block",width:"170px"}}),A.default.createElement("a",{href:"###",onClick:t,style:{margin:"6px",fontSize:"16px"}},A.default.createElement("i",{className:"glyphicon glyphicon-search"}))),A.default.createElement(I.default,{draggable:!0}))),A.default.createElement("div",null,A.default.createElement(D.default,null),A.default.createElement(w.default,{welcomePage:window._welcomePage}))))),document.getElementById("container")),x.eventEmitter.on(x.EXPAND_TREE_NODE,function(t){var e=$("#node-"+t.id).parent("li"),n=e.parent("li.parent_li").find(" > ul > li");n.show("fast"),e.children("i:first").addClass("rf-minus").removeClass("rf-plus")})})},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&N.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function c(t,e){var n,o,r;if(e.singleton){var i=I++;n=f||(f=a(e)),o=s.bind(null,n,i,!1),r=s.bind(null,n,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(e),o=g.bind(null,n),r=function(){A(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),o=u.bind(null,n),r=function(){A(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else r()}}function s(t,e,n,o){var r=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=E(e,r);else{var i=document.createTextNode(r),A=t.childNodes;A[e]&&t.removeChild(A[e]),A.length?t.insertBefore(i,A[e]):t.appendChild(i)}}function u(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var r=new Blob([n],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(r),i&&URL.revokeObjectURL(i)}var M={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),T=d(function(){return document.head||document.getElementsByTagName("head")[0]}),f=null,I=0,N=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=r(t);return o(n,e),function(t){for(var i=[],A=0;A1){for(var T=Array(p),f=0;f1){for(var N=Array(I),E=0;E>"),m={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:a(),arrayOf:l,element:c(),instanceOf:s,node:d(),objectOf:g,oneOf:u,oneOfType:M,shape:p};r.prototype=Error.prototype,t.exports=m},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function o(t){return i.isValidElement(t)?void 0:r("143"),t}var r=n(19),i=n(21);n(20);t.exports=o},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var o=n(43),r=n(48),i=n(174),A=n(71),a=n(68),l=n(179),c=n(180),s=n(181),u=n(182);n(56);r.inject();var g={findDOMNode:c,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:l,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=s(t)),t?o.getNodeFromInstance(t):null}},Mount:i,Reconciler:A});t.exports=g},function(t,e,n){"use strict";function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function r(t,e){var n=o(t);n._hostNode=e,e[p]=n}function i(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function A(t,e){if(!(t._flags&d.hasCachedChildNodes)){var n=t._renderedChildren,i=e.firstChild;t:for(var A in n)if(n.hasOwnProperty(A)){var a=n[A],l=o(a)._domID;if(0!==l){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(M)===String(l)||8===i.nodeType&&i.nodeValue===" react-text: "+l+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+l+" "){r(a,i);continue t}s("32",l)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,o;t&&(o=t[p]);t=e.pop())n=o,e.length&&A(o,t);return n}function l(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?s("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:s("34"),t=t._hostParent;for(;e.length;t=e.pop())A(t,t._hostNode);return t._hostNode}var s=n(44),u=n(45),g=n(47),M=(n(46),u.ID_ATTRIBUTE_NAME),d=g,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),T={getClosestInstanceFromNode:a,getInstanceFromNode:l,getNodeFromInstance:c,precacheChildNodes:A,precacheNode:r,uncacheNode:i};t.exports=T},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,o=0;o8&&h<=11),D=32,y=String.fromCharCode(D),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},m=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,n,o){return[c(t,e,n,o),g(t,e,n,o)]}};t.exports=b},function(t,e,n){"use strict";function o(t,e,n){var o=e.dispatchConfig.phasedRegistrationNames[n];return f(t,o)}function r(t,e,n){var r=o(t,n,e);r&&(n._dispatchListeners=p(n._dispatchListeners,r),n._dispatchInstances=p(n._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,r,t)}function A(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?d.getParentInstance(e):null;d.traverseTwoPhase(n,r,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,r=f(t,o);r&&(n._dispatchListeners=p(n._dispatchListeners,r),n._dispatchInstances=p(n._dispatchInstances,t))}}function l(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){T(t,i)}function s(t){T(t,A)}function u(t,e,n,o){d.traverseEnterLeave(n,o,a,t,e)}function g(t){T(t,l)}var M=n(52),d=n(54),p=n(58),T=n(59),f=(n(56),M.getListener),I={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:s,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=I},function(t,e,n){"use strict";function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function r(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(e));default:return!1}}var i=n(44),A=n(53),a=n(54),l=n(55),c=n(58),s=n(59),u=(n(46),{}),g=null,M=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return M(t,!0)},p=function(t){return M(t,!1)},T=function(t){return"."+t._rootNodeID},f={injection:{injectEventPluginOrder:A.injectEventPluginOrder,injectEventPluginsByName:A.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?i("94",e,typeof n):void 0;var o=T(t),r=u[e]||(u[e]={});r[o]=n;var a=A.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(r(e,t._currentElement.type,t._currentElement.props))return null;var o=T(t);return n&&n[o]},deleteListener:function(t,e){var n=A.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var o=u[e];if(o){var r=T(t);delete o[r]}},deleteAllListeners:function(t){var e=T(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var o=A.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,o){for(var r,i=A.plugins,a=0;a-1?void 0:A("96",t),!c.plugins[n]){e.extractEvents?void 0:A("97",t),c.plugins[n]=e;var o=e.eventTypes;for(var i in o)r(o[i],e,i)?void 0:A("98",i,t)}}}function r(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?A("99",n):void 0,c.eventNameDispatchConfigs[n]=t;var o=t.phasedRegistrationNames;if(o){for(var r in o)if(o.hasOwnProperty(r)){var a=o[r];i(a,e,n)}return!0}return!!t.registrationName&&(i(t.registrationName,e,n),!0)}function i(t,e,n){c.registrationNameModules[t]?A("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var A=n(44),a=(n(46),null),l={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?A("101"):void 0,a=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];l.hasOwnProperty(n)&&l[n]===r||(l[n]?A("102",n):void 0,l[n]=r,e=!0)}e&&o()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var r=c.registrationNameModules[n[o]];if(r)return r}}return null},_resetEventPlugins:function(){a=null;for(var t in l)l.hasOwnProperty(t)&&delete l[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var o=c.registrationNameModules;for(var r in o)o.hasOwnProperty(r)&&delete o[r]}};t.exports=c},function(t,e,n){"use strict";function o(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function r(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function A(t,e,n,o){var r=t.type||"unknown-event";t.currentTarget=f.getNodeFromInstance(o),e?p.invokeGuardedCallbackWithCatch(r,n,t):p.invokeGuardedCallback(r,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,o=t._dispatchInstances;if(Array.isArray(n))for(var r=0;r1?1-e:void 0;return this._fallbackText=r.slice(t,a),this._fallbackText}}),i.addPoolingTo(o),t.exports=o},function(t,e,n){"use strict";var o=n(44),r=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),i=function(t,e){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e),o}return new n(t,e)},A=function(t,e,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,n),r}return new o(t,e,n)},a=function(t,e,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n,o),i}return new r(t,e,n,o)},l=function(t,e,n,o,r){var i=this;if(i.instancePool.length){var A=i.instancePool.pop();return i.call(A,t,e,n,o,r),A}return new i(t,e,n,o,r)},c=function(t){var e=this;t instanceof e?void 0:o("25"),t.destructor(),e.instancePool.length8));var v=!1;E.canUseDOM&&(v=y("input")&&(!document.documentMode||document.documentMode>11));var S={get:function(){return j.get.call(this)},set:function(t){B=""+t,j.set.call(this,t)}},U={eventTypes:m,extractEvents:function(t,e,n,r){var i,A,a=e?h.getNodeFromInstance(e):window;if(o(a)?Q?i=l:A=c:x(a)?v?i=M:(i=p,A=d):T(a)&&(i=f),i){var s=i(t,e);if(s){var u=C.getPooled(m.change,s,n,r);return u.type="change",N.accumulateTwoPhaseDispatches(u),u}}A&&A(t,a,e)}};t.exports=U},function(t,e,n){"use strict";function o(){m.ReactReconcileTransaction&&h?void 0:s("123")}function r(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=m.ReactReconcileTransaction.getPooled(!0)}function i(t,e,n,r,i,A){return o(),h.batchedUpdates(t,e,n,r,i,A)}function A(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==f.length?s("124",e,f.length):void 0,f.sort(A),I++;for(var n=0;n]/,l=n(91),c=l(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{o=o||document.createElement("div"),o.innerHTML=""+e+"";for(var n=o.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(r.canUseDOM){var s=document.createElement("div");s.innerHTML=" ",""===s.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),A.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),s=null}t.exports=c},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,o,r){MSApp.execUnsafeLocalFunction(function(){return t(e,n,o,r)})}:t};t.exports=n},function(t,e,n){"use strict";var o=n(60),r=n(93),i=n(90),A=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};o.canUseDOM&&("textContent"in document.documentElement||(A=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void i(t,r(e))})),t.exports=A},function(t,e){"use strict";function n(t){var e=""+t,n=r.exec(e);if(!n)return e;var o,i="",A=0,a=0;for(A=n.index;A]/;t.exports=o},function(t,e,n){"use strict";var o=n(44),r=n(88),i=n(60),A=n(95),a=n(57),l=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(i.canUseDOM?void 0:o("56"),e?void 0:o("57"),"HTML"===t.nodeName?o("58"):void 0,"string"==typeof e){var n=A(e,a)[0];t.parentNode.replaceChild(n,t)}else r.replaceChildWithTree(t,e)}});t.exports=l},function(t,e,n){"use strict";function o(t){var e=t.match(s);return e&&e[1].toLowerCase()}function r(t,e){var n=c;c?void 0:l(!1);var r=o(t),i=r&&a(r);if(i){n.innerHTML=i[1]+t+i[2];for(var s=i[0];s--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:l(!1),A(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var i=n(60),A=n(96),a=n(97),l=n(46),c=i.canUseDOM?document.createElement("div"):null,s=/^\s*<(\w+)/;t.exports=r},function(t,e,n){"use strict";function o(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?A(!1):void 0,"number"!=typeof e?A(!1):void 0,0===e||e-1 in t?void 0:A(!1),"function"==typeof t.callee?A(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),o=0;o":A.innerHTML="<"+t+">",a[t]=!A.firstChild),a[t]?g[t]:null}var r=n(60),i=n(46),A=r.canUseDOM?document.createElement("div"):null,a={},l=[1,'"],c=[1,"","
    "],s=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:l,option:l,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:s,th:s},M=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];M.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=o},function(t,e,n){"use strict";var o=n(87),r=n(43),i={dangerouslyProcessChildrenUpdates:function(t,e){var n=r.getNodeFromInstance(t);o.processUpdates(n,e)}};t.exports=i},function(t,e,n){"use strict";function o(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function r(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",o(t)):void 0)}function i(t,e,n,o){if(!(o instanceof v)){var r=t._hostContainerInfo,i=r._node&&r._node.nodeType===P,a=i?r._node:r._ownerDocument;O(e,a),o.getReactMountReady().enqueue(A,{inst:t,registrationName:e,listener:n})}}function A(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function l(){var t=this;j.postMountWrapper(t)}function c(){var t=this;b.postMountWrapper(t)}function s(){var t=this;t._rootNodeID?void 0:p("63");var e=k(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[y.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&t._wrapperState.listeners.push(y.trapBubbledEvent(n,G[n],e));break;case"source":t._wrapperState.listeners=[y.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[y.trapBubbledEvent("topError","error",e),y.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[y.trapBubbledEvent("topReset","reset",e),y.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[y.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){B.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function M(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),T=n(16),f=n(100),I=n(102),N=n(88),E=n(89),h=n(45),w=n(110),C=n(52),D=n(53),y=n(112),x=n(47),m=n(43),L=n(115),b=n(118),B=n(119),j=n(120),Q=(n(74),n(121)),v=n(141),S=(n(57),n(93)),U=(n(46),n(77),n(130),n(144),n(56),x),z=C.deleteListener,k=m.getNodeFromInstance,O=y.listenTo,Y=D.registrationNameModules,R={string:!0,number:!0},F="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},P=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=T({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,n,o){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(s,this);break;case"input":L.mountWrapper(this,i,e),i=L.getHostProps(this,i),t.getReactMountReady().enqueue(s,this);break;case"option":b.mountWrapper(this,i,e),i=b.getHostProps(this,i);break;case"select":B.mountWrapper(this,i,e),i=B.getHostProps(this,i),t.getReactMountReady().enqueue(s,this);break;case"textarea":j.mountWrapper(this,i,e),i=j.getHostProps(this,i),t.getReactMountReady().enqueue(s,this)}r(this,i);var A,u;null!=e?(A=e._namespaceURI,u=e._tag):n._tag&&(A=n._namespaceURI,u=n._tag),(null==A||A===E.svg&&"foreignobject"===u)&&(A=E.html),A===E.html&&("svg"===this._tag?A=E.svg:"math"===this._tag&&(A=E.mathml)),this._namespaceURI=A;var g;if(t.useCreateElement){var M,d=n._ownerDocument;if(A===E.html)if("script"===this._tag){var p=d.createElement("div"),T=this._currentElement.type;p.innerHTML="<"+T+">",M=p.removeChild(p.firstChild)}else M=i.is?d.createElement(this._currentElement.type,i.is):d.createElement(this._currentElement.type);else M=d.createElementNS(A,this._currentElement.type);m.precacheNode(this,M),this._flags|=U.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(M),this._updateDOMProperties(null,i,t);var I=N(M);this._createInitialChildren(t,i,o,I),g=I}else{var h=this._createOpenTagMarkupAndPutListeners(t,i),C=this._createContentMarkup(t,i,o);g=!C&&X[this._tag]?h+"/>":h+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),i.autoFocus&&t.getReactMountReady().enqueue(f.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(l,this),i.autoFocus&&t.getReactMountReady().enqueue(f.focusDOMComponent,this);break;case"select":i.autoFocus&&t.getReactMountReady().enqueue(f.focusDOMComponent,this);break;case"button":i.autoFocus&&t.getReactMountReady().enqueue(f.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var o in e)if(e.hasOwnProperty(o)){var r=e[o];if(null!=r)if(Y.hasOwnProperty(o))r&&i(this,o,r,t);else{o===F&&(r&&(r=this._previousStyleCopy=T({},e.style)),r=I.createMarkupForStyles(r,this));var A=null;null!=this._tag&&M(this._tag,e)?V.hasOwnProperty(o)||(A=w.createMarkupForCustomAttribute(o,r)):A=w.createMarkupForProperty(o,r),A&&(n+=" "+A)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var o="",r=e.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&(o=r.__html);else{var i=R[typeof e.children]?e.children:null,A=null!=i?null:e.children;if(null!=i)o=S(i);else if(null!=A){var a=this.mountChildren(A,t,n);o=a.join("")}}return W[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(t,e,n,o){var r=e.dangerouslySetInnerHTML;if(null!=r)null!=r.__html&&N.queueHTML(o,r.__html);else{var i=R[typeof e.children]?e.children:null,A=null!=i?null:e.children;if(null!=i)N.queueText(o,i);else if(null!=A)for(var a=this.mountChildren(A,t,n),l=0;l1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function i(t,e){var n=a.get(t);if(!n){return null}return n}var A=n(44),a=(n(22),n(123)),l=(n(74),n(68)),c=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var r=i(t);return r?(r._pendingCallbacks?r._pendingCallbacks.push(e):r._pendingCallbacks=[e],void o(r)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],o(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,o(e))},enqueueReplaceState:function(t,e){var n=i(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(t,e){var n=i(t,"setState");if(n){var r=n._pendingStateQueue||(n._pendingStateQueue=[]);r.push(e),o(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,o(t)},validateCallback:function(t,e){t&&"function"!=typeof t?A("122",e,r(t)):void 0}});t.exports=c},function(t,e,n){"use strict";var o=(n(16),n(57)),r=(n(56),o);t.exports=r},function(t,e,n){"use strict";var o=n(16),r=n(88),i=n(43),A=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(A.prototype,{mountComponent:function(t,e,n,o){var A=n._idCounter++;this._domID=A,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var l=n._ownerDocument,c=l.createComment(a);return i.precacheNode(this,c),r(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function o(t,e){"_hostNode"in t?void 0:l("33"),"_hostNode"in e?void 0:l("33");for(var n=0,o=t;o;o=o._hostParent)n++;for(var r=0,i=e;i;i=i._hostParent)r++;for(;n-r>0;)t=t._hostParent,n--;for(;r-n>0;)e=e._hostParent,r--;for(var A=n;A--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function r(t,e){"_hostNode"in t?void 0:l("35"),"_hostNode"in e?void 0:l("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function i(t){return"_hostNode"in t?void 0:l("36"),t._hostParent}function A(t,e,n){for(var o=[];t;)o.push(t),t=t._hostParent;var r;for(r=o.length;r-- >0;)e(o[r],"captured",n);for(r=0;r0;)n(l[c],"captured",i)}var l=n(44);n(46);t.exports={isAncestor:r,getLowestCommonAncestor:o,getParentInstance:i,traverseTwoPhase:A,traverseEnterLeave:a}},function(t,e,n){"use strict";var o=n(44),r=n(16),i=n(87),A=n(88),a=n(43),l=n(93),c=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});r(c.prototype,{mountComponent:function(t,e,n,o){var r=n._idCounter++,i=" react-text: "+r+" ",c=" /react-text ";if(this._domID=r,this._hostParent=e,t.useCreateElement){var s=n._ownerDocument,u=s.createComment(i),g=s.createComment(c),M=A(s.createDocumentFragment());return A.queueChild(M,A(u)),this._stringText&&A.queueChild(M,A(s.createTextNode(this._stringText))),A.queueChild(M,A(g)),a.precacheNode(this,u),this._closingComment=g,M}var d=l(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();i.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,n){"use strict";function o(){this.reinitializeTransaction()}var r=n(16),i=n(68),A=n(75),a=n(57),l={initialize:a,close:function(){g.isBatchingUpdates=!1}},c={initialize:a,close:i.flushBatchedUpdates.bind(i)},s=[c,l];r(o.prototype,A,{getTransactionWrappers:function(){return s}});var u=new o,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,o,r,i){var A=g.isBatchingUpdates;return g.isBatchingUpdates=!0,A?t(e,n,o,r,i):u.perform(t,null,e,n,o,r,i)}};t.exports=g},function(t,e,n){"use strict";function o(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function r(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){var e=M(t.nativeEvent),n=u.getClosestInstanceFromNode(e),r=n;do t.ancestors.push(r),r=r&&o(r);while(r);for(var i=0;ie.end?(n=e.end,o=e.start):(n=e.start,o=e.end),r.moveToElementText(t),r.moveStart("character",n),r.setEndPoint("EndToStart",r),r.moveEnd("character",o-n),r.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),o=t[s()].length,r=Math.min(e.start,o),i=void 0===e.end?r:Math.min(e.end,o);if(!n.extend&&r>i){var A=i;i=r,r=A}var a=c(t,r),l=c(t,i);if(a&&l){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),r>i?(n.addRange(u),n.extend(l.node,l.offset)):(u.setEnd(l.node,l.offset),n.addRange(u))}}}var l=n(60),c=n(156),s=n(63),u=l.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?r:i,setOffsets:u?A:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function r(t,e){for(var r=n(t),i=0,A=0;r;){if(3===r.nodeType){if(A=i+r.textContent.length,i<=e&&A>=e)return{node:r,offset:e-i};i=A}r=n(o(r))}}t.exports=r},function(t,e,n){"use strict";function o(t,e){return!(!t||!e)&&(t===e||!r(t)&&(r(e)?o(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var r=n(158);t.exports=o},function(t,e,n){"use strict";function o(t){return r(t)&&3==t.nodeType}var r=n(159);t.exports=o},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},r={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){r.Properties[t]=0,o[t]&&(r.DOMAttributeNames[t]=o[t])}),t.exports=r},function(t,e,n){"use strict";function o(t){if("selectionStart"in t&&l.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function r(t,e){if(I||null==p||p!==s())return null;var n=o(p);if(!f||!g(f,n)){f=n;var r=c.getPooled(d.select,T,t,e);return r.type="select",r.target=p,i.accumulateTwoPhaseDispatches(r),r}return null}var i=n(51),A=n(60),a=n(43),l=n(154),c=n(65),s=n(160),u=n(78),g=n(130),M=A.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,T=null,f=null,I=!1,N=!1,E={eventTypes:d,extractEvents:function(t,e,n,o){if(!N)return null;var i=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(i)||"true"===i.contentEditable)&&(p=i,T=e,f=null);break;case"topBlur":p=null,T=null,f=null;break;case"topMouseDown":I=!0;break;case"topContextMenu":case"topMouseUp":return I=!1,r(n,o);case"topSelectionChange":if(M)break;case"topKeyDown":case"topKeyUp":return r(n,o)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(N=!0)}};t.exports=E},function(t,e,n){"use strict";function o(t){return"."+t._rootNodeID}function r(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var i=n(44),A=n(150),a=n(51),l=n(43),c=n(164),s=n(165),u=n(65),g=n(166),M=n(167),d=n(81),p=n(170),T=n(171),f=n(172),I=n(82),N=n(173),E=n(57),h=n(168),w=(n(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,o="top"+e,r={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};w[t]=r,C[o]=r});var D={},y={eventTypes:w,extractEvents:function(t,e,n,o){var r=C[t];if(!r)return null;var A;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":A=u;break;case"topKeyPress":if(0===h(n))return null;case"topKeyDown":case"topKeyUp":A=M;break;case"topBlur":case"topFocus":A=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":A=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":A=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":A=T;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":A=c;break;case"topTransitionEnd":A=f;break;case"topScroll":A=I;break;case"topWheel":A=N;break;case"topCopy":case"topCut":case"topPaste":A=s}A?void 0:i("86",t);var l=A.getPooled(r,e,n,o);return a.accumulateTwoPhaseDispatches(l),l},didPutListener:function(t,e,n){if("onClick"===e&&!r(t._tag)){var i=o(t),a=l.getNodeFromInstance(t);D[i]||(D[i]=A.listen(a,"click",E))}},willDeleteListener:function(t,e){if("onClick"===e&&!r(t._tag)){var n=o(t);D[n].remove(),delete D[n]}}};t.exports=y},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(65),i={animationName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(65),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(82),i={relatedTarget:null};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(82),i=n(168),A=n(169),a=n(84),l={key:A,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};r.augmentClass(o,l),t.exports=o},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function o(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=r(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?A[t.keyCode]||"Unidentified":""}var r=n(168),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(81),i={dataTransfer:null};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(82),i=n(84),A={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};r.augmentClass(o,A),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(65),i={propertyName:null,elapsedTime:null,pseudoElement:null};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return r.call(this,t,e,n,o)}var r=n(81),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};r.augmentClass(o,i),t.exports=o},function(t,e,n){"use strict";function o(t,e){for(var n=Math.min(t.length,e.length),o=0;o.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var A,a=T.createElement(O,{child:e});if(t){var l=w.get(t);A=l._processChildContext(l._context)}else A=m;var s=g(n);if(s){var u=s._currentElement,d=u.props.child;if(B(d,e)){var p=s._renderedComponent.getPublicInstance(),f=o&&function(){o.call(p)};return Y._updateRootComponent(s,a,A,n,f),p}Y.unmountComponentAtNode(n)}var I=r(n),N=I&&!!i(I),E=c(n),h=N&&!s&&!E,C=Y._renderNewRootComponent(a,n,h,A)._renderedComponent.getPublicInstance();return o&&o.call(C),C},render:function(t,e,n){return Y._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){s(t)?void 0:M("40");var e=g(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(Q);return!1}return delete z[e._instance.rootID],x.batchedUpdates(l,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,i,A){if(s(e)?void 0:M("41"),i){var a=r(e);if(C.canReuseMarkup(t,a))return void I.precacheNode(n,a);var l=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,l);var u=t,g=o(u,c),p=" (client) "+u.substring(g-20,g+20)+"\n (server) "+c.substring(g-20,g+20);e.nodeType===S?M("42",p):void 0}if(e.nodeType===S?M("43"):void 0,A.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),I.precacheNode(n,e.firstChild)}};t.exports=Y},function(t,e,n){"use strict";function o(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===r?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var r=(n(144),9);t.exports=o},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var o=n(178),r=/\/?>/,i=/^<\!\-\-/,A={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=o(t);return i.test(t)?t:t.replace(r," "+A.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(A.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var r=o(t);return r===n}};t.exports=A},function(t,e){"use strict";function n(t){for(var e=1,n=0,r=0,i=t.length,A=i&-4;r3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),g=t||D,d=void 0;d="function"==typeof e?e:e?(0,f.default)(e):y;var T=n||x,I=o.pure,N=void 0===I||I,E=o.withRef,w=void 0!==E&&E,b=N&&T!==x,B=L++;return function(t){function e(t,e,n){var o=T(t,e,n);return o}var n="Connect("+a(t)+")",o=function(o){function a(t,e){r(this,a);var A=i(this,o.call(this,t,e));A.version=B,A.store=t.store||e.store,(0,C.default)(A.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+n+'".'));var l=A.store.getState();return A.state={storeState:l},A.clearCache(),A}return A(a,o),a.prototype.shouldComponentUpdate=function(){return!N||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var n=t.getState(),o=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,e):this.finalMapStateToProps(n);return o},a.prototype.configureFinalMapState=function(t,e){var n=g(t.getState(),e),o="function"==typeof n;return this.finalMapStateToProps=o?n:g,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,o?this.computeStateProps(t,e):n},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var n=t.dispatch,o=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,e):this.finalMapDispatchToProps(n);return o},a.prototype.configureFinalMapDispatch=function(t,e){var n=d(t.dispatch,e),o="function"==typeof n;return this.finalMapDispatchToProps=o?n:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,o?this.computeDispatchProps(t,e):n},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,p.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,p.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,p.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){N&&(0,p.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!N||e!==t){if(N&&!this.doStatePropsDependOnOwnProps){var n=l(this.updateStatePropsIfNeeded,this);if(!n)return;n===m&&(this.statePropsPrecalculationError=m.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,o=this.haveStatePropsBeenPrecalculated,r=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,r)throw r;var A=!0,a=!0;N&&i&&(A=n||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var l=!1,c=!1;o?l=!0:A&&(l=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var g=!0;return g=!!(l||c||e)&&this.updateMergedPropsIfNeeded(),!g&&i?i:(w?this.renderedElement=(0,u.createElement)(t,s({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,u.createElement)(t,this.mergedProps),this.renderedElement)},a}(u.Component);return o.displayName=n,o.WrappedComponent=t,o.contextTypes={store:M.default},o.propTypes={store:M.default},(0,h.default)(o,t)}}e.__esModule=!0;var s=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function i(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=o,e.ajaxSave=r,e.formatDate=i,window.iframe_id_=1},,function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=o},,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n\r\n *\r\n * Same license as plugin\r\n */.splitter_panel{position:relative}.splitter_panel .vsplitter{border-left:1px solid #999;border-right:1px solid #999;background-color:#f5f5f5;cursor:col-resize;z-index:900;width:7px}.splitter_panel .hsplitter{background-color:#5f5f5f;cursor:row-resize;z-index:800;height:7px}.splitter_panel .hsplitter.splitter-invisible,.splitter_panel .vsplitter.splitter-invisible{background:none}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{position:absolute;overflow:auto}.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .vsplitter{height:100%}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .top_panel{width:100%}.splitter_panel .left_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{top:0}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .top_panel{left:0}.splitter_panel .bottom_panel{bottom:0}.splitter_panel .right_panel{right:0}.splitterMask{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1000}",""])},function(t,e){"use strict";!function(t,e){var n=0,o=null,r=[],i=null;t.fn.split=function(A){function a(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9\.]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==u.orientation)return d*+e[1]/100;if("horizontal"==u.orientation)return p*+e[1]/100}}}var l=this.data("splitter");if(l)return l;var c,s,u=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},A||{});this.settings=u;var g,M=this.children();"vertical"==u.orientation?(c=M.first().addClass("left_panel"),s=c.next().addClass("right_panel"),g="vsplitter"):"horizontal"==u.orientation&&(c=M.first().addClass("top_panel"),s=c.next().addClass("bottom_panel"),g="hsplitter"),u.invisible&&(g+=" splitter-invisible");var d=this.width(),p=this.height(),T=n++;this.addClass("splitter_panel");var f,I=t("
    ").addClass(g).bind("mouseenter touchstart",function(){o=T}).bind("mouseleave touchend",function(){o=null}).insertAfter(c),N=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&p==e||(d=this.width(),p=this.height(),N.position(f))},position:function(){return"vertical"==u.orientation?function(t,n){if(t===e)return f;f=a(t);var o=I.width(),r=o/2;if(u.invisible){var i=c.width(f).outerWidth();s.width(N.width()-i),I.css("left",i-r)}else{var i=c.width(f-r).outerWidth();s.width(N.width()-i-o),I.css("left",i)}return n||N.find(".splitter_panel").trigger("splitter.resize"),N}:"horizontal"==u.orientation?function(t,n){if(t===e)return f;f=a(t);var o=I.height(),r=o/2;if(u.invisible){var i=c.height(f).outerHeight();s.height(N.height()-i),I.css("top",i-r)}else{var i=c.height(f-r).outerHeight();s.height(N.height()-i-o),I.css("top",i)}return n||N.find(".splitter_panel").trigger("splitter.resize"),N}:t.noop}(),orientation:u.orientation,limit:u.limit,isActive:function(){return o===T},destroy:function(){N.removeClass("splitter_panel"),I.unbind("mouseenter"),I.unbind("mouseleave"),I.unbind("touchstart"),I.unbind("touchmove"),I.unbind("touchend"),I.unbind("touchleave"),I.unbind("touchcancel"),"vertical"==u.orientation?(c.removeClass("left_panel"),s.removeClass("right_panel")):"horizontal"==u.orientation&&(c.removeClass("top_panel"),s.removeClass("bottom_panel")),N.unbind("splitter.resize"),N.find(".splitter_panel").trigger("splitter.resize"),r[T]=null,I.remove();for(var e=!1,o=r.length;o--;)if(null!==r[o]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),N.data("splitter",null),r=[],n=0)}});N.bind("splitter.resize",function(t){var e=N.position();"vertical"==N.orientation&&e>N.width()?e=N.width()-N.limit-1:"horizontal"==N.orientation&&e>N.height()&&(e=N.height()-N.limit-1),ed-u.limit?d-u.limit:a(u.position):"horizontal"==u.orientation&&(E=E>p-u.limit?p-u.limit:a(u.position)),E
    ').css("cursor",i.children().eq(1).css("cursor")).insertAfter(i),i.settings.onDragStart(e),!1}).bind("mouseup.splitter touchend.splitter touchleave.splitter touchcancel.splitter",function(e){i&&(t(".splitterMask").remove(),i.settings.onDragEnd(e),i=null)}).bind("mousemove.splitter touchmove.splitter",function(t){if(null!==i){var e=i.limit,n=i.offset();if("vertical"==i.orientation){var o=t.pageX;t.originalEvent&&t.originalEvent.changedTouches&&(o=t.originalEvent.changedTouches[0].pageX);var r=o-n.left;r<=i.limit?r=i.limit+1:r>=i.width()-e&&(r=i.width()-e-1),r>i.limit&&r=i.height()-e&&(a=i.height()-e-1),a>i.limit&&a0&&this._events[t].length>r&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),r||(r=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var r=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,r,A,a;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],A=n.length,r=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(n)){for(a=A;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;ne&&(e=r)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,o){e.push(c.default.createElement("button",{type:"button",key:o,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},c.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,o="modal-dialog"+(n?" modal-lg":"");return c.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},c.default.createElement("div",{className:o},c.default.createElement("div",{className:"modal-content"},c.default.createElement("div",{className:"modal-header"},c.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),c.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,c.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),c.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),c.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(l.Component);e.default=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var r=n(240),i=o(r);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new i.default.EventEmitter},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var o=n(373);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".tree li{list-style-type:none;margin:0;padding:2px 5px 0 0;position:relative;line-height:1}.tree li:after,.tree li:before{content:'';left:-35px;position:absolute;right:auto}.tree li:before{border-left:1px solid #999;bottom:50px;height:100%;top:-6px;width:1px}.tree li div li:before{border:none}.tree li:after{border-top:1px solid #999;height:20px;top:23px;width:15px}.tree li div li:after{border:none}.tree li{margin-top:-5px}.tree li span{border:1px solid transparent;display:inline-block;padding:2px;margin:10px 0 5px -20px;cursor:pointer;white-space:nowrap}.tree>ul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n ul > li");o.is(":visible")?(o.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(o.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var r=this.props.expandLevel;if(o._level>=r){var i=e.parent("li.parent_li").find(" > ul > li");i.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(o)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var o="treenodemenu"+t.id;e.contextmenu({target:"#"+o})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,o=e.dispatch,r=n.children,i="node-"+n.id,A="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(f.default,{items:n.contextMenu,key:n.id,data:n,dispatch:o,menuId:A})),r&&r.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:i},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(p.default,{dispatch:o,children:r,expandLevel:this.props.expandLevel}));var c=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:i,onClick:function(t){if(e){var o=window._server+n.editorPath+"?file="+n.fullPath;N.eventEmitter.emit(N.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:o,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+i).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof c?"undefined":l(c))?c.v:void 0}}]),e}(s.Component);e.default=E},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;nspan::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}",""]); +},,,,,,,,,function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e,n){return function(o){var r=window._server+"/frame/createFile",i=t+"."+e,A=n.fullPath+"/"+i;$.ajax({url:r,data:{path:encodeURI(n.fullPath+"/"+i),type:e},type:"POST",success:function(t){var e={id:t.id,name:i,type:t.type,fullPath:A,contextMenu:E()};T(e,1),o({parentNodeData:n,newFileData:e,type:Y});var r=window._server+e.editorPath+"?file="+e.fullPath;Q.eventEmitter.emit(Q.TREE_NODE_CLICK,{id:e.id,name:e.name,path:r,fullPath:A,active:!0}),B.eventEmitter.emit(B.EXPAND_TREE_NODE,n),B.eventEmitter.emit(B.CLOSE_CREATE_FILE_DIALOG)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function A(t,e){return function(n){var o=window._server+"/frame/fileRename";$.ajax({url:o,type:"POST",data:{path:t,newPath:e,classify:window._classify,projectName:window._projectName,types:window._types},success:function(t){var e=t.repo.rootFile;T(e,1),n({data:e,type:z}),B.eventEmitter.emit(B.HIDE_RENAME_DIALOG),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function a(t,e){return function(n){var o=window._server+"/frame/createProject";$.ajax({url:o,type:"POST",data:{newProjectName:t},success:function(t){T(t,1),n({type:O,newProjectData:t,parentNodeData:e}),B.eventEmitter.emit(B.CLOSE_NEW_PROJECT_DIALOG),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function l(t,e){var n=e.fullPath+"/"+t;return function(t){var e=window._server+"/frame/createFolder";$.ajax({url:e,type:"POST",data:{fullFolderName:n,classify:window._classify,projectName:window._projectName,types:window._types},success:function(e){var n=e.repo.rootFile;T(n,1),t({data:n,type:z}),B.eventEmitter.emit(B.CLOSE_CREATE_FOLDER_DIALOG),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function c(t,e){return function(n){var o=t.fullPath,r=o.lastIndexOf(t.name),i=o.substring(0,r),A=i+e,a=window._server+"/frame/fileRename";$.ajax({url:a,type:"POST",data:{path:o,newPath:A,classify:window._classify,projectName:window._projectName,types:window._types},success:function(o){var r=e.indexOf(".");if(r!==-1)t.fullPath=A,t.name=e,n({data:t,type:k});else{var i=o.repo.rootFile;T(i,1),n({data:i,type:z})}B.eventEmitter.emit(B.CLOSE_UPDATE_PROJECT_DIALOG),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}}function s(t,e,n){var o=window._server+"/frame/fileRename";$.ajax({url:o,type:"POST",data:{path:t,newPath:e,classify:window._classify,projectName:window._projectName,types:window._types},success:function(t){var e=t.repo.rootFile;T(e,1),n({data:e,type:z}),B.eventEmitter.emit(B.CLOSE_UPDATE_PROJECT_DIALOG),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function u(t){return{data:t,type:v}}function g(t){return{index:t,type:S}}function M(t,e){return{index:t,data:e,type:U}}function d(t,e,n,o){return null!==t&&"undefined"!==t||(t=!0),function(r){var i=window._server+"/frame/loadProjects";$.ajax({url:i,type:"POST",data:{classify:t,projectName:e,types:n,searchFileName:o},success:function(t){var e=t.classify,n=t.repo,o=n.rootFile,i=n.projectNames;B.eventEmitter.emit(B.CHANGE_CLASSIFY,e),i&&i.length>0&&B.eventEmitter.emit(B.PROJECT_LIST_CHANGE,i),T(o,1),r({data:o,type:z}),Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),t&&t.responseText?bootbox.alert("加载数据失败,服务端错误:"+t.responseText+""):bootbox.alert("加载数据失败,服务端出错")}})}}function p(t){var e=t.indexOf(":");e>-1&&(t=t.substring(0,e));var n=void 0;switch(t){case"vl.xml":n="变量库";break;case"cl.xml":n="常量库";break;case"pl.xml":n="参数库";break;case"al.xml":n="动作库";break;case"rs.xml":n="向导式决策集";break;case"ul":n="脚本式决策集";break;case"dt.xml":n="决策表";break;case"dts.xml":n="脚本式决策表";break;case"rl.xml":n="决策流";break;case"dtree.xml":n="决策树";break;case"sc":n="评分卡";break;case"知识包":n="package"}if(!n){var o="Unknow file type :"+t;throw alert(o),o}return n}function T(t,e){switch(t._level=e++,t.type){case"root":t._icon=L.default.frameStyle.getRootIcon(),t._style=L.default.frameStyle.getRootIconStyle(),t.contextMenu=[{name:"创建新项目",icon:"rf rf-createpro",click:function(t){B.eventEmitter.emit(B.OPEN_NEW_PROJECT_DIALOG,t)}},{name:"导入项目",icon:"rf rf-import",click:function(t){B.eventEmitter.emit(B.OPEN_IMPORT_PROJECT_DIALOG)}}];break;case"rule":t._icon=L.default.frameStyle.getRuleIcon(),t._style=L.default.frameStyle.getRuleIconStyle(),t.contextMenu=E(),t.editorPath="/ruleseteditor";break;case"project":t._icon=L.default.frameStyle.getProjectIcon(),t._style=L.default.frameStyle.getProjectIconStyle(),t.contextMenu=[{name:"导出项目备份",icon:"rf rf-export",click:function(t,e){bootbox.confirm("真的要导出项目"+t.name+"的备份文件吗?",function(e){if(e){var n=window._server+"/frame/exportProjectBackupFile?path="+encodeURI(encodeURI(t.fullPath));window.open(n,"_blank")}})}},{name:"修改项目名称",icon:"rf rf-rename",click:function(t){B.eventEmitter.emit(B.OPEN_UPDATE_PROJECT_DIALOG,t)}},{name:"删除项目",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("此操作将删除"+t.name+"项目及其下所有文件,你确定要这样做吗?",function(n){n&&x(t,e)})}},{name:"配置接收推送客户端",icon:"rf rf-operation",click:function(t,e){var n=window._server+"/clientconfig?project="+encodeURI(t.name);Q.eventEmitter.emit(Q.TREE_NODE_CLICK,{id:"client_config_",name:"推送客户端配置",fullPath:"client_config_/"+t.name,project:t.name,path:n})}}];break;case"resource":t._icon=L.default.frameStyle.getResourceIcon(),t._style=L.default.frameStyle.getResourceIconStyle();break;case"all":t._icon=L.default.frameStyle.getResourceIcon(),t._style=L.default.frameStyle.getResourceIconStyle(),t.contextMenu=I();break;case"folder":t._icon=L.default.frameStyle.getFolderIcon(),t._style=L.default.frameStyle.getFolderIconStyle(),t.contextMenu=I(!0,t.folderType);break;case"resourcePackage":t._icon=L.default.frameStyle.getResourcePackageIcon(),t._style=L.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=L.default.frameStyle.getLibIcon(),t._style=L.default.frameStyle.getLibIconStyle(),t.contextMenu=f();break;case"action":t._icon=L.default.frameStyle.getActionIcon(),t._style=L.default.frameStyle.getActionIconStyle(),t.contextMenu=E(),t.editorPath="/actioneditor";break;case"parameter":t._icon=L.default.frameStyle.getParameterIcon(),t._style=L.default.frameStyle.getParameterIconStyle(),t.contextMenu=E(),t.editorPath="/parametereditor";break;case"constant":t._icon=L.default.frameStyle.getConstantIcon(),t._style=L.default.frameStyle.getConstantIconStyle(),t.contextMenu=E(),t.editorPath="/constanteditor";break;case"variable":t._icon=L.default.frameStyle.getVariableIcon(),t._style=L.default.frameStyle.getVariableIconStyle(),t.contextMenu=E(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=L.default.frameStyle.getRuleLibIcon(),t._style=L.default.frameStyle.getRuleLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加向导式决策集",icon:L.default.frameStyle.getRuleIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"rs.xml",nodeData:t})}},{name:"添加脚本式决策集",icon:L.default.frameStyle.getUlIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"ul",nodeData:t})}}];break;case"decisionTableLib":t._icon=L.default.frameStyle.getDecisionTableLibIcon(),t._style=L.default.frameStyle.getDecisionTableLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策表",icon:L.default.frameStyle.getDecisionTableIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"dt.xml",nodeData:t})}}];break;case"decisionTreeLib":t._icon=L.default.frameStyle.getDecisionTreeLibIcon(),t._style=L.default.frameStyle.getDecisionTreeLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策树",icon:L.default.frameStyle.getDecisionTreeIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"dtree.xml",nodeData:t})}}];break;case"flowLib":t._icon=L.default.frameStyle.getFlowLibIcon(),t._style=L.default.frameStyle.getFlowLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加决策流",icon:L.default.frameStyle.getFlowIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"rl.xml",nodeData:t})}}];break;case"scorecardLib":t._icon=L.default.frameStyle.getScorecardLibIcon(),t._style=L.default.frameStyle.getScorecardLibIconStyle(),t.contextMenu=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加评分卡",icon:L.default.frameStyle.getScorecardIcon(),click:function(){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"sc",nodeData:t})}}];break;case"ul":t._icon=L.default.frameStyle.getUlIcon(),t._style=L.default.frameStyle.getUlIconStyle();var n=E();n.splice(0,1),t.contextMenu=n,t.editorPath="/uleditor";break;case"decisionTable":t._icon=L.default.frameStyle.getDecisionTableIcon(),t._style=L.default.frameStyle.getDecisionTableIconStyle(),t.contextMenu=E(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=L.default.frameStyle.getScriptDecisionTableIcon(),t._style=L.default.frameStyle.getScriptDecisionTableIconStyle(),t.contextMenu=E(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=L.default.frameStyle.getDecisionTreeIcon(),t._style=L.default.frameStyle.getDecisionTreeIconStyle(),t.contextMenu=E(),t.editorPath="/decisiontreeeditor";break;case"flow":t._icon=L.default.frameStyle.getFlowIcon(),t._style=L.default.frameStyle.getFlowIconStyle(),t.contextMenu=E(),t.editorPath="/ruleflowdesigner";break;case"scorecard":t._icon=L.default.frameStyle.getScorecardIcon(),t._style=L.default.frameStyle.getScorecardIconStyle(),t.contextMenu=E(),t.editorPath="/scorecardeditor"}var o=t.children;o&&o.forEach(function(t,n){T(t,e)})}function f(){var t=[{name:"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}},{name:"添加变量库",icon:L.default.frameStyle.getVariableIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"vl.xml",nodeData:t})}},{name:"添加常量库",icon:L.default.frameStyle.getConstantIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"cl.xml",nodeData:t})}},{name:"添加参数库",icon:L.default.frameStyle.getParameterIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"pl.xml",nodeData:t})}},{name:"添加动作库",icon:L.default.frameStyle.getActionIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"al.xml",nodeData:t})}}];return t}function I(t,e){var n=[{name:t?"添加子目录":"添加目录",icon:L.default.frameStyle.getFolderIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FOLDER_DIALOG,{nodeData:t})}}],o=!1;return e&&"all"!==e&&"lib"!==e||(n.push({name:"添加变量库",icon:L.default.frameStyle.getVariableIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"vl.xml",nodeData:t})}},{name:"添加常量库",icon:L.default.frameStyle.getConstantIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"cl.xml",nodeData:t})}},{name:"添加参数库",icon:L.default.frameStyle.getParameterIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"pl.xml",nodeData:t})}},{name:"添加动作库",icon:L.default.frameStyle.getActionIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"al.xml",nodeData:t})}}),o||(n.push(N()),o=!0)),e&&"all"!==e&&"ruleLib"!==e||(n.push({name:"添加向导式决策集",icon:L.default.frameStyle.getRuleIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"rs.xml",nodeData:t})}},{name:"添加脚本式决策集",icon:L.default.frameStyle.getUlIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"ul",nodeData:t})}}),o||(n.push(N()),o=!0)),e&&"all"!==e&&"decisionTableLib"!==e||(n.push.apply(n,[{name:"添加决策表",icon:L.default.frameStyle.getDecisionTableIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"dt.xml",nodeData:t})}}]),o||(n.push(N()),o=!0)),e&&"all"!==e&&"decisionTreeLib"!==e||(n.push({name:"添加决策树",icon:L.default.frameStyle.getDecisionTreeIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"dtree.xml",nodeData:t})}}),o||(n.push(N()),o=!0)),e&&"all"!==e&&"scorecardLib"!==e||n.push({name:"添加评分卡",icon:L.default.frameStyle.getScorecardIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"sc",nodeData:t})}}),e&&"all"!==e&&"flowLib"!==e||(n.push({name:"添加决策流",icon:L.default.frameStyle.getFlowIcon(),click:function(t,e){B.eventEmitter.emit(B.OPEN_CREATE_FILE_DIALOG,{fileType:"rl.xml",nodeData:t})}}),o||(n.push(N()),o=!0)),t&&(n.push({name:"删除",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("删除目录["+t.name+"],将会同时删除其下所有子目录及文件,确认吗?",function(n){n&&x(t,e,!0)})}},{name:"修改目录名",icon:"rf rf-rename",click:function(t,e){B.eventEmitter.emit(B.SHOW_RENAME_DIALOG,t)}},{name:"锁定目录",icon:"rf rf-lock",click:function(t,e){h(t.fullPath,e)}},{name:"解锁目录",icon:"rf rf-unlock",click:function(t,e){w(t.fullPath,e)}}),o||(n.push(N()),o=!0)),n}function N(){return{name:"粘贴文件",icon:"rf rf-paste",click:function(t,e){var n=window.___cutFileData,o=!1;if(n||(n=window.___copyFileData,o=!0),!n)return void bootbox.alert("没有文件可供粘贴!");var r=t.fullPath,i=r+"/"+n.name,A=n.fullPath;if(A===i)return void bootbox.alert("目录未改变,不能进行此操作!");var a="真的要移动文件【"+n.name+"】到【"+r+"】目录吗?";o&&(a="真的要复制文件【"+n.name+"】到【"+r+"】目录吗?"),bootbox.confirm(a,function(t){t&&(window.___cutFileData=null,window.___copyFileData=null,o?$.ajax({url:window._server+"/frame/copyFile",type:"POST",data:{newFullPath:i,oldFullPath:A},success:function(t){var n=t.repo.rootFile;T(n,1),e({data:n,type:z})},error:function(t){t&&t.responseText?bootbox.alert("复制文件操作失败,服务端错误:"+t.responseText+""):bootbox.alert("复制文件操作失败,服务端出错")}}):s(A,i,e))})}}}function E(){return[{name:"查看源码",icon:"rf rf-code",click:function(t,e){D(t)}},{name:"查看版本信息",icon:"rf rf-version",click:function(t,e){y(t)}},{name:"删除文件",icon:"rf rf-remove",click:function(t,e){bootbox.confirm("真的要删除["+t.name+"]文件吗?",function(n){n&&x(t,e)})}},{name:"修改文件名",icon:"rf rf-rename",click:function(t,e){B.eventEmitter.emit(B.SHOW_RENAME_DIALOG,t)}},{name:"复制文件",icon:"rf rf-copy",click:function(t,e){window.___copyFileData=t,window.___cutFileData=null}},{name:"剪切文件",icon:"rf rf-cut",click:function(t,e){window.___cutFileData=t,window.___copyFileData=null}},{name:"锁定文件",icon:"rf rf-lock",click:function(t,e){h(t.fullPath,e)}},{name:"解锁文件",icon:"rf rf-unlock",click:function(t,e){w(t.fullPath,e)}}]}function h(t,e){Q.eventEmitter.emit(Q.SHOW_LOADING);var n=window._server+"/frame/lockFile";$.ajax({url:n,type:"POST",data:{file:t},success:function(t){var n=t.repo.rootFile;T(n,1),e({data:n,type:z}),Q.eventEmitter.emit(Q.HIDE_LOADING),bootbox.alert("锁定成功!")},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function w(t,e){Q.eventEmitter.emit(Q.SHOW_LOADING);var n=window._server+"/frame/unlockFile";$.ajax({url:n,type:"POST",data:{file:t},success:function(t){var n=t.repo.rootFile;T(n,1),e({data:n,type:z}),Q.eventEmitter.emit(Q.HIDE_LOADING),bootbox.alert("解锁成功!")},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function C(t,e){var n=window._server+"/common/saveFile";$.ajax({url:n,type:"POST",data:{file:t,content:e},success:function(){bootbox.alert("保存成功!")},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function D(t){var e=window._server+"/frame/fileSource";$.ajax({url:e,type:"POST",data:{path:t.fullPath},success:function(e){B.eventEmitter.emit(B.OPEN_SOURCE_DIALOG,t.fullPath,e.content)},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function y(t){var e=window._server+"/frame/fileVersions";$.ajax({url:e,type:"POST",data:{path:t.fullPath},success:function(e){B.eventEmitter.emit(B.OPEN_FILE_VERSION_DIALOG,{list:e,data:t})},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function x(t,e,n){Q.eventEmitter.emit(Q.SHOW_LOADING),setTimeout(function(){var o=window._server+"/frame/deleteFile";$.ajax({url:o,type:"POST",data:{isFolder:n,path:t.fullPath,classify:window._classify,projectName:window._projectName,types:window._types},success:function(o){if(n){var r=o.repo.rootFile;T(r,1),e({data:r,type:z})}else e({data:t,type:S});Q.eventEmitter.emit(Q.HIDE_LOADING)},error:function(t){Q.eventEmitter.emit(Q.HIDE_LOADING),401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})},150)}Object.defineProperty(e,"__esModule",{value:!0}),e.CREATE_NEW_FILE=e.CREATE_NEW_PROJECT=e.FILE_RENAME=e.LOAD_END=e.UPDATE=e.DEL=e.ADD=void 0,e.createNewFile=i,e.rename=A,e.createNewProject=a,e.createNewFolder=l,e.fileRename=c,e.add=u,e.del=g,e.update=M,e.loadData=d,e.buildType=p,e.lockFile=h,e.unlockFile=w,e.saveFileSource=C,e.seeFileSource=D;var m=n(228),L=r(m),b=n(401),B=o(b),j=n(339),Q=o(j),v=e.ADD="add",S=e.DEL="del",U=e.UPDATE="upload",z=e.LOAD_END="load_end",k=e.FILE_RENAME="file_rename",O=e.CREATE_NEW_PROJECT="create_new_project",Y=e.CREATE_NEW_FILE="create_new_file"},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.CHANGE_CLASSIFY=e.CLOSE_FILE_VERSION_DIALOG=e.OPEN_FILE_VERSION_DIALOG=e.CLOSE_SOURCE_DIALOG=e.OPEN_SOURCE_DIALOG=e.CLOSE_IMPORT_PROJECT_DIALOG=e.OPEN_IMPORT_PROJECT_DIALOG=e.PROJECT_FILTER_CHANGE=e.PROJECT_LIST_CHANGE=e.HIDE_RENAME_DIALOG=e.SHOW_RENAME_DIALOG=e.EXPAND_TREE_NODE=e.CLOSE_CREATE_FOLDER_DIALOG=e.OPEN_CREATE_FOLDER_DIALOG=e.CLOSE_CREATE_FILE_DIALOG=e.OPEN_CREATE_FILE_DIALOG=e.CLOSE_UPDATE_PROJECT_DIALOG=e.OPEN_UPDATE_PROJECT_DIALOG=e.CLOSE_NEW_PROJECT_DIALOG=e.OPEN_NEW_PROJECT_DIALOG=e.DIALOG_CONTNET_CHANGE=e.CLOSE_DIALOG=e.OPEN_DIALOG=void 0;var r=n(240),i=o(r);e.OPEN_DIALOG="open_dialog",e.CLOSE_DIALOG="close_dialog",e.DIALOG_CONTNET_CHANGE="dialog_content_change",e.OPEN_NEW_PROJECT_DIALOG="open_new_project_dialog",e.CLOSE_NEW_PROJECT_DIALOG="close_new_project_dialog",e.OPEN_UPDATE_PROJECT_DIALOG="open_update_project_dialog",e.CLOSE_UPDATE_PROJECT_DIALOG="close_update_project_dialog",e.OPEN_CREATE_FILE_DIALOG="create_file_dialog",e.CLOSE_CREATE_FILE_DIALOG="close_file_dialog",e.OPEN_CREATE_FOLDER_DIALOG="create_folder_dialog",e.CLOSE_CREATE_FOLDER_DIALOG="close_folder_dialog",e.EXPAND_TREE_NODE="expand_tree_node",e.SHOW_RENAME_DIALOG="SHOW_RENAME_DIALOG",e.HIDE_RENAME_DIALOG="HIDE_RENAME_DIALOG",e.PROJECT_LIST_CHANGE="project_list_change",e.PROJECT_FILTER_CHANGE="project_filter_change",e.OPEN_IMPORT_PROJECT_DIALOG="open_import_project_dialog",e.CLOSE_IMPORT_PROJECT_DIALOG="close_import_project_dialog",e.OPEN_SOURCE_DIALOG="open_source_dialog",e.CLOSE_SOURCE_DIALOG="close_source_dialog",e.OPEN_FILE_VERSION_DIALOG="open_file_version_dialog",e.CLOSE_FILE_VERSION_DIALOG="close_file_version_dialog",e.CHANGE_CLASSIFY="change_classify",e.eventEmitter=new i.default.EventEmitter},,,,,function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function o(t,e,n,o){var r=document.createElement(t);if(n&&(r.className=n),o&&(r.style.cssText=o),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var i=0;i=e)return A+(e-i);A+=a-i,A+=n-A%n,i=a+1}}function u(){this.id=null}function g(t,e){for(var n=0;n=e)return o+Math.min(A,e-r);if(r+=i-o,r+=n-r%n,o=i+1,r>=e)return o}}function d(t){for(;SA.length<=t;)SA.push(p(SA)+" ");return SA[t]}function p(t){return t[t.length-1]}function T(t,e){for(var n=[],o=0;o"€"&&(t.toUpperCase()!=t.toLowerCase()||UA.test(t))}function h(t,e){return e?!!(e.source.indexOf("\\w")>-1&&E(t))||e.test(t):E(t)}function w(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function C(t){return t.charCodeAt(0)>=768&&zA.test(t)}function D(t,e,n){var r=this;this.input=n,r.scrollbarFiller=o("div",null,"CodeMirror-scrollbar-filler"),r.scrollbarFiller.setAttribute("cm-not-content","true"),r.gutterFiller=o("div",null,"CodeMirror-gutter-filler"),r.gutterFiller.setAttribute("cm-not-content","true"),r.lineDiv=o("div",null,"CodeMirror-code"),r.selectionDiv=o("div",null,null,"position: relative; z-index: 1"),r.cursorDiv=o("div",null,"CodeMirror-cursors"),r.measure=o("div",null,"CodeMirror-measure"),r.lineMeasure=o("div",null,"CodeMirror-measure"),r.lineSpace=o("div",[r.measure,r.lineMeasure,r.selectionDiv,r.cursorDiv,r.lineDiv],null,"position: relative; outline: none"),r.mover=o("div",[o("div",[r.lineSpace],"CodeMirror-lines")],null,"position: relative"),r.sizer=o("div",[r.mover],"CodeMirror-sizer"),r.sizerWidth=null,r.heightForcer=o("div",null,null,"position: absolute; height: "+bA+"px; width: 1px;"),r.gutters=o("div",null,"CodeMirror-gutters"),r.lineGutter=null,r.scroller=o("div",[r.sizer,r.heightForcer,r.gutters],"CodeMirror-scroll"),r.scroller.setAttribute("tabIndex","-1"),r.wrapper=o("div",[r.scrollbarFiller,r.gutterFiller,r.scroller],"CodeMirror"),aA&&lA<8&&(r.gutters.style.zIndex=-1,r.scroller.style.paddingRight=0),cA||rA&&fA||(r.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(r.wrapper):t(r.wrapper)),r.viewFrom=r.viewTo=e.first,r.reportedViewFrom=r.reportedViewTo=e.first,r.view=[],r.renderedView=null,r.externalMeasured=null,r.viewOffset=0,r.lastWrapHeight=r.lastWrapWidth=0,r.updateLineNumbers=null,r.nativeBarWidth=r.barHeight=r.barWidth=0,r.scrollbarsClipped=!1,r.lineNumWidth=r.lineNumInnerWidth=r.lineNumChars=null,r.alignWidgets=!1,r.cachedCharWidth=r.cachedTextHeight=r.cachedPaddingH=null,r.maxLine=null,r.maxLineLength=0,r.maxLineChanged=!1,r.wheelDX=r.wheelDY=r.wheelStartX=r.wheelStartY=null,r.shift=!1,r.selForContextMenu=null,r.activeTouch=null,n.init(r)}function y(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(e=t.first&&en?v(n,y(t,n).text.length):R(e,y(t,e.line).text.length)}function R(t,e){var n=t.ch;return null==n||n>e?v(t.line,e):n<0?v(t.line,0):t}function F(t,e){for(var n=[],o=0;o=e:i.to>e);(o||(o=[])).push(new P(A,i.from,l?null:i.to))}}return o}function Z(t,e,n){var o;if(t)for(var r=0;r=e:i.to>e);if(a||i.from==e&&"bookmark"==A.type&&(!n||i.marker.insertLeft)){var l=null==i.from||(A.inclusiveLeft?i.from<=e:i.from0&&a)for(var h=0;h0)){var s=[l,1],u=S(c.from,a.from),M=S(c.to,a.to);(u<0||!A.inclusiveLeft&&!u)&&s.push({from:c.from,to:a.from}),(M>0||!A.inclusiveRight&&!M)&&s.push({from:a.to,to:c.to}),r.splice.apply(r,s),l+=s.length-1}}return r}function $(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&u<=0||s<=0&&u>=0)&&(s<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?S(c.to,n)>=0:S(c.to,n)>0)||s>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?S(c.from,o)<=0:S(c.from,o)<0)))return!0}}}function lt(t){for(var e;e=it(t);)t=e.find(-1,!0).line;return t}function ct(t){for(var e,n;e=At(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function st(t,e){var n=y(t,e),o=lt(n);return n==o?e:b(o)}function ut(t,e){if(e>t.lastLine())return e;var n,o=y(t,e);if(!gt(t,o))return e;for(;n=At(o);)o=n.find(1,!0).line;return b(o)+1}function gt(t,e){var n=OA&&e.markedSpans;if(n)for(var o=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function ft(t,e,n,o){if(!t)return o(e,n,"ltr");for(var r=!1,i=0;ie||e==n&&A.to==e)&&(o(Math.max(A.from,e),Math.min(A.to,n),1==A.level?"rtl":"ltr"),r=!0)}r||o(e,n,"ltr")}function It(t){return t.level%2?t.to:t.from}function Nt(t){return t.level%2?t.from:t.to}function Et(t){var e=mt(t);return e?It(e[0]):0}function ht(t){var e=mt(t);return e?Nt(p(e)):t.text.length}function wt(t,e,n){var o=t[0].level;return e==o||n!=o&&ee)return o;if(r.from==e||r.to==e){if(null!=n)return wt(t,r.level,t[n].level)?(r.from!=r.to&&(YA=n),o):(r.from!=r.to&&(YA=o),n);n=o}}return n}function Dt(t,e,n,o){if(!o)return e+n;do e+=n;while(e>0&&C(t.text.charAt(e)));return e}function yt(t,e,n,o){var r=mt(t);if(!r)return xt(t,e,n,o);for(var i=Ct(r,e),A=r[i],a=Dt(t,e,A.level%2?-n:n,o);;){if(a>A.from&&a0==A.level%2?A.to:A.from);if(A=r[i+=n],!A)return null;a=n>0==A.level%2?Dt(t,A.to,-1,o):Dt(t,A.from,1,o)}}function xt(t,e,n,o){var r=e+n;if(o)for(;r>0&&C(t.text.charAt(r));)r+=n;return r<0||r>t.text.length?null:r}function mt(t){var e=t.order;return null==e&&(e=t.order=RA(t.text)),e}function Lt(t,e){return t._handlers&&t._handlers[e]||FA}function bt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var o=t._handlers,r=o&&o[e];if(r){var i=g(r,n);i>-1&&(o[e]=r.slice(0,i).concat(r.slice(i+1)))}}}function Bt(t,e){var n=Lt(t,e);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),r=0;r0}function St(t){t.prototype.on=function(t,e){HA(this,t,e)},t.prototype.off=function(t,e){bt(this,t,e)}}function Ut(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function zt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function kt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Ot(t){Ut(t),zt(t)}function Yt(t){return t.target||t.srcElement}function Rt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),IA&&t.ctrlKey&&1==e&&(e=3),e}function Ft(t){if(null==mA){var e=o("span","​");n(t,o("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(mA=e.offsetWidth<=1&&e.offsetHeight>2&&!(aA&&lA<8))}var r=mA?o("span","​"):o("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return r.setAttribute("cm-text",""),r}function Ht(t){if(null!=LA)return LA;var o=n(t,document.createTextNode("AخA")),r=wA(o,0,1).getBoundingClientRect(),i=wA(o,1,2).getBoundingClientRect();return e(t),!(!r||r.left==r.right)&&(LA=i.right-r.right<3)}function Vt(t){if(null!=WA)return WA;var e=n(t,o("span","x")),r=e.getBoundingClientRect(),i=wA(e,0,1).getBoundingClientRect();return WA=Math.abs(r.left-i.left)>1}function Pt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),JA[t]=e}function Gt(t,e){ZA[t]=e}function Xt(t){if("string"==typeof t&&ZA.hasOwnProperty(t))t=ZA[t];else if(t&&"string"==typeof t.name&&ZA.hasOwnProperty(t.name)){var e=ZA[t.name];"string"==typeof e&&(e={name:e}),t=N(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Xt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Xt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Wt(t,e){e=Xt(e);var n=JA[e.name];if(!n)return Wt(t,"text/plain");var o=n(t,e);if(KA.hasOwnProperty(e.name)){var r=KA[e.name];for(var i in r)r.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(o["_"+i]=o[i]),o[i]=r[i])}if(o.name=e.name,e.helperType&&(o.helperType=e.helperType),e.modeProps)for(var A in e.modeProps)o[A]=e.modeProps[A];return o}function Jt(t,e){var n=KA.hasOwnProperty(t)?KA[t]:KA[t]={};c(e,n)}function Zt(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var n={};for(var o in e){var r=e[o];r instanceof Array&&(r=r.concat([])),n[o]=r}return n}function Kt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e),n&&n.mode!=t);)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _t(t,e,n){return!t.startState||t.startState(e,n)}function qt(t,e,n,o){var r=[t.state.modeGen],i={};Ae(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},i,o);for(var A=function(n){var o=t.state.overlays[n],A=1,a=0;Ae(t,e.text,o.mode,!0,function(t,e){for(var n=A;at&&r.splice(A,1,t,r[A+1],i),A+=2,a=Math.min(t,i)}if(e)if(o.opaque)r.splice(n,A-n,t,"overlay "+e),A=n+2;else for(;nt.options.maxHighlightLength?Zt(t.doc.mode,o):o);e.stateAfter=o,e.styles=r.styles,r.classes?e.styleClasses=r.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function te(t,e,n){var o=t.doc,r=t.display;if(!o.mode.startState)return!0;var i=ae(t,e,n),A=i>o.first&&y(o,i-1).stateAfter;return A=A?Zt(o.mode,A):_t(o.mode),o.iter(i,e,function(n){ee(t,n.text,A);var a=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return i}throw new Error("Mode "+t.name+" failed to advance stream.")}function re(t,e,n,o){var r,i=function(t){return{start:u.start,end:u.pos,string:u.current(),type:r||null,state:t?Zt(A.mode,s):s}},A=t.doc,a=A.mode;e=Y(A,e);var l,c=y(A,e.line),s=te(t,e.line,n),u=new _A(c.text,t.options.tabSize);for(o&&(l=[]);(o||u.post.options.maxHighlightLength?(a=!1,A&&ee(t,e,o,u.pos),u.pos=e.length,l=null):l=ie(oe(n,u,o,g),i),g){var M=g[0].name;M&&(l="m-"+(l?M+" "+l:M))}if(!a||s!=l){for(;cA;--a){if(a<=i.first)return i.first;var l=y(i,a-1);if(l.stateAfter&&(!n||a<=i.frontier))return a;var c=s(l.text,null,t.options.tabSize);(null==r||o>c)&&(r=a-1,o=c)}return r}function le(t,e,n){this.text=t,tt(this,e),this.height=n?n(this):1}function ce(t,e,n,o){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),$(t),tt(t,n);var r=o?o(t):1;r!=t.height&&L(t,r)}function se(t){t.parent=null,$(t)}function ue(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?ta:$A;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function ge(t,e){var n=o("span",null,null,cA?"padding-right: .1px":null),r={pre:o("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(aA||cA)&&t.getOption("lineWrapping")};e.measure={};for(var i=0;i<=(e.rest?e.rest.length:0);i++){var A=i?e.rest[i-1]:e.line,l=void 0;r.pos=0,r.addToken=de,Ht(t.display.measure)&&(l=mt(A))&&(r.addToken=Te(r.addToken,l)),r.map=[];var c=e!=t.display.externalMeasured&&b(A);Ie(A,r,$t(t,A,c)),A.styleClasses&&(A.styleClasses.bgClass&&(r.bgClass=a(A.styleClasses.bgClass,r.bgClass||"")),A.styleClasses.textClass&&(r.textClass=a(A.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(Ft(t.display.measure))),0==i?(e.measure.map=r.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(r.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(cA){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return Bt(t,"renderLine",t,e.line,r.pre),r.pre.className&&(r.textClass=a(r.pre.className,r.textClass||"")),r}function Me(t){var e=o("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function de(t,e,n,r,i,A,a){if(e){var l,c=t.splitSpaces?pe(e,t.trailingSpace):e,s=t.cm.state.specialChars,u=!1;if(s.test(e)){l=document.createDocumentFragment();for(var g=0;;){s.lastIndex=g;var M=s.exec(e),p=M?M.index-g:e.length-g;if(p){var T=document.createTextNode(c.slice(g,g+p));aA&&lA<9?l.appendChild(o("span",[T])):l.appendChild(T),t.map.push(t.pos,t.pos+p,T),t.col+=p,t.pos+=p}if(!M)break;g+=p+1;var f=void 0;if("\t"==M[0]){var I=t.cm.options.tabSize,N=I-t.col%I;f=l.appendChild(o("span",d(N),"cm-tab")),f.setAttribute("role","presentation"),f.setAttribute("cm-text","\t"),t.col+=N}else"\r"==M[0]||"\n"==M[0]?(f=l.appendChild(o("span","\r"==M[0]?"␍":"␤","cm-invalidchar")),f.setAttribute("cm-text",M[0]),t.col+=1):(f=t.cm.options.specialCharPlaceholder(M[0]),f.setAttribute("cm-text",M[0]),aA&&lA<9?l.appendChild(o("span",[f])):l.appendChild(f),t.col+=1);t.map.push(t.pos,t.pos+1,f),t.pos++}}else t.col+=e.length,l=document.createTextNode(c),t.map.push(t.pos,t.pos+e.length,l),aA&&lA<9&&(u=!0),t.pos+=e.length;if(t.trailingSpace=32==c.charCodeAt(e.length-1),n||r||i||u||a){var E=n||"";r&&(E+=r),i&&(E+=i);var h=o("span",[l],E,a);return A&&(h.title=A),t.content.appendChild(h)}t.content.appendChild(l)}}function pe(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,o="",r=0;rc&&u.from<=c));g++);if(u.to>=s)return t(n,o,r,i,A,a,l);t(n,o.slice(0,u.to-c),r,i,null,a,l),i=null,o=o.slice(u.to-c),c=u.to}}}function fe(t,e,n,o){var r=!o&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!o&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function Ie(t,e,n){var o=t.markedSpans,r=t.text,i=0;if(o)for(var A,a,l,c,s,u,g,M=r.length,d=0,p=1,T="",f=0;;){if(f==d){l=c=s=u=a="",g=null,f=1/0;for(var I=[],N=void 0,E=0;Ed||w.collapsed&&h.to==d&&h.from==d)?(null!=h.to&&h.to!=d&&f>h.to&&(f=h.to,c=""),w.className&&(l+=" "+w.className),w.css&&(a=(a?a+";":"")+w.css),w.startStyle&&h.from==d&&(s+=" "+w.startStyle),w.endStyle&&h.to==f&&(N||(N=[])).push(w.endStyle,h.to),w.title&&!u&&(u=w.title),w.collapsed&&(!g||ot(g.marker,w)<0)&&(g=h)):h.from>d&&f>h.from&&(f=h.from)}if(N)for(var C=0;C=M)break;for(var y=Math.min(M,f);;){if(T){var x=d+T.length;if(!g){var m=x>y?T.slice(0,y-d):T;e.addToken(e,m,A?A+l:l,s,d+m.length==f?c:"",u,a)}if(x>=y){T=T.slice(y-d),d=y;break}d=x,s=""}T=r.slice(i,i=n[p++]),A=ue(n[p++],e.cm.options)}}else for(var L=1;L2&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}function We(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var o=0;on)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function Je(t,e){e=lt(e);var o=b(e),r=t.display.externalMeasured=new Ne(t.doc,e,o);r.lineN=o;var i=r.built=ge(t,r);return r.text=i.pre,n(t.display.lineMeasure,i.pre),r}function Ze(t,e,n,o){return qe(t,_e(t,e),n,o)}function Ke(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(i=l-a,r=i-1,e>=l&&(A="right")),null!=r){if(o=t[c+2],a==l&&n==(o.insertLeft?"left":"right")&&(A=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)o=t[(c-=3)+2],A="left";if("right"==n&&r==l-a)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function en(t,e,n,o){var r,i=$e(e.map,n,o),A=i.node,a=i.start,l=i.end,c=i.collapse;if(3==A.nodeType){for(var s=0;s<4;s++){for(;a&&C(e.line.text.charAt(i.coverStart+a));)--a;for(;i.coverStart+l0&&(c=o="right");var u;r=t.options.lineWrapping&&(u=A.getClientRects()).length>1?u["right"==o?u.length-1:0]:A.getBoundingClientRect()}if(aA&&lA<9&&!a&&(!r||!r.left&&!r.right)){var g=A.parentNode.getClientRects()[0];r=g?{left:g.left,right:g.left+In(t.display),top:g.top,bottom:g.bottom}:oa}for(var M=r.top-e.rect.top,d=r.bottom-e.rect.top,p=(M+d)/2,T=e.view.measure.heights,f=0;fn.from?A(t-1):A(t,o)}o=o||y(t.doc,e.line),r||(r=_e(t,o));var l=mt(o),c=e.ch;if(!l)return A(c);var s=Ct(l,c),u=a(c,s);return null!=YA&&(u.other=a(c,YA)),u}function Mn(t,e){var n=0;e=Y(t.doc,e),t.options.lineWrapping||(n=In(t.display)*e.ch);var o=y(t.doc,e.line),r=dt(o)+Re(t.display);return{left:n,right:n,top:r,bottom:r+o.height}}function dn(t,e,n,o){var r=v(t,e);return r.xRel=o,n&&(r.outside=!0),r}function pn(t,e,n){var o=t.doc;if(n+=t.display.viewOffset,n<0)return dn(o.first,0,!0,-1);var r=B(o,n),i=o.first+o.size-1;if(r>i)return dn(o.first+o.size-1,y(o,i).text.length,!0,1);e<0&&(e=0);for(var A=y(o,r);;){var a=Tn(t,A,r,e,n),l=At(A),c=l&&l.find(0,!0);if(!l||!(a.ch>c.from.ch||a.ch==c.from.ch&&a.xRel>0))return a;r=b(A=c.to.line)}}function Tn(t,e,n,o,r){function i(o){var r=gn(t,v(n,o),"line",e,c);return a=!0,A>r.bottom?r.left-l:AT)return dn(n,M,f,1);for(;;){if(s?M==g||M==yt(e,g,1):M-g<=1){var I=o0&&I1){var h=qe(t,c,I,"right");A<=h.bottom&&A>=h.top&&Math.abs(o-h.right)1?1:0);return w}var D=Math.ceil(u/2),y=g+D;if(s){y=g;for(var x=0;xo?(M=y,T=m,(f=a)&&(T+=1e3),u=D):(g=y,d=m,p=a,u-=D)}}function fn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qA){qA=o("pre");for(var r=0;r<49;++r)qA.appendChild(document.createTextNode("x")),qA.appendChild(o("br"));qA.appendChild(document.createTextNode("x"))}n(t.measure,qA);var i=qA.offsetHeight/50;return i>3&&(t.cachedTextHeight=i),e(t.measure),i||1}function In(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=o("span","xxxxxxxxxx"),r=o("pre",[e]);n(t.measure,r);var i=e.getBoundingClientRect(),A=(i.right-i.left)/10;return A>2&&(t.cachedCharWidth=A),A||10}function Nn(t){for(var e=t.display,n={},o={},r=e.gutters.clientLeft,i=e.gutters.firstChild,A=0;i;i=i.nextSibling,++A)n[t.options.gutters[A]]=i.offsetLeft+i.clientLeft+r,o[t.options.gutters[A]]=i.clientWidth;return{fixedPos:En(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperWidth:e.wrapper.clientWidth}}function En(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function hn(t){var e=fn(t.display),n=t.options.lineWrapping,o=n&&Math.max(5,t.display.scroller.clientWidth/In(t.display)-3);return function(r){if(gt(t.doc,r))return 0;var i=0;if(r.widgets)for(var A=0;A=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,o=0;o=t.display.viewTo||a.to().line3&&(r(M,p.top,null,p.bottom),M=s,p.bottoml.bottom||c.bottom==l.bottom&&c.right>l.right)&&(l=c),M0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Bn(t){t.state.focused||(t.display.input.focus(),Qn(t))}function jn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,vn(t))},100)}function Qn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Bt(t,"focus",t,e),t.state.focused=!0,A(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),cA&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),bn(t))}function vn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Bt(t,"blur",t,e),t.state.focused=!1,yA(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function Sn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var o=En(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,i=o+"px",A=0;A.001||l<-.001)&&(L(r.line,i),kn(r.line),r.rest))for(var c=0;c=A&&(i=B(e,dt(y(e,l))-t.wrapper.clientHeight),A=l)}return{from:i,to:Math.max(A,i+1)}}function Yn(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,rA||Lo(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),rA&&Lo(t),wo(t,100))}function Rn(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,Sn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Fn(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Hn(t){var e=Fn(t);return e.x*=ia,e.y*=ia,e}function Vn(t,e){var n=Fn(e),o=n.x,r=n.y,i=t.display,A=i.scroller,a=A.scrollWidth>A.clientWidth,l=A.scrollHeight>A.clientHeight;if(o&&a||r&&l){if(r&&IA&&cA)t:for(var c=e.target,s=i.view;c!=A;c=c.parentNode)for(var u=0;u(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!pA){var A=o("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Re(t.display))+"px;\n height: "+(e.bottom-e.top+Ve(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(A),A.scrollIntoView(i),t.display.lineSpace.removeChild(A)}}}function _n(t,e,n,o){null==o&&(o=0);for(var r,i=0;i<5;i++){var A=!1;r=gn(t,e);var a=n&&n!=e?gn(t,n):r,l=$n(t,Math.min(r.left,a.left),Math.min(r.top,a.top)-o,Math.max(r.left,a.left),Math.max(r.bottom,a.bottom)+o),c=t.doc.scrollTop,s=t.doc.scrollLeft;if(null!=l.scrollTop&&(Yn(t,l.scrollTop),Math.abs(t.doc.scrollTop-c)>1&&(A=!0)),null!=l.scrollLeft&&(Rn(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-s)>1&&(A=!0)),!A)break}return r}function qn(t,e,n,o,r){var i=$n(t,e,n,o,r);null!=i.scrollTop&&Yn(t,i.scrollTop),null!=i.scrollLeft&&Rn(t,i.scrollLeft)}function $n(t,e,n,o,r){var i=t.display,A=fn(t.display);n<0&&(n=0);var a=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:i.scroller.scrollTop,l=Ge(t),c={};r-n>l&&(r=n+l);var s=t.doc.height+Fe(i),u=ns-A;if(na+l){var M=Math.min(n,(g?s:r)-l);M!=a&&(c.scrollTop=M)}var d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:i.scroller.scrollLeft,p=Pe(t)-(t.options.fixedGutter?i.gutters.offsetWidth:0),T=o-e>p;return T&&(o=e+p),e<10?c.scrollLeft=0:ep+d-3&&(c.scrollLeft=o+(T?0:10)-p),c}function to(t,e,n){null==e&&null==n||no(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function eo(t){no(t);var e=t.getCursor(),n=e,o=e;t.options.lineWrapping||(n=e.ch?v(e.line,e.ch-1):e,o=v(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:o,margin:t.options.cursorScrollMargin,isCursor:!0}}function no(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=Mn(t,e.from),o=Mn(t,e.to),r=$n(t,Math.min(n.left,o.left),Math.min(n.top,o.top)-e.margin,Math.max(n.right,o.right),Math.max(n.bottom,o.bottom)+e.margin);t.scrollTo(r.scrollLeft,r.scrollTop)}}function oo(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++aa},he(t.curOp)}function ro(t){var e=t.curOp;Ce(e,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Do(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function ao(t){t.updatedDisplay=t.mustUpdate&&xo(t.cm,t.update)}function lo(t){var e=t.cm,n=e.display;t.updatedDisplay&&zn(e),t.barMeasure=Pn(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ze(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Ve(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Pe(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function co(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)OA&&st(t.doc,e)r.viewFrom?Io(t):(r.viewFrom+=o,r.viewTo+=o);else if(e<=r.viewFrom&&n>=r.viewTo)Io(t);else if(e<=r.viewFrom){var i=No(t,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):Io(t)}else if(n>=r.viewTo){var A=No(t,e,e,-1);A?(r.view=r.view.slice(0,A.index),r.viewTo=A.lineN):Io(t)}else{var a=No(t,e,e,-1),l=No(t,n,n+o,1);a&&l?(r.view=r.view.slice(0,a.index).concat(Ee(t,a.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=o):Io(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=o.viewTo)){var i=o.view[Dn(t,e)];if(null!=i.node){var A=i.changes||(i.changes=[]);g(A,n)==-1&&A.push(n)}}}function Io(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function No(t,e,n,o){var r,i=Dn(t,e),A=t.display.view;if(!OA||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var a=t.display.viewFrom,l=0;l0){if(i==A.length-1)return null;r=a+A[i].size-e,i++}else r=a-e;e+=r,n+=r}for(;st(t.doc,n)!=n;){if(i==(o<0?0:A.length-1))return null;n+=o*A[i-(o<0?1:0)].size,i+=o}return{index:i,lineN:n}}function Eo(t,e,n){var o=t.display,r=o.view;0==r.length||e>=o.viewTo||n<=o.viewFrom?(o.view=Ee(t,e,n),o.viewFrom=e):(o.viewFrom>e?o.view=Ee(t,e,o.viewFrom).concat(o.view):o.viewFromn&&(o.view=o.view.slice(0,Dn(t,n)))),o.viewTo=n}function ho(t){for(var e=t.display.view,n=0,o=0;o=t.display.viewTo)){var n=+new Date+t.options.workTime,o=Zt(e.mode,te(t,e.frontier)),r=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(i){if(e.frontier>=t.display.viewFrom){var A=i.styles,a=i.text.length>t.options.maxHighlightLength,l=qt(t,i,a?Zt(e.mode,o):o,!0);i.styles=l.styles;var c=i.styleClasses,s=l.classes;s?i.styleClasses=s:c&&(i.styleClasses=null);for(var u=!A||A.length!=i.styles.length||c!=s&&(!c||!s||c.bgClass!=s.bgClass||c.textClass!=s.textClass),g=0;!u&&gn)return wo(t,t.options.workDelay),!0}),r.length&&uo(t,function(){for(var e=0;e=o.viewFrom&&n.visible.to<=o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&0==ho(t))return!1;Un(t)&&(Io(t),n.dims=Nn(t));var A=r.first+r.size,a=Math.max(n.visible.from-t.options.viewportMargin,r.first),l=Math.min(A,n.visible.to+t.options.viewportMargin);o.viewFroml&&o.viewTo-l<20&&(l=Math.min(A,o.viewTo)),OA&&(a=st(t.doc,a),l=ut(t.doc,l));var c=a!=o.viewFrom||l!=o.viewTo||o.lastWrapHeight!=n.wrapperHeight||o.lastWrapWidth!=n.wrapperWidth;Eo(t,a,l),o.viewOffset=dt(y(t.doc,o.viewFrom)),t.display.mover.style.top=o.viewOffset+"px";var s=ho(t);if(!c&&0==s&&!n.force&&o.renderedView==o.view&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo))return!1;var u=i();return s>4&&(o.lineDiv.style.display="none"),bo(t,o.updateLineNumbers,n.dims),s>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,u&&i()!=u&&u.offsetHeight&&u.focus(),e(o.cursorDiv),e(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,c&&(o.lastWrapHeight=n.wrapperHeight,o.lastWrapWidth=n.wrapperWidth,wo(t,400)),o.updateLineNumbers=null,!0}function mo(t,e){for(var n=e.viewport,o=!0;(o&&t.options.lineWrapping&&e.oldDisplayWidth!=Pe(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Fe(t.display)-Ge(t),n.top)}),e.visible=On(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&xo(t,e);o=!1){zn(t);var r=Pn(t);yn(t),Wn(t,r),jo(t,r)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Lo(t,e){var n=new Do(t,e);if(xo(t,n)){zn(t),mo(t,n);var o=Pn(t);yn(t),Wn(t,o),jo(t,o),n.finish()}}function bo(t,n,o){function r(e){var n=e.nextSibling;return cA&&IA&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var i=t.display,A=t.options.lineNumbers,a=i.lineDiv,l=a.firstChild,c=i.view,s=i.viewFrom,u=0;u-1&&(d=!1),xe(t,M,s,o)),d&&(e(M.lineNumber),M.lineNumber.appendChild(document.createTextNode(Q(t.options,s)))),l=M.node.nextSibling}else{var p=Se(t,M,s,o);a.insertBefore(p,l)}s+=M.size}for(;l;)l=r(l)}function Bo(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function jo(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ve(t)+"px"}function Qo(t){var n=t.display.gutters,r=t.options.gutters;e(n);for(var i=0;i-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function So(t,e){this.ranges=t,this.primIndex=e}function Uo(t,e){this.anchor=t,this.head=e}function zo(t,e){var n=t[e];t.sort(function(t,e){return S(t.from(),e.from())}),e=g(t,n);for(var o=1;o=0){var A=k(i.from(),r.from()),a=z(i.to(),r.to()),l=i.empty()?r.from()==r.head:i.from()==i.head;o<=e&&--e,t.splice(--o,2,new Uo(l?a:A,l?A:a))}}return new So(t,e)}function ko(t,e){return new So([new Uo(t,e||t)],0)}function Oo(t){return t.text?v(t.from.line+t.text.length-1,p(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Yo(t,e){if(S(t,e.from)<0)return t;if(S(t,e.to)<=0)return Oo(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,o=t.ch;return t.line==e.to.line&&(o+=Oo(e).ch-e.to.ch),v(n,o)}function Ro(t,e){for(var n=[],o=0;o1&&t.remove(a.line+1,d-1),t.insert(a.line+1,I)}De(t,"change",t,e)}function Wo(t,e,n){function o(t,r,i){if(t.linked)for(var A=0;A1&&!t.done[t.done.length-2].ranges?(t.done.pop(),p(t.done)):void 0}function $o(t,e,n,o){var r=t.history;r.undone.length=0;var i,A,a=+new Date;if((r.lastOp==o||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&r.lastModTime>a-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(i=qo(r,r.lastOp==o)))A=p(i.changes),0==S(e.from,e.to)&&0==S(e.from,A.to)?A.to=Oo(e):i.changes.push(Ko(t,e));else{var l=p(r.done);for(l&&l.ranges||nr(t.sel,r.done),i={changes:[Ko(t,e)],generation:r.generation},r.done.push(i);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=a,r.lastOp=r.lastSelOp=o,r.lastOrigin=r.lastSelOrigin=e.origin,A||Bt(t,"historyAdded")}function tr(t,e,n,o){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function er(t,e,n,o){var r=t.history,i=o&&o.origin;n==r.lastSelOp||i&&r.lastSelOrigin==i&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==i||tr(t,i,p(r.done),e))?r.done[r.done.length-1]=e:nr(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=i,r.lastSelOp=n,o&&o.clearRedo!==!1&&_o(r.undone)}function nr(t,e){var n=p(e);n&&n.ranges&&n.equals(t)||e.push(t)}function or(t,e,n,o){var r=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,o),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[i]=n.markedSpans),++i})}function rr(t){if(!t)return null;for(var e,n=0;n-1&&(p(a)[u]=c[u],delete c[u])}}}return o}function lr(t,e,n,o){if(t.cm&&t.cm.display.shift||t.extend){var r=e.anchor;if(o){var i=S(n,r)<0;i!=S(o,r)<0?(r=n,n=o):i!=S(n,o)<0&&(n=o)}return new Uo(r,n)}return new Uo(o||n,n)}function cr(t,e,n,o){pr(t,new So([lr(t,t.sel.primary(),e,n)],0),o)}function sr(t,e,n){for(var o=[],r=0;r=e.ch:a.to>e.ch))){if(r&&(Bt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(i.markedSpans){--A;continue}break}if(!l.atomic)continue;if(n){var c=l.find(o<0?1:-1),s=void 0;if((o<0?l.inclusiveRight:l.inclusiveLeft)&&(c=wr(t,c,-o,c&&c.line==e.line?i:null)),c&&c.line==e.line&&(s=S(c,n))&&(o<0?s<0:s>0))return Er(t,c,e,o,r)}var u=l.find(o<0?-1:1);return(o<0?l.inclusiveLeft:l.inclusiveRight)&&(u=wr(t,u,o,u.line==e.line?i:null)),u?Er(t,u,e,o,r):null}}return e}function hr(t,e,n,o,r){var i=o||1,A=Er(t,e,n,i,r)||!r&&Er(t,e,n,i,!0)||Er(t,e,n,-i,r)||!r&&Er(t,e,n,-i,!0);return A?A:(t.cantEdit=!0,v(t.first,0))}function wr(t,e,n,o){return n<0&&0==e.ch?e.line>t.first?Y(t,v(e.line-1)):null:n>0&&e.ch==(o||y(t,e.line)).text.length?e.line=0;--r)xr(t,{from:o[r].from,to:o[r].to,text:r?[""]:e.text});else xr(t,e)}}function xr(t,e){if(1!=e.text.length||""!=e.text[0]||0!=S(e.from,e.to)){var n=Ro(t,e);$o(t,e,n,t.cm?t.cm.curOp.id:NaN),br(t,e,n,K(t,e));var o=[];Wo(t,function(t,n){n||g(o,t.history)!=-1||(Sr(t.history,e),o.push(t.history)),br(t,e,null,K(t,e))})}}function mr(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var o,r=t.history,i=t.sel,A="undo"==e?r.done:r.undone,a="undo"==e?r.undone:r.done,l=0;l=0;--M){var d=u(M);if(d)return d.v}}}}function Lr(t,e){if(0!=e&&(t.first+=e,t.sel=new So(T(t.sel.ranges,function(t){return new Uo(v(t.anchor.line+e,t.anchor.ch),v(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){To(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,o=n.viewFrom;ot.lastLine())){if(e.from.linei&&(e={from:e.from,to:v(i,y(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=x(t,e.from,e.to),n||(n=Ro(t,e)),t.cm?Br(t.cm,e,o):Xo(t,e,o),Tr(t,n,jA)}}function Br(t,e,n){var o=t.doc,r=t.display,i=e.from,A=e.to,a=!1,l=i.line;t.options.lineWrapping||(l=b(lt(y(o,i.line))),o.iter(l,A.line+1,function(t){if(t==r.maxLine)return a=!0,!0})),o.sel.contains(e.from,e.to)>-1&&Qt(t),Xo(o,e,n,hn(t)),t.options.lineWrapping||(o.iter(l,i.line+e.text.length,function(t){var e=pt(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,a=!1)}),a&&(t.curOp.updateMaxLine=!0)),o.frontier=Math.min(o.frontier,i.line),wo(t,400);var c=e.text.length-(A.line-i.line)-1;e.full?To(t):i.line!=A.line||1!=e.text.length||Go(t.doc,e)?To(t,i.line,A.line+1,c):fo(t,i.line,"text");var s=vt(t,"changes"),u=vt(t,"change");if(u||s){var g={from:i,to:A,text:e.text,removed:e.removed,origin:e.origin};u&&De(t,"change",t,g),s&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(g)}t.display.selForContextMenu=null}function jr(t,e,n,o,r){if(o||(o=n),S(o,n)<0){var i=o;o=n,n=i}"string"==typeof e&&(e=t.splitLines(e)),yr(t,{from:n,to:o,text:e,origin:r})}function Qr(t,e,n,o){n0||0==a&&A.clearWhenEmpty!==!1)return A;if(A.replacedWith&&(A.collapsed=!0,A.widgetNode=o("span",[A.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||A.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(A.widgetNode.insertLeft=!0)),A.collapsed){if(at(t,e.line,e,n,A)||e.line!=n.line&&at(t,n.line,e,n,A))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}A.addToHistory&&$o(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,s=e.line,u=t.cm;if(t.iter(s,n.line+1,function(t){u&&A.collapsed&&!u.options.lineWrapping&<(t)==u.display.maxLine&&(l=!0),A.collapsed&&s!=e.line&&L(t,0),W(t,new P(A,s==e.line?e.ch:null,s==n.line?n.ch:null)),++s}),A.collapsed&&t.iter(e.line,n.line+1,function(e){gt(t,e)&&L(e,0)}),A.clearOnEnter&&HA(A,"beforeCursorEnter",function(){return A.clear()}),A.readOnly&&(H(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),A.collapsed&&(A.id=++la,A.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),A.collapsed)To(u,e.line,n.line+1);else if(A.className||A.title||A.startStyle||A.endStyle||A.css)for(var g=e.line;g<=n.line;g++)fo(u,g,"text");A.atomic&&Ir(u.doc),De(u,"markerAdded",u,A)}return A}function Vr(t,e){var n=this;this.markers=t,this.primary=e;for(var o=0;o-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var c=t.dataTransfer.getData("Text");if(c){var s;if(e.state.draggingText&&!e.state.draggingText.copy&&(s=e.listSelections()),Tr(e.doc,ko(n,n)),s)for(var u=0;u=0;e--)jr(t.doc,"",o[e].from,o[e].to,"+delete");eo(t)})}function ci(t,e){var n=y(t.doc,e),o=lt(n);o!=n&&(e=b(o));var r=mt(o),i=r?r[0].level%2?ht(o):Et(o):0;return v(e,i)}function si(t,e){for(var n,o=y(t.doc,e);n=At(o);)o=n.find(1,!0).line,e=null;var r=mt(o),i=r?r[0].level%2?Et(o):ht(o):o.text.length;return v(null==e?b(o):e,i)}function ui(t,e){var n=ci(t,e.line),o=y(t.doc,n.line),r=mt(o);if(!r||0==r[0].level){var i=Math.max(0,o.text.search(/\S/)),A=e.line==n.line&&e.ch<=i&&e.ch;return v(n.line,A?0:i)}return n}function gi(t,e,n){if("string"==typeof e&&(e=Ea[e],!e))return!1;t.display.input.ensurePolled();var o=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=BA}finally{t.display.shift=o,t.state.suppressEdits=!1}return r}function Mi(t,e,n){for(var o=0;or-400&&0==S(Na.pos,n)?o="triple":Ia&&Ia.time>r-400&&0==S(Ia.pos,n)?(o="double",Na={time:r,pos:n}):(o="single",Ia={time:r,pos:n});var A,a=t.doc.sel,c=IA?e.metaKey:e.ctrlKey;t.options.dragDrop&&VA&&!t.isReadOnly()&&"single"==o&&(A=a.contains(n))>-1&&(S((A=a.ranges[A]).from(),n)<0||n.xRel>0)&&(S(A.to(),n)>0||n.xRel<0)?Ci(t,e,n,c):Di(t,e,n,o,c)}function Ci(t,e,n,o){var r=t.display,i=+new Date,A=go(t,function(a){cA&&(r.scroller.draggable=!1),t.state.draggingText=!1,bt(document,"mouseup",A),bt(r.scroller,"drop",A),Math.abs(e.clientX-a.clientX)+Math.abs(e.clientY-a.clientY)<10&&(Ut(a),!o&&+new Date-200E&&r.push(new Uo(v(T,E),v(T,M(I,c,i))))}r.length||r.push(new Uo(n,n)),pr(u,zo(p.ranges.slice(0,d).concat(r),d),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var h=g,w=h.anchor,C=e;if("single"!=o){var D;D="double"==o?t.findWordAt(e):new Uo(v(e.line,0),Y(u,v(e.line+1,0))),S(D.anchor,w)>0?(C=D.head,w=k(h.from(),D.anchor)):(C=D.anchor,w=z(h.to(),D.head))}var x=p.ranges.slice(0);x[d]=new Uo(Y(u,w),C),pr(u,zo(x,d),QA)}}function a(e){var n=++h,r=Cn(t,e,!0,"rect"==o);if(r)if(0!=S(r,N)){t.curOp.focus=i(),A(r);var l=On(c,u);(r.line>=l.to||r.lineE.bottom?20:0;s&&setTimeout(go(t,function(){h==n&&(c.scroller.scrollTop+=s,a(e))}),50)}}function l(e){t.state.selectingText=!1,h=1/0,Ut(e),c.input.focus(),bt(document,"mousemove",w),bt(document,"mouseup",C),u.history.lastSelOrigin=null}var c=t.display,u=t.doc;Ut(e);var g,d,p=u.sel,T=p.ranges;if(r&&!e.shiftKey?(d=u.sel.contains(n),g=d>-1?T[d]:new Uo(n,n)):(g=u.sel.primary(),d=u.sel.primIndex),NA?e.shiftKey&&e.metaKey:e.altKey)o="rect",r||(g=new Uo(n,n)),n=Cn(t,e,!0,!0),d=-1;else if("double"==o){var f=t.findWordAt(n);g=t.display.shift||u.extend?lr(u,g,f.anchor,f.head):f}else if("triple"==o){var I=new Uo(v(n.line,0),Y(u,v(n.line+1,0)));g=t.display.shift||u.extend?lr(u,g,I.anchor,I.head):I}else g=lr(u,g,n);r?d==-1?(d=T.length,pr(u,zo(T.concat([g]),d),{scroll:!1,origin:"*mouse"})):T.length>1&&T[d].empty()&&"single"==o&&!e.shiftKey?(pr(u,zo(T.slice(0,d).concat(T.slice(d+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):ur(u,d,g,QA):(d=0,pr(u,new So([g],0),QA),p=u.sel);var N=n,E=c.wrapper.getBoundingClientRect(),h=0,w=go(t,function(t){Rt(t)?a(t):l(t)}),C=go(t,l);t.state.selectingText=C,HA(document,"mousemove",w),HA(document,"mouseup",C)}function yi(t,e,n,o){var r,i;try{r=e.clientX,i=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;o&&Ut(e);var A=t.display,a=A.lineDiv.getBoundingClientRect();if(i>a.bottom||!vt(t,n))return kt(e);i-=a.top-A.viewOffset;for(var l=0;l=r){var s=B(t.doc,i),u=t.options.gutters[l];return Bt(t,n,t,s,u,e),kt(e)}}}function xi(t,e){return yi(t,e,"gutterClick",!0)}function mi(t,e){Ye(t.display,e)||Li(t,e)||jt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Li(t,e){return!!vt(t,"gutterContextMenu")&&yi(t,e,"gutterContextMenu",!1)}function bi(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),An(t)}function Bi(t){function e(e,o,r,i){t.defaults[e]=o,r&&(n[e]=i?function(t,e,n){n!=Ca&&r(t,e,n)}:r)}var n=t.optionHandlers;t.defineOption=e,t.Init=Ca,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Vo(t)},!0),e("indentUnit",2,Vo,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Po(t),An(t),To(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],o=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var i=t.text.indexOf(e,r);if(i==-1)break;r=i+e.length,n.push(v(o,i))}o++});for(var r=n.length-1;r>=0;r--)jr(t.doc,e,n[r],v(n[r].line,n[r].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Ca&&t.refresh()}),e("specialCharPlaceholder",Me,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",fA?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!EA),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){bi(t),ji(t)},!0),e("keyMap","default",function(t,e,n){var o=ai(e),r=n!=Ca&&ai(n);r&&r.detach&&r.detach(t,o),o.attach&&o.attach(t,r||null)}),e("extraKeys",null),e("lineWrapping",!1,vi,!0),e("gutters",[],function(t){vo(t.options),ji(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?En(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return Wn(t)},!0),e("scrollbarStyle","native",function(t){Zn(t),Wn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){vo(t.options),ji(t)},!0),e("firstLineNumber",1,ji,!0),e("lineNumberFormatter",function(t){return t},ji,!0),e("showCursorWhenSelecting",!1,yn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("readOnly",!1,function(t,e){"nocursor"==e?(vn(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Qi),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,yn,!0),e("singleCursorHeightPerLine",!0,yn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Po,!0),e("addModeClass",!1,Po,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Po,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null)}function ji(t){Qo(t),To(t),setTimeout(function(){return Sn(t)},20)}function Qi(t,e,n){var o=n&&n!=Ca;if(!e!=!o){var r=t.display.dragFunctions,i=e?HA:bt;i(t.display.scroller,"dragstart",r.start),i(t.display.scroller,"dragenter",r.enter),i(t.display.scroller,"dragover",r.over),i(t.display.scroller,"dragleave",r.leave),i(t.display.scroller,"drop",r.drop)}}function vi(t){t.options.lineWrapping?(A(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(yA(t.display.wrapper,"CodeMirror-wrap"),Tt(t)),wn(t),To(t),An(t),setTimeout(function(){return Wn(t)},100)}function Si(t,e){var n=this;if(!(this instanceof Si))return new Si(t,e);this.options=e=e?c(e):{},c(Da,e,!1),vo(e);var o=e.value;"string"==typeof o&&(o=new sa(o,e.mode,null,e.lineSeparator)),this.doc=o;var r=new Si.inputStyles[e.inputStyle](this),i=this.display=new D(t,o,r);i.wrapper.CodeMirror=this,Qo(this),bi(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),e.autofocus&&!fA&&i.input.focus(),Zn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new u,keySeq:null,specialChars:null},aA&&lA<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ui(this),$r(),oo(this),this.curOp.forceUpdate=!0,Jo(this,o),e.autofocus&&!fA||this.hasFocus()?setTimeout(l(Qn,this),20):vn(this);for(var A in ya)ya.hasOwnProperty(A)&&ya[A](n,e[A],Ca);Un(this),e.finishInit&&e.finishInit(this);for(var a=0;a400}var r=t.display;HA(r.scroller,"mousedown",go(t,hi)),aA&&lA<11?HA(r.scroller,"dblclick",go(t,function(e){if(!jt(t,e)){var n=Cn(t,e);if(n&&!xi(t,e)&&!Ye(t.display,e)){Ut(e);var o=t.findWordAt(n);cr(t.doc,o.anchor,o.head)}}})):HA(r.scroller,"dblclick",function(e){return jt(t,e)||Ut(e)}),DA||HA(r.scroller,"contextmenu",function(e){return mi(t,e)});var i,A={end:0};HA(r.scroller,"touchstart",function(e){if(!jt(t,e)&&!n(e)){r.input.ensurePolled(),clearTimeout(i);var o=+new Date;r.activeTouch={start:o,moved:!1,prev:o-A.end<=300?A:null},1==e.touches.length&&(r.activeTouch.left=e.touches[0].pageX,r.activeTouch.top=e.touches[0].pageY)}}),HA(r.scroller,"touchmove",function(){r.activeTouch&&(r.activeTouch.moved=!0)}),HA(r.scroller,"touchend",function(n){var i=r.activeTouch;if(i&&!Ye(r,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var A,a=t.coordsChar(r.activeTouch,"page");A=!i.prev||o(i,i.prev)?new Uo(a,a):!i.prev.prev||o(i,i.prev.prev)?t.findWordAt(a):new Uo(v(a.line,0),Y(t.doc,v(a.line+1,0))),t.setSelection(A.anchor,A.head),t.focus(),Ut(n)}e()}),HA(r.scroller,"touchcancel",e),HA(r.scroller,"scroll",function(){r.scroller.clientHeight&&(Yn(t,r.scroller.scrollTop),Rn(t,r.scroller.scrollLeft,!0),Bt(t,"scroll",t))}),HA(r.scroller,"mousewheel",function(e){return Vn(t,e)}),HA(r.scroller,"DOMMouseScroll",function(e){return Vn(t,e)}),HA(r.wrapper,"scroll",function(){return r.wrapper.scrollTop=r.wrapper.scrollLeft=0}),r.dragFunctions={enter:function(e){jt(t,e)||Ot(e)},over:function(e){jt(t,e)||(Kr(t,e),Ot(e))},start:function(e){return Zr(t,e)},drop:go(t,Jr),leave:function(e){jt(t,e)||_r(t)}};var a=r.input.getField();HA(a,"keyup",function(e){return Ni.call(t,e)}),HA(a,"keydown",go(t,fi)),HA(a,"keypress",go(t,Ei)),HA(a,"focus",function(e){return Qn(t,e)}),HA(a,"blur",function(e){return vn(t,e)})}function zi(t,e,n,o){var r,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?r=te(t,e):n="prev");var A=t.options.tabSize,a=y(i,e),l=s(a.text,null,A);a.stateAfter&&(a.stateAfter=null);var c,u=a.text.match(/^\s*/)[0];if(o||/\S/.test(a.text)){if("smart"==n&&(c=i.mode.indent(r,a.text.slice(u.length),a.text),c==BA||c>150)){if(!o)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>i.first?s(y(i,e-1).text,null,A):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var g="",M=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/A);p;--p)M+=A,g+="\t";if(M1)if(ma&&ma.text.join("\n")==e){if(o.ranges.length%ma.text.length==0){l=[];for(var c=0;c=0;u--){var g=o.ranges[u],M=g.from(),d=g.to();g.empty()&&(n&&n>0?M=v(M.line,M.ch-n):t.state.overwrite&&!A?d=v(d.line,Math.min(y(i,d.line).text.length,d.ch+p(a).length)):ma&&ma.lineWise&&ma.text.join("\n")==e&&(M=d=v(M.line,0))),s=t.curOp.updateInput;var f={from:M,to:d,text:l?l[u%l.length]:a,origin:r||(A?"paste":t.state.cutIncoming?"cut":"+input")};yr(t.doc,f),De(t,"inputRead",t,f)}e&&!A&&Ri(t,e),eo(t),t.curOp.updateInput=s,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Yi(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||uo(e,function(){return Oi(e,n,0,null,"paste")}),!0}function Ri(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,o=n.ranges.length-1;o>=0;o--){var r=n.ranges[o];if(!(r.head.ch>100||o&&n.ranges[o-1].head.line==r.head.line)){var i=t.getModeAt(r.head),A=!1;if(i.electricChars){for(var a=0;a-1){A=zi(t,r.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(y(t.doc,r.head.line).text.slice(0,r.head.ch))&&(A=zi(t,r.head.line,"smart"));A&&De(t,"electricInput",t,r.head.line)}}}function Fi(t){for(var e=[],n=[],o=0;oo&&(zi(e,i.head.line,t,!0),o=i.head.line,r==e.doc.sel.primIndex&&eo(e));else{var A=i.from(),a=i.to(),l=Math.max(o,A.line);o=Math.min(e.lastLine(),a.line-(a.ch?0:1))+1;for(var c=l;c0&&ur(e.doc,r,new Uo(A,s[r].to()),jA)}}}),getTokenAt:function(t,e){return re(this,t,e)},getLineTokens:function(t,e){return re(this,v(t),e,!0)},getTokenTypeAt:function(t){t=Y(this.doc,t);var e,n=$t(this,y(this.doc,t.line)),o=0,r=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var A=o+r>>1;if((A?n[2*A-1]:0)>=i)r=A;else{if(!(n[2*A+1]i&&(t=i,r=!0),o=y(this.doc,t)}else o=t;return cn(this,o,{top:0,left:0},e||"page",n).top+(r?this.doc.height-dt(o):0)},defaultTextHeight:function(){return fn(this.display)},defaultCharWidth:function(){return In(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,o,r){var i=this.display;t=gn(this,Y(this.doc,t));var A=t.bottom,a=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),i.sizer.appendChild(e),"over"==o)A=t.top;else if("above"==o||"near"==o){var l=Math.max(i.wrapper.clientHeight,this.doc.height),c=Math.max(i.sizer.clientWidth,i.lineSpace.clientWidth);("above"==o||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?A=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(A=t.bottom),a+e.offsetWidth>c&&(a=c-e.offsetWidth)}e.style.top=A+"px",e.style.left=e.style.right="","right"==r?(a=i.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?a=0:"middle"==r&&(a=(i.sizer.clientWidth-e.offsetWidth)/2),e.style.left=a+"px"),n&&qn(this,a,A,a+e.offsetWidth,A+e.offsetHeight)},triggerOnKeyDown:Mo(fi),triggerOnKeyPress:Mo(Ei),triggerOnKeyUp:Ni,execCommand:function(t){if(Ea.hasOwnProperty(t))return Ea[t].call(null,this)},triggerElectric:Mo(function(t){Ri(this,t)}),findPosH:function(t,e,n,o){var r=this,i=1;e<0&&(i=-1,e=-e);for(var A=Y(this.doc,t),a=0;a0&&a(n.charAt(o-1));)--o;for(;r.5)&&wn(this),Bt(this,"refresh",this)}),swapDoc:Mo(function(t){var e=this.doc;return e.cm=null,Jo(this,t),An(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,De(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},St(t),t.registerHelper=function(e,o,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][o]=r},t.registerGlobalHelper=function(e,o,r,i){t.registerHelper(e,o,i),n[e]._global.push({pred:r,val:i})}}function Gi(t,e,n,o,r){function i(){var e=a+n;return!(e=t.first+t.size)&&(a=e,s=y(t,e))}function A(t){var e=(r?yt:xt)(s,l,n,!0);if(null==e){if(t||!i())return!1;l=r?(n<0?ht:Et)(s):n<0?s.text.length:0}else l=e;return!0}var a=e.line,l=e.ch,c=n,s=y(t,a);if("char"==o)A();else if("column"==o)A(!0);else if("word"==o||"group"==o)for(var u=null,g="group"==o,M=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||A(!d);d=!1){var p=s.text.charAt(l)||"\n",T=h(p,M)?"w":g&&"\n"==p?"n":!g||/\s/.test(p)?null:"p";if(!g||d||T||(T="s"),u&&u!=T){n<0&&(n=1,A());break}if(T&&(u=T),n>0&&!A(!d))break}var f=hr(t,v(a,l),e,c,!0);return S(e,f)||(f.hitSide=!0),f}function Xi(t,e,n,o){var r,i=t.doc,A=e.left;if("page"==o){var a=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(a-.5*fn(t.display),3);r=(n>0?e.bottom:e.top)+n*l}else"line"==o&&(r=n>0?e.bottom+3:e.top-3);for(var c;c=pn(t,A,r),c.outside;){if(n<0?r<=0:r>=i.height){c.hitSide=!0;break}r+=5*n}return c}function Wi(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new u,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Ji(t,e){var n=Ke(t,e.line);if(!n||n.hidden)return null;var o=y(t.doc,e.line),r=We(n,o,e.line),i=mt(o),A="left";if(i){var a=Ct(i,e.ch);A=a%2?"right":"left"}var l=$e(r.map,e.ch,A);return l.offset="right"==l.collapse?l.end:l.start,l}function Zi(t,e){return e&&(t.bad=!0),t}function Ki(t,e,n,o,r){function i(t){return function(e){return e.id==t}}function A(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void(a+=""==n?e.textContent.replace(/\u200b/g,""):n);var s,u=e.getAttribute("cm-marker");if(u){var g=t.findMarks(v(o,0),v(r+1,0),i(+u));return void(g.length&&(s=g[0].find())&&(a+=x(t.doc,s.from,s.to).join(c)))}if("false"==e.getAttribute("contenteditable"))return;for(var M=0;M=15&&(gA=!1,cA=!0);var wA,CA=IA&&(sA||gA&&(null==hA||hA<12.11)),DA=rA||aA&&lA>=9,yA=function(e,n){var o=e.className,r=t(n).exec(o);if(r){var i=o.slice(r.index+r[0].length);e.className=o.slice(0,r.index)+(i?r[1]+i:"")}};wA=document.createRange?function(t,e,n,o){var r=document.createRange();return r.setEnd(o||t,n),r.setStart(t,e),r}:function(t,e,n){var o=document.body.createTextRange();try{o.moveToElementText(t.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o};var xA=function(t){t.select()};TA?xA=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:aA&&(xA=function(t){try{t.select()}catch(t){}}),u.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var mA,LA,bA=30,BA={toString:function(){return"CodeMirror.Pass"}},jA={scroll:!1},QA={origin:"*mouse"},vA={origin:"+move"},SA=[""],UA=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,zA=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,kA=!1,OA=!1,YA=null,RA=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1773?o.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",r=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,i=/[stwN]/,A=/[LRr]/,a=/[Lb1n]/,l=/[1n]/,c="L";return function(n){if(!r.test(n))return!1;for(var o=n.length,s=[],u=0;u=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(o&&e!==!1&&(this.pos+=o[0].length),o)}var r=function(t){return n?t.toLowerCase():t},i=this.string.substr(this.pos,t.length);if(r(i)==r(t))return e!==!1&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},St(le),le.prototype.lineNo=function(){return b(this)};var qA,$A={},ta={},ea=null,na=null,oa={left:0,right:0,top:0,bottom:0},ra=0,ia=null;aA?ia=-.53:rA?ia=15:uA?ia=-.7:MA&&(ia=-1/3),Gn.prototype=c({update:function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,o=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?o+"px":"0";var r=t.viewHeight-(e?o:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?o:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+i+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:e?o:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=IA&&!dA?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new u,this.disableVert=new u},enableZeroWidthBar:function(t,e){function n(){var o=t.getBoundingClientRect(),r=document.elementFromPoint(o.left+1,o.bottom-1);r!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},Gn.prototype),Xn.prototype=c({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Xn.prototype);var Aa={native:Gn,null:Xn},aa=0;Do.prototype.signal=function(t,e){vt(t,e)&&this.events.push(arguments)},Do.prototype.finish=function(){for(var t=this,e=0;e=0&&S(t,r.to())<=0)return o}return-1}},Uo.prototype={from:function(){return k(this.anchor,this.head)},to:function(){return z(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},zr.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,o=t,r=t+e;o1||!(this.children[0]instanceof zr))){var l=[];this.collapse(l),this.children=[new zr(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var a=i.lines.length%25+25,l=a;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var o=this,r=0;re.display.maxLineLength&&(e.display.maxLine=s,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&To(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Ir(e.doc)),e&&De(e,"markerCleared",e,this),n&&ro(e),this.parent&&this.parent.clear()}},Fr.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var o,r,i=0;i=0;c--)yr(o,r[c]);l?dr(this,l):this.cm&&eo(this.cm)}),undo:po(function(){mr(this,"undo")}),redo:po(function(){mr(this,"redo")}),undoSelection:po(function(){mr(this,"undo",!0)}),redoSelection:po(function(){mr(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,o=0;o=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=Y(this,t),e=Y(this,e);var o=[],r=t.line;return this.iter(t.line,e.line+1,function(i){var A=i.markedSpans;if(A)for(var a=0;a=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||o.push(l.marker.parent||l.marker)}++r}),o},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var o=0;ot?(e=t,!0):(t-=i,void++n)}),Y(this,v(n,e))},indexFromPos:function(t){t=Y(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)r=new v(r.line,r.ch+1),t.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),v(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var A=y(t.doc,r.line-1).text;A&&(r=new v(r.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+A.charAt(A.length-1),v(r.line-1,A.length-1),r,"+transpose"))}n.push(new Uo(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return uo(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var o=0;ot.firstLine()&&(o=v(o.line-1,y(t.doc,o.line-1).length)),r.ch==y(t.doc,r.line).text.length&&r.linee.viewTo-1)return!1;var i,A,a;o.line==e.viewFrom||0==(i=Dn(t,o.line))?(A=b(e.view[0].line),a=e.view[0].node):(A=b(e.view[i].line),a=e.view[i-1].node.nextSibling);var l,c,s=Dn(t,r.line);if(s==e.view.length-1?(l=e.viewTo-1,c=e.lineDiv.lastChild):(l=b(e.view[s+1].line)-1,c=e.view[s+1].node.previousSibling),!a)return!1;for(var u=t.doc.splitLines(Ki(t,a,c,A,l)),g=x(t.doc,v(A,0),v(l,y(t.doc,l).text.length));u.length>1&&g.length>1;)if(p(u)==p(g))u.pop(),g.pop(),l--;else{if(u[0]!=g[0])break;u.shift(),g.shift(),A++}for(var M=0,d=0,T=u[0],f=g[0],I=Math.min(T.length,f.length);M1||u[0]||S(w,C)?(jr(t.doc,u,w,C,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&(this.composing=null,this.pollContent()||To(this.cm),this.div.blur(),this.div.focus())},readFromDOMSoon:function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){t.readDOMTimeout=null,t.composing||!t.cm.isReadOnly()&&t.pollContent()||uo(t.cm,function(){return To(t.cm)})},80))},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||go(this.cm,Oi)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:I,resetPosition:I,needsContentAttribute:!0},Wi.prototype),$i.prototype=c({init:function(t){function e(t){if(!jt(r,t)){if(r.somethingSelected())ki({lineWise:!1,text:r.getSelections()}),o.inaccurateSelection&&(o.prevInput="",o.inaccurateSelection=!1,A.value=ma.text.join("\n"),xA(A));else{if(!r.options.lineWiseCopyCut)return;var e=Fi(r);ki({lineWise:!0,text:e.text}),"cut"==t.type?r.setSelections(e.ranges,null,jA):(o.prevInput="",A.value=e.text.join("\n"),xA(A))}"cut"==t.type&&(r.state.cutIncoming=!0)}}var n=this,o=this,r=this.cm,i=this.wrapper=Vi(),A=this.textarea=i.firstChild;t.wrapper.insertBefore(i,t.wrapper.firstChild),TA&&(A.style.width="0px"),HA(A,"input",function(){aA&&lA>=9&&n.hasSelection&&(n.hasSelection=null),o.poll()}),HA(A,"paste",function(t){jt(r,t)||Yi(t,r)||(r.state.pasteIncoming=!0,o.fastPoll())}),HA(A,"cut",e),HA(A,"copy",e),HA(t.scroller,"paste",function(e){Ye(t,e)||jt(r,e)||(r.state.pasteIncoming=!0,o.focus())}),HA(t.lineSpace,"selectstart",function(e){Ye(t,e)||Ut(e)}),HA(A,"compositionstart",function(){var t=r.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:t,range:r.markText(t,r.getCursor("to"),{className:"CodeMirror-composing"})}}),HA(A,"compositionend",function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)})},prepareSelection:function(){var t=this.cm,e=t.display,n=t.doc,o=xn(t);if(t.options.moveInputWithCursor){var r=gn(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),A=e.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+A.top-i.top)),o.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+A.left-i.left))}return o},showSelection:function(t){var e=this.cm,o=e.display;n(o.cursorDiv,t.cursors),n(o.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,n,o=this.cm,r=o.doc;if(o.somethingSelected()){this.prevInput="";var i=r.sel.primary();e=XA&&(i.to().line-i.from().line>100||(n=o.getSelection()).length>1e3);var A=e?"-":n||o.getSelection();this.textarea.value=A,o.state.focused&&xA(this.textarea),aA&&lA>=9&&(this.hasSelection=A)}else t||(this.prevInput=this.textarea.value="",aA&&lA>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!fA||i()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},fastPoll:function(){function t(){var o=n.poll();o||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},poll:function(){var t=this,e=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!e.state.focused||GA(n)&&!o&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==o&&!e.somethingSelected())return!1;if(aA&&lA>=9&&this.hasSelection===r||IA&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||o||(o="​"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var A=0,a=Math.min(o.length,r.length);A1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){aA&&lA>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=A.selectionStart){var t=r.somethingSelected(),e="​"+(t?A.value:"");A.value="⇚",A.value=e,o.prevInput=t?"":"​",A.selectionStart=1,A.selectionEnd=e.length,i.selForContextMenu=r.doc.sel}}function n(){if(o.contextMenuPending=!1,o.wrapper.style.cssText=u,A.style.cssText=s,aA&&lA<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=l),null!=A.selectionStart){(!aA||aA&&lA<9)&&e();var t=0,n=function(){i.selForContextMenu==r.doc.sel&&0==A.selectionStart&&A.selectionEnd>0&&"​"==o.prevInput?go(r,Cr)(r):t++<10?i.detectingSelectAll=setTimeout(n,500):i.input.reset()};i.detectingSelectAll=setTimeout(n,200)}}var o=this,r=o.cm,i=r.display,A=o.textarea,a=Cn(r,t),l=i.scroller.scrollTop;if(a&&!gA){var c=r.options.resetSelectionOnContextMenu;c&&r.doc.sel.contains(a)==-1&&go(r,pr)(r.doc,ko(a),jA);var s=A.style.cssText,u=o.wrapper.style.cssText;o.wrapper.style.cssText="position: absolute";var g=o.wrapper.getBoundingClientRect();A.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-g.top-5)+"px; left: "+(t.clientX-g.left-5)+"px;\n z-index: 1000; background: "+(aA?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var M;if(cA&&(M=window.scrollY),i.input.focus(),cA&&window.scrollTo(null,M),i.input.reset(),r.somethingSelected()||(A.value=o.prevInput=" "),o.contextMenuPending=!0,i.selForContextMenu=r.doc.sel,clearTimeout(i.detectingSelectAll),aA&&lA>=9&&e(),DA){Ot(t);var d=function(){bt(window,"mouseup",d),setTimeout(n,20)};HA(window,"mouseup",d)}else setTimeout(n,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:I,needsContentAttribute:!1},$i.prototype),Bi(Si),Pi(Si);var La="iter insert remove copy getEditor constructor".split(" ");for(var ba in sa.prototype)sa.prototype.hasOwnProperty(ba)&&g(La,ba)<0&&(Si.prototype[ba]=function(t){return function(){return t.apply(this.doc,arguments)}}(sa.prototype[ba]));return St(sa),Si.inputStyles={textarea:$i,contenteditable:Wi},Si.defineMode=function(t){Si.defaults.mode||"null"==t||(Si.defaults.mode=t),Pt.apply(this,arguments)},Si.defineMIME=Gt,Si.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),Si.defineMIME("text/plain","null"),Si.defineExtension=function(t,e){Si.prototype[t]=e},Si.defineDocExtension=function(t,e){sa.prototype[t]=e},Si.fromTextArea=tA,eA(Si),Si.version="5.21.0",Si})},,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var o=n(434);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".bv-form .help-block{margin-bottom:0}.bv-form .tooltip-inner{text-align:left}.nav-tabs li.bv-tab-success>a{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100}",""])},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){var e='[data-toggle="context"]',o=function(e,n){this.$element=t(e),this.before=n.before||this.before,this.onItem=n.onItem||this.onItem,this.scopes=n.scopes||null,n.target&&this.$element.data("target",n.target),this.listen()};o.prototype={constructor:o,show:function(e){var n,o,r,i,A={relatedTarget:this,target:e.currentTarget};if(!this.isDisabled()&&(this.closemenu(),this.before.call(this,e,t(e.currentTarget))!==!1))return n=this.getMenu(),n.trigger(o=t.Event("show.bs.context",A)),r=this.getPosition(e,n),i="li:not(.divider)",n.attr("style","").css(r).addClass("open").on("click.context.data-api",i,t.proxy(this.onItem,this,t(e.currentTarget))).trigger("shown.bs.context",A),t("html").click(function(){this.closemenu()}.bind(this)),!1},closemenu:function(e){var n,o,r,i;n=this.getMenu(),n.hasClass("open")&&(i={relatedTarget:this},n.trigger(o=t.Event("hide.bs.context",i)),r="li:not(.divider)",n.removeClass("open").off("click.context.data-api",r).trigger("hidden.bs.context",i),t("html").off("click.context.data-api",n.selector),e&&e.stopPropagation())},keydown:function(t){27==t.which&&this.closemenu(t)},before:function(t){return!0},onItem:function(t){return!0},listen:function(){this.$element.on("contextmenu.context.data-api",this.scopes,t.proxy(this.show,this)),t("html").on("keydown.context.data-api",t.proxy(this.keydown,this))},destroy:function(){this.$element.off(".context.data-api").removeData("context"),t("html").off(".context.data-api")},isDisabled:function(){return this.$element.hasClass("disabled")||this.$element.attr("disabled")},getMenu:function(){var e,n=this.$element.data("target");return n||(n=this.$element.attr("href"),n=n&&n.replace(/.*(?=#[^\s]*$)/,"")),e=t(n),e&&e.length?e:this.$element.find(n)},getPosition:function(e,n){var o,r,i,A=e.clientX,a=e.clientY,l=t(window).width(),c=t(window).height(),s=n.find(".dropdown-menu").outerWidth(),u=n.find(".dropdown-menu").outerHeight(),g={position:"absolute","z-index":9999};return o=a+u>c?{top:a-u+t(window).scrollTop()}:{top:a+t(window).scrollTop()},r=A+s>l&&A-s>0?{left:A-s+t(window).scrollLeft()}:{left:A+t(window).scrollLeft()},i=n.offsetParent().offset(),r.left=r.left-i.left,o.top=o.top-i.top,t.extend(g,o,r)}},t.fn.contextmenu=function(e,r){return this.each(function(){var i=t(this),A=i.data("context"),a="object"==("undefined"==typeof e?"undefined":n(e))&&e;A||i.data("context",A=new o(i,a)),"string"==typeof e&&A[e].call(A,r)})},t.fn.contextmenu.Constructor=o,t(document).on("contextmenu.context.data-api",function(){t(e).each(function(){var e=t(this).data("context");e&&e.closemenu()})}).on("contextmenu.context.data-api",e,function(e){t(this).contextmenu("show",e),e.preventDefault(),e.stopPropagation()})}(jQuery)},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case l.ADD:return Object.assign({},t,{data:[].concat(r(t.data),[e.itemData])});case l.DEL:var n=Object.assign({},t.data),o=new Map;A(n,o);var i=o.get(e.data.id),a=i.data,c=i.parent.children,s=c.indexOf(a);return c.splice(s,1),Object.assign({},t,{data:n});case l.UPDATE:var n=[].concat(r(t.data));return n[e.index].name=e.itemData.name,Object.assign({},t,{data:n});case l.LOAD_END:var n=e.data;return Object.assign({},t,{data:n});case l.FILE_RENAME:var u=Object.assign({},t.data),g=new Map;A(u,g);var n=e.data,a=g.get(n.id).data;return a.name=n.name,a.fullPath=n.fullPath,Object.assign({},t,{data:u});case l.CREATE_NEW_PROJECT:var M=e.parentNodeData,u=Object.assign({},t.data),g=new Map;A(u,g);var d=g.get(M.id);return d.data.children||(d.data.children=[]),d.data.children.push(e.newProjectData),Object.assign({},t,{data:u});case l.CREATE_NEW_FILE:var M=e.parentNodeData,u=Object.assign({},t.data),g=new Map;A(u,g);var d=g.get(M.id),p=d.data.children;return p||(p=[],d.data.children=p),p.push(e.newFileData),Object.assign({},t,{data:u});default:return t}}function A(t,e,n,o){if(t instanceof Array)t.forEach(function(t,r){e.set(t.id,{parent:o,data:t}),n&&(t.active=!1);var i=t.children;i&&A(i,e,n,t)});else{e.set(t.id,{data:t,parent:o}),n&&(t.active=!1);var r=t.children;r&&A(r,e,n,t)}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(400),l=o(a);e.default=i},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function a(t){var e=t.data;return{data:e}}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;n>"+n.project:"资源权限配置"===C?"AUTH":"客户端访问权限配置"===C?"AUTH":I.buildType(C),"package"===D&&(D=n.fullPath.substring(1,n.fullPath.length)),o.push(s.default.createElement("li",{id:M,className:c,key:g},s.default.createElement("a",{id:p,href:l,"data-toggle":"tab"},s.default.createElement("button",{className:"close closeTab",type:"button",style:{marginLeft:"5px"},onClick:function(){var o=$("#"+f).get(0);if(o&&o.contentWindow&&o.contentWindow._dirty){var r=confirm("当前页面内容未保存,确实要关闭吗?");if(!r)return}var i=e.indexOf(n);e.splice(i,1);var A=void 0;i>0?A="tabLink"+t._processFullPath(e[i-1].fullPath):e.length>0&&(e[e.length-1].active=!0,A="tabLink"+t._processFullPath(e[e.length-1].fullPath)),t.setState({data:e}),A&&setTimeout(function(){$("#"+A).trigger("click")},100)}},"×"),"AUTH"===D?N:D+":"+N),s.default.createElement(E.default,{menuId:T,items:[{name:"关闭所有标签页",click:function(){e.splice(0,e.length),this.setState({data:e})}.bind(t)},{name:"关闭其它标签页",click:function(){e.splice(0,e.length),e.push(n),this.setState({data:e}),setTimeout(function(){$("#"+p).trigger("click")},100)}.bind(t)}],data:{id:"tab"+A}})))}),0===o.length?n&&n.length>0?"none"===n?s.default.createElement("div",null):s.default.createElement("iframe",{frameBorder:"0",style:{border:0,width:"100%",height:"100%"},src:n}):s.default.createElement(g.default,null):s.default.createElement("div",null,s.default.createElement("div",null,s.default.createElement("ul",{className:"nav nav-tabs",id:"fornavframetab_",style:{fontSize:"12px"}},o)),s.default.createElement("div",{className:"tab-content"},r))}}]),e}(c.Component);e.default=w},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n800?t-160:t;n.setSize("100%",e+"px"),n.setValue(o),n.refresh()},400)}),I.eventEmitter.on(I.CLOSE_SOURCE_DIALOG,function(){$(g.default.findDOMNode(t)).modal("hide")})}},{key:"componentWillUnmount",value:function(){I.eventEmitter.removeAllListeners(I.OPEN_SOURCE_DIALOG),I.eventEmitter.removeAllListeners(I.CLOSE_SOURCE_DIALOG)}},{key:"render",value:function(){var t=s.default.createElement("textarea",{id:this.editorId,rows:"10"}),e=[{name:"保存",className:"btn btn-success",icon:"rf rf-save",click:function(){var t=this.state.codeMirror.getValue(),e=this.state.file;E.saveFileSource(e,t)}.bind(this)}];return s.default.createElement(T.default,{title:this.state.title,body:t,buttons:e,large:!0})}}]),e}(c.Component);e.default=h},function(t,e,n){!function(t){t(n(406))}(function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,caseFold:!1};t.defineMode("xml",function(o,r){function i(t,e){function n(n){return e.tokenize=n,n(t,e)}var o=t.next();if("<"==o)return t.eat("!")?t.eat("[")?t.match("CDATA[")?n(l("atom","]]>")):null:t.match("--")?n(l("comment","-->")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(c(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=l("meta","?>"),"meta"):(x=t.eat("/")?"closeTag":"openTag",e.tokenize=A,"tag bracket");if("&"==o){var r;return r=t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"),r?"atom":"error"}return t.eatWhile(/[^&<]/),null}function A(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=i,x=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return x="equals",null;if("<"==n){e.tokenize=i,e.state=M,e.tagName=e.tagStart=null;var o=e.tokenize(t,e);return o?o+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=a(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function a(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=A;break}return"string"};return e.isInAttribute=!0,e}function l(t,e){return function(n,o){for(;!n.eol();){if(n.match(e)){o.tokenize=i;break}n.next()}return t}}function c(t){return function(e,n){for(var o;null!=(o=e.next());){if("<"==o)return n.tokenize=c(t+1),n.tokenize(e,n);if(">"==o){if(1==t){n.tokenize=i;break}return n.tokenize=c(t-1),n.tokenize(e,n)}}return"meta"}}function s(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(C.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function u(t){t.context&&(t.context=t.context.prev)}function g(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!C.contextGrabbers.hasOwnProperty(n)||!C.contextGrabbers[n].hasOwnProperty(e))return;u(t)}}function M(t,e,n){return"openTag"==t?(n.tagStart=e.column(),d):"closeTag"==t?p:M}function d(t,e,n){return"word"==t?(n.tagName=e.current(),m="tag",I):(m="error",d)}function p(t,e,n){if("word"==t){var o=e.current();return n.context&&n.context.tagName!=o&&C.implicitlyClosed.hasOwnProperty(n.context.tagName)&&u(n),n.context&&n.context.tagName==o||C.matchClosing===!1?(m="tag",T):(m="tag error",f)}return m="error",f}function T(t,e,n){return"endTag"!=t?(m="error",T):(u(n),M)}function f(t,e,n){return m="error",T(t,e,n)}function I(t,e,n){if("word"==t)return m="attribute",N;if("endTag"==t||"selfcloseTag"==t){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||C.autoSelfClosers.hasOwnProperty(o)?g(n,o):(g(n,o),n.context=new s(n,o,r==n.indented)),M}return m="error",I}function N(t,e,n){return"equals"==t?E:(C.allowMissing||(m="error"),I(t,e,n))}function E(t,e,n){return"string"==t?h:"word"==t&&C.allowUnquoted?(m="string",I):(m="error",I(t,e,n))}function h(t,e,n){return"string"==t?h:I(t,e,n)}var w=o.indentUnit,C={},D=r.htmlMode?e:n;for(var y in D)C[y]=D[y];for(var y in r)C[y]=r[y];var x,m;return i.isInText=!0,{startState:function(t){var e={tokenize:i,state:M,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;x=null;var n=e.tokenize(t,e);return(n||x)&&"comment"!=n&&(m=null,e.state=e.state(x||n,t,e),m&&(n="error"==m?n+" error":m)),n},indent:function(e,n,o){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+w;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=A&&e.tokenize!=i)return o?o.match(/^(\s*)/)[0].length:0;if(e.tagName)return C.multilineTagIndentPastTag!==!1?e.tagStart+e.tagName.length+2:e.tagStart+w*(C.multilineTagIndentFactor||1);if(C.alignCDATA&&/$/,blockCommentStart:"",configuration:C.htmlMode?"html":"xml",helperType:C.htmlMode?"html":"xml",skipAttribute:function(t){t.state==E&&(t.state=I)}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})})},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;ndiv,.container2>div,.container3>div{width:10px;height:10px;background-color:#019dff;border-radius:100%;position:absolute;-webkit-animation:bouncedelay 1.2s infinite ease-in-out;animation:bouncedelay 1.2s infinite ease-in-out;-webkit-animation-fill-mode:both;animation-fill-mode:both}.spinner .spinner-container{position:absolute;width:100%;height:100%}.container2{-webkit-transform:rotate(45deg);transform:rotate(45deg)}.container3{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.circle1{top:0;left:0}.circle2{top:0;right:0}.circle3{right:0;bottom:0}.circle4{left:0;bottom:0}.container2 .circle1{-webkit-animation-delay:-1.1s;animation-delay:-1.1s}.container3 .circle1{-webkit-animation-delay:-1s;animation-delay:-1s}.container1 .circle2{-webkit-animation-delay:-.9s;animation-delay:-.9s}.container2 .circle2{-webkit-animation-delay:-.8s;animation-delay:-.8s}.container3 .circle2{-webkit-animation-delay:-.7s;animation-delay:-.7s}.container1 .circle3{-webkit-animation-delay:-.6s;animation-delay:-.6s}.container2 .circle3{-webkit-animation-delay:-.5s;animation-delay:-.5s}.container3 .circle3{-webkit-animation-delay:-.4s;animation-delay:-.4s}.container1 .circle4{-webkit-animation-delay:-.3s;animation-delay:-.3s}.container2 .circle4{-webkit-animation-delay:-.2s;animation-delay:-.2s}.container3 .circle4{-webkit-animation-delay:-.1s;animation-delay:-.1s}@-webkit-keyframes bouncedelay{0%,80%,to{-webkit-transform:scale(0)}40%{-webkit-transform:scale(1)}}@keyframes bouncedelay{0%,80%,to{transform:scale(0);-webkit-transform:scale(0)}40%{transform:scale(1);-webkit-transform:scale(1)}}",""])}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/packageEditor.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/packageEditor.bundle.js new file mode 100644 index 0000000..8560373 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/packageEditor.bundle.js @@ -0,0 +1,22 @@ +!function(t){function e(A){if(n[A])return n[A].exports;var o=n[A]={exports:{},id:A,loaded:!1};return t[A].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){var e=new RegExp("(^|&)"+t+"=([^&]*)(&|$)"),n=window.location.search.substr(1).match(e);return null!=n?unescape(n[2]):null}n(1),n(433);var i=n(14),a=o(i),s=n(41),c=o(s),l=n(183),u=n(205),g=n(204),M=o(g),d=n(455),p=o(d),I=n(457),h=o(I),f=n(456),E=A(f);$(document).ready(function(){var t=(0,l.createStore)(p.default,(0,l.applyMiddleware)(M.default)),e=r("file");t.dispatch(E.loadMasterData(e)),c.default.render(a.default.createElement(u.Provider,{store:t},a.default.createElement(h.default,{project:e})),document.getElementById("container"))})},function(t,e,n){var A=n(2);"string"==typeof A&&(A=[[t.id,A,""]]);n(9)(A,{});A.locals&&(t.exports=A.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var n,A,o;if(e.singleton){var r=f++;n=h||(h=a(e)),A=l.bind(null,n,r,!1),o=l.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(e),A=g.bind(null,n),o=function(){i(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),A=u.bind(null,n),o=function(){i(n)});return A(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;A(t=e)}else o()}}function l(t,e,n,A){var o=n?"":A.css;if(t.styleSheet)t.styleSheet.cssText=T(e,o);else{var r=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(r,i[e]):t.appendChild(r)}}function u(t,e){var n=e.css,A=e.media;if(A&&t.setAttribute("media",A),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,A=e.sourceMap;A&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(A))))+" */");var o=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var M={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),I=d(function(){return document.head||document.getElementsByTagName("head")[0]}),h=null,f=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return A(n,e),function(t){for(var r=[],i=0;i1){for(var I=Array(p),h=0;h1){for(var E=Array(f),T=0;T>"),B={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:d(),objectOf:g,oneOf:u,oneOfType:M,shape:p};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function A(t){return r.isValidElement(t)?void 0:o("143"),t}var o=n(19),r=n(21);n(20);t.exports=A},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var A=n(43),o=n(48),r=n(174),i=n(71),a=n(68),s=n(179),c=n(180),l=n(181),u=n(182);n(56);o.inject();var g={findDOMNode:c,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:A.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?A.getNodeFromInstance(t):null}},Mount:r,Reconciler:i});t.exports=g},function(t,e,n){"use strict";function A(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var n=A(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function i(t,e){if(!(t._flags&d.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var i in n)if(n.hasOwnProperty(i)){var a=n[i],s=A(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(M)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}l("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,A;t&&(A=t[p]);t=e.pop())n=A,e.length&&i(A,t);return n}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?l("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:l("34"),t=t._hostParent;for(;e.length;t=e.pop())i(t,t._hostNode);return t._hostNode}var l=n(44),u=n(45),g=n(47),M=(n(46),u.ID_ATTRIBUTE_NAME),d=g,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),I={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:i,precacheNode:o,uncacheNode:r};t.exports=I},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,A=0;A8&&N<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,b=null,L={eventTypes:x,extractEvents:function(t,e,n,A){return[c(t,e,n,A),g(t,e,n,A)]}};t.exports=L},function(t,e,n){"use strict";function A(t,e,n){var A=e.dispatchConfig.phasedRegistrationNames[n];return h(t,A)}function o(t,e,n){var o=A(t,n,e);o&&(n._dispatchListeners=p(n._dispatchListeners,o),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function i(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?d.getParentInstance(e):null;d.traverseTwoPhase(n,o,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var A=n.dispatchConfig.registrationName,o=h(t,A);o&&(n._dispatchListeners=p(n._dispatchListeners,o),n._dispatchInstances=p(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){I(t,r)}function l(t){I(t,i)}function u(t,e,n,A){d.traverseEnterLeave(n,A,a,t,e)}function g(t){I(t,s)}var M=n(52),d=n(54),p=n(58),I=n(59),h=(n(56),M.getListener),f={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=f},function(t,e,n){"use strict";function A(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!A(e));default:return!1}}var r=n(44),i=n(53),a=n(54),s=n(55),c=n(58),l=n(59),u=(n(46),{}),g=null,M=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return M(t,!0)},p=function(t){return M(t,!1)},I=function(t){return"."+t._rootNodeID},h={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var A=I(t),o=u[e]||(u[e]={});o[A]=n;var a=i.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var A=I(t);return n&&n[A]},deleteListener:function(t,e){var n=i.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var A=u[e];if(A){var o=I(t);delete A[o]}},deleteAllListeners:function(t){var e=I(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var A=i.registrationNameModules[n];A&&A.willDeleteListener&&A.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,A){for(var o,r=i.plugins,a=0;a-1?void 0:i("96",t),!c.plugins[n]){e.extractEvents?void 0:i("97",t),c.plugins[n]=e;var A=e.eventTypes;for(var r in A)o(A[r],e,r)?void 0:i("98",r,t)}}}function o(t,e,n){c.eventNameDispatchConfigs.hasOwnProperty(n)?i("99",n):void 0,c.eventNameDispatchConfigs[n]=t;var A=t.phasedRegistrationNames;if(A){for(var o in A)if(A.hasOwnProperty(o)){var a=A[o];r(a,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){c.registrationNameModules[t]?i("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var i=n(44),a=(n(46),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?i("101"):void 0,a=Array.prototype.slice.call(t),A()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?i("102",n):void 0,s[n]=o,e=!0)}e&&A()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var A in n)if(n.hasOwnProperty(A)){var o=c.registrationNameModules[n[A]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var A=c.registrationNameModules;for(var o in A)A.hasOwnProperty(o)&&delete A[o]}};t.exports=c},function(t,e,n){"use strict";function A(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function i(t,e,n,A){var o=t.type||"unknown-event";t.currentTarget=h.getNodeFromInstance(A),e?p.invokeGuardedCallbackWithCatch(o,n,t):p.invokeGuardedCallback(o,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,A=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(A),t.exports=A},function(t,e,n){"use strict";var A=n(44),o=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var A=n.instancePool.pop();return n.call(A,t,e),A}return new n(t,e)},i=function(t,e,n){var A=this;if(A.instancePool.length){var o=A.instancePool.pop();return A.call(o,t,e,n),o}return new A(t,e,n)},a=function(t,e,n,A){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,n,A),r}return new o(t,e,n,A)},s=function(t,e,n,A,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,n,A,o),i}return new r(t,e,n,A,o)},c=function(t){var e=this;t instanceof e?void 0:A("25"),t.destructor(),e.instancePool.length8));var v=!1;T.canUseDOM&&(v=D("input")&&(!document.documentMode||document.documentMode>11));var S={get:function(){return Q.get.call(this)},set:function(t){m=""+t,Q.set.call(this,t)}},U={eventTypes:B,extractEvents:function(t,e,n,o){var r,i,a=e?N.getNodeFromInstance(e):window;if(A(a)?j?r=s:i=c:x(a)?v?r=M:(r=p,i=d):I(a)&&(r=h),r){var l=r(t,e);if(l){var u=C.getPooled(B.change,l,n,o);return u.type="change",E.accumulateTwoPhaseDispatches(u),u}}i&&i(t,a,e)}};t.exports=U},function(t,e,n){"use strict";function A(){B.ReactReconcileTransaction&&N?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,o,r,i){return A(),N.batchedUpdates(t,e,n,o,r,i)}function i(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==h.length?l("124",e,h.length):void 0,h.sort(i),f++;for(var n=0;n]/,s=n(91),c=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{A=A||document.createElement("div"),A.innerHTML=""+e+"";for(var n=A.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,A,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,A,o)})}:t};t.exports=n},function(t,e,n){"use strict";var A=n(60),o=n(93),r=n(90),i=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};A.canUseDOM&&("textContent"in document.documentElement||(i=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=i},function(t,e){"use strict";function n(t){var e=""+t,n=o.exec(e);if(!n)return e;var A,r="",i=0,a=0;for(i=n.index;i]/;t.exports=A},function(t,e,n){"use strict";var A=n(44),o=n(88),r=n(60),i=n(95),a=n(57),s=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:A("56"),e?void 0:A("57"),"HTML"===t.nodeName?A("58"):void 0,"string"==typeof e){var n=i(e,a)[0];t.parentNode.replaceChild(n,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";function A(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var n=c;c?void 0:s(!1);var o=A(t),r=o&&a(o);if(r){n.innerHTML=r[1]+t+r[2];for(var l=r[0];l--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:s(!1),i(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var r=n(60),i=n(96),a=n(97),s=n(46),c=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function A(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),"function"==typeof t.callee?i(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),A=0;A":i.innerHTML="<"+t+">",a[t]=!i.firstChild),a[t]?g[t]:null}var o=n(60),r=n(46),i=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],c=[1,"","
    "],l=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},M=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];M.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=A},function(t,e,n){"use strict";var A=n(87),o=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=o.getNodeFromInstance(t);A.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function A(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",A(t)):void 0)}function r(t,e,n,A){if(!(A instanceof v)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;Y(e,a),A.getReactMountReady().enqueue(i,{inst:t,registrationName:e,listener:n})}}function i(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;b.postMountWrapper(t)}function s(){var t=this;Q.postMountWrapper(t)}function c(){var t=this;L.postMountWrapper(t)}function l(){var t=this;t._rootNodeID?void 0:p("63");var e=k(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in P)P.hasOwnProperty(n)&&t._wrapperState.listeners.push(D.trapBubbledEvent(n,P[n],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){m.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function M(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),I=n(16),h=n(100),f=n(102),E=n(88),T=n(89),N=n(45),w=n(110),C=n(52),y=n(53),D=n(112),x=n(47),B=n(43),b=n(115),L=n(118),m=n(119),Q=n(120),j=(n(74),n(121)),v=n(141),S=(n(57),n(93)),U=(n(46),n(77),n(130),n(144),n(56),x),z=C.deleteListener,k=B.getNodeFromInstance,Y=D.listenTo,O=y.registrationNameModules,R={string:!0,number:!0},F="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=I({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,n,A){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":b.mountWrapper(this,r,e),r=b.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"option":L.mountWrapper(this,r,e),r=L.getHostProps(this,r);break;case"select":m.mountWrapper(this,r,e),r=m.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"textarea":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(l,this)}o(this,r);var i,u;null!=e?(i=e._namespaceURI,u=e._tag):n._tag&&(i=n._namespaceURI,u=n._tag),(null==i||i===T.svg&&"foreignobject"===u)&&(i=T.html),i===T.html&&("svg"===this._tag?i=T.svg:"math"===this._tag&&(i=T.mathml)),this._namespaceURI=i;var g;if(t.useCreateElement){var M,d=n._ownerDocument;if(i===T.html)if("script"===this._tag){var p=d.createElement("div"),I=this._currentElement.type;p.innerHTML="<"+I+">",M=p.removeChild(p.firstChild)}else M=r.is?d.createElement(this._currentElement.type,r.is):d.createElement(this._currentElement.type);else M=d.createElementNS(i,this._currentElement.type);B.precacheNode(this,M),this._flags|=U.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(M),this._updateDOMProperties(null,r,t);var f=E(M);this._createInitialChildren(t,r,A,f),g=f}else{var N=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,A);g=!C&&X[this._tag]?N+"/>":N+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(h.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var A in e)if(e.hasOwnProperty(A)){var o=e[A];if(null!=o)if(O.hasOwnProperty(A))o&&r(this,A,o,t);else{A===F&&(o&&(o=this._previousStyleCopy=I({},e.style)),o=f.createMarkupForStyles(o,this));var i=null;null!=this._tag&&M(this._tag,e)?V.hasOwnProperty(A)||(i=w.createMarkupForCustomAttribute(A,o)):i=w.createMarkupForProperty(A,o),i&&(n+=" "+i)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var A="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(A=o.__html);else{var r=R[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)A=S(r);else if(null!=i){var a=this.mountChildren(i,t,n);A=a.join("")}}return W[this._tag]&&"\n"===A.charAt(0)?"\n"+A:A},_createInitialChildren:function(t,e,n,A){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(A,o.__html);else{var r=R[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)E.queueText(A,r);else if(null!=i)for(var a=this.mountChildren(i,t,n),s=0;s1)for(var n=1;n0&&A.length<20?n+" (keys: "+A.join(", ")+")":n}function r(t,e){var n=a.get(t);if(!n){return null}return n}var i=n(44),a=(n(22),n(123)),s=(n(74),n(68)),c=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){c.validateCallback(e,n);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void A(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],A(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,A(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,A(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(e),A(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,A(t)},validateCallback:function(t,e){t&&"function"!=typeof t?i("122",e,o(t)):void 0}});t.exports=c},function(t,e,n){"use strict";var A=(n(16),n(57)),o=(n(56),A);t.exports=o},function(t,e,n){"use strict";var A=n(16),o=n(88),r=n(43),i=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};A(i.prototype,{mountComponent:function(t,e,n,A){var i=n._idCounter++;this._domID=i,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=n._ownerDocument,c=s.createComment(a);return r.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=i},function(t,e,n){"use strict";function A(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var n=0,A=t;A;A=A._hostParent)n++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;n-o>0;)t=t._hostParent,n--;for(;o-n>0;)e=e._hostParent,o--;for(var i=n;i--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function i(t,e,n){for(var A=[];t;)A.push(t),t=t._hostParent;var o;for(o=A.length;o-- >0;)e(A[o],"captured",n);for(o=0;o0;)n(s[c],"captured",r)}var s=n(44);n(46);t.exports={isAncestor:o,getLowestCommonAncestor:A,getParentInstance:r,traverseTwoPhase:i,traverseEnterLeave:a}},function(t,e,n){"use strict";var A=n(44),o=n(16),r=n(87),i=n(88),a=n(43),s=n(93),c=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,n,A){var o=n._idCounter++,r=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var l=n._ownerDocument,u=l.createComment(r),g=l.createComment(c),M=i(l.createDocumentFragment());return i.queueChild(M,i(u)),this._stringText&&i.queueChild(M,i(l.createTextNode(this._stringText))),i.queueChild(M,i(g)),a.precacheNode(this,u),this._closingComment=g,M}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var A=this.getHostNode();r.replaceDelimitedText(A[0],A[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?A("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,n){"use strict";function A(){this.reinitializeTransaction()}var o=n(16),r=n(68),i=n(75),a=n(57),s={initialize:a,close:function(){g.isBatchingUpdates=!1}},c={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[c,s];o(A.prototype,i,{getTransactionWrappers:function(){return l}});var u=new A,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,A,o,r){var i=g.isBatchingUpdates;return g.isBatchingUpdates=!0,i?t(e,n,A,o,r):u.perform(t,null,e,n,A,o,r)}};t.exports=g},function(t,e,n){"use strict";function A(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=M(t.nativeEvent),n=u.getClosestInstanceFromNode(e),o=n;do t.ancestors.push(o),o=o&&A(o);while(o);for(var r=0;re.end?(n=e.end,A=e.start):(n=e.start,A=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",A-n),o.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),A=t[l()].length,o=Math.min(e.start,A),r=void 0===e.end?o:Math.min(e.end,A);if(!n.extend&&o>r){var i=r;r=o,o=i}var a=c(t,o),s=c(t,r);if(a&&s){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),o>r?(n.addRange(u),n.extend(s.node,s.offset)):(u.setEnd(s.node,s.offset),n.addRange(u))}}}var s=n(60),c=n(156),l=n(63),u=s.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?o:r,setOffsets:u?i:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function A(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=n(t),r=0,i=0;o;){if(3===o.nodeType){if(i=r+o.textContent.length,r<=e&&i>=e)return{node:o,offset:e-r};r=i}o=n(A(o))}}t.exports=o},function(t,e,n){"use strict";function A(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?A(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(158);t.exports=A},function(t,e,n){"use strict";function A(t){return o(t)&&3==t.nodeType}var o=n(159);t.exports=A},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},A={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(A).forEach(function(t){o.Properties[t]=0,A[t]&&(o.DOMAttributeNames[t]=A[t])}),t.exports=o},function(t,e,n){"use strict";function A(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t,e){if(f||null==p||p!==l())return null;var n=A(p);if(!h||!g(h,n)){h=n;var o=c.getPooled(d.select,I,t,e);return o.type="select",o.target=p,r.accumulateTwoPhaseDispatches(o),o}return null}var r=n(51),i=n(60),a=n(43),s=n(154),c=n(65),l=n(160),u=n(78),g=n(130),M=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,I=null,h=null,f=!1,E=!1,T={eventTypes:d,extractEvents:function(t,e,n,A){if(!E)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,I=e,h=null);break;case"topBlur":p=null,I=null,h=null;break;case"topMouseDown":f=!0;break;case"topContextMenu":case"topMouseUp":return f=!1,o(n,A);case"topSelectionChange":if(M)break;case"topKeyDown":case"topKeyUp":return o(n,A)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(E=!0)}};t.exports=T},function(t,e,n){"use strict";function A(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),i=n(150),a=n(51),s=n(43),c=n(164),l=n(165),u=n(65),g=n(166),M=n(167),d=n(81),p=n(170),I=n(171),h=n(172),f=n(82),E=n(173),T=n(57),N=n(168),w=(n(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,A="top"+e,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[A]};w[t]=o,C[A]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,n,A){var o=C[t];if(!o)return null;var i;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=u;break;case"topKeyPress":if(0===N(n))return null;case"topKeyDown":case"topKeyUp":i=M;break;case"topBlur":case"topFocus":i=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=I;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=c;break;case"topTransitionEnd":i=h;break;case"topScroll":i=f;break;case"topWheel":i=E;break;case"topCopy":case"topCut":case"topPaste":i=l}i?void 0:r("86",t);var s=i.getPooled(o,e,n,A);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,n){if("onClick"===e&&!o(t._tag)){var r=A(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=i.listen(a,"click",T))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var n=A(t);y[n].remove(),delete y[n]}}};t.exports=D},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(82),r={relatedTarget:null};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(82),r=n(168),i=n(169),a=n(84),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(A,s),t.exports=A},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function A(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?i[t.keyCode]||"Unidentified":""}var o=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(81),r={dataTransfer:null};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(82),r=n(84),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(A,i),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e,n,A){return o.call(this,t,e,n,A)}var o=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(A,r),t.exports=A},function(t,e,n){"use strict";function A(t,e){for(var n=Math.min(t.length,e.length),A=0;A.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,a=I.createElement(Y,{child:e});if(t){var s=w.get(t);i=s._processChildContext(s._context)}else i=B;var l=g(n);if(l){var u=l._currentElement,d=u.props.child;if(m(d,e)){var p=l._renderedComponent.getPublicInstance(),h=A&&function(){A.call(p)};return O._updateRootComponent(l,a,i,n,h),p}O.unmountComponentAtNode(n)}var f=o(n),E=f&&!!r(f),T=c(n),N=E&&!l&&!T,C=O._renderNewRootComponent(a,n,N,i)._renderedComponent.getPublicInstance();return A&&A.call(C),C},render:function(t,e,n){return O._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){l(t)?void 0:M("40");var e=g(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(j);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,i){if(l(e)?void 0:M("41"),r){var a=o(e);if(C.canReuseMarkup(t,a))return void f.precacheNode(n,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var u=t,g=A(u,c),p=" (client) "+u.substring(g-20,g+20)+"\n (server) "+c.substring(g-20,g+20);e.nodeType===S?M("42",p):void 0}if(e.nodeType===S?M("43"):void 0,i.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else L(e,t),f.precacheNode(n,e.firstChild)}};t.exports=O},function(t,e,n){"use strict";function A(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var o=(n(144),9);t.exports=A},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var A=n(178),o=/\/?>/,r=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=A(t);return r.test(t)?t:t.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(i.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=A(t);return o===n}};t.exports=i},function(t,e){"use strict";function n(t){for(var e=1,n=0,o=0,r=t.length,i=r&-4;o3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),g=t||y,d=void 0;d="function"==typeof e?e:e?(0,h.default)(e):D;var I=n||x,f=A.pure,E=void 0===f||f,T=A.withRef,w=void 0!==T&&T,L=E&&I!==x,m=b++;return function(t){function e(t,e,n){var A=I(t,e,n);return A}var n="Connect("+a(t)+")",A=function(A){function a(t,e){o(this,a);var i=r(this,A.call(this,t,e));i.version=m,i.store=t.store||e.store,(0,C.default)(i.store,'Could not find "store" in either the context or '+('props of "'+n+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+n+'".'));var s=i.store.getState();return i.state={storeState:s},i.clearCache(),i}return i(a,A),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var n=t.getState(),A=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(n,e):this.finalMapStateToProps(n);return A},a.prototype.configureFinalMapState=function(t,e){var n=g(t.getState(),e),A="function"==typeof n;return this.finalMapStateToProps=A?n:g,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,A?this.computeStateProps(t,e):n},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var n=t.dispatch,A=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(n,e):this.finalMapDispatchToProps(n);return A},a.prototype.configureFinalMapDispatch=function(t,e){var n=d(t.dispatch,e),A="function"==typeof n;return this.finalMapDispatchToProps=A?n:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,A?this.computeDispatchProps(t,e):n},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,p.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,p.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&L&&(0,p.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,p.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var n=s(this.updateStatePropsIfNeeded,this);if(!n)return;n===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,n=this.hasStoreStateChanged,A=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var i=!0,a=!0;E&&r&&(i=n||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;A?s=!0:i&&(s=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var g=!0;return g=!!(s||c||e)&&this.updateMergedPropsIfNeeded(),!g&&r?r:(w?this.renderedElement=(0,u.createElement)(t,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,u.createElement)(t,this.mergedProps),this.renderedElement)},a}(u.Component);return A.displayName=n,A.WrappedComponent=t,A.contextTypes={store:M.default},A.propTypes={store:M.default},(0,N.default)(A,t)}}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var A in n)new RegExp("("+A+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[A]:("00"+n[A]).substr((""+n[A]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=A,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+l++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function i(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=c.default.frameStyle.getRootIcon(),t._style=c.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=c.default.frameStyle.getFolderIcon(),t._style=c.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=c.default.frameStyle.getRuleIcon(),t._style=c.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=c.default.frameStyle.getProjectIcon(),t._style=c.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=c.default.frameStyle.getResourceIcon(),t._style=c.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=c.default.frameStyle.getResourcePackageIcon(),t._style=c.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=c.default.frameStyle.getLibIcon(),t._style=c.default.frameStyle.getLibIconStyle();break;case"action":t._icon=c.default.frameStyle.getActionIcon(),t._style=c.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=c.default.frameStyle.getParameterIcon(),t._style=c.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=c.default.frameStyle.getConstantIcon(),t._style=c.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=c.default.frameStyle.getVariableIcon(),t._style=c.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=c.default.frameStyle.getRuleLibIcon(),t._style=c.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=c.default.frameStyle.getDecisionTableLibIcon(),t._style=c.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=c.default.frameStyle.getDecisionTreeLibIcon(),t._style=c.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=c.default.frameStyle.getFlowLibIcon(),t._style=c.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=c.default.frameStyle.getUlIcon(),t._style=c.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=c.default.frameStyle.getDecisionTableIcon(),t._style=c.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=c.default.frameStyle.getScriptDecisionTableIcon(),t._style=c.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=c.default.frameStyle.getDecisionTreeIcon(),t._style=c.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=c.default.frameStyle.getFlowIcon(),t._style=c.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=c.default.frameStyle.getScorecardIcon(),t._style=c.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=i;var s=n(228),c=A(s),l=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var A={};A.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=A},,function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n\r\n *\r\n * Same license as plugin\r\n */.splitter_panel{position:relative}.splitter_panel .vsplitter{border-left:1px solid #999;border-right:1px solid #999;background-color:#f5f5f5;cursor:col-resize;z-index:900;width:7px}.splitter_panel .hsplitter{background-color:#5f5f5f;cursor:row-resize;z-index:800;height:7px}.splitter_panel .hsplitter.splitter-invisible,.splitter_panel .vsplitter.splitter-invisible{background:none}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{position:absolute;overflow:auto}.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .vsplitter{height:100%}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .top_panel{width:100%}.splitter_panel .left_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{top:0}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .top_panel{left:0}.splitter_panel .bottom_panel{bottom:0}.splitter_panel .right_panel{right:0}.splitterMask{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1000}",""])},function(t,e){"use strict";!function(t,e){var n=0,A=null,o=[],r=null;t.fn.split=function(i){function a(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9\.]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==u.orientation)return d*+e[1]/100;if("horizontal"==u.orientation)return p*+e[1]/100}}}var s=this.data("splitter");if(s)return s;var c,l,u=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},i||{});this.settings=u;var g,M=this.children();"vertical"==u.orientation?(c=M.first().addClass("left_panel"),l=c.next().addClass("right_panel"),g="vsplitter"):"horizontal"==u.orientation&&(c=M.first().addClass("top_panel"),l=c.next().addClass("bottom_panel"),g="hsplitter"),u.invisible&&(g+=" splitter-invisible");var d=this.width(),p=this.height(),I=n++;this.addClass("splitter_panel");var h,f=t("
    ").addClass(g).bind("mouseenter touchstart",function(){A=I}).bind("mouseleave touchend",function(){A=null}).insertAfter(c),E=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&p==e||(d=this.width(),p=this.height(),E.position(h))},position:function(){return"vertical"==u.orientation?function(t,n){if(t===e)return h;h=a(t);var A=f.width(),o=A/2;if(u.invisible){var r=c.width(h).outerWidth();l.width(E.width()-r),f.css("left",r-o)}else{var r=c.width(h-o).outerWidth();l.width(E.width()-r-A),f.css("left",r)}return n||E.find(".splitter_panel").trigger("splitter.resize"),E}:"horizontal"==u.orientation?function(t,n){if(t===e)return h;h=a(t);var A=f.height(),o=A/2;if(u.invisible){var r=c.height(h).outerHeight();l.height(E.height()-r),f.css("top",r-o)}else{var r=c.height(h-o).outerHeight();l.height(E.height()-r-A),f.css("top",r)}return n||E.find(".splitter_panel").trigger("splitter.resize"),E}:t.noop}(),orientation:u.orientation,limit:u.limit,isActive:function(){return A===I},destroy:function(){E.removeClass("splitter_panel"),f.unbind("mouseenter"),f.unbind("mouseleave"),f.unbind("touchstart"),f.unbind("touchmove"),f.unbind("touchend"),f.unbind("touchleave"),f.unbind("touchcancel"),"vertical"==u.orientation?(c.removeClass("left_panel"),l.removeClass("right_panel")):"horizontal"==u.orientation&&(c.removeClass("top_panel"),l.removeClass("bottom_panel")),E.unbind("splitter.resize"),E.find(".splitter_panel").trigger("splitter.resize"),o[I]=null,f.remove();for(var e=!1,A=o.length;A--;)if(null!==o[A]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),E.data("splitter",null),o=[],n=0)}});E.bind("splitter.resize",function(t){var e=E.position();"vertical"==E.orientation&&e>E.width()?e=E.width()-E.limit-1:"horizontal"==E.orientation&&e>E.height()&&(e=E.height()-E.limit-1),ed-u.limit?d-u.limit:a(u.position):"horizontal"==u.orientation&&(T=T>p-u.limit?p-u.limit:a(u.position)),T
    ').css("cursor",r.children().eq(1).css("cursor")).insertAfter(r),r.settings.onDragStart(e),!1}).bind("mouseup.splitter touchend.splitter touchleave.splitter touchcancel.splitter",function(e){r&&(t(".splitterMask").remove(),r.settings.onDragEnd(e),r=null)}).bind("mousemove.splitter touchmove.splitter",function(t){if(null!==r){var e=r.limit,n=r.offset();if("vertical"==r.orientation){var A=t.pageX;t.originalEvent&&t.originalEvent.changedTouches&&(A=t.originalEvent.changedTouches[0].pageX);var o=A-n.left;o<=r.limit?o=r.limit+1:o>=r.width()-e&&(o=r.width()-e-1),o>r.limit&&o=r.height()-e&&(a=r.height()-e-1),a>r.limit&&a-1&&(l=!0),!1}}),l?c.show():c.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,A=e.operationConfig,o=e.dispatch,r=e.selectFirst,i=(e.uniqueKey,this.props.rows||[]),a=[],s=[];n.forEach(function(e,n){e.editable?a.push(c.default.createElement("td",{key:(0,I.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label),c.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(c.default.createElement("td",{key:(0,I.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label)))}),A&&a.push(c.default.createElement("td",{key:(0,I.uniqueID)(),style:{width:A.width}},c.default.createElement("label",null,"操作列")));var l=c.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?c.default.createElement("td",{key:(0,I.uniqueID)()},c.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):c.default.createElement("td",{key:(0,I.uniqueID)()}," ")}),A?c.default.createElement("td",null):null);s.push(l),i.forEach(function(e,i){e.id||(e.id=(0,I.uniqueID)());var a=e.id;0===i&&r?s.push(c.default.createElement(M.default,{key:a,select:!0,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:A?A.operations:null,rowData:e,rowIndex:i})):s.push(c.default.createElement(M.default,{key:a,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:A?A.operations:null,rowData:e,rowIndex:i}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return c.default.createElement("table",{className:"table table-bordered",style:u},c.default.createElement("thead",null,c.default.createElement("tr",{className:"well"},a)),c.default.createElement("tbody",null,s))}}]),e}(s.Component);h.propTypes={headers:c.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=h},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var A=e[t];A&&""!==A||(A="{}");var o=JSON.parse(A)||{},r=o.rows||[],i=o.type,a=function(A){var o={type:i,rows:A},r=JSON.stringify(o);e[t]=r;var a=n.find("div");a.html(r)};if(i){var s=null,c=!0,l=!1,u=void 0;try{for(var g,M=simulatorCategoryData[Symbol.iterator]();!(c=(g=M.next()).done);c=!0){var d=g.value;if(i===d.clazz){s=d;break}}}catch(t){l=!0,u=t}finally{try{!c&&M.return&&M.return()}finally{if(l)throw u}}var I=s.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:I,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,A=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(n=(s=c.next()).done);n=!0){var l=s.value;e.append('")}}catch(t){A=!0,o=t}finally{try{!n&&c.return&&c.return()}finally{if(A)throw o}}e.append(''),h.MsgBox.dialog("选择子对象类型",e,function(){if(i=e.val(),!i||""===i)return void h.MsgBox.alert("请先选择子对象类型!");var n=null,A=!0,o=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(A=(c=l.next()).done);A=!0){var u=c.value;if(i===u.clazz){n=u;break}}}catch(t){o=!0,s=t}finally{try{!A&&l.return&&l.return()}finally{if(o)throw s}}var g=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:g,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var A=n.find("div");A.html(e[t]),A.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,A=e.header,o=A.dateFormat,r=n[A.name];if(o){var i=new Date(r);r=(0,I.formatDate)(i,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:a,onClick:function(e){if(A.editable){var o=e.target;$(o).css({display:"none"}),n._editorType?t._showEditor(A.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:o,rowData:n,colId:A.id})}}},r))}}]),e}(l.Component);e.default=f},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=n(240),r=A(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function A(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,o,a,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(n=this._events[t],i(n))return!1;if(A(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),c=n.slice(),o=c.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}if(!A(e))throw TypeError("listener must be a function");var o=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,o,i,a;if(!A(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],i=n.length,o=-1,n===e||A(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=i;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],A(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?A(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(A(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var A=n(242).default,o=n(243).default,r=n(251),i=n(252).default,a=n(302);t.exports={Tool:A,Node:o,MsgBox:r,Event:a,FlowDesigner:i}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer", +value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var A=this.newNode();return A?(A._tool=this,A._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),A._createFigure(this.context,{x:t,y:e},n),A):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,A=!1,o=void 0;try{for(var r,i=this.context.allFigures[Symbol.iterator]();!(n=(r=i.next()).done);n=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){A=!0,o=t}finally{try{!n&&i.return&&i.return()}finally{if(A)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);es-l&&as-l&&a>c-l?this.attr("cursor","se-resize"):ic-l?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},A=function(n){if(!this.dragging){var A=t.currentTool;if(A){if(A instanceof M.default||A instanceof u.default||(t.currentTool=t.selectTool,A=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),A instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,i=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var g=s.value;if(g===e){o=!0;break}}}catch(t){i=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(A instanceof M.default){var d=n.offsetX,I=n.offsetY,h=t.currentConnection;if(h){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");h.endX=d,h.endY=I,h.from!==e?!function(){h.endPath(e),t.currentConnection=null;var n=h.from.uuid,A=e.uuid,o=h.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(A);h=new c.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),h.uuid=o,h.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");h=new c.default(e,{endX:d,endY:I}),t.currentConnection=h}}}}};this.rect.mouseover(n),this.rect.mousedown(A),this.icon.mouseover(n),this.icon.mousedown(A);var o=function(){var n=e.rect,A=t.currentTool;if(A&&A instanceof u.default){var o=!1,r=t.selectionFigures,i=!0,a=!1,s=void 0;try{for(var l,g=r[Symbol.iterator]();!(i=(l=g.next()).done);i=!0){var M=l.value;if(M===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&g.return&&g.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof c.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,A){var o=t.currentTool;if(o&&o instanceof u.default){e.context.snapto&&(n-=n%10,A-=A%10);var r=t.selectionFigures,i=e.rect,a=(e.icon,i.ox+n),s=i.oy+A;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var l=void 0,g=void 0;switch(this.attr("cursor")){case"nw-resize":l=i.ow-n,g=i.oh-A,l>20&&g>20&&i.attr({x:a,y:s,width:l,height:g});break;case"ne-resize":l=i.ow+n,g=i.oh-A,l>20&&g>20&&i.attr({y:s,width:l,height:g});break;case"se-resize":l=i.ow+n,g=i.oh+A,l>20&&g>20&&i.attr({width:l,height:g});break;case"sw-resize":l=i.ow-n,g=i.oh+A,l>20&&g>20&&i.attr({x:a,width:l,height:g});break;default:r.forEach(function(t,e){t instanceof c.default||t._moveRect(n,A)})}r.forEach(function(t,e){t instanceof c.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},i=function(){e.rect.dragging=!1;var n=[],A=new Map,o=new Map,r=e.rect.ow,i=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),l=e.uuid,u=!0,g=!1,M=void 0;try{for(var d,p=t.selectionFigures[Symbol.iterator]();!(u=(d=p.next()).done);u=!0){var I=d.value;if(!(I instanceof c.default)){n.push(I.uuid);var h=I.rect.ox,f=I.rect.oy;h=h?h:0,f=f?f:0;var E=I.rect.attr("x"),T=I.rect.attr("y");A.set(I.uuid,{x:E,y:T}),o.set(I.uuid,{x:h,y:f})}}}catch(t){g=!0,M=t}finally{try{!u&&p.return&&p.return()}finally{if(g)throw M}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var i,c=n[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var u=i.value,g=t.getNodeByUUID(u),M=A.get(u);g.rect.attr({x:M.x,y:M.y}),u===l&&g.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&c.return&&c.return()}finally{if(o)throw r}}var d=!0,p=!1,I=void 0;try{for(var h,f=n[Symbol.iterator]();!(d=(h=f.next()).done);d=!0){var E=h.value,T=t.getNodeByUUID(E);T._moveAndResizeTextAndIcon(),T._resetConnections()}}catch(t){p=!0,I=t}finally{try{!d&&f.return&&f.return()}finally{if(p)throw I}}},undo:function(){var e=!0,A=!1,a=void 0;try{for(var s,c=n[Symbol.iterator]();!(e=(s=c.next()).done);e=!0){var u=s.value,g=t.getNodeByUUID(u),M=o.get(u);g.rect.attr({x:M.x,y:M.y}),u===l&&g.rect.attr({width:r,height:i})}}catch(t){A=!0,a=t}finally{try{!e&&c.return&&c.return()}finally{if(A)throw a}}var d=!0,p=!1,I=void 0;try{for(var h,f=n[Symbol.iterator]();!(d=(h=f.next()).done);d=!0){var E=h.value,T=t.getNodeByUUID(E);T._moveAndResizeTextAndIcon(),T._resetConnections()}}catch(t){p=!0,I=t}finally{try{!d&&f.return&&f.return()}finally{if(p)throw I}}}})};this.rect.drag(r,o,i),this.icon.drag(r,o,i)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,A=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,A=this.rect.oy+e):(n=this.rect.attr("x")+t,A=this.rect.attr("x")+e),this.rect.attr({x:n,y:A})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),A=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,n-=5,A+=10,o+=10),"M "+e+" "+n+" L "+(e+A)+" "+n+" L "+(e+A)+" "+(n+o)+" L "+e+" "+(n+o)+" L "+e+" "+n}}]),t}();e.default=I},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,A=n.attr("x"),o=n.attr("y"),r=n.attr("width"),i=n.attr("height");A+=r/2,o+=i/2-10;var a=t.x,c=t.y;t=[],t.push(["M",a,c]),t.push(["L",A,o])}var l=this.to.getPathInfo(!0),u=s.default.pathIntersection(l,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),A=t.attr("width"),o=t.attr("height");e+=A/2,n+=o/2-10;var r=this.endX,i=this.endY,a=0,c=0,l=null;if(this.to){var u=this.to.rect;r=u.attr("x"),i=u.attr("y"),a=u.attr("width"),c=u.attr("height"),r+=a/2,i+=c/2-10}var g=this.from.getPathInfo(!0),M=Math.abs(e+A/2-(r-a/2)),d=Math.abs(n+o/2-(i-c/2)),p="M"+e+" "+n;if(M>=d){var I=p+" L"+r+" "+n,h=s.default.pathIntersection(g,I);if(h.length>0&&(e=h[0].x,n=h[0].y,p="M"+h[0].x+" "+h[0].y),this.to){var f="M"+e+" "+i+" L"+r+" "+i,E=this.to.getPathInfo(!0);h=s.default.pathIntersection(E,f),h.length>0&&(r=h[0].x,i=h[0].y,e0&&(e=C[0].x,n=C[0].y,p="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+n+" L"+r+" "+i,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,i=C[0].y,n=1e3&&delete a[s.shift()],s.push(i),a[i]=t[b](e,r),n?n(a[i]):a[i])}return o}function r(){return this.hex}function i(t,e){for(var n=[],A=0,o=t.length;o-2*!e>A;A+=2){var r=[{x:+t[A-2],y:+t[A-1]},{x:+t[A],y:+t[A+1]},{x:+t[A+2],y:+t[A+3]},{x:+t[A+4],y:+t[A+5]}];e?A?o-4==A?r[3]={x:+t[0],y:+t[1]}:o-2==A&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==A?r[3]=r[2]:A||(r[0]={x:+t[A],y:+t[A+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function a(t,e,n,A,o){var r=-3*e+9*n-9*A+3*o,i=t*r+6*e-12*n+6*A;return t*i-3*e+3*n}function s(t,e,n,A,o,r,i,s,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],M=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,p=0;pd;)g/=2,M+=(lO(o,i)||O(e,A)O(r,a))){var s=(t*A-e*n)*(o-i)-(t-n)*(o*a-r*i),c=(t*A-e*n)*(r-a)-(e-A)*(o*a-r*i),l=(t-n)*(r-a)-(e-A)*(o-i);if(l){var u=s/l,g=c/l,M=+u.toFixed(2),d=+g.toFixed(2);if(!(M<+R(t,n).toFixed(2)||M>+O(t,n).toFixed(2)||M<+R(o,i).toFixed(2)||M>+O(o,i).toFixed(2)||d<+R(e,A).toFixed(2)||d>+O(e,A).toFixed(2)||d<+R(r,a).toFixed(2)||d>+O(r,a).toFixed(2)))return{x:u,y:g}}}}function u(t,n,A){var o=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(o,r))return A?0:[];for(var i=s.apply(0,t),a=s.apply(0,n),c=O(~~(i/5),1),u=O(~~(a/5),1),g=[],M=[],d={},p=A?0:[],I=0;I=0&&x<=1.001&&B>=0&&B<=1.001&&(A?p++:p.push({x:D.x,y:D.y,t1:R(x,1),t2:R(B,1)}))}}return p}function g(t,n,A){t=e._path2curve(t),n=e._path2curve(n);for(var o,r,i,a,s,c,l,g,M,d,p=A?0:[],I=0,h=t.length;IA)return A;for(;nr?n=o:A=o,o=(A-n)/2+n}return o}var c=3*e,l=3*(A-e)-c,u=1-c-l,g=3*n,M=3*(o-n)-g,d=1-g-M;return a(t,1/(200*r))}function I(t,e){var n=[],A={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(A[q(o)]=t[o],n.push(q(o)));n.sort(lt)}this.anim=A,this.top=n[n.length-1],this.percents=n}function h(n,A,o,r,i,a){o=q(o);var s,c,l,u,g,d,I=n.ms,h={},f={},E={};if(r)for(w=0,C=re.length;wr*n.top){o=n.percents[w],g=n.percents[w-1]||0,I=I/n.top*(o-g),u=n.percents[w+1],s=n.anim[o];break}r&&A.attr(n.anim[n.percents[w]])}if(s){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var D in s)if(s[y](D)&&(nt[y](D)||A.paper.customAttributes[y](D)))switch(h[D]=A.attr(D),null==h[D]&&(h[D]=et[D]),f[D]=s[D],nt[D]){case G:E[D]=(f[D]-h[D])/I;break;case"colour":h[D]=e.getRGB(h[D]);var x=e.getRGB(f[D]);E[D]={r:(x.r-h[D].r)/I,g:(x.g-h[D].g)/I,b:(x.b-h[D].b)/I};break;case"path":var B=St(h[D],f[D]),b=B[1];for(h[D]=B[0],E[D]=[],w=0,C=h[D].length;w',It=ht.firstChild,It.style.behavior="url(#default#VML)",!It||"object"!=typeof It.adj)return e.type=Q;ht=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=T=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=k.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e; +},e.angle=function(t,n,A,o,r,i){if(null==r){var a=t-A,s=n-o;return a||s?(180+180*Y.atan2(-s,-a)/V+360)%360:0}return e.angle(t,n,r,i)-e.angle(A,o,r,i)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,n,A){if(A=e.is(A,"finite")?A:10,e.is(t,X)){for(var o=t.length;o--;)if(F(t[o]-n)<=A)return t[o]}else{t=+t;var r=n%t;if(rt-A)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,D.win,n),D.win=n,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var ft=function(t){if(e.vml){var n,A=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var i=n.createTextRange();ft=o(function(t){try{n.style.color=v(t).replace(A,Q);var e=i.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),ft=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,Q).getPropertyValue("color")})}return ft(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Tt=function(){return"hsl("+[this.h,this.s,this.l]+")"},Nt=function(){return this.hex},wt=function(t,n,A){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(A=t.b,n=t.g,t=t.r),null==n&&e.is(t,P)){var o=e.getRGB(t);t=o.r,n=o.g,A=o.b}return(t>1||n>1||A>1)&&(t/=255,n/=255,A/=255),[t,n,A]},Ct=function(t,n,A,o){t*=255,n*=255,A*=255;var r={r:t,g:n,b:A,hex:e.rgb(t,n,A),toString:Nt};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Nt,t},e.hsb2rgb=function(t,e,n,A){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,A=t.o,t=t.h),t*=360;var o,r,i,a,s;return t=t%360/60,s=n*e,a=s*(1-F(t%2-1)),o=r=i=n-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,A)},e.hsl2rgb=function(t,e,n,A){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var o,r,i,a,s;return t=t%360/60,s=2*e*(n<.5?n:1-n),a=s*(1-F(t%2-1)),o=r=i=n-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,A)},e.rgb2hsb=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var A,o,r,i;return r=O(t,e,n),i=r-R(t,e,n),A=0==i?null:r==t?(e-n)/i:r==e?(n-t)/i+2:(t-e)/i+4,A=(A+360)%6*60/360,o=0==i?0:i/r,{h:A,s:o,b:r,toString:Et}},e.rgb2hsl=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var A,o,r,i,a,s;return i=O(t,e,n),a=R(t,e,n),s=i-a,A=0==s?null:i==t?(e-n)/s:i==e?(n-t)/s+2:(t-e)/s+4,A=(A+360)%6*60/360,r=(i+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:A,s:o,l:r,toString:Tt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=D.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},n.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(n),n.src=t};e.getRGB=o(function(t){if(!t||(t=v(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ft(t));var n,A,o,i,a,s,c=t.match(J);return c?(c[2]&&(o=$(c[2].substring(5),16),A=$(c[2].substring(3,5),16),n=$(c[2].substring(1,3),16)),c[3]&&(o=$((a=c[3].charAt(3))+a,16),A=$((a=c[3].charAt(2))+a,16),n=$((a=c[3].charAt(1))+a,16)),c[4]&&(s=c[4][S](At),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),A=q(s[1]),"%"==s[1].slice(-1)&&(A*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100)),c[5]?(s=c[5][S](At),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),A=q(s[1]),"%"==s[1].slice(-1)&&(A*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsb2rgb(n,A,o,i)):c[6]?(s=c[6][S](At),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),A=q(s[1]),"%"==s[1].slice(-1)&&(A*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsl2rgb(n,A,o,i)):(c={r:n,g:A,b:o,toString:r},c.hex="#"+(16777216|o|A<<8|n<<16).toString(16).slice(1),e.is(i,"finite")&&(c.opacity=i),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,n,A){return e.hsb2rgb(t,n,A).hex}),e.hsl=o(function(t,n,A){return e.hsl2rgb(t,n,A).hex}),e.rgb=o(function(t,e,n){function A(t){return t+.5|0}return"#"+(16777216|A(n)|A(e)<<8|A(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=yt(t);if(n.arr)return xt(n.arr);var A={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||v(t).replace(it,function(t,e,n){var r=[],i=e.toLowerCase();if(n.replace(st,function(t,e){e&&r.push(+e)}),"m"==i&&r.length>2&&(o.push([e][L](r.splice(0,2))),i="l",e="m"==e?"l":"L"),"r"==i)o.push([e][L](r));else for(;r.length>=A[i]&&(o.push([e][L](r.splice(0,A[i]))),A[i]););}),o.toString=e._path2string,n.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=xt(t)),n.length||v(t).replace(at,function(t,e,A){var o=[];k.call(e);A.replace(st,function(t,e){e&&o.push(+e)}),n.push([e][L](o))}),n.toString=e._path2string,n});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[y](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,A,o,r,i,a,s){var c=1-s,l=H(c,3),u=H(c,2),g=s*s,M=g*s,d=l*t+3*u*s*n+3*c*s*s*o+M*i,p=l*e+3*u*s*A+3*c*s*s*r+M*a,I=t+2*s*(n-t)+g*(o-2*n+t),h=e+2*s*(A-e)+g*(r-2*A+e),f=n+2*s*(o-n)+g*(i-2*o+n),E=A+2*s*(r-A)+g*(a-2*r+A),T=c*t+s*n,N=c*e+s*A,w=c*o+s*i,C=c*r+s*a,y=90-180*Y.atan2(I-f,h-E)/V;return(I>f||h=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var A=e.isPointInsideBBox;return A(n,t.x,t.y)||A(n,t.x2,t.y)||A(n,t.x,t.y2)||A(n,t.x2,t.y2)||A(t,n.x,n.y)||A(t,n.x2,n.y)||A(t,n.x,n.y2)||A(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return g(t,e)},e.pathIntersectionNumber=function(t,e){return g(t,e,1)},e.isPointInsidePath=function(t,n,A){var o=e.pathBBox(t);return e.isPointInsideBBox(o,n,A)&&g(t,[["M",n,A],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=St(t);for(var A,o=0,r=0,i=[],a=[],s=0,c=t.length;s1&&(f=Y.sqrt(f),n*=f,A*=f);var E=n*n,T=A*A,N=(i==a?-1:1)*Y.sqrt(F((E*T-E*h*h-T*I*I)/(E*h*h+T*I*I))),w=N*n*h/A+(t+s)/2,C=N*-A*I/n+(e+c)/2,y=Y.asin(((e-C)/A).toFixed(9)),D=Y.asin(((c-C)/A).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(F(x)>g){var B=D,b=s,m=c;D=y+g*(a&&D>y?1:-1),s=w+n*Y.cos(D),c=C+A*Y.sin(D),d=Qt(s,c,n,A,r,0,a,b,m,[D,B,w,C])}x=D-y;var Q=Y.cos(y),j=Y.sin(y),v=Y.cos(D),U=Y.sin(D),z=Y.tan(x/4),k=4/3*n*z,O=4/3*A*z,R=[t,e],H=[t+k*j,e-O*Q],G=[s+k*U,c-O*v],P=[s,c];if(H[0]=2*R[0]-H[0],H[1]=2*R[1]-H[1],l)return[H,G,P][L](d);d=[H,G,P][L](d).join()[S](",");for(var X=[],W=0,J=d.length;W"1e12"&&(g=.5),F(M)>"1e12"&&(M=.5),g>0&&g<1&&(s=jt(t,e,n,A,o,r,i,a,g),p.push(s.x),d.push(s.y)),M>0&&M<1&&(s=jt(t,e,n,A,o,r,i,a,M),p.push(s.x),d.push(s.y)),c=r-2*A+e-(a-2*r+A),l=2*(A-e)-2*(r-A),u=e-A,g=(-l+Y.sqrt(l*l-4*c*u))/2/c,M=(-l-Y.sqrt(l*l-4*c*u))/2/c,F(g)>"1e12"&&(g=.5),F(M)>"1e12"&&(M=.5),g>0&&g<1&&(s=jt(t,e,n,A,o,r,i,a,g),p.push(s.x),d.push(s.y)),M>0&&M<1&&(s=jt(t,e,n,A,o,r,i,a,M),p.push(s.x),d.push(s.y)),{min:{x:R[b](0,p),y:R[b](0,d)},max:{x:O[b](0,p),y:O[b](0,d)}}}),St=e._path2curve=o(function(t,e){var n=!e&&yt(t);if(!e&&n.curve)return xt(n.curve);for(var A=bt(t),o=e&&bt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var A,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][L](Qt[b](0,[e.x,e.y][L](t.slice(1))));break;case"S":"C"==n||"S"==n?(A=2*e.x-e.bx,o=2*e.y-e.by):(A=e.x,o=e.y),t=["C",A,o][L](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][L](mt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][L](mt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][L](Lt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][L](Lt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][L](Lt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][L](Lt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)l[e]="A",o&&(u[e]="A"),t.splice(e++,0,["C"][L](n.splice(0,6)));t.splice(e,1),p=O(A.length,o&&o.length||0)}},c=function(t,e,n,r,i){t&&e&&"M"==t[i][0]&&"M"!=e[i][0]&&(e.splice(i,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[i][1],n.y=t[i][2],p=O(A.length,o&&o.length||0))},l=[],u=[],g="",M="",d=0,p=O(A.length,o&&o.length||0);do){if(n&&!g.start){if(l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),u+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],r)return u;g.start=u,u=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,s[5],s[6]].join(),M+=c,i=+s[5],a=+s[6];continue}if(!t&&!n)return l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),{x:l.x,y:l.y,alpha:l.alpha}}M+=c,i=+s[5],a=+s[6]}u+=s.shift()+s}return g.end=u,l=t?M:n?g:e.findDotsAtSegment(i,a,s[0],s[1],s[2],s[3],s[4],s[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},ee=te(1),ne=te(),Ae=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return Ae(t,e).end;var A=Ae(t,n,1);return e?Ae(A,e).end:A},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var A=this.getPath();if(A)return e.getSubpath(A,t,n)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,n=Y.sqrt(.1734+e*e),A=n-e,o=H(F(A),1/3)*(A<0?-1:1),r=-n-e,i=H(F(r),1/3)*(r<0?-1:1),a=o+i+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*Y.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,n=7.5625,A=2.75;return t<1/A?e=n*t*t:t<2/A?(t-=1.5/A,e=n*t*t+.75):t<2.5/A?(t-=2.25/A,e=n*t*t+.9375):(t-=2.625/A,e=n*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],ie=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var n=+new Date,A=0;A1&&!o.next){for(i in g)g[y](i)&&(p[i]=o.totalOrigin[i]);o.el.attr(p),h(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&h(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&ie(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,A,o,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=A instanceof I?A:e.animation(A,o,r,i);h(s,a,s.percents[0],null,a.attr());for(var c=0,l=re.length;cs&&(s=l)}s+="%",!t[s].callback&&(t[s].callback=o)}return new I(t,n)},Zt.animate=function(t,n,A,o){var r=this;if(r.removed)return o&&o.call(r),r;var i=t instanceof I?t:e.animation(t,n,A,o);return h(i,r,i.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,R(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,A,o=[],r=0;if(null!=e)return h(t,this,-1,R(e,1)),this;for(n=re.length;r1)for(var A=0,o=n.length;A.5)-1;s(g-.5,2)+s(M-.5,2)>.25&&(M=r.sqrt(.25-s(g-.5,2))*o+.5)&&.5!=M&&(M=M.toFixed(5)-1e-5*o)}return u}),o=o.split(/\s*\-\s*/),"linear"==c){var T=o.shift();if(T=-A(T),isNaN(T))return null;var N=[0,0,r.cos(t.rad(T)),r.sin(t.rad(T))],w=1/(i(a(N[2]),a(N[3]))||1);N[2]*=w,N[3]*=w,N[2]<0&&(N[0]=-N[2],N[2]=0),N[3]<0&&(N[1]=-N[3],N[3]=0)}var C=t._parseDots(o);if(!C)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){f=I(c+"Gradient",{id:l}),e.gradient=f,I(f,"radial"==c?{fx:g,fy:M}:{x1:N[0],y1:N[1],x2:N[2],y2:N[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(f);for(var y=0,D=C.length;y1?v.opacity/100:v.opacity});case"stroke":v=t.getRGB(p),s.setAttribute(d,v.hex),"stroke"==d&&v[e]("opacity")&&I(s,{"stroke-opacity":v.opacity>1?v.opacity/100:v.opacity}),"stroke"==d&&A._.arrows&&("startString"in A._.arrows&&N(A,A._.arrows.startString),"endString"in A._.arrows&&N(A,A._.arrows.endString,1));break;case"gradient":("circle"==A.type||"ellipse"==A.type||"r"!=n(p).charAt())&&h(A,p);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&I(s,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(l.gradient){S=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,u)),S&&(U=S.getElementsByTagName("stop"),I(U[U.length-1],{"stop-opacity":p}));break}default:"font-size"==d&&(p=o(p,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=p,A._.dirty=1,s.setAttribute(d,p)}}x(A,r),s.style.visibility=g},D=1.2,x=function(A,r){if("text"==A.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var i=A.attrs,a=A.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(i.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,l=n(r.text).split("\n"),g=[],M=0,d=l.length;M"));var Z=X.getBoundingClientRect();f.W=g.w=(Z.right-Z.left)/W,f.H=g.h=(Z.bottom-Z.top)/W,f.X=g.x,f.Y=g.y+f.H/2,("x"in s||"y"in s)&&(f.path.v=t.format("m{0},{1}l{2},{1}",r(g.x*T),r(g.y*T),r(g.x*T)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=o.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),c=e+M+n),d}),r=r.split(/\s*\-\s*/),"linear"==s){var l=r.shift();if(l=-A(l),isNaN(l))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(i),i.on=!0,i.method="none",i.color=u[0].color,i.color2=u[u.length-1].color;for(var g=[],p=0,I=u.length;p')}}catch(t){Q=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,A=e.height,o=e.width,r=e.x,i=e.y;if(!n)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),c=s.style;return r=r||0,i=i||0,o=o||512,A=A||342,a.width=o,a.height=A,o==+o&&(o+="px"),A==+A&&(A+="px"),a.coordsize=1e3*T+M+1e3*T,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,A),1==n?(t._g.doc.body.appendChild(s),c.left=r+"px",c.top=i+"px",c.position="absolute"):n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var j=t.st;for(var v in m)m[e](v)&&!j[e](v)&&(j[v]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(v))}}.apply(e,A),!(void 0!==o&&(t.exports=o))}])})},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(o=(t+1)/2),A.splice(o,1),2===A.length)A=e.connection._buildStraightLinePathInfo();else{var r=A[1],i=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=A[0];a[1]=i.x,a[2]=i.y;var s=A[A.length-2],c=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),l=A[A.length-1];l[1]=c.x,l[2]=c.y}e.path.attr("path",A),e.remove()});var g=function(A,o){e.context.snapto&&(A-=A%10,o-=o%10);var a=this.ox+A,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),i=Math.round(t/2);var c=e.path.attr("path"),l=c.length,u=void 0,g=void 0,M=void 0,d=2*(n.length-1)-1;if(0===t||1===t){if(M=c[1],u=e.connection._buildFromFigureIntersetion({x:M[1],y:M[2]},!0),g=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(p){var I=n[n.length-1];I[1]=p.x,I[2]=p.y}}}else d!==t&&d!==t+1&&d!==t+2||(M=c[l-2],u=e.connection._buildToFigureIntersetion({x:a,y:s},!0),g=n[n.length-1]);u&&(g[1]=u.x,g[2]=u.y);var h=[];n.forEach(function(t,e){r?e===i?h.push(["L",a,s]):h.push(t):(h.push(t),e===i&&h.push(["L",a,s]))}),e.path.attr("path",h),e.connection._buildText()}},M=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,A=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(A);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(A);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(g,M,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var A=function(){function t(t,e){for(var n=0;n'}}]),e}(c.default);e.default=l},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}}]),e}(c.default);e.default=l},function(t,e){"use strict";function n(t){var e=i("消息提示",t);e.modal("show")}function A(t,e){var n=i("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function o(t,e,n){var A=i(t,e,[{name:"确认",click:function(){n.call(this)}}]);A.modal("show")}function r(t,e,n,A,o){var r=i(t,e,n,o);if(r.modal("show"),A){var a=!0,s=!1,c=void 0;try{for(var l,u=A[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var g=l.value;r.on(g.name,g.callback)}}catch(t){s=!0,c=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw c}}}}function i(t,e,n,A){var o=this,r="modal-dialog"+(A?" modal-lg":""),i=$(''),s=$('
    ');i.append(s);var c=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new l.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var A="_prop_container",o=$('
    ');this.canvasContainer.append(o);var i=$('');o.append(i),i.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),o.append(a),o.draggable();var c=$("#__prop_panel_tool__");c.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(c.removeClass("glyphicon-circle-arrow-left"),c.addClass("glyphicon-circle-arrow-down")):(c.removeClass("glyphicon-circle-arrow-down"),c.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return i(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void f.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void f.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void f.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,A=t.y,o=t.width,r=t.height,i=t.name;n=parseInt(n),A=parseInt(A),o=parseInt(o),r=parseInt(r);var a=n+o+10,s=A+r+10;this.context.resizePaper(a+50,s+50);var c=e._newNodeInstance(n,A,i);c.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;g.eventEmitter.on(g.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,A=!0,o=!1,r=void 0;try{for(var i,a=function(){var e=i.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},s=this.buttons[Symbol.iterator]();!(A=(i=s.next()).done);A=!0)a()}catch(t){o=!0,r=t}finally{try{!A&&s.return&&s.return()}finally{if(o)throw r}}var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$(''); +this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,A=void 0;try{for(var o,r=function(){var e=o.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){g.eventEmitter.emit(g.TRIGGER_TOOL,e.getType())})},i=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0)r()}catch(t){n=!0,A=t}finally{try{!e&&i.return&&i.return()}finally{if(n)throw A}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;g.eventEmitter.on(g.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof d.default){var A=n.name||n.text.attr("text"),o=$('
    '),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var A=$(this).val(),o=n.name,r=n.uuid,i=!1,a=!0,s=!1,c=void 0;try{for(var l,u=e.context.allFigures[Symbol.iterator]();!(a=(l=u.next()).done);a=!0){var g=l.value;if(g instanceof d.default&&g!==n&&g.name===A){i=!0;break}}}catch(t){s=!0,c=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw c}}return i?void f.alert("节点名已存在!"):(n.name=A,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=A,t.text.attr("text",A)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof I.default){var i=$('
    '),a=$('');i.append(a),t.propContainer.append(i),a.change(function(t){var A=$(this).val(),o=n.name,r=n.uuid,i=n.from.fromConnections,a=!1,s=!0,c=!1,l=void 0;try{for(var u,g=i[Symbol.iterator]();!(s=(u=g.next()).done);s=!0){var M=u.value;if(M!==n&&M.name===A){a=!0;break}}}catch(t){c=!0,l=t}finally{try{!s&&g.return&&g.return()}finally{if(c)throw l}}return a?void f.alert("连线名已存在"):(n.name=A,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=A,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
    '),c=$('');s.append(c),c.val(n.type),c.change(function(t){var A=$(this).val(),o=n.uuid,r=n.type;n.type=A,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=A,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),g.eventEmitter.on(g.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),g.eventEmitter.emit(g.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(f.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,A=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var i=o.value;if(i instanceof d.default){var a=i.validate();a&&t.push(a)}}}catch(t){n=!0,A=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw A}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",f.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,n){var A=n(254);"string"==typeof A&&(A=[[t.id,A,""]]);n(9)(A,{});A.locals&&(t.exports=A.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var A=n(260);"string"==typeof A&&(A=[[t.id,A,""]]);n(9)(A,{});A.locals&&(t.exports=A.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,A=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(A).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new A(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',A=function(e){t(e).on("click",n,this.close)};A.VERSION="3.3.7",A.TRANSITION_DURATION=150,A.prototype.close=function(e){function n(){i.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=t("#"===r?[]:r);e&&e.preventDefault(),i.length||(i=o.closest(".alert")),i.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",n).emulateTransitionEnd(A.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=A,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,A.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.button"),r="object"==typeof e&&e;o||A.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",A=this.$element,o=A.is("input")?"val":"html",r=A.data();e+="Text",null==r.resetText&&A.data("resetText",A[o]()),setTimeout(t.proxy(function(){A[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,A.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,A.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var A=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=A,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var A=t(n.target).closest(".btn");e.call(A,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),A.is("input,button")?A.trigger("focus"):A.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.carousel"),r=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e),i="string"==typeof e?e:r.slide;o||A.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):i?o[i]():r.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),A="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(A&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(n+o)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,A){var o=this.$element.find(".item.active"),r=A||this.getItemForDirection(e,o),i=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var g=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(g)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(g)),i&&this.cycle(),this}};var A=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=A,this};var o=function(n){var A,o=t(this),r=t(o.attr("data-target")||(A=o.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var i=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(i.interval=!1),e.call(r,i),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,A=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(A)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new A(this,r)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};A.VERSION="3.3.7",A.TRANSITION_DURATION=350,A.DEFAULTS={toggle:!0},A.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},A.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(A.TRANSITION_DURATION)[i](this.$element[0][s])}}}},A.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(A.TRANSITION_DURATION):o.call(this)}}},A.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},A.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,A){var o=t(A);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},A.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=A,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(A){var o=t(this);o.attr("data-target")||A.preventDefault();var r=e(o),i=r.data("bs.collapse"),a=i?"toggle":o.data();n.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var A=n&&t(n);return A&&A.length?A:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(r).each(function(){var A=t(this),o=e(A),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(A.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function A(e){return this.each(function(){var n=t(this),A=n.data("bs.dropdown");A||n.data("bs.dropdown",A=new i(this)),"string"==typeof e&&A[e].call(n)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};i.VERSION="3.3.7",i.prototype.toggle=function(A){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),i=r.hasClass("open");if(n(),!i){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(A=t.Event("show.bs.dropdown",a)),A.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var A=t(this);if(n.preventDefault(),n.stopPropagation(),!A.is(".disabled, :disabled")){var o=e(A),i=o.hasClass("open");if(!i&&27!=n.which||i&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),A.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var c=s.index(n.target);38==n.which&&c>0&&c--,40==n.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,A){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(A),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var i=o[r];if("click"==i)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=i){var a="hover"==i?"mouseenter":"focusin",s="hover"==i?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,A){n[t]!=A&&(e[t]=A)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var A=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!A)return;var o=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,c=s.test(a);c&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),u=r[0].offsetWidth,g=r[0].offsetHeight;if(c){var M=a,d=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+g>d.bottom?"top":"top"==a&&l.top-gd.width?"left":"left"==a&&l.left-ui.top+i.height&&(o.top=i.top+i.height-s)}else{var c=e.left-r,l=e.left+r+n;ci.right&&(o.left=i.left+i.width-l)}return o},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var A=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=A,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||A.data("bs.popover",o=new n(this,r)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var A=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=A,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,A){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,A),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var A=t(this),o=A.data("bs.scrollspy"),r="object"==typeof n&&n;o||A.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",A=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",A=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+A,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),A=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,i=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=A)return i!=(t=r[r.length-1])&&this.activate(t);if(i&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var i=A.find("> .active"),a=o&&t.support.transition&&(i.length&&i.hasClass("fade")||!!A.find("> .fade").length);i.length&&a?i.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),i.removeClass("in")};var A=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=A,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.affix"),r="object"==typeof e&&e;o||A.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.options=t.extend({},n.DEFAULTS,A),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,A){var o=this.$target.scrollTop(),r=this.$element.offset(),i=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-A&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),A=this.options.offset,o=A.top,r=A.bottom,i=Math.max(t(document).height(),t(document.body).height());"object"!=typeof A&&(r=o=A),"function"==typeof o&&(o=A.top(this.$element)),"function"==typeof r&&(r=A.bottom(this.$element));var a=this.getState(i,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),c=t.Event(s+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var A=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=A,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),A=n.data();A.offset=A.offset||{},null!=A.offsetBottom&&(A.offset.bottom=A.offsetBottom),null!=A.offsetTop&&(A.offset.top=A.offsetTop),e.call(n,A)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,A,o=t(this),r=n.handle?t(n.handle,o):o;r.on({mousedown:function(r){var i=r.target,a="",s=!1;if(i&&(a=i.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===i.tagName||"INPUT"===i.tagName||i&&"presentation"===t(i).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,o)))){var c=o.offset();e=r.pageX-c.left,A=r.pageY-c.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-A,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&i.push(u)}else{var I=u.rect,h=I.getBBox();(h.x>=n.x&&h.x<=n.x2||h.x2>=n.x&&h.x2<=n.x2)&&(h.y>=n.y&&h.y<=n.y2||h.y2>=n.y&&h.y2<=n.y2)&&s.push(u)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):i.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var A=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof u.default||e instanceof c.default)){var n=t.offsetX,A=t.offsetY,r=e._newNodeInstance(n,A);r&&!function(){var t=r.uuid,i=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(n,A,i),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof u.default){var e=o.currentConnection;if(e){var n=t.offsetX,A=t.offsetY;e.endX=n,e.endY=A,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>A&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof E.default&&e.select()}),t&&N.eventEmitter.emit(N.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),N.eventEmitter.emit(N.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return M.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,A=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(n=(r=i.next()).done);n=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){A=!0,o=t}finally{try{!n&&i.return&&i.return()}finally{if(A)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,A=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(n=(r=i.next()).done);n=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){A=!0,o=t}finally{try{!n&&i.return&&i.return()}finally{if(A)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;N.eventEmitter.on(N.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),N.eventEmitter.on(N.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var A=e.toJSON(),o=e.uuid,r=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,n=t.to.uuid,i=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(n),s=new E.default(i,{x:i.rect.attr("x"),y:i.rect.attr("y")});i.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(A)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(A),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),N.eventEmitter.on(N.ALIGN_CENTER,function(){var e=-1,n=-1,A=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;if(u instanceof E.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),A=u.rect.attr("width"),e+=A/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var A,r=o.keys()[Symbol.iterator]();!(t=(A=r.next()).done);t=!0){var i=A.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var A,r=o.keys()[Symbol.iterator]();!(t=(A=r.next()).done);t=!0){var i=A.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.ALIGN_MIDDLE,function(){var e=-1,n=-1,A=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var u=c.value;if(u instanceof E.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),A=u.rect.attr("height"),n+=A/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var A,r=o.keys()[Symbol.iterator]();!(t=(A=r.next()).done);t=!0){var i=A.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var A,r=o.keys()[Symbol.iterator]();!(t=(A=r.next()).done);t=!0){var i=A.value,a=M.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.UNIFY_SIZE,function(){var e=void 0,n=void 0,A=new Map,o=0,r=!0,i=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(l instanceof E.default)break;var u={oldWH:{w:l.rect.attr("width"),h:l.rect.attr("height")}};0===o?(e=l.rect.attr("width"),n=l.rect.attr("height")):l.changeSize(e,n),u.newWH={w:l.rect.attr("width"),h:l.rect.attr("height")},A.set(l.uuid,u),o++}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=A.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=g.getNodeByUUID(i),s=A.get(i),c=s.newWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=A.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=g.getNodeByUUID(i),s=A.get(i),c=s.oldWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new h.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,n){var A;!function(){"use strict";function o(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],A=-1,r=0,i=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(i=!0,t[e](),i=!1,this):this},{add:function(e){return i?this:(n.splice(A+1,n.length-A),n.push(e),r&&n.length>r&&o(n,0,-(r+1)),A=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=n[A];return o?(e(o,"undo"),A-=1,t&&t(),this):this},redo:function(){var o=n[A+1];return o?(e(o,"redo"),A+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],A=-1,t&&e>0&&t()},hasUndo:function(){return A!==-1},hasRedo:function(){return A>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=n(284).randomBytes;d=g=t&&function(){return t(16)},g()}catch(t){}}function s(t,e,n){var A=e&&n||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[A+o++]=f[t])});o<16;)e[A+o++]=0;return e}function c(t,e){var n=e||0,A=h;return A[t[n++]]+A[t[n++]]+A[t[n++]]+A[t[n++]]+"-"+A[t[n++]]+A[t[n++]]+"-"+A[t[n++]]+A[t[n++]]+"-"+A[t[n++]]+A[t[n++]]+"-"+A[t[n++]]+A[t[n++]]+A[t[n++]]+A[t[n++]]+A[t[n++]]+A[t[n++]]}function l(t,e,n){var A=e&&n||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,i=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=i-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||i>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=i,y=a,w=r,i+=122192928e5;var l=(1e4*(268435455&i)+a)%4294967296;o[A++]=l>>>24&255,o[A++]=l>>>16&255,o[A++]=l>>>8&255,o[A++]=255&l;var u=i/4294967296*1e4&268435455;o[A++]=u>>>8&255,o[A++]=255&u,o[A++]=u>>>24&15|16,o[A++]=u>>>16&255,o[A++]=r>>>8|128,o[A++]=255&r;for(var g=t.node||N,M=0;M<6;M++)o[A+M]=g[M];return e?e:c(o)}function u(t,e,n){var A=e&&n||0;"string"==typeof t&&(e="binary"===t?new I(16):null,t=null),t=t||{};var o=t.random||(t.rng||g)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[A+r]=o[r];return e||c(o)}var g,M,d,p;r?i():a();for(var I="function"==typeof o?o:Array,h=[],f={},E=0;E<256;E++)h[E]=(E+256).toString(16).substr(1),f[h[E]]=E;var T=g(),N=[1|T[0],T[1],T[2],T[3],T[4],T[5]],w=16383&(T[6]<<8|T[7]),C=0,y=0,D=u;D.v1=l,D.v4=u,D.parse=s,D.unparse=c,D.BufferClass=I,D._rng=g,D._mathRNG=M,D._nodeRNG=d,D._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=D:(A=function(){return D}.call(e,n,e,t),!(void 0!==A&&(t.exports=A)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,A){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function I(e){return+e!=e&&(e=0),t.alloc(+e)}function h(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var A=e.length;if(0===A)return 0;for(var o=!1;;)switch(n){case"ascii":case"latin1":case"binary":return A;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*A;case"hex":return A>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;n=(""+n).toLowerCase(),o=!0}}function f(t,e,n){var A=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return v(this,e,n);case"utf8":case"utf-8":return L(this,e,n);case"ascii":return Q(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return b(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,n);default:if(A)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),A=!0}}function E(t,e,n){var A=t[e];t[e]=t[n],t[n]=A}function T(e,n,A,o,r){if(0===e.length)return-1;if("string"==typeof A?(o=A,A=0):A>2147483647?A=2147483647:A<-2147483648&&(A=-2147483648),A=+A,isNaN(A)&&(A=r?0:e.length-1),A<0&&(A=e.length+A),A>=e.length){if(r)return-1;A=e.length-1}else if(A<0){if(!r)return-1;A=0}if("string"==typeof n&&(n=t.from(n,o)),t.isBuffer(n))return 0===n.length?-1:N(e,n,A,o,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,A):Uint8Array.prototype.lastIndexOf.call(e,n,A):N(e,[n],A,o,r); +throw new TypeError("val must be string, number or Buffer")}function N(t,e,n,A,o){function r(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==A&&(A=String(A).toLowerCase(),"ucs2"===A||"ucs-2"===A||"utf16le"===A||"utf-16le"===A)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,n/=2}var c;if(o){var l=-1;for(c=n;ca&&(n=a-s),c=n;c>=0;c--){for(var u=!0,g=0;go&&(A=o)):A=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");A>r/2&&(A=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(o+a<=n){var s,c,l,u;switch(a){case 1:r<128&&(i=r);break;case 2:s=t[o+1],128===(192&s)&&(u=(31&r)<<6|63&s,u>127&&(i=u));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(u=(15&r)<<12|(63&s)<<6|63&c,u>2047&&(u<55296||u>57343)&&(i=u));break;case 4:s=t[o+1],c=t[o+2],l=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&l)&&(u=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&l,u>65535&&u<1114112&&(i=u))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,A.push(i>>>10&1023|55296),i=56320|1023&i),A.push(i),o+=a}return m(A)}function m(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",A=0;AA)&&(n=A);for(var o="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function z(e,n,A,o,r,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function k(t,e,n,A){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-n,2);o>>8*(A?o:1-o)}function Y(t,e,n,A){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-n,4);o>>8*(A?o:3-o)&255}function O(t,e,n,A,o,r){if(n+A>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function R(t,e,n,A,o){return o||O(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,A,23,4),n+4}function F(t,e,n,A,o){return o||O(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,A,52,8),n+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,A=t.length,o=null,r=[],i=0;i55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(i+1===A){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){for(var e=[],n=0;n>8,o=n%256,r.push(o),r.push(A);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,n,A){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=I,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==A.TYPED_ARRAY_SUPPORT?A.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return c(null,t,e,n)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var A=e.length,o=n.length,r=0,i=Math.min(A,o);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,A,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===A&&(A=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),n<0||A>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&n>=A)return 0;if(o>=r)return-1;if(n>=A)return 1;if(n>>>=0,A>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var i=r-o,a=A-n,s=Math.min(i,a),c=this.slice(o,r),l=e.slice(n,A),u=0;uo)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");A||(A="utf8");for(var r=!1;;)switch(A){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return C(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return D(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+A);A=(""+A).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var A=this.length;e=~~e,n=void 0===n?A:~~n,e<0?(e+=A,e<0&&(e=0)):e>A&&(e=A),n<0?(n+=A,n<0&&(n=0)):n>A&&(n=A),n0&&(o*=256);)A+=this[t+--e]*o;return A},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var A=this[t],o=1,r=0;++r=o&&(A-=Math.pow(2,8*e)),A},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var A=e,o=1,r=this[t+--A];A>0&&(o*=256);)r+=this[t+--A]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,A){if(t=+t,e|=0,n|=0,!A){var o=Math.pow(2,8*n)-1;z(this,t,e,n,o,0)}var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+n},t.prototype.writeUInt8=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):k(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):k(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Y(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,A){if(t=+t,e|=0,!A){var o=Math.pow(2,8*n-1);z(this,t,e,n,o-1,-o)}var r=0,i=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,A){if(t=+t,e|=0,!A){var o=Math.pow(2,8*n-1);z(this,t,e,n,o-1,-o)}var r=n-1,i=1,a=0;for(this[e+r]=255&t;--r>=0&&(i*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/i>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):k(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):k(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Y(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,A){return e=+e,n|=0,A||z(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return R(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return R(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.copy=function(e,n,A,o){if(A||(A=0),o||0===o||(o=this.length),n>=e.length&&(n=e.length),n||(n=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n=0;--r)e[r+n]=this[r+A];else if(i<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,A=void 0===A?this.length:A>>>0,e||(e=0);var i;if("number"==typeof e)for(i=n;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function A(t){return 3*t.length/4-n(t)}function o(t){var e,A,o,r,i,a,s=t.length;i=n(t),a=new l(3*s/4-i),o=i>0?s-4:s;var u=0;for(e=0,A=0;e>16&255,a[u++]=r>>8&255,a[u++]=255&r;return 2===i?(r=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[u++]=255&r):1===i&&(r=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function i(t,e,n){for(var A,o=[],i=e;il?l:c+a));return 1===A?(e=t[n-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===A&&(e=(t[n-2]<<8)+t[n-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=A,e.toByteArray=o,e.fromByteArray=a;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,M=u.length;g>1,l=-7,u=n?o-1:0,g=n?-1:1,M=t[e+u];for(u+=g,r=M&(1<<-l)-1,M>>=-l,l+=a;l>0;r=256*r+t[e+u],u+=g,l-=8);for(i=r&(1<<-l)-1,r>>=-l,l+=A;l>0;i=256*i+t[e+u],u+=g,l-=8);if(0===r)r=1-c;else{if(r===s)return i?NaN:(M?-1:1)*(1/0);i+=Math.pow(2,A),r-=c}return(M?-1:1)*i*Math.pow(2,r-A)},e.write=function(t,e,n,A,o,r){var i,a,s,c=8*r-o-1,l=(1<>1,g=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,M=A?0:r-1,d=A?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),e+=i+u>=1?g/s:g*Math.pow(2,1-u),e*s>=2&&(i++,s/=2),i+u>=l?(a=0,i=l):i+u>=1?(a=(e*s-1)*Math.pow(2,o),i+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,o),i=0));o>=8;t[n+M]=255&a,M+=d,a/=256,o-=8);for(i=i<0;t[n+M]=255&i,M+=d,i/=256,c-=8);t[n+M-d]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function A(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var i=n(300)(e);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){A("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,A){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new A(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function A(t){return function(){var n=[],A={update:function(t,A){return e.isBuffer(t)||(t=new e(t,A)),n.push(t),this},digest:function(A){var o=e.concat(n),r=t(o);return n=null,A?r.toString(A):r}};return A}}var o=n(288),r=A(n(296)),i=A(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new i:o(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},A=n(280).Buffer,o=n(289)(A);e.sha1=n(290)(A,o),e.sha256=n(294)(A,o),e.sha512=n(295)(A,o)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var A=this._len+=e.length,o=this._s=this._s||0,r=0,i=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var A=n(291).inherits;t.exports=function(t,e){function n(){return d.length?d.pop().init():this instanceof n?(this._w=M,e.call(this,64,56),this._h=null,void this.init()):new n}function o(t,e,n,A){return t<20?e&n|~e&A:t<40?e^n^A:t<60?e&n|e&A|n&A:e^n^A}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function i(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,c=4,l=8,u=12,g=16,M=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return A(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=d,n.prototype._update=function(t){var e,n,A,s,c,l,u,g,M,d;e=l=this._a,n=u=this._b,A=g=this._c,s=M=this._d,c=d=this._e;for(var p=this._w,I=0;I<80;I++){var h=p[I]=I<16?t.readInt32BE(4*I):a(p[I-3]^p[I-8]^p[I-14]^p[I-16],1),f=i(i(a(e,5),o(I,n,A,s)),i(i(c,h),r(I)));c=s,s=A,A=a(n,30),n=e,e=f}this._a=i(e,l),this._b=i(n,u),this._c=i(A,g),this._d=i(s,M),this._e=i(c,d)},n.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,g),e},n}},function(t,e,n){(function(t,A){function o(t,n){var A={seen:[],stylize:i};return arguments.length>=3&&(A.depth=arguments[2]),arguments.length>=4&&(A.colors=arguments[3]),p(n)?A.showHidden=n:n&&e._extend(A,n),N(A.showHidden)&&(A.showHidden=!1),N(A.depth)&&(A.depth=2),N(A.colors)&&(A.colors=!1),N(A.customInspect)&&(A.customInspect=!0),A.colors&&(A.stylize=r),s(A,t,A.depth)}function r(t,e){var n=o.styles[e];return n?"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m":t}function i(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function s(t,n,A){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(A,t);return E(o)||(o=s(t,o,A)),o}var r=c(t,n);if(r)return r;var i=Object.keys(n),p=a(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(n)),D(n)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return l(n);if(0===i.length){if(x(n)){var I=n.name?": "+n.name:"";return t.stylize("[Function"+I+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return t.stylize(Date.prototype.toString.call(n),"date");if(D(n))return l(n)}var h="",f=!1,T=["{","}"];if(d(n)&&(f=!0,T=["[","]"]),x(n)){var N=n.name?": "+n.name:"";h=" [Function"+N+"]"}if(w(n)&&(h=" "+RegExp.prototype.toString.call(n)),y(n)&&(h=" "+Date.prototype.toUTCString.call(n)),D(n)&&(h=" "+l(n)),0===i.length&&(!f||0==n.length))return T[0]+h+T[1];if(A<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var C;return C=f?u(t,n,A,p,i):i.map(function(e){return g(t,n,A,p,e,f)}),t.seen.pop(),M(C,h,T)}function c(t,e){if(N(e))return t.stylize("undefined","undefined");if(E(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return f(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):I(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,A,o){for(var r=[],i=0,a=e.length;i-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),N(i)){if(r&&o.match(/^\d+$/))return a;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+a}function M(t,e,n){var A=0,o=t.reduce(function(t,e){return A++,e.indexOf("\n")>=0&&A++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function d(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function I(t){return null===t}function h(t){return null==t}function f(t){return"number"==typeof t}function E(t){return"string"==typeof t}function T(t){return"symbol"==typeof t}function N(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===b(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===b(t)}function D(t){return C(t)&&("[object Error]"===b(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function b(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function m(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function Q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(A[n++]);case"%d":return Number(A[n++]);case"%j":try{return JSON.stringify(A[n++])}catch(t){return"[Circular]"}default:return t}}),a=A[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function i(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function s(t){return o(t,2)^o(t,13)^o(t,22)}function c(t){return o(t,6)^o(t,11)^o(t,25)}function l(t){return o(t,7)^o(t,18)^r(t,3)}function u(t){return o(t,17)^o(t,19)^r(t,10)}var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],M=new Array(64);return A(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,A,o,r,M,d,p,I,h,f=this._w;e=0|this._a,n=0|this._b,A=0|this._c,o=0|this._d,r=0|this._e,M=0|this._f,d=0|this._g,p=0|this._h;for(var E=0;E<64;E++){var T=f[E]=E<16?t.readInt32BE(4*E):u(f[E-2])+f[E-7]+l(f[E-15])+f[E-16];I=p+c(r)+i(r,M,d)+g[E]+T,h=s(e)+a(e,n,A),p=d,d=M,M=r,r=o+I,o=A,A=n,n=e,e=I+h}this._a=e+this._a|0,this._b=n+this._b|0,this._c=A+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=M+this._f|0,this._g=d+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var A=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function i(t,e,n){return t&e^t&n^e&n}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return A(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,A,s,c,l,u,g,M,d,p,I,h,f,E,T,N=this._w;e=0|this._a,n=0|this._b,A=0|this._c,s=0|this._d,c=0|this._e,l=0|this._f,u=0|this._g,g=0|this._h,M=0|this._al,d=0|this._bl,p=0|this._cl,I=0|this._dl,h=0|this._el,f=0|this._fl,E=0|this._gl,T=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=N[D]=t.readInt32BE(4*D),y=N[D+1]=t.readInt32BE(4*D+4);else{var x=N[D-30],B=N[D-30+1],b=o(x,B,1)^o(x,B,8)^x>>>7,L=o(B,x,1)^o(B,x,8)^o(B,x,7);x=N[D-4],B=N[D-4+1];var m=o(x,B,19)^o(B,x,29)^x>>>6,Q=o(B,x,19)^o(x,B,29)^o(B,x,6),j=N[D-14],v=N[D-14+1],S=N[D-32],U=N[D-32+1];y=L+v,C=b+j+(y>>>0>>0?1:0),y+=Q,C=C+m+(y>>>0>>0?1:0),y+=U,C=C+S+(y>>>0>>0?1:0),N[D]=C,N[D+1]=y}var z=i(e,n,A),k=i(M,d,p),Y=o(e,M,28)^o(M,e,2)^o(M,e,7),O=o(M,e,28)^o(e,M,2)^o(e,M,7),R=o(c,h,14)^o(c,h,18)^o(h,c,9),F=o(h,c,14)^o(h,c,18)^o(c,h,9),H=a[D],V=a[D+1],G=r(c,l,u),P=r(h,f,E),X=T+F,W=g+R+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=O+k,Z=Y+z+(J>>>0>>0?1:0);g=u,T=E,u=l,E=f,l=c,f=h,h=I+X|0,c=s+W+(h>>>0>>0?1:0)|0,s=A,I=p,A=n,p=d,n=e,d=M,M=X+J|0,e=W+Z+(M>>>0>>0?1:0)|0}this._al=this._al+M|0,this._bl=this._bl+d|0,this._cl=this._cl+p|0,this._dl=this._dl+I|0,this._el=this._el+h|0,this._fl=this._fl+f|0,this._gl=this._gl+E|0,this._hl=this._hl+T|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+A+(this._cl>>>0

    >>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+c+(this._el>>>0>>0?1:0)|0,this._f=this._f+l+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+g+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,A){n.writeInt32BE(t,A),n.writeInt32BE(e,A+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function A(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,A=-271733879,o=-1732584194,l=271733878,u=0;u>16)+(e>>16)+(n>>16);return A<<16|65535&n}function l(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,A,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var A=t.length+(r-t.length%r);t=e.concat([t,i],A)}for(var o=[],a=n?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var A=p(t),o=8*t.length,r=8*t.length;A[o>>>5]|=128<<24-o%32,A[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var i=0;i>>24)|4278255360&(a<<24|a>>>8)}var s=I(n);return new e(s)}t.exports=s;var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],M=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,A=0;n>>5]|=t[n]<<24-A%32;return e},I=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},h=function(t,e,s){for(var p=0;p<16;p++){var I=s+p,h=e[I];e[I]=16711935&(h<<8|h>>>24)|4278255360&(h<<24|h>>>8)}var f,E,T,N,w,C,y,D,x,B;C=f=t[0],y=E=t[1],D=T=t[2],x=N=t[3],B=w=t[4];for(var b,p=0;p<80;p+=1)b=f+e[s+c[p]]|0,b+=p<16?n(E,T,N)+M[0]:p<32?A(E,T,N)+M[1]:p<48?o(E,T,N)+M[2]:p<64?r(E,T,N)+M[3]:i(E,T,N)+M[4],b|=0,b=a(b,u[p]),b=b+w|0,f=w,w=N,N=a(T,10),T=E,E=b,b=C+e[s+l[p]]|0,b+=p<16?i(y,D,x)+d[0]:p<32?r(y,D,x)+d[1]:p<48?o(y,D,x)+d[2]:p<64?A(y,D,x)+d[3]:n(y,D,x)+d[4],b|=0,b=a(b,g[p]),b=b+B|0,C=B,B=x,x=a(D,10),D=y,y=b;b=t[1]+T+x|0,t[1]=t[2]+N+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+f+y|0,t[4]=t[0]+E+D|0,t[0]=b}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function A(t,n){if(!(this instanceof A))return new A(t,n);this._opad=s,this._alg=t;var i="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>i?n=o(t).update(n).digest():n.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,a);for(var p=1;pe&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,A){e.push(c.default.createElement("button",{type:"button",key:A,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},c.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,A="modal-dialog"+(n?" modal-lg":"");return c.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},c.default.createElement("div",{className:A},c.default.createElement("div",{className:"modal-content"},c.default.createElement("div",{className:"modal-header"},c.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),c.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,c.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),c.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),c.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=g},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var o=n(240),r=A(o);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c=function(){function t(t,e){for(var n=0;n ul > li");A.is(":visible")?(A.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(A.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var o=this.props.expandLevel;if(A._level>=o){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(A)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var A="treenodemenu"+t.id;e.contextmenu({target:"#"+A})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,A=e.dispatch,o=n.children,r="node-"+n.id,i="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(h.default,{items:n.contextMenu,key:n.id,data:n,dispatch:A,menuId:i})),o&&o.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(p.default,{dispatch:A,children:o,expandLevel:this.props.expandLevel}));var c=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var A=window._server+n.editorPath+"?file="+n.fullPath;E.eventEmitter.emit(E.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:A,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof c?"undefined":s(c))?c.v:void 0}}]),e}(l.Component);e.default=T},function(t,e,n){"use strict";function A(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;na{color:#3c763d}.nav-tabs li.bv-tab-error>a{color:#a94442}.bv-form .bv-icon-no-label{top:0}.bv-form .bv-icon-input-group{top:0;z-index:100}",""])},,,,,,function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case s.LOAD_MASTER_COMPLETED:return Object.assign({},t.prototype,{data:e.masterData});case s.DEL_MASTER:var n=e.rowIndex,A=[].concat(o(t.data));return A.splice(n,1),Object.assign({},t.prototype,{data:A});case s.ADD_MASTER:var A=[];t.data&&(A=[].concat(o(t.data)));var r=e.data,i=null;return A.forEach(function(t,e){if(t.id===r.id)return i="当前包采用的编码已存在,添加失败.",!1}),i?(bootbox.alert(i),t):(r.resourceItems=[],r.createDate=new Date,A.push(r),Object.assign({},t.prototype,{data:A}));case s.UPDATE_MASTER:var A=[].concat(o(t.data)),a=e.data,c=A[a.rowIndex];return c.name=a.packageName,Object.assign({},t.prototype,{data:A});case s.SAVE:return s.saveData(t.data,e.newVersion,e.project),t;default:return t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case s.LOAD_SLAVE_COMPLETE:return Object.assign({},t.prototype,{data:e.masterRowData});case s.DEL_SLAVE:var n=e.rowIndex,A=Object.assign({},t.data);return A.resourceItems.splice(n,1),Object.assign({},t.prototype,{data:A});case s.ADD_SLAVE:var A=Object.assign({},t.data),o=e.data;return A.resourceItems.push(o),Object.assign({},t.prototype,{data:A});case s.UPDATE_SLAVE:var A=Object.assign({},t.data),o=e.data,n=o.rowIndex,r=A.resourceItems[n];return r.name=o.name,r.path=o.path,r.version=o.version,Object.assign({},t.prototype,{data:A});default:return t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(456),s=A(a),c=n(183);e.default=(0,c.combineReducers)({master:r,slave:i})},function(t,e,n){"use strict";function A(t,e){return{newVersion:t,project:e,type:m}}function o(t,e,n){$.ajax({url:window._server+"/packageeditor/refreshKnowledgeCache",data:{project:t,packageId:e,files:n},type:"POST",success:function(n){var A=n.clientInfo;A?bootbox.confirm('

    发布操作成功!

    项目['+t+']中配置了如下客户端:
    '+A+"
    是否将此次更新的知识包推送到这些客户端中?",function(n){if(n){var A=window.parent.componentEvent;A.eventEmitter.emit(A.SHOW_LOADING),$.ajax({url:window._server+"/packageeditor/pushKnowledgePackageToClients",data:{project:t,packageId:e},type:"POST",success:function(t){A.eventEmitter.emit(A.HIDE_LOADING),bootbox.alert('
    '+t.info+"
    ")},error:function(){A.eventEmitter.emit(A.HIDE_LOADING),alert("推送到客户端操作失败!")}})}}):bootbox.alert("刷新知识包["+e+"]操作成功!")},error:function(){alert("发布知识包失败!")}})}function r(t,e,n){var A='';A+="";return t.forEach(function(t,e){A+="";var n=t.resourceItems;n.forEach(function(t,e){A+=""}),A+=""}),A+="",$.ajax({url:window._server+"/packageeditor/saveResourcePackages",type:"POST",data:{xml:A,project:n,newVersion:e},success:function(){bootbox.alert("保存成功!")},error:function(t){401===t.status?alert("权限不足,不能进行此操作."):alert("服务端错误,操作失败!")}}),{type:Q}}function i(t){return{type:y,data:t}}function a(t){return{type:D,data:t}}function s(t){return{rowIndex:t,type:x}}function c(t){return{rowIndex:t,type:L}}function l(t){return{type:B,data:t}}function u(t){return{type:b,data:t}}function g(t){return function(e){var n=window._server+"/packageeditor/loadPackages";$.ajax({url:n,type:"POST",data:{project:t},success:function(t){e({type:w,masterData:t})},error:function(){alert("加载数据失败.")}})}}function M(t,e){var n=window._server+"/packageeditor/loadForTestVariableCategories";$.ajax({url:n,type:"POST",data:{files:t},success:function(t){T(t),e(t)},error:function(){var e=window.parent.componentEvent;e.eventEmitter.emit(e.HIDE_LOADING),alert("加载文件["+t+"]失败.")}})}function d(t,e){var n=window._server+"/packageeditor/loadFlows";$.ajax({url:n,data:{files:t},type:"POST",success:function(t){e(t)},error:function(){var t=window.parent.componentEvent;t.eventEmitter.emit(t.HIDE_LOADING),alert("加载决策流信息失败.")}})}function p(t){return{type:C,masterRowData:t}}function I(t,e,n){var A=window._server+"/packageeditor/doTest";$.ajax({url:A,type:"POST",data:{files:t,data:JSON.stringify(e)},success:function(t){n(t)},error:function(t){var e=window.parent.componentEvent;e.eventEmitter.emit(e.HIDE_LOADING),t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function h(t,e){var n=window._server+"/packageeditor/doBatchTest";$.ajax({url:n,type:"POST",data:{files:t},success:function(t){e(t);var n=window.parent.componentEvent;n.eventEmitter.emit(n.HIDE_LOADING)},error:function(){var t=window.parent.componentEvent;t.eventEmitter.emit(t.HIDE_LOADING),alert("批量测试操作失败.")}})}function f(t,e,n,A){var o=window._server+"/packageeditor/doTest";$.ajax({url:o,type:"POST",data:{files:t,flowId:n,data:JSON.stringify(e)},success:function(t){A(t)},error:function(){var t=window.parent.componentEvent;t.eventEmitter.emit(t.HIDE_LOADING),alert("仿真测试操作失败!")}})}function E(t){var e=window._server+"/packageeditor/exportExcelTemplate";window.open(e,"_self")}function T(t){t.forEach(function(t,e){var n=t.variables;n&&n.forEach(function(t,e){"Integer"===t.type||"Double"===t.type||"Long"===t.type||"Float"===t.type||"BigDecimal"===t.type?t._editorType="number":"Boolean"===t.type?t._editorType="boolean":"Date"===t.type?t._editorType="date":"List"===t.type||"Set"===t.type?t._editorType="list":t._editorType="string"})})}Object.defineProperty(e,"__esModule",{value:!0}),e.SAVE_COMPLETED=e.SAVE=e.DEL_SLAVE=e.UPDATE_SLAVE=e.ADD_SLAVE=e.DEL_MASTER=e.UPDATE_MASTER=e.ADD_MASTER=e.LOAD_SLAVE_COMPLETE=e.LOAD_MASTER_COMPLETED=void 0,e.save=A,e.refreshKnowledgeCache=o,e.saveData=r,e.addMaster=i,e.updateMaster=a,e.deleteMaster=s,e.deleteSlave=c,e.addSlave=l,e.updateSlave=u,e.loadMasterData=g,e.loadSimulatorCategoryData=M,e.loadFlows=d,e.loadSlaveData=p,e.doTest=I,e.doBatchTest=h,e.testFlow=f,e.exportExcelTemplate=E,e.buildSimulatorVariableEditorType=T;var N=n(226),w=e.LOAD_MASTER_COMPLETED="load_master_completed",C=e.LOAD_SLAVE_COMPLETE="load_slave_completed",y=e.ADD_MASTER="add_master",D=e.UPDATE_MASTER="update_master",x=e.DEL_MASTER="del_master",B=e.ADD_SLAVE="add_slave",b=e.UPDATE_SLAVE="update_slave",L=e.DEL_SLAVE="del_slave",m=e.SAVE="save",Q=e.SAVE_COMPLETED="save_completed"},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return{masterData:t.master.data||[],masterRowData:t.slave.data||{}}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var n=0;n0){var e="",n=0,A=!0,o=!1,i=void 0;try{for(var a,s=t.currentPackage.resourceItems[Symbol.iterator]();!(A=(a=s.next()).done);A=!0){var c=a.value;if(!c.path)return void bootbox.alert("当前知识包有未定义具体文件的项目,不能进行此操作!");var l=c.path;"LATEST"!==c.version&&(l+=":"+c.version),n>0&&(e+=";"),e+=l,n++}}catch(t){o=!0,i=t}finally{try{!A&&s.return&&s.return()}finally{if(o)throw i}}f.refreshKnowledgeCache(r,t.currentPackage.id,e)}else bootbox.alert("请先选择一个知识包!")}},u.default.createElement("i",{className:"glyphicon glyphicon-cloud-upload"})," 发布当前知识包"),u.default.createElement("button",{className:"btn btn-danger",type:"button",onClick:function(){if(t.currentPackage){var e=window.parent.componentEvent;e.eventEmitter.emit(e.SHOW_LOADING),y.eventEmitter.emit(y.OPEN_SIMULATOR_DIALOG,t.currentPackage)}else bootbox.alert("请先选择一个知识包!")}},u.default.createElement("i",{className:"glyphicon glyphicon-flash"})," 仿真测试"))),u.default.createElement(d.default,{headers:a,dispatch:o,rows:n,operationConfig:c,rowClick:function(e){t.currentPackage=e,setTimeout(function(){o(f.loadSlaveData(e))},100)}})),u.default.createElement("div",null,u.default.createElement("div",{style:{margin:"2px"}},u.default.createElement("div",{className:"btn-group btn-group-sm",style:{margin:"2px"}},u.default.createElement("button",{className:"btn btn-primary",type:"button",onClick:function(t){A.resourceItems?y.eventEmitter.emit(y.OPEN_CREATE_PACKAGE_ITEM_DIALOG,{create:!0,title:"添加包["+A.name+"]中的知识文件"}):bootbox.alert("请先选择一个知识包!")}},u.default.createElement("i",{className:"fa fa-plus-square"})," 添加文件"))),u.default.createElement(d.default,{headers:s,dispatch:o,operationConfig:l,rows:A.resourceItems||[]}))))}}]),e}(l.Component);e.default=(0,g.connect)(s)(O)},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0&&(A+=";"),A+=t.path+","+t.version}),T.loadSimulatorCategoryData(A,function(t){var e=window.parent.componentEvent;e.eventEmitter.emit(e.HIDE_LOADING),window.simulatorCategoryData=t,this.setState({simulatorCategoryData:t,simulatorCategoryRow:t.length>0?t[0]:[]})}.bind(t)),t.setState({files:A,title:"对知识包["+e.name+"]进行仿真测试"}),$(g.default.findDOMNode(t)).modal({show:!0,backdrop:"static",keyboard:!1})}),f.eventEmitter.on(f.HIDE_SIMULATOR_DIALOG,function(){$(g.default.findDOMNode(t)).modal("hide")}),f.eventEmitter.on(f.REFRESH_SIMULATOR_DATA,function(e){var n=e.info,A=e.data;T.buildSimulatorVariableEditorType(A),t.setState({simulatorCategoryData:A,simulatorCategoryRow:A.length>0?A[0]:{},testResultinfo:"测试结果:"+n})})}},{key:"componentWillUnmount",value:function(){f.eventEmitter.removeAllListeners(f.OPEN_SIMULATOR_DIALOG),f.eventEmitter.removeAllListeners(f.HIDE_SIMULATOR_DIALOG),f.eventEmitter.removeAllListeners(f.REFRESH_SIMULATOR_DATA)}},{key:"render",value:function(){var t=this;if(this.state.simulatorCategoryData.length>0){var e=[{id:"tm-name",name:"name",label:"类型名称",filterable:!0}],n=[{id:"ts-defaultValue",name:"defaultValue",label:"值",editable:!0,width:"200px"},{id:"ts-label",name:"label",filterable:!0,label:"标题"},{id:"ts-type",name:"type",label:"数据类型",width:"100px"}],A=l.default.createElement("div",{style:{minHeight:"400px"}},l.default.createElement("div",{style:{padding:"8px",marginBottom:"5px",border:"solid 1px rgb(219, 215, 215)",borderRadius:"5px"}},l.default.createElement("div",{className:"btn-group btn-group-sm",style:{margin:"2px"}},l.default.createElement("button",{className:"btn btn-primary",type:"button",onClick:function(e){var n=window.parent.componentEvent;n.eventEmitter.emit(n.SHOW_LOADING),T.doTest(t.state.files,t.state.simulatorCategoryData,function(t){var e="测试结果:"+t.info;bootbox.alert(e);var A=t.data;T.buildSimulatorVariableEditorType(A),this.setState({simulatorCategoryData:A,simulatorCategoryRow:A.length>0?A[0]:{},testResultinfo:e}),n.eventEmitter.emit(n.HIDE_LOADING)}.bind(t))}},l.default.createElement("i",{className:"glyphicon glyphicon-flash"})," 测试决策包")),l.default.createElement("div",{className:"btn-group btn-group-sm",style:{margin:"2px"}},l.default.createElement("button",{className:"btn btn-info",type:"button",onClick:function(e){var n=window.parent.componentEvent;n.eventEmitter.emit(n.SHOW_LOADING),f.eventEmitter.emit(f.OPEN_FLOW_DIALOG,{files:t.state.files,data:t.state.simulatorCategoryData})}},l.default.createElement("i",{className:"glyphicon glyphicon-random"})," 测试决策流")),l.default.createElement("div",{className:"btn-group btn-group-sm",style:{margin:"2px"}},l.default.createElement("button",{className:"btn btn-success",type:"button",onClick:function(e){f.eventEmitter.emit(f.OPEN_RETE_DIAGRAM_DIALOG,t.state.files)}},l.default.createElement("i",{className:"glyphicon glyphicon-tree-conifer"})," 查看Rete树")),l.default.createElement("div",{className:"btn-group btn-group-sm", +style:{margin:"2px"}},l.default.createElement("button",{className:"btn btn-warning",type:"button",onClick:function(){T.exportExcelTemplate(t.state.files)}},l.default.createElement("i",{className:"glyphicon glyphicon-download"})," 下载Excel测试数据模版"),l.default.createElement("button",{className:"btn btn-danger",type:"button",onClick:function(){f.eventEmitter.emit(f.OPEN_IMPORT_EXCEL_DIALOG,t.state.files)}},l.default.createElement("i",{className:"glyphicon glyphicon-upload"})," 上传Excel测试数据"))),l.default.createElement("div",{className:"row",style:{margin:0}},l.default.createElement("div",{className:"col-xs-3 col-md-3",style:{paddingLeft:0,paddingRight:"5px"}},l.default.createElement(d.default,{selectFirst:!0,headers:e,rows:this.state.simulatorCategoryData,rowClick:function(e,n){var A=t.state.simulatorCategoryData;setTimeout(function(){this.setState({simulatorCategoryRow:A[n]})}.bind(t),10)}})),l.default.createElement("div",{className:"col-xs-9 col-md-9",style:{padding:0}},l.default.createElement(d.default,{headers:n,rows:this.state.simulatorCategoryRow.variables||[],uniqueKey:!0}))));return l.default.createElement(I.default,{title:this.state.title,body:A,large:!0,buttons:[]})}return l.default.createElement(I.default,{title:this.state.title,body:[],large:!0,buttons:[]})}}]),e}(c.Component);e.default=N},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n0){var A=n[0];for(var a in A){if(r.length>0){var s=!1,c=!0,l=!1,u=void 0;try{for(var g,d=r[Symbol.iterator]();!(c=(g=d.next()).done);c=!0){var I=g.value;if(a.indexOf(I)>-1){s=!0;break}}}catch(t){l=!0,u=t}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}if(!s)continue}i+=150,M.push({id:"bs-"+a,name:a,label:a,width:"150px",filterable:!0})}}}),o){if(a=o.children,a.length>0){s=a[0];for(c in s){if(r.length>0){u=!1;var I=!0,h=!1,f=void 0;try{for(var E,T=r[Symbol.iterator]();!(I=(E=T.next()).done);I=!0)if(g=E.value,c.indexOf(g)>-1){u=!0;break}}catch(t){h=!0,f=t}finally{try{!I&&T.return&&T.return()}finally{if(h)throw f}}if(!u)continue}i+=150,M.push({id:"bs-"+c,name:c,label:c,width:"150px",filterable:!0})}}}else o=p.length>0?p[0]:{};i+="px",e=l.default.createElement("div",{className:"row",style:{margin:0}},l.default.createElement("div",{className:"col-xs-2 col-md-2",style:{paddingLeft:0,paddingRight:"5px"}},l.default.createElement(d.default,{headers:n,rows:p,rowClick:function(e,n){t.setState({slaveData:e})}})),l.default.createElement("div",{className:"col-xs-10 col-md-10",style:{padding:"5px",overflowX:"scroll",border:"solid 1px #eee"}},l.default.createElement("div",{className:"form-group"},l.default.createElement("label",null,'列过滤(多个值用","分隔)'),l.default.createElement("div",{className:"col-xs-10 col-md-10",style:{padding:"5px"}},l.default.createElement("input",{className:"form-control",id:"_filter_editor"})),l.default.createElement("div",{className:"col-xs-2 col-md-2",style:{padding:"0px 10px 10px 15px"}},l.default.createElement("button",{type:"button",className:"btn btn-primary",onClick:function(){var t=$("#_filter_editor").val();t=t&&""!==t?t.split(","):[];var e=t;this.setState({filters:e})}.bind(t)},l.default.createElement("i",{className:"glyphicon glyphicon-filter"})," 过滤"))),l.default.createElement("div",{style:{margin:"5px"}},l.default.createElement(d.default,{uniqueKey:!0,width:i,headers:M,rows:o.children||[]}))))}()}var M=[{name:"测试",className:"btn btn-danger",icon:"glyphicon glyphicon-flash",click:function(){var t=window.parent.componentEvent;t.eventEmitter.emit(t.SHOW_LOADING),T.doBatchTest(this.state.files,function(t){var e=t.data;this.setState({data:e}),bootbox.alert(t.info)}.bind(this))}.bind(this)}];return l.default.createElement(I.default,{large:!0,title:"对导入的Excel数据进行批量测试",body:e,buttons:M})}}]),e}(c.Component);e.default=N},function(t,e,n){"use strict";function A(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+A(4)+");src:url("+A(4)+"?#iefix) format('embedded-opentype'),url("+A(5)+") format('woff2'),url("+A(6)+") format('woff'),url("+A(7)+") format('truetype'),url("+A(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function c(t,e){var A,n,o;if(e.singleton){var r=h++;A=p||(p=a(e)),n=l.bind(null,A,r,!1),o=l.bind(null,A,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=s(e),n=M.bind(null,A),o=function(){i(A),A.href&&URL.revokeObjectURL(A.href)}):(A=a(e),n=g.bind(null,A),o=function(){i(A)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function l(t,e,A,n){var o=A?"":n.css;if(t.styleSheet)t.styleSheet.cssText=N(e,o);else{var r=document.createTextNode(o),i=t.childNodes;i[e]&&t.removeChild(i[e]),i.length?t.insertBefore(r,i[e]):t.appendChild(r)}}function g(t,e){var A=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=A;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(A))}}function M(t,e){var A=e.css,n=e.sourceMap;n&&(A+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([A],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var u={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},I=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),T=d(function(){return document.head||document.getElementsByTagName("head")[0]}),p=null,h=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=I()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var A=o(t);return n(A,e),function(t){for(var r=[],i=0;i1){for(var T=Array(I),p=0;p1){for(var E=Array(h),N=0;N>"),B={array:i("array"),bool:i("boolean"),func:i("function"),number:i("number"),object:i("object"),string:i("string"),symbol:i("symbol"),any:a(),arrayOf:s,element:c(),instanceOf:l,node:d(),objectOf:M,oneOf:g,oneOfType:u,shape:I};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var A="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=A},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,A){"use strict";function n(t){return r.isValidElement(t)?void 0:o("143"),t}var o=A(19),r=A(21);A(20);t.exports=n},function(t,e,A){"use strict";t.exports=A(42)},function(t,e,A){"use strict";var n=A(43),o=A(48),r=A(174),i=A(71),a=A(68),s=A(179),c=A(180),l=A(181),g=A(182);A(56);o.inject();var M={findDOMNode:c,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:g};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:n.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=l(t)),t?n.getNodeFromInstance(t):null}},Mount:r,Reconciler:i});t.exports=M},function(t,e,A){"use strict";function n(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var A=n(t);A._hostNode=e,e[I]=A}function r(t){var e=t._hostNode;e&&(delete e[I],t._hostNode=null)}function i(t,e){if(!(t._flags&d.hasCachedChildNodes)){var A=t._renderedChildren,r=e.firstChild;t:for(var i in A)if(A.hasOwnProperty(i)){var a=A[i],s=n(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(u)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}l("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[I])return t[I];for(var e=[];!t[I];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var A,n;t&&(n=t[I]);t=e.pop())A=n,e.length&&i(n,t);return A}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function c(t){if(void 0===t._hostNode?l("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:l("34"),t=t._hostParent;for(;e.length;t=e.pop())i(t,t._hostNode);return t._hostNode}var l=A(44),g=A(45),M=A(47),u=(A(46),g.ID_ATTRIBUTE_NAME),d=M,I="__reactInternalInstance$"+Math.random().toString(36).slice(2),T={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:c,precacheChildNodes:i,precacheNode:o,uncacheNode:r};t.exports=T},function(t,e){"use strict";function A(t){for(var e=arguments.length-1,A="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,n=0;n8&&f<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,A,n){return[c(t,e,A,n),M(t,e,A,n)]}};t.exports=b},function(t,e,A){"use strict";function n(t,e,A){var n=e.dispatchConfig.phasedRegistrationNames[A];return p(t,n)}function o(t,e,A){var o=n(t,A,e);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function i(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,A=e?d.getParentInstance(e):null;d.traverseTwoPhase(A,o,t)}}function a(t,e,A){if(A&&A.dispatchConfig.registrationName){var n=A.dispatchConfig.registrationName,o=p(t,n);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function c(t){T(t,r)}function l(t){T(t,i)}function g(t,e,A,n){d.traverseEnterLeave(A,n,a,t,e)}function M(t){T(t,s)}var u=A(52),d=A(54),I=A(58),T=A(59),p=(A(56),u.getListener),h={accumulateTwoPhaseDispatches:c,accumulateTwoPhaseDispatchesSkipTarget:l,accumulateDirectDispatches:M,accumulateEnterLeaveDispatches:g};t.exports=h},function(t,e,A){"use strict";function n(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,A){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!A.disabled||!n(e));default:return!1}}var r=A(44),i=A(53),a=A(54),s=A(55),c=A(58),l=A(59),g=(A(46),{}),M=null,u=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return u(t,!0)},I=function(t){return u(t,!1)},T=function(t){return"."+t._rootNodeID},p={injection:{injectEventPluginOrder:i.injectEventPluginOrder,injectEventPluginsByName:i.injectEventPluginsByName},putListener:function(t,e,A){"function"!=typeof A?r("94",e,typeof A):void 0;var n=T(t),o=g[e]||(g[e]={});o[n]=A;var a=i.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,A)},getListener:function(t,e){var A=g[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var n=T(t);return A&&A[n]},deleteListener:function(t,e){var A=i.registrationNameModules[e];A&&A.willDeleteListener&&A.willDeleteListener(t,e);var n=g[e];if(n){var o=T(t);delete n[o]}},deleteAllListeners:function(t){var e=T(t);for(var A in g)if(g.hasOwnProperty(A)&&g[A][e]){var n=i.registrationNameModules[A];n&&n.willDeleteListener&&n.willDeleteListener(t,A),delete g[A][e]}},extractEvents:function(t,e,A,n){for(var o,r=i.plugins,a=0;a-1?void 0:i("96",t),!c.plugins[A]){e.extractEvents?void 0:i("97",t),c.plugins[A]=e;var n=e.eventTypes;for(var r in n)o(n[r],e,r)?void 0:i("98",r,t)}}}function o(t,e,A){c.eventNameDispatchConfigs.hasOwnProperty(A)?i("99",A):void 0,c.eventNameDispatchConfigs[A]=t;var n=t.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];r(a,e,A)}return!0}return!!t.registrationName&&(r(t.registrationName,e,A),!0)}function r(t,e,A){c.registrationNameModules[t]?i("100",t):void 0,c.registrationNameModules[t]=e,c.registrationNameDependencies[t]=e.eventTypes[A].dependencies}var i=A(44),a=(A(46),null),s={},c={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?i("101"):void 0,a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var A in t)if(t.hasOwnProperty(A)){var o=t[A];s.hasOwnProperty(A)&&s[A]===o||(s[A]?i("102",A):void 0,s[A]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return c.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var A=e.phasedRegistrationNames;for(var n in A)if(A.hasOwnProperty(n)){var o=c.registrationNameModules[A[n]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];c.plugins.length=0;var e=c.eventNameDispatchConfigs;for(var A in e)e.hasOwnProperty(A)&&delete e[A];var n=c.registrationNameModules;for(var o in n)n.hasOwnProperty(o)&&delete n[o]}};t.exports=c},function(t,e,A){"use strict";function n(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function i(t,e,A,n){var o=t.type||"unknown-event";t.currentTarget=p.getNodeFromInstance(n),e?I.invokeGuardedCallbackWithCatch(o,A,t):I.invokeGuardedCallback(o,A,t),t.currentTarget=null}function a(t,e){var A=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(A))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(n),t.exports=n},function(t,e,A){"use strict";var n=A(44),o=(A(46),function(t){var e=this;if(e.instancePool.length){var A=e.instancePool.pop();return e.call(A,t),A}return new e(t)}),r=function(t,e){var A=this;if(A.instancePool.length){var n=A.instancePool.pop();return A.call(n,t,e),n}return new A(t,e)},i=function(t,e,A){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e,A),o}return new n(t,e,A)},a=function(t,e,A,n){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,A,n),r}return new o(t,e,A,n)},s=function(t,e,A,n,o){var r=this;if(r.instancePool.length){var i=r.instancePool.pop();return r.call(i,t,e,A,n,o),i}return new r(t,e,A,n,o)},c=function(t){var e=this;t instanceof e?void 0:n("25"),t.destructor(),e.instancePool.length8));var U=!1;N.canUseDOM&&(U=D("input")&&(!document.documentMode||document.documentMode>11));var S={get:function(){return j.get.call(this)},set:function(t){Q=""+t,j.set.call(this,t)}},v={eventTypes:B,extractEvents:function(t,e,A,o){var r,i,a=e?f.getNodeFromInstance(e):window;if(n(a)?m?r=s:i=c:x(a)?U?r=u:(r=I,i=d):T(a)&&(r=p),r){var l=r(t,e);if(l){var g=C.getPooled(B.change,l,A,o);return g.type="change",E.accumulateTwoPhaseDispatches(g),g}}i&&i(t,a,e)}};t.exports=v},function(t,e,A){"use strict";function n(){B.ReactReconcileTransaction&&f?void 0:l("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=M.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function r(t,e,A,o,r,i){return n(),f.batchedUpdates(t,e,A,o,r,i)}function i(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==p.length?l("124",e,p.length):void 0,p.sort(i),h++;for(var A=0;A]/,s=A(91),c=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{n=n||document.createElement("div"),n.innerHTML=""+e+"";for(var A=n.firstChild;A.firstChild;)t.appendChild(A.firstChild)}});if(o.canUseDOM){var l=document.createElement("div");l.innerHTML=" ",""===l.innerHTML&&(c=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),i.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var A=t.firstChild;1===A.data.length?t.removeChild(A):A.deleteData(0,1)}else t.innerHTML=e}),l=null}t.exports=c},function(t,e){"use strict";var A=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,n,o){MSApp.execUnsafeLocalFunction(function(){return t(e,A,n,o)})}:t};t.exports=A},function(t,e,A){"use strict";var n=A(60),o=A(93),r=A(90),i=function(t,e){if(e){var A=t.firstChild;if(A&&A===t.lastChild&&3===A.nodeType)return void(A.nodeValue=e)}t.textContent=e};n.canUseDOM&&("textContent"in document.documentElement||(i=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=i},function(t,e){"use strict";function A(t){var e=""+t,A=o.exec(e);if(!A)return e;var n,r="",i=0,a=0;for(i=A.index;i]/;t.exports=n},function(t,e,A){"use strict";var n=A(44),o=A(88),r=A(60),i=A(95),a=A(57),s=(A(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:n("56"),e?void 0:n("57"),"HTML"===t.nodeName?n("58"):void 0,"string"==typeof e){var A=i(e,a)[0];t.parentNode.replaceChild(A,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,A){"use strict";function n(t){var e=t.match(l);return e&&e[1].toLowerCase()}function o(t,e){var A=c;c?void 0:s(!1);var o=n(t),r=o&&a(o);if(r){A.innerHTML=r[1]+t+r[2];for(var l=r[0];l--;)A=A.lastChild}else A.innerHTML=t;var g=A.getElementsByTagName("script");g.length&&(e?void 0:s(!1),i(g).forEach(e));for(var M=Array.from(A.childNodes);A.lastChild;)A.removeChild(A.lastChild);return M}var r=A(60),i=A(96),a=A(97),s=A(46),c=r.canUseDOM?document.createElement("div"):null,l=/^\s*<(\w+)/;t.exports=o},function(t,e,A){"use strict";function n(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?i(!1):void 0,"number"!=typeof e?i(!1):void 0,0===e||e-1 in t?void 0:i(!1),"function"==typeof t.callee?i(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var A=Array(e),n=0;n":i.innerHTML="<"+t+">",a[t]=!i.firstChild),a[t]?M[t]:null}var o=A(60),r=A(46),i=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],c=[1,"","
    "],l=[3,"","
    "],g=[1,'',""],M={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:c,colgroup:c,tbody:c,tfoot:c,thead:c,td:l,th:l},u=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];u.forEach(function(t){M[t]=g,a[t]=!0}),t.exports=n},function(t,e,A){"use strict";var n=A(87),o=A(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var A=o.getNodeFromInstance(t);n.processUpdates(A,e)}};t.exports=r},function(t,e,A){"use strict";function n(t){if(t){var e=t._currentElement._owner||null;if(e){var A=e.getName();if(A)return" This DOM node was rendered by `"+A+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?I("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?I("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:I("61")),null!=e.style&&"object"!=typeof e.style?I("62",n(t)):void 0)}function r(t,e,A,n){if(!(n instanceof U)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;k(e,a),n.getReactMountReady().enqueue(i,{inst:t,registrationName:e,listener:A})}}function i(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function s(){var t=this;j.postMountWrapper(t)}function c(){var t=this;b.postMountWrapper(t)}function l(){var t=this;t._rootNodeID?void 0:I("63");var e=Y(t);switch(e?void 0:I("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var A in P)P.hasOwnProperty(A)&&t._wrapperState.listeners.push(D.trapBubbledEvent(A,P[A],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function g(){Q.postUpdateWrapper(this)}function M(t){_.call(K,t)||(Z.test(t)?void 0:I("65",t),K[t]=!0)}function u(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;M(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var I=A(44),T=A(16),p=A(100),h=A(102),E=A(88),N=A(89),f=A(45),w=A(110),C=A(52),y=A(53),D=A(112),x=A(47),B=A(43),L=A(115),b=A(118),Q=A(119),j=A(120),m=(A(74),A(121)),U=A(141),S=(A(57),A(93)),v=(A(46),A(77),A(130),A(144),A(56),x),z=C.deleteListener,Y=B.getNodeFromInstance,k=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=T({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,A,n){this._rootNodeID=q++,this._domID=A._idCounter++,this._hostParent=e,this._hostContainerInfo=A;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(l,this);break;case"input":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"option":b.mountWrapper(this,r,e),r=b.getHostProps(this,r);break;case"select":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(l,this);break;case"textarea":j.mountWrapper(this,r,e),r=j.getHostProps(this,r),t.getReactMountReady().enqueue(l,this)}o(this,r);var i,g;null!=e?(i=e._namespaceURI,g=e._tag):A._tag&&(i=A._namespaceURI,g=A._tag),(null==i||i===N.svg&&"foreignobject"===g)&&(i=N.html),i===N.html&&("svg"===this._tag?i=N.svg:"math"===this._tag&&(i=N.mathml)),this._namespaceURI=i;var M;if(t.useCreateElement){var u,d=A._ownerDocument;if(i===N.html)if("script"===this._tag){var I=d.createElement("div"),T=this._currentElement.type;I.innerHTML="<"+T+">",u=I.removeChild(I.firstChild)}else u=r.is?d.createElement(this._currentElement.type,r.is):d.createElement(this._currentElement.type);else u=d.createElementNS(i,this._currentElement.type);B.precacheNode(this,u),this._flags|=v.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(u),this._updateDOMProperties(null,r,t);var h=E(u);this._createInitialChildren(t,r,n,h),M=h}else{var f=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,n);M=!C&&X[this._tag]?f+"/>":f+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(c,this)}return M},_createOpenTagMarkupAndPutListeners:function(t,e){var A="<"+this._currentElement.type;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(R.hasOwnProperty(n))o&&r(this,n,o,t);else{n===O&&(o&&(o=this._previousStyleCopy=T({},e.style)),o=h.createMarkupForStyles(o,this));var i=null;null!=this._tag&&u(this._tag,e)?V.hasOwnProperty(n)||(i=w.createMarkupForCustomAttribute(n,o)):i=w.createMarkupForProperty(n,o),i&&(A+=" "+i)}}return t.renderToStaticMarkup?A:(this._hostParent||(A+=" "+w.createMarkupForRoot()),A+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,A){var n="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(n=o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)n=S(r);else if(null!=i){var a=this.mountChildren(i,t,A);n=a.join("")}}return W[this._tag]&&"\n"===n.charAt(0)?"\n"+n:n},_createInitialChildren:function(t,e,A,n){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(n,o.__html);else{var r=F[typeof e.children]?e.children:null,i=null!=r?null:e.children;if(null!=r)E.queueText(n,r);else if(null!=i)for(var a=this.mountChildren(i,t,A),s=0;s1)for(var A=1;A0&&n.length<20?A+" (keys: "+n.join(", ")+")":A}function r(t,e){var A=a.get(t);if(!A){return null}return A}var i=A(44),a=(A(22),A(123)),s=(A(74),A(68)),c=(A(46),A(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,A){c.validateCallback(e,A);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void n(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],n(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,n(e))},enqueueReplaceState:function(t,e){var A=r(t,"replaceState");A&&(A._pendingStateQueue=[e],A._pendingReplaceState=!0,n(A))},enqueueSetState:function(t,e){var A=r(t,"setState");if(A){var o=A._pendingStateQueue||(A._pendingStateQueue=[]);o.push(e),n(A)}},enqueueElementInternal:function(t,e,A){t._pendingElement=e,t._context=A,n(t)},validateCallback:function(t,e){t&&"function"!=typeof t?i("122",e,o(t)):void 0}});t.exports=c},function(t,e,A){"use strict";var n=(A(16),A(57)),o=(A(56),n);t.exports=o},function(t,e,A){"use strict";var n=A(16),o=A(88),r=A(43),i=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};n(i.prototype,{mountComponent:function(t,e,A,n){var i=A._idCounter++;this._domID=i,this._hostParent=e,this._hostContainerInfo=A;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=A._ownerDocument,c=s.createComment(a);return r.precacheNode(this,c),o(c)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=i},function(t,e,A){"use strict";function n(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var A=0,n=t;n;n=n._hostParent)A++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;A-o>0;)t=t._hostParent,A--;for(;o-A>0;)e=e._hostParent,o--;for(var i=A;i--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function i(t,e,A){for(var n=[];t;)n.push(t),t=t._hostParent;var o;for(o=n.length;o-- >0;)e(n[o],"captured",A);for(o=0;o0;)A(s[c],"captured",r)}var s=A(44);A(46);t.exports={isAncestor:o,getLowestCommonAncestor:n,getParentInstance:r,traverseTwoPhase:i,traverseEnterLeave:a}},function(t,e,A){"use strict";var n=A(44),o=A(16),r=A(87),i=A(88),a=A(43),s=A(93),c=(A(46),A(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(c.prototype,{mountComponent:function(t,e,A,n){var o=A._idCounter++,r=" react-text: "+o+" ",c=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var l=A._ownerDocument,g=l.createComment(r),M=l.createComment(c),u=i(l.createDocumentFragment());return i.queueChild(u,i(g)),this._stringText&&i.queueChild(u,i(l.createTextNode(this._stringText))),i.queueChild(u,i(M)),a.precacheNode(this,g),this._closingComment=M,u}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var A=""+t;if(A!==this._stringText){this._stringText=A;var n=this.getHostNode();r.replaceDelimitedText(n[0],n[1],A)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),A=e.nextSibling;;){if(null==A?n("67",this._domID):void 0,8===A.nodeType&&" /react-text "===A.nodeValue){this._closingComment=A;break}A=A.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=c},function(t,e,A){"use strict";function n(){this.reinitializeTransaction()}var o=A(16),r=A(68),i=A(75),a=A(57),s={initialize:a,close:function(){M.isBatchingUpdates=!1}},c={initialize:a,close:r.flushBatchedUpdates.bind(r)},l=[c,s];o(n.prototype,i,{getTransactionWrappers:function(){return l}});var g=new n,M={isBatchingUpdates:!1,batchedUpdates:function(t,e,A,n,o,r){var i=M.isBatchingUpdates;return M.isBatchingUpdates=!0,i?t(e,A,n,o,r):g.perform(t,null,e,A,n,o,r)}};t.exports=M},function(t,e,A){"use strict";function n(t){for(;t._hostParent;)t=t._hostParent;var e=g.getNodeFromInstance(t),A=e.parentNode;return g.getClosestInstanceFromNode(A)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=u(t.nativeEvent),A=g.getClosestInstanceFromNode(e),o=A;do t.ancestors.push(o),o=o&&n(o);while(o);for(var r=0;re.end?(A=e.end,n=e.start):(A=e.start,n=e.end),o.moveToElementText(t),o.moveStart("character",A),o.setEndPoint("EndToStart",o),o.moveEnd("character",n-A),o.select()}function a(t,e){if(window.getSelection){var A=window.getSelection(),n=t[l()].length,o=Math.min(e.start,n),r=void 0===e.end?o:Math.min(e.end,n);if(!A.extend&&o>r){var i=r;r=o,o=i}var a=c(t,o),s=c(t,r);if(a&&s){var g=document.createRange();g.setStart(a.node,a.offset),A.removeAllRanges(),o>r?(A.addRange(g),A.extend(s.node,s.offset)):(g.setEnd(s.node,s.offset),A.addRange(g))}}}var s=A(60),c=A(156),l=A(63),g=s.canUseDOM&&"selection"in document&&!("getSelection"in window),M={getOffsets:g?o:r,setOffsets:g?i:a};t.exports=M},function(t,e){"use strict";function A(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function n(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=A(t),r=0,i=0;o;){if(3===o.nodeType){if(i=r+o.textContent.length,r<=e&&i>=e)return{node:o,offset:e-r};r=i}o=A(n(o))}}t.exports=o},function(t,e,A){"use strict";function n(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?n(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=A(158);t.exports=n},function(t,e,A){"use strict";function n(t){return o(t)&&3==t.nodeType}var o=A(159);t.exports=n},function(t,e){"use strict";function A(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=A},function(t,e){"use strict";function A(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=A},function(t,e){"use strict";var A={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},n={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:A.xlink,xlinkArcrole:A.xlink,xlinkHref:A.xlink,xlinkRole:A.xlink,xlinkShow:A.xlink,xlinkTitle:A.xlink,xlinkType:A.xlink,xmlBase:A.xml,xmlLang:A.xml,xmlSpace:A.xml},DOMAttributeNames:{}};Object.keys(n).forEach(function(t){o.Properties[t]=0,n[t]&&(o.DOMAttributeNames[t]=n[t])}),t.exports=o},function(t,e,A){"use strict";function n(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var A=document.selection.createRange();return{parentElement:A.parentElement(),text:A.text,top:A.boundingTop,left:A.boundingLeft}}}function o(t,e){if(h||null==I||I!==l())return null;var A=n(I);if(!p||!M(p,A)){p=A;var o=c.getPooled(d.select,T,t,e);return o.type="select",o.target=I,r.accumulateTwoPhaseDispatches(o),o}return null}var r=A(51),i=A(60),a=A(43),s=A(154),c=A(65),l=A(160),g=A(78),M=A(130),u=i.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},I=null,T=null,p=null,h=!1,E=!1,N={eventTypes:d,extractEvents:function(t,e,A,n){if(!E)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(g(r)||"true"===r.contentEditable)&&(I=r,T=e,p=null);break;case"topBlur":I=null,T=null,p=null;break;case"topMouseDown":h=!0;break;case"topContextMenu":case"topMouseUp":return h=!1,o(A,n);case"topSelectionChange":if(u)break;case"topKeyDown":case"topKeyUp":return o(A,n)}return null},didPutListener:function(t,e,A){"onSelect"===e&&(E=!0)}};t.exports=N},function(t,e,A){"use strict";function n(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=A(44),i=A(150),a=A(51),s=A(43),c=A(164),l=A(165),g=A(65),M=A(166),u=A(167),d=A(81),I=A(170),T=A(171),p=A(172),h=A(82),E=A(173),N=A(57),f=A(168),w=(A(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),A="on"+e,n="top"+e,o={phasedRegistrationNames:{bubbled:A,captured:A+"Capture"},dependencies:[n]};w[t]=o,C[n]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,A,n){var o=C[t];if(!o)return null;var i;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":i=g;break;case"topKeyPress":if(0===f(A))return null;case"topKeyDown":case"topKeyUp":i=u;break;case"topBlur":case"topFocus":i=M;break;case"topClick":if(2===A.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":i=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":i=I;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":i=T;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":i=c;break;case"topTransitionEnd":i=p;break;case"topScroll":i=h;break;case"topWheel":i=E;break;case"topCopy":case"topCut":case"topPaste":i=l}i?void 0:r("86",t);var s=i.getPooled(o,e,A,n);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,A){if("onClick"===e&&!o(t._tag)){var r=n(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=i.listen(a,"click",N))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var A=n(t);y[A].remove(),delete y[A]}}};t.exports=D},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r={relatedTarget:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(168),i=A(169),a=A(84),s={key:i,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(n,s),t.exports=n},function(t,e){"use strict";function A(t){var e,A=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===A&&(e=13)):e=A,e>=32||13===e?e:0}t.exports=A},function(t,e,A){"use strict";function n(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var A=o(t);return 13===A?"Enter":String.fromCharCode(A)}return"keydown"===t.type||"keyup"===t.type?i[t.keyCode]||"Unidentified":""}var o=A(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},i={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={dataTransfer:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),r=A(84),i={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e){for(var A=Math.min(t.length,e.length),n=0;n.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var i,a=T.createElement(k,{child:e});if(t){var s=w.get(t);i=s._processChildContext(s._context)}else i=B;var l=M(A);if(l){var g=l._currentElement,d=g.props.child;if(Q(d,e)){var I=l._renderedComponent.getPublicInstance(),p=n&&function(){n.call(I)};return R._updateRootComponent(l,a,i,A,p),I}R.unmountComponentAtNode(A)}var h=o(A),E=h&&!!r(h),N=c(A),f=E&&!l&&!N,C=R._renderNewRootComponent(a,A,f,i)._renderedComponent.getPublicInstance();return n&&n.call(C),C},render:function(t,e,A){return R._renderSubtreeIntoContainer(null,t,e,A)},unmountComponentAtNode:function(t){l(t)?void 0:u("40");var e=M(t);if(!e){c(t),1===t.nodeType&&t.hasAttribute(m);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,A,r,i){if(l(e)?void 0:u("41"),r){var a=o(e);if(C.canReuseMarkup(t,a))return void h.precacheNode(A,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var c=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var g=t,M=n(g,c),I=" (client) "+g.substring(M-20,M+20)+"\n (server) "+c.substring(M-20,M+20);e.nodeType===S?u("42",I):void 0}if(e.nodeType===S?u("43"):void 0,i.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),h.precacheNode(A,e.firstChild)}};t.exports=R},function(t,e,A){"use strict";function n(t,e){var A={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return A}var o=(A(144),9);t.exports=n},function(t,e){"use strict";var A={useCreateElement:!0,useFiber:!1};t.exports=A},function(t,e,A){"use strict";var n=A(178),o=/\/?>/,r=/^<\!\-\-/,i={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=n(t);return r.test(t)?t:t.replace(o," "+i.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var A=e.getAttribute(i.CHECKSUM_ATTR_NAME);A=A&&parseInt(A,10);var o=n(t);return o===A}};t.exports=i},function(t,e){"use strict";function A(t){for(var e=1,A=0,o=0,r=t.length,i=r&-4;o3&&void 0!==arguments[3]?arguments[3]:{},c=Boolean(t),M=t||y,d=void 0;d="function"==typeof e?e:e?(0,p.default)(e):D;var T=A||x,h=n.pure,E=void 0===h||h,N=n.withRef,w=void 0!==N&&N,b=E&&T!==x,Q=L++;return function(t){function e(t,e,A){var n=T(t,e,A);return n}var A="Connect("+a(t)+")",n=function(n){function a(t,e){o(this,a);var i=r(this,n.call(this,t,e));i.version=Q,i.store=t.store||e.store,(0,C.default)(i.store,'Could not find "store" in either the context or '+('props of "'+A+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+A+'".'));var s=i.store.getState();return i.state={storeState:s},i.clearCache(),i}return i(a,n),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var A=t.getState(),n=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(A,e):this.finalMapStateToProps(A);return n},a.prototype.configureFinalMapState=function(t,e){var A=M(t.getState(),e),n="function"==typeof A;return this.finalMapStateToProps=n?A:M,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,n?this.computeStateProps(t,e):A},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var A=t.dispatch,n=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(A,e):this.finalMapDispatchToProps(A);return n},a.prototype.configureFinalMapDispatch=function(t,e){var A=d(t.dispatch,e),n="function"==typeof A;return this.finalMapDispatchToProps=n?A:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,n?this.computeDispatchProps(t,e):A},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,I.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,I.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,I.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){c&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,I.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var A=s(this.updateStatePropsIfNeeded,this);if(!A)return;A===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,A=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,r=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var i=!0,a=!0;E&&r&&(i=A||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,c=!1;n?s=!0:i&&(s=this.updateStatePropsIfNeeded()),a&&(c=this.updateDispatchPropsIfNeeded());var M=!0;return M=!!(s||c||e)&&this.updateMergedPropsIfNeeded(),!M&&r?r:(w?this.renderedElement=(0,g.createElement)(t,l({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,g.createElement)(t,this.mergedProps),this.renderedElement)},a}(g.Component);return n.displayName=A,n.WrappedComponent=t,n.contextTypes={store:u.default},n.propTypes={store:u.default},(0,f.default)(n,t)}}e.__esModule=!0;var l=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var A={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in A)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?A[n]:("00"+A[n]).substr((""+A[n]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=A,e.getParameter=n,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+l++;return t}function r(t,e){var A=window._server+"/frame/loadFileVersions";$.ajax({url:A,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function i(t,e){var A=window._server+"/common/loadResourceTreeData";$.ajax({url:A,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=c.default.frameStyle.getRootIcon(),t._style=c.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=c.default.frameStyle.getFolderIcon(),t._style=c.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=c.default.frameStyle.getRuleIcon(),t._style=c.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=c.default.frameStyle.getProjectIcon(),t._style=c.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=c.default.frameStyle.getResourceIcon(),t._style=c.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=c.default.frameStyle.getResourcePackageIcon(),t._style=c.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=c.default.frameStyle.getLibIcon(),t._style=c.default.frameStyle.getLibIconStyle();break;case"action":t._icon=c.default.frameStyle.getActionIcon(),t._style=c.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=c.default.frameStyle.getParameterIcon(),t._style=c.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=c.default.frameStyle.getConstantIcon(),t._style=c.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=c.default.frameStyle.getVariableIcon(),t._style=c.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=c.default.frameStyle.getRuleLibIcon(),t._style=c.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=c.default.frameStyle.getDecisionTableLibIcon(),t._style=c.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=c.default.frameStyle.getDecisionTreeLibIcon(),t._style=c.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=c.default.frameStyle.getFlowLibIcon(),t._style=c.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=c.default.frameStyle.getUlIcon(),t._style=c.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=c.default.frameStyle.getDecisionTableIcon(),t._style=c.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=c.default.frameStyle.getScriptDecisionTableIcon(),t._style=c.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=c.default.frameStyle.getDecisionTreeIcon(),t._style=c.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=c.default.frameStyle.getFlowIcon(),t._style=c.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=c.default.frameStyle.getScorecardIcon(),t._style=c.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=i;var s=A(228),c=n(s),l=1},function(t,e){"use strict";function A(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var n={};n.frameStyle={getRootIcon:function(){return A("rootIcon","rf rf-root")},getRootIconStyle:function(){return A("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return A("projectIcon","rf rf-project")},getProjectIconStyle:function(){return A("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return A("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return A("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return A("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return A("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return A("libIcon","rf rf-database")},getLibIconStyle:function(){return A("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return A("actionIcon","rf rf-action")},getActionIconStyle:function(){return A("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return A("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return A("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return A("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return A("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return A("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return A("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return A("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return A("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return A("ulIcon","rf rf-script")},getUlIconStyle:function(){return A("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return A("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return A("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return A("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return A("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return A("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return A("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return A("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return A("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return A("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return A("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return A("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return A("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return A("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return A("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return A("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return A("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return A("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return A("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return A("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return A("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return A("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return A("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=n},,,,,,function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A-1&&(l=!0),!1}}),l?c.show():c.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,A=e.headers,n=e.operationConfig,o=e.dispatch,r=e.selectFirst,i=(e.uniqueKey,this.props.rows||[]),a=[],s=[];A.forEach(function(e,A){e.editable?a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label),c.default.createElement(I.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:e.width}},c.default.createElement("label",null,e.label)))}),n&&a.push(c.default.createElement("td",{key:(0,T.uniqueID)(),style:{width:n.width}},c.default.createElement("label",null,"操作列")));var l=c.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},A.map(function(e,A){return e.filterable?c.default.createElement("td",{key:(0,T.uniqueID)()},c.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,A),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):c.default.createElement("td",{key:(0,T.uniqueID)()}," ")}),n?c.default.createElement("td",null):null);s.push(l),i.forEach(function(e,i){e.id||(e.id=(0,T.uniqueID)());var a=e.id;0===i&&r?s.push(c.default.createElement(u.default,{key:a,select:!0,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i})):s.push(c.default.createElement(u.default,{key:a,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:i}))});var g={margin:0,width:this.props.width?this.props.width:"100%"};return c.default.createElement("table",{className:"table table-bordered",style:g},c.default.createElement("thead",null,c.default.createElement("tr",{className:"well"},a)),c.default.createElement("tbody",null,s))}}]),e}(s.Component);p.propTypes={headers:c.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=p},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var n=e[t];n&&""!==n||(n="{}");var o=JSON.parse(n)||{},r=o.rows||[],i=o.type,a=function(n){var o={type:i,rows:n},r=JSON.stringify(o);e[t]=r;var a=A.find("div");a.html(r)};if(i){var s=null,c=!0,l=!1,g=void 0;try{for(var M,u=simulatorCategoryData[Symbol.iterator]();!(c=(M=u.next()).done);c=!0){var d=M.value;if(i===d.clazz){s=d;break}}}catch(t){l=!0,g=t}finally{try{!c&&u.return&&u.return()}finally{if(l)throw g}}var T=s.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:T,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),A=!0,n=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(A=(s=c.next()).done);A=!0){var l=s.value;e.append('")}}catch(t){n=!0,o=t}finally{try{!A&&c.return&&c.return()}finally{if(n)throw o}}e.append(''),p.MsgBox.dialog("选择子对象类型",e,function(){if(i=e.val(),!i||""===i)return void p.MsgBox.alert("请先选择子对象类型!");var A=null,n=!0,o=!1,s=void 0;try{for(var c,l=t[Symbol.iterator]();!(n=(c=l.next()).done);n=!0){var g=c.value;if(i===g.clazz){A=g;break}}}catch(t){o=!0,s=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw s}}var M=A.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:M,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}A.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var n=A.find("div");n.html(e[t]),n.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,A=e.rowData,n=e.header,o=n.dateFormat,r=A[n.name];if(o){var i=new Date(r);r=(0,T.formatDate)(i,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return g.default.createElement("td",{style:{padding:"1px 5px"}},g.default.createElement("div",{style:a,onClick:function(e){if(n.editable){var o=e.target;$(o).css({display:"none"}),A._editorType?t._showEditor(n.name):I.eventEmitter.emit(I.SHOW_CELL_EDITOR,{targetDiv:o,rowData:A,colId:n.id})}}},r))}}]),e}(l.Component);e.default=h},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=A(240),r=n(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function i(t){return void 0===t}t.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},A.prototype.emit=function(t){var e,A,o,a,s,c;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var l=new Error('Uncaught, unspecified "error" event. ('+e+")");throw l.context=e,l}if(A=this._events[t],i(A))return!1;if(n(A))switch(arguments.length){case 1:A.call(this);break;case 2:A.call(this,arguments[1]);break;case 3:A.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),A.apply(this,a)}else if(r(A))for(a=Array.prototype.slice.call(arguments,1),c=A.slice(),o=c.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(t,e){function A(){this.removeListener(t,A),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return A.listener=e,this.on(t,A),this},A.prototype.removeListener=function(t,e){var A,o,i,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(A=this._events[t],i=A.length,o=-1,A===e||n(A.listener)&&A.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(A)){for(a=i;a-- >0;)if(A[a]===e||A[a].listener&&A[a].listener===e){o=a;break}if(o<0)return this;1===A.length?(A.length=0,delete this._events[t]):A.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},A.prototype.removeAllListeners=function(t){var e,A;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(A=this._events[t],n(A))this.removeListener(t,A);else if(A)for(;A.length;)this.removeListener(t,A[A.length-1]);return delete this._events[t],this},A.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},A.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},A.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,A){var n=A(242).default,o=A(243).default,r=A(251),i=A(252).default,a=A(302);t.exports={Tool:n,Node:o,MsgBox:r,Event:a,FlowDesigner:i}},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,A){var n=this.newNode();return n?(n._tool=this,n._initConfigs(this.getConfigs()),A||(A=this._buildNodeName()),n._createFigure(this.context,{x:t,y:e},A),n):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,A=!0,n=!1,o=void 0;try{for(var r,i=this.context.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);es-l&&as-l&&a>c-l?this.attr("cursor","se-resize"):ic-l?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},n=function(A){if(!this.dragging){var n=t.currentTool;if(n){if(n instanceof u.default||n instanceof g.default||(t.currentTool=t.selectTool,n=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),n instanceof g.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,i=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var M=s.value;if(M===e){o=!0;break}}}catch(t){i=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(i)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(n instanceof u.default){var d=A.offsetX,T=A.offsetY,p=t.currentConnection;if(p){if(0===e.in)return void I.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void I.alert("当前节点进入的连线最多只能有"+e.in+"条.");p.endX=d,p.endY=T,p.from!==e?!function(){p.endPath(e),t.currentConnection=null;var A=p.from.uuid,n=e.uuid,o=p.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(A),r=t.getNodeByUUID(n);p=new c.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),p.uuid=o,p.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():I.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void I.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void I.alert("当前节点出去的连线最多只能有"+e.out+"条."); +p=new c.default(e,{endX:d,endY:T}),t.currentConnection=p}}}}};this.rect.mouseover(A),this.rect.mousedown(n),this.icon.mouseover(A),this.icon.mousedown(n);var o=function(){var A=e.rect,n=t.currentTool;if(n&&n instanceof g.default){var o=!1,r=t.selectionFigures,i=!0,a=!1,s=void 0;try{for(var l,M=r[Symbol.iterator]();!(i=(l=M.next()).done);i=!0){var u=l.value;if(u===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!i&&M.return&&M.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof c.default||t._recordRectPosition()}),A.ow=A.attr("width"),A.oh=A.attr("height"),A.dragging=!0}},r=function(A,n){var o=t.currentTool;if(o&&o instanceof g.default){e.context.snapto&&(A-=A%10,n-=n%10);var r=t.selectionFigures,i=e.rect,a=(e.icon,i.ox+A),s=i.oy+n;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var l=void 0,M=void 0;switch(this.attr("cursor")){case"nw-resize":l=i.ow-A,M=i.oh-n,l>20&&M>20&&i.attr({x:a,y:s,width:l,height:M});break;case"ne-resize":l=i.ow+A,M=i.oh-n,l>20&&M>20&&i.attr({y:s,width:l,height:M});break;case"se-resize":l=i.ow+A,M=i.oh+n,l>20&&M>20&&i.attr({width:l,height:M});break;case"sw-resize":l=i.ow-A,M=i.oh+n,l>20&&M>20&&i.attr({x:a,width:l,height:M});break;default:r.forEach(function(t,e){t instanceof c.default||t._moveRect(A,n)})}r.forEach(function(t,e){t instanceof c.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},i=function(){e.rect.dragging=!1;var A=[],n=new Map,o=new Map,r=e.rect.ow,i=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),l=e.uuid,g=!0,M=!1,u=void 0;try{for(var d,I=t.selectionFigures[Symbol.iterator]();!(g=(d=I.next()).done);g=!0){var T=d.value;if(!(T instanceof c.default)){A.push(T.uuid);var p=T.rect.ox,h=T.rect.oy;p=p?p:0,h=h?h:0;var E=T.rect.attr("x"),N=T.rect.attr("y");n.set(T.uuid,{x:E,y:N}),o.set(T.uuid,{x:p,y:h})}}}catch(t){M=!0,u=t}finally{try{!g&&I.return&&I.return()}finally{if(M)throw u}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var i,c=A[Symbol.iterator]();!(e=(i=c.next()).done);e=!0){var g=i.value,M=t.getNodeByUUID(g),u=n.get(g);M.rect.attr({x:u.x,y:u.y}),g===l&&M.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&c.return&&c.return()}finally{if(o)throw r}}var d=!0,I=!1,T=void 0;try{for(var p,h=A[Symbol.iterator]();!(d=(p=h.next()).done);d=!0){var E=p.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,T=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw T}}},undo:function(){var e=!0,n=!1,a=void 0;try{for(var s,c=A[Symbol.iterator]();!(e=(s=c.next()).done);e=!0){var g=s.value,M=t.getNodeByUUID(g),u=o.get(g);M.rect.attr({x:u.x,y:u.y}),g===l&&M.rect.attr({width:r,height:i})}}catch(t){n=!0,a=t}finally{try{!e&&c.return&&c.return()}finally{if(n)throw a}}var d=!0,I=!1,T=void 0;try{for(var p,h=A[Symbol.iterator]();!(d=(p=h.next()).done);d=!0){var E=p.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,T=t}finally{try{!d&&h.return&&h.return()}finally{if(I)throw T}}}})};this.rect.drag(r,o,i),this.icon.drag(r,o,i)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),A=[].concat(r(this.fromConnections));e.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),A.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var A=void 0,n=void 0;this.rect.ox&&0!==this.rect.ox?(A=this.rect.ox+t,n=this.rect.oy+e):(A=this.rect.attr("x")+t,n=this.rect.attr("x")+e),this.rect.attr({x:A,y:n})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),A=this.rect.attr("y"),n=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,A-=5,n+=10,o+=10),"M "+e+" "+A+" L "+(e+n)+" "+A+" L "+(e+n)+" "+(A+o)+" L "+e+" "+(A+o)+" L "+e+" "+A}}]),t}();e.default=T},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},i=function(){function t(t,e){for(var A=0;A0){({x:t[1][1],y:t[1][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var A=this.to.rect,n=A.attr("x"),o=A.attr("y"),r=A.attr("width"),i=A.attr("height");n+=r/2,o+=i/2-10;var a=t.x,c=t.y;t=[],t.push(["M",a,c]),t.push(["L",n,o])}var l=this.to.getPathInfo(!0),g=s.default.pathIntersection(l,t);if(g.length>0){({x:t[0][1],y:t[0][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),A=t.attr("y"),n=t.attr("width"),o=t.attr("height");e+=n/2,A+=o/2-10;var r=this.endX,i=this.endY,a=0,c=0,l=null;if(this.to){var g=this.to.rect;r=g.attr("x"),i=g.attr("y"),a=g.attr("width"),c=g.attr("height"),r+=a/2,i+=c/2-10}var M=this.from.getPathInfo(!0),u=Math.abs(e+n/2-(r-a/2)),d=Math.abs(A+o/2-(i-c/2)),I="M"+e+" "+A;if(u>=d){var T=I+" L"+r+" "+A,p=s.default.pathIntersection(M,T);if(p.length>0&&(e=p[0].x,A=p[0].y,I="M"+p[0].x+" "+p[0].y),this.to){var h="M"+e+" "+i+" L"+r+" "+i,E=this.to.getPathInfo(!0);p=s.default.pathIntersection(E,h),p.length>0&&(r=p[0].x,i=p[0].y,e0&&(e=C[0].x,A=C[0].y,I="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+A+" L"+r+" "+i,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,i=C[0].y,A=1e3&&delete a[s.shift()],s.push(i),a[i]=t[L](e,r),A?A(a[i]):a[i])}return o}function r(){return this.hex}function i(t,e){for(var A=[],n=0,o=t.length;o-2*!e>n;n+=2){var r=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?o-4==n?r[3]={x:+t[0],y:+t[1]}:o-2==n&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==n?r[3]=r[2]:n||(r[0]={x:+t[n],y:+t[n+1]}),A.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return A}function a(t,e,A,n,o){var r=-3*e+9*A-9*n+3*o,i=t*r+6*e-12*A+6*n;return t*i-3*e+3*A}function s(t,e,A,n,o,r,i,s,c){null==c&&(c=1),c=c>1?1:c<0?0:c;for(var l=c/2,g=12,M=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],u=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,I=0;Id;)M/=2,u+=(lR(o,i)||R(e,n)R(r,a))){var s=(t*n-e*A)*(o-i)-(t-A)*(o*a-r*i),c=(t*n-e*A)*(r-a)-(e-n)*(o*a-r*i),l=(t-A)*(r-a)-(e-n)*(o-i);if(l){var g=s/l,M=c/l,u=+g.toFixed(2),d=+M.toFixed(2);if(!(u<+F(t,A).toFixed(2)||u>+R(t,A).toFixed(2)||u<+F(o,i).toFixed(2)||u>+R(o,i).toFixed(2)||d<+F(e,n).toFixed(2)||d>+R(e,n).toFixed(2)||d<+F(r,a).toFixed(2)||d>+R(r,a).toFixed(2)))return{x:g,y:M}}}}function g(t,A,n){var o=e.bezierBBox(t),r=e.bezierBBox(A);if(!e.isBBoxIntersect(o,r))return n?0:[];for(var i=s.apply(0,t),a=s.apply(0,A),c=R(~~(i/5),1),g=R(~~(a/5),1),M=[],u=[],d={},I=n?0:[],T=0;T=0&&x<=1.001&&B>=0&&B<=1.001&&(n?I++:I.push({x:D.x,y:D.y,t1:F(x,1),t2:F(B,1)}))}}return I}function M(t,A,n){t=e._path2curve(t),A=e._path2curve(A);for(var o,r,i,a,s,c,l,M,u,d,I=n?0:[],T=0,p=t.length;Tn)return n;for(;Ar?A=o:n=o,o=(n-A)/2+A}return o}var c=3*e,l=3*(n-e)-c,g=1-c-l,M=3*A,u=3*(o-A)-M,d=1-M-u;return a(t,1/(200*r))}function T(t,e){var A=[],n={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(n[q(o)]=t[o],A.push(q(o)));A.sort(lt)}this.anim=n,this.top=A[A.length-1],this.percents=A}function p(A,n,o,r,i,a){o=q(o);var s,c,l,g,M,d,T=A.ms,p={},h={},E={};if(r)for(w=0,C=re.length;wr*A.top){o=A.percents[w],M=A.percents[w-1]||0,T=T/A.top*(o-M),g=A.percents[w+1],s=A.anim[o];break}r&&n.attr(A.anim[A.percents[w]])}if(s){if(c)c.initstatus=r,c.start=new Date-c.ms*r;else{for(var D in s)if(s[y](D)&&(At[y](D)||n.paper.customAttributes[y](D)))switch(p[D]=n.attr(D),null==p[D]&&(p[D]=et[D]),h[D]=s[D],At[D]){case G:E[D]=(h[D]-p[D])/T;break;case"colour":p[D]=e.getRGB(p[D]);var x=e.getRGB(h[D]);E[D]={r:(x.r-p[D].r)/T,g:(x.g-p[D].g)/T,b:(x.b-p[D].b)/T};break;case"path":var B=St(p[D],h[D]),L=B[1];for(p[D]=B[0],E[D]=[],w=0,C=p[D].length;w',Tt=pt.firstChild,Tt.style.behavior="url(#default#VML)",!Tt||"object"!=typeof Tt.adj)return e.type=j;pt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=N=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,A,n,o,r,i){if(null==r){var a=t-n,s=A-o;return a||s?(180+180*k.atan2(-s,-a)/V+360)%360:0}return e.angle(t,A,r,i)-e.angle(n,o,r,i)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,A,n){if(n=e.is(n,"finite")?n:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-A)<=n)return t[o]}else{t=+t;var r=A%t;if(rt-n)return A-r+t}return A};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*k.random()|0,A="x"==t?e:3&e|8;return A.toString(16)});e.setWindow=function(A){t("raphael.setWindow",e,D.win,A),D.win=A,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var ht=function(t){if(e.vml){var A,n=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),A=r.body}catch(t){A=createPopup().document.body}var i=A.createTextRange();ht=o(function(t){try{A.style.color=U(t).replace(n,j);var e=i.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),ht=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,j).getPropertyValue("color")})}return ht(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Nt=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return this.hex},wt=function(t,A,n){if(null==A&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,A=t.g,t=t.r),null==A&&e.is(t,P)){var o=e.getRGB(t);t=o.r,A=o.g,n=o.b}return(t>1||A>1||n>1)&&(t/=255,A/=255,n/=255),[t,A,n]},Ct=function(t,A,n,o){t*=255,A*=255,n*=255;var r={r:t,g:A,b:n,hex:e.rgb(t,A,n),toString:ft};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var A;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(A=e.hsb2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(A=e.hsl2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(A=e.rgb2hsl(t),t.h=A.h,t.s=A.s,t.l=A.l,A=e.rgb2hsb(t),t.v=A.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=ft,t},e.hsb2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(A=t.b,e=t.s,n=t.o,t=t.h),t*=360;var o,r,i,a,s;return t=t%360/60,s=A*e,a=s*(1-O(t%2-1)),o=r=i=A-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.hsl2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(A=t.l,e=t.s,t=t.h),(t>1||e>1||A>1)&&(t/=360,e/=100,A/=100),t*=360;var o,r,i,a,s;return t=t%360/60,s=2*e*(A<.5?A:1-A),a=s*(1-O(t%2-1)),o=r=i=A-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],i+=[0,0,a,s,s,a][t],Ct(o,r,i,n)},e.rgb2hsb=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i;return r=R(t,e,A),i=r-F(t,e,A),n=0==i?null:r==t?(e-A)/i:r==e?(A-t)/i+2:(t-e)/i+4,n=(n+360)%6*60/360,o=0==i?0:i/r,{h:n,s:o,b:r,toString:Et}},e.rgb2hsl=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,r,i,a,s;return i=R(t,e,A),a=F(t,e,A),s=i-a,n=0==s?null:i==t?(e-A)/s:i==e?(A-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,r=(i+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:n,s:o,l:r,toString:Nt}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var A=D.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},A.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(A),A.src=t};e.getRGB=o(function(t){if(!t||(t=U(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ht(t));var A,n,o,i,a,s,c=t.match(J);return c?(c[2]&&(o=$(c[2].substring(5),16),n=$(c[2].substring(3,5),16),A=$(c[2].substring(1,3),16)),c[3]&&(o=$((a=c[3].charAt(3))+a,16),n=$((a=c[3].charAt(2))+a,16),A=$((a=c[3].charAt(1))+a,16)),c[4]&&(s=c[4][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100)),c[5]?(s=c[5][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsba"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsb2rgb(A,n,o,i)):c[6]?(s=c[6][S](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsla"==c[1].toLowerCase().slice(0,4)&&(i=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(i/=100),e.hsl2rgb(A,n,o,i)):(c={r:A,g:n,b:o,toString:r},c.hex="#"+(16777216|o|n<<8|A<<16).toString(16).slice(1),e.is(i,"finite")&&(c.opacity=i),c)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,A,n){return e.hsb2rgb(t,A,n).hex}),e.hsl=o(function(t,A,n){return e.hsl2rgb(t,A,n).hex}),e.rgb=o(function(t,e,A){function n(t){return t+.5|0}return"#"+(16777216|n(A)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},A=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),A.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var A=yt(t);if(A.arr)return xt(A.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||U(t).replace(it,function(t,e,A){var r=[],i=e.toLowerCase();if(A.replace(st,function(t,e){e&&r.push(+e)}),"m"==i&&r.length>2&&(o.push([e][b](r.splice(0,2))),i="l",e="m"==e?"l":"L"),"r"==i)o.push([e][b](r));else for(;r.length>=n[i]&&(o.push([e][b](r.splice(0,n[i]))),n[i]););}),o.toString=e._path2string,A.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var A=[];return e.is(t,X)&&e.is(t[0],X)&&(A=xt(t)),A.length||U(t).replace(at,function(t,e,n){var o=[];Y.call(e);n.replace(st,function(t,e){e&&o.push(+e)}),A.push([e][b](o))}),A.toString=e._path2string,A});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var A in e)e[y](A)&&A!=t&&(e[A].sleep--,!e[A].sleep&&delete e[A])}),e[t]};e.findDotsAtSegment=function(t,e,A,n,o,r,i,a,s){var c=1-s,l=H(c,3),g=H(c,2),M=s*s,u=M*s,d=l*t+3*g*s*A+3*c*s*s*o+u*i,I=l*e+3*g*s*n+3*c*s*s*r+u*a,T=t+2*s*(A-t)+M*(o-2*A+t),p=e+2*s*(n-e)+M*(r-2*n+e),h=A+2*s*(o-A)+M*(i-2*o+A),E=n+2*s*(r-n)+M*(a-2*r+n),N=c*t+s*A,f=c*e+s*n,w=c*o+s*i,C=c*r+s*a,y=90-180*k.atan2(T-h,p-E)/V;return(T>h||p=t.x&&e<=t.x2&&A>=t.y&&A<=t.y2},e.isBBoxIntersect=function(t,A){var n=e.isPointInsideBBox;return n(A,t.x,t.y)||n(A,t.x2,t.y)||n(A,t.x,t.y2)||n(A,t.x2,t.y2)||n(t,A.x,A.y)||n(t,A.x2,A.y)||n(t,A.x,A.y2)||n(t,A.x2,A.y2)||(t.xA.x||A.xt.x)&&(t.yA.y||A.yt.y); +},e.pathIntersection=function(t,e){return M(t,e)},e.pathIntersectionNumber=function(t,e){return M(t,e,1)},e.isPointInsidePath=function(t,A,n){var o=e.pathBBox(t);return e.isPointInsideBBox(o,A,n)&&M(t,[["M",A,n],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return A(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=St(t);for(var n,o=0,r=0,i=[],a=[],s=0,c=t.length;s1&&(h=k.sqrt(h),A*=h,n*=h);var E=A*A,N=n*n,f=(i==a?-1:1)*k.sqrt(O((E*N-E*p*p-N*T*T)/(E*p*p+N*T*T))),w=f*A*p/n+(t+s)/2,C=f*-n*T/A+(e+c)/2,y=k.asin(((e-C)/n).toFixed(9)),D=k.asin(((c-C)/n).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(O(x)>M){var B=D,L=s,Q=c;D=y+M*(a&&D>y?1:-1),s=w+A*k.cos(D),c=C+n*k.sin(D),d=jt(s,c,A,n,r,0,a,L,Q,[D,B,w,C])}x=D-y;var j=k.cos(y),m=k.sin(y),U=k.cos(D),v=k.sin(D),z=k.tan(x/4),Y=4/3*A*z,R=4/3*n*z,F=[t,e],H=[t+Y*m,e-R*j],G=[s+Y*v,c-R*U],P=[s,c];if(H[0]=2*F[0]-H[0],H[1]=2*F[1]-H[1],l)return[H,G,P][b](d);d=[H,G,P][b](d).join()[S](",");for(var X=[],W=0,J=d.length;W"1e12"&&(M=.5),O(u)>"1e12"&&(u=.5),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),c=r-2*n+e-(a-2*r+n),l=2*(n-e)-2*(r-n),g=e-n,M=(-l+k.sqrt(l*l-4*c*g))/2/c,u=(-l-k.sqrt(l*l-4*c*g))/2/c,O(M)>"1e12"&&(M=.5),O(u)>"1e12"&&(u=.5),M>0&&M<1&&(s=mt(t,e,A,n,o,r,i,a,M),I.push(s.x),d.push(s.y)),u>0&&u<1&&(s=mt(t,e,A,n,o,r,i,a,u),I.push(s.x),d.push(s.y)),{min:{x:F[L](0,I),y:F[L](0,d)},max:{x:R[L](0,I),y:R[L](0,d)}}}),St=e._path2curve=o(function(t,e){var A=!e&&yt(t);if(!e&&A.curve)return xt(A.curve);for(var n=Lt(t),o=e&&Lt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,A){var n,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](jt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==A||"S"==A?(n=2*e.x-e.bx,o=2*e.y-e.by):(n=e.x,o=e.y),t=["C",n,o][b](t.slice(1));break;case"T":"Q"==A||"T"==A?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](Qt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](Qt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var A=t[e];A.length;)l[e]="A",o&&(g[e]="A"),t.splice(e++,0,["C"][b](A.splice(0,6)));t.splice(e,1),I=R(n.length,o&&o.length||0)}},c=function(t,e,A,r,i){t&&e&&"M"==t[i][0]&&"M"!=e[i][0]&&(e.splice(i,0,["M",r.x,r.y]),A.bx=0,A.by=0,A.x=t[i][1],A.y=t[i][2],I=R(n.length,o&&o.length||0))},l=[],g=[],M="",u="",d=0,I=R(n.length,o&&o.length||0);do){if(A&&!M.start){if(l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-u),g+=["C"+l.start.x,l.start.y,l.m.x,l.m.y,l.x,l.y],r)return g;M.start=g,g=["M"+l.x,l.y+"C"+l.n.x,l.n.y,l.end.x,l.end.y,s[5],s[6]].join(),u+=c,i=+s[5],a=+s[6];continue}if(!t&&!A)return l=$t(i,a,s[1],s[2],s[3],s[4],s[5],s[6],o-u),{x:l.x,y:l.y,alpha:l.alpha}}u+=c,i=+s[5],a=+s[6]}g+=s.shift()+s}return M.end=g,l=t?u:A?M:e.findDotsAtSegment(i,a,s[0],s[1],s[2],s[3],s[4],s[5],1),l.alpha&&(l={x:l.x,y:l.y,alpha:l.alpha}),l}},ee=te(1),Ae=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=Ae,e.getSubpath=function(t,e,A){if(this.getTotalLength(t)-A<1e-6)return ne(t,e).end;var n=ne(t,A,1);return e?ne(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return Ae(e,t)},Zt.getPath=function(){var t,A=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return A&&(t=A(this)),t},Zt.getSubpath=function(t,A){var n=this.getPath();if(n)return e.getSubpath(n,t,A)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,A=k.sqrt(.1734+e*e),n=A-e,o=H(O(n),1/3)*(n<0?-1:1),r=-A-e,i=H(O(r),1/3)*(r<0?-1:1),a=o+i+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*k.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,A=7.5625,n=2.75;return t<1/n?e=A*t*t:t<2/n?(t-=1.5/n,e=A*t*t+.75):t<2.5/n?(t-=2.25/n,e=A*t*t+.9375):(t-=2.625/n,e=A*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],ie=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var A=+new Date,n=0;n1&&!o.next){for(i in M)M[y](i)&&(I[i]=o.totalOrigin[i]);o.el.attr(I),p(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&p(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&ie(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,A,n,o,r,i){var a=this;if(a.removed)return i&&i.call(a),a;var s=n instanceof T?n:e.animation(n,o,r,i);p(s,a,s.percents[0],null,a.attr());for(var c=0,l=re.length;cs&&(s=l)}s+="%",!t[s].callback&&(t[s].callback=o)}return new T(t,A)},Zt.animate=function(t,A,n,o){var r=this;if(r.removed)return o&&o.call(r),r;var i=t instanceof T?t:e.animation(t,A,n,o);return p(i,r,i.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var A,n,o=[],r=0;if(null!=e)return p(t,this,-1,F(e,1)),this;for(A=re.length;r1)for(var n=0,o=A.length;n.5)-1;s(M-.5,2)+s(u-.5,2)>.25&&(u=r.sqrt(.25-s(M-.5,2))*o+.5)&&.5!=u&&(u=u.toFixed(5)-1e-5*o)}return g}),o=o.split(/\s*\-\s*/),"linear"==c){var N=o.shift();if(N=-n(N),isNaN(N))return null;var f=[0,0,r.cos(t.rad(N)),r.sin(t.rad(N))],w=1/(i(a(f[2]),a(f[3]))||1);f[2]*=w,f[3]*=w,f[2]<0&&(f[0]=-f[2],f[2]=0),f[3]<0&&(f[1]=-f[3],f[3]=0)}var C=t._parseDots(o);if(!C)return null;if(l=l.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&l!=e.gradient.id&&(I.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){h=T(c+"Gradient",{id:l}),e.gradient=h,T(h,"radial"==c?{fx:M,fy:u}:{x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientTransform:e.matrix.invert()}),I.defs.appendChild(h);for(var y=0,D=C.length;y1?U.opacity/100:U.opacity});case"stroke":U=t.getRGB(I),s.setAttribute(d,U.hex),"stroke"==d&&U[e]("opacity")&&T(s,{"stroke-opacity":U.opacity>1?U.opacity/100:U.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&f(n,n._.arrows.startString),"endString"in n._.arrows&&f(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=A(I).charAt())&&p(n,I);break;case"opacity":l.gradient&&!l[e]("stroke-opacity")&&T(s,{"stroke-opacity":I>1?I/100:I});case"fill-opacity":if(l.gradient){S=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,g)),S&&(v=S.getElementsByTagName("stop"),T(v[v.length-1],{"stop-opacity":I}));break}default:"font-size"==d&&(I=o(I,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=I,n._.dirty=1,s.setAttribute(d,I)}}x(n,r),s.style.visibility=M},D=1.2,x=function(n,r){if("text"==n.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var i=n.attrs,a=n.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,g).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(i.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var c,l=A(r.text).split("\n"),M=[],u=0,d=l.length;u"));var Z=X.getBoundingClientRect();h.W=M.w=(Z.right-Z.left)/W,h.H=M.h=(Z.bottom-Z.top)/W,h.X=M.x,h.Y=M.y+h.H/2,("x"in s||"y"in s)&&(h.path.v=t.format("m{0},{1}l{2},{1}",r(M.x*N),r(M.y*N),r(M.x*N)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(A=o.sqrt(.25-a(e-.5,2))*(2*(A>.5)-1)+.5),c=e+u+A),d}),r=r.split(/\s*\-\s*/),"linear"==s){var l=r.shift();if(l=-n(l),isNaN(l))return null}var g=t._parseDots(r);if(!g)return null;if(e=e.shape||e.node,g.length){e.removeChild(i),i.on=!0,i.method="none",i.color=g[0].color,i.color2=g[g.length-1].color;for(var M=[],I=0,T=g.length;I')}}catch(t){j=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),A=e.container,n=e.height,o=e.width,r=e.x,i=e.y;if(!A)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),c=s.style;return r=r||0,i=i||0,o=o||512,n=n||342,a.width=o,a.height=n,o==+o&&(o+="px"),n==+n&&(n+="px"),a.coordsize=1e3*N+u+1e3*N,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),c.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,n),1==A?(t._g.doc.body.appendChild(s),c.left=r+"px",c.top=i+"px",c.position="absolute"):A.firstChild?A.insertBefore(s,A.firstChild):A.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var m=t.st;for(var U in Q)Q[e](U)&&!m[e](U)&&(m[U]=function(t){return function(){var e=arguments;return this.forEach(function(A){A[t].apply(A,e)})}}(U))}}.apply(e,n),!(void 0!==o&&(t.exports=o))}])})},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A1&&(o=(t+1)/2),n.splice(o,1),2===n.length)n=e.connection._buildStraightLinePathInfo();else{var r=n[1],i=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=n[0];a[1]=i.x,a[2]=i.y;var s=n[n.length-2],c=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),l=n[n.length-1];l[1]=c.x,l[2]=c.y}e.path.attr("path",n),e.remove()});var M=function(n,o){e.context.snapto&&(n-=n%10,o-=o%10);var a=this.ox+n,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),i=Math.round(t/2);var c=e.path.attr("path"),l=c.length,g=void 0,M=void 0,u=void 0,d=2*(A.length-1)-1;if(0===t||1===t){if(u=c[1],g=e.connection._buildFromFigureIntersetion({x:u[1],y:u[2]},!0),M=A[0],2===A.length){var I=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(I){var T=A[A.length-1];T[1]=I.x,T[2]=I.y}}}else d!==t&&d!==t+1&&d!==t+2||(u=c[l-2],g=e.connection._buildToFigureIntersetion({x:a,y:s},!0),M=A[A.length-1]);g&&(M[1]=g.x,M[2]=g.y);var p=[];A.forEach(function(t,e){r?e===i?p.push(["L",a,s]):p.push(t):(p.push(t),e===i&&p.push(["L",a,s]))}),e.path.attr("path",p),e.connection._buildText()}},u=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),A=this.oldConnectionPathInfo,n=e.connection.uuid;e.context.addRedoUndo({redo:function(){var A=e.context.getNodeByUUID(n);A.pathInfo=t,A.updatePath(),A._buildText()},undo:function(){var t=e.context.getNodeByUUID(n);t.pathInfo=A,t.updatePath(),t._buildText()}})};this.rect.drag(M,u,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A'}}]),e}(c.default);e.default=l},function(t,e){"use strict";function A(t){var e=i("消息提示",t);e.modal("show")}function n(t,e){var A=i("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);A.modal("show")}function o(t,e,A){var n=i(t,e,[{name:"确认",click:function(){A.call(this)}}]);n.modal("show")}function r(t,e,A,n,o){var r=i(t,e,A,o);if(r.modal("show"),n){var a=!0,s=!1,c=void 0;try{for(var l,g=n[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var M=l.value;r.on(M.name,M.callback)}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}}}function i(t,e,A,n){var o=this,r="modal-dialog"+(n?" modal-lg":""),i=$(''),s=$('
    ');i.append(s);var c=$(''),A.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),A.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),A.append(this.canvasContainer),this.context=new l.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var n="_prop_container",o=$('
    ');this.canvasContainer.append(o);var i=$('');o.append(i),i.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),o.append(a),o.draggable();var c=$("#__prop_panel_tool__");c.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(c.removeClass("glyphicon-circle-arrow-left"),c.addClass("glyphicon-circle-arrow-down")):(c.removeClass("glyphicon-circle-arrow-down"),c.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return i(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void h.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void h.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void h.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),A=t.x,n=t.y,o=t.width,r=t.height,i=t.name;A=parseInt(A),n=parseInt(n),o=parseInt(o),r=parseInt(r);var a=A+o+10,s=n+r+10;this.context.resizePaper(a+50,s+50);var c=e._newNodeInstance(A,n,i);c.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(A){17===A.which&&(e=!0),e&&(90===A.which?t.context.undoManager.undo():89===A.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;M.eventEmitter.on(M.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,A=this,n=!0,o=!1,r=void 0;try{for(var i,a=function(){var e=i.value,A=$('");A.click(function(){e.click.call(this)}),t.toolbar.append(A)},s=this.buttons[Symbol.iterator]();!(n=(i=s.next()).done);n=!0)a()}catch(t){o=!0,r=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw r}}var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,A.nodeToolbar.children("label").removeClass("active")});var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,A.nodeToolbar.children("label").removeClass("active")});var g=$('');this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.undo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.redo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.SNAPTO_SELECTED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.REMOVE_CLICKED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.ALIGN_CENTER),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.ALIGN_MIDDLE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),M.eventEmitter.emit(M.UNIFY_SIZE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,A=!1,n=void 0;try{for(var o,r=function(){var e=o.value,A=$('\n \n ");t.nodeToolbar.append(A),A.click(function(){M.eventEmitter.emit(M.TRIGGER_TOOL,e.getType())})},i=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=i.next()).done);e=!0)r()}catch(t){A=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(A)throw n}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;M.eventEmitter.on(M.OBJECT_SELECTED,function(A){if(t.propContainer.empty(),A instanceof d.default){var n=A.name||A.text.attr("text"),o=$('
    '),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=!1,a=!0,s=!1,c=void 0;try{for(var l,g=e.context.allFigures[Symbol.iterator]();!(a=(l=g.next()).done);a=!0){var M=l.value;if(M instanceof d.default&&M!==A&&M.name===n){i=!0;break}}}catch(t){s=!0,c=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw c}}return i?void h.alert("节点名已存在!"):(A.name=n,A.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t.text.attr("text",n)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(A._tool.getPropertiesProducer().call(A))}else if(A instanceof T.default){var i=$('
    '),a=$('');i.append(a),t.propContainer.append(i),a.change(function(t){var n=$(this).val(),o=A.name,r=A.uuid,i=A.from.fromConnections,a=!1,s=!0,c=!1,l=void 0;try{for(var g,M=i[Symbol.iterator]();!(s=(g=M.next()).done);s=!0){var u=g.value;if(u!==A&&u.name===n){a=!0;break}}}catch(t){c=!0,l=t}finally{try{!s&&M.return&&M.return()}finally{if(c)throw l}}return a?void h.alert("连线名已存在"):(A.name=n,A._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=n,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
    '),c=$('');s.append(c),c.val(A.type),c.change(function(t){var n=$(this).val(),o=A.uuid,r=A.type;A.type=n,A.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=n,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(A.from._tool.getConnectionPropertiesProducer().call(A))}}),M.eventEmitter.on(M.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),M.eventEmitter.emit(M.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(h.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,A=!1,n=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var i=o.value;if(i instanceof d.default){var a=i.validate();a&&t.push(a)}}}catch(t){A=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(A)throw n}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",h.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,A){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,A){var n=A(254);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+A(255)+");src:url("+A(255)+") format('embedded-opentype'),url("+A(256)+") format('woff'),url("+A(257)+") format('truetype'),url("+A(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""]); +},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="; +},function(t,e,A){var n=A(260);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+A(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,A){A(263),A(264),A(265),A(266),A(267),A(268),A(269),A(270),A(271),A(272),A(273),A(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var A in e)if(void 0!==t.style[A])return{end:e[A]};return!1}t.fn.emulateTransitionEnd=function(e){var A=!1,n=this;t(this).one("bsTransitionEnd",function(){A=!0});var o=function(){A||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.alert");o||A.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(A)})}var A='[data-dismiss="alert"]',n=function(e){t(e).on("click",A,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function A(){i.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var i=t("#"===r?[]:r);e&&e.preventDefault(),i.length||(i=o.closest(".alert")),i.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(i.removeClass("in"),t.support.transition&&i.hasClass("fade")?i.one("bsTransitionEnd",A).emulateTransitionEnd(n.TRANSITION_DURATION):A())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",A,n.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),r="object"==typeof e&&e;o||n.data("bs.button",o=new A(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.isLoading=!1};A.VERSION="3.3.7",A.DEFAULTS={loadingText:"loading..."},A.prototype.setState=function(e){var A="disabled",n=this.$element,o=n.is("input")?"val":"html",r=n.data();e+="Text",null==r.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(A).attr(A,A).prop(A,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(A).removeAttr(A).prop(A,!1))},this),0)},A.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var A=this.$element.find("input");"radio"==A.prop("type")?(A.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==A.prop("type")&&(A.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),A.prop("checked",this.$element.hasClass("active")),t&&A.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=A,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(A){var n=t(A.target).closest(".btn");e.call(n,"toggle"),t(A.target).is('input[type="radio"], input[type="checkbox"]')||(A.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),r=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e),i="string"==typeof e?e:r.slide;o||n.data("bs.carousel",o=new A(this,r)),"number"==typeof e?o.to(e):i?o[i]():r.interval&&o.pause().cycle()})}var A=function(e,A){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=A,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};A.VERSION="3.3.7",A.TRANSITION_DURATION=600,A.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},A.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},A.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},A.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},A.prototype.getItemForDirection=function(t,e){var A=this.getItemIndex(e),n="prev"==t&&0===A||"next"==t&&A==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(A+o)%this.$items.length;return this.$items.eq(r)},A.prototype.to=function(t){var e=this,A=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):A==t?this.pause().cycle():this.slide(t>A?"next":"prev",this.$items.eq(t))},A.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},A.prototype.next=function(){if(!this.sliding)return this.slide("next")},A.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},A.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),r=n||this.getItemForDirection(e,o),i=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var c=r[0],l=t.Event("slide.bs.carousel",{relatedTarget:c,direction:a});if(this.$element.trigger(l),!l.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var g=t(this.$indicators.children()[this.getItemIndex(r)]);g&&g.addClass("active")}var M=t.Event("slid.bs.carousel",{relatedTarget:c,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(M)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(M)),i&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=A,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(A){var n,o=t(this),r=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var i=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(i.interval=!1),e.call(r,i),a&&r.data("bs.carousel").to(a),A.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var A=t(this);e.call(A,A.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A,n=e.attr("data-target")||(A=e.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function A(e){return this.each(function(){var A=t(this),o=A.data("bs.collapse"),r=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||A.data("bs.collapse",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(A.call(o,"hide"),e||o.data("bs.collapse",null));var i=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[i](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[i](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",i].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[i](this.$element[0][s])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var A=this.dimension();this.$element[A](this.$element[A]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[A](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(A,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var A=t.hasClass("in");t.attr("aria-expanded",A),e.toggleClass("collapsed",!A).attr("aria-expanded",A)};var o=t.fn.collapse;t.fn.collapse=A,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var r=e(o),i=r.data("bs.collapse"),a=i?"toggle":o.data();A.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A=e.attr("data-target");A||(A=e.attr("href"),A=A&&/#[A-Za-z]/.test(A)&&A.replace(/.*(?=#[^\s]*$)/,""));var n=A&&t(A);return n&&n.length?n:e.parent()}function A(A){A&&3===A.which||(t(o).remove(),t(r).each(function(){var n=t(this),o=e(n),r={relatedTarget:this};o.hasClass("open")&&(A&&"click"==A.type&&/input|textarea/i.test(A.target.tagName)&&t.contains(o[0],A.target)||(o.trigger(A=t.Event("hide.bs.dropdown",r)),A.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function n(e){return this.each(function(){var A=t(this),n=A.data("bs.dropdown");n||A.data("bs.dropdown",n=new i(this)),"string"==typeof e&&n[e].call(A)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',i=function(e){t(e).on("click.bs.dropdown",this.toggle)};i.VERSION="3.3.7",i.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),i=r.hasClass("open");if(A(),!i){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",A);var a={relatedTarget:this};if(r.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},i.prototype.keydown=function(A){if(/(38|40|27|32)/.test(A.which)&&!/input|textarea/i.test(A.target.tagName)){var n=t(this);if(A.preventDefault(),A.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),i=o.hasClass("open");if(!i&&27!=A.which||i&&27==A.which)return 27==A.which&&o.find(r).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var c=s.index(A.target);38==A.which&&c>0&&c--,40==A.which&&cdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},A.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},A.prototype.init=function(e,A,n){if(this.enabled=!0,this.type=e,this.$element=t(A),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var i=o[r];if("click"==i)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=i){var a="hover"==i?"mouseenter":"focusin",s="hover"==i?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},A.prototype.getDelegateOptions=function(){var e={},A=this.getDefaults();return this._options&&t.each(this._options,function(t,n){A[t]!=n&&(e[t]=n)}),e},A.prototype.enter=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusin"==e.type?"focus":"hover"]=!0),A.tip().hasClass("in")||"in"==A.hoverState?void(A.hoverState="in"):(clearTimeout(A.timeout),A.hoverState="in",A.options.delay&&A.options.delay.show?void(A.timeout=setTimeout(function(){"in"==A.hoverState&&A.show()},A.options.delay.show)):A.show())},A.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},A.prototype.leave=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusout"==e.type?"focus":"hover"]=!1),!A.isInStateTrue())return clearTimeout(A.timeout),A.hoverState="out",A.options.delay&&A.options.delay.hide?void(A.timeout=setTimeout(function(){"out"==A.hoverState&&A.hide()},A.options.delay.hide)):A.hide()},A.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,c=s.test(a);c&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var l=this.getPosition(),g=r[0].offsetWidth,M=r[0].offsetHeight;if(c){var u=a,d=this.getPosition(this.$viewport);a="bottom"==a&&l.bottom+M>d.bottom?"top":"top"==a&&l.top-Md.width?"left":"left"==a&&l.left-gi.top+i.height&&(o.top=i.top+i.height-s)}else{var c=e.left-r,l=e.left+r+A;ci.right&&(o.left=i.left+i.width-l)}return o},A.prototype.getTitle=function(){var t,e=this.$element,A=this.options;return t=e.attr("data-original-title")||("function"==typeof A.title?A.title.call(e[0]):A.title)},A.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},A.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},A.prototype.enable=function(){this.enabled=!0},A.prototype.disable=function(){this.enabled=!1},A.prototype.toggleEnabled=function(){this.enabled=!this.enabled},A.prototype.toggle=function(e){var A=this;e&&(A=t(e.currentTarget).data("bs."+this.type),A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A))),e?(A.inState.click=!A.inState.click,A.isInStateTrue()?A.enter(A):A.leave(A)):A.tip().hasClass("in")?A.leave(A):A.enter(A)},A.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=A,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new A(this,r)),"string"==typeof e&&o[e]())})}var A=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");A.VERSION="3.3.7",A.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),A.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),A.prototype.constructor=A,A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),A=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof A?"html":"append":"text"](A),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},A.prototype.hasContent=function(){return this.getTitle()||this.getContent()},A.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=A,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(A,n){this.$body=t(document.body),this.$scrollElement=t(t(A).is(document.body)?window:A),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function A(A){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),r="object"==typeof A&&A;o||n.data("bs.scrollspy",o=new e(this,r)),"string"==typeof A&&o[A]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,A="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(A="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){ +var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[A]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,A=this.getScrollHeight(),n=this.options.offset+A-this.$scrollElement.height(),o=this.offsets,r=this.targets,i=this.activeTarget;if(this.scrollHeight!=A&&this.refresh(),e>=n)return i!=(t=r[r.length-1])&&this.activate(t);if(i&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var i=n.find("> .active"),a=o&&t.support.transition&&(i.length&&i.hasClass("fade")||!!n.find("> .fade").length);i.length&&a?i.one("bsTransitionEnd",r).emulateTransitionEnd(A.TRANSITION_DURATION):r(),i.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=A,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(A){A.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),r="object"==typeof e&&e;o||n.data("bs.affix",o=new A(this,r)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.options=t.extend({},A.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};A.VERSION="3.3.7",A.RESET="affix affix-top affix-bottom",A.DEFAULTS={offset:0,target:window},A.prototype.getState=function(t,e,A,n){var o=this.$target.scrollTop(),r=this.$element.offset(),i=this.$target.height();if(null!=A&&"top"==this.affixed)return o=t-n&&"bottom"},A.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(A.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},A.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},A.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,r=n.bottom,i=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(r=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof r&&(r=n.bottom(this.$element));var a=this.getState(i,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),c=t.Event(s+".bs.affix");if(this.$element.trigger(c),c.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(A.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=A,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var A=t(this),n=A.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(A,n)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var A=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,n,o=t(this),r=A.handle?t(A.handle,o):o;r.on({mousedown:function(r){var i=r.target,a="",s=!1;if(i&&(a=i.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===i.tagName||"INPUT"===i.tagName||i&&"presentation"===t(i).attr("role")||A.exclude&&~t.inArray(r.target,t(A.exclude,o)))){var c=o.offset();e=r.pageX-c.left,n=r.pageY-c.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-n,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var A=0;A0&&i.push(g)}else{var T=g.rect,p=T.getBBox();(p.x>=A.x&&p.x<=A.x2||p.x2>=A.x&&p.x2<=A.x2)&&(p.y>=A.y&&p.y<=A.y2||p.y2>=A.y&&p.y2<=A.y2)&&s.push(g)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):i.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var n=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,A),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof g.default||e instanceof c.default)){var A=t.offsetX,n=t.offsetY,r=e._newNodeInstance(A,n);r&&!function(){var t=r.uuid,i=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(A,n,i),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof g.default){var e=o.currentConnection;if(e){var A=t.offsetX,n=t.offsetY;e.endX=A,e.endY=n,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);eA&&this.container.width(t+10),e>n&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,A){t||(t=e),e instanceof E.default&&e.select()}),t&&f.eventEmitter.emit(f.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),f.eventEmitter.emit(f.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return u.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var r,i=this.allFigures[Symbol.iterator]();!(A=(r=i.next()).done);A=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&i.return&&i.return()}finally{if(n)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),A=this.allFigures.indexOf(e);this.allFigures.splice(A,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;f.eventEmitter.on(f.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),f.eventEmitter.on(f.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,A){var n=e.toJSON(),o=e.uuid,r=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,A=t.to.uuid,i=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(A),s=new E.default(i,{x:i.rect.attr("x"),y:i.rect.attr("y")});i.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(n)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var A=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=A._newNodeInstance(10,10,"");t&&(t.initFromJson(n),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),f.eventEmitter.on(f.ALIGN_CENTER,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var M={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(e=g.rect.attr("x"),n=g.rect.attr("width"),e+=n/2):g.moveTo(e,A),M.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,M),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.ALIGN_MIDDLE,function(){var e=-1,A=-1,n=void 0,o=new Map,r=0,i=!0,a=!1,s=void 0;try{for(var c,l=t.selectionFigures[Symbol.iterator]();!(i=(c=l.next()).done);i=!0){var g=c.value;if(g instanceof E.default)break;var M={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===r?(A=g.rect.attr("y"),n=g.rect.attr("height"),A+=n/2):g.moveTo(e,A),M.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,M),r++}}catch(t){a=!0,s=t}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.newXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,r=o.keys()[Symbol.iterator]();!(t=(n=r.next()).done);t=!0){var i=n.value,a=u.getNodeByUUID(i),s=o.get(i),c=s.oldXY;a.move(c.x,c.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.UNIFY_SIZE,function(){var e=void 0,A=void 0,n=new Map,o=0,r=!0,i=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var l=s.value;if(l instanceof E.default)break;var g={oldWH:{w:l.rect.attr("width"),h:l.rect.attr("height")}};0===o?(e=l.rect.attr("width"),A=l.rect.attr("height")):l.changeSize(e,A),g.newWH={w:l.rect.attr("width"),h:l.rect.attr("height")},n.set(l.uuid,g),o++}}catch(t){i=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(i)throw a}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=M.getNodeByUUID(i),s=n.get(i),c=s.newWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var o,r=n.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var i=o.value,a=M.getNodeByUUID(i),s=n.get(i),c=s.oldWH;a.changeSize(c.w,c.h)}}catch(t){e=!0,A=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw A}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new I.default,this.connectionTool=new p.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,A){var n;!function(){"use strict";function o(t,e,A){return t.splice(e,!A||1+A-e+(!(A<0^e>=0)&&(A<0||-1)*t.length)),t.length}var r=function(){var t,e,A=[],n=-1,r=0,i=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(i=!0,t[e](),i=!1,this):this},{add:function(e){return i?this:(A.splice(n+1,A.length-n),A.push(e),r&&A.length>r&&o(A,0,-(r+1)),n=A.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=A[n];return o?(e(o,"undo"),n-=1,t&&t(),this):this},redo:function(){var o=A[n+1];return o?(e(o,"redo"),n+=1,t&&t(),this):this},clear:function(){var e=A.length;A=[],n=-1,t&&e>0&&t()},hasUndo:function(){return n!==-1},hasRedo:function(){return n>>((3&e)<<3)&255;return A},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=A(284).randomBytes;d=M=t&&function(){return t(16)},M()}catch(t){}}function s(t,e,A){var n=e&&A||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=h[t])});o<16;)e[n+o++]=0;return e}function c(t,e){var A=e||0,n=p;return n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]}function l(t,e,A){var n=e&&A||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,i=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=i-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||i>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=i,y=a,w=r,i+=122192928e5;var l=(1e4*(268435455&i)+a)%4294967296;o[n++]=l>>>24&255,o[n++]=l>>>16&255,o[n++]=l>>>8&255,o[n++]=255&l;var g=i/4294967296*1e4&268435455;o[n++]=g>>>8&255,o[n++]=255&g,o[n++]=g>>>24&15|16,o[n++]=g>>>16&255,o[n++]=r>>>8|128,o[n++]=255&r;for(var M=t.node||f,u=0;u<6;u++)o[n+u]=M[u];return e?e:c(o)}function g(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new T(16):null,t=null),t=t||{};var o=t.random||(t.rng||M)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[n+r]=o[r];return e||c(o)}var M,u,d,I;r?i():a();for(var T="function"==typeof o?o:Array,p=[],h={},E=0;E<256;E++)p[E]=(E+256).toString(16).substr(1),h[p[E]]=E;var N=M(),f=[1|N[0],N[1],N[2],N[3],N[4],N[5]],w=16383&(N[6]<<8|N[7]),C=0,y=0,D=g;D.v1=l,D.v4=g,D.parse=s,D.unparse=c,D.BufferClass=T,D._rng=M,D._mathRNG=u,D._nodeRNG=d,D._whatwgRNG=I,"undefined"!=typeof t&&t.exports?t.exports=D:(n=function(){return D}.call(e,A,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,A(280).Buffer)},function(t,e,A){(function(t,n){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function i(e,A){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function T(e){return+e!=e&&(e=0),t.alloc(+e)}function p(e,A){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(A){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;A=(""+A).toLowerCase(),o=!0}}function h(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if(A>>>=0,e>>>=0,A<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return U(this,e,A);case"utf8":case"utf-8":return b(this,e,A);case"ascii":return j(this,e,A);case"latin1":case"binary":return m(this,e,A);case"base64":return L(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function N(e,A,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof A&&(A=t.from(A,o)),t.isBuffer(A))return 0===A.length?-1:f(e,A,n,o,r);if("number"==typeof A)return A&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,A,n):Uint8Array.prototype.lastIndexOf.call(e,A,n):f(e,[A],n,o,r);throw new TypeError("val must be string, number or Buffer")}function f(t,e,A,n,o){function r(t,e){return 1===i?t[e]:t.readUInt16BE(e*i)}var i=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;i=2,a/=2,s/=2,A/=2}var c;if(o){var l=-1;for(c=A;ca&&(A=a-s),c=A;c>=0;c--){for(var g=!0,M=0;Mo&&(n=o)):n=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");n>r/2&&(n=r/2);for(var i=0;i239?4:r>223?3:r>191?2:1;if(o+a<=A){var s,c,l,g;switch(a){case 1:r<128&&(i=r);break;case 2:s=t[o+1],128===(192&s)&&(g=(31&r)<<6|63&s,g>127&&(i=g));break;case 3:s=t[o+1],c=t[o+2],128===(192&s)&&128===(192&c)&&(g=(15&r)<<12|(63&s)<<6|63&c,g>2047&&(g<55296||g>57343)&&(i=g));break;case 4:s=t[o+1],c=t[o+2],l=t[o+3],128===(192&s)&&128===(192&c)&&128===(192&l)&&(g=(15&r)<<18|(63&s)<<12|(63&c)<<6|63&l,g>65535&&g<1114112&&(i=g))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=a}return Q(n)}function Q(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var A="",n=0;nn)&&(A=n);for(var o="",r=e;rA)throw new RangeError("Trying to access beyond buffer length")}function z(e,A,n,o,r,i){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>r||Ae.length)throw new RangeError("Index out of range")}function Y(t,e,A,n){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-A,2);o>>8*(n?o:1-o)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-A,4);o>>8*(n?o:3-o)&255}function R(t,e,A,n,o,r){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function F(t,e,A,n,o){return o||R(t,e,A,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,A,n,23,4),A+4}function O(t,e,A,n,o){return o||R(t,e,A,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,A,n,52,8),A+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var A,n=t.length,o=null,r=[],i=0;i55295&&A<57344){if(!o){if(A>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(i+1===n){(e-=3)>-1&&r.push(239,191,189);continue}o=A;continue}if(A<56320){(e-=3)>-1&&r.push(239,191,189),o=A;continue}A=(o-55296<<10|A-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,A<128){if((e-=1)<0)break;r.push(A)}else if(A<2048){if((e-=2)<0)break;r.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;r.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return r}function X(t){for(var e=[],A=0;A>8,o=A%256,r.push(o),r.push(n);return r}function J(t){return _.toByteArray(H(t))}function Z(t,e,A,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+A]=t[o];return o}function K(t){return t!==t}var _=A(281),q=A(282),$=A(283);e.Buffer=t,e.SlowBuffer=T,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,A){return a(null,t,e,A)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,A){return c(null,t,e,A)},t.allocUnsafe=function(t){return l(null,t)},t.allocUnsafeSlow=function(t){return l(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,A){if(!t.isBuffer(e)||!t.isBuffer(A))throw new TypeError("Arguments must be Buffers");if(e===A)return 0;for(var n=e.length,o=A.length,r=0,i=Math.min(n,o);r0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),""},t.prototype.compare=function(e,A,n,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===A&&(A=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),A<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index"); +if(o>=r&&A>=n)return 0;if(o>=r)return-1;if(A>=n)return 1;if(A>>>=0,n>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var i=r-o,a=n-A,s=Math.min(i,a),c=this.slice(o,r),l=e.slice(A,n),g=0;go)&&(A=o),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var r=!1;;)switch(n){case"hex":return w(this,t,e,A);case"utf8":case"utf-8":return C(this,t,e,A);case"ascii":return y(this,t,e,A);case"latin1":case"binary":return D(this,t,e,A);case"base64":return x(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,A);default:if(r)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,A){var n=this.length;e=~~e,A=void 0===A?n:~~A,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),A<0?(A+=n,A<0&&(A=0)):A>n&&(A=n),A0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||v(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||v(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||v(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||v(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||v(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=this[t],o=1,r=0;++r=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||v(t,e,this.length);for(var n=e,o=1,r=this[t+--n];n>0&&(o*=256);)r+=this[t+--n]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||v(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||v(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt16BE=function(t,e){e||v(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt32LE=function(t,e){return e||v(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||v(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||v(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||v(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,A,n){if(t=+t,e|=0,A|=0,!n){var o=Math.pow(2,8*A)-1;z(this,t,e,A,o,0)}var r=1,i=0;for(this[e]=255&t;++i=0&&(i*=256);)this[e+r]=t/i&255;return e+A},t.prototype.writeUInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[A]=255&e,A+1},t.prototype.writeUInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeUInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeUInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e):k(this,e,A,!0),A+4},t.prototype.writeUInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=0,i=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+A},t.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var r=A-1,i=1,a=0;for(this[e+r]=255&t;--r>=0&&(i*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/i>>0)-a&255;return e+A},t.prototype.writeInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[A]=255&e,A+1},t.prototype.writeInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24):k(this,e,A,!0),A+4},t.prototype.writeInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeFloatLE=function(t,e,A){return F(this,t,e,!0,A)},t.prototype.writeFloatBE=function(t,e,A){return F(this,t,e,!1,A)},t.prototype.writeDoubleLE=function(t,e,A){return O(this,t,e,!0,A)},t.prototype.writeDoubleBE=function(t,e,A){return O(this,t,e,!1,A)},t.prototype.copy=function(e,A,n,o){if(n||(n=0),o||0===o||(o=this.length),A>=e.length&&(A=e.length),A||(A=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-A=0;--r)e[r+A]=this[r+n];else if(i<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var i;if("number"==typeof e)for(i=A;i0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-A(t)}function o(t){var e,n,o,r,i,a,s=t.length;i=A(t),a=new l(3*s/4-i),o=i>0?s-4:s;var g=0;for(e=0,n=0;e>16&255,a[g++]=r>>8&255,a[g++]=255&r;return 2===i?(r=c[t.charCodeAt(e)]<<2|c[t.charCodeAt(e+1)]>>4,a[g++]=255&r):1===i&&(r=c[t.charCodeAt(e)]<<10|c[t.charCodeAt(e+1)]<<4|c[t.charCodeAt(e+2)]>>2,a[g++]=r>>8&255,a[g++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function i(t,e,A){for(var n,o=[],i=e;il?l:c+a));return 1===n?(e=t[A-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var s=[],c=[],l="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",M=0,u=g.length;M>1,l=-7,g=A?o-1:0,M=A?-1:1,u=t[e+g];for(g+=M,r=u&(1<<-l)-1,u>>=-l,l+=a;l>0;r=256*r+t[e+g],g+=M,l-=8);for(i=r&(1<<-l)-1,r>>=-l,l+=n;l>0;i=256*i+t[e+g],g+=M,l-=8);if(0===r)r=1-c;else{if(r===s)return i?NaN:(u?-1:1)*(1/0);i+=Math.pow(2,n),r-=c}return(u?-1:1)*i*Math.pow(2,r-n)},e.write=function(t,e,A,n,o,r){var i,a,s,c=8*r-o-1,l=(1<>1,M=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,u=n?0:r-1,d=n?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,i=l):(i=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-i))<1&&(i--,s*=2),e+=i+g>=1?M/s:M*Math.pow(2,1-g),e*s>=2&&(i++,s/=2),i+g>=l?(a=0,i=l):i+g>=1?(a=(e*s-1)*Math.pow(2,o),i+=g):(a=e*Math.pow(2,g-1)*Math.pow(2,o),i=0));o>=8;t[A+u]=255&a,u+=d,a/=256,o-=8);for(i=i<0;t[A+u]=255&i,u+=d,i/=256,c-=8);t[A+u-d]|=128*I}},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var A in t)e(t[A],A)}var r=A(285);e.createHash=A(287),e.createHmac=A(299),e.randomBytes=function(e,A){if(!A||!A.call)return new t(r(e));try{A.call(this,void 0,new t(r(e)))}catch(t){A(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var i=A(300)(e);e.pbkdf2=i.pbkdf2,e.pbkdf2Sync=i.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,A(280).Buffer)},function(t,e,A){(function(e,n){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||A(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),A(280).Buffer)},function(t,e){},function(t,e,A){(function(e){function n(t){return function(){var A=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),A.push(t),this},digest:function(n){var o=e.concat(A),r=t(o);return A=null,n?r.toString(n):r}};return n}}var o=A(288),r=n(A(296)),i=n(A(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new i:o(t)}}).call(e,A(280).Buffer)},function(t,e,A){var e=t.exports=function(t){var A=e[t];if(!A)throw new Error(t+" is not supported (we accept pull requests)");return new A},n=A(280).Buffer,o=A(289)(n);e.sha1=A(290)(n,o),e.sha256=A(294)(n,o),e.sha512=A(295)(n,o)},function(t,e){t.exports=function(t){function e(e,A){this._block=new t(e),this._finalSize=A,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,A){"string"==typeof e&&(A=A||"utf8",e=new t(e,A));for(var n=this._len+=e.length,o=this._s=this._s||0,r=0,i=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var A=this._update(this._block)||this._hash();return t?A.toString(t):A},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){return d.length?d.pop().init():this instanceof A?(this._w=u,e.call(this,64,56),this._h=null,void this.init()):new A}function o(t,e,A,n){return t<20?e&A|~e&n:t<40?e^A^n:t<60?e&A|e&n|A&n:e^A^n}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function i(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,c=4,l=8,g=12,M=16,u=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(A,e),A.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},A.prototype._POOL=d,A.prototype._update=function(t){var e,A,n,s,c,l,g,M,u,d;e=l=this._a,A=g=this._b,n=M=this._c,s=u=this._d,c=d=this._e;for(var I=this._w,T=0;T<80;T++){var p=I[T]=T<16?t.readInt32BE(4*T):a(I[T-3]^I[T-8]^I[T-14]^I[T-16],1),h=i(i(a(e,5),o(T,A,n,s)),i(i(c,p),r(T)));c=s,s=n,n=a(A,30),A=e,e=h}this._a=i(e,l),this._b=i(A,g),this._c=i(n,M),this._d=i(s,u),this._e=i(c,d)},A.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,c),e.writeInt32BE(0|this._c,l),e.writeInt32BE(0|this._d,g),e.writeInt32BE(0|this._e,M),e},A}},function(t,e,A){(function(t,n){function o(t,A){var n={seen:[],stylize:i};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),I(A)?n.showHidden=A:A&&e._extend(n,A),f(n.showHidden)&&(n.showHidden=!1),f(n.depth)&&(n.depth=2),f(n.colors)&&(n.colors=!1),f(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=r),s(n,t,n.depth)}function r(t,e){var A=o.styles[e];return A?"["+o.colors[A][0]+"m"+t+"["+o.colors[A][1]+"m":t}function i(t,e){return t}function a(t){var e={};return t.forEach(function(t,A){e[t]=!0}),e}function s(t,A,n){if(t.customInspect&&A&&x(A.inspect)&&A.inspect!==e.inspect&&(!A.constructor||A.constructor.prototype!==A)){var o=A.inspect(n,t);return E(o)||(o=s(t,o,n)),o}var r=c(t,A);if(r)return r;var i=Object.keys(A),I=a(i);if(t.showHidden&&(i=Object.getOwnPropertyNames(A)),D(A)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return l(A);if(0===i.length){if(x(A)){var T=A.name?": "+A.name:"";return t.stylize("[Function"+T+"]","special")}if(w(A))return t.stylize(RegExp.prototype.toString.call(A),"regexp");if(y(A))return t.stylize(Date.prototype.toString.call(A),"date");if(D(A))return l(A)}var p="",h=!1,N=["{","}"];if(d(A)&&(h=!0,N=["[","]"]),x(A)){var f=A.name?": "+A.name:"";p=" [Function"+f+"]"}if(w(A)&&(p=" "+RegExp.prototype.toString.call(A)),y(A)&&(p=" "+Date.prototype.toUTCString.call(A)),D(A)&&(p=" "+l(A)),0===i.length&&(!h||0==A.length))return N[0]+p+N[1];if(n<0)return w(A)?t.stylize(RegExp.prototype.toString.call(A),"regexp"):t.stylize("[Object]","special");t.seen.push(A);var C;return C=h?g(t,A,n,I,i):i.map(function(e){return M(t,A,n,I,e,h)}),t.seen.pop(),u(C,p,N)}function c(t,e){if(f(e))return t.stylize("undefined","undefined");if(E(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return h(e)?t.stylize(""+e,"number"):I(e)?t.stylize(""+e,"boolean"):T(e)?t.stylize("null","null"):void 0}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,A,n,o){for(var r=[],i=0,a=e.length;i-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),f(i)){if(r&&o.match(/^\d+$/))return a;i=JSON.stringify(""+o),i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(i=i.substr(1,i.length-2),i=t.stylize(i,"name")):(i=i.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),i=t.stylize(i,"string"))}return i+": "+a}function u(t,e,A){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}function d(t){return Array.isArray(t)}function I(t){return"boolean"==typeof t}function T(t){return null===t}function p(t){return null==t}function h(t){return"number"==typeof t}function E(t){return"string"==typeof t}function N(t){return"symbol"==typeof t}function f(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===L(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===L(t)}function D(t){return C(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),v[t.getMonth()],e].join(" ")}function j(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var m=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],A=0;A=r)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(t){return"[Circular]"}default:return t}}),a=n[A];A>>e|t<<32-e}function r(t,e){return t>>>e}function i(t,e,A){return t&e^~t&A}function a(t,e,A){return t&e^t&A^e&A}function s(t){return o(t,2)^o(t,13)^o(t,22)}function c(t){return o(t,6)^o(t,11)^o(t,25)}function l(t){return o(t,7)^o(t,18)^r(t,3)}function g(t){return o(t,17)^o(t,19)^r(t,10)}var M=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],u=new Array(64);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,o,r,u,d,I,T,p,h=this._w;e=0|this._a,A=0|this._b,n=0|this._c,o=0|this._d,r=0|this._e,u=0|this._f,d=0|this._g,I=0|this._h;for(var E=0;E<64;E++){var N=h[E]=E<16?t.readInt32BE(4*E):g(h[E-2])+h[E-7]+l(h[E-15])+h[E-16];T=I+c(r)+i(r,u,d)+M[E]+N,p=s(e)+a(e,A,n),I=d,d=u,u=r,r=o+T,o=n,n=A,A=e,e=T+p}this._a=e+this._a|0,this._b=A+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=u+this._f|0,this._g=d+this._g|0,this._h=I+this._h|0},A.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},A}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,A){return t>>>A|e<<32-A}function r(t,e,A){return t&e^~t&A}function i(t,e,A){return t&e^t&A^e&A}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,s,c,l,g,M,u,d,I,T,p,h,E,N,f=this._w;e=0|this._a,A=0|this._b,n=0|this._c,s=0|this._d,c=0|this._e,l=0|this._f,g=0|this._g,M=0|this._h,u=0|this._al,d=0|this._bl,I=0|this._cl,T=0|this._dl,p=0|this._el,h=0|this._fl,E=0|this._gl,N=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=f[D]=t.readInt32BE(4*D),y=f[D+1]=t.readInt32BE(4*D+4);else{var x=f[D-30],B=f[D-30+1],L=o(x,B,1)^o(x,B,8)^x>>>7,b=o(B,x,1)^o(B,x,8)^o(B,x,7);x=f[D-4],B=f[D-4+1];var Q=o(x,B,19)^o(B,x,29)^x>>>6,j=o(B,x,19)^o(x,B,29)^o(B,x,6),m=f[D-14],U=f[D-14+1],S=f[D-32],v=f[D-32+1];y=b+U,C=L+m+(y>>>0>>0?1:0),y+=j,C=C+Q+(y>>>0>>0?1:0),y+=v,C=C+S+(y>>>0>>0?1:0),f[D]=C,f[D+1]=y}var z=i(e,A,n),Y=i(u,d,I),k=o(e,u,28)^o(u,e,2)^o(u,e,7),R=o(u,e,28)^o(e,u,2)^o(e,u,7),F=o(c,p,14)^o(c,p,18)^o(p,c,9),O=o(p,c,14)^o(p,c,18)^o(c,p,9),H=a[D],V=a[D+1],G=r(c,l,g),P=r(p,h,E),X=N+O,W=M+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+Y,Z=k+z+(J>>>0>>0?1:0);M=g,N=E,g=l,E=h,l=c,h=p,p=T+X|0,c=s+W+(p>>>0>>0?1:0)|0,s=n,T=I,n=A,I=d,A=e,d=u,u=X+J|0,e=W+Z+(u>>>0>>0?1:0)|0}this._al=this._al+u|0,this._bl=this._bl+d|0,this._cl=this._cl+I|0,this._dl=this._dl+T|0,this._el=this._el+p|0,this._fl=this._fl+h|0,this._gl=this._gl+E|0,this._hl=this._hl+N|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+A+(this._bl>>>0>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0>>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+c+(this._el>>>0

    >>0?1:0)|0,this._f=this._f+l+(this._fl>>>0>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+M+(this._hl>>>0>>0?1:0)|0},A.prototype._hash=function(){function e(t,e,n){A.writeInt32BE(t,n),A.writeInt32BE(e,n+4)}var A=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),A},A}},function(t,e,A){function n(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var A=1732584193,n=-271733879,o=-1732584194,l=271733878,g=0;g>16)+(e>>16)+(A>>16);return n<<16|65535&A}function l(t,e){return t<>>32-e}var g=A(297);t.exports=function(t){return g.hash(t,n,16)}},function(t,e,A){(function(e){function A(t,A){if(t.length%r!==0){var n=t.length+(r-t.length%r);t=e.concat([t,i],n)}for(var o=[],a=A?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var A=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=I(t),o=8*t.length,r=8*t.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var i=0;i>>24)|4278255360&(a<<24|a>>>8)}var s=T(A);return new e(s)}t.exports=s;var c=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],l=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],M=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],u=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],I=function(t){ +for(var e=[],A=0,n=0;A>>5]|=t[A]<<24-n%32;return e},T=function(t){for(var e=[],A=0;A<32*t.length;A+=8)e.push(t[A>>>5]>>>24-A%32&255);return e},p=function(t,e,s){for(var I=0;I<16;I++){var T=s+I,p=e[T];e[T]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}var h,E,N,f,w,C,y,D,x,B;C=h=t[0],y=E=t[1],D=N=t[2],x=f=t[3],B=w=t[4];for(var L,I=0;I<80;I+=1)L=h+e[s+c[I]]|0,L+=I<16?A(E,N,f)+u[0]:I<32?n(E,N,f)+u[1]:I<48?o(E,N,f)+u[2]:I<64?r(E,N,f)+u[3]:i(E,N,f)+u[4],L|=0,L=a(L,g[I]),L=L+w|0,h=w,w=f,f=a(N,10),N=E,E=L,L=C+e[s+l[I]]|0,L+=I<16?i(y,D,x)+d[0]:I<32?r(y,D,x)+d[1]:I<48?o(y,D,x)+d[2]:I<64?n(y,D,x)+d[3]:A(y,D,x)+d[4],L|=0,L=a(L,M[I]),L=L+B|0,C=B,B=x,x=a(D,10),D=y,y=L;L=t[1]+N+x|0,t[1]=t[2]+f+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+h+y|0,t[4]=t[0]+E+D|0,t[0]=L}}).call(e,A(280).Buffer)},function(t,e,A){(function(e){function n(t,A){if(!(this instanceof n))return new n(t,A);this._opad=s,this._alg=t;var i="sha512"===t?128:64;A=this._key=e.isBuffer(A)?A:new e(A),A.length>i?A=o(t).update(A).digest():A.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(c,0,0,a);for(var I=1;Ie&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(A,n){e.push(c.default.createElement("button",{type:"button",key:n,className:A.className,onClick:function(e){A.click(t.props.dispatch)}},c.default.createElement("i",{className:A.icon})," ",A.name))});var A=this.props.large,n="modal-dialog"+(A?" modal-lg":"");return c.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},c.default.createElement("div",{className:n},c.default.createElement("div",{className:"modal-content"},c.default.createElement("div",{className:"modal-header"},c.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),c.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,c.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),c.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),c.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=M},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.CLOSE_REFERENCE_DIALOG=e.OPEN_REFERENCE_DIALOG=void 0;var o=A(240),r=n(o);e.OPEN_REFERENCE_DIALOG="open_reference_dialog",e.CLOSE_REFERENCE_DIALOG="close_reference_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case a.DEL:var A=e.rowIndex,n=[].concat(o(t.data));return n.splice(A,1),Object.assign({},t.prototype,{data:n});case a.SAVE:var r=t.data;return a.saveData(r,e.newVersion,e.file),t;case a.LOAD_DATA_COMPLETED:var r=e.data;return Object.assign({},t.prototype,{data:r});case a.ADD:var n=[].concat(o(t.data));return n.push({name:"",label:"",type:"String"}),Object.assign({},t.prototype,{data:n});default:return t}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=r;var i=A(468),a=n(i)},function(t,e,A){"use strict";function n(){return{type:g}}function o(t){return function(e){var A=window._server+"/xml";$.ajax({url:A,type:"POST",data:{files:t},success:function(t){e({type:M,data:t[0]})},error:function(t){t&&t.responseText?bootbox.alert("加载数据失败,服务端错误:"+t.responseText+""):bootbox.alert("加载数据失败,服务端出错")}})}}function r(t,e){return{newVersion:t,file:e,type:l}}function i(t,e,A){var n='';n+="";var o="";if(t.forEach(function(t,e){return!t.name||t.name.length<1?(o="参数名称不能为空.",!1):!t.label||t.label.length<1?(o="参数标题不能为空.",!1):void(n+="")}),o.length>1)return void bootbox.alert(o+",不能保存!");n+="";var r={content:n,file:A,newVersion:e},i=window._server+"/common/saveFile";e?bootbox.prompt("请输入新版本描述.",function(t){t&&(r.versionComment=t,(0,s.ajaxSave)(i,r,function(){bootbox.alert("保存成功!")}))}):(0,s.ajaxSave)(i,r,function(){bootbox.alert("保存成功!")})}function a(t){return{rowIndex:t,type:c}}Object.defineProperty(e,"__esModule",{value:!0}),e.LOAD_DATA_COMPLETED=e.ADD=e.SAVE=e.DEL=void 0,e.add=n,e.loadData=o,e.save=r,e.saveData=i,e.del=a;var s=A(226),c=e.DEL="del",l=e.SAVE="save",g=e.ADD="add",M=e.LOAD_DATA_COMPLETED="load_data_completed"},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}function s(t){return{data:t.data||[]}}Object.defineProperty(e,"__esModule",{value:!0});var c=function(){function t(t,e){for(var A=0;A.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+A(4)+");src:url("+A(4)+"?#iefix) format('embedded-opentype'),url("+A(5)+") format('woff2'),url("+A(6)+") format('woff'),url("+A(7)+") format('truetype'),url("+A(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&E.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",i(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",i(t,e),e}function l(t,e){var A,n,o;if(e.singleton){var i=T++;A=p||(p=a(e)),n=c.bind(null,A,i,!1),o=c.bind(null,A,i,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(A=s(e),n=u.bind(null,A),o=function(){r(A),A.href&&URL.revokeObjectURL(A.href)}):(A=a(e),n=g.bind(null,A),o=function(){r(A)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else o()}}function c(t,e,A,n){var o=A?"":n.css;if(t.styleSheet)t.styleSheet.cssText=N(e,o);else{var i=document.createTextNode(o),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(i,r[e]):t.appendChild(i)}}function g(t,e){var A=e.css,n=e.media;if(n&&t.setAttribute("media",n),t.styleSheet)t.styleSheet.cssText=A;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(A))}}function u(t,e){var A=e.css,n=e.sourceMap;n&&(A+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */");var o=new Blob([A],{type:"text/css"}),i=t.href;t.href=URL.createObjectURL(o),i&&URL.revokeObjectURL(i)}var M={},d=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},I=d(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=d(function(){return document.head||document.getElementsByTagName("head")[0]}),p=null,T=0,E=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=I()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var A=o(t);return n(A,e),function(t){for(var i=[],r=0;r1){for(var h=Array(I),p=0;p1){for(var E=Array(T),N=0;N>"),B={array:r("array"),bool:r("boolean"),func:r("function"),number:r("number"),object:r("object"),string:r("string"),symbol:r("symbol"),any:a(),arrayOf:s,element:l(),instanceOf:c,node:d(),objectOf:u,oneOf:g,oneOfType:M,shape:I};o.prototype=Error.prototype,t.exports=B},function(t,e){"use strict";var A="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=A},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,A){"use strict";function n(t){return i.isValidElement(t)?void 0:o("143"),t}var o=A(19),i=A(21);A(20);t.exports=n},function(t,e,A){"use strict";t.exports=A(42)},function(t,e,A){"use strict";var n=A(43),o=A(48),i=A(174),r=A(71),a=A(68),s=A(179),l=A(180),c=A(181),g=A(182);A(56);o.inject();var u={findDOMNode:l,render:i.render,unmountComponentAtNode:i.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:g};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:n.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?n.getNodeFromInstance(t):null}},Mount:i,Reconciler:r});t.exports=u},function(t,e,A){"use strict";function n(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var A=n(t);A._hostNode=e,e[I]=A}function i(t){var e=t._hostNode;e&&(delete e[I],t._hostNode=null)}function r(t,e){if(!(t._flags&d.hasCachedChildNodes)){var A=t._renderedChildren,i=e.firstChild;t:for(var r in A)if(A.hasOwnProperty(r)){var a=A[r],s=n(a)._domID;if(0!==s){for(;null!==i;i=i.nextSibling)if(1===i.nodeType&&i.getAttribute(M)===String(s)||8===i.nodeType&&i.nodeValue===" react-text: "+s+" "||8===i.nodeType&&i.nodeValue===" react-empty: "+s+" "){o(a,i);continue t}c("32",s)}}t._flags|=d.hasCachedChildNodes}}function a(t){if(t[I])return t[I];for(var e=[];!t[I];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var A,n;t&&(n=t[I]);t=e.pop())A=n,e.length&&r(n,t);return A}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())r(t,t._hostNode);return t._hostNode}var c=A(44),g=A(45),u=A(47),M=(A(46),g.ID_ATTRIBUTE_NAME),d=u,I="__reactInternalInstance$"+Math.random().toString(36).slice(2),h={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:r,precacheNode:o,uncacheNode:i};t.exports=h},function(t,e){"use strict";function A(t){for(var e=arguments.length-1,A="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,n=0;n8&&f<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},B=!1,L=null,b={eventTypes:x,extractEvents:function(t,e,A,n){return[l(t,e,A,n),u(t,e,A,n)]}};t.exports=b},function(t,e,A){"use strict";function n(t,e,A){var n=e.dispatchConfig.phasedRegistrationNames[A];return p(t,n)}function o(t,e,A){var o=n(t,A,e);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}function i(t){t&&t.dispatchConfig.phasedRegistrationNames&&d.traverseTwoPhase(t._targetInst,o,t)}function r(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,A=e?d.getParentInstance(e):null;d.traverseTwoPhase(A,o,t)}}function a(t,e,A){if(A&&A.dispatchConfig.registrationName){var n=A.dispatchConfig.registrationName,o=p(t,n);o&&(A._dispatchListeners=I(A._dispatchListeners,o),A._dispatchInstances=I(A._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function l(t){h(t,i)}function c(t){h(t,r)}function g(t,e,A,n){d.traverseEnterLeave(A,n,a,t,e)}function u(t){h(t,s)}var M=A(52),d=A(54),I=A(58),h=A(59),p=(A(56),M.getListener),T={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:u,accumulateEnterLeaveDispatches:g};t.exports=T},function(t,e,A){"use strict";function n(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,A){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!A.disabled||!n(e));default:return!1}}var i=A(44),r=A(53),a=A(54),s=A(55),l=A(58),c=A(59),g=(A(46),{}),u=null,M=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},d=function(t){return M(t,!0)},I=function(t){return M(t,!1)},h=function(t){return"."+t._rootNodeID},p={injection:{injectEventPluginOrder:r.injectEventPluginOrder,injectEventPluginsByName:r.injectEventPluginsByName},putListener:function(t,e,A){"function"!=typeof A?i("94",e,typeof A):void 0;var n=h(t),o=g[e]||(g[e]={});o[n]=A;var a=r.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,A)},getListener:function(t,e){var A=g[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var n=h(t);return A&&A[n]},deleteListener:function(t,e){var A=r.registrationNameModules[e];A&&A.willDeleteListener&&A.willDeleteListener(t,e);var n=g[e];if(n){var o=h(t);delete n[o]}},deleteAllListeners:function(t){var e=h(t);for(var A in g)if(g.hasOwnProperty(A)&&g[A][e]){var n=r.registrationNameModules[A];n&&n.willDeleteListener&&n.willDeleteListener(t,A),delete g[A][e]}},extractEvents:function(t,e,A,n){for(var o,i=r.plugins,a=0;a-1?void 0:r("96",t),!l.plugins[A]){e.extractEvents?void 0:r("97",t),l.plugins[A]=e;var n=e.eventTypes;for(var i in n)o(n[i],e,i)?void 0:r("98",i,t)}}}function o(t,e,A){l.eventNameDispatchConfigs.hasOwnProperty(A)?r("99",A):void 0,l.eventNameDispatchConfigs[A]=t;var n=t.phasedRegistrationNames;if(n){for(var o in n)if(n.hasOwnProperty(o)){var a=n[o];i(a,e,A)}return!0}return!!t.registrationName&&(i(t.registrationName,e,A),!0)}function i(t,e,A){l.registrationNameModules[t]?r("100",t):void 0,l.registrationNameModules[t]=e,l.registrationNameDependencies[t]=e.eventTypes[A].dependencies}var r=A(44),a=(A(46),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?r("101"):void 0,a=Array.prototype.slice.call(t),n()},injectEventPluginsByName:function(t){var e=!1;for(var A in t)if(t.hasOwnProperty(A)){var o=t[A];s.hasOwnProperty(A)&&s[A]===o||(s[A]?r("102",A):void 0,s[A]=o,e=!0)}e&&n()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return l.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var A=e.phasedRegistrationNames;for(var n in A)if(A.hasOwnProperty(n)){var o=l.registrationNameModules[A[n]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];l.plugins.length=0;var e=l.eventNameDispatchConfigs;for(var A in e)e.hasOwnProperty(A)&&delete e[A];var n=l.registrationNameModules;for(var o in n)n.hasOwnProperty(o)&&delete n[o]}};t.exports=l},function(t,e,A){"use strict";function n(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function i(t){return"topMouseDown"===t||"topTouchStart"===t}function r(t,e,A,n){var o=t.type||"unknown-event";t.currentTarget=p.getNodeFromInstance(n),e?I.invokeGuardedCallbackWithCatch(o,A,t):I.invokeGuardedCallback(o,A,t),t.currentTarget=null}function a(t,e){var A=t._dispatchListeners,n=t._dispatchInstances;if(Array.isArray(A))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),i.addPoolingTo(n),t.exports=n},function(t,e,A){"use strict";var n=A(44),o=(A(46),function(t){var e=this;if(e.instancePool.length){var A=e.instancePool.pop();return e.call(A,t),A}return new e(t)}),i=function(t,e){var A=this;if(A.instancePool.length){var n=A.instancePool.pop();return A.call(n,t,e),n}return new A(t,e)},r=function(t,e,A){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e,A),o}return new n(t,e,A)},a=function(t,e,A,n){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,A,n),i}return new o(t,e,A,n)},s=function(t,e,A,n,o){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,A,n,o),r}return new i(t,e,A,n,o)},l=function(t){var e=this;t instanceof e?void 0:n("25"),t.destructor(),e.instancePool.length8));var S=!1;N.canUseDOM&&(S=D("input")&&(!document.documentMode||document.documentMode>11));var v={get:function(){return m.get.call(this)},set:function(t){Q=""+t,m.set.call(this,t)}},U={eventTypes:B,extractEvents:function(t,e,A,o){var i,r,a=e?f.getNodeFromInstance(e):window;if(n(a)?j?i=s:r=l:x(a)?S?i=M:(i=I,r=d):h(a)&&(i=p),i){var c=i(t,e);if(c){var g=C.getPooled(B.change,c,A,o);return g.type="change",E.accumulateTwoPhaseDispatches(g),g}}r&&r(t,a,e)}};t.exports=U},function(t,e,A){"use strict";function n(){B.ReactReconcileTransaction&&f?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=u.getPooled(),this.reconcileTransaction=B.ReactReconcileTransaction.getPooled(!0)}function i(t,e,A,o,i,r){return n(),f.batchedUpdates(t,e,A,o,i,r)}function r(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==p.length?c("124",e,p.length):void 0,p.sort(r),T++;for(var A=0;A]/,s=A(91),l=s(function(t,e){if(t.namespaceURI!==i.svg||"innerHTML"in t)t.innerHTML=e;else{n=n||document.createElement("div"),n.innerHTML=""+e+"";for(var A=n.firstChild;A.firstChild;)t.appendChild(A.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),r.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var A=t.firstChild;1===A.data.length?t.removeChild(A):A.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=l},function(t,e){"use strict";var A=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,A,n,o){MSApp.execUnsafeLocalFunction(function(){return t(e,A,n,o)})}:t};t.exports=A},function(t,e,A){"use strict";var n=A(60),o=A(93),i=A(90),r=function(t,e){if(e){var A=t.firstChild;if(A&&A===t.lastChild&&3===A.nodeType)return void(A.nodeValue=e)}t.textContent=e};n.canUseDOM&&("textContent"in document.documentElement||(r=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void i(t,o(e))})),t.exports=r},function(t,e){"use strict";function A(t){var e=""+t,A=o.exec(e);if(!A)return e;var n,i="",r=0,a=0;for(r=A.index;r]/;t.exports=n},function(t,e,A){"use strict";var n=A(44),o=A(88),i=A(60),r=A(95),a=A(57),s=(A(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(i.canUseDOM?void 0:n("56"),e?void 0:n("57"),"HTML"===t.nodeName?n("58"):void 0,"string"==typeof e){var A=r(e,a)[0];t.parentNode.replaceChild(A,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,A){"use strict";function n(t){var e=t.match(c);return e&&e[1].toLowerCase()}function o(t,e){var A=l;l?void 0:s(!1);var o=n(t),i=o&&a(o);if(i){A.innerHTML=i[1]+t+i[2];for(var c=i[0];c--;)A=A.lastChild}else A.innerHTML=t;var g=A.getElementsByTagName("script");g.length&&(e?void 0:s(!1),r(g).forEach(e));for(var u=Array.from(A.childNodes);A.lastChild;)A.removeChild(A.lastChild);return u}var i=A(60),r=A(96),a=A(97),s=A(46),l=i.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},function(t,e,A){"use strict";function n(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?r(!1):void 0,"number"!=typeof e?r(!1):void 0,0===e||e-1 in t?void 0:r(!1),"function"==typeof t.callee?r(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var A=Array(e),n=0;n":r.innerHTML="<"+t+">",a[t]=!r.firstChild),a[t]?u[t]:null}var o=A(60),i=A(46),r=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],l=[1,"","
    "],c=[3,"","
    "],g=[1,'',""],u={"*":[1,"?

    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},M=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];M.forEach(function(t){u[t]=g,a[t]=!0}),t.exports=n},function(t,e,A){"use strict";var n=A(87),o=A(43),i={dangerouslyProcessChildrenUpdates:function(t,e){var A=o.getNodeFromInstance(t);n.processUpdates(A,e)}};t.exports=i},function(t,e,A){"use strict";function n(t){if(t){var e=t._currentElement._owner||null;if(e){var A=e.getName();if(A)return" This DOM node was rendered by `"+A+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?I("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?I("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&H in e.dangerouslySetInnerHTML?void 0:I("61")),null!=e.style&&"object"!=typeof e.style?I("62",n(t)):void 0)}function i(t,e,A,n){if(!(n instanceof S)){var o=t._hostContainerInfo,i=o._node&&o._node.nodeType===G,a=i?o._node:o._ownerDocument;k(e,a),n.getReactMountReady().enqueue(r,{inst:t,registrationName:e,listener:A})}}function r(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;L.postMountWrapper(t)}function s(){var t=this;m.postMountWrapper(t)}function l(){var t=this;b.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:I("63");var e=Y(t);switch(e?void 0:I("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var A in P)P.hasOwnProperty(A)&&t._wrapperState.listeners.push(D.trapBubbledEvent(A,P[A],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function g(){Q.postUpdateWrapper(this)}function u(t){_.call(K,t)||(Z.test(t)?void 0:I("65",t),K[t]=!0)}function M(t,e){return t.indexOf("-")>=0||null!=e.is}function d(t){var e=t.type;u(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var I=A(44),h=A(16),p=A(100),T=A(102),E=A(88),N=A(89),f=A(45),w=A(110),C=A(52),y=A(53),D=A(112),x=A(47),B=A(43),L=A(115),b=A(118),Q=A(119),m=A(120),j=(A(74),A(121)),S=A(141),v=(A(57),A(93)),U=(A(46),A(77),A(130),A(144),A(56),x),z=C.deleteListener,Y=B.getNodeFromInstance,k=D.listenTo,F=y.registrationNameModules,R={string:!0,number:!0},O="style",H="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=h({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;d.displayName="ReactDOMComponent",d.Mixin={mountComponent:function(t,e,A,n){this._rootNodeID=q++,this._domID=A._idCounter++,this._hostParent=e,this._hostContainerInfo=A;var i=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":L.mountWrapper(this,i,e),i=L.getHostProps(this,i),t.getReactMountReady().enqueue(c,this);break;case"option":b.mountWrapper(this,i,e),i=b.getHostProps(this,i);break;case"select":Q.mountWrapper(this,i,e),i=Q.getHostProps(this,i),t.getReactMountReady().enqueue(c,this);break;case"textarea":m.mountWrapper(this,i,e),i=m.getHostProps(this,i),t.getReactMountReady().enqueue(c,this)}o(this,i);var r,g;null!=e?(r=e._namespaceURI,g=e._tag):A._tag&&(r=A._namespaceURI,g=A._tag),(null==r||r===N.svg&&"foreignobject"===g)&&(r=N.html),r===N.html&&("svg"===this._tag?r=N.svg:"math"===this._tag&&(r=N.mathml)),this._namespaceURI=r;var u;if(t.useCreateElement){var M,d=A._ownerDocument;if(r===N.html)if("script"===this._tag){var I=d.createElement("div"),h=this._currentElement.type;I.innerHTML="<"+h+">",M=I.removeChild(I.firstChild)}else M=i.is?d.createElement(this._currentElement.type,i.is):d.createElement(this._currentElement.type);else M=d.createElementNS(r,this._currentElement.type);B.precacheNode(this,M),this._flags|=U.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(M),this._updateDOMProperties(null,i,t);var T=E(M);this._createInitialChildren(t,i,n,T),u=T}else{var f=this._createOpenTagMarkupAndPutListeners(t,i),C=this._createContentMarkup(t,i,n);u=!C&&X[this._tag]?f+"/>":f+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"select":i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"button":i.autoFocus&&t.getReactMountReady().enqueue(p.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(l,this)}return u},_createOpenTagMarkupAndPutListeners:function(t,e){var A="<"+this._currentElement.type;for(var n in e)if(e.hasOwnProperty(n)){var o=e[n];if(null!=o)if(F.hasOwnProperty(n))o&&i(this,n,o,t);else{n===O&&(o&&(o=this._previousStyleCopy=h({},e.style)),o=T.createMarkupForStyles(o,this));var r=null;null!=this._tag&&M(this._tag,e)?V.hasOwnProperty(n)||(r=w.createMarkupForCustomAttribute(n,o)):r=w.createMarkupForProperty(n,o),r&&(A+=" "+r)}}return t.renderToStaticMarkup?A:(this._hostParent||(A+=" "+w.createMarkupForRoot()),A+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,A){var n="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(n=o.__html);else{var i=R[typeof e.children]?e.children:null,r=null!=i?null:e.children;if(null!=i)n=v(i);else if(null!=r){var a=this.mountChildren(r,t,A);n=a.join("")}}return W[this._tag]&&"\n"===n.charAt(0)?"\n"+n:n},_createInitialChildren:function(t,e,A,n){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&E.queueHTML(n,o.__html);else{var i=R[typeof e.children]?e.children:null,r=null!=i?null:e.children;if(null!=i)E.queueText(n,i);else if(null!=r)for(var a=this.mountChildren(r,t,A),s=0;s1)for(var A=1;A0&&n.length<20?A+" (keys: "+n.join(", ")+")":A}function i(t,e){var A=a.get(t);if(!A){return null}return A}var r=A(44),a=(A(22),A(123)),s=(A(74),A(68)),l=(A(46),A(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,A){l.validateCallback(e,A);var o=i(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void n(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],n(t)},enqueueForceUpdate:function(t){var e=i(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,n(e))},enqueueReplaceState:function(t,e){var A=i(t,"replaceState");A&&(A._pendingStateQueue=[e],A._pendingReplaceState=!0,n(A))},enqueueSetState:function(t,e){var A=i(t,"setState");if(A){var o=A._pendingStateQueue||(A._pendingStateQueue=[]);o.push(e),n(A)}},enqueueElementInternal:function(t,e,A){t._pendingElement=e,t._context=A,n(t)},validateCallback:function(t,e){t&&"function"!=typeof t?r("122",e,o(t)):void 0}});t.exports=l},function(t,e,A){"use strict";var n=(A(16),A(57)),o=(A(56),n);t.exports=o},function(t,e,A){"use strict";var n=A(16),o=A(88),i=A(43),r=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};n(r.prototype,{mountComponent:function(t,e,A,n){var r=A._idCounter++;this._domID=r,this._hostParent=e,this._hostContainerInfo=A;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=A._ownerDocument,l=s.createComment(a);return i.precacheNode(this,l),o(l)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return i.getNodeFromInstance(this)},unmountComponent:function(){i.uncacheNode(this)}}),t.exports=r},function(t,e,A){"use strict";function n(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var A=0,n=t;n;n=n._hostParent)A++;for(var o=0,i=e;i;i=i._hostParent)o++;for(;A-o>0;)t=t._hostParent,A--;for(;o-A>0;)e=e._hostParent,o--;for(var r=A;r--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function i(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function r(t,e,A){for(var n=[];t;)n.push(t),t=t._hostParent;var o;for(o=n.length;o-- >0;)e(n[o],"captured",A);for(o=0;o0;)A(s[l],"captured",i)}var s=A(44);A(46);t.exports={isAncestor:o,getLowestCommonAncestor:n,getParentInstance:i,traverseTwoPhase:r,traverseEnterLeave:a}},function(t,e,A){"use strict";var n=A(44),o=A(16),i=A(87),r=A(88),a=A(43),s=A(93),l=(A(46),A(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(t,e,A,n){var o=A._idCounter++,i=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var c=A._ownerDocument,g=c.createComment(i),u=c.createComment(l),M=r(c.createDocumentFragment());return r.queueChild(M,r(g)),this._stringText&&r.queueChild(M,r(c.createTextNode(this._stringText))),r.queueChild(M,r(u)),a.precacheNode(this,g),this._closingComment=u,M}var d=s(this._stringText);return t.renderToStaticMarkup?d:""+d+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var A=""+t;if(A!==this._stringText){this._stringText=A;var n=this.getHostNode();i.replaceDelimitedText(n[0],n[1],A)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),A=e.nextSibling;;){if(null==A?n("67",this._domID):void 0,8===A.nodeType&&" /react-text "===A.nodeValue){this._closingComment=A;break}A=A.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=l},function(t,e,A){"use strict";function n(){this.reinitializeTransaction()}var o=A(16),i=A(68),r=A(75),a=A(57),s={initialize:a,close:function(){u.isBatchingUpdates=!1}},l={initialize:a,close:i.flushBatchedUpdates.bind(i)},c=[l,s];o(n.prototype,r,{getTransactionWrappers:function(){return c}});var g=new n,u={isBatchingUpdates:!1,batchedUpdates:function(t,e,A,n,o,i){var r=u.isBatchingUpdates;return u.isBatchingUpdates=!0,r?t(e,A,n,o,i):g.perform(t,null,e,A,n,o,i)}};t.exports=u},function(t,e,A){"use strict";function n(t){for(;t._hostParent;)t=t._hostParent;var e=g.getNodeFromInstance(t),A=e.parentNode;return g.getClosestInstanceFromNode(A)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function i(t){var e=M(t.nativeEvent),A=g.getClosestInstanceFromNode(e),o=A;do t.ancestors.push(o),o=o&&n(o);while(o);for(var i=0;ie.end?(A=e.end,n=e.start):(A=e.start,n=e.end),o.moveToElementText(t),o.moveStart("character",A),o.setEndPoint("EndToStart",o),o.moveEnd("character",n-A),o.select()}function a(t,e){if(window.getSelection){var A=window.getSelection(),n=t[c()].length,o=Math.min(e.start,n),i=void 0===e.end?o:Math.min(e.end,n);if(!A.extend&&o>i){var r=i;i=o,o=r}var a=l(t,o),s=l(t,i);if(a&&s){var g=document.createRange();g.setStart(a.node,a.offset),A.removeAllRanges(),o>i?(A.addRange(g),A.extend(s.node,s.offset)):(g.setEnd(s.node,s.offset),A.addRange(g))}}}var s=A(60),l=A(156),c=A(63),g=s.canUseDOM&&"selection"in document&&!("getSelection"in window),u={getOffsets:g?o:i,setOffsets:g?r:a};t.exports=u},function(t,e){"use strict";function A(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function n(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=A(t),i=0,r=0;o;){if(3===o.nodeType){if(r=i+o.textContent.length,i<=e&&r>=e)return{node:o,offset:e-i};i=r}o=A(n(o))}}t.exports=o},function(t,e,A){"use strict";function n(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?n(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=A(158);t.exports=n},function(t,e,A){"use strict";function n(t){return o(t)&&3==t.nodeType}var o=A(159);t.exports=n},function(t,e){"use strict";function A(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=A},function(t,e){"use strict";function A(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=A},function(t,e){"use strict";var A={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},n={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:A.xlink,xlinkArcrole:A.xlink,xlinkHref:A.xlink,xlinkRole:A.xlink,xlinkShow:A.xlink,xlinkTitle:A.xlink,xlinkType:A.xlink,xmlBase:A.xml,xmlLang:A.xml,xmlSpace:A.xml},DOMAttributeNames:{}};Object.keys(n).forEach(function(t){o.Properties[t]=0,n[t]&&(o.DOMAttributeNames[t]=n[t])}),t.exports=o},function(t,e,A){"use strict";function n(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var A=document.selection.createRange();return{parentElement:A.parentElement(),text:A.text,top:A.boundingTop,left:A.boundingLeft}}}function o(t,e){if(T||null==I||I!==c())return null;var A=n(I);if(!p||!u(p,A)){p=A;var o=l.getPooled(d.select,h,t,e);return o.type="select",o.target=I,i.accumulateTwoPhaseDispatches(o),o}return null}var i=A(51),r=A(60),a=A(43),s=A(154),l=A(65),c=A(160),g=A(78),u=A(130),M=r.canUseDOM&&"documentMode"in document&&document.documentMode<=11,d={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},I=null,h=null,p=null,T=!1,E=!1,N={eventTypes:d,extractEvents:function(t,e,A,n){if(!E)return null;var i=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(g(i)||"true"===i.contentEditable)&&(I=i,h=e,p=null);break;case"topBlur":I=null,h=null,p=null;break;case"topMouseDown":T=!0;break;case"topContextMenu":case"topMouseUp":return T=!1,o(A,n);case"topSelectionChange":if(M)break;case"topKeyDown":case"topKeyUp":return o(A,n)}return null},didPutListener:function(t,e,A){"onSelect"===e&&(E=!0)}};t.exports=N},function(t,e,A){"use strict";function n(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var i=A(44),r=A(150),a=A(51),s=A(43),l=A(164),c=A(165),g=A(65),u=A(166),M=A(167),d=A(81),I=A(170),h=A(171),p=A(172),T=A(82),E=A(173),N=A(57),f=A(168),w=(A(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),A="on"+e,n="top"+e,o={phasedRegistrationNames:{bubbled:A,captured:A+"Capture"},dependencies:[n]};w[t]=o,C[n]=o});var y={},D={eventTypes:w,extractEvents:function(t,e,A,n){var o=C[t];if(!o)return null;var r;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":r=g;break;case"topKeyPress":if(0===f(A))return null;case"topKeyDown":case"topKeyUp":r=M;break;case"topBlur":case"topFocus":r=u;break;case"topClick":if(2===A.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":r=d;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":r=I;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":r=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":r=l;break;case"topTransitionEnd":r=p;break;case"topScroll":r=T;break;case"topWheel":r=E;break;case"topCopy":case"topCut":case"topPaste":r=c}r?void 0:i("86",t);var s=r.getPooled(o,e,A,n);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,A){if("onClick"===e&&!o(t._tag)){var i=n(t),a=s.getNodeFromInstance(t);y[i]||(y[i]=r.listen(a,"click",N))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var A=n(t);y[A].remove(),delete y[A]}}};t.exports=D},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),i={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),i={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),i={relatedTarget:null};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),i=A(168),r=A(169),a=A(84),s={key:r,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?i(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?i(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(n,s),t.exports=n},function(t,e){"use strict";function A(t){var e,A=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===A&&(e=13)):e=A,e>=32||13===e?e:0}t.exports=A},function(t,e,A){"use strict";function n(t){if(t.key){var e=i[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var A=o(t);return 13===A?"Enter":String.fromCharCode(A)}return"keydown"===t.type||"keyup"===t.type?r[t.keyCode]||"Unidentified":""}var o=A(168),i={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},r={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),i={dataTransfer:null};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(82),i=A(84),r={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:i};o.augmentClass(n,r),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(65),i={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e,A,n){return o.call(this,t,e,A,n)}var o=A(81),i={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(n,i),t.exports=n},function(t,e,A){"use strict";function n(t,e){for(var A=Math.min(t.length,e.length),n=0;n.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var r,a=h.createElement(k,{child:e});if(t){var s=w.get(t);r=s._processChildContext(s._context)}else r=B;var c=u(A);if(c){var g=c._currentElement,d=g.props.child;if(Q(d,e)){var I=c._renderedComponent.getPublicInstance(),p=n&&function(){n.call(I)};return F._updateRootComponent(c,a,r,A,p),I}F.unmountComponentAtNode(A)}var T=o(A),E=T&&!!i(T),N=l(A),f=E&&!c&&!N,C=F._renderNewRootComponent(a,A,f,r)._renderedComponent.getPublicInstance();return n&&n.call(C),C},render:function(t,e,A){return F._renderSubtreeIntoContainer(null,t,e,A)},unmountComponentAtNode:function(t){c(t)?void 0:M("40");var e=u(t);if(!e){l(t),1===t.nodeType&&t.hasAttribute(j);return!1}return delete z[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,A,i,r){if(c(e)?void 0:M("41"),i){var a=o(e);if(C.canReuseMarkup(t,a))return void T.precacheNode(A,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var l=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var g=t,u=n(g,l),I=" (client) "+g.substring(u-20,u+20)+"\n (server) "+l.substring(u-20,u+20);e.nodeType===v?M("42",I):void 0}if(e.nodeType===v?M("43"):void 0,r.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);d.insertTreeBefore(e,t,null)}else b(e,t),T.precacheNode(A,e.firstChild)}};t.exports=F},function(t,e,A){"use strict";function n(t,e){var A={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return A}var o=(A(144),9);t.exports=n},function(t,e){"use strict";var A={useCreateElement:!0,useFiber:!1};t.exports=A},function(t,e,A){"use strict";var n=A(178),o=/\/?>/,i=/^<\!\-\-/,r={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=n(t);return i.test(t)?t:t.replace(o," "+r.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var A=e.getAttribute(r.CHECKSUM_ATTR_NAME);A=A&&parseInt(A,10);var o=n(t);return o===A}};t.exports=r},function(t,e){"use strict";function A(t){for(var e=1,A=0,o=0,i=t.length,r=i&-4;o3&&void 0!==arguments[3]?arguments[3]:{},l=Boolean(t),u=t||y,d=void 0;d="function"==typeof e?e:e?(0,p.default)(e):D;var h=A||x,T=n.pure,E=void 0===T||T,N=n.withRef,w=void 0!==N&&N,b=E&&h!==x,Q=L++;return function(t){function e(t,e,A){var n=h(t,e,A);return n}var A="Connect("+a(t)+")",n=function(n){function a(t,e){o(this,a);var r=i(this,n.call(this,t,e));r.version=Q,r.store=t.store||e.store,(0,C.default)(r.store,'Could not find "store" in either the context or '+('props of "'+A+'". ')+"Either wrap the root component in a , "+('or explicitly pass "store" as a prop to "'+A+'".'));var s=r.store.getState();return r.state={storeState:s},r.clearCache(),r}return r(a,n),a.prototype.shouldComponentUpdate=function(){return!E||this.haveOwnPropsChanged||this.hasStoreStateChanged},a.prototype.computeStateProps=function(t,e){if(!this.finalMapStateToProps)return this.configureFinalMapState(t,e);var A=t.getState(),n=this.doStatePropsDependOnOwnProps?this.finalMapStateToProps(A,e):this.finalMapStateToProps(A);return n},a.prototype.configureFinalMapState=function(t,e){var A=u(t.getState(),e),n="function"==typeof A;return this.finalMapStateToProps=n?A:u,this.doStatePropsDependOnOwnProps=1!==this.finalMapStateToProps.length,n?this.computeStateProps(t,e):A},a.prototype.computeDispatchProps=function(t,e){if(!this.finalMapDispatchToProps)return this.configureFinalMapDispatch(t,e);var A=t.dispatch,n=this.doDispatchPropsDependOnOwnProps?this.finalMapDispatchToProps(A,e):this.finalMapDispatchToProps(A);return n},a.prototype.configureFinalMapDispatch=function(t,e){var A=d(t.dispatch,e),n="function"==typeof A;return this.finalMapDispatchToProps=n?A:d,this.doDispatchPropsDependOnOwnProps=1!==this.finalMapDispatchToProps.length,n?this.computeDispatchProps(t,e):A},a.prototype.updateStatePropsIfNeeded=function(){var t=this.computeStateProps(this.store,this.props);return(!this.stateProps||!(0,I.default)(t,this.stateProps))&&(this.stateProps=t,!0)},a.prototype.updateDispatchPropsIfNeeded=function(){var t=this.computeDispatchProps(this.store,this.props);return(!this.dispatchProps||!(0,I.default)(t,this.dispatchProps))&&(this.dispatchProps=t,!0)},a.prototype.updateMergedPropsIfNeeded=function(){var t=e(this.stateProps,this.dispatchProps,this.props);return!(this.mergedProps&&b&&(0,I.default)(t,this.mergedProps))&&(this.mergedProps=t,!0)},a.prototype.isSubscribed=function(){return"function"==typeof this.unsubscribe},a.prototype.trySubscribe=function(){l&&!this.unsubscribe&&(this.unsubscribe=this.store.subscribe(this.handleChange.bind(this)),this.handleChange())},a.prototype.tryUnsubscribe=function(){this.unsubscribe&&(this.unsubscribe(),this.unsubscribe=null)},a.prototype.componentDidMount=function(){this.trySubscribe()},a.prototype.componentWillReceiveProps=function(t){E&&(0,I.default)(t,this.props)||(this.haveOwnPropsChanged=!0)},a.prototype.componentWillUnmount=function(){this.tryUnsubscribe(),this.clearCache()},a.prototype.clearCache=function(){this.dispatchProps=null,this.stateProps=null,this.mergedProps=null,this.haveOwnPropsChanged=!0,this.hasStoreStateChanged=!0,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,this.renderedElement=null,this.finalMapDispatchToProps=null,this.finalMapStateToProps=null},a.prototype.handleChange=function(){if(this.unsubscribe){var t=this.store.getState(),e=this.state.storeState;if(!E||e!==t){if(E&&!this.doStatePropsDependOnOwnProps){var A=s(this.updateStatePropsIfNeeded,this);if(!A)return;A===B&&(this.statePropsPrecalculationError=B.value),this.haveStatePropsBeenPrecalculated=!0}this.hasStoreStateChanged=!0,this.setState({storeState:t})}}},a.prototype.getWrappedInstance=function(){return(0,C.default)(w,"To access the wrapped instance, you need to specify { withRef: true } as the fourth argument of the connect() call."),this.refs.wrappedInstance},a.prototype.render=function(){var e=this.haveOwnPropsChanged,A=this.hasStoreStateChanged,n=this.haveStatePropsBeenPrecalculated,o=this.statePropsPrecalculationError,i=this.renderedElement;if(this.haveOwnPropsChanged=!1,this.hasStoreStateChanged=!1,this.haveStatePropsBeenPrecalculated=!1,this.statePropsPrecalculationError=null,o)throw o;var r=!0,a=!0;E&&i&&(r=A||e&&this.doStatePropsDependOnOwnProps,a=e&&this.doDispatchPropsDependOnOwnProps);var s=!1,l=!1;n?s=!0:r&&(s=this.updateStatePropsIfNeeded()),a&&(l=this.updateDispatchPropsIfNeeded());var u=!0;return u=!!(s||l||e)&&this.updateMergedPropsIfNeeded(),!u&&i?i:(w?this.renderedElement=(0,g.createElement)(t,c({},this.mergedProps,{ref:"wrappedInstance"})):this.renderedElement=(0,g.createElement)(t,this.mergedProps),this.renderedElement)},a}(g.Component);return n.displayName=A,n.WrappedComponent=t,n.contextTypes={store:M.default},n.propTypes={store:M.default},(0,f.default)(n,t)}}e.__esModule=!0;var c=Object.assign||function(t){for(var e=1;e服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function i(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var A={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var n in A)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?A[n]:("00"+A[n]).substr((""+A[n]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=A,e.getParameter=n,e.ajaxSave=o,e.formatDate=i,window.iframe_id_=1},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+c++;return t}function i(t,e){var A=window._server+"/frame/loadFileVersions";$.ajax({url:A,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function r(t,e){var A=window._server+"/common/loadResourceTreeData";$.ajax({url:A,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=l.default.frameStyle.getRootIcon(),t._style=l.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=l.default.frameStyle.getFolderIcon(),t._style=l.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=l.default.frameStyle.getRuleIcon(),t._style=l.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=l.default.frameStyle.getProjectIcon(),t._style=l.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=l.default.frameStyle.getResourceIcon(),t._style=l.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=l.default.frameStyle.getResourcePackageIcon(),t._style=l.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=l.default.frameStyle.getLibIcon(),t._style=l.default.frameStyle.getLibIconStyle();break;case"action":t._icon=l.default.frameStyle.getActionIcon(),t._style=l.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=l.default.frameStyle.getParameterIcon(),t._style=l.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=l.default.frameStyle.getConstantIcon(),t._style=l.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=l.default.frameStyle.getVariableIcon(),t._style=l.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=l.default.frameStyle.getRuleLibIcon(),t._style=l.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=l.default.frameStyle.getDecisionTableLibIcon(),t._style=l.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=l.default.frameStyle.getDecisionTreeLibIcon(),t._style=l.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=l.default.frameStyle.getFlowLibIcon(),t._style=l.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=l.default.frameStyle.getUlIcon(),t._style=l.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=l.default.frameStyle.getDecisionTableIcon(),t._style=l.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=l.default.frameStyle.getScriptDecisionTableIcon(),t._style=l.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=l.default.frameStyle.getDecisionTreeIcon(),t._style=l.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=l.default.frameStyle.getFlowIcon(),t._style=l.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=l.default.frameStyle.getScorecardIcon(),t._style=l.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=i,e.loadResourceTreeData=r;var s=A(228),l=n(s),c=1},function(t,e){"use strict";function A(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var n={};n.frameStyle={getRootIcon:function(){return A("rootIcon","rf rf-root")},getRootIconStyle:function(){return A("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return A("projectIcon","rf rf-project")},getProjectIconStyle:function(){return A("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return A("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return A("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return A("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return A("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return A("libIcon","rf rf-database")},getLibIconStyle:function(){return A("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return A("actionIcon","rf rf-action")},getActionIconStyle:function(){return A("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return A("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return A("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return A("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return A("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return A("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return A("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return A("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return A("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return A("ulIcon","rf rf-script")},getUlIconStyle:function(){return A("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return A("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return A("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return A("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return A("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return A("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return A("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return A("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return A("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return A("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return A("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return A("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return A("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return A("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return A("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return A("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return A("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return A("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return A("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return A("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return A("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return A("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return A("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=n},,function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A\r\n *\r\n * Same license as plugin\r\n */.splitter_panel{position:relative}.splitter_panel .vsplitter{border-left:1px solid #999;border-right:1px solid #999;background-color:#f5f5f5;cursor:col-resize;z-index:900;width:7px}.splitter_panel .hsplitter{background-color:#5f5f5f;cursor:row-resize;z-index:800;height:7px}.splitter_panel .hsplitter.splitter-invisible,.splitter_panel .vsplitter.splitter-invisible{background:none}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{position:absolute;overflow:auto}.splitter_panel .left_panel,.splitter_panel .right_panel,.splitter_panel .vsplitter{height:100%}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .top_panel{width:100%}.splitter_panel .left_panel,.splitter_panel .top_panel,.splitter_panel .vsplitter{top:0}.splitter_panel .bottom_panel,.splitter_panel .hsplitter,.splitter_panel .left_panel,.splitter_panel .top_panel{left:0}.splitter_panel .bottom_panel{bottom:0}.splitter_panel .right_panel{right:0}.splitterMask{position:absolute;left:0;top:0;right:0;bottom:0;z-index:1000}",""])},function(t,e){"use strict";!function(t,e){var A=0,n=null,o=[],i=null;t.fn.split=function(r){function a(t){if("number"==typeof t)return t;if("string"==typeof t){var e=t.match(/^([0-9\.]+)(px|%)$/);if(e){if("px"==e[2])return+e[1];if("vertical"==g.orientation)return d*+e[1]/100;if("horizontal"==g.orientation)return I*+e[1]/100}}}var s=this.data("splitter");if(s)return s;var l,c,g=t.extend({limit:100,orientation:"horizontal",position:"50%",invisible:!1,onDragStart:t.noop,onDragEnd:t.noop,onDrag:t.noop},r||{});this.settings=g;var u,M=this.children();"vertical"==g.orientation?(l=M.first().addClass("left_panel"),c=l.next().addClass("right_panel"),u="vsplitter"):"horizontal"==g.orientation&&(l=M.first().addClass("top_panel"),c=l.next().addClass("bottom_panel"),u="hsplitter"),g.invisible&&(u+=" splitter-invisible");var d=this.width(),I=this.height(),h=A++;this.addClass("splitter_panel");var p,T=t("
    ").addClass(u).bind("mouseenter touchstart",function(){n=h}).bind("mouseleave touchend",function(){n=null}).insertAfter(l),E=t.extend(this,{refresh:function(){var t=this.width(),e=this.height();d==t&&I==e||(d=this.width(),I=this.height(),E.position(p))},position:function(){return"vertical"==g.orientation?function(t,A){if(t===e)return p;p=a(t);var n=T.width(),o=n/2;if(g.invisible){var i=l.width(p).outerWidth();c.width(E.width()-i),T.css("left",i-o)}else{var i=l.width(p-o).outerWidth();c.width(E.width()-i-n),T.css("left",i)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:"horizontal"==g.orientation?function(t,A){if(t===e)return p;p=a(t);var n=T.height(),o=n/2;if(g.invisible){var i=l.height(p).outerHeight();c.height(E.height()-i),T.css("top",i-o)}else{var i=l.height(p-o).outerHeight();c.height(E.height()-i-n),T.css("top",i)}return A||E.find(".splitter_panel").trigger("splitter.resize"),E}:t.noop}(),orientation:g.orientation,limit:g.limit,isActive:function(){return n===h},destroy:function(){E.removeClass("splitter_panel"),T.unbind("mouseenter"),T.unbind("mouseleave"),T.unbind("touchstart"),T.unbind("touchmove"),T.unbind("touchend"),T.unbind("touchleave"),T.unbind("touchcancel"),"vertical"==g.orientation?(l.removeClass("left_panel"),c.removeClass("right_panel")):"horizontal"==g.orientation&&(l.removeClass("top_panel"),c.removeClass("bottom_panel")),E.unbind("splitter.resize"),E.find(".splitter_panel").trigger("splitter.resize"),o[h]=null,T.remove();for(var e=!1,n=o.length;n--;)if(null!==o[n]){e=!0;break}e||(t(document.documentElement).unbind(".splitter"),t(window).unbind("resize.splitter"),E.data("splitter",null),o=[],A=0)}});E.bind("splitter.resize",function(t){var e=E.position();"vertical"==E.orientation&&e>E.width()?e=E.width()-E.limit-1:"horizontal"==E.orientation&&e>E.height()&&(e=E.height()-E.limit-1),ed-g.limit?d-g.limit:a(g.position):"horizontal"==g.orientation&&(N=N>I-g.limit?I-g.limit:a(g.position)),N
    ').css("cursor",i.children().eq(1).css("cursor")).insertAfter(i),i.settings.onDragStart(e),!1}).bind("mouseup.splitter touchend.splitter touchleave.splitter touchcancel.splitter",function(e){i&&(t(".splitterMask").remove(),i.settings.onDragEnd(e),i=null)}).bind("mousemove.splitter touchmove.splitter",function(t){if(null!==i){var e=i.limit,A=i.offset();if("vertical"==i.orientation){var n=t.pageX;t.originalEvent&&t.originalEvent.changedTouches&&(n=t.originalEvent.changedTouches[0].pageX);var o=n-A.left;o<=i.limit?o=i.limit+1:o>=i.width()-e&&(o=i.width()-e-1),o>i.limit&&o=i.height()-e&&(a=i.height()-e-1),a>i.limit&&a-1&&(c=!0),!1}}),c?l.show():l.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,A=e.headers,n=e.operationConfig,o=e.dispatch,i=e.selectFirst,r=(e.uniqueKey,this.props.rows||[]),a=[],s=[];A.forEach(function(e,A){e.editable?a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label),l.default.createElement(I.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label)))}),n&&a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:n.width}},l.default.createElement("label",null,"操作列")));var c=l.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},A.map(function(e,A){return e.filterable?l.default.createElement("td",{key:(0,h.uniqueID)()},l.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,A),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):l.default.createElement("td",{key:(0,h.uniqueID)()}," ")}),n?l.default.createElement("td",null):null);s.push(c),r.forEach(function(e,r){e.id||(e.id=(0,h.uniqueID)());var a=e.id;0===r&&i?s.push(l.default.createElement(M.default,{key:a,select:!0,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:r})):s.push(l.default.createElement(M.default,{key:a,ready:t.props.ready,headers:A,dispatch:o,rowClick:t.props.rowClick,operations:n?n.operations:null,rowData:e,rowIndex:r}))});var g={margin:0,width:this.props.width?this.props.width:"100%"};return l.default.createElement("table",{className:"table table-bordered",style:g},l.default.createElement("thead",null,l.default.createElement("tr",{className:"well"},a)),l.default.createElement("tbody",null,s))}}]),e}(s.Component);p.propTypes={headers:l.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=p},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var n=e[t];n&&""!==n||(n="{}");var o=JSON.parse(n)||{},i=o.rows||[],r=o.type,a=function(n){var o={type:r,rows:n},i=JSON.stringify(o);e[t]=i;var a=A.find("div");a.html(i)};if(r){var s=null,l=!0,c=!1,g=void 0;try{for(var u,M=simulatorCategoryData[Symbol.iterator]();!(l=(u=M.next()).done);l=!0){var d=u.value;if(r===d.clazz){s=d;break}}}catch(t){c=!0,g=t}finally{try{!l&&M.return&&M.return()}finally{if(c)throw g}}var h=s.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:h,rows:i,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),A=!0,n=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(A=(s=l.next()).done);A=!0){var c=s.value;e.append('")}}catch(t){n=!0,o=t}finally{try{!A&&l.return&&l.return()}finally{if(n)throw o}}e.append(''),p.MsgBox.dialog("选择子对象类型",e,function(){if(r=e.val(),!r||""===r)return void p.MsgBox.alert("请先选择子对象类型!");var A=null,n=!0,o=!1,s=void 0;try{for(var l,c=t[Symbol.iterator]();!(n=(l=c.next()).done);n=!0){var g=l.value;if(r===g.clazz){A=g;break}}}catch(t){o=!0,s=t}finally{try{!n&&c.return&&c.return()}finally{if(o)throw s}}var u=A.variables||[];I.eventEmitter.emit(I.SHOW_CHILD_LIST_DIALOG,{variables:u,rows:i,callback:a})})}()});break;default:this.cellEditor=$('')}A.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var n=A.find("div");n.html(e[t]),n.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,A=e.rowData,n=e.header,o=n.dateFormat,i=A[n.name];if(o){var r=new Date(i);i=(0,h.formatDate)(r,o)}i&&"object"===("undefined"==typeof i?"undefined":s(i))&&(i=JSON.stringify(i));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return g.default.createElement("td",{style:{padding:"1px 5px"}},g.default.createElement("div",{style:a,onClick:function(e){if(n.editable){var o=e.target;$(o).css({display:"none"}),A._editorType?t._showEditor(n.name):I.eventEmitter.emit(I.SHOW_CELL_EDITOR,{targetDiv:o,rowData:A,colId:n.id})}}},i))}}]),e}(c.Component);e.default=T},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=A(240),i=n(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new i.default.EventEmitter},function(t,e){function A(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function n(t){return"function"==typeof t}function o(t){return"number"==typeof t}function i(t){return"object"==typeof t&&null!==t}function r(t){return void 0===t}t.exports=A,A.EventEmitter=A,A.prototype._events=void 0,A.prototype._maxListeners=void 0,A.defaultMaxListeners=10,A.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},A.prototype.emit=function(t){var e,A,o,a,s,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||i(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(A=this._events[t],r(A))return!1;if(n(A))switch(arguments.length){case 1:A.call(this);break;case 2:A.call(this,arguments[1]);break;case 3:A.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),A.apply(this,a)}else if(i(A))for(a=Array.prototype.slice.call(arguments,1),l=A.slice(),o=l.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},A.prototype.on=A.prototype.addListener,A.prototype.once=function(t,e){function A(){this.removeListener(t,A),o||(o=!0,e.apply(this,arguments))}if(!n(e))throw TypeError("listener must be a function");var o=!1;return A.listener=e,this.on(t,A),this},A.prototype.removeListener=function(t,e){var A,o,r,a;if(!n(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(A=this._events[t],r=A.length,o=-1,A===e||n(A.listener)&&A.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(i(A)){for(a=r;a-- >0;)if(A[a]===e||A[a].listener&&A[a].listener===e){o=a;break}if(o<0)return this;1===A.length?(A.length=0,delete this._events[t]):A.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},A.prototype.removeAllListeners=function(t){var e,A;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(A=this._events[t],n(A))this.removeListener(t,A);else if(A)for(;A.length;)this.removeListener(t,A[A.length-1]);return delete this._events[t],this},A.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?n(this._events[t])?[this._events[t]]:this._events[t].slice():[]},A.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(n(e))return 1;if(e)return e.length}return 0},A.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,A){var n=A(242).default,o=A(243).default,i=A(251),r=A(252).default,a=A(302);t.exports={Tool:n,Node:o,MsgBox:i,Event:a,FlowDesigner:r}},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A"}}},{key:"getConnectionPropertiesProducer", +value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,A){var n=this.newNode();return n?(n._tool=this,n._initConfigs(this.getConfigs()),A||(A=this._buildNodeName()),n._createFigure(this.context,{x:t,y:e},A),n):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,A=!0,n=!1,o=void 0;try{for(var i,r=this.context.allFigures[Symbol.iterator]();!(A=(i=r.next()).done);A=!0){var a=i.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){n=!0,o=t}finally{try{!A&&r.return&&r.return()}finally{if(n)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);es-c&&as-c&&a>l-c?this.attr("cursor","se-resize"):rl-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},n=function(A){if(!this.dragging){var n=t.currentTool;if(n){if(n instanceof M.default||n instanceof g.default||(t.currentTool=t.selectTool,n=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),n instanceof g.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,i=!0,r=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var u=s.value;if(u===e){o=!0;break}}}catch(t){r=!0,a=t}finally{try{!i&&c.return&&c.return()}finally{if(r)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(n instanceof M.default){var d=A.offsetX,h=A.offsetY,p=t.currentConnection;if(p){if(0===e.in)return void I.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void I.alert("当前节点进入的连线最多只能有"+e.in+"条.");p.endX=d,p.endY=h,p.from!==e?!function(){p.endPath(e),t.currentConnection=null;var A=p.from.uuid,n=e.uuid,o=p.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(A),i=t.getNodeByUUID(n);p=new l.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),p.uuid=o,p.endPath(i)},undo:function(){e.context.removeFigureByUUID(o)}})}():I.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void I.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void I.alert("当前节点出去的连线最多只能有"+e.out+"条.");p=new l.default(e,{endX:d,endY:h}),t.currentConnection=p}}}}};this.rect.mouseover(A),this.rect.mousedown(n),this.icon.mouseover(A),this.icon.mousedown(n);var o=function(){var A=e.rect,n=t.currentTool;if(n&&n instanceof g.default){var o=!1,i=t.selectionFigures,r=!0,a=!1,s=void 0;try{for(var c,u=i[Symbol.iterator]();!(r=(c=u.next()).done);r=!0){var M=c.value;if(M===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!r&&u.return&&u.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();i.forEach(function(t,e){t instanceof l.default||t._recordRectPosition()}),A.ow=A.attr("width"),A.oh=A.attr("height"),A.dragging=!0}},i=function(A,n){var o=t.currentTool;if(o&&o instanceof g.default){e.context.snapto&&(A-=A%10,n-=n%10);var i=t.selectionFigures,r=e.rect,a=(e.icon,r.ox+A),s=r.oy+n;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var c=void 0,u=void 0;switch(this.attr("cursor")){case"nw-resize":c=r.ow-A,u=r.oh-n,c>20&&u>20&&r.attr({x:a,y:s,width:c,height:u});break;case"ne-resize":c=r.ow+A,u=r.oh-n,c>20&&u>20&&r.attr({y:s,width:c,height:u});break;case"se-resize":c=r.ow+A,u=r.oh+n,c>20&&u>20&&r.attr({width:c,height:u});break;case"sw-resize":c=r.ow-A,u=r.oh+n,c>20&&u>20&&r.attr({x:a,width:c,height:u});break;default:i.forEach(function(t,e){t instanceof l.default||t._moveRect(A,n)})}i.forEach(function(t,e){t instanceof l.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},r=function(){e.rect.dragging=!1;var A=[],n=new Map,o=new Map,i=e.rect.ow,r=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),c=e.uuid,g=!0,u=!1,M=void 0;try{for(var d,I=t.selectionFigures[Symbol.iterator]();!(g=(d=I.next()).done);g=!0){var h=d.value;if(!(h instanceof l.default)){A.push(h.uuid);var p=h.rect.ox,T=h.rect.oy;p=p?p:0,T=T?T:0;var E=h.rect.attr("x"),N=h.rect.attr("y");n.set(h.uuid,{x:E,y:N}),o.set(h.uuid,{x:p,y:T})}}}catch(t){u=!0,M=t}finally{try{!g&&I.return&&I.return()}finally{if(u)throw M}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,i=void 0;try{for(var r,l=A[Symbol.iterator]();!(e=(r=l.next()).done);e=!0){var g=r.value,u=t.getNodeByUUID(g),M=n.get(g);u.rect.attr({x:M.x,y:M.y}),g===c&&u.rect.attr({width:a,height:s})}}catch(t){o=!0,i=t}finally{try{!e&&l.return&&l.return()}finally{if(o)throw i}}var d=!0,I=!1,h=void 0;try{for(var p,T=A[Symbol.iterator]();!(d=(p=T.next()).done);d=!0){var E=p.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,h=t}finally{try{!d&&T.return&&T.return()}finally{if(I)throw h}}},undo:function(){var e=!0,n=!1,a=void 0;try{for(var s,l=A[Symbol.iterator]();!(e=(s=l.next()).done);e=!0){var g=s.value,u=t.getNodeByUUID(g),M=o.get(g);u.rect.attr({x:M.x,y:M.y}),g===c&&u.rect.attr({width:i,height:r})}}catch(t){n=!0,a=t}finally{try{!e&&l.return&&l.return()}finally{if(n)throw a}}var d=!0,I=!1,h=void 0;try{for(var p,T=A[Symbol.iterator]();!(d=(p=T.next()).done);d=!0){var E=p.value,N=t.getNodeByUUID(E);N._moveAndResizeTextAndIcon(),N._resetConnections()}}catch(t){I=!0,h=t}finally{try{!d&&T.return&&T.return()}finally{if(I)throw h}}}})};this.rect.drag(i,o,r),this.icon.drag(i,o,r)}},{key:"remove",value:function(){var t=this,e=[].concat(i(this.toConnections)),A=[].concat(i(this.fromConnections));e.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),A.forEach(function(e,A){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var A=void 0,n=void 0;this.rect.ox&&0!==this.rect.ox?(A=this.rect.ox+t,n=this.rect.oy+e):(A=this.rect.attr("x")+t,n=this.rect.attr("x")+e),this.rect.attr({x:A,y:n})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(i(this.fromConnections),i(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),A=this.rect.attr("y"),n=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,A-=5,n+=10,o+=10),"M "+e+" "+A+" L "+(e+n)+" "+A+" L "+(e+n)+" "+(A+o)+" L "+e+" "+(A+o)+" L "+e+" "+A}}]),t}();e.default=h},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},r=function(){function t(t,e){for(var A=0;A0){({x:t[1][1],y:t[1][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var A=this.to.rect,n=A.attr("x"),o=A.attr("y"),i=A.attr("width"),r=A.attr("height");n+=i/2,o+=r/2-10;var a=t.x,l=t.y;t=[],t.push(["M",a,l]),t.push(["L",n,o])}var c=this.to.getPathInfo(!0),g=s.default.pathIntersection(c,t);if(g.length>0){({x:t[0][1],y:t[0][2]});return{x:g[0].x,y:g[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),A=t.attr("y"),n=t.attr("width"),o=t.attr("height");e+=n/2,A+=o/2-10;var i=this.endX,r=this.endY,a=0,l=0,c=null;if(this.to){var g=this.to.rect;i=g.attr("x"),r=g.attr("y"),a=g.attr("width"),l=g.attr("height"),i+=a/2,r+=l/2-10}var u=this.from.getPathInfo(!0),M=Math.abs(e+n/2-(i-a/2)),d=Math.abs(A+o/2-(r-l/2)),I="M"+e+" "+A;if(M>=d){var h=I+" L"+i+" "+A,p=s.default.pathIntersection(u,h);if(p.length>0&&(e=p[0].x,A=p[0].y,I="M"+p[0].x+" "+p[0].y),this.to){var T="M"+e+" "+r+" L"+i+" "+r,E=this.to.getPathInfo(!0);p=s.default.pathIntersection(E,T),p.length>0&&(i=p[0].x,r=p[0].y,e0&&(e=C[0].x,A=C[0].y,I="M"+C[0].x+" "+C[0].y),this.to){var y="M"+i+" "+A+" L"+i+" "+r,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(i=C[0].x,r=C[0].y,A=1e3&&delete a[s.shift()],s.push(r),a[r]=t[L](e,i),A?A(a[r]):a[r])}return o}function i(){return this.hex}function r(t,e){for(var A=[],n=0,o=t.length;o-2*!e>n;n+=2){var i=[{x:+t[n-2],y:+t[n-1]},{x:+t[n],y:+t[n+1]},{x:+t[n+2],y:+t[n+3]},{x:+t[n+4],y:+t[n+5]}];e?n?o-4==n?i[3]={x:+t[0],y:+t[1]}:o-2==n&&(i[2]={x:+t[0],y:+t[1]},i[3]={x:+t[2],y:+t[3]}):i[0]={x:+t[o-2],y:+t[o-1]}:o-4==n?i[3]=i[2]:n||(i[0]={x:+t[n],y:+t[n+1]}),A.push(["C",(-i[0].x+6*i[1].x+i[2].x)/6,(-i[0].y+6*i[1].y+i[2].y)/6,(i[1].x+6*i[2].x-i[3].x)/6,(i[1].y+6*i[2].y-i[3].y)/6,i[2].x,i[2].y])}return A}function a(t,e,A,n,o){var i=-3*e+9*A-9*n+3*o,r=t*i+6*e-12*A+6*n;return t*r-3*e+3*A}function s(t,e,A,n,o,i,r,s,l){null==l&&(l=1),l=l>1?1:l<0?0:l;for(var c=l/2,g=12,u=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],M=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],d=0,I=0;Id;)u/=2,M+=(cF(o,r)||F(e,n)F(i,a))){var s=(t*n-e*A)*(o-r)-(t-A)*(o*a-i*r),l=(t*n-e*A)*(i-a)-(e-n)*(o*a-i*r),c=(t-A)*(i-a)-(e-n)*(o-r);if(c){var g=s/c,u=l/c,M=+g.toFixed(2),d=+u.toFixed(2);if(!(M<+R(t,A).toFixed(2)||M>+F(t,A).toFixed(2)||M<+R(o,r).toFixed(2)||M>+F(o,r).toFixed(2)||d<+R(e,n).toFixed(2)||d>+F(e,n).toFixed(2)||d<+R(i,a).toFixed(2)||d>+F(i,a).toFixed(2)))return{x:g,y:u}}}}function g(t,A,n){var o=e.bezierBBox(t),i=e.bezierBBox(A);if(!e.isBBoxIntersect(o,i))return n?0:[];for(var r=s.apply(0,t),a=s.apply(0,A),l=F(~~(r/5),1),g=F(~~(a/5),1),u=[],M=[],d={},I=n?0:[],h=0;h=0&&x<=1.001&&B>=0&&B<=1.001&&(n?I++:I.push({x:D.x,y:D.y,t1:R(x,1),t2:R(B,1)}))}}return I}function u(t,A,n){t=e._path2curve(t),A=e._path2curve(A);for(var o,i,r,a,s,l,c,u,M,d,I=n?0:[],h=0,p=t.length;hn)return n;for(;Ai?A=o:n=o,o=(n-A)/2+A}return o}var l=3*e,c=3*(n-e)-l,g=1-l-c,u=3*A,M=3*(o-A)-u,d=1-u-M;return a(t,1/(200*i))}function h(t,e){var A=[],n={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(n[q(o)]=t[o],A.push(q(o)));A.sort(ct)}this.anim=n,this.top=A[A.length-1],this.percents=A}function p(A,n,o,i,r,a){o=q(o);var s,l,c,g,u,d,h=A.ms,p={},T={},E={};if(i)for(w=0,C=ie.length;wi*A.top){o=A.percents[w],u=A.percents[w-1]||0,h=h/A.top*(o-u),g=A.percents[w+1],s=A.anim[o];break}i&&n.attr(A.anim[A.percents[w]])}if(s){if(l)l.initstatus=i,l.start=new Date-l.ms*i;else{for(var D in s)if(s[y](D)&&(At[y](D)||n.paper.customAttributes[y](D)))switch(p[D]=n.attr(D),null==p[D]&&(p[D]=et[D]),T[D]=s[D],At[D]){case G:E[D]=(T[D]-p[D])/h;break;case"colour":p[D]=e.getRGB(p[D]);var x=e.getRGB(T[D]);E[D]={r:(x.r-p[D].r)/h,g:(x.g-p[D].g)/h,b:(x.b-p[D].b)/h};break;case"path":var B=vt(p[D],T[D]),L=B[1];for(p[D]=B[0],E[D]=[],w=0,C=p[D].length;w',ht=pt.firstChild,ht.style.behavior="url(#default#VML)",!ht||"object"!=typeof ht.adj)return e.type=m;pt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=B,e.fn=N=B.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=Y.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e; +},e.angle=function(t,A,n,o,i,r){if(null==i){var a=t-n,s=A-o;return a||s?(180+180*k.atan2(-s,-a)/V+360)%360:0}return e.angle(t,A,i,r)-e.angle(n,o,i,r)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,A,n){if(n=e.is(n,"finite")?n:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-A)<=n)return t[o]}else{t=+t;var i=A%t;if(it-n)return A-i+t}return A};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*k.random()|0,A="x"==t?e:3&e|8;return A.toString(16)});e.setWindow=function(A){t("raphael.setWindow",e,D.win,A),D.win=A,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var Tt=function(t){if(e.vml){var A,n=/^\s+|\s+$/g;try{var i=new ActiveXObject("htmlfile");i.write(""),i.close(),A=i.body}catch(t){A=createPopup().document.body}var r=A.createTextRange();Tt=o(function(t){try{A.style.color=S(t).replace(n,m);var e=r.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),Tt=o(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,m).getPropertyValue("color")})}return Tt(t)},Et=function(){return"hsb("+[this.h,this.s,this.b]+")"},Nt=function(){return"hsl("+[this.h,this.s,this.l]+")"},ft=function(){return this.hex},wt=function(t,A,n){if(null==A&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(n=t.b,A=t.g,t=t.r),null==A&&e.is(t,P)){var o=e.getRGB(t);t=o.r,A=o.g,n=o.b}return(t>1||A>1||n>1)&&(t/=255,A/=255,n/=255),[t,A,n]},Ct=function(t,A,n,o){t*=255,A*=255,n*=255;var i={r:t,g:A,b:n,hex:e.rgb(t,A,n),toString:ft};return e.is(o,"finite")&&(i.opacity=o),i};e.color=function(t){var A;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(A=e.hsb2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(A=e.hsl2rgb(t),t.r=A.r,t.g=A.g,t.b=A.b,t.hex=A.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(A=e.rgb2hsl(t),t.h=A.h,t.s=A.s,t.l=A.l,A=e.rgb2hsb(t),t.v=A.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=ft,t},e.hsb2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(A=t.b,e=t.s,n=t.o,t=t.h),t*=360;var o,i,r,a,s;return t=t%360/60,s=A*e,a=s*(1-O(t%2-1)),o=i=r=A-s,t=~~t,o+=[s,a,0,0,a,s][t],i+=[a,s,s,a,0,0][t],r+=[0,0,a,s,s,a][t],Ct(o,i,r,n)},e.hsl2rgb=function(t,e,A,n){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(A=t.l,e=t.s,t=t.h),(t>1||e>1||A>1)&&(t/=360,e/=100,A/=100),t*=360;var o,i,r,a,s;return t=t%360/60,s=2*e*(A<.5?A:1-A),a=s*(1-O(t%2-1)),o=i=r=A-s/2,t=~~t,o+=[s,a,0,0,a,s][t],i+=[a,s,s,a,0,0][t],r+=[0,0,a,s,s,a][t],Ct(o,i,r,n)},e.rgb2hsb=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,i,r;return i=F(t,e,A),r=i-R(t,e,A),n=0==r?null:i==t?(e-A)/r:i==e?(A-t)/r+2:(t-e)/r+4,n=(n+360)%6*60/360,o=0==r?0:r/i,{h:n,s:o,b:i,toString:Et}},e.rgb2hsl=function(t,e,A){A=wt(t,e,A),t=A[0],e=A[1],A=A[2];var n,o,i,r,a,s;return r=F(t,e,A),a=R(t,e,A),s=r-a,n=0==s?null:r==t?(e-A)/s:r==e?(A-t)/s+2:(t-e)/s+4,n=(n+360)%6*60/360,i=(r+a)/2,o=0==s?0:i<.5?s/(2*i):s/(2-2*i),{h:n,s:o,l:i,toString:Nt}},e._path2string=function(){return this.join(",").replace(it,"$1")};e._preload=function(t,e){var A=D.doc.createElement("img");A.style.cssText="position:absolute;left:-9999em;top:-9999em",A.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},A.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(A),A.src=t};e.getRGB=o(function(t){if(!t||(t=S(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:i};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=Tt(t));var A,n,o,r,a,s,l=t.match(J);return l?(l[2]&&(o=$(l[2].substring(5),16),n=$(l[2].substring(3,5),16),A=$(l[2].substring(1,3),16)),l[3]&&(o=$((a=l[3].charAt(3))+a,16),n=$((a=l[3].charAt(2))+a,16),A=$((a=l[3].charAt(1))+a,16)),l[4]&&(s=l[4][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(r=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(r/=100)),l[5]?(s=l[5][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(r=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(r/=100),e.hsb2rgb(A,n,o,r)):l[6]?(s=l[6][v](nt),A=q(s[0]),"%"==s[0].slice(-1)&&(A*=2.55),n=q(s[1]),"%"==s[1].slice(-1)&&(n*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(A/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(r=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(r/=100),e.hsl2rgb(A,n,o,r)):(l={r:A,g:n,b:o,toString:i},l.hex="#"+(16777216|o|n<<8|A<<16).toString(16).slice(1),e.is(r,"finite")&&(l.opacity=r),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:i}},e),e.hsb=o(function(t,A,n){return e.hsb2rgb(t,A,n).hex}),e.hsl=o(function(t,A,n){return e.hsl2rgb(t,A,n).hex}),e.rgb=o(function(t,e,A){function n(t){return t+.5|0}return"#"+(16777216|n(A)|n(e)<<8|n(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},A=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),A.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var A=yt(t);if(A.arr)return xt(A.arr);var n={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=xt(t)),o.length||S(t).replace(rt,function(t,e,A){var i=[],r=e.toLowerCase();if(A.replace(st,function(t,e){e&&i.push(+e)}),"m"==r&&i.length>2&&(o.push([e][b](i.splice(0,2))),r="l",e="m"==e?"l":"L"),"r"==r)o.push([e][b](i));else for(;i.length>=n[r]&&(o.push([e][b](i.splice(0,n[r]))),n[r]););}),o.toString=e._path2string,A.arr=xt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var A=[];return e.is(t,X)&&e.is(t[0],X)&&(A=xt(t)),A.length||S(t).replace(at,function(t,e,n){var o=[];Y.call(e);n.replace(st,function(t,e){e&&o.push(+e)}),A.push([e][b](o))}),A.toString=e._path2string,A});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var A in e)e[y](A)&&A!=t&&(e[A].sleep--,!e[A].sleep&&delete e[A])}),e[t]};e.findDotsAtSegment=function(t,e,A,n,o,i,r,a,s){var l=1-s,c=H(l,3),g=H(l,2),u=s*s,M=u*s,d=c*t+3*g*s*A+3*l*s*s*o+M*r,I=c*e+3*g*s*n+3*l*s*s*i+M*a,h=t+2*s*(A-t)+u*(o-2*A+t),p=e+2*s*(n-e)+u*(i-2*n+e),T=A+2*s*(o-A)+u*(r-2*o+A),E=n+2*s*(i-n)+u*(a-2*i+n),N=l*t+s*A,f=l*e+s*n,w=l*o+s*r,C=l*i+s*a,y=90-180*k.atan2(h-T,p-E)/V;return(h>T||p=t.x&&e<=t.x2&&A>=t.y&&A<=t.y2},e.isBBoxIntersect=function(t,A){var n=e.isPointInsideBBox;return n(A,t.x,t.y)||n(A,t.x2,t.y)||n(A,t.x,t.y2)||n(A,t.x2,t.y2)||n(t,A.x,A.y)||n(t,A.x2,A.y)||n(t,A.x,A.y2)||n(t,A.x2,A.y2)||(t.xA.x||A.xt.x)&&(t.yA.y||A.yt.y)},e.pathIntersection=function(t,e){return u(t,e)},e.pathIntersectionNumber=function(t,e){return u(t,e,1)},e.isPointInsidePath=function(t,A,n){var o=e.pathBBox(t);return e.isPointInsideBBox(o,A,n)&&u(t,[["M",A,n],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return A(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=vt(t);for(var n,o=0,i=0,r=[],a=[],s=0,l=t.length;s1&&(T=k.sqrt(T),A*=T,n*=T);var E=A*A,N=n*n,f=(r==a?-1:1)*k.sqrt(O((E*N-E*p*p-N*h*h)/(E*p*p+N*h*h))),w=f*A*p/n+(t+s)/2,C=f*-n*h/A+(e+l)/2,y=k.asin(((e-C)/n).toFixed(9)),D=k.asin(((l-C)/n).toFixed(9));y=tD&&(y-=2*V),!a&&D>y&&(D-=2*V)}var x=D-y;if(O(x)>u){var B=D,L=s,Q=l;D=y+u*(a&&D>y?1:-1),s=w+A*k.cos(D),l=C+n*k.sin(D),d=mt(s,l,A,n,i,0,a,L,Q,[D,B,w,C])}x=D-y;var m=k.cos(y),j=k.sin(y),S=k.cos(D),U=k.sin(D),z=k.tan(x/4),Y=4/3*A*z,F=4/3*n*z,R=[t,e],H=[t+Y*j,e-F*m],G=[s+Y*U,l-F*S],P=[s,l];if(H[0]=2*R[0]-H[0],H[1]=2*R[1]-H[1],c)return[H,G,P][b](d);d=[H,G,P][b](d).join()[v](",");for(var X=[],W=0,J=d.length;W"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=jt(t,e,A,n,o,i,r,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=jt(t,e,A,n,o,i,r,a,M),I.push(s.x),d.push(s.y)),l=i-2*n+e-(a-2*i+n),c=2*(n-e)-2*(i-n),g=e-n,u=(-c+k.sqrt(c*c-4*l*g))/2/l,M=(-c-k.sqrt(c*c-4*l*g))/2/l,O(u)>"1e12"&&(u=.5),O(M)>"1e12"&&(M=.5),u>0&&u<1&&(s=jt(t,e,A,n,o,i,r,a,u),I.push(s.x),d.push(s.y)),M>0&&M<1&&(s=jt(t,e,A,n,o,i,r,a,M),I.push(s.x),d.push(s.y)),{min:{x:R[L](0,I),y:R[L](0,d)},max:{x:F[L](0,I),y:F[L](0,d)}}}),vt=e._path2curve=o(function(t,e){var A=!e&&yt(t);if(!e&&A.curve)return xt(A.curve);for(var n=Lt(t),o=e&&Lt(e),i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,A){var n,o,i={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in i)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][b](mt[L](0,[e.x,e.y][b](t.slice(1))));break;case"S":"C"==A||"S"==A?(n=2*e.x-e.bx,o=2*e.y-e.by):(n=e.x,o=e.y),t=["C",n,o][b](t.slice(1));break;case"T":"Q"==A||"T"==A?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][b](Qt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][b](Qt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][b](bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][b](bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][b](bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][b](bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var A=t[e];A.length;)c[e]="A",o&&(g[e]="A"),t.splice(e++,0,["C"][b](A.splice(0,6)));t.splice(e,1),I=F(n.length,o&&o.length||0)}},l=function(t,e,A,i,r){t&&e&&"M"==t[r][0]&&"M"!=e[r][0]&&(e.splice(r,0,["M",i.x,i.y]),A.bx=0,A.by=0,A.x=t[r][1],A.y=t[r][2],I=F(n.length,o&&o.length||0))},c=[],g=[],u="",M="",d=0,I=F(n.length,o&&o.length||0);do){if(A&&!u.start){if(c=$t(r,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),g+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],i)return g;u.start=g,g=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,s[5],s[6]].join(),M+=l,r=+s[5],a=+s[6];continue}if(!t&&!A)return c=$t(r,a,s[1],s[2],s[3],s[4],s[5],s[6],o-M),{x:c.x,y:c.y,alpha:c.alpha}}M+=l,r=+s[5],a=+s[6]}g+=s.shift()+s}return u.end=g,c=t?M:A?u:e.findDotsAtSegment(r,a,s[0],s[1],s[2],s[3],s[4],s[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),Ae=te(),ne=te(0,1);e.getTotalLength=ee,e.getPointAtLength=Ae,e.getSubpath=function(t,e,A){if(this.getTotalLength(t)-A<1e-6)return ne(t,e).end;var n=ne(t,A,1);return e?ne(n,e).end:n},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return Ae(e,t)},Zt.getPath=function(){var t,A=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return A&&(t=A(this)),t},Zt.getSubpath=function(t,A){var n=this.getPath();if(n)return e.getSubpath(n,t,A)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return H(t,1.7)},">":function(t){return H(t,.48)},"<>":function(t){var e=.48-t/1.04,A=k.sqrt(.1734+e*e),n=A-e,o=H(O(n),1/3)*(n<0?-1:1),i=-A-e,r=H(O(i),1/3)*(i<0?-1:1),a=o+r+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:H(2,-10*t)*k.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,A=7.5625,n=2.75;return t<1/n?e=A*t*t:t<2/n?(t-=1.5/n,e=A*t*t+.75):t<2.5/n?(t-=2.25/n,e=A*t*t+.9375):(t-=2.625/n,e=A*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var ie=[],re=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var A=+new Date,n=0;n1&&!o.next){for(r in u)u[y](r)&&(I[r]=o.totalOrigin[r]);o.el.attr(I),p(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&p(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}ie.length&&re(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,A,n,o,i,r){var a=this;if(a.removed)return r&&r.call(a),a;var s=n instanceof h?n:e.animation(n,o,i,r);p(s,a,s.percents[0],null,a.attr());for(var l=0,c=ie.length;ls&&(s=c)}s+="%",!t[s].callback&&(t[s].callback=o)}return new h(t,A)},Zt.animate=function(t,A,n,o){var i=this;if(i.removed)return o&&o.call(i),i;var r=t instanceof h?t:e.animation(t,A,n,o);return p(r,i,r.percents[0],null,i.attr()),i},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,R(e,t.ms)/t.ms),this},Zt.status=function(t,e){var A,n,o=[],i=0;if(null!=e)return p(t,this,-1,R(e,1)),this;for(A=ie.length;i1)for(var n=0,o=A.length;n.5)-1;s(u-.5,2)+s(M-.5,2)>.25&&(M=i.sqrt(.25-s(u-.5,2))*o+.5)&&.5!=M&&(M=M.toFixed(5)-1e-5*o)}return g}),o=o.split(/\s*\-\s*/),"linear"==l){var N=o.shift();if(N=-n(N),isNaN(N))return null;var f=[0,0,i.cos(t.rad(N)),i.sin(t.rad(N))],w=1/(r(a(f[2]),a(f[3]))||1);f[2]*=w,f[3]*=w,f[2]<0&&(f[0]=-f[2],f[2]=0),f[3]<0&&(f[1]=-f[3],f[3]=0)}var C=t._parseDots(o);if(!C)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(I.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){T=h(l+"Gradient",{id:c}),e.gradient=T,h(T,"radial"==l?{fx:u,fy:M}:{x1:f[0],y1:f[1],x2:f[2],y2:f[3],gradientTransform:e.matrix.invert()}),I.defs.appendChild(T);for(var y=0,D=C.length;y1?S.opacity/100:S.opacity});case"stroke":S=t.getRGB(I),s.setAttribute(d,S.hex),"stroke"==d&&S[e]("opacity")&&h(s,{"stroke-opacity":S.opacity>1?S.opacity/100:S.opacity}),"stroke"==d&&n._.arrows&&("startString"in n._.arrows&&f(n,n._.arrows.startString),"endString"in n._.arrows&&f(n,n._.arrows.endString,1));break;case"gradient":("circle"==n.type||"ellipse"==n.type||"r"!=A(I).charAt())&&p(n,I);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&h(s,{"stroke-opacity":I>1?I/100:I});case"fill-opacity":if(c.gradient){v=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,g)),v&&(U=v.getElementsByTagName("stop"),h(U[U.length-1],{"stop-opacity":I}));break}default:"font-size"==d&&(I=o(I,10)+"px");var z=d.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[z]=I,n._.dirty=1,s.setAttribute(d,I)}}x(n,i),s.style.visibility=u},D=1.2,x=function(n,i){if("text"==n.type&&(i[e]("text")||i[e]("font")||i[e]("font-size")||i[e]("x")||i[e]("y"))){var r=n.attrs,a=n.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,g).getPropertyValue("font-size"),10):10;if(i[e]("text")){for(r.text=i.text;a.firstChild;)a.removeChild(a.firstChild);for(var l,c=A(i.text).split("\n"),u=[],M=0,d=c.length;M"));var Z=X.getBoundingClientRect();T.W=u.w=(Z.right-Z.left)/W,T.H=u.h=(Z.bottom-Z.top)/W,T.X=u.x,T.Y=u.y+T.H/2,("x"in s||"y"in s)&&(T.path.v=t.format("m{0},{1}l{2},{1}",i(u.x*N),i(u.y*N),i(u.x*N)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(A=o.sqrt(.25-a(e-.5,2))*(2*(A>.5)-1)+.5),l=e+M+A),d}),i=i.split(/\s*\-\s*/),"linear"==s){var c=i.shift();if(c=-n(c),isNaN(c))return null}var g=t._parseDots(i);if(!g)return null;if(e=e.shape||e.node,g.length){e.removeChild(r),r.on=!0,r.method="none",r.color=g[0].color,r.color2=g[g.length-1].color;for(var u=[],I=0,h=g.length;I')}}catch(t){m=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),A=e.container,n=e.height,o=e.width,i=e.x,r=e.y;if(!A)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),l=s.style;return i=i||0,r=r||0,o=o||512,n=n||342,a.width=o,a.height=n,o==+o&&(o+="px"),n==+n&&(n+="px"),a.coordsize=1e3*N+M+1e3*N,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),l.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,n),1==A?(t._g.doc.body.appendChild(s),l.left=i+"px",l.top=r+"px",l.position="absolute"):A.firstChild?A.insertBefore(s,A.firstChild):A.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=d,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var j=t.st;for(var S in Q)Q[e](S)&&!j[e](S)&&(j[S]=function(t){return function(){var e=arguments;return this.forEach(function(A){A[t].apply(A,e)})}}(S))}}.apply(e,n),!(void 0!==o&&(t.exports=o))}])})},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var A=0;A1&&(o=(t+1)/2),n.splice(o,1),2===n.length)n=e.connection._buildStraightLinePathInfo();else{var i=n[1],r=e.connection._buildFromFigureIntersetion({x:i[1],y:i[2]},!0),a=n[0];a[1]=r.x,a[2]=r.y;var s=n[n.length-2],l=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),c=n[n.length-1];c[1]=l.x,c[2]=l.y}e.path.attr("path",n),e.remove()});var u=function(n,o){e.context.snapto&&(n-=n%10,o-=o%10);var a=this.ox+n,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),r=Math.round(t/2);var l=e.path.attr("path"),c=l.length,g=void 0,u=void 0,M=void 0,d=2*(A.length-1)-1;if(0===t||1===t){if(M=l[1],g=e.connection._buildFromFigureIntersetion({x:M[1],y:M[2]},!0),u=A[0],2===A.length){var I=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(I){var h=A[A.length-1];h[1]=I.x,h[2]=I.y}}}else d!==t&&d!==t+1&&d!==t+2||(M=l[c-2],g=e.connection._buildToFigureIntersetion({x:a,y:s},!0),u=A[A.length-1]);g&&(u[1]=g.x,u[2]=g.y);var p=[];A.forEach(function(t,e){i?e===r?p.push(["L",a,s]):p.push(t):(p.push(t),e===r&&p.push(["L",a,s]))}),e.path.attr("path",p),e.connection._buildText()}},M=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},d=function(){var t=e.connection.buildPathInfo(),A=this.oldConnectionPathInfo,n=e.connection.uuid;e.context.addRedoUndo({redo:function(){var A=e.context.getNodeByUUID(n);A.pathInfo=t,A.updatePath(),A._buildText()},undo:function(){var t=e.context.getNodeByUUID(n);t.pathInfo=A,t.updatePath(),t._buildText()}})};this.rect.drag(u,M,d)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(t,e){for(var A=0;A'}}]),e}(l.default);e.default=c},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function r(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var A=0;A'}}]),e}(l.default);e.default=c},function(t,e){"use strict";function A(t){var e=r("消息提示",t);e.modal("show")}function n(t,e){var A=r("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);A.modal("show")}function o(t,e,A){var n=r(t,e,[{name:"确认",click:function(){A.call(this)}}]);n.modal("show")}function i(t,e,A,n,o){var i=r(t,e,A,o);if(i.modal("show"),n){var a=!0,s=!1,l=void 0;try{for(var c,g=n[Symbol.iterator]();!(a=(c=g.next()).done);a=!0){var u=c.value;i.on(u.name,u.callback)}}catch(t){s=!0,l=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw l}}}}function r(t,e,A,n){var o=this,i="modal-dialog"+(n?" modal-lg":""),r=$(''),s=$('
    ');r.append(s);var l=$(''),A.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),A.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),A.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var n="_prop_container",o=$('
    ');this.canvasContainer.append(o);var r=$('');o.append(r),r.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),o.append(a),o.draggable();var l=$("#__prop_panel_tool__");l.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(l.removeClass("glyphicon-circle-arrow-left"),l.addClass("glyphicon-circle-arrow-down")):(l.removeClass("glyphicon-circle-arrow-down"),l.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return r(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void T.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void T.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void T.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),A=t.x,n=t.y,o=t.width,i=t.height,r=t.name;A=parseInt(A),n=parseInt(n),o=parseInt(o),i=parseInt(i);var a=A+o+10,s=n+i+10;this.context.resizePaper(a+50,s+50);var l=e._newNodeInstance(A,n,r);l.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(A){17===A.which&&(e=!0),e&&(90===A.which?t.context.undoManager.undo():89===A.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;u.eventEmitter.on(u.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,A=this,n=!0,o=!1,i=void 0;try{for(var r,a=function(){var e=r.value,A=$('");A.click(function(){e.click.call(this)}),t.toolbar.append(A)},s=this.buttons[Symbol.iterator]();!(n=(r=s.next()).done);n=!0)a()}catch(t){o=!0,i=t}finally{try{!n&&s.return&&s.return()}finally{if(o)throw i}}var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,A.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,A.nodeToolbar.children("label").removeClass("active")});var g=$(''); +this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.undo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),e.undoManager.redo(),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.SNAPTO_SELECTED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.REMOVE_CLICKED),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_CENTER),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.ALIGN_MIDDLE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var T=$('');this.toolbar.append(T),T.click(function(t){e.cancelConnection(),u.eventEmitter.emit(u.UNIFY_SIZE),A.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,A=!1,n=void 0;try{for(var o,i=function(){var e=o.value,A=$('\n \n ");t.nodeToolbar.append(A),A.click(function(){u.eventEmitter.emit(u.TRIGGER_TOOL,e.getType())})},r=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=r.next()).done);e=!0)i()}catch(t){A=!0,n=t}finally{try{!e&&r.return&&r.return()}finally{if(A)throw n}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;u.eventEmitter.on(u.OBJECT_SELECTED,function(A){if(t.propContainer.empty(),A instanceof d.default){var n=A.name||A.text.attr("text"),o=$('
    '),i=$('');o.append(i),t.propContainer.append(o),i.change(function(t){var n=$(this).val(),o=A.name,i=A.uuid,r=!1,a=!0,s=!1,l=void 0;try{for(var c,g=e.context.allFigures[Symbol.iterator]();!(a=(c=g.next()).done);a=!0){var u=c.value;if(u instanceof d.default&&u!==A&&u.name===n){r=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&g.return&&g.return()}finally{if(s)throw l}}return r?void T.alert("节点名已存在!"):(A.name=n,A.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.name=n,t.text.attr("text",n)},undo:function(){var t=e.context.getNodeByUUID(i);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(A._tool.getPropertiesProducer().call(A))}else if(A instanceof h.default){var r=$('
    '),a=$('');r.append(a),t.propContainer.append(r),a.change(function(t){var n=$(this).val(),o=A.name,i=A.uuid,r=A.from.fromConnections,a=!1,s=!0,l=!1,c=void 0;try{for(var g,u=r[Symbol.iterator]();!(s=(g=u.next()).done);s=!0){var M=g.value;if(M!==A&&M.name===n){a=!0;break}}}catch(t){l=!0,c=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw c}}return a?void T.alert("连线名已存在"):(A.name=n,A._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.name=n,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(i);t.name=o,t._buildText()}}))});var s=$('
    '),l=$('');s.append(l),l.val(A.type),l.change(function(t){var n=$(this).val(),o=A.uuid,i=A.type;A.type=n,A.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=n,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=i,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(A.from._tool.getConnectionPropertiesProducer().call(A))}}),u.eventEmitter.on(u.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),u.eventEmitter.emit(u.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(T.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,A=!1,n=void 0;try{for(var o,i=this.context.allFigures[Symbol.iterator]();!(e=(o=i.next()).done);e=!0){var r=o.value;if(r instanceof d.default){var a=r.validate();a&&t.push(a)}}}catch(t){A=!0,n=t}finally{try{!e&&i.return&&i.return()}finally{if(A)throw n}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",T.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,A){e instanceof d.default&&t.push(e.toJSON())}),t}}]),t}();e.default=E},function(t,e,A){var n=A(254);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+A(255)+");src:url("+A(255)+") format('embedded-opentype'),url("+A(256)+") format('woff'),url("+A(257)+") format('truetype'),url("+A(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,A){var n=A(260);"string"==typeof n&&(n=[[t.id,n,""]]);A(9)(n,{});n.locals&&(t.exports=n.locals)},function(t,e,A){e=t.exports=A(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+A(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,A){A(263),A(264),A(265),A(266),A(267),A(268),A(269),A(270),A(271),A(272),A(273),A(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var A in e)if(void 0!==t.style[A])return{end:e[A]};return!1}t.fn.emulateTransitionEnd=function(e){var A=!1,n=this;t(this).one("bsTransitionEnd",function(){A=!0});var o=function(){A||t(n).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var A=t(this),o=A.data("bs.alert");o||A.data("bs.alert",o=new n(this)),"string"==typeof e&&o[e].call(A)})}var A='[data-dismiss="alert"]',n=function(e){t(e).on("click",A,this.close)};n.VERSION="3.3.7",n.TRANSITION_DURATION=150,n.prototype.close=function(e){function A(){r.detach().trigger("closed.bs.alert").remove()}var o=t(this),i=o.attr("data-target");i||(i=o.attr("href"),i=i&&i.replace(/.*(?=#[^\s]*$)/,""));var r=t("#"===i?[]:i);e&&e.preventDefault(),r.length||(r=o.closest(".alert")),r.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),t.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",A).emulateTransitionEnd(n.TRANSITION_DURATION):A())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=n,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",A,n.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.button"),i="object"==typeof e&&e;o||n.data("bs.button",o=new A(this,i)),"toggle"==e?o.toggle():e&&o.setState(e)})}var A=function(e,n){this.$element=t(e),this.options=t.extend({},A.DEFAULTS,n),this.isLoading=!1};A.VERSION="3.3.7",A.DEFAULTS={loadingText:"loading..."},A.prototype.setState=function(e){var A="disabled",n=this.$element,o=n.is("input")?"val":"html",i=n.data();e+="Text",null==i.resetText&&n.data("resetText",n[o]()),setTimeout(t.proxy(function(){n[o](null==i[e]?this.options[e]:i[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(A).attr(A,A).prop(A,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(A).removeAttr(A).prop(A,!1))},this),0)},A.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var A=this.$element.find("input");"radio"==A.prop("type")?(A.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==A.prop("type")&&(A.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),A.prop("checked",this.$element.hasClass("active")),t&&A.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var n=t.fn.button;t.fn.button=e,t.fn.button.Constructor=A,t.fn.button.noConflict=function(){return t.fn.button=n,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(A){var n=t(A.target).closest(".btn");e.call(n,"toggle"),t(A.target).is('input[type="radio"], input[type="checkbox"]')||(A.preventDefault(),n.is("input,button")?n.trigger("focus"):n.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.carousel"),i=t.extend({},A.DEFAULTS,n.data(),"object"==typeof e&&e),r="string"==typeof e?e:i.slide;o||n.data("bs.carousel",o=new A(this,i)),"number"==typeof e?o.to(e):r?o[r]():i.interval&&o.pause().cycle()})}var A=function(e,A){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=A,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};A.VERSION="3.3.7",A.TRANSITION_DURATION=600,A.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},A.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},A.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},A.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},A.prototype.getItemForDirection=function(t,e){var A=this.getItemIndex(e),n="prev"==t&&0===A||"next"==t&&A==this.$items.length-1;if(n&&!this.options.wrap)return e;var o="prev"==t?-1:1,i=(A+o)%this.$items.length;return this.$items.eq(i)},A.prototype.to=function(t){var e=this,A=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):A==t?this.pause().cycle():this.slide(t>A?"next":"prev",this.$items.eq(t))},A.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},A.prototype.next=function(){if(!this.sliding)return this.slide("next")},A.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},A.prototype.slide=function(e,n){var o=this.$element.find(".item.active"),i=n||this.getItemForDirection(e,o),r=this.interval,a="next"==e?"left":"right",s=this;if(i.hasClass("active"))return this.sliding=!1;var l=i[0],c=t.Event("slide.bs.carousel",{relatedTarget:l,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,r&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var g=t(this.$indicators.children()[this.getItemIndex(i)]);g&&g.addClass("active")}var u=t.Event("slid.bs.carousel",{relatedTarget:l,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(i.addClass(e),i[0].offsetWidth,o.addClass(a),i.addClass(a),o.one("bsTransitionEnd",function(){i.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(u)},0)}).emulateTransitionEnd(A.TRANSITION_DURATION)):(o.removeClass("active"),i.addClass("active"),this.sliding=!1,this.$element.trigger(u)),r&&this.cycle(),this}};var n=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=A,t.fn.carousel.noConflict=function(){return t.fn.carousel=n,this};var o=function(A){var n,o=t(this),i=t(o.attr("data-target")||(n=o.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,""));if(i.hasClass("carousel")){var r=t.extend({},i.data(),o.data()),a=o.attr("data-slide-to");a&&(r.interval=!1),e.call(i,r),a&&i.data("bs.carousel").to(a),A.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var A=t(this);e.call(A,A.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A,n=e.attr("data-target")||(A=e.attr("href"))&&A.replace(/.*(?=#[^\s]+$)/,"");return t(n)}function A(e){return this.each(function(){var A=t(this),o=A.data("bs.collapse"),i=t.extend({},n.DEFAULTS,A.data(),"object"==typeof e&&e);!o&&i.toggle&&/show|hide/.test(e)&&(i.toggle=!1),o||A.data("bs.collapse",o=new n(this,i)),"string"==typeof e&&o[e]()})}var n=function(e,A){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,A),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};n.VERSION="3.3.7",n.TRANSITION_DURATION=350,n.DEFAULTS={toggle:!0},n.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},n.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var i=t.Event("show.bs.collapse");if(this.$element.trigger(i),!i.isDefaultPrevented()){o&&o.length&&(A.call(o,"hide"),e||o.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(n.TRANSITION_DURATION)[r](this.$element[0][s])}}}},n.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var A=this.dimension();this.$element[A](this.$element[A]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[A](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(n.TRANSITION_DURATION):o.call(this)}}},n.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},n.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(A,n){var o=t(n);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},n.prototype.addAriaAndCollapsedClass=function(t,e){var A=t.hasClass("in");t.attr("aria-expanded",A),e.toggleClass("collapsed",!A).attr("aria-expanded",A)};var o=t.fn.collapse;t.fn.collapse=A,t.fn.collapse.Constructor=n,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(n){var o=t(this);o.attr("data-target")||n.preventDefault();var i=e(o),r=i.data("bs.collapse"),a=r?"toggle":o.data();A.call(i,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var A=e.attr("data-target");A||(A=e.attr("href"),A=A&&/#[A-Za-z]/.test(A)&&A.replace(/.*(?=#[^\s]*$)/,""));var n=A&&t(A);return n&&n.length?n:e.parent()}function A(A){A&&3===A.which||(t(o).remove(),t(i).each(function(){var n=t(this),o=e(n),i={relatedTarget:this};o.hasClass("open")&&(A&&"click"==A.type&&/input|textarea/i.test(A.target.tagName)&&t.contains(o[0],A.target)||(o.trigger(A=t.Event("hide.bs.dropdown",i)),A.isDefaultPrevented()||(n.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",i)))))}))}function n(e){return this.each(function(){var A=t(this),n=A.data("bs.dropdown");n||A.data("bs.dropdown",n=new r(this)),"string"==typeof e&&n[e].call(A)})}var o=".dropdown-backdrop",i='[data-toggle="dropdown"]',r=function(e){t(e).on("click.bs.dropdown",this.toggle)};r.VERSION="3.3.7",r.prototype.toggle=function(n){var o=t(this);if(!o.is(".disabled, :disabled")){var i=e(o),r=i.hasClass("open");if(A(),!r){"ontouchstart"in document.documentElement&&!i.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",A);var a={relatedTarget:this};if(i.trigger(n=t.Event("show.bs.dropdown",a)),n.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),i.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},r.prototype.keydown=function(A){if(/(38|40|27|32)/.test(A.which)&&!/input|textarea/i.test(A.target.tagName)){var n=t(this);if(A.preventDefault(),A.stopPropagation(),!n.is(".disabled, :disabled")){var o=e(n),r=o.hasClass("open");if(!r&&27!=A.which||r&&27==A.which)return 27==A.which&&o.find(i).trigger("focus"),n.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var l=s.index(A.target);38==A.which&&l>0&&l--,40==A.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},A.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},A.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},A.prototype.init=function(e,A,n){if(this.enabled=!0,this.type=e,this.$element=t(A),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),i=o.length;i--;){var r=o[i];if("click"==r)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=r){var a="hover"==r?"mouseenter":"focusin",s="hover"==r?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},A.prototype.getDelegateOptions=function(){var e={},A=this.getDefaults();return this._options&&t.each(this._options,function(t,n){A[t]!=n&&(e[t]=n)}),e},A.prototype.enter=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusin"==e.type?"focus":"hover"]=!0),A.tip().hasClass("in")||"in"==A.hoverState?void(A.hoverState="in"):(clearTimeout(A.timeout),A.hoverState="in",A.options.delay&&A.options.delay.show?void(A.timeout=setTimeout(function(){"in"==A.hoverState&&A.show()},A.options.delay.show)):A.show())},A.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},A.prototype.leave=function(e){var A=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A)),e instanceof t.Event&&(A.inState["focusout"==e.type?"focus":"hover"]=!1),!A.isInStateTrue())return clearTimeout(A.timeout),A.hoverState="out",A.options.delay&&A.options.delay.hide?void(A.timeout=setTimeout(function(){"out"==A.hoverState&&A.hide()},A.options.delay.hide)):A.hide()},A.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var n=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!n)return;var o=this,i=this.tip(),r=this.getUID(this.type);this.setContent(),i.attr("id",r),this.$element.attr("aria-describedby",r),this.options.animation&&i.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),g=i[0].offsetWidth,u=i[0].offsetHeight;if(l){var M=a,d=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+u>d.bottom?"top":"top"==a&&c.top-ud.width?"left":"left"==a&&c.left-gr.top+r.height&&(o.top=r.top+r.height-s)}else{var l=e.left-i,c=e.left+i+A;lr.right&&(o.left=r.left+r.width-c)}return o},A.prototype.getTitle=function(){var t,e=this.$element,A=this.options;return t=e.attr("data-original-title")||("function"==typeof A.title?A.title.call(e[0]):A.title)},A.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},A.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},A.prototype.enable=function(){this.enabled=!0},A.prototype.disable=function(){this.enabled=!1},A.prototype.toggleEnabled=function(){this.enabled=!this.enabled},A.prototype.toggle=function(e){var A=this;e&&(A=t(e.currentTarget).data("bs."+this.type),A||(A=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,A))),e?(A.inState.click=!A.inState.click,A.isInStateTrue()?A.enter(A):A.leave(A)):A.tip().hasClass("in")?A.leave(A):A.enter(A)},A.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var n=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=A,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.popover"),i="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||n.data("bs.popover",o=new A(this,i)),"string"==typeof e&&o[e]())})}var A=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");A.VERSION="3.3.7",A.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),A.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),A.prototype.constructor=A,A.prototype.getDefaults=function(){return A.DEFAULTS},A.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),A=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof A?"html":"append":"text"](A),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},A.prototype.hasContent=function(){return this.getTitle()||this.getContent()},A.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},A.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var n=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=A,t.fn.popover.noConflict=function(){return t.fn.popover=n,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(A,n){this.$body=t(document.body),this.$scrollElement=t(t(A).is(document.body)?window:A),this.options=t.extend({},e.DEFAULTS,n),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function A(A){return this.each(function(){var n=t(this),o=n.data("bs.scrollspy"),i="object"==typeof A&&A;o||n.data("bs.scrollspy",o=new e(this,i)),"string"==typeof A&&o[A]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,A="offset",n=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(A="position",n=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),i=/^#./.test(o)&&t(o);return i&&i.length&&i.is(":visible")&&[[i[A]().top+n,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,A=this.getScrollHeight(),n=this.options.offset+A-this.$scrollElement.height(),o=this.offsets,i=this.targets,r=this.activeTarget;if(this.scrollHeight!=A&&this.refresh(),e>=n)return r!=(t=i[i.length-1])&&this.activate(t);if(r&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var r=n.find("> .active"),a=o&&t.support.transition&&(r.length&&r.hasClass("fade")||!!n.find("> .fade").length);r.length&&a?r.one("bsTransitionEnd",i).emulateTransitionEnd(A.TRANSITION_DURATION):i(),r.removeClass("in")};var n=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=A,t.fn.tab.noConflict=function(){return t.fn.tab=n,this};var o=function(A){A.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.affix"),i="object"==typeof e&&e;o||n.data("bs.affix",o=new A(this,i)),"string"==typeof e&&o[e]()})}var A=function(e,n){this.options=t.extend({},A.DEFAULTS,n),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};A.VERSION="3.3.7",A.RESET="affix affix-top affix-bottom",A.DEFAULTS={offset:0,target:window},A.prototype.getState=function(t,e,A,n){var o=this.$target.scrollTop(),i=this.$element.offset(),r=this.$target.height();if(null!=A&&"top"==this.affixed)return o=t-n&&"bottom"},A.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(A.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},A.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},A.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),n=this.options.offset,o=n.top,i=n.bottom,r=Math.max(t(document).height(),t(document.body).height());"object"!=typeof n&&(i=o=n),"function"==typeof o&&(o=n.top(this.$element)),"function"==typeof i&&(i=n.bottom(this.$element));var a=this.getState(r,e,o,i);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),l=t.Event(s+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(A.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:r-e-i})}};var n=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=A,t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var A=t(this),n=A.data();n.offset=n.offset||{},null!=n.offsetBottom&&(n.offset.bottom=n.offsetBottom),null!=n.offsetTop&&(n.offset.top=n.offsetTop),e.call(A,n)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var A=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,n,o=t(this),i=A.handle?t(A.handle,o):o;i.on({mousedown:function(i){var r=i.target,a="",s=!1;if(r&&(a=r.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===r.tagName||"INPUT"===r.tagName||r&&"presentation"===t(r).attr("role")||A.exclude&&~t.inArray(i.target,t(A.exclude,o)))){var l=o.offset();e=i.pageX-l.left,n=i.pageY-l.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-n,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,A){"use strict";function n(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var A=0;A0&&r.push(g)}else{var h=g.rect,p=h.getBBox();(p.x>=A.x&&p.x<=A.x2||p.x2>=A.x&&p.x2<=A.x2)&&(p.y>=A.y&&p.y<=A.y2||p.y2>=A.y&&p.y2<=A.y2)&&s.push(g)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):r.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var n=null,o=this.context,i=o.paper;i.set();this.canvas=i.rect(0,0,i.width,i.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,A),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof g.default||e instanceof l.default)){var A=t.offsetX,n=t.offsetY,i=e._newNodeInstance(A,n);i&&!function(){var t=i.uuid,r=i.name,a=i.toJSON();o.addRedoUndo({redo:function(){i=e._newNodeInstance(A,n,r),i.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof g.default){var e=o.currentConnection;if(e){var A=t.offsetX,n=t.offsetY;e.endX=A,e.endY=n,e.updatePath()}}})}}]),t}();e.default=d},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function i(t){if(Array.isArray(t)){for(var e=0,A=Array(t.length);eA&&this.container.width(t+10),e>n&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof E.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,A){t||(t=e),e instanceof E.default&&e.select()}),t&&f.eventEmitter.emit(f.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof E.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),f.eventEmitter.emit(f.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return M.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var i,r=this.allFigures[Symbol.iterator]();!(A=(i=r.next()).done);A=!0){var a=i.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&r.return&&r.return()}finally{if(n)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,A=!0,n=!1,o=void 0;try{for(var i,r=this.allFigures[Symbol.iterator]();!(A=(i=r.next()).done);A=!0){var a=i.value;if(a.uuid===t){e=a;break}}}catch(t){n=!0,o=t}finally{try{!A&&r.return&&r.return()}finally{if(n)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),A=this.allFigures.indexOf(e);this.allFigures.splice(A,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;f.eventEmitter.on(f.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),f.eventEmitter.on(f.REMOVE_CLICKED,function(){var e=[].concat(i(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,A){var n=e.toJSON(),o=e.uuid,i=t;e instanceof E.default?t.addRedoUndo({redo:function(){var t=i.getNodeByUUID(o),e=t.from.uuid,A=t.to.uuid,r=i.context.getNodeByUUID(e),a=i.context.getNodeByUUID(A),s=new E.default(r,{x:r.rect.attr("x"),y:r.rect.attr("y")});r.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(n)},undo:function(){i.removeFigureByUUID(o)}}):!function(){var A=e._tool;t.addRedoUndo({redo:function(){i.removeFigureByUUID(o)},undo:function(){var t=A._newNodeInstance(10,10,"");t&&(t.initFromJson(n),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),f.eventEmitter.on(f.ALIGN_CENTER,function(){var e=-1,A=-1,n=void 0,o=new Map,i=0,r=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var g=l.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===i?(e=g.rect.attr("x"),n=g.rect.attr("width"),e+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),i++}}catch(t){a=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,i=o.keys()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var r=n.value,a=M.getNodeByUUID(r),s=o.get(r),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,i=o.keys()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var r=n.value,a=M.getNodeByUUID(r),s=o.get(r),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.ALIGN_MIDDLE,function(){var e=-1,A=-1,n=void 0,o=new Map,i=0,r=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var g=l.value;if(g instanceof E.default)break;var u={oldXY:{x:g.rect.attr("x"),y:g.rect.attr("y")}};0===i?(A=g.rect.attr("y"),n=g.rect.attr("height"),A+=n/2):g.moveTo(e,A),u.newXY={x:g.rect.attr("x"),y:g.rect.attr("y")},o.set(g.uuid,u),i++}}catch(t){a=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(a)throw s}}var M=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var n,i=o.keys()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var r=n.value,a=M.getNodeByUUID(r),s=o.get(r),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var n,i=o.keys()[Symbol.iterator]();!(t=(n=i.next()).done);t=!0){var r=n.value,a=M.getNodeByUUID(r),s=o.get(r),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}}})}),f.eventEmitter.on(f.UNIFY_SIZE,function(){var e=void 0,A=void 0,n=new Map,o=0,i=!0,r=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(i=(s=l.next()).done);i=!0){var c=s.value;if(c instanceof E.default)break;var g={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===o?(e=c.rect.attr("width"),A=c.rect.attr("height")):c.changeSize(e,A),g.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},n.set(c.uuid,g),o++}}catch(t){r=!0,a=t}finally{try{!i&&l.return&&l.return()}finally{if(r)throw a}}var u=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,A=void 0;try{for(var o,i=n.keys()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var r=o.value,a=u.getNodeByUUID(r),s=n.get(r),l=s.newWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}},undo:function(){var t=!0,e=!1,A=void 0;try{for(var o,i=n.keys()[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var r=o.value,a=u.getNodeByUUID(r),s=n.get(r),l=s.oldWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,A=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw A}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new I.default,this.connectionTool=new p.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,A){var n;!function(){"use strict";function o(t,e,A){return t.splice(e,!A||1+A-e+(!(A<0^e>=0)&&(A<0||-1)*t.length)),t.length}var i=function(){var t,e,A=[],n=-1,i=0,r=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(r=!0,t[e](),r=!1,this):this},{add:function(e){return r?this:(A.splice(n+1,A.length-n),A.push(e),i&&A.length>i&&o(A,0,-(i+1)),n=A.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=A[n];return o?(e(o,"undo"),n-=1,t&&t(),this):this},redo:function(){var o=A[n+1];return o?(e(o,"redo"),n+=1,t&&t(),this):this},clear:function(){var e=A.length;A=[],n=-1,t&&e>0&&t()},hasUndo:function(){return n!==-1},hasRedo:function(){return n>>((3&e)<<3)&255;return A},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=A(284).randomBytes;d=u=t&&function(){return t(16)},u()}catch(t){}}function s(t,e,A){var n=e&&A||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[n+o++]=T[t])});o<16;)e[n+o++]=0;return e}function l(t,e){var A=e||0,n=p;return n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+"-"+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]+n[t[A++]]}function c(t,e,A){var n=e&&A||0,o=e||[];t=t||{};var i=null!=t.clockseq?t.clockseq:w,r=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=r-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(i=i+1&16383),(s<0||r>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=r,y=a,w=i,r+=122192928e5;var c=(1e4*(268435455&r)+a)%4294967296;o[n++]=c>>>24&255,o[n++]=c>>>16&255,o[n++]=c>>>8&255,o[n++]=255&c;var g=r/4294967296*1e4&268435455;o[n++]=g>>>8&255,o[n++]=255&g,o[n++]=g>>>24&15|16,o[n++]=g>>>16&255,o[n++]=i>>>8|128,o[n++]=255&i;for(var u=t.node||f,M=0;M<6;M++)o[n+M]=u[M];return e?e:l(o)}function g(t,e,A){var n=e&&A||0;"string"==typeof t&&(e="binary"===t?new h(16):null,t=null),t=t||{};var o=t.random||(t.rng||u)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var i=0;i<16;i++)e[n+i]=o[i];return e||l(o)}var u,M,d,I;i?r():a();for(var h="function"==typeof o?o:Array,p=[],T={},E=0;E<256;E++)p[E]=(E+256).toString(16).substr(1),T[p[E]]=E;var N=u(),f=[1|N[0],N[1],N[2],N[3],N[4],N[5]],w=16383&(N[6]<<8|N[7]),C=0,y=0,D=g;D.v1=c,D.v4=g,D.parse=s,D.unparse=l,D.BufferClass=h,D._rng=u,D._mathRNG=M,D._nodeRNG=d,D._whatwgRNG=I,"undefined"!=typeof t&&t.exports?t.exports=D:(n=function(){return D}.call(e,A,e,t),!(void 0!==n&&(t.exports=n)))}("undefined"!=typeof window?window:null)}).call(e,A(280).Buffer)},function(t,e,A){(function(t,n){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function i(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function r(e,A){if(i()=i())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i().toString(16)+" bytes");return 0|t}function h(e){return+e!=e&&(e=0),t.alloc(+e)}function p(e,A){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(A){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;A=(""+A).toLowerCase(),o=!0}}function T(t,e,A){var n=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===A||A>this.length)&&(A=this.length),A<=0)return"";if(A>>>=0,e>>>=0,A<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return S(this,e,A);case"utf8":case"utf-8":return b(this,e,A);case"ascii":return m(this,e,A);case"latin1":case"binary":return j(this,e,A);case"base64":return L(this,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return v(this,e,A);default:if(n)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),n=!0}}function E(t,e,A){var n=t[e];t[e]=t[A],t[A]=n}function N(e,A,n,o,i){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof A&&(A=t.from(A,o)),t.isBuffer(A))return 0===A.length?-1:f(e,A,n,o,i);if("number"==typeof A)return A&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,A,n):Uint8Array.prototype.lastIndexOf.call(e,A,n):f(e,[A],n,o,i); +throw new TypeError("val must be string, number or Buffer")}function f(t,e,A,n,o){function i(t,e){return 1===r?t[e]:t.readUInt16BE(e*r)}var r=1,a=t.length,s=e.length;if(void 0!==n&&(n=String(n).toLowerCase(),"ucs2"===n||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(t.length<2||e.length<2)return-1;r=2,a/=2,s/=2,A/=2}var l;if(o){var c=-1;for(l=A;la&&(A=a-s),l=A;l>=0;l--){for(var g=!0,u=0;uo&&(n=o)):n=o;var i=e.length;if(i%2!==0)throw new TypeError("Invalid hex string");n>i/2&&(n=i/2);for(var r=0;r239?4:i>223?3:i>191?2:1;if(o+a<=A){var s,l,c,g;switch(a){case 1:i<128&&(r=i);break;case 2:s=t[o+1],128===(192&s)&&(g=(31&i)<<6|63&s,g>127&&(r=g));break;case 3:s=t[o+1],l=t[o+2],128===(192&s)&&128===(192&l)&&(g=(15&i)<<12|(63&s)<<6|63&l,g>2047&&(g<55296||g>57343)&&(r=g));break;case 4:s=t[o+1],l=t[o+2],c=t[o+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(g=(15&i)<<18|(63&s)<<12|(63&l)<<6|63&c,g>65535&&g<1114112&&(r=g))}}null===r?(r=65533,a=1):r>65535&&(r-=65536,n.push(r>>>10&1023|55296),r=56320|1023&r),n.push(r),o+=a}return Q(n)}function Q(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var A="",n=0;nn)&&(A=n);for(var o="",i=e;iA)throw new RangeError("Trying to access beyond buffer length")}function z(e,A,n,o,i,r){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(A>i||Ae.length)throw new RangeError("Index out of range")}function Y(t,e,A,n){e<0&&(e=65535+e+1);for(var o=0,i=Math.min(t.length-A,2);o>>8*(n?o:1-o)}function k(t,e,A,n){e<0&&(e=4294967295+e+1);for(var o=0,i=Math.min(t.length-A,4);o>>8*(n?o:3-o)&255}function F(t,e,A,n,o,i){if(A+n>t.length)throw new RangeError("Index out of range");if(A<0)throw new RangeError("Index out of range")}function R(t,e,A,n,o){return o||F(t,e,A,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,A,n,23,4),A+4}function O(t,e,A,n,o){return o||F(t,e,A,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,A,n,52,8),A+8}function H(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var A,n=t.length,o=null,i=[],r=0;r55295&&A<57344){if(!o){if(A>56319){(e-=3)>-1&&i.push(239,191,189);continue}if(r+1===n){(e-=3)>-1&&i.push(239,191,189);continue}o=A;continue}if(A<56320){(e-=3)>-1&&i.push(239,191,189),o=A;continue}A=(o-55296<<10|A-56320)+65536}else o&&(e-=3)>-1&&i.push(239,191,189);if(o=null,A<128){if((e-=1)<0)break;i.push(A)}else if(A<2048){if((e-=2)<0)break;i.push(A>>6|192,63&A|128)}else if(A<65536){if((e-=3)<0)break;i.push(A>>12|224,A>>6&63|128,63&A|128)}else{if(!(A<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;i.push(A>>18|240,A>>12&63|128,A>>6&63|128,63&A|128)}}return i}function X(t){for(var e=[],A=0;A>8,o=A%256,i.push(o),i.push(n);return i}function J(t){return _.toByteArray(H(t))}function Z(t,e,A,n){for(var o=0;o=e.length||o>=t.length);++o)e[o+A]=t[o];return o}function K(t){return t!==t}var _=A(281),q=A(282),$=A(283);e.Buffer=t,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==n.TYPED_ARRAY_SUPPORT?n.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=i(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,A){return a(null,t,e,A)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,A){return l(null,t,e,A)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,A){if(!t.isBuffer(e)||!t.isBuffer(A))throw new TypeError("Arguments must be Buffers");if(e===A)return 0;for(var n=e.length,o=A.length,i=0,r=Math.min(n,o);i0&&(t=this.toString("hex",0,A).match(/.{2}/g).join(" "),this.length>A&&(t+=" ... ")),""},t.prototype.compare=function(e,A,n,o,i){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===A&&(A=0),void 0===n&&(n=e?e.length:0),void 0===o&&(o=0),void 0===i&&(i=this.length),A<0||n>e.length||o<0||i>this.length)throw new RangeError("out of range index");if(o>=i&&A>=n)return 0;if(o>=i)return-1;if(A>=n)return 1;if(A>>>=0,n>>>=0,o>>>=0,i>>>=0,this===e)return 0;for(var r=i-o,a=n-A,s=Math.min(r,a),l=this.slice(o,i),c=e.slice(A,n),g=0;go)&&(A=o),t.length>0&&(A<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var i=!1;;)switch(n){case"hex":return w(this,t,e,A);case"utf8":case"utf-8":return C(this,t,e,A);case"ascii":return y(this,t,e,A);case"latin1":case"binary":return D(this,t,e,A);case"base64":return x(this,t,e,A);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,t,e,A);default:if(i)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),i=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,A){var n=this.length;e=~~e,A=void 0===A?n:~~A,e<0?(e+=n,e<0&&(e=0)):e>n&&(e=n),A<0?(A+=n,A<0&&(A=0)):A>n&&(A=n),A0&&(o*=256);)n+=this[t+--e]*o;return n},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=this[t],o=1,i=0;++i=o&&(n-=Math.pow(2,8*e)),n},t.prototype.readIntBE=function(t,e,A){t|=0,e|=0,A||U(t,e,this.length);for(var n=e,o=1,i=this[t+--n];n>0&&(o*=256);)i+=this[t+--n]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*e)),i},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var A=this[t]|this[t+1]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var A=this[t+1]|this[t]<<8;return 32768&A?4294901760|A:A},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,A,n){if(t=+t,e|=0,A|=0,!n){var o=Math.pow(2,8*A)-1;z(this,t,e,A,o,0)}var i=1,r=0;for(this[e]=255&t;++r=0&&(r*=256);)this[e+i]=t/r&255;return e+A},t.prototype.writeUInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[A]=255&e,A+1},t.prototype.writeUInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeUInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeUInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A+3]=e>>>24,this[A+2]=e>>>16,this[A+1]=e>>>8,this[A]=255&e):k(this,e,A,!0),A+4},t.prototype.writeUInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeIntLE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var i=0,r=1,a=0;for(this[e]=255&t;++i>0)-a&255;return e+A},t.prototype.writeIntBE=function(t,e,A,n){if(t=+t,e|=0,!n){var o=Math.pow(2,8*A-1);z(this,t,e,A,o-1,-o)}var i=A-1,r=1,a=0;for(this[e+i]=255&t;--i>=0&&(r*=256);)t<0&&0===a&&0!==this[e+i+1]&&(a=1),this[e+i]=(t/r>>0)-a&255;return e+A},t.prototype.writeInt8=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[A]=255&e,A+1},t.prototype.writeInt16LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8):Y(this,e,A,!0),A+2},t.prototype.writeInt16BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>8,this[A+1]=255&e):Y(this,e,A,!1),A+2},t.prototype.writeInt32LE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[A]=255&e,this[A+1]=e>>>8,this[A+2]=e>>>16,this[A+3]=e>>>24):k(this,e,A,!0),A+4},t.prototype.writeInt32BE=function(e,A,n){return e=+e,A|=0,n||z(this,e,A,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[A]=e>>>24,this[A+1]=e>>>16,this[A+2]=e>>>8,this[A+3]=255&e):k(this,e,A,!1),A+4},t.prototype.writeFloatLE=function(t,e,A){return R(this,t,e,!0,A)},t.prototype.writeFloatBE=function(t,e,A){return R(this,t,e,!1,A)},t.prototype.writeDoubleLE=function(t,e,A){return O(this,t,e,!0,A)},t.prototype.writeDoubleBE=function(t,e,A){return O(this,t,e,!1,A)},t.prototype.copy=function(e,A,n,o){if(n||(n=0),o||0===o||(o=this.length),A>=e.length&&(A=e.length),A||(A=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-A=0;--i)e[i+A]=this[i+n];else if(r<1e3||!t.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var r;if("number"==typeof e)for(r=A;r0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function n(t){return 3*t.length/4-A(t)}function o(t){var e,n,o,i,r,a,s=t.length;r=A(t),a=new c(3*s/4-r),o=r>0?s-4:s;var g=0;for(e=0,n=0;e>16&255,a[g++]=i>>8&255,a[g++]=255&i;return 2===r?(i=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[g++]=255&i):1===r&&(i=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[g++]=i>>8&255,a[g++]=255&i),a}function i(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function r(t,e,A){for(var n,o=[],r=e;rc?c:l+a));return 1===n?(e=t[A-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===n&&(e=(t[A-2]<<8)+t[A-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),i.push(o),i.join("")}e.byteLength=n,e.toByteArray=o,e.fromByteArray=a;for(var s=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,M=g.length;u>1,c=-7,g=A?o-1:0,u=A?-1:1,M=t[e+g];for(g+=u,i=M&(1<<-c)-1,M>>=-c,c+=a;c>0;i=256*i+t[e+g],g+=u,c-=8);for(r=i&(1<<-c)-1,i>>=-c,c+=n;c>0;r=256*r+t[e+g],g+=u,c-=8);if(0===i)i=1-l;else{if(i===s)return r?NaN:(M?-1:1)*(1/0);r+=Math.pow(2,n),i-=l}return(M?-1:1)*r*Math.pow(2,i-n)},e.write=function(t,e,A,n,o,i){var r,a,s,l=8*i-o-1,c=(1<>1,u=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:i-1,d=n?1:-1,I=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,r=c):(r=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-r))<1&&(r--,s*=2),e+=r+g>=1?u/s:u*Math.pow(2,1-g),e*s>=2&&(r++,s/=2),r+g>=c?(a=0,r=c):r+g>=1?(a=(e*s-1)*Math.pow(2,o),r+=g):(a=e*Math.pow(2,g-1)*Math.pow(2,o),r=0));o>=8;t[A+M]=255&a,M+=d,a/=256,o-=8);for(r=r<0;t[A+M]=255&r,M+=d,r/=256,l-=8);t[A+M-d]|=128*I}},function(t,e){var A={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==A.call(t)}},function(t,e,A){(function(t){function n(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var A in t)e(t[A],A)}var i=A(285);e.createHash=A(287),e.createHmac=A(299),e.randomBytes=function(e,A){if(!A||!A.call)return new t(i(e));try{A.call(this,void 0,new t(i(e)))}catch(t){A(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var r=A(300)(e);e.pbkdf2=r.pbkdf2,e.pbkdf2Sync=r.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){n("sorry,",t,"is not implemented yet")}})}).call(e,A(280).Buffer)},function(t,e,A){(function(e,n){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||A(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new n(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),A(280).Buffer)},function(t,e){},function(t,e,A){(function(e){function n(t){return function(){var A=[],n={update:function(t,n){return e.isBuffer(t)||(t=new e(t,n)),A.push(t),this},digest:function(n){var o=e.concat(A),i=t(o);return A=null,n?i.toString(n):i}};return n}}var o=A(288),i=n(A(296)),r=n(A(298));t.exports=function(t){return"md5"===t?new i:"rmd160"===t?new r:o(t)}}).call(e,A(280).Buffer)},function(t,e,A){var e=t.exports=function(t){var A=e[t];if(!A)throw new Error(t+" is not supported (we accept pull requests)");return new A},n=A(280).Buffer,o=A(289)(n);e.sha1=A(290)(n,o),e.sha256=A(294)(n,o),e.sha512=A(295)(n,o)},function(t,e){t.exports=function(t){function e(e,A){this._block=new t(e),this._finalSize=A,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,A){"string"==typeof e&&(A=A||"utf8",e=new t(e,A));for(var n=this._len+=e.length,o=this._s=this._s||0,i=0,r=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var A=this._update(this._block)||this._hash();return t?A.toString(t):A},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){return d.length?d.pop().init():this instanceof A?(this._w=M,e.call(this,64,56),this._h=null,void this.init()):new A}function o(t,e,A,n){return t<20?e&A|~e&n:t<40?e^A^n:t<60?e&A|e&n|A&n:e^A^n}function i(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function r(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,l=4,c=8,g=12,u=16,M=new("undefined"==typeof Int32Array?Array:Int32Array)(80),d=[];return n(A,e),A.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},A.prototype._POOL=d,A.prototype._update=function(t){var e,A,n,s,l,c,g,u,M,d;e=c=this._a,A=g=this._b,n=u=this._c,s=M=this._d,l=d=this._e;for(var I=this._w,h=0;h<80;h++){var p=I[h]=h<16?t.readInt32BE(4*h):a(I[h-3]^I[h-8]^I[h-14]^I[h-16],1),T=r(r(a(e,5),o(h,A,n,s)),r(r(l,p),i(h)));l=s,s=n,n=a(A,30),A=e,e=T}this._a=r(e,c),this._b=r(A,g),this._c=r(n,u),this._d=r(s,M),this._e=r(l,d)},A.prototype._hash=function(){d.length<100&&d.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,l),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,g),e.writeInt32BE(0|this._e,u),e},A}},function(t,e,A){(function(t,n){function o(t,A){var n={seen:[],stylize:r};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),I(A)?n.showHidden=A:A&&e._extend(n,A),f(n.showHidden)&&(n.showHidden=!1),f(n.depth)&&(n.depth=2),f(n.colors)&&(n.colors=!1),f(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=i),s(n,t,n.depth)}function i(t,e){var A=o.styles[e];return A?"["+o.colors[A][0]+"m"+t+"["+o.colors[A][1]+"m":t}function r(t,e){return t}function a(t){var e={};return t.forEach(function(t,A){e[t]=!0}),e}function s(t,A,n){if(t.customInspect&&A&&x(A.inspect)&&A.inspect!==e.inspect&&(!A.constructor||A.constructor.prototype!==A)){var o=A.inspect(n,t);return E(o)||(o=s(t,o,n)),o}var i=l(t,A);if(i)return i;var r=Object.keys(A),I=a(r);if(t.showHidden&&(r=Object.getOwnPropertyNames(A)),D(A)&&(r.indexOf("message")>=0||r.indexOf("description")>=0))return c(A);if(0===r.length){if(x(A)){var h=A.name?": "+A.name:"";return t.stylize("[Function"+h+"]","special")}if(w(A))return t.stylize(RegExp.prototype.toString.call(A),"regexp");if(y(A))return t.stylize(Date.prototype.toString.call(A),"date");if(D(A))return c(A)}var p="",T=!1,N=["{","}"];if(d(A)&&(T=!0,N=["[","]"]),x(A)){var f=A.name?": "+A.name:"";p=" [Function"+f+"]"}if(w(A)&&(p=" "+RegExp.prototype.toString.call(A)),y(A)&&(p=" "+Date.prototype.toUTCString.call(A)),D(A)&&(p=" "+c(A)),0===r.length&&(!T||0==A.length))return N[0]+p+N[1];if(n<0)return w(A)?t.stylize(RegExp.prototype.toString.call(A),"regexp"):t.stylize("[Object]","special");t.seen.push(A);var C;return C=T?g(t,A,n,I,r):r.map(function(e){return u(t,A,n,I,e,T)}),t.seen.pop(),M(C,p,N)}function l(t,e){if(f(e))return t.stylize("undefined","undefined");if(E(e)){var A="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(A,"string")}return T(e)?t.stylize(""+e,"number"):I(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function g(t,e,A,n,o){for(var i=[],r=0,a=e.length;r-1&&(a=i?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),f(r)){if(i&&o.match(/^\d+$/))return a;r=JSON.stringify(""+o),r.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(r=r.substr(1,r.length-2),r=t.stylize(r,"name")):(r=r.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),r=t.stylize(r,"string"))}return r+": "+a}function M(t,e,A){var n=0,o=t.reduce(function(t,e){return n++,e.indexOf("\n")>=0&&n++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?A[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+A[1]:A[0]+e+" "+t.join(", ")+" "+A[1]}function d(t){return Array.isArray(t)}function I(t){return"boolean"==typeof t}function h(t){return null===t}function p(t){return null==t}function T(t){return"number"==typeof t}function E(t){return"string"==typeof t}function N(t){return"symbol"==typeof t}function f(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===L(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===L(t)}function D(t){return C(t)&&("[object Error]"===L(t)||t instanceof Error)}function x(t){return"function"==typeof t}function B(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function L(t){return Object.prototype.toString.call(t)}function b(t){return t<10?"0"+t.toString(10):t.toString(10)}function Q(){var t=new Date,e=[b(t.getHours()),b(t.getMinutes()),b(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function m(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;e.format=function(t){if(!E(t)){for(var e=[],A=0;A=i)return t;switch(t){case"%s":return String(n[A++]);case"%d":return Number(n[A++]);case"%j":try{return JSON.stringify(n[A++])}catch(t){return"[Circular]"}default:return t}}),a=n[A];A>>e|t<<32-e}function i(t,e){return t>>>e}function r(t,e,A){return t&e^~t&A}function a(t,e,A){return t&e^t&A^e&A}function s(t){return o(t,2)^o(t,13)^o(t,22)}function l(t){return o(t,6)^o(t,11)^o(t,25)}function c(t){return o(t,7)^o(t,18)^i(t,3)}function g(t){return o(t,17)^o(t,19)^i(t,10)}var u=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],M=new Array(64);return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,o,i,M,d,I,h,p,T=this._w;e=0|this._a,A=0|this._b,n=0|this._c,o=0|this._d,i=0|this._e,M=0|this._f,d=0|this._g,I=0|this._h;for(var E=0;E<64;E++){var N=T[E]=E<16?t.readInt32BE(4*E):g(T[E-2])+T[E-7]+c(T[E-15])+T[E-16];h=I+l(i)+r(i,M,d)+u[E]+N,p=s(e)+a(e,A,n),I=d,d=M,M=i,i=o+h,o=n,n=A,A=e,e=h+p}this._a=e+this._a|0,this._b=A+this._b|0,this._c=n+this._c|0,this._d=o+this._d|0,this._e=i+this._e|0,this._f=M+this._f|0,this._g=d+this._g|0,this._h=I+this._h|0},A.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},A}},function(t,e,A){var n=A(291).inherits;t.exports=function(t,e){function A(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,A){return t>>>A|e<<32-A}function i(t,e,A){return t&e^~t&A}function r(t,e,A){return t&e^t&A^e&A}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return n(A,e),A.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},A.prototype._update=function(t){var e,A,n,s,l,c,g,u,M,d,I,h,p,T,E,N,f=this._w;e=0|this._a,A=0|this._b,n=0|this._c,s=0|this._d,l=0|this._e,c=0|this._f,g=0|this._g,u=0|this._h,M=0|this._al,d=0|this._bl,I=0|this._cl,h=0|this._dl,p=0|this._el,T=0|this._fl,E=0|this._gl,N=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=f[D]=t.readInt32BE(4*D),y=f[D+1]=t.readInt32BE(4*D+4);else{var x=f[D-30],B=f[D-30+1],L=o(x,B,1)^o(x,B,8)^x>>>7,b=o(B,x,1)^o(B,x,8)^o(B,x,7);x=f[D-4],B=f[D-4+1];var Q=o(x,B,19)^o(B,x,29)^x>>>6,m=o(B,x,19)^o(x,B,29)^o(B,x,6),j=f[D-14],S=f[D-14+1],v=f[D-32],U=f[D-32+1];y=b+S,C=L+j+(y>>>0>>0?1:0),y+=m,C=C+Q+(y>>>0>>0?1:0),y+=U,C=C+v+(y>>>0>>0?1:0),f[D]=C,f[D+1]=y}var z=r(e,A,n),Y=r(M,d,I),k=o(e,M,28)^o(M,e,2)^o(M,e,7),F=o(M,e,28)^o(e,M,2)^o(e,M,7),R=o(l,p,14)^o(l,p,18)^o(p,l,9),O=o(p,l,14)^o(p,l,18)^o(l,p,9),H=a[D],V=a[D+1],G=i(l,c,g),P=i(p,T,E),X=N+O,W=u+R+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=V,W=W+H+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=F+Y,Z=k+z+(J>>>0>>0?1:0);u=g,N=E,g=c,E=T,c=l,T=p,p=h+X|0,l=s+W+(p>>>0>>0?1:0)|0,s=n,h=I,n=A,I=d,A=e,d=M,M=X+J|0,e=W+Z+(M>>>0>>0?1:0)|0}this._al=this._al+M|0,this._bl=this._bl+d|0,this._cl=this._cl+I|0,this._dl=this._dl+h|0,this._el=this._el+p|0,this._fl=this._fl+T|0,this._gl=this._gl+E|0,this._hl=this._hl+N|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+A+(this._bl>>>0>>0?1:0)|0,this._c=this._c+n+(this._cl>>>0>>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+l+(this._el>>>0

    >>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+g+(this._gl>>>0>>0?1:0)|0,this._h=this._h+u+(this._hl>>>0>>0?1:0)|0},A.prototype._hash=function(){function e(t,e,n){A.writeInt32BE(t,n),A.writeInt32BE(e,n+4)}var A=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),A},A}},function(t,e,A){function n(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var A=1732584193,n=-271733879,o=-1732584194,c=271733878,g=0;g>16)+(e>>16)+(A>>16);return n<<16|65535&A}function c(t,e){return t<>>32-e}var g=A(297);t.exports=function(t){return g.hash(t,n,16)}},function(t,e,A){(function(e){function A(t,A){if(t.length%i!==0){var n=t.length+(i-t.length%i);t=e.concat([t,r],n)}for(var o=[],a=A?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var A=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var n=I(t),o=8*t.length,i=8*t.length;n[o>>>5]|=128<<24-o%32,n[(o+64>>>9<<4)+14]=16711935&(i<<8|i>>>24)|4278255360&(i<<24|i>>>8);for(var r=0;r>>24)|4278255360&(a<<24|a>>>8)}var s=h(A);return new e(s)}t.exports=s;var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],u=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],M=[0,1518500249,1859775393,2400959708,2840853838],d=[1352829926,1548603684,1836072691,2053994217,0],I=function(t){for(var e=[],A=0,n=0;A>>5]|=t[A]<<24-n%32;return e},h=function(t){for(var e=[],A=0;A<32*t.length;A+=8)e.push(t[A>>>5]>>>24-A%32&255);return e},p=function(t,e,s){for(var I=0;I<16;I++){var h=s+I,p=e[h];e[h]=16711935&(p<<8|p>>>24)|4278255360&(p<<24|p>>>8)}var T,E,N,f,w,C,y,D,x,B;C=T=t[0],y=E=t[1],D=N=t[2],x=f=t[3],B=w=t[4];for(var L,I=0;I<80;I+=1)L=T+e[s+l[I]]|0,L+=I<16?A(E,N,f)+M[0]:I<32?n(E,N,f)+M[1]:I<48?o(E,N,f)+M[2]:I<64?i(E,N,f)+M[3]:r(E,N,f)+M[4],L|=0,L=a(L,g[I]),L=L+w|0,T=w,w=f,f=a(N,10),N=E,E=L,L=C+e[s+c[I]]|0,L+=I<16?r(y,D,x)+d[0]:I<32?i(y,D,x)+d[1]:I<48?o(y,D,x)+d[2]:I<64?n(y,D,x)+d[3]:A(y,D,x)+d[4],L|=0,L=a(L,u[I]),L=L+B|0,C=B,B=x,x=a(D,10),D=y,y=L;L=t[1]+N+x|0,t[1]=t[2]+f+B|0,t[2]=t[3]+w+C|0,t[3]=t[4]+T+y|0,t[4]=t[0]+E+D|0,t[0]=L}}).call(e,A(280).Buffer)},function(t,e,A){(function(e){function n(t,A){if(!(this instanceof n))return new n(t,A);this._opad=s,this._alg=t;var r="sha512"===t?128:64;A=this._key=e.isBuffer(A)?A:new e(A),A.length>r?A=o(t).update(A).digest():A.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");d.copy(l,0,0,a);for(var I=1;I0&&void 0!==arguments[0]?arguments[0]:{};return{masterData:t.master.masterData||[],slaveData:t.slave.slaveData||[]}}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var A=0;A0&&void 0!==arguments[0]?arguments[0]:{};return $(".detailPart").show(),e.readProject?($(".filePermissionConfig").show(),$("input[name='readProject'][value='true']").prop("checked",!0),t(e.readPackage,"Package"),t(e.readVariableFile,"VariableFile"),t(e.readParameterFile,"ParameterFile"),t(e.readConstantFile,"ConstantFile"),t(e.readActionFile,"ActionFile"),t(e.readRuleFile,"RuleFile"),t(e.readDecisionTableFile,"DecisionTableFile"),t(e.readDecisionTreeFile,"DecisionTreeFile"),t(e.readScorecardFile,"ScorecardFile"),void t(e.readFlowFile,"FlowFile")):($("input[name='readProject'][value='false']").prop("checked",!0),void $(".filePermissionConfig").hide())}},{key:"permissionChange",value:function(t,e){this.currentProject[t]=e,this.refreshDetail(this.currentProject)}},{key:"render",value:function(){var t=this,e=this.props,A=e.dispatch,n=e.masterData,o=e.slaveData,i=[{id:"master-username",name:"username",label:"用户名",filterable:!0,width:"200px"}],r=[{id:"slave-project",name:"project",label:"项目名称",width:"200px"}];return g.default.createElement("div",null,g.default.createElement(h.default,{orientation:"vertical",position:"20%"},g.default.createElement("div",null,g.default.createElement("div",{style:{margin:"2px"}},g.default.createElement("div",{className:"btn-group",style:{margin:"2px"}},g.default.createElement("button",{className:"btn btn-danger",type:"button",onClick:function(){T.save(n)}},g.default.createElement("i",{className:"rf rf-save"})," 保存"))),g.default.createElement(d.default,{headers:i,dispatch:A,rows:n,rowClick:function(t){$(".detailPart").hide(),A(T.loadSlave(t))}})),g.default.createElement("div",null,g.default.createElement("div",{className:"row",style:{marginRight:"0"}},g.default.createElement("div",{className:"col-sm-4",style:{marginTop:"45px"}},g.default.createElement(d.default,{headers:r,uniqueKey:!0,dispatch:A,rows:o||[],rowClick:function(e){t.currentProject=e,t.refreshDetail(e)}})),g.default.createElement("div",{className:"col-sm-8 detailPart",style:{marginTop:"40px",display:"none",paddingLeft:0}},g.default.createElement("div",{className:"panel panel-default",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看当前项目"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readProject",value:"true",onChange:this.permissionChange.bind(this,"readProject",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readProject",value:"false",onChange:this.permissionChange.bind(this,"readProject",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看知识包"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readPackage",value:"true",onChange:this.permissionChange.bind(this,"readPackage",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readPackage",value:"false",onChange:this.permissionChange.bind(this,"readPackage",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writePackageConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改知识包"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writePackage",value:"true",onChange:this.permissionChange.bind(this,"writePackage",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writePackage",value:"false",onChange:this.permissionChange.bind(this,"writePackage",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看变量库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readVariableFile",value:"true",onChange:this.permissionChange.bind(this,"readVariableFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readVariableFile",value:"false",onChange:this.permissionChange.bind(this,"readVariableFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeVariableFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改变量库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeVariableFile",value:"true",onChange:this.permissionChange.bind(this,"writeVariableFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeVariableFile",value:"false",onChange:this.permissionChange.bind(this,"writeVariableFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看参数库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readParameterFile",value:"true",onChange:this.permissionChange.bind(this,"readParameterFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readParameterFile",value:"false",onChange:this.permissionChange.bind(this,"readParameterFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeParameterFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改参数库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeParameterFile",value:"true",onChange:this.permissionChange.bind(this,"writeParameterFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeParameterFile",value:"false",onChange:this.permissionChange.bind(this,"writeParameterFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看常量库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readConstantFile",value:"true",onChange:this.permissionChange.bind(this,"readConstantFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readConstantFile",value:"false",onChange:this.permissionChange.bind(this,"readConstantFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeConstantFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改常量库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeConstantFile",value:"true",onChange:this.permissionChange.bind(this,"writeConstantFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeConstantFile",value:"false",onChange:this.permissionChange.bind(this,"writeConstantFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看动作库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readActionFile",value:"true",onChange:this.permissionChange.bind(this,"readActionFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readActionFile",value:"false",onChange:this.permissionChange.bind(this,"readActionFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeActionFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改动作库文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeActionFile",value:"true",onChange:this.permissionChange.bind(this,"writeActionFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeActionFile",value:"false",onChange:this.permissionChange.bind(this,"writeActionFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看规则集文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readRuleFile",value:"true",onChange:this.permissionChange.bind(this,"readRuleFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readRuleFile",value:"false",onChange:this.permissionChange.bind(this,"readRuleFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeRuleFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改规则集文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeRuleFile",value:"true",onChange:this.permissionChange.bind(this,"writeRuleFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeRuleFile",value:"false",onChange:this.permissionChange.bind(this,"writeRuleFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看决策表文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readDecisionTableFile",value:"true",onChange:this.permissionChange.bind(this,"readDecisionTableFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readDecisionTableFile",value:"false",onChange:this.permissionChange.bind(this,"readDecisionTableFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeDecisionTableFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改决策表文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeDecisionTableFile",value:"true",onChange:this.permissionChange.bind(this,"writeDecisionTableFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeDecisionTableFile",value:"false",onChange:this.permissionChange.bind(this,"writeDecisionTableFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看决策树文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readDecisionTreeFile",value:"true",onChange:this.permissionChange.bind(this,"readDecisionTreeFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readDecisionTreeFile",value:"false",onChange:this.permissionChange.bind(this,"readDecisionTreeFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeDecisionTreeFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改决策树文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeDecisionTreeFile",value:"true",onChange:this.permissionChange.bind(this,"writeDecisionTreeFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeDecisionTreeFile",value:"false",onChange:this.permissionChange.bind(this,"writeDecisionTreeFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看评分卡文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readScorecardFile",value:"true",onChange:this.permissionChange.bind(this,"readScorecardFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readScorecardFile",value:"false",onChange:this.permissionChange.bind(this,"readScorecardFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeScorecardFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{ +className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改评分卡文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeScorecardFile",value:"true",onChange:this.permissionChange.bind(this,"writeScorecardFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeScorecardFile",value:"false",onChange:this.permissionChange.bind(this,"writeScorecardFile",!1),defaultChecked:"true"})," 否")))),g.default.createElement("div",{className:"panel panel-default filePermissionConfig",style:{padding:"5px",margin:"5px",width:"350px",lineHeight:"30px"}},g.default.createElement("div",{className:"row"},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许查看决策流文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readFlowFile",value:"true",onChange:this.permissionChange.bind(this,"readFlowFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"readFlowFile",value:"false",onChange:this.permissionChange.bind(this,"readFlowFile",!1),defaultChecked:"true"})," 否"))),g.default.createElement("div",{className:"row writeFlowFileConfig well",style:{padding:"0",marginBottom:"0"}},g.default.createElement("div",{className:"col-sm-7",style:{textAlign:"right"}},"是否允许修改决策流文件"),g.default.createElement("div",{className:"col-sm-5"},g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeFlowFile",value:"true",onChange:this.permissionChange.bind(this,"writeFlowFile",!0),defaultChecked:"false"})," 是"),g.default.createElement("label",{className:"checkbox-inline"},g.default.createElement("input",{type:"radio",name:"writeFlowFile",value:"false",onChange:this.permissionChange.bind(this,"writeFlowFile",!1),defaultChecked:"true"})," 否")))))))))}}]),e}(c.Component);e.default=(0,u.connect)(s)(E)},function(t,e){"use strict";function A(){return function(t){var e=window._server+"/permission/loadResourceSecurityConfigs";$.ajax({url:e,success:function(e){t({type:i,data:e})},error:function(t){t&&t.responseText?bootbox.alert("加载权限信息失败,服务端错误:"+t.responseText+""):bootbox.alert("加载权限信息失败,服务端出错")}})}}function n(t){return function(e){return e({type:r,data:t.projectConfigs})}}function o(t){var e='',A=!0,n=!1,o=void 0;try{for(var i,r=t[Symbol.iterator]();!(A=(i=r.next()).done);A=!0){var a=i.value;e+='';var s=a.projectConfigs||[],l=!0,c=!1,g=void 0;try{for(var u,M=s[Symbol.iterator]();!(l=(u=M.next()).done);l=!0){var d=u.value;d.project&&d.readProject&&(e+='')}}catch(t){c=!0,g=t}finally{try{!l&&M.return&&M.return()}finally{if(c)throw g}}e+=""}}catch(t){n=!0,o=t}finally{try{!A&&r.return&&r.return()}finally{if(n)throw o}}e+="";var I=window._server+"/permission/saveResourceSecurityConfigs";$.ajax({url:I,type:"POST",data:{content:e},success:function(){bootbox.alert("保存成功")},error:function(t){401===t.status?bootbox.alert("权限不足,不能进行此操作."):t&&t.responseText?bootbox.alert("服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}Object.defineProperty(e,"__esModule",{value:!0}),e.loadMasterData=A,e.loadSlave=n,e.save=o;var i=e.MASTER_LOADED="master_loaded",r=e.SLAVE_LOADED="slave_loaded";e.PERMISSION_CHANGE="permission_change"},function(t,e,A){"use strict";function n(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A]);return e.default=t,e}function o(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case a.MASTER_LOADED:return Object.assign({},t.prototype,{masterData:e.data});default:return t}}function i(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments[1];switch(e.type){case a.SLAVE_LOADED:return Object.assign({},t.prototype,{slaveData:e.data});case a.PERMISSION_CHANGE:var A=e.data;switch(e.prop){case"readProject":A.readProject=e.permission}return Object.assign({},t.prototype,{slaveData:t.slaveData});default:return t}}Object.defineProperty(e,"__esModule",{value:!0});var r=A(471),a=n(r),s=A(183);e.default=(0,s.combineReducers)({master:o,slave:i})}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/ruleSetEditor.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/ruleSetEditor.bundle.js new file mode 100644 index 0000000..b18c2dc --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/ruleSetEditor.bundle.js @@ -0,0 +1,24 @@ +!function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}n(1),n(473),n(319),n(321),n(10),n(326),n(323),n(329),n(328),n(330),n(327),n(331),n(347),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(340),n(341),n(342),n(343),n(346),n(344),n(345),n(475),n(476),n(477),n(478),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(381),n(479),n(368),n(480);var o=n(370),r=i(o),A=n(14),a=i(A),s=n(41),l=i(s);$(document).ready(function(){var t=$("#container");t.urule();var e=$("

    ");t.append(e),l.default.render(a.default.createElement(r.default,null),e[0])})},function(t,e,n){var i=n(2);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&T.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function l(t,e){var n,i,o;if(e.singleton){var r=f++;n=I||(I=a(e)),i=c.bind(null,n,r,!1),o=c.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(e),i=g.bind(null,n),o=function(){A(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),i=u.bind(null,n),o=function(){A(n)});return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function c(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=E(e,o);else{var r=document.createTextNode(o),A=t.childNodes;A[e]&&t.removeChild(A[e]),A.length?t.insertBefore(r,A[e]):t.appendChild(r)}}function u(t,e){var n=e.css,i=e.media;if(i&&t.setAttribute("media",i),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,i=e.sourceMap;i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var o=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(o),r&&URL.revokeObjectURL(r)}var d={},M=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=M(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=M(function(){return document.head||document.getElementsByTagName("head")[0]}),I=null,f=0,T=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return i(n,e),function(t){for(var r=[],A=0;A1){for(var h=Array(p),I=0;I1){for(var T=Array(f),E=0;E>"),b={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:a(),arrayOf:s,element:l(),instanceOf:c,node:M(),objectOf:g,oneOf:u,oneOfType:d,shape:p};o.prototype=Error.prototype,t.exports=b},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function i(t){return r.isValidElement(t)?void 0:o("143"),t}var o=n(19),r=n(21);n(20);t.exports=i},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var i=n(43),o=n(48),r=n(174),A=n(71),a=n(68),s=n(179),l=n(180),c=n(181),u=n(182);n(56);o.inject();var g={findDOMNode:l,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:i.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?i.getNodeFromInstance(t):null}},Mount:r,Reconciler:A});t.exports=g},function(t,e,n){"use strict";function i(t){for(var e;e=t._renderedComponent;)t=e;return t}function o(t,e){var n=i(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function A(t,e){if(!(t._flags&M.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var A in n)if(n.hasOwnProperty(A)){var a=n[A],s=i(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(d)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){o(a,r);continue t}c("32",s)}}t._flags|=M.hasCachedChildNodes}}function a(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,i;t&&(i=t[p]);t=e.pop())n=i,e.length&&A(i,t);return n}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())A(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),g=n(47),d=(n(46),u.ID_ATTRIBUTE_NAME),M=g,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),h={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:A,precacheNode:o,uncacheNode:r};t.exports=h},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,i=0;i8&&N<=11),y=32,x=String.fromCharCode(y),D={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},b=!1,m=null,B={eventTypes:D,extractEvents:function(t,e,n,i){return[l(t,e,n,i),g(t,e,n,i)]}};t.exports=B},function(t,e,n){"use strict";function i(t,e,n){var i=e.dispatchConfig.phasedRegistrationNames[n];return I(t,i)}function o(t,e,n){var o=i(t,n,e);o&&(n._dispatchListeners=p(n._dispatchListeners,o),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&M.traverseTwoPhase(t._targetInst,o,t)}function A(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?M.getParentInstance(e):null;M.traverseTwoPhase(n,o,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var i=n.dispatchConfig.registrationName,o=I(t,i);o&&(n._dispatchListeners=p(n._dispatchListeners,o),n._dispatchInstances=p(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function l(t){h(t,r)}function c(t){h(t,A)}function u(t,e,n,i){M.traverseEnterLeave(n,i,a,t,e)}function g(t){h(t,s)}var d=n(52),M=n(54),p=n(58),h=n(59),I=(n(56),d.getListener),f={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=f},function(t,e,n){"use strict";function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function o(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!i(e));default:return!1}}var r=n(44),A=n(53),a=n(54),s=n(55),l=n(58),c=n(59),u=(n(46),{}),g=null,d=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},M=function(t){return d(t,!0)},p=function(t){return d(t,!1)},h=function(t){return"."+t._rootNodeID},I={injection:{injectEventPluginOrder:A.injectEventPluginOrder,injectEventPluginsByName:A.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var i=h(t),o=u[e]||(u[e]={});o[i]=n;var a=A.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(o(e,t._currentElement.type,t._currentElement.props))return null;var i=h(t);return n&&n[i]},deleteListener:function(t,e){var n=A.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var i=u[e];if(i){var o=h(t);delete i[o]}},deleteAllListeners:function(t){var e=h(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var i=A.registrationNameModules[n];i&&i.willDeleteListener&&i.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,i){for(var o,r=A.plugins,a=0;a-1?void 0:A("96",t),!l.plugins[n]){e.extractEvents?void 0:A("97",t),l.plugins[n]=e;var i=e.eventTypes;for(var r in i)o(i[r],e,r)?void 0:A("98",r,t)}}}function o(t,e,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?A("99",n):void 0,l.eventNameDispatchConfigs[n]=t;var i=t.phasedRegistrationNames;if(i){for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];r(a,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){l.registrationNameModules[t]?A("100",t):void 0,l.registrationNameModules[t]=e,l.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var A=n(44),a=(n(46),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?A("101"):void 0,a=Array.prototype.slice.call(t),i()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];s.hasOwnProperty(n)&&s[n]===o||(s[n]?A("102",n):void 0,s[n]=o,e=!0)}e&&i()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return l.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var i in n)if(n.hasOwnProperty(i)){var o=l.registrationNameModules[n[i]];if(o)return o}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];l.plugins.length=0;var e=l.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var i=l.registrationNameModules;for(var o in i)i.hasOwnProperty(o)&&delete i[o]}};t.exports=l},function(t,e,n){"use strict";function i(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function o(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function A(t,e,n,i){var o=t.type||"unknown-event";t.currentTarget=I.getNodeFromInstance(i),e?p.invokeGuardedCallbackWithCatch(o,n,t):p.invokeGuardedCallback(o,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,i=t._dispatchInstances;if(Array.isArray(n))for(var o=0;o1?1-e:void 0;return this._fallbackText=o.slice(t,a),this._fallbackText}}),r.addPoolingTo(i),t.exports=i},function(t,e,n){"use strict";var i=n(44),o=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var i=n.instancePool.pop();return n.call(i,t,e),i}return new n(t,e)},A=function(t,e,n){var i=this;if(i.instancePool.length){var o=i.instancePool.pop();return i.call(o,t,e,n),o}return new i(t,e,n)},a=function(t,e,n,i){var o=this;if(o.instancePool.length){var r=o.instancePool.pop();return o.call(r,t,e,n,i),r}return new o(t,e,n,i)},s=function(t,e,n,i,o){var r=this;if(r.instancePool.length){var A=r.instancePool.pop();return r.call(A,t,e,n,i,o),A}return new r(t,e,n,i,o)},l=function(t){var e=this;t instanceof e?void 0:i("25"),t.destructor(),e.instancePool.length8));var j=!1;E.canUseDOM&&(j=x("input")&&(!document.documentMode||document.documentMode>11));var U={get:function(){return Q.get.call(this)},set:function(t){L=""+t,Q.set.call(this,t)}},S={eventTypes:b,extractEvents:function(t,e,n,o){var r,A,a=e?N.getNodeFromInstance(e):window;if(i(a)?v?r=s:A=l:D(a)?j?r=d:(r=p,A=M):h(a)&&(r=I),r){var c=r(t,e);if(c){var u=w.getPooled(b.change,c,n,o);return u.type="change",T.accumulateTwoPhaseDispatches(u),u}}A&&A(t,a,e)}};t.exports=S},function(t,e,n){"use strict";function i(){b.ReactReconcileTransaction&&N?void 0:c("123")}function o(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=b.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,o,r,A){return i(),N.batchedUpdates(t,e,n,o,r,A)}function A(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==I.length?c("124",e,I.length):void 0,I.sort(A),f++;for(var n=0;n]/,s=n(91),l=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{i=i||document.createElement("div"),i.innerHTML=""+e+"";for(var n=i.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(o.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),A.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=l},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,i,o){MSApp.execUnsafeLocalFunction(function(){return t(e,n,i,o)})}:t};t.exports=n},function(t,e,n){"use strict";var i=n(60),o=n(93),r=n(90),A=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};i.canUseDOM&&("textContent"in document.documentElement||(A=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,o(e))})),t.exports=A},function(t,e){"use strict";function n(t){var e=""+t,n=o.exec(e);if(!n)return e;var i,r="",A=0,a=0;for(A=n.index;A]/;t.exports=i},function(t,e,n){"use strict";var i=n(44),o=n(88),r=n(60),A=n(95),a=n(57),s=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:i("56"),e?void 0:i("57"),"HTML"===t.nodeName?i("58"):void 0,"string"==typeof e){var n=A(e,a)[0];t.parentNode.replaceChild(n,t)}else o.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";function i(t){var e=t.match(c);return e&&e[1].toLowerCase()}function o(t,e){var n=l;l?void 0:s(!1);var o=i(t),r=o&&a(o);if(r){n.innerHTML=r[1]+t+r[2];for(var c=r[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:s(!1),A(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var r=n(60),A=n(96),a=n(97),s=n(46),l=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=o},function(t,e,n){"use strict";function i(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?A(!1):void 0,"number"!=typeof e?A(!1):void 0,0===e||e-1 in t?void 0:A(!1),"function"==typeof t.callee?A(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),i=0;i":A.innerHTML="<"+t+">",a[t]=!A.firstChild),a[t]?g[t]:null}var o=n(60),r=n(46),A=o.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],l=[1,"","
    "],c=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=i},function(t,e,n){"use strict";var i=n(87),o=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=o.getNodeFromInstance(t);i.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function i(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function o(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&V in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",i(t)):void 0)}function r(t,e,n,i){if(!(i instanceof j)){var o=t._hostContainerInfo,r=o._node&&o._node.nodeType===G,a=r?o._node:o._ownerDocument;Y(e,a),i.getReactMountReady().enqueue(A,{inst:t,registrationName:e,listener:n})}}function A(){var t=this;w.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;m.postMountWrapper(t)}function s(){var t=this;Q.postMountWrapper(t)}function l(){var t=this;B.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:p("63");var e=z(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[x.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in P)P.hasOwnProperty(n)&&t._wrapperState.listeners.push(x.trapBubbledEvent(n,P[n],e));break;case"source":t._wrapperState.listeners=[x.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[x.trapBubbledEvent("topError","error",e),x.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[x.trapBubbledEvent("topReset","reset",e),x.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[x.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){L.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function d(t,e){return t.indexOf("-")>=0||null!=e.is}function M(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),h=n(16),I=n(100),f=n(102),T=n(88),E=n(89),N=n(45),C=n(110),w=n(52),y=n(53),x=n(112),D=n(47),b=n(43),m=n(115),B=n(118),L=n(119),Q=n(120),v=(n(74),n(121)),j=n(141),U=(n(57),n(93)),S=(n(46),n(77),n(130),n(144),n(56),D),k=w.deleteListener,z=b.getNodeFromInstance,Y=x.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",V="__html",H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=h({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;M.displayName="ReactDOMComponent",M.Mixin={mountComponent:function(t,e,n,i){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":m.mountWrapper(this,r,e),r=m.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"option":B.mountWrapper(this,r,e),r=B.getHostProps(this,r);break;case"select":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"textarea":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(c,this)}o(this,r);var A,u;null!=e?(A=e._namespaceURI,u=e._tag):n._tag&&(A=n._namespaceURI,u=n._tag),(null==A||A===E.svg&&"foreignobject"===u)&&(A=E.html),A===E.html&&("svg"===this._tag?A=E.svg:"math"===this._tag&&(A=E.mathml)),this._namespaceURI=A;var g;if(t.useCreateElement){var d,M=n._ownerDocument;if(A===E.html)if("script"===this._tag){var p=M.createElement("div"),h=this._currentElement.type;p.innerHTML="<"+h+">",d=p.removeChild(p.firstChild)}else d=r.is?M.createElement(this._currentElement.type,r.is):M.createElement(this._currentElement.type);else d=M.createElementNS(A,this._currentElement.type);b.precacheNode(this,d),this._flags|=S.hasCachedChildNodes,this._hostParent||C.setAttributeForRoot(d),this._updateDOMProperties(null,r,t);var f=T(d);this._createInitialChildren(t,r,i,f),g=f}else{var N=this._createOpenTagMarkupAndPutListeners(t,r),w=this._createContentMarkup(t,r,i);g=!w&&X[this._tag]?N+"/>":N+">"+w+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(l,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var i in e)if(e.hasOwnProperty(i)){var o=e[i];if(null!=o)if(R.hasOwnProperty(i))o&&r(this,i,o,t);else{i===O&&(o&&(o=this._previousStyleCopy=h({},e.style)),o=f.createMarkupForStyles(o,this));var A=null;null!=this._tag&&d(this._tag,e)?H.hasOwnProperty(i)||(A=C.createMarkupForCustomAttribute(i,o)):A=C.createMarkupForProperty(i,o),A&&(n+=" "+A)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+C.createMarkupForRoot()),n+=" "+C.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var i="",o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&(i=o.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)i=U(r);else if(null!=A){var a=this.mountChildren(A,t,n);i=a.join("")}}return W[this._tag]&&"\n"===i.charAt(0)?"\n"+i:i},_createInitialChildren:function(t,e,n,i){var o=e.dangerouslySetInnerHTML;if(null!=o)null!=o.__html&&T.queueHTML(i,o.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)T.queueText(i,r);else if(null!=A)for(var a=this.mountChildren(A,t,n),s=0;s1)for(var n=1;n0&&i.length<20?n+" (keys: "+i.join(", ")+")":n}function r(t,e){var n=a.get(t);if(!n){return null}return n}var A=n(44),a=(n(22),n(123)),s=(n(74),n(68)),l=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){l.validateCallback(e,n);var o=r(t);return o?(o._pendingCallbacks?o._pendingCallbacks.push(e):o._pendingCallbacks=[e],void i(o)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],i(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,i(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,i(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var o=n._pendingStateQueue||(n._pendingStateQueue=[]);o.push(e),i(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,i(t)},validateCallback:function(t,e){t&&"function"!=typeof t?A("122",e,o(t)):void 0}});t.exports=l},function(t,e,n){"use strict";var i=(n(16),n(57)),o=(n(56),i);t.exports=o},function(t,e,n){"use strict";var i=n(16),o=n(88),r=n(43),A=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};i(A.prototype,{mountComponent:function(t,e,n,i){var A=n._idCounter++;this._domID=A,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=n._ownerDocument,l=s.createComment(a);return r.precacheNode(this,l),o(l)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function i(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var n=0,i=t;i;i=i._hostParent)n++;for(var o=0,r=e;r;r=r._hostParent)o++;for(;n-o>0;)t=t._hostParent,n--;for(;o-n>0;)e=e._hostParent,o--;for(var A=n;A--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function o(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function A(t,e,n){for(var i=[];t;)i.push(t),t=t._hostParent;var o;for(o=i.length;o-- >0;)e(i[o],"captured",n);for(o=0;o0;)n(s[l],"captured",r)}var s=n(44);n(46);t.exports={isAncestor:o,getLowestCommonAncestor:i,getParentInstance:r,traverseTwoPhase:A,traverseEnterLeave:a}},function(t,e,n){"use strict";var i=n(44),o=n(16),r=n(87),A=n(88),a=n(43),s=n(93),l=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});o(l.prototype,{mountComponent:function(t,e,n,i){var o=n._idCounter++,r=" react-text: "+o+" ",l=" /react-text ";if(this._domID=o,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(r),g=c.createComment(l),d=A(c.createDocumentFragment());return A.queueChild(d,A(u)),this._stringText&&A.queueChild(d,A(c.createTextNode(this._stringText))),A.queueChild(d,A(g)),a.precacheNode(this,u),this._closingComment=g,d}var M=s(this._stringText);return t.renderToStaticMarkup?M:""+M+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var i=this.getHostNode();r.replaceDelimitedText(i[0],i[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?i("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=l},function(t,e,n){"use strict";function i(){this.reinitializeTransaction()}var o=n(16),r=n(68),A=n(75),a=n(57),s={initialize:a,close:function(){g.isBatchingUpdates=!1}},l={initialize:a,close:r.flushBatchedUpdates.bind(r)},c=[l,s];o(i.prototype,A,{getTransactionWrappers:function(){return c}});var u=new i,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,i,o,r){var A=g.isBatchingUpdates;return g.isBatchingUpdates=!0,A?t(e,n,i,o,r):u.perform(t,null,e,n,i,o,r)}};t.exports=g},function(t,e,n){"use strict";function i(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function o(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=d(t.nativeEvent),n=u.getClosestInstanceFromNode(e),o=n;do t.ancestors.push(o),o=o&&i(o);while(o);for(var r=0;re.end?(n=e.end,i=e.start):(n=e.start,i=e.end),o.moveToElementText(t),o.moveStart("character",n),o.setEndPoint("EndToStart",o),o.moveEnd("character",i-n),o.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),i=t[c()].length,o=Math.min(e.start,i),r=void 0===e.end?o:Math.min(e.end,i);if(!n.extend&&o>r){var A=r;r=o,o=A}var a=l(t,o),s=l(t,r);if(a&&s){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),o>r?(n.addRange(u),n.extend(s.node,s.offset)):(u.setEnd(s.node,s.offset),n.addRange(u))}}}var s=n(60),l=n(156),c=n(63),u=s.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?o:r,setOffsets:u?A:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function i(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function o(t,e){for(var o=n(t),r=0,A=0;o;){if(3===o.nodeType){if(A=r+o.textContent.length,r<=e&&A>=e)return{node:o,offset:e-r};r=A}o=n(i(o))}}t.exports=o},function(t,e,n){"use strict";function i(t,e){return!(!t||!e)&&(t===e||!o(t)&&(o(e)?i(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var o=n(158);t.exports=i},function(t,e,n){"use strict";function i(t){return o(t)&&3==t.nodeType}var o=n(159);t.exports=i},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},i={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},o={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(i).forEach(function(t){o.Properties[t]=0,i[t]&&(o.DOMAttributeNames[t]=i[t])}),t.exports=o},function(t,e,n){"use strict";function i(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function o(t,e){if(f||null==p||p!==c())return null;var n=i(p);if(!I||!g(I,n)){I=n;var o=l.getPooled(M.select,h,t,e);return o.type="select",o.target=p,r.accumulateTwoPhaseDispatches(o),o}return null}var r=n(51),A=n(60),a=n(43),s=n(154),l=n(65),c=n(160),u=n(78),g=n(130),d=A.canUseDOM&&"documentMode"in document&&document.documentMode<=11,M={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,h=null,I=null,f=!1,T=!1,E={eventTypes:M,extractEvents:function(t,e,n,i){if(!T)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,h=e,I=null);break;case"topBlur":p=null,h=null,I=null;break;case"topMouseDown":f=!0;break;case"topContextMenu":case"topMouseUp":return f=!1,o(n,i);case"topSelectionChange":if(d)break;case"topKeyDown":case"topKeyUp":return o(n,i)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(T=!0)}};t.exports=E},function(t,e,n){"use strict";function i(t){return"."+t._rootNodeID}function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),A=n(150),a=n(51),s=n(43),l=n(164),c=n(165),u=n(65),g=n(166),d=n(167),M=n(81),p=n(170),h=n(171),I=n(172),f=n(82),T=n(173),E=n(57),N=n(168),C=(n(46),{}),w={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,i="top"+e,o={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[i]};C[t]=o,w[i]=o});var y={},x={eventTypes:C,extractEvents:function(t,e,n,i){var o=w[t];if(!o)return null;var A;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":A=u;break;case"topKeyPress":if(0===N(n))return null;case"topKeyDown":case"topKeyUp":A=d;break;case"topBlur":case"topFocus":A=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":A=M;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":A=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":A=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":A=l;break;case"topTransitionEnd":A=I;break;case"topScroll":A=f;break;case"topWheel":A=T;break;case"topCopy":case"topCut":case"topPaste":A=c}A?void 0:r("86",t);var s=A.getPooled(o,e,n,i);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,n){if("onClick"===e&&!o(t._tag)){var r=i(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=A.listen(a,"click",E))}},willDeleteListener:function(t,e){if("onClick"===e&&!o(t._tag)){var n=i(t);y[n].remove(),delete y[n]}}};t.exports=x},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(82),r={relatedTarget:null};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(82),r=n(168),A=n(169),a=n(84),s={key:A,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};o.augmentClass(i,s),t.exports=i},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function i(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=o(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?A[t.keyCode]||"Unidentified":""}var o=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(81),r={dataTransfer:null};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(82),r=n(84),A={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};o.augmentClass(i,A),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e,n,i){return o.call(this,t,e,n,i)}var o=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};o.augmentClass(i,r),t.exports=i},function(t,e,n){"use strict";function i(t,e){for(var n=Math.min(t.length,e.length),i=0;i.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var A,a=h.createElement(Y,{child:e});if(t){var s=C.get(t);A=s._processChildContext(s._context)}else A=b;var c=g(n);if(c){var u=c._currentElement,M=u.props.child;if(L(M,e)){var p=c._renderedComponent.getPublicInstance(),I=i&&function(){i.call(p)};return R._updateRootComponent(c,a,A,n,I),p}R.unmountComponentAtNode(n)}var f=o(n),T=f&&!!r(f),E=l(n),N=T&&!c&&!E,w=R._renderNewRootComponent(a,n,N,A)._renderedComponent.getPublicInstance();return i&&i.call(w),w},render:function(t,e,n){return R._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:d("40");var e=g(t);if(!e){l(t),1===t.nodeType&&t.hasAttribute(v);return!1}return delete k[e._instance.rootID],D.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,A){if(c(e)?void 0:d("41"),r){var a=o(e);if(w.canReuseMarkup(t,a))return void f.precacheNode(n,a);var s=a.getAttribute(w.CHECKSUM_ATTR_NAME);a.removeAttribute(w.CHECKSUM_ATTR_NAME);var l=a.outerHTML;a.setAttribute(w.CHECKSUM_ATTR_NAME,s);var u=t,g=i(u,l),p=" (client) "+u.substring(g-20,g+20)+"\n (server) "+l.substring(g-20,g+20);e.nodeType===U?d("42",p):void 0}if(e.nodeType===U?d("43"):void 0,A.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);M.insertTreeBefore(e,t,null)}else B(e,t),f.precacheNode(n,e.firstChild)}};t.exports=R},function(t,e,n){"use strict";function i(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===o?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var o=(n(144),9);t.exports=i},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var i=n(178),o=/\/?>/,r=/^<\!\-\-/,A={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=i(t);return r.test(t)?t:t.replace(o," "+A.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(A.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var o=i(t);return o===n}};t.exports=A},function(t,e){"use strict";function n(t){for(var e=1,n=0,o=0,r=t.length,A=r&-4;o服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var i in n)new RegExp("("+i+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[i]:("00"+n[i]).substr((""+n[i]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=i,e.ajaxSave=o,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(){var t="_ui_"+c++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function A(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=l.default.frameStyle.getRootIcon(),t._style=l.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=l.default.frameStyle.getFolderIcon(),t._style=l.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=l.default.frameStyle.getRuleIcon(),t._style=l.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=l.default.frameStyle.getProjectIcon(),t._style=l.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=l.default.frameStyle.getResourceIcon(),t._style=l.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=l.default.frameStyle.getResourcePackageIcon(),t._style=l.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=l.default.frameStyle.getLibIcon(),t._style=l.default.frameStyle.getLibIconStyle();break;case"action":t._icon=l.default.frameStyle.getActionIcon(),t._style=l.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=l.default.frameStyle.getParameterIcon(),t._style=l.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=l.default.frameStyle.getConstantIcon(),t._style=l.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=l.default.frameStyle.getVariableIcon(),t._style=l.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=l.default.frameStyle.getRuleLibIcon(),t._style=l.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=l.default.frameStyle.getDecisionTableLibIcon(),t._style=l.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=l.default.frameStyle.getDecisionTreeLibIcon(),t._style=l.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=l.default.frameStyle.getFlowLibIcon(),t._style=l.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=l.default.frameStyle.getUlIcon(),t._style=l.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=l.default.frameStyle.getDecisionTableIcon(),t._style=l.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=l.default.frameStyle.getScriptDecisionTableIcon(),t._style=l.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=l.default.frameStyle.getDecisionTreeIcon(),t._style=l.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=l.default.frameStyle.getFlowIcon(),t._style=l.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=l.default.frameStyle.getScorecardIcon(),t._style=l.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=o,e.loadFileVersions=r,e.loadResourceTreeData=A;var s=n(228),l=i(s),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var i={};i.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=i},,,,,,function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?l.show():l.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,i=e.operationConfig,o=e.dispatch,r=e.selectFirst,A=(e.uniqueKey,this.props.rows||[]),a=[],s=[];n.forEach(function(e,n){e.editable?a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label),l.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label)))}),i&&a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:i.width}},l.default.createElement("label",null,"操作列")));var c=l.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?l.default.createElement("td",{key:(0,h.uniqueID)()},l.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):l.default.createElement("td",{key:(0,h.uniqueID)()}," ")}),i?l.default.createElement("td",null):null);s.push(c),A.forEach(function(e,A){e.id||(e.id=(0,h.uniqueID)());var a=e.id;0===A&&r?s.push(l.default.createElement(d.default,{key:a,select:!0,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:i?i.operations:null,rowData:e,rowIndex:A})):s.push(l.default.createElement(d.default,{key:a,ready:t.props.ready,headers:n,dispatch:o,rowClick:t.props.rowClick,operations:i?i.operations:null,rowData:e,rowIndex:A}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return l.default.createElement("table",{className:"table table-bordered",style:u},l.default.createElement("thead",null,l.default.createElement("tr",{className:"well"},a)),l.default.createElement("tbody",null,s))}}]),e}(s.Component);I.propTypes={headers:l.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=I},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var i=e[t];i&&""!==i||(i="{}");var o=JSON.parse(i)||{},r=o.rows||[],A=o.type,a=function(i){var o={type:A,rows:i},r=JSON.stringify(o);e[t]=r;var a=n.find("div");a.html(r)};if(A){var s=null,l=!0,c=!1,u=void 0;try{for(var g,d=simulatorCategoryData[Symbol.iterator]();!(l=(g=d.next()).done);l=!0){var M=g.value;if(A===M.clazz){s=M;break}}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}var h=s.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:h,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,i=!1,o=void 0;try{for(var s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var c=s.value;e.append('")}}catch(t){i=!0,o=t}finally{try{!n&&l.return&&l.return()}finally{if(i)throw o}}e.append(''),I.MsgBox.dialog("选择子对象类型",e,function(){if(A=e.val(),!A||""===A)return void I.MsgBox.alert("请先选择子对象类型!");var n=null,i=!0,o=!1,s=void 0; +try{for(var l,c=t[Symbol.iterator]();!(i=(l=c.next()).done);i=!0){var u=l.value;if(A===u.clazz){n=u;break}}}catch(t){o=!0,s=t}finally{try{!i&&c.return&&c.return()}finally{if(o)throw s}}var g=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:g,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var i=n.find("div");i.html(e[t]),i.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,i=e.header,o=i.dateFormat,r=n[i.name];if(o){var A=new Date(r);r=(0,h.formatDate)(A,o)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:a,onClick:function(e){if(i.editable){var o=e.target;$(o).css({display:"none"}),n._editorType?t._showEditor(i.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:o,rowData:n,colId:i.id})}}},r))}}]),e}(c.Component);e.default=f},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var o=n(240),r=i(o);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function i(t){return"function"==typeof t}function o(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function A(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!o(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,o,a,s,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],A(n))return!1;if(i(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),l=n.slice(),o=l.length,s=0;s0&&this._events[t].length>o&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),o||(o=!0,e.apply(this,arguments))}if(!i(e))throw TypeError("listener must be a function");var o=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,o,A,a;if(!i(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],A=n.length,o=-1,n===e||i(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=A;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){o=a;break}if(o<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(o,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],i(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?i(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(i(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var i=n(242).default,o=n(243).default,r=n(251),A=n(252).default,a=n(302);t.exports={Tool:i,Node:o,MsgBox:r,Event:a,FlowDesigner:A}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var i=this.newNode();return i?(i._tool=this,i._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),i._createFigure(this.context,{x:t,y:e},n),i):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,i=!1,o=void 0;try{for(var r,A=this.context.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){i=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(i)throw o}}return e?this._buildNodeName():t}}]),t}();e.default=o},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);es-c&&as-c&&a>l-c?this.attr("cursor","se-resize"):Al-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},i=function(n){if(!this.dragging){var i=t.currentTool;if(i){if(i instanceof d.default||i instanceof u.default||(t.currentTool=t.selectTool,i=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),i instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var o=!1,r=!0,A=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var g=s.value;if(g===e){o=!0;break}}}catch(t){A=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(A)throw a}}o||(t.resetSelection(),t.selectFigure(e))}if(i instanceof d.default){var M=n.offsetX,h=n.offsetY,I=t.currentConnection;if(I){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");I.endX=M,I.endY=h,I.from!==e?!function(){I.endPath(e),t.currentConnection=null;var n=I.from.uuid,i=e.uuid,o=I.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(i);I=new l.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),I.uuid=o,I.endPath(r)},undo:function(){e.context.removeFigureByUUID(o)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");I=new l.default(e,{endX:M,endY:h}),t.currentConnection=I}}}}};this.rect.mouseover(n),this.rect.mousedown(i),this.icon.mouseover(n),this.icon.mousedown(i);var o=function(){var n=e.rect,i=t.currentTool;if(i&&i instanceof u.default){var o=!1,r=t.selectionFigures,A=!0,a=!1,s=void 0;try{for(var c,g=r[Symbol.iterator]();!(A=(c=g.next()).done);A=!0){var d=c.value;if(d===e){o=!0;break}}}catch(t){a=!0,s=t}finally{try{!A&&g.return&&g.return()}finally{if(a)throw s}}if(!o)return void t.resetSelection();r.forEach(function(t,e){t instanceof l.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,i){var o=t.currentTool;if(o&&o instanceof u.default){e.context.snapto&&(n-=n%10,i-=i%10);var r=t.selectionFigures,A=e.rect,a=(e.icon,A.ox+n),s=A.oy+i;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var c=void 0,g=void 0;switch(this.attr("cursor")){case"nw-resize":c=A.ow-n,g=A.oh-i,c>20&&g>20&&A.attr({x:a,y:s,width:c,height:g});break;case"ne-resize":c=A.ow+n,g=A.oh-i,c>20&&g>20&&A.attr({y:s,width:c,height:g});break;case"se-resize":c=A.ow+n,g=A.oh+i,c>20&&g>20&&A.attr({width:c,height:g});break;case"sw-resize":c=A.ow-n,g=A.oh+i,c>20&&g>20&&A.attr({x:a,width:c,height:g});break;default:r.forEach(function(t,e){t instanceof l.default||t._moveRect(n,i)})}r.forEach(function(t,e){t instanceof l.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},A=function(){e.rect.dragging=!1;var n=[],i=new Map,o=new Map,r=e.rect.ow,A=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),c=e.uuid,u=!0,g=!1,d=void 0;try{for(var M,p=t.selectionFigures[Symbol.iterator]();!(u=(M=p.next()).done);u=!0){var h=M.value;if(!(h instanceof l.default)){n.push(h.uuid);var I=h.rect.ox,f=h.rect.oy;I=I?I:0,f=f?f:0;var T=h.rect.attr("x"),E=h.rect.attr("y");i.set(h.uuid,{x:T,y:E}),o.set(h.uuid,{x:I,y:f})}}}catch(t){g=!0,d=t}finally{try{!u&&p.return&&p.return()}finally{if(g)throw d}}e.context.addRedoUndo({redo:function(){var e=!0,o=!1,r=void 0;try{for(var A,l=n[Symbol.iterator]();!(e=(A=l.next()).done);e=!0){var u=A.value,g=t.getNodeByUUID(u),d=i.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:a,height:s})}}catch(t){o=!0,r=t}finally{try{!e&&l.return&&l.return()}finally{if(o)throw r}}var M=!0,p=!1,h=void 0;try{for(var I,f=n[Symbol.iterator]();!(M=(I=f.next()).done);M=!0){var T=I.value,E=t.getNodeByUUID(T);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&f.return&&f.return()}finally{if(p)throw h}}},undo:function(){var e=!0,i=!1,a=void 0;try{for(var s,l=n[Symbol.iterator]();!(e=(s=l.next()).done);e=!0){var u=s.value,g=t.getNodeByUUID(u),d=o.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:r,height:A})}}catch(t){i=!0,a=t}finally{try{!e&&l.return&&l.return()}finally{if(i)throw a}}var M=!0,p=!1,h=void 0;try{for(var I,f=n[Symbol.iterator]();!(M=(I=f.next()).done);M=!0){var T=I.value,E=t.getNodeByUUID(T);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&f.return&&f.return()}finally{if(p)throw h}}}})};this.rect.drag(r,o,A),this.icon.drag(r,o,A)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,i=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,i=this.rect.oy+e):(n=this.rect.attr("x")+t,i=this.rect.attr("x")+e),this.rect.attr({x:n,y:i})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),i=this.rect.attr("width"),o=this.rect.attr("height");return t&&(e-=5,n-=5,i+=10,o+=10),"M "+e+" "+n+" L "+(e+i)+" "+n+" L "+(e+i)+" "+(n+o)+" L "+e+" "+(n+o)+" L "+e+" "+n}}]),t}();e.default=h},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,i=n.attr("x"),o=n.attr("y"),r=n.attr("width"),A=n.attr("height");i+=r/2,o+=A/2-10;var a=t.x,l=t.y;t=[],t.push(["M",a,l]),t.push(["L",i,o])}var c=this.to.getPathInfo(!0),u=s.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),i=t.attr("width"),o=t.attr("height");e+=i/2,n+=o/2-10;var r=this.endX,A=this.endY,a=0,l=0,c=null;if(this.to){var u=this.to.rect;r=u.attr("x"),A=u.attr("y"),a=u.attr("width"),l=u.attr("height"),r+=a/2,A+=l/2-10}var g=this.from.getPathInfo(!0),d=Math.abs(e+i/2-(r-a/2)),M=Math.abs(n+o/2-(A-l/2)),p="M"+e+" "+n;if(d>=M){var h=p+" L"+r+" "+n,I=s.default.pathIntersection(g,h);if(I.length>0&&(e=I[0].x,n=I[0].y,p="M"+I[0].x+" "+I[0].y),this.to){var f="M"+e+" "+A+" L"+r+" "+A,T=this.to.getPathInfo(!0);I=s.default.pathIntersection(T,f),I.length>0&&(r=I[0].x,A=I[0].y,e0&&(e=w[0].x,n=w[0].y,p="M"+w[0].x+" "+w[0].y),this.to){var y="M"+r+" "+n+" L"+r+" "+A,x=this.to.getPathInfo(!0);w=s.default.pathIntersection(x,y),w.length>0&&(r=w[0].x,A=w[0].y,n=1e3&&delete a[s.shift()],s.push(A),a[A]=t[m](e,r),n?n(a[A]):a[A])}return o}function r(){return this.hex}function A(t,e){for(var n=[],i=0,o=t.length;o-2*!e>i;i+=2){var r=[{x:+t[i-2],y:+t[i-1]},{x:+t[i],y:+t[i+1]},{x:+t[i+2],y:+t[i+3]},{x:+t[i+4],y:+t[i+5]}];e?i?o-4==i?r[3]={x:+t[0],y:+t[1]}:o-2==i&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[o-2],y:+t[o-1]}:o-4==i?r[3]=r[2]:i||(r[0]={x:+t[i],y:+t[i+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function a(t,e,n,i,o){var r=-3*e+9*n-9*i+3*o,A=t*r+6*e-12*n+6*i;return t*A-3*e+3*n}function s(t,e,n,i,o,r,A,s,l){null==l&&(l=1),l=l>1?1:l<0?0:l;for(var c=l/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],M=0,p=0;pM;)g/=2,d+=(cR(o,A)||R(e,i)R(r,a))){var s=(t*i-e*n)*(o-A)-(t-n)*(o*a-r*A),l=(t*i-e*n)*(r-a)-(e-i)*(o*a-r*A),c=(t-n)*(r-a)-(e-i)*(o-A);if(c){var u=s/c,g=l/c,d=+u.toFixed(2),M=+g.toFixed(2);if(!(d<+F(t,n).toFixed(2)||d>+R(t,n).toFixed(2)||d<+F(o,A).toFixed(2)||d>+R(o,A).toFixed(2)||M<+F(e,i).toFixed(2)||M>+R(e,i).toFixed(2)||M<+F(r,a).toFixed(2)||M>+R(r,a).toFixed(2)))return{x:u,y:g}}}}function u(t,n,i){var o=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(o,r))return i?0:[];for(var A=s.apply(0,t),a=s.apply(0,n),l=R(~~(A/5),1),u=R(~~(a/5),1),g=[],d=[],M={},p=i?0:[],h=0;h=0&&D<=1.001&&b>=0&&b<=1.001&&(i?p++:p.push({x:x.x,y:x.y,t1:F(D,1),t2:F(b,1)}))}}return p}function g(t,n,i){t=e._path2curve(t),n=e._path2curve(n);for(var o,r,A,a,s,l,c,g,d,M,p=i?0:[],h=0,I=t.length;hi)return i;for(;nr?n=o:i=o,o=(i-n)/2+n}return o}var l=3*e,c=3*(i-e)-l,u=1-l-c,g=3*n,d=3*(o-n)-g,M=1-g-d;return a(t,1/(200*r))}function h(t,e){var n=[],i={};if(this.ms=e,this.times=1,t){for(var o in t)t[y](o)&&(i[q(o)]=t[o],n.push(q(o)));n.sort(ct)}this.anim=i,this.top=n[n.length-1],this.percents=n}function I(n,i,o,r,A,a){o=q(o);var s,l,c,u,g,M,h=n.ms,I={},f={},T={};if(r)for(C=0,w=re.length;Cr*n.top){o=n.percents[C],g=n.percents[C-1]||0,h=h/n.top*(o-g),u=n.percents[C+1],s=n.anim[o];break}r&&i.attr(n.anim[n.percents[C]])}if(s){if(l)l.initstatus=r,l.start=new Date-l.ms*r;else{for(var x in s)if(s[y](x)&&(nt[y](x)||i.paper.customAttributes[y](x)))switch(I[x]=i.attr(x),null==I[x]&&(I[x]=et[x]),f[x]=s[x],nt[x]){case G:T[x]=(f[x]-I[x])/h;break;case"colour":I[x]=e.getRGB(I[x]);var D=e.getRGB(f[x]);T[x]={r:(D.r-I[x].r)/h,g:(D.g-I[x].g)/h,b:(D.b-I[x].b)/h};break;case"path":var b=Ut(I[x],f[x]),m=b[1];for(I[x]=b[0],T[x]=[],C=0,w=I[x].length;C',ht=It.firstChild,ht.style.behavior="url(#default#VML)",!ht||"object"!=typeof ht.adj)return e.type=Q;It=null}e.svg=!(e.vml="VML"==e.type),e._Paper=b,e.fn=E=b.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=z.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,i,o,r,A){if(null==r){var a=t-i,s=n-o;return a||s?(180+180*Y.atan2(-s,-a)/H+360)%360:0}return e.angle(t,n,r,A)-e.angle(i,o,r,A)},e.rad=function(t){return t%360*H/180},e.deg=function(t){return Math.round(180*t/H%360*1e3)/1e3},e.snapTo=function(t,n,i){if(i=e.is(i,"finite")?i:10,e.is(t,X)){for(var o=t.length;o--;)if(O(t[o]-n)<=i)return t[o]}else{t=+t;var r=n%t;if(rt-i)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,x.win,n),x.win=n,x.doc=x.win.document,e._engine.initWin&&e._engine.initWin(x.win)};var ft=function(t){if(e.vml){var n,i=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var A=n.createTextRange();ft=o(function(t){try{n.style.color=j(t).replace(i,Q);var e=A.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=x.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",x.doc.body.appendChild(a),ft=o(function(t){return a.style.color=t,x.doc.defaultView.getComputedStyle(a,Q).getPropertyValue("color")})}return ft(t)},Tt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Et=function(){return"hsl("+[this.h,this.s,this.l]+")"},Nt=function(){return this.hex},Ct=function(t,n,i){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(i=t.b,n=t.g,t=t.r),null==n&&e.is(t,P)){var o=e.getRGB(t);t=o.r,n=o.g,i=o.b}return(t>1||n>1||i>1)&&(t/=255,n/=255,i/=255),[t,n,i]},wt=function(t,n,i,o){t*=255,n*=255,i*=255;var r={r:t,g:n,b:i,hex:e.rgb(t,n,i),toString:Nt};return e.is(o,"finite")&&(r.opacity=o),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Nt,t},e.hsb2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,i=t.o,t=t.h),t*=360;var o,r,A,a,s;return t=t%360/60,s=n*e,a=s*(1-O(t%2-1)),o=r=A=n-s,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],wt(o,r,A,i)},e.hsl2rgb=function(t,e,n,i){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var o,r,A,a,s;return t=t%360/60,s=2*e*(n<.5?n:1-n),a=s*(1-O(t%2-1)),o=r=A=n-s/2,t=~~t,o+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],wt(o,r,A,i)},e.rgb2hsb=function(t,e,n){n=Ct(t,e,n),t=n[0],e=n[1],n=n[2];var i,o,r,A;return r=R(t,e,n),A=r-F(t,e,n),i=0==A?null:r==t?(e-n)/A:r==e?(n-t)/A+2:(t-e)/A+4,i=(i+360)%6*60/360,o=0==A?0:A/r,{h:i,s:o,b:r,toString:Tt}},e.rgb2hsl=function(t,e,n){n=Ct(t,e,n),t=n[0],e=n[1],n=n[2];var i,o,r,A,a,s;return A=R(t,e,n),a=F(t,e,n),s=A-a,i=0==s?null:A==t?(e-n)/s:A==e?(n-t)/s+2:(t-e)/s+4,i=(i+360)%6*60/360,r=(A+a)/2,o=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:i,s:o,l:r,toString:Et}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=x.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,x.doc.body.removeChild(this)},n.onerror=function(){x.doc.body.removeChild(this)},x.doc.body.appendChild(n),n.src=t};e.getRGB=o(function(t){if(!t||(t=j(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(ot[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ft(t));var n,i,o,A,a,s,l=t.match(J);return l?(l[2]&&(o=$(l[2].substring(5),16),i=$(l[2].substring(3,5),16),n=$(l[2].substring(1,3),16)),l[3]&&(o=$((a=l[3].charAt(3))+a,16),i=$((a=l[3].charAt(2))+a,16),n=$((a=l[3].charAt(1))+a,16)),l[4]&&(s=l[4][U](it),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),i=q(s[1]),"%"==s[1].slice(-1)&&(i*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100)),l[5]?(s=l[5][U](it),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),i=q(s[1]),"%"==s[1].slice(-1)&&(i*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsb2rgb(n,i,o,A)):l[6]?(s=l[6][U](it),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),i=q(s[1]),"%"==s[1].slice(-1)&&(i*=2.55),o=q(s[2]),"%"==s[2].slice(-1)&&(o*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsl2rgb(n,i,o,A)):(l={r:n,g:i,b:o,toString:r},l.hex="#"+(16777216|o|i<<8|n<<16).toString(16).slice(1),e.is(A,"finite")&&(l.opacity=A),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=o(function(t,n,i){return e.hsb2rgb(t,n,i).hex}),e.hsl=o(function(t,n,i){return e.hsl2rgb(t,n,i).hex}),e.rgb=o(function(t,e,n){function i(t){return t+.5|0}return"#"+(16777216|i(n)|i(e)<<8|i(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=yt(t);if(n.arr)return Dt(n.arr);var i={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},o=[];return e.is(t,X)&&e.is(t[0],X)&&(o=Dt(t)),o.length||j(t).replace(At,function(t,e,n){var r=[],A=e.toLowerCase();if(n.replace(st,function(t,e){e&&r.push(+e)}),"m"==A&&r.length>2&&(o.push([e][B](r.splice(0,2))),A="l",e="m"==e?"l":"L"),"r"==A)o.push([e][B](r));else for(;r.length>=i[A]&&(o.push([e][B](r.splice(0,i[A]))),i[A]););}),o.toString=e._path2string,n.arr=Dt(o),o},e.parseTransformString=o(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=Dt(t)),n.length||j(t).replace(at,function(t,e,i){var o=[];z.call(e);i.replace(st,function(t,e){e&&o.push(+e)}),n.push([e][B](o))}),n.toString=e._path2string,n});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[y](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,i,o,r,A,a,s){var l=1-s,c=V(l,3),u=V(l,2),g=s*s,d=g*s,M=c*t+3*u*s*n+3*l*s*s*o+d*A,p=c*e+3*u*s*i+3*l*s*s*r+d*a,h=t+2*s*(n-t)+g*(o-2*n+t),I=e+2*s*(i-e)+g*(r-2*i+e),f=n+2*s*(o-n)+g*(A-2*o+n),T=i+2*s*(r-i)+g*(a-2*r+i),E=l*t+s*n,N=l*e+s*i,C=l*o+s*A,w=l*r+s*a,y=90-180*Y.atan2(h-f,I-T)/H;return(h>f||I=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var i=e.isPointInsideBBox;return i(n,t.x,t.y)||i(n,t.x2,t.y)||i(n,t.x,t.y2)||i(n,t.x2,t.y2)||i(t,n.x,n.y)||i(t,n.x2,n.y)||i(t,n.x,n.y2)||i(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return g(t,e)},e.pathIntersectionNumber=function(t,e){return g(t,e,1)},e.isPointInsidePath=function(t,n,i){var o=e.pathBBox(t);return e.isPointInsideBBox(o,n,i)&&g(t,[["M",n,i],["H",o.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var xt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ut(t);for(var i,o=0,r=0,A=[],a=[],s=0,l=t.length;s1&&(f=Y.sqrt(f),n*=f,i*=f);var T=n*n,E=i*i,N=(A==a?-1:1)*Y.sqrt(O((T*E-T*I*I-E*h*h)/(T*I*I+E*h*h))),C=N*n*I/i+(t+s)/2,w=N*-i*h/n+(e+l)/2,y=Y.asin(((e-w)/i).toFixed(9)),x=Y.asin(((l-w)/i).toFixed(9));y=tx&&(y-=2*H),!a&&x>y&&(x-=2*H)}var D=x-y;if(O(D)>g){var b=x,m=s,L=l;x=y+g*(a&&x>y?1:-1),s=C+n*Y.cos(x),l=w+i*Y.sin(x),M=Qt(s,l,n,i,r,0,a,m,L,[x,b,C,w])}D=x-y;var Q=Y.cos(y),v=Y.sin(y),j=Y.cos(x),S=Y.sin(x),k=Y.tan(D/4),z=4/3*n*k,R=4/3*i*k,F=[t,e],V=[t+z*v,e-R*Q],G=[s+z*S,l-R*j],P=[s,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],c)return[V,G,P][B](M);M=[V,G,P][B](M).join()[U](",");for(var X=[],W=0,J=M.length;W"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=vt(t,e,n,i,o,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=vt(t,e,n,i,o,r,A,a,d),p.push(s.x),M.push(s.y)),l=r-2*i+e-(a-2*r+i),c=2*(i-e)-2*(r-i),u=e-i,g=(-c+Y.sqrt(c*c-4*l*u))/2/l,d=(-c-Y.sqrt(c*c-4*l*u))/2/l,O(g)>"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=vt(t,e,n,i,o,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=vt(t,e,n,i,o,r,A,a,d),p.push(s.x),M.push(s.y)),{min:{x:F[m](0,p),y:F[m](0,M)},max:{x:R[m](0,p),y:R[m](0,M)}}}),Ut=e._path2curve=o(function(t,e){var n=!e&&yt(t);if(!e&&n.curve)return Dt(n.curve);for(var i=mt(t),o=e&&mt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},A={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var i,o,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][B](Qt[m](0,[e.x,e.y][B](t.slice(1))));break;case"S":"C"==n||"S"==n?(i=2*e.x-e.bx,o=2*e.y-e.by):(i=e.x,o=e.y),t=["C",i,o][B](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][B](Lt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][B](Lt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][B](Bt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][B](Bt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][B](Bt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][B](Bt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",o&&(u[e]="A"),t.splice(e++,0,["C"][B](n.splice(0,6)));t.splice(e,1),p=R(i.length,o&&o.length||0)}},l=function(t,e,n,r,A){t&&e&&"M"==t[A][0]&&"M"!=e[A][0]&&(e.splice(A,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[A][1],n.y=t[A][2],p=R(i.length,o&&o.length||0))},c=[],u=[],g="",d="",M=0,p=R(i.length,o&&o.length||0);Mo){if(n&&!g.start){if(c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],o-d),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],r)return u;g.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,s[5],s[6]].join(),d+=l,A=+s[5],a=+s[6];continue}if(!t&&!n)return c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],o-d),{x:c.x,y:c.y,alpha:c.alpha}}d+=l,A=+s[5],a=+s[6]}u+=s.shift()+s}return g.end=u,c=t?d:n?g:e.findDotsAtSegment(A,a,s[0],s[1],s[2],s[3],s[4],s[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),ie=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return ie(t,e).end;var i=ie(t,n,1);return e?ie(i,e).end:i},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var i=this.getPath();if(i)return e.getSubpath(i,t,n)};var oe=e.easing_formulas={linear:function(t){return t},"<":function(t){return V(t,1.7)},">":function(t){return V(t,.48)},"<>":function(t){var e=.48-t/1.04,n=Y.sqrt(.1734+e*e),i=n-e,o=V(O(i),1/3)*(i<0?-1:1),r=-n-e,A=V(O(r),1/3)*(r<0?-1:1),a=o+A+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:V(2,-10*t)*Y.sin((t-.075)*(2*H)/.3)+1},bounce:function(t){var e,n=7.5625,i=2.75;return t<1/i?e=n*t*t:t<2/i?(t-=1.5/i,e=n*t*t+.75):t<2.5/i?(t-=2.25/i,e=n*t*t+.9375):(t-=2.625/i,e=n*t*t+.984375),e}};oe.easeIn=oe["ease-in"]=oe["<"],oe.easeOut=oe["ease-out"]=oe[">"],oe.easeInOut=oe["ease-in-out"]=oe["<>"],oe["back-in"]=oe.backIn,oe["back-out"]=oe.backOut;var re=[],Ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var n=+new Date,i=0;i1&&!o.next){for(A in g)g[y](A)&&(p[A]=o.totalOrigin[A]);o.el.attr(p),I(o.anim,o.el,o.anim.percents[0],null,o.totalOrigin,o.repeat-1)}o.next&&!o.stop&&I(o.anim,o.el,o.next,null,o.totalOrigin,o.repeat)}}}re.length&&Ae(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,i,o,r,A){var a=this;if(a.removed)return A&&A.call(a),a;var s=i instanceof h?i:e.animation(i,o,r,A);I(s,a,s.percents[0],null,a.attr());for(var l=0,c=re.length;ls&&(s=c)}s+="%",!t[s].callback&&(t[s].callback=o)}return new h(t,n)},Zt.animate=function(t,n,i,o){var r=this;if(r.removed)return o&&o.call(r),r;var A=t instanceof h?t:e.animation(t,n,i,o);return I(A,r,A.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,i,o=[],r=0;if(null!=e)return I(t,this,-1,F(e,1)),this;for(n=re.length;r1)for(var i=0,o=n.length;i.5)-1;s(g-.5,2)+s(d-.5,2)>.25&&(d=r.sqrt(.25-s(g-.5,2))*o+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*o)}return u}),o=o.split(/\s*\-\s*/),"linear"==l){var E=o.shift();if(E=-i(E),isNaN(E))return null;var N=[0,0,r.cos(t.rad(E)),r.sin(t.rad(E))],C=1/(A(a(N[2]),a(N[3]))||1);N[2]*=C,N[3]*=C,N[2]<0&&(N[0]=-N[2],N[2]=0),N[3]<0&&(N[1]=-N[3],N[3]=0)}var w=t._parseDots(o);if(!w)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){f=h(l+"Gradient",{id:c}),e.gradient=f,h(f,"radial"==l?{fx:g,fy:d}:{x1:N[0],y1:N[1],x2:N[2],y2:N[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(f);for(var y=0,x=w.length;y1?j.opacity/100:j.opacity});case"stroke":j=t.getRGB(p),s.setAttribute(M,j.hex),"stroke"==M&&j[e]("opacity")&&h(s,{"stroke-opacity":j.opacity>1?j.opacity/100:j.opacity}),"stroke"==M&&i._.arrows&&("startString"in i._.arrows&&N(i,i._.arrows.startString),"endString"in i._.arrows&&N(i,i._.arrows.endString,1));break;case"gradient":("circle"==i.type||"ellipse"==i.type||"r"!=n(p).charAt())&&I(i,p);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&h(s,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(c.gradient){U=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,u)),U&&(S=U.getElementsByTagName("stop"),h(S[S.length-1],{"stop-opacity":p}));break}default:"font-size"==M&&(p=o(p,10)+"px");var k=M.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[k]=p,i._.dirty=1,s.setAttribute(M,p)}}D(i,r),s.style.visibility=g},x=1.2,D=function(i,r){if("text"==i.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var A=i.attrs,a=i.node,s=a.firstChild?o(t._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(A.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var l,c=n(r.text).split("\n"),g=[],d=0,M=c.length;d"));var Z=X.getBoundingClientRect();f.W=g.w=(Z.right-Z.left)/W,f.H=g.h=(Z.bottom-Z.top)/W,f.X=g.x,f.Y=g.y+f.H/2,("x"in s||"y"in s)&&(f.path.v=t.format("m{0},{1}l{2},{1}",r(g.x*E),r(g.y*E),r(g.x*E)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=o.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),l=e+d+n),M}),r=r.split(/\s*\-\s*/),"linear"==s){var c=r.shift();if(c=-i(c),isNaN(c))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(A),A.on=!0,A.method="none",A.color=u[0].color,A.color2=u[u.length-1].color;for(var g=[],p=0,h=u.length;p')}}catch(t){Q=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,i=e.height,o=e.width,r=e.x,A=e.y;if(!n)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),l=s.style;return r=r||0,A=A||0,o=o||512,i=i||342,a.width=o,a.height=i,o==+o&&(o+="px"),i==+i&&(i+="px"),a.coordsize=1e3*E+d+1e3*E,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),l.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",o,i),1==n?(t._g.doc.body.appendChild(s),l.left=r+"px",l.top=A+"px",l.position="absolute"):n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var v=t.st;for(var j in L)L[e](j)&&!v[e](j)&&(v[j]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(j))}}.apply(e,i),!(void 0!==o&&(t.exports=o))}])})},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(o=(t+1)/2),i.splice(o,1),2===i.length)i=e.connection._buildStraightLinePathInfo();else{var r=i[1],A=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=i[0];a[1]=A.x,a[2]=A.y;var s=i[i.length-2],l=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),c=i[i.length-1];c[1]=l.x,c[2]=l.y}e.path.attr("path",i),e.remove()});var g=function(i,o){e.context.snapto&&(i-=i%10,o-=o%10);var a=this.ox+i,s=this.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),A=Math.round(t/2);var l=e.path.attr("path"),c=l.length,u=void 0,g=void 0,d=void 0,M=2*(n.length-1)-1;if(0===t||1===t){if(d=l[1],u=e.connection._buildFromFigureIntersetion({x:d[1],y:d[2]},!0),g=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(p){var h=n[n.length-1];h[1]=p.x,h[2]=p.y}}}else M!==t&&M!==t+1&&M!==t+2||(d=l[c-2],u=e.connection._buildToFigureIntersetion({x:a,y:s},!0),g=n[n.length-1]);u&&(g[1]=u.x,g[2]=u.y);var I=[];n.forEach(function(t,e){r?e===A?I.push(["L",a,s]):I.push(t):(I.push(t),e===A&&I.push(["L",a,s]))}),e.path.attr("path",I),e.connection._buildText()}},d=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},M=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,i=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(i);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(i);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(g,d,M)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=o},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var i=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e){"use strict";function n(t){var e=A("消息提示",t);e.modal("show")}function i(t,e){var n=A("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function o(t,e,n){var i=A(t,e,[{name:"确认",click:function(){n.call(this)}}]);i.modal("show")}function r(t,e,n,i,o){var r=A(t,e,n,o);if(r.modal("show"),i){var a=!0,s=!1,l=void 0;try{for(var c,u=i[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;r.on(g.name,g.callback)}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}}}function A(t,e,n,i){var o=this,r="modal-dialog"+(i?" modal-lg":""),A=$(''),s=$('
    ');A.append(s); +var l=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var i="_prop_container",o=$('
    ');this.canvasContainer.append(o);var A=$('');o.append(A),A.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),o.append(a),o.draggable();var l=$("#__prop_panel_tool__");l.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(l.removeClass("glyphicon-circle-arrow-left"),l.addClass("glyphicon-circle-arrow-down")):(l.removeClass("glyphicon-circle-arrow-down"),l.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return A(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void f.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void f.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void f.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,i=t.y,o=t.width,r=t.height,A=t.name;n=parseInt(n),i=parseInt(i),o=parseInt(o),r=parseInt(r);var a=n+o+10,s=i+r+10;this.context.resizePaper(a+50,s+50);var l=e._newNodeInstance(n,i,A);l.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;g.eventEmitter.on(g.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,i=!0,o=!1,r=void 0;try{for(var A,a=function(){var e=A.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},s=this.buttons[Symbol.iterator]();!(i=(A=s.next()).done);i=!0)a()}catch(t){o=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,i=void 0;try{for(var o,r=function(){var e=o.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){g.eventEmitter.emit(g.TRIGGER_TOOL,e.getType())})},A=this.context.toolsMap.values()[Symbol.iterator]();!(e=(o=A.next()).done);e=!0)r()}catch(t){n=!0,i=t}finally{try{!e&&A.return&&A.return()}finally{if(n)throw i}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;g.eventEmitter.on(g.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof M.default){var i=n.name||n.text.attr("text"),o=$('
    '),r=$('');o.append(r),t.propContainer.append(o),r.change(function(t){var i=$(this).val(),o=n.name,r=n.uuid,A=!1,a=!0,s=!1,l=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g instanceof M.default&&g!==n&&g.name===i){A=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}return A?void f.alert("节点名已存在!"):(n.name=i,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t.text.attr("text",i)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof h.default){var A=$('
    '),a=$('');A.append(a),t.propContainer.append(A),a.change(function(t){var i=$(this).val(),o=n.name,r=n.uuid,A=n.from.fromConnections,a=!1,s=!0,l=!1,c=void 0;try{for(var u,g=A[Symbol.iterator]();!(s=(u=g.next()).done);s=!0){var d=u.value;if(d!==n&&d.name===i){a=!0;break}}}catch(t){l=!0,c=t}finally{try{!s&&g.return&&g.return()}finally{if(l)throw c}}return a?void f.alert("连线名已存在"):(n.name=i,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()}}))});var s=$('
    '),l=$('');s.append(l),l.val(n.type),l.change(function(t){var i=$(this).val(),o=n.uuid,r=n.type;n.type=i,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(o);t.type=i,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(o);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),g.eventEmitter.on(g.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),g.eventEmitter.emit(g.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(f.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,i=void 0;try{for(var o,r=this.context.allFigures[Symbol.iterator]();!(e=(o=r.next()).done);e=!0){var A=o.value;if(A instanceof M.default){var a=A.validate();a&&t.push(a)}}}catch(t){n=!0,i=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw i}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",f.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof M.default&&t.push(e.toJSON())}),t}}]),t}();e.default=T},function(t,e,n){var i=n(254);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var i=n(260);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,i=this;t(this).one("bsTransitionEnd",function(){n=!0});var o=function(){n||t(i).trigger(t.support.transition.end)};return setTimeout(o,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),o=n.data("bs.alert");o||n.data("bs.alert",o=new i(this)),"string"==typeof e&&o[e].call(n)})}var n='[data-dismiss="alert"]',i=function(e){t(e).on("click",n,this.close)};i.VERSION="3.3.7",i.TRANSITION_DURATION=150,i.prototype.close=function(e){function n(){A.detach().trigger("closed.bs.alert").remove()}var o=t(this),r=o.attr("data-target");r||(r=o.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var A=t("#"===r?[]:r);e&&e.preventDefault(),A.length||(A=o.closest(".alert")),A.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(A.removeClass("in"),t.support.transition&&A.hasClass("fade")?A.one("bsTransitionEnd",n).emulateTransitionEnd(i.TRANSITION_DURATION):n())};var o=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=i,t.fn.alert.noConflict=function(){return t.fn.alert=o,this},t(document).on("click.bs.alert.data-api",n,i.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.button"),r="object"==typeof e&&e;o||i.data("bs.button",o=new n(this,r)),"toggle"==e?o.toggle():e&&o.setState(e)})}var n=function(e,i){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,i),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",i=this.$element,o=i.is("input")?"val":"html",r=i.data();e+="Text",null==r.resetText&&i.data("resetText",i[o]()),setTimeout(t.proxy(function(){i[o](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,i.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,i.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var i=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=i,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var i=t(n.target).closest(".btn");e.call(i,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),i.is("input,button")?i.trigger("focus"):i.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.carousel"),r=t.extend({},n.DEFAULTS,i.data(),"object"==typeof e&&e),A="string"==typeof e?e:r.slide;o||i.data("bs.carousel",o=new n(this,r)),"number"==typeof e?o.to(e):A?o[A]():r.interval&&o.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),i="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(i&&!this.options.wrap)return e;var o="prev"==t?-1:1,r=(n+o)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),r=i||this.getItemForDirection(e,o),A=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var l=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:l,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,A&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var g=t.Event("slid.bs.carousel",{relatedTarget:l,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,o.addClass(a),r.addClass(a),o.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(g)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(o.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(g)),A&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this};var o=function(n){var i,o=t(this),r=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var A=t.extend({},r.data(),o.data()),a=o.attr("data-slide-to");a&&(A.interval=!1),e.call(r,A),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",o).on("click.bs.carousel.data-api","[data-slide-to]",o),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,i=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(i)}function n(e){return this.each(function(){var n=t(this),o=n.data("bs.collapse"),r=t.extend({},i.DEFAULTS,n.data(),"object"==typeof e&&e);!o&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),o||n.data("bs.collapse",o=new i(this,r)),"string"==typeof e&&o[e]()})}var i=function(e,n){this.$element=t(e),this.options=t.extend({},i.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};i.VERSION="3.3.7",i.TRANSITION_DURATION=350,i.DEFAULTS={toggle:!0},i.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},i.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,o=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(o&&o.length&&(e=o.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){o&&o.length&&(n.call(o,"hide"),e||o.data("bs.collapse",null));var A=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[A](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[A](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",A].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(i.TRANSITION_DURATION)[A](this.$element[0][s])}}}},i.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(o,this)).emulateTransitionEnd(i.TRANSITION_DURATION):o.call(this)}}},i.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},i.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,i){var o=t(i);this.addAriaAndCollapsedClass(e(o),o)},this)).end()},i.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var o=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=i,t.fn.collapse.noConflict=function(){return t.fn.collapse=o,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(i){var o=t(this);o.attr("data-target")||i.preventDefault();var r=e(o),A=r.data("bs.collapse"),a=A?"toggle":o.data();n.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var i=n&&t(n);return i&&i.length?i:e.parent()}function n(n){n&&3===n.which||(t(o).remove(),t(r).each(function(){var i=t(this),o=e(i),r={relatedTarget:this};o.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(o[0],n.target)||(o.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(i.attr("aria-expanded","false"),o.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function i(e){return this.each(function(){var n=t(this),i=n.data("bs.dropdown");i||n.data("bs.dropdown",i=new A(this)),"string"==typeof e&&i[e].call(n)})}var o=".dropdown-backdrop",r='[data-toggle="dropdown"]',A=function(e){t(e).on("click.bs.dropdown",this.toggle)};A.VERSION="3.3.7",A.prototype.toggle=function(i){var o=t(this);if(!o.is(".disabled, :disabled")){var r=e(o),A=r.hasClass("open");if(n(),!A){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(i=t.Event("show.bs.dropdown",a)),i.isDefaultPrevented())return;o.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},A.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var i=t(this);if(n.preventDefault(),n.stopPropagation(),!i.is(".disabled, :disabled")){var o=e(i),A=o.hasClass("open");if(!A&&27!=n.which||A&&27==n.which)return 27==n.which&&o.find(r).trigger("focus"),i.trigger("click");var a=" li:not(.disabled):visible a",s=o.find(".dropdown-menu"+a);if(s.length){var l=s.index(n.target);38==n.which&&l>0&&l--,40==n.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,i){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(i),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var o=this.options.trigger.split(" "),r=o.length;r--;){var A=o[r];if("click"==A)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=A){var a="hover"==A?"mouseenter":"focusin",s="hover"==A?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,i){n[t]!=i&&(e[t]=i)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var i=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!i)return;var o=this,r=this.tip(),A=this.getUID(this.type);this.setContent(),r.attr("id",A),this.$element.attr("aria-describedby",A),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=r[0].offsetWidth,g=r[0].offsetHeight;if(l){var d=a,M=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+g>M.bottom?"top":"top"==a&&c.top-gM.width?"left":"left"==a&&c.left-uA.top+A.height&&(o.top=A.top+A.height-s)}else{var l=e.left-r,c=e.left+r+n;lA.right&&(o.left=A.left+A.width-c)}return o},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var i=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=i,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.popover"),r="object"==typeof e&&e;!o&&/destroy|hide/.test(e)||(o||i.data("bs.popover",o=new n(this,r)),"string"==typeof e&&o[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var i=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,i){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,i),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var i=t(this),o=i.data("bs.scrollspy"),r="object"==typeof n&&n;o||i.data("bs.scrollspy",o=new e(this,r)),"string"==typeof n&&o[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),o=e.data("target")||e.attr("href"),r=/^#./.test(o)&&t(o);return r&&r.length&&r.is(":visible")&&[[r[n]().top+i,o]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),i=this.options.offset+n-this.$scrollElement.height(),o=this.offsets,r=this.targets,A=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=i)return A!=(t=r[r.length-1])&&this.activate(t);if(A&&e=o[t]&&(void 0===o[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),o&&o()}var A=i.find("> .active"),a=o&&t.support.transition&&(A.length&&A.hasClass("fade")||!!i.find("> .fade").length);A.length&&a?A.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),A.removeClass("in")};var i=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=i,this};var o=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',o).on("click.bs.tab.data-api",'[data-toggle="pill"]',o)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var i=t(this),o=i.data("bs.affix"),r="object"==typeof e&&e;o||i.data("bs.affix",o=new n(this,r)),"string"==typeof e&&o[e]()})}var n=function(e,i){this.options=t.extend({},n.DEFAULTS,i),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,i){var o=this.$target.scrollTop(),r=this.$element.offset(),A=this.$target.height();if(null!=n&&"top"==this.affixed)return o=t-i&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),i=this.options.offset,o=i.top,r=i.bottom,A=Math.max(t(document).height(),t(document.body).height());"object"!=typeof i&&(r=o=i),"function"==typeof o&&(o=i.top(this.$element)),"function"==typeof r&&(r=i.bottom(this.$element));var a=this.getState(A,e,o,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),l=t.Event(s+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:A-e-r})}};var i=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),i=n.data();i.offset=i.offset||{},null!=i.offsetBottom&&(i.offset.bottom=i.offsetBottom),null!=i.offsetTop&&(i.offset.top=i.offsetTop),e.call(n,i)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,i,o=t(this),r=n.handle?t(n.handle,o):o;r.on({mousedown:function(r){var A=r.target,a="",s=!1;if(A&&(a=A.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===A.tagName||"INPUT"===A.tagName||A&&"presentation"===t(A).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,o)))){var l=o.offset();e=r.pageX-l.left,i=r.pageY-l.top,t(document).on("mousemove.drag",function(t){o.offset({top:t.pageY-i,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&A.push(u)}else{var h=u.rect,I=h.getBBox();(I.x>=n.x&&I.x<=n.x2||I.x2>=n.x&&I.x2<=n.x2)&&(I.y>=n.y&&I.y<=n.y2||I.y2>=n.y&&I.y2<=n.y2)&&s.push(u)}}s.length>0?s.forEach(function(t,e){o.addSelection(t)}):A.forEach(function(t,e){o.addSelection(t)}),o.endSelect()}}var i=null,o=this.context,r=o.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=o.currentTool;if(!(!e||e instanceof u.default||e instanceof l.default)){var n=t.offsetX,i=t.offsetY,r=e._newNodeInstance(n,i);r&&!function(){var t=r.uuid,A=r.name,a=r.toJSON();o.addRedoUndo({redo:function(){r=e._newNodeInstance(n,i,A),r.initFromJson(a)},undo:function(){o.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(o.currentTool&&o.currentTool instanceof u.default){var e=o.currentConnection;if(e){var n=t.offsetX,i=t.offsetY;e.endX=n,e.endY=i,e.updatePath()}}})}}]),t}();e.default=M},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>i&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof T.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof T.default&&e.select()}),t&&N.eventEmitter.emit(N.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof T.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),N.eventEmitter.emit(N.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return d.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,i=!1,o=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof w.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){i=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(i)throw o}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,i=!1,o=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){i=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(i)throw o}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;N.eventEmitter.on(N.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),N.eventEmitter.on(N.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var i=e.toJSON(),o=e.uuid,r=t;e instanceof T.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(o),e=t.from.uuid,n=t.to.uuid,A=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(n),s=new T.default(A,{x:A.rect.attr("x"),y:A.rect.attr("y")});A.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(i)},undo:function(){r.removeFigureByUUID(o)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(o)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(i),t._buildConnections())}})}(),t.removeFigureByUUID(o)}))}),N.eventEmitter.on(N.ALIGN_CENTER,function(){var e=-1,n=-1,i=void 0,o=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof T.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),i=u.rect.attr("width"),e+=i/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=d.getNodeByUUID(A),s=o.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=d.getNodeByUUID(A),s=o.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.ALIGN_MIDDLE,function(){var e=-1,n=-1,i=void 0,o=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof T.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),i=u.rect.attr("height"),n+=i/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},o.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=d.getNodeByUUID(A),s=o.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=d.getNodeByUUID(A),s=o.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.UNIFY_SIZE,function(){var e=void 0,n=void 0,i=new Map,o=0,r=!0,A=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c instanceof T.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===o?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},i.set(c.uuid,u),o++}}catch(t){A=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(A)throw a}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=g.getNodeByUUID(A),s=i.get(A),l=s.newWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=g.getNodeByUUID(A),s=i.get(A),l=s.oldWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new I.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,n){var i;!function(){"use strict";function o(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],i=-1,r=0,A=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(A=!0,t[e](),A=!1,this):this},{add:function(e){return A?this:(n.splice(i+1,n.length-i),n.push(e),r&&n.length>r&&o(n,0,-(r+1)),i=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var o=n[i];return o?(e(o,"undo"),i-=1,t&&t(),this):this},redo:function(){var o=n[i+1];return o?(e(o,"redo"),i+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],i=-1,t&&e>0&&t()},hasUndo:function(){return i!==-1},hasRedo:function(){return i>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=n(284).randomBytes;M=g=t&&function(){return t(16)},g()}catch(t){}}function s(t,e,n){var i=e&&n||0,o=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){o<16&&(e[i+o++]=f[t])});o<16;)e[i+o++]=0;return e}function l(t,e){var n=e||0,i=I;return i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+"-"+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]+i[t[n++]]}function c(t,e,n){var i=e&&n||0,o=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:C,A=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=A-w+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||A>w)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");w=A,y=a,C=r,A+=122192928e5;var c=(1e4*(268435455&A)+a)%4294967296;o[i++]=c>>>24&255,o[i++]=c>>>16&255,o[i++]=c>>>8&255,o[i++]=255&c;var u=A/4294967296*1e4&268435455;o[i++]=u>>>8&255,o[i++]=255&u,o[i++]=u>>>24&15|16,o[i++]=u>>>16&255,o[i++]=r>>>8|128,o[i++]=255&r;for(var g=t.node||N,d=0;d<6;d++)o[i+d]=g[d];return e?e:l(o)}function u(t,e,n){var i=e&&n||0;"string"==typeof t&&(e="binary"===t?new h(16):null,t=null),t=t||{};var o=t.random||(t.rng||g)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,e)for(var r=0;r<16;r++)e[i+r]=o[r];return e||l(o)}var g,d,M,p;r?A():a();for(var h="function"==typeof o?o:Array,I=[],f={},T=0;T<256;T++)I[T]=(T+256).toString(16).substr(1),f[I[T]]=T;var E=g(),N=[1|E[0],E[1],E[2],E[3],E[4],E[5]],C=16383&(E[6]<<8|E[7]),w=0,y=0,x=u;x.v1=c,x.v4=u,x.parse=s,x.unparse=l,x.BufferClass=h,x._rng=g,x._mathRNG=d,x._nodeRNG=M,x._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=x:(i=function(){return x}.call(e,n,e,t),!(void 0!==i&&(t.exports=i)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,i){"use strict";function o(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function A(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function h(e){return+e!=e&&(e=0),t.alloc(+e)}function I(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var i=e.length;if(0===i)return 0;for(var o=!1;;)switch(n){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return J(e).length;default:if(o)return P(e).length;n=(""+n).toLowerCase(),o=!0}}function f(t,e,n){var i=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return j(this,e,n);case"utf8":case"utf-8":return B(this,e,n);case"ascii":return Q(this,e,n);case"latin1":case"binary":return v(this,e,n);case"base64":return m(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,n);default:if(i)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),i=!0}}function T(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function E(e,n,i,o,r){if(0===e.length)return-1;if("string"==typeof i?(o=i,i=0):i>2147483647?i=2147483647:i<-2147483648&&(i=-2147483648),i=+i,isNaN(i)&&(i=r?0:e.length-1),i<0&&(i=e.length+i),i>=e.length){if(r)return-1;i=e.length-1}else if(i<0){if(!r)return-1;i=0}if("string"==typeof n&&(n=t.from(n,o)),t.isBuffer(n))return 0===n.length?-1:N(e,n,i,o,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,i):Uint8Array.prototype.lastIndexOf.call(e,n,i):N(e,[n],i,o,r); +throw new TypeError("val must be string, number or Buffer")}function N(t,e,n,i,o){function r(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}var A=1,a=t.length,s=e.length;if(void 0!==i&&(i=String(i).toLowerCase(),"ucs2"===i||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(t.length<2||e.length<2)return-1;A=2,a/=2,s/=2,n/=2}var l;if(o){var c=-1;for(l=n;la&&(n=a-s),l=n;l>=0;l--){for(var u=!0,g=0;go&&(i=o)):i=o;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");i>r/2&&(i=r/2);for(var A=0;A239?4:r>223?3:r>191?2:1;if(o+a<=n){var s,l,c,u;switch(a){case 1:r<128&&(A=r);break;case 2:s=t[o+1],128===(192&s)&&(u=(31&r)<<6|63&s,u>127&&(A=u));break;case 3:s=t[o+1],l=t[o+2],128===(192&s)&&128===(192&l)&&(u=(15&r)<<12|(63&s)<<6|63&l,u>2047&&(u<55296||u>57343)&&(A=u));break;case 4:s=t[o+1],l=t[o+2],c=t[o+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(u=(15&r)<<18|(63&s)<<12|(63&l)<<6|63&c,u>65535&&u<1114112&&(A=u))}}null===A?(A=65533,a=1):A>65535&&(A-=65536,i.push(A>>>10&1023|55296),A=56320|1023&A),i.push(A),o+=a}return L(i)}function L(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",i=0;ii)&&(n=i);for(var o="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,i,o,r,A){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function z(t,e,n,i){e<0&&(e=65535+e+1);for(var o=0,r=Math.min(t.length-n,2);o>>8*(i?o:1-o)}function Y(t,e,n,i){e<0&&(e=4294967295+e+1);for(var o=0,r=Math.min(t.length-n,4);o>>8*(i?o:3-o)&255}function R(t,e,n,i,o,r){if(n+i>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,i,o){return o||R(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,i,23,4),n+4}function O(t,e,n,i,o){return o||R(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,i,52,8),n+8}function V(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,i=t.length,o=null,r=[],A=0;A55295&&n<57344){if(!o){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(A+1===i){(e-=3)>-1&&r.push(239,191,189);continue}o=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),o=n;continue}n=(o-55296<<10|n-56320)+65536}else o&&(e-=3)>-1&&r.push(239,191,189);if(o=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){for(var e=[],n=0;n>8,o=n%256,r.push(o),r.push(i);return r}function J(t){return _.toByteArray(V(t))}function Z(t,e,n,i){for(var o=0;o=e.length||o>=t.length);++o)e[o+n]=t[o];return o}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==i.TYPED_ARRAY_SUPPORT?i.TYPED_ARRAY_SUPPORT:o(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return l(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var i=e.length,o=n.length,r=0,A=Math.min(i,o);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,i,o,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===i&&(i=e?e.length:0),void 0===o&&(o=0),void 0===r&&(r=this.length),n<0||i>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&n>=i)return 0;if(o>=r)return-1;if(n>=i)return 1;if(n>>>=0,i>>>=0,o>>>=0,r>>>=0,this===e)return 0;for(var A=r-o,a=i-n,s=Math.min(A,a),l=this.slice(o,r),c=e.slice(n,i),u=0;uo)&&(n=o),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var r=!1;;)switch(i){case"hex":return C(this,t,e,n);case"utf8":case"utf-8":return w(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return x(this,t,e,n);case"base64":return D(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var i=this.length;e=~~e,n=void 0===n?i:~~n,e<0?(e+=i,e<0&&(e=0)):e>i&&(e=i),n<0?(n+=i,n<0&&(n=0)):n>i&&(n=i),n0&&(o*=256);)i+=this[t+--e]*o;return i},t.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var i=this[t],o=1,r=0;++r=o&&(i-=Math.pow(2,8*e)),i},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var i=e,o=1,r=this[t+--i];i>0&&(o*=256);)r+=this[t+--i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,i){if(t=+t,e|=0,n|=0,!i){var o=Math.pow(2,8*n)-1;k(this,t,e,n,o,0)}var r=1,A=0;for(this[e]=255&t;++A=0&&(A*=256);)this[e+r]=t/A&255;return e+n},t.prototype.writeUInt8=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Y(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var r=0,A=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,i){if(t=+t,e|=0,!i){var o=Math.pow(2,8*n-1);k(this,t,e,n,o-1,-o)}var r=n-1,A=1,a=0;for(this[e+r]=255&t;--r>=0&&(A*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/A>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Y(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,i){return e=+e,n|=0,i||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return O(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return O(this,t,e,!1,n)},t.prototype.copy=function(e,n,i,o){if(i||(i=0),o||0===o||(o=this.length),n>=e.length&&(n=e.length),n||(n=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-n=0;--r)e[r+n]=this[r+i];else if(A<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,i=void 0===i?this.length:i>>>0,e||(e=0);var A;if("number"==typeof e)for(A=n;A0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function i(t){return 3*t.length/4-n(t)}function o(t){var e,i,o,r,A,a,s=t.length;A=n(t),a=new c(3*s/4-A),o=A>0?s-4:s;var u=0;for(e=0,i=0;e>16&255,a[u++]=r>>8&255,a[u++]=255&r;return 2===A?(r=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[u++]=255&r):1===A&&(r=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function A(t,e,n){for(var i,o=[],A=e;Ac?c:l+a));return 1===i?(e=t[n-1],o+=s[e>>2],o+=s[e<<4&63],o+="=="):2===i&&(e=(t[n-2]<<8)+t[n-1],o+=s[e>>10],o+=s[e>>4&63],o+=s[e<<2&63],o+="="),r.push(o),r.join("")}e.byteLength=i,e.toByteArray=o,e.fromByteArray=a;for(var s=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,d=u.length;g>1,c=-7,u=n?o-1:0,g=n?-1:1,d=t[e+u];for(u+=g,r=d&(1<<-c)-1,d>>=-c,c+=a;c>0;r=256*r+t[e+u],u+=g,c-=8);for(A=r&(1<<-c)-1,r>>=-c,c+=i;c>0;A=256*A+t[e+u],u+=g,c-=8);if(0===r)r=1-l;else{if(r===s)return A?NaN:(d?-1:1)*(1/0);A+=Math.pow(2,i),r-=l}return(d?-1:1)*A*Math.pow(2,r-i)},e.write=function(t,e,n,i,o,r){var A,a,s,l=8*r-o-1,c=(1<>1,g=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=i?0:r-1,M=i?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,A=c):(A=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-A))<1&&(A--,s*=2),e+=A+u>=1?g/s:g*Math.pow(2,1-u),e*s>=2&&(A++,s/=2),A+u>=c?(a=0,A=c):A+u>=1?(a=(e*s-1)*Math.pow(2,o),A+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,o),A=0));o>=8;t[n+d]=255&a,d+=M,a/=256,o-=8);for(A=A<0;t[n+d]=255&A,d+=M,A/=256,l-=8);t[n+d-M]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function i(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function o(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var A=n(300)(e);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync,o(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){i("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,i){!function(){var o=("undefined"==typeof window?e:window)||{};_crypto=o.crypto||o.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new i(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function i(t){return function(){var n=[],i={update:function(t,i){return e.isBuffer(t)||(t=new e(t,i)),n.push(t),this},digest:function(i){var o=e.concat(n),r=t(o);return n=null,i?r.toString(i):r}};return i}}var o=n(288),r=i(n(296)),A=i(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new A:o(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},i=n(280).Buffer,o=n(289)(i);e.sha1=n(290)(i,o),e.sha256=n(294)(i,o),e.sha512=n(295)(i,o)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var i=this._len+=e.length,o=this._s=this._s||0,r=0,A=this._block;o=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var i=n(291).inherits;t.exports=function(t,e){function n(){return M.length?M.pop().init():this instanceof n?(this._w=d,e.call(this,64,56),this._h=null,void this.init()):new n}function o(t,e,n,i){return t<20?e&n|~e&i:t<40?e^n^i:t<60?e&n|e&i|n&i:e^n^i}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function A(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,l=4,c=8,u=12,g=16,d=new("undefined"==typeof Int32Array?Array:Int32Array)(80),M=[];return i(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=M,n.prototype._update=function(t){var e,n,i,s,l,c,u,g,d,M;e=c=this._a,n=u=this._b,i=g=this._c,s=d=this._d,l=M=this._e;for(var p=this._w,h=0;h<80;h++){var I=p[h]=h<16?t.readInt32BE(4*h):a(p[h-3]^p[h-8]^p[h-14]^p[h-16],1),f=A(A(a(e,5),o(h,n,i,s)),A(A(l,I),r(h)));l=s,s=i,i=a(n,30),n=e,e=f}this._a=A(e,c),this._b=A(n,u),this._c=A(i,g),this._d=A(s,d),this._e=A(l,M)},n.prototype._hash=function(){M.length<100&&M.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,l),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,g),e},n}},function(t,e,n){(function(t,i){function o(t,n){var i={seen:[],stylize:A};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),p(n)?i.showHidden=n:n&&e._extend(i,n),N(i.showHidden)&&(i.showHidden=!1),N(i.depth)&&(i.depth=2),N(i.colors)&&(i.colors=!1),N(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=r),s(i,t,i.depth)}function r(t,e){var n=o.styles[e];return n?"["+o.colors[n][0]+"m"+t+"["+o.colors[n][1]+"m":t}function A(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function s(t,n,i){if(t.customInspect&&n&&D(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(i,t);return T(o)||(o=s(t,o,i)),o}var r=l(t,n);if(r)return r;var A=Object.keys(n),p=a(A);if(t.showHidden&&(A=Object.getOwnPropertyNames(n)),x(n)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(n);if(0===A.length){if(D(n)){var h=n.name?": "+n.name:"";return t.stylize("[Function"+h+"]","special")}if(C(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return t.stylize(Date.prototype.toString.call(n),"date");if(x(n))return c(n)}var I="",f=!1,E=["{","}"];if(M(n)&&(f=!0,E=["[","]"]),D(n)){var N=n.name?": "+n.name:"";I=" [Function"+N+"]"}if(C(n)&&(I=" "+RegExp.prototype.toString.call(n)),y(n)&&(I=" "+Date.prototype.toUTCString.call(n)),x(n)&&(I=" "+c(n)),0===A.length&&(!f||0==n.length))return E[0]+I+E[1];if(i<0)return C(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var w;return w=f?u(t,n,i,p,A):A.map(function(e){return g(t,n,i,p,e,f)}),t.seen.pop(),d(w,I,E)}function l(t,e){if(N(e))return t.stylize("undefined","undefined");if(T(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return f(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,i,o){for(var r=[],A=0,a=e.length;A-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),N(A)){if(r&&o.match(/^\d+$/))return a;A=JSON.stringify(""+o),A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=t.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=t.stylize(A,"string"))}return A+": "+a}function d(t,e,n){var i=0,o=t.reduce(function(t,e){return i++,e.indexOf("\n")>=0&&i++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return o>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function M(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function h(t){return null===t}function I(t){return null==t}function f(t){return"number"==typeof t}function T(t){return"string"==typeof t}function E(t){return"symbol"==typeof t}function N(t){return void 0===t}function C(t){return w(t)&&"[object RegExp]"===m(t)}function w(t){return"object"==typeof t&&null!==t}function y(t){return w(t)&&"[object Date]"===m(t)}function x(t){return w(t)&&("[object Error]"===m(t)||t instanceof Error)}function D(t){return"function"==typeof t}function b(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function m(t){return Object.prototype.toString.call(t)}function B(t){return t<10?"0"+t.toString(10):t.toString(10)}function L(){var t=new Date,e=[B(t.getHours()),B(t.getMinutes()),B(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function Q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var v=/%[sdj%]/g;e.format=function(t){if(!T(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch(t){return"[Circular]"}default:return t}}),a=i[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function A(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function s(t){return o(t,2)^o(t,13)^o(t,22)}function l(t){return o(t,6)^o(t,11)^o(t,25)}function c(t){return o(t,7)^o(t,18)^r(t,3)}function u(t){return o(t,17)^o(t,19)^r(t,10)}var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);return i(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,i,o,r,d,M,p,h,I,f=this._w;e=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,r=0|this._e,d=0|this._f,M=0|this._g,p=0|this._h;for(var T=0;T<64;T++){var E=f[T]=T<16?t.readInt32BE(4*T):u(f[T-2])+f[T-7]+c(f[T-15])+f[T-16];h=p+l(r)+A(r,d,M)+g[T]+E,I=s(e)+a(e,n,i),p=M,M=d,d=r,r=o+h,o=i,i=n,n=e,e=h+I}this._a=e+this._a|0,this._b=n+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=r+this._e|0,this._f=d+this._f|0,this._g=M+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var i=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=s,e.call(this,128,112)}function o(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function A(t,e,n){return t&e^t&n^e&n}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return i(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,i,s,l,c,u,g,d,M,p,h,I,f,T,E,N=this._w;e=0|this._a,n=0|this._b,i=0|this._c,s=0|this._d,l=0|this._e,c=0|this._f,u=0|this._g,g=0|this._h,d=0|this._al,M=0|this._bl,p=0|this._cl,h=0|this._dl,I=0|this._el,f=0|this._fl,T=0|this._gl,E=0|this._hl;for(var C=0;C<80;C++){var w,y,x=2*C;if(C<16)w=N[x]=t.readInt32BE(4*x),y=N[x+1]=t.readInt32BE(4*x+4);else{var D=N[x-30],b=N[x-30+1],m=o(D,b,1)^o(D,b,8)^D>>>7,B=o(b,D,1)^o(b,D,8)^o(b,D,7);D=N[x-4],b=N[x-4+1];var L=o(D,b,19)^o(b,D,29)^D>>>6,Q=o(b,D,19)^o(D,b,29)^o(b,D,6),v=N[x-14],j=N[x-14+1],U=N[x-32],S=N[x-32+1];y=B+j,w=m+v+(y>>>0>>0?1:0),y+=Q,w=w+L+(y>>>0>>0?1:0),y+=S,w=w+U+(y>>>0>>0?1:0),N[x]=w,N[x+1]=y}var k=A(e,n,i),z=A(d,M,p),Y=o(e,d,28)^o(d,e,2)^o(d,e,7),R=o(d,e,28)^o(e,d,2)^o(e,d,7),F=o(l,I,14)^o(l,I,18)^o(I,l,9),O=o(I,l,14)^o(I,l,18)^o(l,I,9),V=a[x],H=a[x+1],G=r(l,c,u),P=r(I,f,T),X=E+O,W=g+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=H,W=W+V+(X>>>0>>0?1:0),X+=y,W=W+w+(X>>>0>>0?1:0);var J=R+z,Z=Y+k+(J>>>0>>0?1:0);g=u,E=T,u=c,T=f,c=l,f=I,I=h+X|0,l=s+W+(I>>>0>>0?1:0)|0,s=i,h=p,i=n,p=M,n=e,M=d,d=X+J|0,e=W+Z+(d>>>0>>0?1:0)|0}this._al=this._al+d|0,this._bl=this._bl+M|0,this._cl=this._cl+p|0,this._dl=this._dl+h|0,this._el=this._el+I|0,this._fl=this._fl+f|0,this._gl=this._gl+T|0,this._hl=this._hl+E|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+i+(this._cl>>>0

    >>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+l+(this._el>>>0>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+g+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,i){n.writeInt32BE(t,i),n.writeInt32BE(e,i+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function i(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,i=-271733879,o=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return i<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,i,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var i=t.length+(r-t.length%r);t=e.concat([t,A],i)}for(var o=[],a=n?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var i=p(t),o=8*t.length,r=8*t.length;i[o>>>5]|=128<<24-o%32,i[(o+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var A=0;A>>24)|4278255360&(a<<24|a>>>8)}var s=h(n);return new e(s)}t.exports=s;var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,i=0;n>>5]|=t[n]<<24-i%32;return e},h=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},I=function(t,e,s){for(var p=0;p<16;p++){var h=s+p,I=e[h];e[h]=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8)}var f,T,E,N,C,w,y,x,D,b;w=f=t[0],y=T=t[1],x=E=t[2],D=N=t[3],b=C=t[4];for(var m,p=0;p<80;p+=1)m=f+e[s+l[p]]|0,m+=p<16?n(T,E,N)+d[0]:p<32?i(T,E,N)+d[1]:p<48?o(T,E,N)+d[2]:p<64?r(T,E,N)+d[3]:A(T,E,N)+d[4],m|=0,m=a(m,u[p]),m=m+C|0,f=C,C=N,N=a(E,10),E=T,T=m,m=w+e[s+c[p]]|0,m+=p<16?A(y,x,D)+M[0]:p<32?r(y,x,D)+M[1]:p<48?o(y,x,D)+M[2]:p<64?i(y,x,D)+M[3]:n(y,x,D)+M[4],m|=0,m=a(m,g[p]),m=m+b|0,w=b,b=D,D=a(x,10),x=y,y=m;m=t[1]+E+D|0,t[1]=t[2]+N+b|0,t[2]=t[3]+C+w|0,t[3]=t[4]+f+y|0,t[4]=t[0]+T+x|0,t[0]=m}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function i(t,n){if(!(this instanceof i))return new i(t,n);this._opad=s,this._alg=t;var A="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>A?n=o(t).update(n).digest():n.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");M.copy(l,0,0,a);for(var p=1;pe&&(e=o)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,i){e.push(l.default.createElement("button",{type:"button",key:i,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},l.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,i="modal-dialog"+(n?" modal-lg":"");return l.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},l.default.createElement("div",{className:i},l.default.createElement("div",{className:"modal-content"},l.default.createElement("div",{className:"modal-header"},l.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),l.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,l.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),l.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),l.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=g},,,,,,,,,,,,,function(t,e,n){var i=n(320);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box;text-align:left}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;*border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{filter:progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-o-linear-gradient(top,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:\"\\2191\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu>.dropdown-menu.drop-left{left:-80%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:\" \"}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context-up:before,.dropdown-context:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.dropdown-context-up:after,.dropdown-context:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.dropdown-context-up:after,.dropdown-context-up:before{top:auto;bottom:-7px;z-index:9999}.dropdown-context-up:before{border-right:7px solid transparent;border-top:7px solid #ccc;border-bottom:none;border-left:7px solid transparent}.dropdown-context-up:after{border-right:6px solid transparent;border-top:6px solid #fff;border-left:6px solid transparent;border-bottom:none}.dropdown-context-sub:after,.dropdown-context-sub:before,.dropdown-context .dropdown-submenu:hover .dropdown-menu,.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:none}.compressed-context a{padding-left:14px;padding-top:0;padding-bottom:0;font-size:13px}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}",""])},function(t,e,n){var i=n(322);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".rule-delete{color:#f44336;vertical-align:text-top;cursor:pointer}.rule-text-editor{width:260px;display:inline-block;height:26px;padding:3px}.rule-property{padding-right:10px;padding-left:10px;line-height:28px;display:inline-block;border:1px solid gray;margin-left:5px}.rule-add-property{cursor:pointer;padding-left:10px;line-height:30px;color:blue}.rule-property-del{padding:5px;cursor:pointer;color:#ff0600}.rule-add-action{color:blue;cursor:pointer;padding-left:5px;padding-bottom:5px}.rule-action{padding:1px;line-height:27px}.rule-delete-action{font-size:10pt;cursor:pointer;color:#ff9800}.rule-join-node{color:#795548;font-size:10pt;vertical-align:text-top;margin-left:2px}.rule-join-container{border:1px solid #999;padding:1px;background:#fff}",""])},function(t,e){"use strict";!function(t){window.URule||(window.URule={}),URule.setDomContent=function(t,e){navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent",e):t.prop("innerText",e)},URule.getDomContent=function(t){return navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent"):t.prop("innerText")}}($)},,,function(t,e){"use strict";!function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(e,n){var i,o=t,r=[];if(n=n||o.length,e)for(i=0;i>=4,i[r]=n[19==r?3&e|8:e]);return i.join("")},Math.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}}()},function(t,e){"use strict";window.Remark=function(t){this.remark="",this.defaultRemark="请输入备注内容",this.init(t)},Remark.prototype.init=function(t){var e=$("

    备注
    ");t.append(e);var n=$("");e.append(n);var i=$("
    ");t.append(i),this.remarkLabel=$("
    "+this.defaultRemark+"
    "),i.append(this.remarkLabel),this.remarkEditor=$(""),i.append(this.remarkEditor),this.remarkEditor.hide();var o=this;this.remarkLabel.click(function(){o.remarkEditor.show(),o.remarkEditor.focus(),o.remarkLabel.hide()}),this.remarkEditor.change(function(){o.remark=$(this).val(),""===o.remark?o.remarkLabel.text(o.defaultRemark):o.remarkLabel.html(o.parseBreak(o.remark)),window.setDirty&&window.setDirty(),window._setDirty&&window._setDirty()}),this.remarkEditor.blur(function(){o.remarkEditor.hide(),o.remarkLabel.show()}),e.click(function(){i.collapse("toggle")}),i.on("show.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-right"),n.addClass("glyphicon-circle-arrow-down")}),i.on("hide.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-down"),n.addClass("glyphicon-circle-arrow-right")}),i.collapse("hide")},Remark.prototype.setData=function(t){t&&""!==t&&(this.remark=t,this.remarkEditor.val(t),this.remarkLabel.html(this.parseBreak(t)))},Remark.prototype.toXml=function(){return""},Remark.prototype.parseBreak=function(t){return t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("\n","gm"),"
    ")}},function(t,e,n){"use strict";var i=n(241);window._ConstantValueArray=[],window._ActionTypeArray=[],window._VariableValueArray=[],window._ParameterValueArray=[],window._FunctionValueArray=[],window.actionLibraries=[],window.variableLibraries=[],window.constantLibraries=[],window.parameterLibraries=[],window.urule={},window.generateContainer=function(){var t=$(".");return t.css({height:"20px",cursor:"pointer",margin:"0px",color:"white",border:"dashed transparent 1px"}),t.mouseover(function(){t.css({border:"dashed gray 1px"})}),t.mouseout(function(){t.css({border:"dashed transparent 1px"})}),t},window.refreshParameterLibraries=function(){for(var t="",e=0;e"),e=i[0],this._dom=e,n=this.menuItems;var o=this;if(n.length>20){var r=$("
    ");r.append(" "),this.search=$(""),r.append(this.search),i.append(r),this.search.click(function(t){t.stopPropagation()}),this.search.dblclick(function(t){t.stopPropagation()}),this.search.keypress(function(t){var e=t.keyCode?t.keyCode:t.which;if("13"===e||13===e){var i=$(this).val();if(!o.oldSearchValue||o.oldSearchValue!==i){for(o.oldSearchValue=i;o.menuItems.length>0;)o.menuItems[0].remove();for(var r=0;r-1&&o.addMenuItem(A):o.addMenuItem(A)}}}})}this.menuItems=[];for(var A=0;A$("html").height()+10&&t.pageY>r?e.addClass("dropdown-context-up").css({top:t.pageY-20-r,left:t.pageX-13}).fadeIn(this.fadeSpeed):e.css({top:t.pageY+10,left:t.pageX-13}).fadeIn(this.fadeSpeed)}this.onShow&&this.onShow(this)},URule.menu.Menu.prototype.hide=function(){var t=$(this._dom);t.is(":visible")&&(this.onHide&&this.onHide(this),t.fadeOut(this.fadeSpeed,function(){t.css({display:""}).find(".drop-left").removeClass("drop-left")}),this.parent&&this.parent.parent.hide())},URule.menu.MenuItem=function(t){URule.menu.MenuItem.prototype.superClass.call(this,t),$.extend(this,t)},URule.menu.MenuItem.prototype=new URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.superClass=URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.constructor=URule.menu.MenuItem,URule.menu.MenuItem.prototype.createDom=function(){var t,e,n;return n=this,t=$("
  • "),this._dom=t[0],e=this.icon?" "+this.label:this.label,t.on("mouseenter",function(){t.siblings(".dropdown-submenu").each(function(){$(this).find("ul.dropdown-context-sub").each(function(){var t=$(this).data("ref");$(this).fadeOut(t.fadeSpeed)})})}),"divider"===this.type?(t.addClass("divider"),t.append(e)):"header"==this.type?(t.addClass("nav-header"),t.append(e)):(t.append(""+e+""),this.subMenu&&this.setSubMenu(this.subMenu)),n.onClick&&(this.parent&&this.parent.search?(t.click(function(t){t.stopPropagation()}),t.dblclick(function(t){n.onClick(n,{event:t}),t.preventDefault(),t.stopPropagation(),n.parent.hide()})):t.click(function(t){t.preventDefault(),t.stopPropagation(),n.onClick(n,{event:t}),n.parent.hide()})),t[0]},URule.menu.MenuItem.prototype.setSubMenu=function(t){var e,n;return n=this,e=n.getDom(),t instanceof URule.menu.Menu?n.subMenu=t:n.subMenu=new URule.menu.Menu(t),n.subMenu.parent=this,$(e).attr("class","dropdown-submenu").on("mouseenter",function(){ +var t=$(this).find(".dropdown-context-sub:first"),e=t.width(),i=t.offset().left,o=e+i>window.innerWidth;o&&t.addClass("drop-left"),$(n.subMenu.getDom()).fadeIn(n.subMenu.fadeSpeed)}),this.subMenu.render(e),$(this.subMenu.getDom()).addClass("dropdown-context-sub"),this.subMenu},URule.menu.MenuItem.prototype.remove=function(){URule.menu.MenuItem.prototype.superClass.prototype.remove.call(this);var t;t=this.parent.menuItems.indexOf(this),this.parent.menuItems.splice(t,1)},URule.menu.MenuItem.prototype.show=function(){$(this._dom).show()},URule.menu.MenuItem.prototype.hide=function(){$(this._dom).hide()},$(document).on("dblclick","html",function(){$(".dropdown-context").each(function(){var t;t=$(this).data("ref"),t.hide()})}),URule.menu.AbstractMenu.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",function(t){t.preventDefault()})}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}var o=n(245),r=i(o);urule.Context=function(t,e){this.container=t,this.paper=new r.default(this.container.get(0),"100%","100%"),this.rule=e,this.rootJoin=null},urule.Context.prototype.putToNamedMap=function(t,e){this.rule.namedMap.set(t,e)},urule.Context.prototype.deleteFromNamedMap=function(t){this.rule.namedMap.delete(t)},urule.Context.prototype.getVariableCategoryFromNamedMap=function(t){return this.rule.namedMap.get(t)},urule.Context.prototype.getCanvas=function(){return this.container},urule.Context.prototype.getPaper=function(){return this.paper},urule.Context.prototype.setRootJoin=function(t){this.rootJoin=t},urule.Context.prototype.getRootJoin=function(){return this.rootJoin},urule.Context.prototype.getTotalChildrenCount=function(){return this.rootJoin.getChildrenCount()}},function(t,e,n){"use strict";var i=n(226),o=n(241);!function(t){t.fn.urule=function(){function e(e){if(t("#saveButton").hasClass("disabled"))return!1;var r='';r+="",t.each(parameterLibraries,function(t,e){r+=''}),t.each(variableLibraries,function(t,e){r+=''}),t.each(constantLibraries,function(t,e){r+=''}),t.each(actionLibraries,function(t,e){r+=''}),r+=g.remark.toXml();try{for(var A=0;A
    保存"),t("#saveButton").addClass("disabled"),t("#saveButtonNewVersion").html(" 保存新版本"),t("#saveButtonNewVersion").addClass("disabled"))}function r(e){var n=t("
    ");g.append(n);var i=new urule.Rule(g,n,e);return g.rules.push(i),window._setDirty(),i}function A(e){var n=t("
    ");g.append(n);var i=new urule.LoopRule(g,n,e);return g.rules.push(i),window._setDirty(),i}function a(){var e=window._server+"/common/loadXml";t.ajax({url:e,type:"POST",data:{files:s},error:function(t){t&&t.responseText?bootbox.alert("加载文件失败,服务端错误:"+t.responseText+""):bootbox.alert("加载文件失败,服务端出错")},success:function(t){var e=t[0],i=e.libraries;if(g.remark.setData(e.remark),i)for(var o=0;o\n
    \n \t",u=t(c);u.css({diaplay:"inline-block"}),this.append(u);var g=this;t("#addRuleButton").click(function(){var t=r();t.initTopJoin()}),t("#addLoopRuleButton").click(function(){var t=A();t.initTopJoin()}),t("#configVarButton").click(function(){g.configVarDialog||(g.configVarDialog=new urule.ConfigVariableDialog(g)),g.configVarDialog.open()}),t("#configConstantsButton").click(function(){g.configConstantDialog||(g.configConstantDialog=new urule.ConfigConstantDialog(g)),g.configConstantDialog.open()}),t("#configActionButton").click(function(){g.configActionDialog||(g.configActionDialog=new urule.ConfigActionDialog(g)),g.configActionDialog.open()}),t("#configParameterButton").click(function(){g.configParameterDialog||(g.configParameterDialog=new urule.ConfigParameterDialog(g)),g.configParameterDialog.open()}),t("#saveButton").click(function(){e(!1)}),t("#saveButtonNewVersion").click(function(){e(!0)}),t("#saveButton").addClass("disabled"),t("#saveButtonNewVersion").addClass("disabled");var d=t("
    ");this.append(d),this.remark=new Remark(d),a();var M=this;this.sortable({delay:200,update:function(e,n){var i=M.children("div");i.each(function(e,n){var i=t(n),o=i.prop("id"),r=M.rules,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),window._setDirty=function(){g._dirty||(g._dirty=!0,window._dirty=!0,t("#saveButton").html(" *保存"),t("#saveButton").removeClass("disabled"),t("#saveButtonNewVersion").html(" *保存新版本"),t("#saveButtonNewVersion").removeClass("disabled"))}}}(jQuery)},function(t,e){"use strict";urule.ComparisonOperator=function(t){this.inputType=null,this.operator="",this.container=generateContainer(),URule.setDomContent(this.container,"请选择比较操作符"),this.container.css({"font-size":"13px",color:"red",fontWeight:"bold","margin-right":"3px"});var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({onHide:function(){t()},menuItems:[{label:"大于",name:"GreaterThen",onClick:n},{label:"大于或等于",name:"GreaterThenEquals",onClick:n},{label:"小于",name:"LessThen",onClick:n},{label:"小于或等于",name:"LessThenEquals",onClick:n},{label:"等于",name:"Equals",onClick:n},{label:"等于(不分大小写)",name:"EqualsIgnoreCase",onClick:n},{label:"开始于",name:"StartWith",onClick:n},{label:"不开始于",name:"NotStartWith",onClick:n},{label:"结束于",name:"EndWith",onClick:n},{label:"不结束于",name:"NotEndWith",onClick:n},{label:"不等于",name:"NotEquals",onClick:n},{label:"不等于(不分大小写)",name:"NotEqualsIgnoreCase",onClick:n},{label:"在集合",name:"In",onClick:n},{label:"不在集合",name:"NotIn",onClick:n},{label:"为空",name:"Null",onClick:n},{label:"不为空",name:"NotNull",onClick:n},{label:"匹配正则表达式",name:"Match",onClick:n},{label:"不匹配正则表达式",name:"NotMatch",onClick:n},{label:"包含",name:"Contain",onClick:n},{label:"不包含",name:"NotContain",onClick:n}]}),this.container.click(function(t){e.menu.show(t)})},urule.ComparisonOperator.prototype.initRightValue=function(t){this.inputType&&this.inputType.setValueType(t.valueType,t)},urule.ComparisonOperator.prototype.setOperator=function(t){switch(t){case"GreaterThen":this.operator="GreaterThen",URule.setDomContent(this.container,"大于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"GreaterThenEquals":this.operator="GreaterThenEquals",URule.setDomContent(this.container,"大于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThen":this.operator="LessThen",URule.setDomContent(this.container,"小于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThenEquals":this.operator="LessThenEquals",URule.setDomContent(this.container,"小于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"StartWith":this.operator="StartWith",URule.setDomContent(this.container,"开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Equals":this.operator="Equals",URule.setDomContent(this.container,"等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EqualsIgnoreCase":this.operator="EqualsIgnoreCase",URule.setDomContent(this.container,"等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotStartWith":this.operator="NotStartWith",URule.setDomContent(this.container,"不开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EndWith":this.operator="EndWith",URule.setDomContent(this.container,"结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEndWith":this.operator="NotEndWith",URule.setDomContent(this.container,"不结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEquals":this.operator="NotEquals",URule.setDomContent(this.container,"不等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEqualsIgnoreCase":this.operator="NotEqualsIgnoreCase",URule.setDomContent(this.container,"不等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"In":this.operator="In",URule.setDomContent(this.container,"在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"NotIn":this.operator="NotIn",URule.setDomContent(this.container,"不在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"Null":this.operator="Null",URule.setDomContent(this.container,"为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"NotNull":this.operator="NotNull",URule.setDomContent(this.container,"不为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"Match":this.operator="Match",URule.setDomContent(this.container,"匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotMatch":this.operator="NotMatch",URule.setDomContent(this.container,"不匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Contain":this.operator="Contain",URule.setDomContent(this.container,"包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotContain":this.operator="NotContain",URule.setDomContent(this.container,"不包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType}window._setDirty()},urule.ComparisonOperator.prototype.getOperator=function(){if(""==this.operator)throw"请选择比较操作符!";return this.operator},urule.ComparisonOperator.prototype.getInputType=function(){return this.inputType},urule.ComparisonOperator.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ComplexArithmetic=function(t){this.container=$(""),this.operator="",this.rule=t,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod"}),this.container.append(this.selectorLabel),this.nextType=null;var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:n},{label:"-",name:"Sub",onClick:n},{label:"x",name:"Mul",onClick:n},{label:"÷",name:"Div",onClick:n},{label:"%",name:"Mod",onClick:n},{label:"删除",onClick:function(){window._setDirty(),e.nextType&&(e.nextType.getContainer().remove(),e.nextType=null,URule.setDomContent(e.selectorLabel,"."),e.selectorLabel.css({color:"#fff","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.ComplexArithmetic.prototype.setOperator=function(t){switch(window._setDirty(),this.operator=t,this.info="",t){case"Add":this.info="+";break;case"Sub":this.info="-";break;case"Mul":this.info="x";break;case"Div":this.info="÷";break;case"Mod":this.info="%"}URule.setDomContent(this.selectorLabel,this.info),this.selectorLabel.css({color:"green","padding-left":"4px","padding-right":"4px"}),this.nextType||(this.nextType=new urule.NextType(this.rule),this.container.append(this.nextType.getContainer()))},urule.ComplexArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.nextType.initData(t)}},urule.ComplexArithmetic.prototype.getDisplayContainer=function(){if(this.nextType){var t=$(""+this.info+"");return t.append(this.nextType.getDisplayContainer()),t}return null},urule.ComplexArithmetic.prototype.toXml=function(){if(!this.nextType)return"";var t='';return t+=this.nextType.toXml(),t+=""},urule.ComplexArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.VariableValue=function(t,e,n,i){this.arithmetic=t,this.container=$("");this.label=generateContainer(),this.functionProperty=i,this.container.append(this.label),this.label.css({color:"darkcyan"}),URule.setDomContent(this.label,"请选择变量"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._VariableValueArray.push(this),this.act=n,this.initMenu()},urule.VariableValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.variableLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.VariableValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.VariableValue.prototype.initMenu=function(t){var e=window._uruleEditorVariableLibraries;if(t&&(e=t),e){var n,i,o,r;n=this,i=function(t){n.setValue({variableCategory:t.label,variables:t.variables})},o=function(t){n.setValue({variables:t.parent.parent.variables,variableCategory:t.parent.parent.label,variableLabel:t.label,variableName:t.name,datatype:t.datatype})},r={menuItems:[]},$.each(e,function(t,e){$.each(e,function(t,e){var A=e.variables;n.functionProperty&&n.category&&e.name==n.category&&n.functionProperty.initMenu(A);var a={label:e.name,variables:A,onClick:i};$.each(A||[],function(t,e){if(a.subMenu||(a.subMenu={menuItems:[]}),n.matchAct(e.act)){var i={name:e.name,label:e.label,datatype:e.type,act:e.act,variables:A,onClick:o};a.subMenu.menuItems.push(i)}}),r.menuItems.push(a)})}),n.menu?n.menu.setConfig(r):n.menu=new URule.menu.Menu(r),this.label.click(function(t){n.menu.show(t)})}},urule.VariableValue.prototype.setValue=function(t){this.category=t.variableCategory,this.variableName=t.variableName,this.variableLabel=t.variableLabel,this.datatype=t.datatype,this.functionProperty&&this.functionProperty.initMenu(t.variables),this.variableLabel?URule.setDomContent(this.label,this.category+"."+this.variableLabel):URule.setDomContent(this.label,this.category),window._setDirty()},urule.VariableValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.VariableValue.prototype.toXml=function(){if(!this.category||""==this.category)throw"变量不能为空!";var t='var-category="'+this.category+'"';return this.variableName&&(t+=' var="'+this.variableName+'" var-label="'+this.variableLabel+'" datatype="'+this.datatype+'"'),t},urule.VariableValue.prototype.getType=function(){return this.variableName?"Variable":"VariableCategory"},urule.VariableValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ResourceListDialog=function(t,e,n){this.type=t,this.select=e,this.doSuccess=n,this.init()},urule.ResourceListDialog.prototype.open=function(){this.initData(),this.dialog.dialog("open")},urule.ResourceListDialog.prototype.close=function(){this.dialog.dialog("close")},urule.ResourceListDialog.prototype.getSelectedFile=function(){var t=!1,e=null,n=this.tree.getSelectedNodes();return n&&n.length>0&&(e=n[0],e.isParent||(t=!0)),t?e.fullPath:(URule.alert("请先选择一个库文件!"),null)},urule.ResourceListDialog.prototype.init=function(){var t=this;this.dialog=$("
    "),this.treeContainer=$("
    "),this.dialog.append(this.treeContainer),this.dialog.dialog({title:"库列表",height:500,width:400,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var e=t.getSelectedFile();e&&t.doSelectFile(e)}},{text:"选择版本",click:function(){var e=t.getSelectedFile();if(e){var n=new urule.ResourceVersionDialog(e);n.open(function(e){t.doSelectFile(e)})}}},{text:"取消",click:function(){$(this).dialog("close")}}]})},urule.ResourceListDialog.prototype.doSelectFile=function(t){var e="jcr:"+t;if(this.doSuccess)return this.doSuccess(this.type,e),void this.dialog.dialog("close");var n=!1;if(this.select.each(function(){$(this.childNodes).each(function(){var t=this.textContent;t==e&&(n=!0)})}),n)URule.alert("当前库文件已被添加!");else{var i=this,o=$(""+e+"");o.click(function(){i.select.find(".active").removeClass("active"),o.addClass("active")}),this.select.append(o),this.dialog.dialog("close")}},urule.ResourceListDialog.prototype.initData=function(){var t=this,e=(uruleServer||"")+"urule?action=loadrepo&filetype="+this.type+"&path="+t.getRequestParameter("file");$.ajax({cache:!1,dataType:"json",url:e,error:function(t,e){URule.alert("加载资源失败:"+e)},success:function(e){t.tree=$.fn.zTree.init(t.treeContainer,{},e)}})},urule.ResourceListDialog.prototype.getRequestParameter=function(t){for(var e=null,n=window.location.search.substring(1).split("&"),i=0;i");var t='';t+="",t+='',t+='',t+='',t+='',t+="
    版本号创建人创建时间
    ",this.table=$(t);var e="urule?action=loadversion&file="+this.path;this.table.bootstrapTable({url:e,onLoadSuccess:function(){n.table.css("margin-top","")}}),this.dialog.append(this.table);var n=this;this.dialog.dialog({title:"版本列表【"+n.path+"】",height:400,width:700,autoOpen:!1,modal:!0,show:!1,buttons:[{text:"确认",click:function(){var t=n.table.bootstrapTable("getSelections");return 0==t.length?void URule.alert("请选择一个版本!"):(n.doSuccess(n.path+":"+t[0].name),void $(this).dialog("close"))}},{text:"取消",click:function(){$(this).dialog("close")}}]})}},function(t,e){"use strict";urule.ConstantValue=function(t,e){this.arithmetic=t,this.container=$(""),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#0174DF"}),this.label.prop("innerText","请选择常量"),t&&this.container.append(t.getContainer()),e&&(this.setValue(e),t.initData(e.arithmetic)),this.initMenu(),window._ConstantValueArray.push(this)},urule.ConstantValue.prototype.setValue=function(t){this.category=t.constantCategory,this.constantName=t.constantName,this.constantLabel=t.constantLabel,URule.setDomContent(this.label,this.category+"."+this.constantLabel),window._setDirty()},urule.ConstantValue.prototype.initMenu=function(t){var e=window._uruleEditorConstantLibraries;if(t&&(e=t),e){var n,i,o;n=this,i=function(t){n.setValue({constantCategory:t.parent.parent.label,constantLabel:t.label,constantName:t.name})},o={menuItems:[]},$.each(e,function(t,e){var n=e.categories;$.each(n,function(t,e){var n={label:e.label},r=e.constants;$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.name,label:e.label,onClick:i})}),o.menuItems.push(n)})}),n.menu?n.menu.setConfig(o):n.menu=new URule.menu.Menu(o),this.label.click(function(t){n.menu.show(t)})}},urule.ConstantValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.constantLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ConstantValue.prototype.toXml=function(){if(!this.category)throw"常量不能为空!";var t='const-category="'+this.category+'" const="'+this.constantName+'" const-label="'+this.constantLabel+'"';return t},urule.ConstantValue.prototype.getContainer=function(){return this.container}},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var o=n(241),r=n(339),A=i(r);urule.ConfigActionDialog=function(t){this.parent=t,this.init()},urule.ConfigActionDialog.prototype.open=function(){var t=this;o.MsgBox.showDialog("动作库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ActionLibrary",callback:function(e,n){var i="jcr:"+e;"LATEST"!==n&&(i+=":"+n);var r=window.actionLibraries.indexOf(i);return r!==-1?void o.MsgBox.alert("动作库文件已存在"):(t.tbody.append(t.newLibRow(i)),window.actionLibraries.push(i),window.refreshActionLibraries(),void window._setDirty())}})}}])},urule.ConfigActionDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    动作库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),i=$('');return n.append(i),i.click(function(){var n=window.actionLibraries.indexOf(t);window.actionLibraries.splice(n,1),e.remove(),window.refreshActionLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var o=n(240),r=i(o);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var o=n(241),r=n(339),A=i(r);urule.ConfigConstantDialog=function(t){this.parent=t,this.init()},urule.ConfigConstantDialog.prototype.open=function(){var t=this;o.MsgBox.showDialog("常量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ConstantLibrary",callback:function(e,n){var i="jcr:"+e;"LATEST"!==n&&(i+=":"+n);var r=window.constantLibraries.indexOf(i);return r!==-1?void o.MsgBox.alert("常量库文件已存在"):(t.tbody.append(t.newLibRow(i)),window.constantLibraries.push(i),window.refreshConstantLibraries(),void window._setDirty())}})}}])},urule.ConfigConstantDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    常量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),i=$('');return n.append(i),i.click(function(){var n=window.constantLibraries.indexOf(t);window.constantLibraries.splice(n,1),e.remove(),window.refreshConstantLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var o=n(241),r=n(339),A=i(r);urule.ConfigParameterDialog=function(t){this.parent=t,this.init()},urule.ConfigParameterDialog.prototype.open=function(){var t=this;o.MsgBox.showDialog("参数库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ParameterLibrary",callback:function(e,n){var i="jcr:"+e;"LATEST"!==n&&(i+=":"+n);var r=window.parameterLibraries.indexOf(i);return r!==-1?void o.MsgBox.alert("参数库文件已存在"):(t.tbody.append(t.newLibRow(i)),window.parameterLibraries.push(i),window.refreshParameterLibraries(),void window._setDirty())}})}}])},urule.ConfigParameterDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    参数库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),i=$('');return n.append(i),i.click(function(){var n=window.parameterLibraries.indexOf(t);window.parameterLibraries.splice(n,1),e.remove(),window.refreshParameterLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var o=n(241),r=n(339),A=i(r);urule.ConfigVariableDialog=function(t){this.parent=t,this.init()},urule.ConfigVariableDialog.prototype.open=function(){var t=this;o.MsgBox.showDialog("变量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"VariableLibrary",callback:function(e,n){var i="jcr:"+e;"LATEST"!==n&&(i+=":"+n);var r=window.variableLibraries.indexOf(i);return r!==-1?void o.MsgBox.alert("变量库文件已存在"):(t.tbody.append(t.newLibRow(i)),window.variableLibraries.push(i),window.refreshVariableLibraries(),void window._setDirty())}})}}])},urule.ConfigVariableDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    变量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),i=$('');return n.append(i),i.click(function(){var n=window.variableLibraries.indexOf(t);window.variableLibraries.splice(n,1),e.remove(),window.refreshVariableLibraries(),window._setDirty()}),e.append(n),e}},function(t,e){"use strict";urule.ActionType=function(t,e){this.uuid=Math.uuid(),t.prop("id",this.uuid),this.rule=e,this.parentContainer=t,this.type="",this.init(),window._ActionTypeArray.push(this),this.initMenu()},urule.ActionType.prototype.toXml=function(){if("execute-function"==this.type){var t="",t+=this.action.getParameter().toXml(),t+=""}return this.action.toXml()},urule.ActionType.prototype.initData=function(t){if(t){var e=t.actionType;this.setAction(e,t)}},urule.ActionType.prototype.init=function(){this.container=generateContainer(),URule.setDomContent(this.container,"请选择动作类型"),this.container.css({color:"green"}),this.parentContainer.append(this.container),this.action=null},urule.ActionType.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,i,o;n=this,i=function(t){var e=t.parent.parent;n.setAction("ExecuteMethod",{beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},o={menuItems:[{label:"打印内容到控制台",onClick:function(){n.setAction("ConsolePrint")}},{label:"变量赋值",onClick:function(){n.setAction("VariableAssign")}},{label:"执行函数",onClick:function(){n.setAction("ExecuteCommonFunction")}}]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:i})}),o.menuItems.push(n)})}),n.menu?n.menu.setConfig(o):n.menu=new URule.menu.Menu(o),this.container.click(function(t){n.menu.show(t)})},urule.ActionType.prototype.initDefaultMenuData=function(){var t=this,e=[];return e.push({name:"打印内容到控制台",fun:function(){t.setAction("ConsolePrint")}}),e.push({name:"变量赋值",fun:function(){t.setAction("VariableAssign")}}),e},urule.ActionType.prototype.setAction=function(t,e){ +switch(window._setDirty(),this.action&&this.action.getContainer().remove(),t){case"ConsolePrint":this.action=new urule.PrintAction(this.rule),URule.setDomContent(this.container,"输出:"),this.type="console-print";break;case"ExecuteMethod":this.action=new urule.MethodAction(this.rule),URule.setDomContent(this.container,"执行方法:"),this.type="execute-method";break;case"VariableAssign":this.action=new urule.AssignmentAction(this.rule),URule.setDomContent(this.container,"变量赋值:"),this.type="var-assign";break;case"ExecuteCommonFunction":this.action=new urule.FunctionValue(null,null,this.rule),URule.setDomContent(this.container,"执行函数:"),this.type="execute-function"}this.parentContainer.append(this.action.getContainer()),this.action.initData(e)}},function(t,e){"use strict";urule.PrintAction=function(t){this.container=$(""),this.beforeContainer=$(""),URule.setDomContent(this.beforeContainer,""),this.container.append(this.beforeContainer),this.inputType=new urule.InputType(null,null,null,t),this.inputTypeContainer=this.inputType.getContainer(),this.container.append(this.inputTypeContainer),this.afterContainer=$(""),URule.setDomContent(this.afterContainer,""),this.container.append(this.afterContainer)},urule.PrintAction.prototype.initData=function(t){if(t){var e=t.value;e&&this.inputType.setValueType(e.valueType,e)}},urule.PrintAction.prototype.toXml=function(){var t="";return t+=this.inputType.toXml(),t+=""},urule.PrintAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.AssignmentAction=function(t){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"请选择值类型"),this.label.css({color:"blue"}),this.valueContainer=$(""),this.container.append(this.valueContainer),this.leftVariable=new urule.VariableValue(null,null,"Out"),this.leftParameter=new urule.ParameterValue(null,null,"Out"),this.leftReference=new urule.NamedReferenceValue(null,null,t),this.valueContainer.append(this.leftVariable.getContainer()),this.valueContainer.append(this.leftParameter.getContainer()),this.valueContainer.append(this.leftReference.getContainer()),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide();var e=$("");URule.setDomContent(e,"="),e.css({color:"red",fontWeight:"blod"}),this.container.append(e),this.inputType=new urule.InputType(null,null,null,t),this.container.append(this.inputType.getContainer());var n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){n.leftParameter.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftVariable.getContainer().show(),n.type="variable",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}},{label:"选择参数",onClick:function(){n.leftVariable.getContainer().hide(),n.leftReference.getContainer().hide(),n.leftParameter.getContainer().show(),n.type="parameter",URule.setDomContent(n.label,"."),n.label.css({color:"white"})}}]}),this.label.click(function(t){n.menu.show(t)})},urule.AssignmentAction.prototype.initData=function(t){if(t){this.type=t.type,this.type&&"parameter"==this.type?(this.leftParameter.setValue(t),this.leftVariable.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftParameter.getContainer().show()):this.type&&"NamedReference"==this.type?(this.leftReference.initData(t),this.leftVariable.getContainer().hide(),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().show()):(this.type="variable",this.leftVariable.setValue(t),this.leftParameter.getContainer().hide(),this.leftReference.getContainer().hide(),this.leftVariable.getContainer().show());var e=t.value;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}URule.setDomContent(this.label,"."),this.label.css({color:"white"})}},urule.AssignmentAction.prototype.toXml=function(){var t="',t+=this.inputType.toXml(),t+=""},urule.AssignmentAction.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleArithmetic=function(){this.container=$(""),this.selectorLabel=generateContainer(),URule.setDomContent(this.selectorLabel,"."),this.selectorLabel.css({color:"#FFF"}),this.operator="",this.container.append(this.selectorLabel),this.value=null;var t=this,e=function(e){t.setOperator(e.name)};t.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:e},{label:"-",name:"Sub",onClick:e},{label:"x",name:"Mul",onClick:e},{label:"÷",name:"Div",onClick:e},{label:"%",name:"Mod",onClick:e},{label:"删除",onClick:function(){t.value&&(t.value.getContainer().remove(),t.operator=null,t.value=null,URule.setDomContent(t.selectorLabel,"."),t.selectorLabel.css({color:"#FFF","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(e){t.menu.show(e)})},urule.SimpleArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.value.initData(t.value)}},urule.SimpleArithmetic.prototype.setOperator=function(t){window._setDirty(),this.operator=t;var e="";switch(t){case"Add":e="+";break;case"Sub":e="-";break;case"Mul":e="x";break;case"Div":e="÷";break;case"Mod":e="%"}this.selectorLabel.css({color:"green",fontWeight:"blod","padding-left":"5px","padding-right":"5px"}),URule.setDomContent(this.selectorLabel,e),this.value||(this.simpleArithmetic=new urule.SimpleArithmetic,this.value=new urule.SimpleValue(this.simpleArithmetic),this.container.append(this.value.getContainer()))},urule.SimpleArithmetic.prototype.toXml=function(){if(!this.operator||""==this.operator)return"";if(!this.value)throw"请输入具体值!";var t=this.value.getValue();if(""==t)throw"请输入具体值!";var e='';return e+=this.simpleArithmetic.toXml(),e+=""},urule.SimpleArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.RuleProperty=function(t,e,n,i){this.parent=t,this.value=n,this.editorType=i,this.container=$("");var o=$("");this.name=e;var r=this.getLabel();URule.setDomContent(o,r+":"),this.container.append(o);var A=$(""),a=generateContainer();""==n&&(n="无"),a.css({color:"#000"}),URule.setDomContent(a,n),A.append(a),this.container.append(A);var s=null;this.radioName=Math.uuid(15),this.yesRadio=null,this.noRadio=null,1==i?s=$(""):2==i?s=$(""):3==i&&(this.yesRadio=$(" 是 "),this.noRadio=$(" 否"));var l=this;if(3!=i){if(s.blur(function(){l.value=s.prop("value"),s.hide(),""==l.value?URule.setDomContent(a,"无"):URule.setDomContent(a,l.value),a.show(),window._setDirty()}),a.click(function(){a.hide(),s.prop("value",l.value),s.show(),s.focus()}),this.container.append(s),s.hide(),2==i&&"无"!==n){new Date(n);this.value=n,URule.setDomContent(a,this.value)}}else 1==n?this.yesRadio.prop("checked",!0):this.noRadio.prop("checked",!0),this.yesRadio.change(function(){window._setDirty()}),this.noRadio.change(function(){window._setDirty()}),a.hide(),this.container.append(this.yesRadio),this.container.append(this.noRadio);var c=$('');c.click(function(){l.container.remove();var t=l.parent.properties.indexOf(l);l.parent.properties.splice(t,1),window._setDirty()}),this.container.append(c)},urule.RuleProperty.prototype.getLabel=function(){var t="";return"salience"==this.name?t="优先级":"loop"==this.name?t="允许循环触发":"effective-date"==this.name?t="生效日期":"expires-date"==this.name?t="失效日期":"enabled"==this.name?t="是否启用":"debug"==this.name?t="允许调试信息输出":"activation-group"==this.name?t="互斥组":"agenda-group"==this.name?t="执行组":"auto-focus"==this.name?t="自动获取焦点":"ruleflow-group"==this.name&&(t="规则流组"),t},urule.RuleProperty.prototype.toXml=function(){var t=this.name;if(3==this.editorType)t+=this.yesRadio.prop("checked")?'="true"':'="false"';else{if(!this.value||""==this.value)throw"请输入属性"+this.name+"的具体值!";t+='="'+this.value+'"'}return t},urule.RuleProperty.prototype.getContainer=function(){return this.container}},,,function(t,e){"use strict";urule.InputType=function(t,e,n,i){this.container=$(""),this.label=generateContainer(),this.rule=i,this.container.append(this.label),e?(URule.setDomContent(this.label,e),this.label.css({color:"gray"})):(URule.setDomContent(this.label,"选择值类型"),this.label.css({color:"blue"})),this.functionProperty=n,this.variableValue=null,this.simpleValue=null,this.referenceValue=null,this.methodValue=null,this.constantValue=null,this.functionValue=null,this.dataContainer=$(""),this.container.append(this.dataContainer),this.type="";var o=this,r=function(t){o.setValueType(t.name)};if(o.menu=new URule.menu.Menu({menuItems:[{label:"输入值",name:"Input",onClick:r},{label:"选择变量",name:"Variable",onClick:r},{label:"选择常量",name:"Constant",onClick:r},{label:"选择参数",name:"Parameter",onClick:r}]}),o.menu.menuItems.push({label:"选择方法",name:"Method",onClick:r},{label:"选择函数",name:"CommonFunction",onClick:r}),this.label.click(function(t){o.menu.show(t)}),t){var A=$(""+t+"");this.container.append(A)}},urule.InputType.prototype.getDisplayContainer=function(){var t=$("");return"Input"==this.type?t.append(this.simpleValue.getDisplayContainer()):"Variable"==this.type||"VariableCategory"==this.type?t.append(this.variableValue.getDisplayContainer()):"Constant"==this.type?t.append(this.constantValue.getDisplayContainer()):"Method"==this.type?t.append(this.methodValue.getDisplayContainer()):"Parameter"==this.type?t.append(this.parameterValue.getDisplayContainer()):"CommonFunction"==this.type?t.append(this.functionValue.getDisplayContainer()):"NamedReference"==this.type&&t.append(this.referenceValue.getDisplayContainer()),t},urule.InputType.prototype.setValueType=function(t,e){switch(window._setDirty(),this.type=t,this.variableValue&&this.variableValue.getContainer().hide(),this.constantValue&&this.constantValue.getContainer().hide(),this.simpleValue&&this.simpleValue.getContainer().hide(),this.referenceValue&&this.referenceValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.parameterValue&&this.parameterValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),URule.setDomContent(this.label,"."),this.label.css({color:"#FDFDFD"}),t){case"Input":this.simpleValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.simpleValue=new urule.SimpleValue(this.arithmetic,e),this.dataContainer.append(this.simpleValue.getContainer())),this.simpleValue.getContainer().show(),this.type="Input";break;case"NamedReference":this.referenceValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.referenceValue=new urule.NamedReferenceValue(this.arithmetic,e,this.rule),this.dataContainer.append(this.referenceValue.getContainer())),this.referenceValue.getContainer().show(),this.type="NamedReference";break;case"Constant":this.constantValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.constantValue=new urule.ConstantValue(this.arithmetic,e),this.dataContainer.append(this.constantValue.getContainer())),this.constantValue.getContainer().show(),this.type="Constant";break;case"Method":this.methodValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.methodValue=new urule.MethodValue(this.arithmetic,e,this.dataContainer),this.dataContainer.append(this.methodValue.getContainer())),this.methodValue.getContainer().show(),this.type="Method";break;case"Parameter":this.parameterValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.parameterValue=new urule.ParameterValue(this.arithmetic,e,"In"),this.dataContainer.append(this.parameterValue.getContainer())),this.parameterValue.getContainer().show(),this.type="Parameter";break;case"CommonFunction":this.functionValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.functionValue=new urule.FunctionValue(this.arithmetic,e,"In"),this.dataContainer.append(this.functionValue.getContainer())),this.functionValue.getContainer().show(),this.type="CommonFunction";break;default:this.variableValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.variableValue=new urule.VariableValue(this.arithmetic,e,"In",this.functionProperty),this.dataContainer.append(this.variableValue.getContainer())),this.variableValue.getContainer().show(),this.type="Variable"}},urule.InputType.prototype.toXml=function(){if(""==this.type)return"";var t=""),this.rule=t,this.inputType=null,this.paren=null,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod",color:"#fff"}),this.container.append(this.selectorLabel),URule.setDomContent(this.selectorLabel,".");var e=this,n=function(t){var n=t.name;e.doNext(n),window._setDirty()};e.menu=new URule.menu.Menu({menuItems:[{label:"值",name:"value",onClick:n},{label:"括号",name:"paren",onClick:n}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.NextType.prototype.initData=function(t){var e=t.value,n=e.valueType;"Paren"==n?(this.doNext("paren"),this.paren.initData(e)):(this.doNext("value"),this.inputType.setValueType(n,e))},urule.NextType.prototype.toXml=function(){return this.paren?this.paren.toXml():this.inputType?this.inputType.toXml():""},urule.NextType.prototype.getDisplayContainer=function(){return this.inputType?this.inputType.getDisplayContainer():this.paren?this.paren.getDisplayContainer():null},urule.NextType.prototype.getContainer=function(){return this.container},urule.NextType.prototype.doNext=function(t){"value"==t?(this.paren&&(this.paren.getContainer().remove(),this.paren=null),this.inputType||(this.inputType=new urule.InputType(null,null,null,this.rule),this.container.append(this.inputType.getContainer()))):"paren"==t&&(this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null),this.paren||(this.paren=new urule.Paren(this.rule),this.container.append(this.paren.getContainer())))}},function(t,e){"use strict";urule.Paren=function(t){this.container=$(""),this.leftParen=$("("),this.leftParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.rightParen=$(")"),this.rightParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.parenContainer=$(""),this.container.append(this.leftParen),this.container.append(this.parenContainer),this.container.append(this.rightParen),this.inputType=new urule.InputType(null,null,null,t),this.parenContainer.append(this.inputType.getContainer()),this.arithmetic=new urule.ComplexArithmetic(t),this.container.append(this.arithmetic.getContainer())},urule.Paren.prototype.initData=function(t){var e=t.value,n=e.valueType;this.inputType.setValueType(n,e),this.arithmetic.initData(t.arithmetic)},urule.Paren.prototype.getDisplayContainer=function(){return this.inputType.getDisplayContainer()},urule.Paren.prototype.toXml=function(){if(!this.inputType)throw"请输入括号内容!";var t="";return t+=this.inputType.toXml(),this.arithmetic&&(t+=this.arithmetic.toXml()),t+=""},urule.Paren.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodParameter=function(t){this.inputType=new urule.InputType(null,null,null,t),this.container=this.inputType.getContainer()},urule.MethodParameter.prototype.initData=function(t){if(t&&(this.name=t.name,this.type=t.type,t.value)){var e=t.value;e.valueType&&this.inputType.setValueType(e.valueType,e)}},urule.MethodParameter.prototype.toXml=function(){var t='';return t+=this.inputType.toXml(),t+=""},urule.MethodParameter.prototype.getContainer=function(){return this.container},urule.MethodParameter.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";urule.MethodAction=function(t){this.parameters=[],this.rule=t,this.init()},urule.MethodAction.prototype.init=function(){this.container=$(""),this.nameContainer=$(""),this.container.append(this.nameContainer),this.nameContainer.css({color:"darkblue"})},urule.MethodAction.prototype.initData=function(t){if(t){this.bean=t.beanId,this.name=t.beanLabel,this.method=t.methodName,this.methodLabel=t.methodLabel;var e=t.parameters;if(this.parameterCount=0,e&&(this.parameterCount=e.length),0===this.parameterCount){URule.setDomContent(this.nameContainer,this.methodLabel);var n=$("(无参数)");this.container.append(n)}else URule.setDomContent(this.nameContainer,this.methodLabel+"(");if(0!=this.parameterCount){for(var i=0;i0){var r=$(";");this.container.append(r)}if(this.parameterCount>0){var A=$(" "+o.name+":");this.container.append(A)}var a=new urule.MethodParameter(this.rule);this.parameters.push(a),this.container.append(a.getContainer()),a.initData(o)}this.container.append(")")}}},urule.MethodAction.prototype.toXml=function(){if(!this.name||""==this.name)throw"请选择要执行的方法!";for(var t='',e=0;e"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#6b3db0"}),URule.setDomContent(this.label,"请选择参数"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._ParameterValueArray.push(this),this.act=n,this.initMenu()},urule.ParameterValue.prototype.getDisplayContainer=function(){var t=$("参数."+this.parameterLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ParameterValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.ParameterValue.prototype.initMenu=function(t){var e=window._uruleEditorParameterLibraries;if(t&&(e=t),e){var n,i,o;n=this,i=function(t){n.setValue({variableName:t.name,variableLabel:t.label,datatype:t.datatype})},o={menuItems:[]},$.each(e,function(t,e){$.each(e||[],function(t,e){if(n.matchAct(e.act)){var r={name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:i};o.menuItems.push(r)}})}),n.menu?n.menu.setConfig(o):n.menu=new URule.menu.Menu(o),this.label.click(function(t){n.menu.show(t)})}},urule.ParameterValue.prototype.setValue=function(t){this.parameterName=t.variableName,this.parameterLabel=t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.label,"参数."+this.parameterLabel),window._setDirty()},urule.ParameterValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.ParameterValue.prototype.toXml=function(){if(!this.parameterLabel||""==this.parameterLabel)throw"参数不能为空!";var t=' var-category="参数" var="'+this.parameterName+'" var-label="'+this.parameterLabel+'" datatype="'+this.datatype+'"';return t},urule.ParameterValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodValue=function(t,e){this.arithmetic=t,this.container=$(""),this.rightParn=$("]"),this.label=generateContainer(),this.fetchLength=!1,this.uppercase=!1,this.lowercase=!1,this.fetchSize=!1,this.container.append(this.label),this.label.css({color:"blue"}),this.actionContainer=$(""),this.container.append(this.actionContainer),URule.setDomContent(this.label,"请选择方法"),t&&this.container.append(t.getContainer()),e&&(this.setAction(e),t.initData(e.arithmetic)),window._ActionTypeArray.push(this),this.initMenu()},urule.MethodValue.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,i,o;n=this,i=function(t){var e=t.parent.parent;n.setAction({beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},o={menuItems:[]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:i})}),o.menuItems.push(n)})}),n.menu?n.menu.setConfig(o):n.menu=new URule.menu.Menu(o),this.label.click(function(t){n.menu.show(t)})},urule.MethodValue.prototype.setAction=function(t){window._setDirty(),this.action&&this.action.getContainer().remove(),this.action=new urule.MethodAction,URule.setDomContent(this.label,"["),this.actionContainer.append(this.action.getContainer()),this.actionContainer.append(this.rightParn),this.action.initData(t)},urule.MethodValue.prototype.getDisplayContainer=function(){var t="",e="";this.action&&(t=this.action.name,e=this.action.methodLabel);var n=$(""+e+"");if(this.arithmetic){var i=this.arithmetic.getDisplayContainer();i&&n.append(i)}return n},urule.MethodValue.prototype.toXml=function(){if(!this.action.bean||""==this.action.name)throw"执行方法不能为空!";var t='bean-name="'+this.action.bean+'"';return t+=' bean-label="'+this.action.name+'"',t+=' method-name="'+this.action.method+'"',t+=' method-label="'+this.action.methodLabel+'"'},urule.MethodValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionProperty=function(){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"选择属性"),this.label.css({color:"#004C85"})},urule.FunctionProperty.prototype.toXml=function(){if(!this.variableName)throw"请选择函数属性";var t='property-name="'+this.variableName+'"';return t+=' property-label="'+this.variableLabel+'"'},urule.FunctionProperty.prototype.initMenu=function(t){if(t){var e=this,n=function(t){e.setProperty({name:t.name,label:t.label,datatype:t.type})},i={menuItems:[]};$.each(t,function(t,e){i.menuItems.push({name:e.name,label:e.label,datatype:e.type,onClick:n})}),this.menu=new URule.menu.Menu(i),this.label.click(function(t){e.menu.show(t)})}},urule.FunctionProperty.prototype.setProperty=function(t){window._setDirty(),this.variableName=t.name,this.variableLabel=t.label,URule.setDomContent(this.label,this.variableLabel)},urule.FunctionProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionParameter=function(t){this.container=$(""),this.nameContainer=$(""),this.rule=t,this.container.append(this.nameContainer),this.nameContainer.css({color:"gray"})},urule.FunctionParameter.prototype.initData=function(t){if(t){this.name=t.name,URule.setDomContent(this.nameContainer,this.name+":"),(t.needProperty||t.property)&&(this.functionProperty=new urule.FunctionProperty,this.functionProperty.setProperty({name:t.property,label:t.propertyLabel})),this.inputType=new urule.InputType(null,null,this.functionProperty,this.rule);var e=t.objectParameter;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}this.container.append(this.inputType.getContainer()),this.functionProperty&&(this.container.append($("")),this.container.append($("属性:")),this.container.append(this.functionProperty.getContainer()))}},urule.FunctionParameter.prototype.toXml=function(){if(!this.name)return"";var t="",t+=this.inputType.toXml(),t+=""},urule.FunctionParameter.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionValue=function(t,e,n){this.arithmetic=t,this.container=$(""),this.rule=n,this.leftParn=$("("),this.rightParn=$(")"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#008080"}),this.functionContainer=$(""),this.container.append(this.functionContainer),URule.setDomContent(this.label,"请选择函数"),t&&this.container.append(t.getContainer()),e&&(this.setFunction(e),t&&t.initData(e.arithmetic)),window._FunctionValueArray.push(this),this.initMenu()},urule.FunctionValue.prototype.getDisplayContainer=function(){var t=$(""+this.functionName+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.FunctionValue.prototype.toXml=function(){if(!this.functionLabel)throw"请选择函数";if(!this.functionName)throw"请选择函数";var t=' function-label="'+this.functionLabel+'"';return t+=' function-name="'+this.functionName+'"'},urule.FunctionValue.prototype.initMenu=function(t){var e=window._uruleEditorFunctionLibraries;t&&(e=t);var n,i,o;n=this,i=function(t){n.setFunction({parameter:t.parameter,label:t.label,name:t.name})},o={menuItems:[]},$.each(e||[],function(t,e){o.menuItems.push({name:e.name,label:e.label,parameter:e.argument,onClick:i})}),n.menu?n.menu.setConfig(o):n.menu=new URule.menu.Menu(o),this.label.click(function(t){n.menu.show(t)})},urule.FunctionValue.prototype.initData=function(t){t&&this.setFunction(t)},urule.FunctionValue.prototype.setFunction=function(t){window._setDirty(),this.functionContainer.empty(),URule.setDomContent(this.label,t.label),this.functionContainer.append(this.leftParn),this.functionLabel=t.label,this.functionName=t.name,this.parameter=new urule.FunctionParameter(this.rule),this.parameter.initData(t.parameter),this.functionContainer.append(this.parameter.getContainer()),this.functionContainer.append(this.rightParn)},urule.FunctionValue.prototype.getFirstParameter=function(){return this.firstParameter},urule.FunctionValue.prototype.getParameter=function(){return this.parameter},urule.FunctionValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleValue=function(t,e){var n="请输入值";this.container=$(""),this.valueContainer=generateContainer(),this.valueContainer.css({color:"rgb(180,95,4)"}),this.editor=$('');var i=this;this.container.append(this.valueContainer).append(this.editor),this.editor.blur(function(){i.editor.hide();var t=i.editor.prop("value");""!=t&&URule.setDomContent(i.valueContainer,t),i.valueContainer.show(),$(this).trigger("DOMSubtreeModified"),window._setDirty()}).mousedown(function(t){t.stopPropagation()}).keydown(function(t){t.stopPropagation()}),i.editor.hide(),this.valueContainer.prop("innerText",n),this.valueContainer.click(function(){i.valueContainer.hide();var t=i.container.parent(),e=120;if(t&&t.parent()&&t.parent().parent()){t=t.parent().parent();var n=t.prop("class");n&&"htMiddle htDimmed current"==n&&(e=t.width()-20)}i.editor.css({width:e}),i.editor.css({display:"inline"}),i.editor.focus(),$(this).trigger("DOMSubtreeModified")}),this.arithmetic=t,this.container.append(t.getContainer()),this.initData(e)},urule.SimpleValue.prototype.getDisplayContainer=function(){var t=$(""+this.editor.prop("value")+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.SimpleValue.prototype.initData=function(t){if(t){var e=t.content;URule.setDomContent(this.valueContainer,e),this.editor.prop("value",e),this.arithmetic&&this.arithmetic.initData(t.arithmetic)}},urule.SimpleValue.prototype.getValue=function(){var t=this.editor.prop("value");return t=t.replace(new RegExp("&","gm"),"&"),t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("'","gm"),"'"),t=t.replace(new RegExp('"',"gm"),""")},urule.SimpleValue.prototype.getContainer=function(){return this.container}},,,,,,,,function(t,e,n){"use strict";var i=n(241);urule.Rule=function(t,e,n){this.uuid=Math.uuid(),this.namedMap=new Map,this.namedReferenceValues=[],e.prop("id",this.uuid),this.parent=t,this.container=e,this.data=n,this.actions=[],this.elseActions=[],this.properties=[],this.init(),this.initData()},urule.Rule.prototype.init=function(){this.ruleContainer=$("
    "),this.container.append(this.ruleContainer),this.initRemark(),this.initHeader(),this.initIf(),this.initThen(),this.initElse()},urule.Rule.prototype.initData=function(){if(this.data){this.name=this.data.name,this.nameLabel.prop("innerText",this.name);var t=this.data.salience;t&&this.addProperty(new urule.RuleProperty(this,"salience",t,1));var e=this.data.loop;null!=e&&this.addProperty(new urule.RuleProperty(this,"loop",e,3));var n=this.data.effectiveDate;n&&this.addProperty(new urule.RuleProperty(this,"effective-date",n,2));var i=this.data.expiresDate;i&&this.addProperty(new urule.RuleProperty(this,"expires-date",i,2));var o=this.data.enabled;null!=o&&this.addProperty(new urule.RuleProperty(this,"enabled",o,3));var r=this.data.debug;null!=r&&this.addProperty(new urule.RuleProperty(this,"debug",r,3));var A=this.data.activationGroup;A&&this.addProperty(new urule.RuleProperty(this,"activation-group",A,1));var a=this.data.agendaGroup;a&&this.addProperty(new urule.RuleProperty(this,"agenda-group",a,1));var s=this.data.autoFocus;null!=s&&this.addProperty(new urule.RuleProperty(this,"auto-focus",s,3));var l=this.data.ruleflowGroup;l&&this.addProperty(new urule.RuleProperty(this,"ruleflow-group",s,1));var c=this.data.remark;this.remark.setData(c);var u=this.data.lhs;if(u){var g=u.criterion;g?this.initCriterion(g):this.initCriterion()}else this.initCriterion();var d=this.data.rhs;if(d){var M=d.actions;if(M)for(var p=0;p
    ");this.remark=new Remark(t),this.ruleContainer.append(t)},urule.Rule.prototype.initHeader=function(){this.nameContainer=$("
    "),this.ruleContainer.append(this.nameContainer), +this.label=$("规则 "),this.nameContainer.append(this.label),this.nameEditor=$("").hide(),this.name="rule",this.nameLabel=$(""+this.name+""),this.label.append(this.nameEditor),this.label.append(this.nameLabel);var t=this;this.nameLabel.click(function(){t.nameLabel.hide(),t.nameEditor.show(),t.nameEditor.prop("value",t.name),t.nameEditor.focus()}),this.nameEditor.blur(function(){var e=t.nameEditor.prop("value");return!e||e.length<2?void bootbox.alert("规则名不合法"):(t.name=e,t.nameEditor.hide(),t.nameLabel.show(),URule.setDomContent(t.nameLabel,t.name),void window._setDirty())}),this.nameEditor.hide();var e=$('');e.click(function(){var e="真的要删除规则"+t.name+"?";i.MsgBox.confirm(e,function(){var e=t.parent.rules.indexOf(t);t.parent.rules.splice(e,1),t.container.remove(),window._setDirty()})}),this.nameContainer.append(e),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var n=$("添加属性"),o=function(e){var n=new urule.RuleProperty(t,e.name,e.defaultValue,e.editorType);t.addProperty(n)};t.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:o},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:o},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:o},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:o},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:o},{label:"互斥组",name:"activation-group",defaultValue:"",editorType:1,onClick:o},{label:"执行组",name:"agenda-group",defaultValue:"",editorType:1,onClick:o},{label:"自动获取焦点",name:"auto-focus",defaultValue:!0,editorType:3,onClick:o},{label:"允许循环触发",name:"loop",defaultValue:!1,editorType:3,onClick:o}]}),n.click(function(e){t.menu.show(e)}),this.ruleContainer.append(n),this.ruleContainer.append(this.propertyContainer)},urule.Rule.prototype.initIf=function(){this.ifLabel=$("
    如果
    "),this.ruleContainer.append(this.ifLabel),this.conditionContainer=$("
    "),this.conditionContainer.css({height:"40px",position:"relative"}),this.ruleContainer.append(this.conditionContainer)},urule.Rule.prototype.initThen=function(){this.thenLabel=$("那么"),this.ruleContainer.append(this.thenLabel),this.actionContainer=$("
    "),this.ruleContainer.append(this.actionContainer);var t=this;this.actionContainer.sortable({delay:200,update:function(e,n){var i=t.actionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.actions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.addActionButton=$("添加动作");var e=this;this.addActionButton.click(function(){e.addAction()}),this.thenLabel.append(this.addActionButton)},urule.Rule.prototype.initElse=function(){this.elseContainer=$("
    "),this.ruleContainer.append(this.elseContainer),this.elseLabel=$("否则"),this.elseContainer.append(this.elseLabel),this.elseActionContainer=$("
    "),this.elseContainer.append(this.elseActionContainer);var t=this;this.elseActionContainer.sortable({delay:200,update:function(e,n){var i=t.elseActionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.elseActions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.addElseActionButton=$("添加动作");var e=this;this.addElseActionButton.click(function(){e.addAction(null,!0)}),this.elseLabel.append(this.addElseActionButton)},urule.Rule.prototype.addAction=function(t,e){var n=this,i=$("
    "),o=$('');i.append(o);var r=null;r=e?new urule.ActionType(i):new urule.ActionType(i,this),o.click(function(){if(e){var t=n.elseActions.indexOf(r);n.elseActions.splice(t,1)}else{var t=n.actions.indexOf(r);n.actions.splice(t,1)}i.remove(),window._setDirty()}),e?(this.elseActions.push(r),this.elseActionContainer.append(i)):(this.actions.push(r),this.actionContainer.append(i)),t&&r.initData(t),window._setDirty()},urule.Rule.prototype.toXml=function(){for(var t='",t+=this.join.toXml(),t+="",t+="";for(var e=0;e",t+="";for(var e=0;eul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function i(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function o(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n ul > li");i.is(":visible")?(i.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(i.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var o=this.props.expandLevel;if(i._level>=o){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(i)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var i="treenodemenu"+t.id;e.contextmenu({target:"#"+i})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,i=e.dispatch,o=n.children,r="node-"+n.id,A="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(I.default,{items:n.contextMenu,key:n.id,data:n,dispatch:i,menuId:A})),o&&o.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(p.default,{dispatch:i,children:o,expandLevel:this.props.expandLevel}));var l=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var i=window._server+n.editorPath+"?file="+n.fullPath;T.eventEmitter.emit(T.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:i,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof l?"undefined":s(l))?l.v:void 0}}]),e}(c.Component);e.default=E},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n"),this.referenceName=null,this.propertyName=null,this.propertyLabel=null,this.rule=n,n&&n.namedReferenceValues.push(this),this.referenceNamelabel=generateContainer(),this.container.append(this.referenceNamelabel),this.referenceNamelabel.css({color:"#9C27B0"}),URule.setDomContent(this.referenceNamelabel,"请选择引用变量名"),this.referencePropertylabel=generateContainer(),this.referencePropertylabel.css({color:"#673AB7"}),this.container.append(this.referencePropertylabel),URule.setDomContent(this.referencePropertylabel,"请选择变量属性"),t&&this.container.append(t.getContainer()),e&&this.initData(e),this.initMenu()},urule.NamedReferenceValue.prototype.getDisplayContainer=function(){var t=$(""+this.propertyName+"."+this.propertyLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.NamedReferenceValue.prototype.initMenu=function(){if(this.rule){var t=this,e={menuItems:[]},n=!0,i=!1,o=void 0;try{for(var r,A=function(){var n=r.value;e.menuItems.push({label:n,onClick:function(e){t.referenceName=n,URule.setDomContent(t.referenceNamelabel,t.referenceName+".");var i=t.rule.namedMap.get(n)||{},o=i.variables||[];t.initPropertyMenu(o),window._setDirty()}})},a=this.rule.namedMap.keys()[Symbol.iterator]();!(n=(r=a.next()).done);n=!0)A()}catch(t){i=!0,o=t}finally{try{!n&&a.return&&a.return()}finally{if(i)throw o}}if(this.referenceName&&this.rule){var s=this.rule.namedMap.get(this.referenceName)||{},l=s.variables;l&&t.initPropertyMenu(l)}t.menu?t.menu.setConfig(e):t.menu=new URule.menu.Menu(e),this.referenceNamelabel.click(function(e){t.menu.show(e)})}},urule.NamedReferenceValue.prototype.initPropertyMenu=function(t){var e=this,n={menuItems:[]},i=!0,o=!1,r=void 0;try{for(var A,a=function(){var t=A.value;n.menuItems.push({label:t.label,onClick:function(n){e.propertyName=t.name,e.propertyLabel=t.label,e.datatype=t.type,URule.setDomContent(e.referencePropertylabel,e.propertyLabel),window._setDirty()}})},s=t[Symbol.iterator]();!(i=(A=s.next()).done);i=!0)a()}catch(t){o=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}e.propertyMenu?e.propertyMenu.setConfig(n):e.propertyMenu=new URule.menu.Menu(n),e.referencePropertylabel.click(function(t){e.propertyMenu.show(t)})},urule.NamedReferenceValue.prototype.setValue=function(t){this.referenceName=t.referenceName,this.propertyName=t.propertyName||t.variableName,this.propertyLabel=t.propertyLabel||t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.referenceNamelabel,this.referenceName+"."),URule.setDomContent(this.referencePropertylabel,this.propertyLabel),window._setDirty()},urule.NamedReferenceValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.NamedReferenceValue.prototype.toXml=function(){if(!this.referenceName||!this.propertyName||""===this.propertyName)throw"引用变量信息不能为空!";var t='reference-name="'+this.referenceName+'" property-name="'+this.propertyName+'" property-label="'+this.propertyLabel+'" datatype="'+this.datatype+'"';return t},urule.NamedReferenceValue.prototype.getType=function(){return"NamedReference"},urule.NamedReferenceValue.prototype.getContainer=function(){return this.container}},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var i=n(474);"string"==typeof i&&(i=[[t.id,i,""]]);n(9)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'.xdsoft_datetimepicker{box-shadow:0 5px 15px -5px rgba(0,0,0,.506);background:#fff;border-bottom:1px solid #bbb;border-left:1px solid #ccc;border-right:1px solid #ccc;border-top:1px solid #ccc;color:#333;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px;padding-left:0;padding-top:2px;position:absolute;z-index:9999;box-sizing:border-box;display:none}.xdsoft_datetimepicker iframe{position:absolute;left:0;top:0;width:75px;height:210px;background:transparent;border:none}.xdsoft_datetimepicker button{border:none!important}.xdsoft_noselect{-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none}.xdsoft_noselect::selection{background:transparent}.xdsoft_noselect::-moz-selection{background:transparent}.xdsoft_datetimepicker.xdsoft_inline{display:inline-block;position:static;box-shadow:none}.xdsoft_datetimepicker *{box-sizing:border-box;padding:0;margin:0}.xdsoft_datetimepicker .xdsoft_datepicker,.xdsoft_datetimepicker .xdsoft_timepicker{display:none}.xdsoft_datetimepicker .xdsoft_datepicker.active,.xdsoft_datetimepicker .xdsoft_timepicker.active{display:block}.xdsoft_datetimepicker .xdsoft_datepicker{width:224px;float:left;margin-left:8px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_datepicker{width:256px}.xdsoft_datetimepicker .xdsoft_timepicker{width:58px;float:left;text-align:center;margin-left:8px;margin-top:0}.xdsoft_datetimepicker .xdsoft_datepicker.active+.xdsoft_timepicker{margin-top:8px;margin-bottom:3px}.xdsoft_datetimepicker .xdsoft_mounthpicker{position:relative;text-align:center}.xdsoft_datetimepicker .xdsoft_label i,.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6Q0NBRjI1NjM0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6Q0NBRjI1NjQ0M0UwMTFFNDk4NkFGMzJFQkQzQjEwRUIiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpDQ0FGMjU2MTQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpDQ0FGMjU2MjQzRTAxMUU0OTg2QUYzMkVCRDNCMTBFQiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PoNEP54AAAIOSURBVHja7Jq9TsMwEMcxrZD4WpBYeKUCe+kTMCACHZh4BFfHO/AAIHZGFhYkBBsSEqxsLCAgXKhbXYOTxh9pfJVP+qutnZ5s/5Lz2Y5I03QhWji2GIcgAokWgfCxNvcOCCGKqiSqhUp0laHOne05vdEyGMfkdxJDVjgwDlEQgYQBgx+ULJaWSXXS6r/ER5FBVR8VfGftTKcITNs+a1XpcFoExREIDF14AVIFxgQUS+h520cdud6wNkC0UBw6BCO/HoCYwBhD8QCkQ/x1mwDyD4plh4D6DDV0TAGyo4HcawLIBBSLDkHeH0Mg2yVP3l4TQMZQDDsEOl/MgHQqhMNuE0D+oBh0CIr8MAKyazBH9WyBuKxDWgbXfjNf32TZ1KWm/Ap1oSk/R53UtQ5xTh3LUlMmT8gt6g51Q9p+SobxgJQ/qmsfZhWywGFSl0yBjCLJCMgXail3b7+rumdVJ2YRss4cN+r6qAHDkPWjPjdJCF4n9RmAD/V9A/Wp4NQassDjwlB6XBiCxcJQWmZZb8THFilfy/lfrTvLghq2TqTHrRMTKNJ0sIhdo15RT+RpyWwFdY96UZ/LdQKBGjcXpcc1AlSFEfLmouD+1knuxBDUVrvOBmoOC/rEcN7OQxKVeJTCiAdUzUJhA2Oez9QTkp72OTVcxDcXY8iKNkxGAJXmJCOQwOa6dhyXsOa6XwEGAKdeb5ET3rQdAAAAAElFTkSuQmCC)}.xdsoft_datetimepicker .xdsoft_label i{opacity:.5;background-position:-92px -19px;display:inline-block;width:9px;height:20px;vertical-align:middle}.xdsoft_datetimepicker .xdsoft_prev{float:left;background-position:-20px 0}.xdsoft_datetimepicker .xdsoft_today_button{float:left;background-position:-70px 0;margin-left:5px}.xdsoft_datetimepicker .xdsoft_next{float:right;background-position:0 0}.xdsoft_datetimepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_prev,.xdsoft_datetimepicker .xdsoft_today_button{background-color:transparent;background-repeat:no-repeat;border:0 none currentColor;cursor:pointer;display:block;height:30px;opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)";outline:medium none currentColor;overflow:hidden;padding:0;position:relative;text-indent:100%;white-space:nowrap;width:20px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_next,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{float:none;background-position:-40px -15px;height:15px;width:30px;display:block;margin-left:14px;margin-top:7px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_prev{background-position:-40px 0;margin-bottom:7px;margin-top:0}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box{height:151px;overflow:hidden;border-bottom:1px solid #ddd}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div{background:#f5f5f5;border-top:1px solid #ddd;color:#666;font-size:12px;text-align:center;border-collapse:collapse;cursor:pointer;border-bottom-width:0;height:25px;line-height:25px}.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:first-child{border-top-width:0}.xdsoft_datetimepicker .xdsoft_next:hover,.xdsoft_datetimepicker .xdsoft_prev:hover,.xdsoft_datetimepicker .xdsoft_today_button:hover{opacity:1;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"}.xdsoft_datetimepicker .xdsoft_label{display:inline;position:relative;z-index:9999;margin:0;padding:5px 3px;font-size:14px;line-height:20px;font-weight:700;background-color:#fff;float:left;width:182px;text-align:center;cursor:pointer}.xdsoft_datetimepicker .xdsoft_label:hover>span{text-decoration:underline}.xdsoft_datetimepicker .xdsoft_label:hover i{opacity:1}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select{border:1px solid #ccc;position:absolute;right:0;top:30px;z-index:101;display:none;background:#fff;max-height:160px;overflow-y:hidden}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_monthselect{right:-7px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select.xdsoft_yearselect{right:2px}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#fff;background:#ff8000}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option{padding:2px 10px 2px 5px;text-decoration:none!important}.xdsoft_datetimepicker .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#3af;box-shadow:inset 0 1px 3px 0 #178fe5;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_month{width:100px;text-align:right}.xdsoft_datetimepicker .xdsoft_calendar{clear:both}.xdsoft_datetimepicker .xdsoft_year{width:48px;margin-left:5px}.xdsoft_datetimepicker .xdsoft_calendar table{border-collapse:collapse;width:100%}.xdsoft_datetimepicker .xdsoft_calendar td>div{padding-right:5px}.xdsoft_datetimepicker .xdsoft_calendar th{height:25px}.xdsoft_datetimepicker .xdsoft_calendar td,.xdsoft_datetimepicker .xdsoft_calendar th{width:14.2857142%;background:#f5f5f5;border:1px solid #ddd;color:#666;font-size:12px;text-align:right;vertical-align:middle;padding:0;border-collapse:collapse;cursor:pointer;height:25px}.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_showweeks .xdsoft_calendar th{width:12.5%}.xdsoft_datetimepicker .xdsoft_calendar th{background:#f1f1f1}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_today{color:#3af}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#3af;box-shadow:inset 0 1px 3px 0 #178fe5;color:#fff;font-weight:700}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled,.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month,.xdsoft_datetimepicker .xdsoft_time_box>div>div.xdsoft_disabled{opacity:.5;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_other_month.xdsoft_disabled{opacity:.2;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=20)"}.xdsoft_datetimepicker .xdsoft_calendar td:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#fff!important;background:#ff8000!important;box-shadow:none!important}.xdsoft_datetimepicker .xdsoft_calendar td.xdsoft_disabled:hover,.xdsoft_datetimepicker .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_disabled:hover{color:inherit!important;background:inherit!important;box-shadow:inherit!important}.xdsoft_datetimepicker .xdsoft_calendar th{font-weight:700;text-align:center;color:#999;cursor:default}.xdsoft_datetimepicker .xdsoft_copyright{color:#ccc!important;font-size:10px;clear:both;float:none;margin-left:8px}.xdsoft_datetimepicker .xdsoft_copyright a{color:#eee!important}.xdsoft_datetimepicker .xdsoft_copyright a:hover{color:#aaa!important}.xdsoft_time_box{position:relative;border:1px solid #ccc}.xdsoft_scrollbar>.xdsoft_scroller{background:#ccc!important;height:20px;border-radius:3px}.xdsoft_scrollbar{position:absolute;width:7px;right:0;top:0;bottom:0;cursor:pointer}.xdsoft_scroller_box{position:relative}.xdsoft_datetimepicker.xdsoft_dark{box-shadow:0 5px 15px -5px hsla(0,0%,100%,.506);background:#000;border-bottom:1px solid #444;border-left:1px solid #333;border-right:1px solid #333;border-top:1px solid #333;color:#ccc}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box{border-bottom:1px solid #222}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div{background:#0a0a0a;border-top:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label{background-color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select{border:1px solid #333;background:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option:hover{color:#000;background:#007fff}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label>.xdsoft_select>div>.xdsoft_option.xdsoft_current{background:#c50;box-shadow:inset 0 1px 3px 0 #b03e00;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_label i,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_next,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_prev,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_today_button{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAeCAYAAADaW7vzAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6QUExQUUzOTA0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6QUExQUUzOTE0M0UyMTFFNDlBM0FFQTJENTExRDVBODYiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpBQTFBRTM4RTQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpBQTFBRTM4RjQzRTIxMUU0OUEzQUVBMkQ1MTFENUE4NiIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pp0VxGEAAAIASURBVHja7JrNSgMxEMebtgh+3MSLr1T1Xn2CHoSKB08+QmR8Bx9A8e7RixdB9CKCoNdexIugxFlJa7rNZneTbLIpM/CnNLsdMvNjM8l0mRCiQ9Ye61IKCAgZAUnH+mU3MMZaHYChBnJUDzWOFZdVfc5+ZFLbrWDeXPwbxIqrLLfaeS0hEBVGIRQCEiZoHQwtlGSByCCdYBl8g8egTTAWoKQMRBRBcZxYlhzhKegqMOageErsCHVkk3hXIFooDgHB1KkHIHVgzKB4ADJQ/A1jAFmAYhkQqA5TOBtocrKrgXwQA8gcFIuAIO8sQSA7hidvPwaQGZSaAYHOUWJABhWWw2EMIH9QagQERU4SArJXo0ZZL18uvaxejXt/Em8xjVBXmvFr1KVm/AJ10tRe2XnraNqaJvKE3KHuUbfK1E+VHB0q40/y3sdQSxY4FHWeKJCunP8UyDdqJZenT3ntVV5jIYCAh20vT7ioP8tpf6E2lfEMwERe+whV1MHjwZB7PBiCxcGQWwKZKD62lfGNnP/1poFAA60T7rF1UgcKd2id3KDeUS+oLWV8DfWAepOfq00CgQabi9zjcgJVYVD7PVzQUAUGAQkbNJTBICDhgwYTjDYD6XeW08ZKh+A4pYkzenOxXUbvZcWz7E8ykRMnIHGX1XPl+1m2vPYpL+2qdb8CDAARlKFEz/ZVkAAAAABJRU5ErkJggg==)}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0a0a0a;border:1px solid #222;color:#999}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{background:#0e0e0e}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_today{color:#c50}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_current,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td.xdsoft_default,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div.xdsoft_current{background:#c50;box-shadow:inset 0 1px 3px 0 #b03e00;color:#000}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar td:hover,.xdsoft_datetimepicker.xdsoft_dark .xdsoft_timepicker .xdsoft_time_box>div>div:hover{color:#000!important;background:#007fff!important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_calendar th{color:#666}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright{color:#333!important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a{color:#111!important}.xdsoft_datetimepicker.xdsoft_dark .xdsoft_copyright a:hover{color:#555!important}.xdsoft_dark .xdsoft_time_box{border:1px solid #333}.xdsoft_dark .xdsoft_scrollbar>.xdsoft_scroller{background:#333!important}',""]); +},function(t,e,n){"use strict";var i=n(241);urule.Join=function(t){this.type="and",this.context=t,this.H=30,this.W=60,this.children=[],this.joinContainer=$(""),this.joinLabel=$("并且"),this.joinContainer.append(this.joinLabel)},urule.Join.prototype.initData=function(t){var e=t.criterions;if(this.setType(t.junctionType),e)for(var n=0;n'),n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"并且",onClick:function(){n.setType("and")}},{label:"或者",onClick:function(){n.setType("or")}},{label:"添加条件",onClick:function(){n.addItem(!1)}},{label:"添加联合条件",onClick:function(){n.addItem(!0)}},{label:"删除",onClick:function(){if(n.children.length>0)return void i.MsgBox.alert("请先删除当前连接下子元素!");if(t){var e=t.getParentJoin();e&&e.removeConnection(t)}}}]}),this.joinContainer.click(function(t){n.menu.show(t)}),this.joinContainer.append(e)},urule.Join.prototype.removeConnection=function(t){var e=this.children.indexOf(t);this.children.length>1&&this.resetItemPosition(e+1,!1),t.remove(),this.children.splice(e,1),this.resetContainerSize(),window._setDirty()},urule.Join.prototype.addItem=function(t){window._setDirty();var e=this.getChildrenCount();if(e>0&&this.parent){var n=this.parent.getChildren(),i=n.indexOf(this.parentConnection);this.parent.resetItemPosition(i+1,!0)}var o=e*this.H,r=parseInt(this.joinContainer.css("left")),A=parseInt(this.joinContainer.css("top")),a=r+this.W/2,s=A+this.H/5,l=a+this.W-25,c=s+o;t&&(c-=5);var u=new urule.Connection(this.context,t,this);return u.drawPath(a,s,l,c),this.children.push(u),this.resetContainerSize(),u},urule.Join.prototype.toXml=function(){for(var t="<"+this.type+">",e=0;e"},urule.Join.prototype.resetItemPosition=function(t,e){if(t!=-1){for(var n=t;n0&&this.parent){var r=this.parent.getChildren(),A=r.indexOf(this.parentConnection),a=this.parentConnection.getParentJoin();a.resetItemPosition(A+1,e)}window._setDirty()}},urule.Join.prototype.resetContainerSize=function(){var t=this.context.getCanvas(),e=t.css("height");e=parseInt(e);var n=this.context.getTotalChildrenCount();0==n&&(n=1);var i=n*this.H+10;t.css({height:i+"px"})},urule.Join.prototype.getChildrenCount=function(){for(var t=0,e=0;e"),this.referenceName=null,this.variableCategory=null,this.namedLabel=generateContainer(),this.namedLabel.css({color:"#9C27B0",cursor:"pointer",fontSize:"12px"}),URule.setDomContent(this.namedLabel,"请输入引用名"),this.container.append(this.namedLabel);var e=$("");this.container.append(e),e.hide();var n=this;this.namedLabel.click(function(){n.namedLabel.hide(),e.css("display","inline"),e.val(n.referenceName),e.focus(),n.resetItemPosition(0,null)}),e.blur(function(){n.referenceName&&n.referenceName.length>0&&n.context.deleteFromNamedMap(n.referenceName);var t=$(this).val();t&&""!==t?(n.referenceName=t,URule.setDomContent(n.namedLabel,t+":"),n.variableCategory&&n.context.putToNamedMap(n.referenceName,n.variableCategory)):(n.referenceName=null,URule.setDomContent(n.namedLabel,"请输入引用名"));var i=!0,o=!1,r=void 0;try{for(var A,a=n.context.rule.namedReferenceValues[Symbol.iterator]();!(i=(A=a.next()).done);i=!0){var s=A.value;s&&s.initMenu()}}catch(t){o=!0,r=t}finally{try{!i&&a.return&&a.return()}finally{if(o)throw r}}n.namedLabel.show(),e.hide(),n.resetItemPosition(0,null)}),this.variableCategoryLabel=generateContainer(),this.variableCategoryLabel.css({color:"#03A9F4",cursor:"pointer",fontSize:"12px"}),URule.setDomContent(this.variableCategoryLabel,"请选择变量对象"),this.container.append(this.variableCategoryLabel),this.initMenu(),this.joinContainer=$(""),this.container.append(this.joinContainer),this.joinLabel=$("并且"),this.joinContainer.append(this.joinLabel)},urule.NamedJoin.prototype.initMenu=function(t){var e=window._uruleEditorVariableLibraries;if(t&&(e=t),e){var n=this,i={menuItems:[]},o=!0,r=!1,A=void 0;try{for(var a,s=e[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var l=a.value,c=!0,u=!1,g=void 0;try{for(var d,M=l[Symbol.iterator]();!(c=(d=M.next()).done);c=!0){var p=d.value,h={label:p.name,category:p,onClick:function(t){n.children.length>0?bootbox.confirm("当前节点下已配置了条件,此操作将会清这些条件,你确定吗?",function(e){if(e){n.variableCategory=t.category,n.variableCategoryName=t.category.name,n.context.putToNamedMap(n.referenceName,n.variableCategory),URule.setDomContent(n.variableCategoryLabel,t.label),n.resetItemPosition(0,null);var i=!0,o=!1,r=void 0;try{for(var A,a=n.children[Symbol.iterator]();!(i=(A=a.next()).done);i=!0){var s=A.value;s.remove()}}catch(t){o=!0,r=t}finally{try{!i&&a.return&&a.return()}finally{if(o)throw r}}n.children=[]}}):(n.variableCategory=t.category,n.variableCategoryName=t.category.name,n.context.putToNamedMap(n.referenceName,n.variableCategory),URule.setDomContent(n.variableCategoryLabel,t.label),n.resetItemPosition(0,null));var e=!0,i=!1,o=void 0;try{for(var r,A=n.context.rule.namedReferenceValues[Symbol.iterator]();!(e=(r=A.next()).done);e=!0){var a=r.value;a&&a.initMenu()}}catch(t){i=!0,o=t}finally{try{!e&&A.return&&A.return()}finally{if(i)throw o}}}};i.menuItems.push(h)}}catch(t){u=!0,g=t}finally{try{!c&&M.return&&M.return()}finally{if(u)throw g}}}}catch(t){r=!0,A=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw A}}if(n.categoryMenu?n.categoryMenu.setConfig(i):n.categoryMenu=new URule.menu.Menu(i),this.variableCategoryLabel.click(function(t){return n.referenceName?void n.categoryMenu.show(t):void bootbox.alert("请先输入引用名称.")}),this.variableCategoryName){var I=!0,f=!1,T=void 0;try{for(var E,N=e[Symbol.iterator]();!(I=(E=N.next()).done);I=!0){var C=E.value,w=!0,y=!1,x=void 0;try{for(var D,b=C[Symbol.iterator]();!(w=(D=b.next()).done);w=!0){var m=D.value;if(m.name===this.variableCategoryName){this.variableCategory=m;break}}}catch(t){y=!0,x=t}finally{try{!w&&b.return&&b.return()}finally{if(y)throw x}}if(this.variableCategory)break}}catch(t){f=!0,T=t}finally{try{!I&&N.return&&N.return()}finally{if(f)throw T}}if(this.variableCategory){this.context.putToNamedMap(this.referenceName,this.variableCategory);var B=!0,L=!1,Q=void 0;try{for(var v,j=this.children[Symbol.iterator]();!(B=(v=j.next()).done);B=!0){var U=v.value;U.getCondition().initMenu()}}catch(t){L=!0,Q=t}finally{try{!B&&j.return&&j.return()}finally{if(L)throw Q}}}}var S=!0,k=!1,z=void 0;try{for(var Y,R=n.context.rule.namedReferenceValues[Symbol.iterator]();!(S=(Y=R.next()).done);S=!0){var F=Y.value;F&&F.initMenu()}}catch(t){k=!0,z=t}finally{try{!S&&R.return&&R.return()}finally{if(k)throw z}}}},urule.NamedJoin.prototype.initData=function(t){this.referenceName=t.referenceName,this.variableCategoryName=t.variableCategory,URule.setDomContent(this.namedLabel,this.referenceName+":"),URule.setDomContent(this.variableCategoryLabel,this.variableCategoryName);var e=t.items;if(this.setType(t.junctionType),e){var n=!0,i=!1,o=void 0;try{for(var r,A=e[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value,s=this.addItem(!1);s.getCondition().initData(a)}}catch(t){i=!0,o=t}finally{try{!n&&A.return&&A.return()}finally{if(i)throw o}}}},urule.NamedJoin.prototype.setType=function(t){this.type=t,"or"===t?URule.setDomContent(this.joinLabel,"或者"):URule.setDomContent(this.joinLabel,"并且"),window._setDirty()},urule.NamedJoin.prototype.init=function(t){t&&(this.parentConnection=t,this.parent=t.getParentJoin());var e=$(''),n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"并且",onClick:function(){n.setType("and")}},{label:"或者",onClick:function(){n.setType("or")}},{label:"添加条件",onClick:function(){n.addItem(!1)}},{label:"删除",onClick:function(){if(n.children.length>0)return void i.MsgBox.alert("请先删除当前连接下子元素!");if(t){var e=t.getParentJoin();e&&e.removeConnection(t)}n.referenceName&&n.context.deleteFromNamedMap(n.referenceName);var o=!0,r=!1,A=void 0;try{for(var a,s=n.context.rule.namedReferenceValues[Symbol.iterator]();!(o=(a=s.next()).done);o=!0){var l=a.value;l&&l.initMenu()}}catch(t){r=!0,A=t}finally{try{!o&&s.return&&s.return()}finally{if(r)throw A}}}}]}),this.joinContainer.click(function(t){n.menu.show(t)}),this.joinContainer.append(e)},urule.NamedJoin.prototype.removeConnection=function(t){var e=this.children.indexOf(t);this.children.length>1&&this.resetItemPosition(e+1,!1),t.remove(),this.children.splice(e,1),this.resetContainerSize(),window._setDirty()},urule.NamedJoin.prototype.addItem=function(t){if(!this.variableCategoryName||!this.referenceName)return void bootbox.alert("请先定义变量引用名及变量对象!");window._setDirty();var e=this.getChildrenCount();if(e>0&&this.parent){var n=this.parent.getChildren(),i=n.indexOf(this.parentConnection);this.parent.resetItemPosition(i+1,!0)}var o=e*this.H,r=parseInt(this.container.css("left")),A=parseInt(this.container.css("top")),a=r+this.container.width()-15,s=A+this.H/5,l=a+40,c=s+o;t&&(c-=5);var u=new urule.Connection(this.context,t,this);return u.drawPath(a,s,l,c),this.children.push(u),this.resetContainerSize(),u},urule.NamedJoin.prototype.toXml=function(){if(!this.referenceName||!this.variableCategoryName)throw"请定义引用条件信息.";for(var t='',e=0;e0&&this.parent){var s=this.parent.getChildren(),l=s.indexOf(this.parentConnection),c=this.parentConnection.getParentJoin();c.resetItemPosition(l+1,e)}window._setDirty()}},urule.NamedJoin.prototype.resetContainerSize=function(){var t=this.context.getCanvas(),e=t.css("height");e=parseInt(e);var n=this.context.getTotalChildrenCount();0==n&&(n=1);var i=n*this.H+10;t.css({height:i+"px"})},urule.NamedJoin.prototype.getChildrenCount=function(){for(var t=0,e=0;e"),e.append(this.container),this.arithmetic=new urule.SimpleArithmetic,this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#673AB7"}),URule.setDomContent(this.label,"请选择属性"),this.valueContainer=$(""),this.container.append(this.valueContainer),this.initMenu()},urule.NamedCondition.prototype.initMenu=function(){var t=this,e=[],n=[];this.parentJoin.variableCategory&&(n=this.parentJoin.variableCategory.variables||[]);var i=!0,o=!1,r=void 0;try{for(var A,a=function(){var n=A.value;e.push({label:n.label,variable:n,onClick:function(e){t.variableName=n.name,t.variableLabel=n.label,t.datatype=n.type,URule.setDomContent(t.label,e.label),t.operator?t.operator.getContainer().show():(t.operator=new urule.ComparisonOperator(function(){t.inputType=t.operator.getInputType(),t.inputType&&t.container.append(t.inputType.getContainer())}),t.container.append(t.operator.getContainer())),window._setDirty()}})},s=n[Symbol.iterator]();!(i=(A=s.next()).done);i=!0)a()}catch(t){o=!0,r=t}finally{try{!i&&s.return&&s.return()}finally{if(o)throw r}}this.menu=new URule.menu.Menu({menuItems:e}),this.label.click(function(e){t.menu.show(e)})},urule.NamedCondition.prototype.initData=function(t){this.variableName=t.variableName,this.variableLabel=t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.label,this.variableLabel);var e=this;this.operator?this.operator.getContainer().show():(this.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),this.container.append(this.operator.getContainer()));var n=t.op;this.operator.setOperator(n),this.operator.initRightValue(t.value),this.inputType=this.operator.getInputType(),this.inputType&&this.container.append(this.inputType.getContainer())},urule.NamedCondition.prototype.toXml=function(){if(!this.variableName)throw"请定义条件.";var t='';return this.inputType&&(t+=this.inputType.toXml()),t+=""},urule.NamedCondition.prototype.getVariableValue=function(){return this.variableValue},urule.NamedCondition.prototype.getOperator=function(){return this.operator},urule.NamedCondition.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";urule.Connection=function(t,e,n){this.isJoin=e,this.context=t,this.parentJoin=n},urule.Connection.prototype.drawPath=function(t,e,n,i){this.startX=t,this.endX=n,this.isJoin?(this.startY=e-3,this.endY=i+2):(this.startY=e-3,this.endY=i-3),this.path=this.context.getPaper().path(this.buildPathInfo()),this.path.attr({stroke:"#777"}),this.isJoin?this.initJoin(this.isJoin):this.initCondition()},urule.Connection.prototype.toXml=function(){var t="";return t=this.isJoin?this.join.toXml():this.condition.toXml()},urule.Connection.prototype.initJoin=function(t){"named"===t?this.join=new urule.NamedJoin(this.context):this.join=new urule.Join(this.context),this.join.init(this);var e=this.join.getContainer(),n=this.endX+10+"px",i=this.endY+"px";e.css({position:"absolute",left:n,top:i}),this.context.getCanvas().append(e)},urule.Connection.prototype.remove=function(){this.path.remove(),this.join?this.join.getContainer().remove():this.conditionContainer.remove(),window._setDirty()},urule.Connection.prototype.initCondition=function(t){this.conditionContainer=$("
    ");var e=this.endX+10+"px",n=this.endY+"px";this.conditionContainer.css({position:"absolute",left:e,top:n}),this.parentJoin instanceof urule.NamedJoin?this.condition=new urule.NamedCondition(this.context,this.conditionContainer,this.parentJoin):this.condition=new urule.Condition(this.conditionContainer);var i=$(''),o=this;i.click(function(){o.parentJoin.removeConnection(o)}),this.conditionContainer.append(i),this.context.getCanvas().append(this.conditionContainer)},urule.Connection.prototype.update=function(t){var e=this.buildPathInfo();if(this.path.attr("path",e),null===t){var n=this.endX+10+"px";this.conditionContainer?this.conditionContainer.css({left:n}):this.join.getContainer().css({left:n})}else{var i=this.endY+"px";this.conditionContainer?this.conditionContainer.css({top:i}):this.join.getContainer().css({top:i})}this.join&&this.join.resetItemPosition(0,t)},urule.Connection.prototype.getParentJoin=function(){return this.parentJoin},urule.Connection.prototype.getCondition=function(){return this.condition},urule.Connection.prototype.getJoin=function(){return this.join},urule.Connection.prototype.getStartX=function(){return this.startX},urule.Connection.prototype.getStartY=function(){return this.startY},urule.Connection.prototype.getEndX=function(){return this.endX},urule.Connection.prototype.getEndY=function(){return this.endY},urule.Connection.prototype.setStartX=function(t){this.startX=t},urule.Connection.prototype.setStartY=function(t){this.startY=t},urule.Connection.prototype.setEndX=function(t){this.endX=t},urule.Connection.prototype.setEndY=function(t){this.endY=t},urule.Connection.prototype.buildPathInfo=function(){var t=10,e=8;return"M"+(this.startX+t)+","+(this.startY+e)+" C"+(this.startX+t)+","+(this.endY+e)+","+(this.startX+t)+","+(this.endY+e)+","+(this.endX+t)+","+(this.endY+e)}},function(t,e){"use strict";urule.Condition=function(t){this.container=$(""),t.append(this.container),this.arithmetic=new urule.SimpleArithmetic,this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"blue"}),URule.setDomContent(this.label,"请选择类型"),this.valueContainer=$(""),this.container.append(this.valueContainer),this.initMenu()},urule.Condition.prototype.initMenu=function(t){var e=this;e.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){e.type="variable",e.parameterValue&&e.parameterValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.variableValue?e.variableValue.getContainer().show():(e.variableValue=new urule.VariableValue(e.arithmetic,null,"In",null,!1),e.valueContainer.append(e.variableValue.getContainer())),e.operator?e.operator.getContainer().show():(e.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(e.operator.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择参数",onClick:function(){e.type="parameter",e.variableValue&&e.variableValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.parameterValue?e.parameterValue.getContainer().show():(e.parameterValue=new urule.ParameterValue(e.arithmetic,null,"In"),e.valueContainer.append(e.parameterValue.getContainer())),e.operator?e.operator.getContainer().show():(e.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(e.operator.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择方法",onClick:function(){e.type="method",e.variableValue&&e.variableValue.getContainer().hide(),e.parameterValue&&e.parameterValue.getContainer().hide(),e.functionValue&&e.functionValue.getContainer().hide(),e.methodValue?e.methodValue.getContainer().show():(e.methodValue=new urule.MethodValue(e.arithmetic,null),e.valueContainer.append(e.methodValue.getContainer())),e.operator?e.operator.getContainer().show():(e.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(e.operator.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}},{label:"选择函数",onClick:function(){e.type="commonfunction",e.variableValue&&e.variableValue.getContainer().hide(),e.parameterValue&&e.parameterValue.getContainer().hide(),e.methodValue&&e.methodValue.getContainer().hide(),e.functionValue?e.functionValue.getContainer().show():(e.functionValue=new urule.FunctionValue(e.arithmetic,null,"In"),e.valueContainer.append(e.functionValue.getContainer())),e.operator?e.operator.getContainer().show():(e.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(e.operator.getContainer())),e.label.css({color:"white"}),URule.setDomContent(e.label,"."),window._setDirty()}}]}),this.label.click(function(t){e.menu.show(t)})},urule.Condition.prototype.initData=function(t){this.label.css({color:"white"}),URule.setDomContent(this.label,".");var e=t.left,n=e.leftPart;if(n.arithmetic=e.arithmetic,this.type=e.type,this.type||(this.type="variable"),"parameter"==this.type?(this.variableValue&&this.variableValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.parameterValue=new urule.ParameterValue(this.arithmetic,n,"In"),this.valueContainer.append(this.parameterValue.getContainer())):"variable"==this.type?(this.parameterValue&&this.parameterValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.variableValue=new urule.VariableValue(this.arithmetic,n,"In",null,!1),this.valueContainer.append(this.variableValue.getContainer())):"method"==this.type?(this.parameterValue&&this.parameterValue.getContainer().hide(),this.variableValue&&this.variableValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),this.methodValue=new urule.MethodValue(this.arithmetic,n),this.valueContainer.append(this.methodValue.getContainer())):"commonfunction"==this.type&&(this.parameterValue&&this.parameterValue.getContainer().hide(),this.variableValue&&this.variableValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.functionValue=new urule.FunctionValue(this.arithmetic,n),this.valueContainer.append(this.functionValue.getContainer())),this.operator)this.operator.getContainer().show();else{var i=this;this.operator=new urule.ComparisonOperator(function(){i.inputType=i.operator.getInputType(),i.inputType&&i.container.append(i.inputType.getContainer())}),this.container.append(this.operator.getContainer())}var o=t.op;this.operator.setOperator(o),this.operator.initRightValue(t.value),this.inputType=this.operator.getInputType(),this.inputType&&this.container.append(this.inputType.getContainer())},urule.Condition.prototype.toXml=function(){var t='';if(t+="',"method"==this.type)for(var e=this.methodValue.action.parameters,n=0;n",this.inputType&&(t+=this.inputType.toXml()),t+=""},urule.Condition.prototype.getVariableValue=function(){return this.variableValue},urule.Condition.prototype.getOperator=function(){return this.operator},urule.Condition.prototype.getInputType=function(){return this.inputType}},function(t,e,n){"use strict";var i=n(241);urule.LoopRule=function(t,e,n){this.uuid=Math.uuid(),this.namedMap=new Map,this.namedReferenceValues=[],e.prop("id",this.uuid),this.parent=t,this.container=e,this.data=n,this.actions=[],this.elseActions=[],this.loopStartActions=[],this.loopEndActions=[],this.properties=[],this.init(),this.initData()},urule.LoopRule.prototype.init=function(){this.ruleContainer=$("
    "),this.container.append(this.ruleContainer),this.initRemark(),this.initHeader(),this.initLoopTarget(),this.initLoopStart(),this.initIf(),this.initThen(),this.initElse(),this.initLoopEnd()},urule.LoopRule.prototype.initData=function(){if(this.data){this.name=this.data.name,this.nameLabel.prop("innerText",this.name);var t=this.data.salience;t&&this.addProperty(new urule.RuleProperty(this,"salience",t,1));var e=this.data.loop;null!=e&&this.addProperty(new urule.RuleProperty(this,"loop",e,3));var n=this.data.effectiveDate;n&&this.addProperty(new urule.RuleProperty(this,"effective-date",n,2));var i=this.data.expiresDate;i&&this.addProperty(new urule.RuleProperty(this,"expires-date",i,2));var o=this.data.enabled;null!=o&&this.addProperty(new urule.RuleProperty(this,"enabled",o,3));var r=this.data.debug;null!=r&&this.addProperty(new urule.RuleProperty(this,"debug",r,3));var A=this.data.activationGroup;A&&this.addProperty(new urule.RuleProperty(this,"activation-group",A,1));var a=this.data.agendaGroup;a&&this.addProperty(new urule.RuleProperty(this,"agenda-group",a,1));var s=this.data.autoFocus;null!=s&&this.addProperty(new urule.RuleProperty(this,"auto-focus",s,3));var l=this.data.ruleflowGroup;l&&this.addProperty(new urule.RuleProperty(this,"ruleflow-group",s,1));var c=this.data.remark;this.remark.setData(c);var u=this.data.loopTarget;if(u){var g=u.value;if(g){var d=g.valueType;this.loopTargetInputType.setValueType(d,g)}}var M=this.data.loopStart;if(M){var p=M.actions;if(p)for(var h=0;h
    ");this.remark=new Remark(t),this.ruleContainer.append(t)},urule.LoopRule.prototype.initHeader=function(){this.nameContainer=$("
    "),this.ruleContainer.append(this.nameContainer),this.label=$("循环规则 "),this.nameContainer.append(this.label),this.nameEditor=$("").hide(),this.name="rule",this.nameLabel=$(""+this.name+""),this.label.append(this.nameEditor),this.label.append(this.nameLabel);var t=this;this.nameLabel.click(function(){t.nameLabel.hide(),t.nameEditor.show(),t.nameEditor.prop("value",t.name),t.nameEditor.focus()}),this.nameEditor.blur(function(){t.name=t.nameEditor.prop("value"),t.nameEditor.hide(),t.nameLabel.show(),URule.setDomContent(t.nameLabel,t.name),window._setDirty()}),this.nameEditor.hide();var e=$('');e.css({"vertical-align":"middle",cursor:"pointer"}),e.click(function(){var e="真的要删除规则"+t.name+"?";i.MsgBox.confirm(e,function(){var e=t.parent.rules.indexOf(t);t.parent.rules.splice(e,1),t.container.remove(),window._setDirty()})}),this.nameContainer.append(e),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var n=$("添加属性"),o=function(e){var n=new urule.RuleProperty(t,e.name,e.defaultValue,e.editorType);t.addProperty(n)};t.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:o},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:o},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:o},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:o},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:o},{label:"互斥组",name:"activation-group",defaultValue:"",editorType:1,onClick:o},{label:"执行组",name:"agenda-group",defaultValue:"",editorType:1,onClick:o},{label:"自动获取焦点",name:"auto-focus",defaultValue:!0,editorType:3,onClick:o}]}),n.click(function(e){t.menu.show(e)}),this.ruleContainer.append(n),this.ruleContainer.append(this.propertyContainer)},urule.LoopRule.prototype.initLoopStart=function(){this.loopStartLabel=$("开始前动作"),this.ruleContainer.append(this.loopStartLabel),this.loopStartActionContainer=$("
    ");var t=this;this.loopStartActionContainer.sortable({delay:200,update:function(e,n){var i=t.loopStartActionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.loopStartActions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.ruleContainer.append(this.loopStartActionContainer),this.addLoopStartActionButton=$("添加动作");var e=this;this.addLoopStartActionButton.click(function(){e.addLoopStartAction()}),this.loopStartLabel.append(this.addLoopStartActionButton)},urule.LoopRule.prototype.addLoopStartAction=function(t){var e=this,n=$("
    "),i=$('');n.append(i);var o=new urule.ActionType(n);i.click(function(){var t=e.loopStartActions.indexOf(o);e.loopStartActions.splice(t,1),n.remove(),window._setDirty()}),this.loopStartActions.push(o),this.loopStartActionContainer.append(n),t&&o.initData(t),window._setDirty()},urule.LoopRule.prototype.initIf=function(){this.ifLabel=$("
    如果
    "),this.ruleContainer.append(this.ifLabel),this.conditionContainer=$("
    "),this.conditionContainer.css({height:"40px",position:"relative"}),this.ruleContainer.append(this.conditionContainer)},urule.LoopRule.prototype.initLoopTarget=function(){this.ruleContainer.append("
    循环对象
    "),this.loopTargetContainer=$("
    "),this.ruleContainer.append(this.loopTargetContainer),this.loopTargetInputType=new urule.InputType,this.loopTargetContainer.append(this.loopTargetInputType.getContainer())},urule.LoopRule.prototype.initThen=function(){this.thenLabel=$("那么"),this.ruleContainer.append(this.thenLabel),this.actionContainer=$("
    "),this.ruleContainer.append(this.actionContainer);var t=this;this.actionContainer.sortable({delay:200,update:function(e,n){var i=t.actionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.actions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return(); +}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.addActionButton=$("添加动作");var e=this;this.addActionButton.click(function(){e.addAction()}),this.thenLabel.append(this.addActionButton)},urule.LoopRule.prototype.initElse=function(){this.elseContainer=$("
    "),this.ruleContainer.append(this.elseContainer),this.elseLabel=$("否则"),this.elseContainer.append(this.elseLabel),this.elseActionContainer=$("
    "),this.elseContainer.append(this.elseActionContainer);var t=this;this.elseActionContainer.sortable({delay:200,update:function(e,n){var i=t.elseActionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.elseActions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.addElseActionButton=$("添加动作");var e=this;this.addElseActionButton.click(function(){e.addAction(null,!0)}),this.elseLabel.append(this.addElseActionButton)},urule.LoopRule.prototype.addAction=function(t,e){var n=this,i=$("
    "),o=$('');i.append(o);var r=new urule.ActionType(i,this);o.click(function(){if(e){var t=n.elseActions.indexOf(r);n.elseActions.splice(t,1)}else{var t=n.actions.indexOf(r);n.actions.splice(t,1)}i.remove(),window._setDirty()}),e?(this.elseActions.push(r),this.elseActionContainer.append(i)):(this.actions.push(r),this.actionContainer.append(i)),t&&r.initData(t),window._setDirty()},urule.LoopRule.prototype.initLoopEnd=function(){this.loopEndLabel=$("结束后动作"),this.ruleContainer.append(this.loopEndLabel),this.loopEndActionContainer=$("
    "),this.ruleContainer.append(this.loopEndActionContainer);var t=this;this.loopEndActionContainer.sortable({delay:200,update:function(e,n){var i=t.loopEndActionContainer.children("div");i.each(function(e,n){var i=$(n),o=i.prop("id"),r=t.loopEndActions,A=null,a=!0,s=!1,l=void 0;try{for(var c,u=r[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g.uuid===o){A=g;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}if(A){var d=r.indexOf(A);r.splice(d,1),r.splice(e,0,A)}}),window._setDirty()}}),this.addLoopEndActionButton=$("添加动作");var e=this;this.addLoopEndActionButton.click(function(){e.addLoopEndAction()}),this.loopEndLabel.append(this.addLoopEndActionButton)},urule.LoopRule.prototype.addLoopEndAction=function(t){var e=this,n=$("
    "),i=$('');n.append(i);var o=new urule.ActionType(n);i.click(function(){var t=e.loopEndActions.indexOf(o);e.loopEndActions.splice(t,1),n.remove(),window._setDirty()}),this.loopEndActions.push(o),this.loopEndActionContainer.append(n),t&&o.initData(t),window._setDirty()},urule.LoopRule.prototype.toXml=function(){for(var t='"+i+"",this.loopStartActions.length>0){t+="";for(var e=0;e"}t+="",t+=this.join.toXml(),t+="",t+="";for(var e=0;e",t+="";for(var e=0;e",this.loopEndActions.length>0){t+="";for(var e=0;e"}return t+=""}}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scoreCardTable.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scoreCardTable.bundle.js new file mode 100644 index 0000000..b09d6b1 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scoreCardTable.bundle.js @@ -0,0 +1,23 @@ +!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(481),r=o(i);n(1),n(10),n(497),n(319),n(321);var A=n(14),a=o(A),s=n(41),l=o(s);n(327),n(323),n(328),n(329),n(326),n(330),n(362),n(361),n(348),n(349),n(332),n(333),n(334),n(337),n(346),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(338),n(340),n(341),n(342),n(347);var c=n(226),u=n(370),g=o(u);$(document).ready(function(t){function e(){M._dirty&&(M._dirty=!1,window._dirty=!1,N.html(" 保存"),N.addClass("disabled"),w.html(" 保存新版本"),w.addClass("disabled"))}function n(t){try{!function(){var n=C.toXml(),i=window._server+"/common/saveFile";t?bootbox.prompt("请输入新版本描述.",function(r){r&&(0,c.ajaxSave)(i,{content:n,file:o,newVersion:t,versionComment:r},function(){e()})}):(0,c.ajaxSave)(i,{content:n,file:o,newVersion:t},function(){e()})}()}catch(t){bootbox.alert(t.message||t)}}var o=(0,c.getParameter)("file");if(!o)return void alert("未指定文件.");var i=$("#toolbarContainer"),A=$('
    ');i.append(A);var s=$('
    ');A.append(s);var u=$("");s.append(u);var d=$("");s.append(d);var M=this,p=$('
    ');A.append(p);var h=$('');p.append(h),h.click(function(){M.configVarDialog||(M.configVarDialog=new urule.ConfigVariableDialog(M)),M.configVarDialog.open()});var I=$('');p.append(I),I.click(function(){M.configConstantDialog||(M.configConstantDialog=new urule.ConfigConstantDialog(M)),M.configConstantDialog.open()});var f=$('');p.append(f),f.click(function(){M.configActionDialog||(M.configActionDialog=new urule.ConfigActionDialog(M)),M.configActionDialog.open()});var T=$(' ');p.append(T),T.click(function(){M.configParameterDialog||(M.configParameterDialog=new urule.ConfigParameterDialog(M)),M.configParameterDialog.open()});var E=$('
    ');A.append(E);var N=$('');E.append(N);var w=$('');E.append(w),window._setDirty=function(){M._dirty||(M._dirty=!0,window._dirty=!0,N.html(" *保存"),N.removeClass("disabled"),w.html(" *保存新版本"),w.removeClass("disabled"))},u.click(function(){C.addAttributeRow()}),d.click(function(){C.addCustomCol()});var C=new r.default({container:$("#tableContainer"),headers:[]});N.click(function(){n(!1)}),w.click(function(){n(!0)}),l.default.render(a.default.createElement(g.default,null),document.getElementById("dialogContainer")),$.ajax({url:window._server+"/common/loadXml",type:"POST",data:{files:o},success:function(t){var n=t[0];C.init(n);var o=n.libraries;if(o){for(var i=0;i加载数据失败,服务端错误:"+t.responseText+""):bootbox.alert("加载数据失败,服务端出错")}})})},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&T.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function s(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function l(t,e){var n,o,i;if(e.singleton){var r=f++;n=I||(I=a(e)),o=c.bind(null,n,r,!1),i=c.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=s(e),o=g.bind(null,n),i=function(){A(n),n.href&&URL.revokeObjectURL(n.href)}):(n=a(e),o=u.bind(null,n),i=function(){A(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function c(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=E(e,i);else{var r=document.createTextNode(i),A=t.childNodes;A[e]&&t.removeChild(A[e]),A.length?t.insertBefore(r,A[e]):t.appendChild(r)}}function u(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function g(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var d={},M=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=M(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=M(function(){return document.head||document.getElementsByTagName("head")[0]}),I=null,f=0,T=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return o(n,e),function(t){for(var r=[],A=0;A1){for(var h=Array(p),I=0;I1){for(var T=Array(f),E=0;E>"),b={array:A("array"),bool:A("boolean"),func:A("function"),number:A("number"),object:A("object"),string:A("string"),symbol:A("symbol"),any:a(),arrayOf:s,element:l(),instanceOf:c,node:M(),objectOf:g,oneOf:u,oneOfType:d,shape:p};i.prototype=Error.prototype,t.exports=b},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function o(t){return r.isValidElement(t)?void 0:i("143"),t}var i=n(19),r=n(21);n(20);t.exports=o},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var o=n(43),i=n(48),r=n(174),A=n(71),a=n(68),s=n(179),l=n(180),c=n(181),u=n(182);n(56);i.inject();var g={findDOMNode:l,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:s,unstable_batchedUpdates:a.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?o.getNodeFromInstance(t):null}},Mount:r,Reconciler:A});t.exports=g},function(t,e,n){"use strict";function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function A(t,e){if(!(t._flags&M.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var A in n)if(n.hasOwnProperty(A)){var a=n[A],s=o(a)._domID;if(0!==s){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(d)===String(s)||8===r.nodeType&&r.nodeValue===" react-text: "+s+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+s+" "){i(a,r);continue t}c("32",s)}}t._flags|=M.hasCachedChildNodes}}function a(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,o;t&&(o=t[p]);t=e.pop())n=o,e.length&&A(o,t);return n}function s(t){var e=a(t);return null!=e&&e._hostNode===t?e:null}function l(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())A(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),g=n(47),d=(n(46),u.ID_ATTRIBUTE_NAME),M=g,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),h={getClosestInstanceFromNode:a,getInstanceFromNode:s,getNodeFromInstance:l,precacheChildNodes:A,precacheNode:i,uncacheNode:r};t.exports=h},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,o=0;o8&&N<=11),y=32,D=String.fromCharCode(y),x={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},b=!1,B=null,L={eventTypes:x,extractEvents:function(t,e,n,o){return[l(t,e,n,o),g(t,e,n,o)]}};t.exports=L},function(t,e,n){"use strict";function o(t,e,n){var o=e.dispatchConfig.phasedRegistrationNames[n];return I(t,o)}function i(t,e,n){var i=o(t,n,e);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&M.traverseTwoPhase(t._targetInst,i,t)}function A(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?M.getParentInstance(e):null;M.traverseTwoPhase(n,i,t)}}function a(t,e,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,i=I(t,o);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}}function s(t){t&&t.dispatchConfig.registrationName&&a(t._targetInst,null,t)}function l(t){h(t,r)}function c(t){h(t,A)}function u(t,e,n,o){M.traverseEnterLeave(n,o,a,t,e)}function g(t){h(t,s)}var d=n(52),M=n(54),p=n(58),h=n(59),I=(n(56),d.getListener),f={accumulateTwoPhaseDispatches:l,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:g,accumulateEnterLeaveDispatches:u};t.exports=f},function(t,e,n){"use strict";function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function i(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(e));default:return!1}}var r=n(44),A=n(53),a=n(54),s=n(55),l=n(58),c=n(59),u=(n(46),{}),g=null,d=function(t,e){t&&(a.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},M=function(t){return d(t,!0)},p=function(t){return d(t,!1)},h=function(t){return"."+t._rootNodeID},I={injection:{injectEventPluginOrder:A.injectEventPluginOrder,injectEventPluginsByName:A.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var o=h(t),i=u[e]||(u[e]={});i[o]=n;var a=A.registrationNameModules[e];a&&a.didPutListener&&a.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(i(e,t._currentElement.type,t._currentElement.props))return null;var o=h(t);return n&&n[o]},deleteListener:function(t,e){var n=A.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var o=u[e];if(o){var i=h(t);delete o[i]}},deleteAllListeners:function(t){var e=h(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var o=A.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,o){for(var i,r=A.plugins,a=0;a-1?void 0:A("96",t),!l.plugins[n]){e.extractEvents?void 0:A("97",t),l.plugins[n]=e;var o=e.eventTypes;for(var r in o)i(o[r],e,r)?void 0:A("98",r,t)}}}function i(t,e,n){l.eventNameDispatchConfigs.hasOwnProperty(n)?A("99",n):void 0,l.eventNameDispatchConfigs[n]=t;var o=t.phasedRegistrationNames;if(o){for(var i in o)if(o.hasOwnProperty(i)){var a=o[i];r(a,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){l.registrationNameModules[t]?A("100",t):void 0,l.registrationNameModules[t]=e,l.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var A=n(44),a=(n(46),null),s={},l={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){a?A("101"):void 0,a=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];s.hasOwnProperty(n)&&s[n]===i||(s[n]?A("102",n):void 0,s[n]=i,e=!0)}e&&o()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return l.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var i=l.registrationNameModules[n[o]];if(i)return i}}return null},_resetEventPlugins:function(){a=null;for(var t in s)s.hasOwnProperty(t)&&delete s[t];l.plugins.length=0;var e=l.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var o=l.registrationNameModules;for(var i in o)o.hasOwnProperty(i)&&delete o[i]}};t.exports=l},function(t,e,n){"use strict";function o(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function A(t,e,n,o){var i=t.type||"unknown-event";t.currentTarget=I.getNodeFromInstance(o),e?p.invokeGuardedCallbackWithCatch(i,n,t):p.invokeGuardedCallback(i,n,t),t.currentTarget=null}function a(t,e){var n=t._dispatchListeners,o=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-e:void 0;return this._fallbackText=i.slice(t,a),this._fallbackText}}),r.addPoolingTo(o),t.exports=o},function(t,e,n){"use strict";var o=n(44),i=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e),o}return new n(t,e)},A=function(t,e,n){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n),i}return new o(t,e,n)},a=function(t,e,n,o){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,n,o),r}return new i(t,e,n,o)},s=function(t,e,n,o,i){var r=this;if(r.instancePool.length){var A=r.instancePool.pop();return r.call(A,t,e,n,o,i),A}return new r(t,e,n,o,i)},l=function(t){var e=this;t instanceof e?void 0:o("25"),t.destructor(),e.instancePool.length8));var v=!1;E.canUseDOM&&(v=D("input")&&(!document.documentMode||document.documentMode>11));var U={get:function(){return Q.get.call(this)},set:function(t){m=""+t,Q.set.call(this,t)}},S={eventTypes:b,extractEvents:function(t,e,n,i){var r,A,a=e?N.getNodeFromInstance(e):window;if(o(a)?j?r=s:A=l:x(a)?v?r=d:(r=p,A=M):h(a)&&(r=I),r){var c=r(t,e);if(c){var u=C.getPooled(b.change,c,n,i);return u.type="change",T.accumulateTwoPhaseDispatches(u),u}}A&&A(t,a,e)}};t.exports=S},function(t,e,n){"use strict";function o(){b.ReactReconcileTransaction&&N?void 0:c("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=g.getPooled(),this.reconcileTransaction=b.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,i,r,A){return o(),N.batchedUpdates(t,e,n,i,r,A)}function A(t,e){return t._mountOrder-e._mountOrder}function a(t){var e=t.dirtyComponentsLength;e!==I.length?c("124",e,I.length):void 0,I.sort(A),f++;for(var n=0;n]/,s=n(91),l=s(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{o=o||document.createElement("div"),o.innerHTML=""+e+"";for(var n=o.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(l=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),A.test(e)||"<"===e[0]&&a.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=l},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,o,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,o,i)})}:t};t.exports=n},function(t,e,n){"use strict";var o=n(60),i=n(93),r=n(90),A=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};o.canUseDOM&&("textContent"in document.documentElement||(A=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,i(e))})),t.exports=A},function(t,e){"use strict";function n(t){var e=""+t,n=i.exec(e);if(!n)return e;var o,r="",A=0,a=0;for(A=n.index;A]/;t.exports=o},function(t,e,n){"use strict";var o=n(44),i=n(88),r=n(60),A=n(95),a=n(57),s=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:o("56"),e?void 0:o("57"),"HTML"===t.nodeName?o("58"):void 0,"string"==typeof e){var n=A(e,a)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=s},function(t,e,n){"use strict";function o(t){var e=t.match(c);return e&&e[1].toLowerCase()}function i(t,e){var n=l;l?void 0:s(!1);var i=o(t),r=i&&a(i);if(r){n.innerHTML=r[1]+t+r[2];for(var c=r[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:s(!1),A(u).forEach(e));for(var g=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return g}var r=n(60),A=n(96),a=n(97),s=n(46),l=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=i},function(t,e,n){"use strict";function o(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?A(!1):void 0,"number"!=typeof e?A(!1):void 0,0===e||e-1 in t?void 0:A(!1),"function"==typeof t.callee?A(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),o=0;o":A.innerHTML="<"+t+">",a[t]=!A.firstChild),a[t]?g[t]:null}var i=n(60),r=n(46),A=i.canUseDOM?document.createElement("div"):null,a={},s=[1,'"],l=[1,"","
    "],c=[3,"","
    "],u=[1,'',""],g={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:s,option:s,caption:l,colgroup:l,tbody:l,tfoot:l,thead:l,td:c,th:c},d=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];d.forEach(function(t){g[t]=u,a[t]=!0}),t.exports=o},function(t,e,n){"use strict";var o=n(87),i=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=i.getNodeFromInstance(t);o.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function o(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&V in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",o(t)):void 0)}function r(t,e,n,o){if(!(o instanceof v)){var i=t._hostContainerInfo,r=i._node&&i._node.nodeType===G,a=r?i._node:i._ownerDocument;Y(e,a),o.getReactMountReady().enqueue(A,{inst:t,registrationName:e,listener:n})}}function A(){var t=this;C.putListener(t.inst,t.registrationName,t.listener)}function a(){var t=this;B.postMountWrapper(t)}function s(){var t=this;Q.postMountWrapper(t)}function l(){var t=this;L.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:p("63");var e=z(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[D.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in P)P.hasOwnProperty(n)&&t._wrapperState.listeners.push(D.trapBubbledEvent(n,P[n],e));break;case"source":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[D.trapBubbledEvent("topError","error",e),D.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[D.trapBubbledEvent("topReset","reset",e),D.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[D.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){m.postUpdateWrapper(this)}function g(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function d(t,e){return t.indexOf("-")>=0||null!=e.is}function M(t){var e=t.type;g(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),h=n(16),I=n(100),f=n(102),T=n(88),E=n(89),N=n(45),w=n(110),C=n(52),y=n(53),D=n(112),x=n(47),b=n(43),B=n(115),L=n(118),m=n(119),Q=n(120),j=(n(74),n(121)),v=n(141),U=(n(57),n(93)),S=(n(46),n(77),n(130),n(144),n(56),x),k=C.deleteListener,z=b.getNodeFromInstance,Y=D.listenTo,R=y.registrationNameModules,F={string:!0,number:!0},O="style",V="__html",H={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},G=11,P={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},X={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},W={listing:!0,pre:!0,textarea:!0},J=h({menuitem:!0},X),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;M.displayName="ReactDOMComponent",M.Mixin={mountComponent:function(t,e,n,o){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":B.mountWrapper(this,r,e),r=B.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"option":L.mountWrapper(this,r,e),r=L.getHostProps(this,r);break;case"select":m.mountWrapper(this,r,e),r=m.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"textarea":Q.mountWrapper(this,r,e),r=Q.getHostProps(this,r),t.getReactMountReady().enqueue(c,this)}i(this,r);var A,u;null!=e?(A=e._namespaceURI,u=e._tag):n._tag&&(A=n._namespaceURI,u=n._tag),(null==A||A===E.svg&&"foreignobject"===u)&&(A=E.html),A===E.html&&("svg"===this._tag?A=E.svg:"math"===this._tag&&(A=E.mathml)),this._namespaceURI=A;var g;if(t.useCreateElement){var d,M=n._ownerDocument;if(A===E.html)if("script"===this._tag){var p=M.createElement("div"),h=this._currentElement.type;p.innerHTML="<"+h+">",d=p.removeChild(p.firstChild)}else d=r.is?M.createElement(this._currentElement.type,r.is):M.createElement(this._currentElement.type);else d=M.createElementNS(A,this._currentElement.type);b.precacheNode(this,d),this._flags|=S.hasCachedChildNodes,this._hostParent||w.setAttributeForRoot(d),this._updateDOMProperties(null,r,t);var f=T(d);this._createInitialChildren(t,r,o,f),g=f}else{var N=this._createOpenTagMarkupAndPutListeners(t,r),C=this._createContentMarkup(t,r,o);g=!C&&X[this._tag]?N+"/>":N+">"+C+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(a,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(I.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(l,this)}return g},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];if(null!=i)if(R.hasOwnProperty(o))i&&r(this,o,i,t);else{o===O&&(i&&(i=this._previousStyleCopy=h({},e.style)),i=f.createMarkupForStyles(i,this));var A=null;null!=this._tag&&d(this._tag,e)?H.hasOwnProperty(o)||(A=w.createMarkupForCustomAttribute(o,i)):A=w.createMarkupForProperty(o,i),A&&(n+=" "+A)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+w.createMarkupForRoot()),n+=" "+w.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var o="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(o=i.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)o=U(r);else if(null!=A){var a=this.mountChildren(A,t,n);o=a.join("")}}return W[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(t,e,n,o){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&T.queueHTML(o,i.__html);else{var r=F[typeof e.children]?e.children:null,A=null!=r?null:e.children;if(null!=r)T.queueText(o,r);else if(null!=A)for(var a=this.mountChildren(A,t,n),s=0;s1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function r(t,e){var n=a.get(t);if(!n){return null}return n}var A=n(44),a=(n(22),n(123)),s=(n(74),n(68)),l=(n(46),n(56),{isMounted:function(t){var e=a.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){l.validateCallback(e,n);var i=r(t);return i?(i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],void o(i)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],o(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,o(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(e),o(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,o(t)},validateCallback:function(t,e){t&&"function"!=typeof t?A("122",e,i(t)):void 0}});t.exports=l},function(t,e,n){"use strict";var o=(n(16),n(57)),i=(n(56),o);t.exports=i},function(t,e,n){"use strict";var o=n(16),i=n(88),r=n(43),A=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(A.prototype,{mountComponent:function(t,e,n,o){var A=n._idCounter++;this._domID=A,this._hostParent=e,this._hostContainerInfo=n;var a=" react-empty: "+this._domID+" ";if(t.useCreateElement){var s=n._ownerDocument,l=s.createComment(a);return r.precacheNode(this,l),i(l)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function o(t,e){"_hostNode"in t?void 0:s("33"),"_hostNode"in e?void 0:s("33");for(var n=0,o=t;o;o=o._hostParent)n++;for(var i=0,r=e;r;r=r._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var A=n;A--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t?void 0:s("35"),"_hostNode"in e?void 0:s("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:s("36"),t._hostParent}function A(t,e,n){for(var o=[];t;)o.push(t),t=t._hostParent;var i;for(i=o.length;i-- >0;)e(o[i],"captured",n);for(i=0;i0;)n(s[l],"captured",r)}var s=n(44);n(46);t.exports={isAncestor:i,getLowestCommonAncestor:o,getParentInstance:r,traverseTwoPhase:A,traverseEnterLeave:a}},function(t,e,n){"use strict";var o=n(44),i=n(16),r=n(87),A=n(88),a=n(43),s=n(93),l=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(l.prototype,{mountComponent:function(t,e,n,o){var i=n._idCounter++,r=" react-text: "+i+" ",l=" /react-text ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(r),g=c.createComment(l),d=A(c.createDocumentFragment());return A.queueChild(d,A(u)),this._stringText&&A.queueChild(d,A(c.createTextNode(this._stringText))),A.queueChild(d,A(g)),a.precacheNode(this,u),this._closingComment=g,d}var M=s(this._stringText);return t.renderToStaticMarkup?M:""+M+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();r.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=a.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,a.uncacheNode(this)}}),t.exports=l},function(t,e,n){"use strict";function o(){this.reinitializeTransaction()}var i=n(16),r=n(68),A=n(75),a=n(57),s={initialize:a,close:function(){g.isBatchingUpdates=!1}},l={initialize:a,close:r.flushBatchedUpdates.bind(r)},c=[l,s];i(o.prototype,A,{getTransactionWrappers:function(){return c}});var u=new o,g={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,o,i,r){var A=g.isBatchingUpdates;return g.isBatchingUpdates=!0,A?t(e,n,o,i,r):u.perform(t,null,e,n,o,i,r)}};t.exports=g},function(t,e,n){"use strict";function o(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=d(t.nativeEvent),n=u.getClosestInstanceFromNode(e),i=n;do t.ancestors.push(i),i=i&&o(i);while(i);for(var r=0;re.end?(n=e.end,o=e.start):(n=e.start,o=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",o-n),i.select()}function a(t,e){if(window.getSelection){var n=window.getSelection(),o=t[c()].length,i=Math.min(e.start,o),r=void 0===e.end?i:Math.min(e.end,o);if(!n.extend&&i>r){var A=r;r=i,i=A}var a=l(t,i),s=l(t,r);if(a&&s){var u=document.createRange();u.setStart(a.node,a.offset),n.removeAllRanges(),i>r?(n.addRange(u),n.extend(s.node,s.offset)):(u.setEnd(s.node,s.offset),n.addRange(u))}}}var s=n(60),l=n(156),c=n(63),u=s.canUseDOM&&"selection"in document&&!("getSelection"in window),g={getOffsets:u?i:r,setOffsets:u?A:a};t.exports=g},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var i=n(t),r=0,A=0;i;){if(3===i.nodeType){if(A=r+i.textContent.length,r<=e&&A>=e)return{node:i,offset:e-r};r=A}i=n(o(i))}}t.exports=i},function(t,e,n){"use strict";function o(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?o(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(158);t.exports=o},function(t,e,n){"use strict";function o(t){return i(t)&&3==t.nodeType}var i=n(159);t.exports=o},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function o(t){if("selectionStart"in t&&s.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(t,e){if(f||null==p||p!==c())return null;var n=o(p);if(!I||!g(I,n)){I=n;var i=l.getPooled(M.select,h,t,e);return i.type="select",i.target=p,r.accumulateTwoPhaseDispatches(i),i}return null}var r=n(51),A=n(60),a=n(43),s=n(154),l=n(65),c=n(160),u=n(78),g=n(130),d=A.canUseDOM&&"documentMode"in document&&document.documentMode<=11,M={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,h=null,I=null,f=!1,T=!1,E={eventTypes:M,extractEvents:function(t,e,n,o){if(!T)return null;var r=e?a.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,h=e,I=null);break;case"topBlur":p=null,h=null,I=null;break;case"topMouseDown":f=!0;break;case"topContextMenu":case"topMouseUp":return f=!1,i(n,o);case"topSelectionChange":if(d)break;case"topKeyDown":case"topKeyUp":return i(n,o)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(T=!0)}};t.exports=E},function(t,e,n){"use strict";function o(t){return"."+t._rootNodeID}function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),A=n(150),a=n(51),s=n(43),l=n(164),c=n(165),u=n(65),g=n(166),d=n(167),M=n(81),p=n(170),h=n(171),I=n(172),f=n(82),T=n(173),E=n(57),N=n(168),w=(n(46),{}),C={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,o="top"+e,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};w[t]=i,C[o]=i});var y={},D={eventTypes:w,extractEvents:function(t,e,n,o){var i=C[t];if(!i)return null;var A;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":A=u;break;case"topKeyPress":if(0===N(n))return null;case"topKeyDown":case"topKeyUp":A=d;break;case"topBlur":case"topFocus":A=g;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":A=M;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":A=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":A=h;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":A=l;break;case"topTransitionEnd":A=I;break;case"topScroll":A=f;break;case"topWheel":A=T;break;case"topCopy":case"topCut":case"topPaste":A=c}A?void 0:r("86",t);var s=A.getPooled(i,e,n,o);return a.accumulateTwoPhaseDispatches(s),s},didPutListener:function(t,e,n){if("onClick"===e&&!i(t._tag)){var r=o(t),a=s.getNodeFromInstance(t);y[r]||(y[r]=A.listen(a,"click",E))}},willDeleteListener:function(t,e){if("onClick"===e&&!i(t._tag)){var n=o(t);y[n].remove(),delete y[n]}}};t.exports=D},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r={relatedTarget:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(168),A=n(169),a=n(84),s={key:A,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:a,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};i.augmentClass(o,s),t.exports=o},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function o(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=i(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?A[t.keyCode]||"Unidentified":""}var i=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},A={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={dataTransfer:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(84),A={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};i.augmentClass(o,A),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e){for(var n=Math.min(t.length,e.length),o=0;o.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var A,a=h.createElement(Y,{child:e});if(t){var s=w.get(t);A=s._processChildContext(s._context)}else A=b;var c=g(n);if(c){var u=c._currentElement,M=u.props.child;if(m(M,e)){var p=c._renderedComponent.getPublicInstance(),I=o&&function(){o.call(p)};return R._updateRootComponent(c,a,A,n,I),p}R.unmountComponentAtNode(n)}var f=i(n),T=f&&!!r(f),E=l(n),N=T&&!c&&!E,C=R._renderNewRootComponent(a,n,N,A)._renderedComponent.getPublicInstance();return o&&o.call(C),C},render:function(t,e,n){return R._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:d("40");var e=g(t);if(!e){l(t),1===t.nodeType&&t.hasAttribute(j);return!1}return delete k[e._instance.rootID],x.batchedUpdates(s,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,A){if(c(e)?void 0:d("41"),r){var a=i(e);if(C.canReuseMarkup(t,a))return void f.precacheNode(n,a);var s=a.getAttribute(C.CHECKSUM_ATTR_NAME);a.removeAttribute(C.CHECKSUM_ATTR_NAME);var l=a.outerHTML;a.setAttribute(C.CHECKSUM_ATTR_NAME,s);var u=t,g=o(u,l),p=" (client) "+u.substring(g-20,g+20)+"\n (server) "+l.substring(g-20,g+20);e.nodeType===U?d("42",p):void 0}if(e.nodeType===U?d("43"):void 0,A.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);M.insertTreeBefore(e,t,null)}else L(e,t),f.precacheNode(n,e.firstChild)}};t.exports=R},function(t,e,n){"use strict";function o(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===i?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var i=(n(144),9);t.exports=o},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var o=n(178),i=/\/?>/,r=/^<\!\-\-/,A={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=o(t);return r.test(t)?t:t.replace(i," "+A.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(A.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=o(t);return i===n}};t.exports=A},function(t,e){"use strict";function n(t){for(var e=1,n=0,i=0,r=t.length,A=r&-4;i服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=o,e.ajaxSave=i,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(){var t="_ui_"+c++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function A(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){a(t),e(t)},error:function(){alert("加载资源失败.")}})}function a(t){switch(t.type){case"root":t._icon=l.default.frameStyle.getRootIcon(),t._style=l.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=l.default.frameStyle.getFolderIcon(),t._style=l.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=l.default.frameStyle.getRuleIcon(),t._style=l.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=l.default.frameStyle.getProjectIcon(),t._style=l.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=l.default.frameStyle.getResourceIcon(),t._style=l.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=l.default.frameStyle.getResourcePackageIcon(),t._style=l.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=l.default.frameStyle.getLibIcon(),t._style=l.default.frameStyle.getLibIconStyle();break;case"action":t._icon=l.default.frameStyle.getActionIcon(),t._style=l.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=l.default.frameStyle.getParameterIcon(),t._style=l.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=l.default.frameStyle.getConstantIcon(),t._style=l.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=l.default.frameStyle.getVariableIcon(),t._style=l.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=l.default.frameStyle.getRuleLibIcon(),t._style=l.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=l.default.frameStyle.getDecisionTableLibIcon(),t._style=l.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=l.default.frameStyle.getDecisionTreeLibIcon(),t._style=l.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=l.default.frameStyle.getFlowLibIcon(),t._style=l.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=l.default.frameStyle.getUlIcon(),t._style=l.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=l.default.frameStyle.getDecisionTableIcon(),t._style=l.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=l.default.frameStyle.getScriptDecisionTableIcon(),t._style=l.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=l.default.frameStyle.getDecisionTreeIcon(),t._style=l.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=l.default.frameStyle.getFlowIcon(),t._style=l.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=l.default.frameStyle.getScorecardIcon(),t._style=l.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){a(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=i,e.loadFileVersions=r,e.loadResourceTreeData=A;var s=n(228),l=o(s),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=o},,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?l.show():l.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,o=e.operationConfig,i=e.dispatch,r=e.selectFirst,A=(e.uniqueKey,this.props.rows||[]),a=[],s=[];n.forEach(function(e,n){e.editable?a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label),l.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:e.width}},l.default.createElement("label",null,e.label)))}),o&&a.push(l.default.createElement("td",{key:(0,h.uniqueID)(),style:{width:o.width}},l.default.createElement("label",null,"操作列")));var c=l.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?l.default.createElement("td",{key:(0,h.uniqueID)()},l.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):l.default.createElement("td",{key:(0,h.uniqueID)()}," ")}),o?l.default.createElement("td",null):null);s.push(c),A.forEach(function(e,A){e.id||(e.id=(0,h.uniqueID)());var a=e.id;0===A&&r?s.push(l.default.createElement(d.default,{key:a,select:!0,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:A})):s.push(l.default.createElement(d.default,{key:a,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:A}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return l.default.createElement("table",{className:"table table-bordered",style:u},l.default.createElement("thead",null,l.default.createElement("tr",{className:"well"},a)),l.default.createElement("tbody",null,s))}}]),e}(s.Component);I.propTypes={headers:l.default.PropTypes.array.isRequired,operationConfig:s.PropTypes.object},e.default=I},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var o=e[t];o&&""!==o||(o="{}");var i=JSON.parse(o)||{},r=i.rows||[],A=i.type,a=function(o){var i={type:A,rows:o},r=JSON.stringify(i);e[t]=r;var a=n.find("div");a.html(r)};if(A){var s=null,l=!0,c=!1,u=void 0;try{for(var g,d=simulatorCategoryData[Symbol.iterator]();!(l=(g=d.next()).done);l=!0){var M=g.value;if(A===M.clazz){s=M;break}}}catch(t){c=!0,u=t}finally{try{!l&&d.return&&d.return()}finally{if(c)throw u}}var h=s.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:h,rows:r,callback:a})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(n=(s=l.next()).done);n=!0){var c=s.value;e.append('")}}catch(t){o=!0,i=t}finally{try{!n&&l.return&&l.return()}finally{if(o)throw i}}e.append(''),I.MsgBox.dialog("选择子对象类型",e,function(){if(A=e.val(),!A||""===A)return void I.MsgBox.alert("请先选择子对象类型!");var n=null,o=!0,i=!1,s=void 0; +try{for(var l,c=t[Symbol.iterator]();!(o=(l=c.next()).done);o=!0){var u=l.value;if(A===u.clazz){n=u;break}}}catch(t){i=!0,s=t}finally{try{!o&&c.return&&c.return()}finally{if(i)throw s}}var g=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:g,rows:r,callback:a})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var o=n.find("div");o.html(e[t]),o.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,o=e.header,i=o.dateFormat,r=n[o.name];if(i){var A=new Date(r);r=(0,h.formatDate)(A,i)}r&&"object"===("undefined"==typeof r?"undefined":s(r))&&(r=JSON.stringify(r));var a={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:a,onClick:function(e){if(o.editable){var i=e.target;$(i).css({display:"none"}),n._editorType?t._showEditor(o.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:i,rowData:n,colId:o.id})}}},r))}}]),e}(c.Component);e.default=f},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var i=n(240),r=o(i);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function A(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,a,s,l;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],A(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:a=Array.prototype.slice.call(arguments,1),n.apply(this,a)}else if(r(n))for(a=Array.prototype.slice.call(arguments,1),l=n.slice(),i=l.length,s=0;s0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,A,a;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],A=n.length,i=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(a=A;a-- >0;)if(n[a]===e||n[a].listener&&n[a].listener===e){i=a;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var o=n(242).default,i=n(243).default,r=n(251),A=n(252).default,a=n(302);t.exports={Tool:o,Node:i,MsgBox:r,Event:a,FlowDesigner:A}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var o=this.newNode();return o?(o._tool=this,o._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),o._createFigure(this.context,{x:t,y:e},n),o):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,o=!1,i=void 0;try{for(var r,A=this.context.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof Node&&a.name===t){e=!0;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e?this._buildNodeName():t}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);es-c&&as-c&&a>l-c?this.attr("cursor","se-resize"):Al-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},o=function(n){if(!this.dragging){var o=t.currentTool;if(o){if(o instanceof d.default||o instanceof u.default||(t.currentTool=t.selectTool,o=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),o instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var i=!1,r=!0,A=!1,a=void 0;try{for(var s,c=t.selectionFigures[Symbol.iterator]();!(r=(s=c.next()).done);r=!0){var g=s.value;if(g===e){i=!0;break}}}catch(t){A=!0,a=t}finally{try{!r&&c.return&&c.return()}finally{if(A)throw a}}i||(t.resetSelection(),t.selectFigure(e))}if(o instanceof d.default){var M=n.offsetX,h=n.offsetY,I=t.currentConnection;if(I){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");I.endX=M,I.endY=h,I.from!==e?!function(){I.endPath(e),t.currentConnection=null;var n=I.from.uuid,o=e.uuid,i=I.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(o);I=new l.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),I.uuid=i,I.endPath(r)},undo:function(){e.context.removeFigureByUUID(i)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");I=new l.default(e,{endX:M,endY:h}),t.currentConnection=I}}}}};this.rect.mouseover(n),this.rect.mousedown(o),this.icon.mouseover(n),this.icon.mousedown(o);var i=function(){var n=e.rect,o=t.currentTool;if(o&&o instanceof u.default){var i=!1,r=t.selectionFigures,A=!0,a=!1,s=void 0;try{for(var c,g=r[Symbol.iterator]();!(A=(c=g.next()).done);A=!0){var d=c.value;if(d===e){i=!0;break}}}catch(t){a=!0,s=t}finally{try{!A&&g.return&&g.return()}finally{if(a)throw s}}if(!i)return void t.resetSelection();r.forEach(function(t,e){t instanceof l.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,o){var i=t.currentTool;if(i&&i instanceof u.default){e.context.snapto&&(n-=n%10,o-=o%10);var r=t.selectionFigures,A=e.rect,a=(e.icon,A.ox+n),s=A.oy+o;if(!(a<1||s<1)){e.context.resizePaper(a+150,s+150);var c=void 0,g=void 0;switch(this.attr("cursor")){case"nw-resize":c=A.ow-n,g=A.oh-o,c>20&&g>20&&A.attr({x:a,y:s,width:c,height:g});break;case"ne-resize":c=A.ow+n,g=A.oh-o,c>20&&g>20&&A.attr({y:s,width:c,height:g});break;case"se-resize":c=A.ow+n,g=A.oh+o,c>20&&g>20&&A.attr({width:c,height:g});break;case"sw-resize":c=A.ow-n,g=A.oh+o,c>20&&g>20&&A.attr({x:a,width:c,height:g});break;default:r.forEach(function(t,e){t instanceof l.default||t._moveRect(n,o)})}r.forEach(function(t,e){t instanceof l.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},A=function(){e.rect.dragging=!1;var n=[],o=new Map,i=new Map,r=e.rect.ow,A=e.rect.oh,a=e.rect.attr("width"),s=e.rect.attr("height"),c=e.uuid,u=!0,g=!1,d=void 0;try{for(var M,p=t.selectionFigures[Symbol.iterator]();!(u=(M=p.next()).done);u=!0){var h=M.value;if(!(h instanceof l.default)){n.push(h.uuid);var I=h.rect.ox,f=h.rect.oy;I=I?I:0,f=f?f:0;var T=h.rect.attr("x"),E=h.rect.attr("y");o.set(h.uuid,{x:T,y:E}),i.set(h.uuid,{x:I,y:f})}}}catch(t){g=!0,d=t}finally{try{!u&&p.return&&p.return()}finally{if(g)throw d}}e.context.addRedoUndo({redo:function(){var e=!0,i=!1,r=void 0;try{for(var A,l=n[Symbol.iterator]();!(e=(A=l.next()).done);e=!0){var u=A.value,g=t.getNodeByUUID(u),d=o.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:a,height:s})}}catch(t){i=!0,r=t}finally{try{!e&&l.return&&l.return()}finally{if(i)throw r}}var M=!0,p=!1,h=void 0;try{for(var I,f=n[Symbol.iterator]();!(M=(I=f.next()).done);M=!0){var T=I.value,E=t.getNodeByUUID(T);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&f.return&&f.return()}finally{if(p)throw h}}},undo:function(){var e=!0,o=!1,a=void 0;try{for(var s,l=n[Symbol.iterator]();!(e=(s=l.next()).done);e=!0){var u=s.value,g=t.getNodeByUUID(u),d=i.get(u);g.rect.attr({x:d.x,y:d.y}),u===c&&g.rect.attr({width:r,height:A})}}catch(t){o=!0,a=t}finally{try{!e&&l.return&&l.return()}finally{if(o)throw a}}var M=!0,p=!1,h=void 0;try{for(var I,f=n[Symbol.iterator]();!(M=(I=f.next()).done);M=!0){var T=I.value,E=t.getNodeByUUID(T);E._moveAndResizeTextAndIcon(),E._resetConnections()}}catch(t){p=!0,h=t}finally{try{!M&&f.return&&f.return()}finally{if(p)throw h}}}})};this.rect.drag(r,i,A),this.icon.drag(r,i,A)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,o=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,o=this.rect.oy+e):(n=this.rect.attr("x")+t,o=this.rect.attr("x")+e),this.rect.attr({x:n,y:o})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),o=this.rect.attr("width"),i=this.rect.attr("height");return t&&(e-=5,n-=5,o+=10,i+=10),"M "+e+" "+n+" L "+(e+o)+" "+n+" L "+(e+o)+" "+(n+i)+" L "+e+" "+(n+i)+" L "+e+" "+n}}]),t}();e.default=h},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,o=n.attr("x"),i=n.attr("y"),r=n.attr("width"),A=n.attr("height");o+=r/2,i+=A/2-10;var a=t.x,l=t.y;t=[],t.push(["M",a,l]),t.push(["L",o,i])}var c=this.to.getPathInfo(!0),u=s.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),o=t.attr("width"),i=t.attr("height");e+=o/2,n+=i/2-10;var r=this.endX,A=this.endY,a=0,l=0,c=null;if(this.to){var u=this.to.rect;r=u.attr("x"),A=u.attr("y"),a=u.attr("width"),l=u.attr("height"),r+=a/2,A+=l/2-10}var g=this.from.getPathInfo(!0),d=Math.abs(e+o/2-(r-a/2)),M=Math.abs(n+i/2-(A-l/2)),p="M"+e+" "+n;if(d>=M){var h=p+" L"+r+" "+n,I=s.default.pathIntersection(g,h);if(I.length>0&&(e=I[0].x,n=I[0].y,p="M"+I[0].x+" "+I[0].y),this.to){var f="M"+e+" "+A+" L"+r+" "+A,T=this.to.getPathInfo(!0);I=s.default.pathIntersection(T,f),I.length>0&&(r=I[0].x,A=I[0].y,e0&&(e=C[0].x,n=C[0].y,p="M"+C[0].x+" "+C[0].y),this.to){var y="M"+r+" "+n+" L"+r+" "+A,D=this.to.getPathInfo(!0);C=s.default.pathIntersection(D,y),C.length>0&&(r=C[0].x,A=C[0].y,n=1e3&&delete a[s.shift()],s.push(A),a[A]=t[B](e,r),n?n(a[A]):a[A])}return i}function r(){return this.hex}function A(t,e){for(var n=[],o=0,i=t.length;i-2*!e>o;o+=2){var r=[{x:+t[o-2],y:+t[o-1]},{x:+t[o],y:+t[o+1]},{x:+t[o+2],y:+t[o+3]},{x:+t[o+4],y:+t[o+5]}];e?o?i-4==o?r[3]={x:+t[0],y:+t[1]}:i-2==o&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[i-2],y:+t[i-1]}:i-4==o?r[3]=r[2]:o||(r[0]={x:+t[o],y:+t[o+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function a(t,e,n,o,i){var r=-3*e+9*n-9*o+3*i,A=t*r+6*e-12*n+6*o;return t*A-3*e+3*n}function s(t,e,n,o,i,r,A,s,l){null==l&&(l=1),l=l>1?1:l<0?0:l;for(var c=l/2,u=12,g=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],d=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],M=0,p=0;pM;)g/=2,d+=(cR(i,A)||R(e,o)R(r,a))){var s=(t*o-e*n)*(i-A)-(t-n)*(i*a-r*A),l=(t*o-e*n)*(r-a)-(e-o)*(i*a-r*A),c=(t-n)*(r-a)-(e-o)*(i-A);if(c){var u=s/c,g=l/c,d=+u.toFixed(2),M=+g.toFixed(2);if(!(d<+F(t,n).toFixed(2)||d>+R(t,n).toFixed(2)||d<+F(i,A).toFixed(2)||d>+R(i,A).toFixed(2)||M<+F(e,o).toFixed(2)||M>+R(e,o).toFixed(2)||M<+F(r,a).toFixed(2)||M>+R(r,a).toFixed(2)))return{x:u,y:g}}}}function u(t,n,o){var i=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(i,r))return o?0:[];for(var A=s.apply(0,t),a=s.apply(0,n),l=R(~~(A/5),1),u=R(~~(a/5),1),g=[],d=[],M={},p=o?0:[],h=0;h=0&&x<=1.001&&b>=0&&b<=1.001&&(o?p++:p.push({x:D.x,y:D.y,t1:F(x,1),t2:F(b,1)}))}}return p}function g(t,n,o){t=e._path2curve(t),n=e._path2curve(n);for(var i,r,A,a,s,l,c,g,d,M,p=o?0:[],h=0,I=t.length;ho)return o;for(;nr?n=i:o=i,i=(o-n)/2+n}return i}var l=3*e,c=3*(o-e)-l,u=1-l-c,g=3*n,d=3*(i-n)-g,M=1-g-d;return a(t,1/(200*r))}function h(t,e){var n=[],o={};if(this.ms=e,this.times=1,t){for(var i in t)t[y](i)&&(o[q(i)]=t[i],n.push(q(i)));n.sort(ct)}this.anim=o,this.top=n[n.length-1],this.percents=n}function I(n,o,i,r,A,a){i=q(i);var s,l,c,u,g,M,h=n.ms,I={},f={},T={};if(r)for(w=0,C=re.length;wr*n.top){i=n.percents[w],g=n.percents[w-1]||0,h=h/n.top*(i-g),u=n.percents[w+1],s=n.anim[i];break}r&&o.attr(n.anim[n.percents[w]])}if(s){if(l)l.initstatus=r,l.start=new Date-l.ms*r;else{for(var D in s)if(s[y](D)&&(nt[y](D)||o.paper.customAttributes[y](D)))switch(I[D]=o.attr(D),null==I[D]&&(I[D]=et[D]),f[D]=s[D],nt[D]){case G:T[D]=(f[D]-I[D])/h;break;case"colour":I[D]=e.getRGB(I[D]);var x=e.getRGB(f[D]);T[D]={r:(x.r-I[D].r)/h,g:(x.g-I[D].g)/h,b:(x.b-I[D].b)/h};break;case"path":var b=Ut(I[D],f[D]),B=b[1];for(I[D]=b[0],T[D]=[],w=0,C=I[D].length;w',ht=It.firstChild,ht.style.behavior="url(#default#VML)",!ht||"object"!=typeof ht.adj)return e.type=Q;It=null}e.svg=!(e.vml="VML"==e.type),e._Paper=b,e.fn=E=b.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=z.call(e),"finite"==e?!Z[y](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||W.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,o,i,r,A){if(null==r){var a=t-o,s=n-i;return a||s?(180+180*Y.atan2(-s,-a)/H+360)%360:0}return e.angle(t,n,r,A)-e.angle(o,i,r,A)},e.rad=function(t){return t%360*H/180},e.deg=function(t){return Math.round(180*t/H%360*1e3)/1e3},e.snapTo=function(t,n,o){if(o=e.is(o,"finite")?o:10,e.is(t,X)){for(var i=t.length;i--;)if(O(t[i]-n)<=o)return t[i]}else{t=+t;var r=n%t;if(rt-o)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*Y.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,D.win,n),D.win=n,D.doc=D.win.document,e._engine.initWin&&e._engine.initWin(D.win)};var ft=function(t){if(e.vml){var n,o=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var A=n.createTextRange();ft=i(function(t){try{n.style.color=v(t).replace(o,Q);var e=A.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var a=D.doc.createElement("i");a.title="Raphaël Colour Picker",a.style.display="none",D.doc.body.appendChild(a),ft=i(function(t){return a.style.color=t,D.doc.defaultView.getComputedStyle(a,Q).getPropertyValue("color")})}return ft(t)},Tt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Et=function(){return"hsl("+[this.h,this.s,this.l]+")"},Nt=function(){return this.hex},wt=function(t,n,o){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(o=t.b,n=t.g,t=t.r),null==n&&e.is(t,P)){var i=e.getRGB(t);t=i.r,n=i.g,o=i.b}return(t>1||n>1||o>1)&&(t/=255,n/=255,o/=255),[t,n,o]},Ct=function(t,n,o,i){t*=255,n*=255,o*=255;var r={r:t,g:n,b:o,hex:e.rgb(t,n,o),toString:Nt};return e.is(i,"finite")&&(r.opacity=i),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=Nt,t},e.hsb2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,o=t.o,t=t.h),t*=360;var i,r,A,a,s;return t=t%360/60,s=n*e,a=s*(1-O(t%2-1)),i=r=A=n-s,t=~~t,i+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],Ct(i,r,A,o)},e.hsl2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,r,A,a,s;return t=t%360/60,s=2*e*(n<.5?n:1-n),a=s*(1-O(t%2-1)),i=r=A=n-s/2,t=~~t,i+=[s,a,0,0,a,s][t],r+=[a,s,s,a,0,0][t],A+=[0,0,a,s,s,a][t],Ct(i,r,A,o)},e.rgb2hsb=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,A;return r=R(t,e,n),A=r-F(t,e,n),o=0==A?null:r==t?(e-n)/A:r==e?(n-t)/A+2:(t-e)/A+4,o=(o+360)%6*60/360,i=0==A?0:A/r,{h:o,s:i,b:r,toString:Tt}},e.rgb2hsl=function(t,e,n){n=wt(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,A,a,s;return A=R(t,e,n),a=F(t,e,n),s=A-a,o=0==s?null:A==t?(e-n)/s:A==e?(n-t)/s+2:(t-e)/s+4,o=(o+360)%6*60/360,r=(A+a)/2,i=0==s?0:r<.5?s/(2*r):s/(2-2*r),{h:o,s:i,l:r,toString:Et}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=D.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,D.doc.body.removeChild(this)},n.onerror=function(){D.doc.body.removeChild(this)},D.doc.body.appendChild(n),n.src=t};e.getRGB=i(function(t){if(!t||(t=v(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(it[y](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=ft(t));var n,o,i,A,a,s,l=t.match(J);return l?(l[2]&&(i=$(l[2].substring(5),16),o=$(l[2].substring(3,5),16),n=$(l[2].substring(1,3),16)),l[3]&&(i=$((a=l[3].charAt(3))+a,16),o=$((a=l[3].charAt(2))+a,16),n=$((a=l[3].charAt(1))+a,16)),l[4]&&(s=l[4][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),"rgba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100)),l[5]?(s=l[5][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsba"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsb2rgb(n,o,i,A)):l[6]?(s=l[6][U](ot),n=q(s[0]),"%"==s[0].slice(-1)&&(n*=2.55),o=q(s[1]),"%"==s[1].slice(-1)&&(o*=2.55),i=q(s[2]),"%"==s[2].slice(-1)&&(i*=2.55),("deg"==s[0].slice(-3)||"°"==s[0].slice(-1))&&(n/=360),"hsla"==l[1].toLowerCase().slice(0,4)&&(A=q(s[3])),s[3]&&"%"==s[3].slice(-1)&&(A/=100),e.hsl2rgb(n,o,i,A)):(l={r:n,g:o,b:i,toString:r},l.hex="#"+(16777216|i|o<<8|n<<16).toString(16).slice(1),e.is(A,"finite")&&(l.opacity=A),l)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=i(function(t,n,o){return e.hsb2rgb(t,n,o).hex}),e.hsl=i(function(t,n,o){return e.hsl2rgb(t,n,o).hex}),e.rgb=i(function(t,e,n){function o(t){return t+.5|0}return"#"+(16777216|o(n)|o(e)<<8|o(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=yt(t);if(n.arr)return xt(n.arr);var o={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,X)&&e.is(t[0],X)&&(i=xt(t)),i.length||v(t).replace(At,function(t,e,n){var r=[],A=e.toLowerCase();if(n.replace(st,function(t,e){e&&r.push(+e)}),"m"==A&&r.length>2&&(i.push([e][L](r.splice(0,2))),A="l",e="m"==e?"l":"L"),"r"==A)i.push([e][L](r));else for(;r.length>=o[A]&&(i.push([e][L](r.splice(0,o[A]))),o[A]););}),i.toString=e._path2string,n.arr=xt(i),i},e.parseTransformString=i(function(t){if(!t)return null;var n=[];return e.is(t,X)&&e.is(t[0],X)&&(n=xt(t)),n.length||v(t).replace(at,function(t,e,o){var i=[];z.call(e);o.replace(st,function(t,e){e&&i.push(+e)}),n.push([e][L](i))}),n.toString=e._path2string,n});var yt=function(t){var e=yt.ps=yt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[y](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,o,i,r,A,a,s){var l=1-s,c=V(l,3),u=V(l,2),g=s*s,d=g*s,M=c*t+3*u*s*n+3*l*s*s*i+d*A,p=c*e+3*u*s*o+3*l*s*s*r+d*a,h=t+2*s*(n-t)+g*(i-2*n+t),I=e+2*s*(o-e)+g*(r-2*o+e),f=n+2*s*(i-n)+g*(A-2*i+n),T=o+2*s*(r-o)+g*(a-2*r+o),E=l*t+s*n,N=l*e+s*o,w=l*i+s*A,C=l*r+s*a,y=90-180*Y.atan2(h-f,I-T)/H;return(h>f||I=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var o=e.isPointInsideBBox;return o(n,t.x,t.y)||o(n,t.x2,t.y)||o(n,t.x,t.y2)||o(n,t.x2,t.y2)||o(t,n.x,n.y)||o(t,n.x2,n.y)||o(t,n.x,n.y2)||o(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return g(t,e)},e.pathIntersectionNumber=function(t,e){return g(t,e,1)},e.isPointInsidePath=function(t,n,o){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,o)&&g(t,[["M",n,o],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Dt=e.pathBBox=function(t){var e=yt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=Ut(t);for(var o,i=0,r=0,A=[],a=[],s=0,l=t.length;s1&&(f=Y.sqrt(f),n*=f,o*=f);var T=n*n,E=o*o,N=(A==a?-1:1)*Y.sqrt(O((T*E-T*I*I-E*h*h)/(T*I*I+E*h*h))),w=N*n*I/o+(t+s)/2,C=N*-o*h/n+(e+l)/2,y=Y.asin(((e-C)/o).toFixed(9)),D=Y.asin(((l-C)/o).toFixed(9));y=tD&&(y-=2*H),!a&&D>y&&(D-=2*H)}var x=D-y;if(O(x)>g){var b=D,B=s,m=l;D=y+g*(a&&D>y?1:-1),s=w+n*Y.cos(D),l=C+o*Y.sin(D),M=Qt(s,l,n,o,r,0,a,B,m,[D,b,w,C])}x=D-y;var Q=Y.cos(y),j=Y.sin(y),v=Y.cos(D),S=Y.sin(D),k=Y.tan(x/4),z=4/3*n*k,R=4/3*o*k,F=[t,e],V=[t+z*j,e-R*Q],G=[s+z*S,l-R*v],P=[s,l];if(V[0]=2*F[0]-V[0],V[1]=2*F[1]-V[1],c)return[V,G,P][L](M);M=[V,G,P][L](M).join()[U](",");for(var X=[],W=0,J=M.length;W"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=jt(t,e,n,o,i,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=jt(t,e,n,o,i,r,A,a,d),p.push(s.x),M.push(s.y)),l=r-2*o+e-(a-2*r+o),c=2*(o-e)-2*(r-o),u=e-o,g=(-c+Y.sqrt(c*c-4*l*u))/2/l,d=(-c-Y.sqrt(c*c-4*l*u))/2/l,O(g)>"1e12"&&(g=.5),O(d)>"1e12"&&(d=.5),g>0&&g<1&&(s=jt(t,e,n,o,i,r,A,a,g),p.push(s.x),M.push(s.y)),d>0&&d<1&&(s=jt(t,e,n,o,i,r,A,a,d),p.push(s.x),M.push(s.y)),{min:{x:F[B](0,p),y:F[B](0,M)},max:{x:R[B](0,p),y:R[B](0,M)}}}),Ut=e._path2curve=i(function(t,e){var n=!e&&yt(t);if(!e&&n.curve)return xt(n.curve);for(var o=Bt(t),i=e&&Bt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},A={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a=(function(t,e,n){var o,i,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][L](Qt[B](0,[e.x,e.y][L](t.slice(1))));break;case"S":"C"==n||"S"==n?(o=2*e.x-e.bx,i=2*e.y-e.by):(o=e.x,i=e.y),t=["C",o,i][L](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][L](mt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][L](mt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][L](Lt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][L](Lt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][L](Lt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][L](Lt(e.x,e.y,e.X,e.Y))}return t}),s=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"][L](n.splice(0,6)));t.splice(e,1),p=R(o.length,i&&i.length||0)}},l=function(t,e,n,r,A){t&&e&&"M"==t[A][0]&&"M"!=e[A][0]&&(e.splice(A,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[A][1],n.y=t[A][2],p=R(o.length,i&&i.length||0))},c=[],u=[],g="",d="",M=0,p=R(o.length,i&&i.length||0);Mi){if(n&&!g.start){if(c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],i-d),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],r)return u;g.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,s[5],s[6]].join(),d+=l,A=+s[5],a=+s[6];continue}if(!t&&!n)return c=$t(A,a,s[1],s[2],s[3],s[4],s[5],s[6],i-d),{x:c.x,y:c.y,alpha:c.alpha}}d+=l,A=+s[5],a=+s[6]}u+=s.shift()+s}return g.end=u,c=t?d:n?g:e.findDotsAtSegment(A,a,s[0],s[1],s[2],s[3],s[4],s[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),oe=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return oe(t,e).end;var o=oe(t,n,1);return e?oe(o,e).end:o},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var o=this.getPath();if(o)return e.getSubpath(o,t,n)};var ie=e.easing_formulas={linear:function(t){return t},"<":function(t){return V(t,1.7)},">":function(t){return V(t,.48)},"<>":function(t){var e=.48-t/1.04,n=Y.sqrt(.1734+e*e),o=n-e,i=V(O(o),1/3)*(o<0?-1:1),r=-n-e,A=V(O(r),1/3)*(r<0?-1:1),a=i+A+.5;return 3*(1-a)*a*a+a*a*a},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:V(2,-10*t)*Y.sin((t-.075)*(2*H)/.3)+1},bounce:function(t){var e,n=7.5625,o=2.75;return t<1/o?e=n*t*t:t<2/o?(t-=1.5/o,e=n*t*t+.75):t<2.5/o?(t-=2.25/o,e=n*t*t+.9375):(t-=2.625/o,e=n*t*t+.984375),e}};ie.easeIn=ie["ease-in"]=ie["<"],ie.easeOut=ie["ease-out"]=ie[">"],ie.easeInOut=ie["ease-in-out"]=ie["<>"],ie["back-in"]=ie.backIn,ie["back-out"]=ie.backOut;var re=[],Ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},ae=function(){for(var n=+new Date,o=0;o1&&!i.next){for(A in g)g[y](A)&&(p[A]=i.totalOrigin[A]);i.el.attr(p),I(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&I(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}re.length&&Ae(ae)},se=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,o,i,r,A){var a=this;if(a.removed)return A&&A.call(a),a;var s=o instanceof h?o:e.animation(o,i,r,A);I(s,a,s.percents[0],null,a.attr());for(var l=0,c=re.length;ls&&(s=c)}s+="%",!t[s].callback&&(t[s].callback=i)}return new h(t,n)},Zt.animate=function(t,n,o,i){var r=this;if(r.removed)return i&&i.call(r),r;var A=t instanceof h?t:e.animation(t,n,o,i);return I(A,r,A.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,F(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,o,i=[],r=0;if(null!=e)return I(t,this,-1,F(e,1)),this;for(n=re.length;r1)for(var o=0,i=n.length;o.5)-1;s(g-.5,2)+s(d-.5,2)>.25&&(d=r.sqrt(.25-s(g-.5,2))*i+.5)&&.5!=d&&(d=d.toFixed(5)-1e-5*i)}return u}),i=i.split(/\s*\-\s*/),"linear"==l){var E=i.shift();if(E=-o(E),isNaN(E))return null;var N=[0,0,r.cos(t.rad(E)),r.sin(t.rad(E))],w=1/(A(a(N[2]),a(N[3]))||1);N[2]*=w,N[3]*=w,N[2]<0&&(N[0]=-N[2],N[2]=0),N[3]<0&&(N[1]=-N[3],N[3]=0)}var C=t._parseDots(i);if(!C)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){f=h(l+"Gradient",{id:c}),e.gradient=f,h(f,"radial"==l?{fx:g,fy:d}:{x1:N[0],y1:N[1],x2:N[2],y2:N[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(f);for(var y=0,D=C.length;y1?v.opacity/100:v.opacity});case"stroke":v=t.getRGB(p),s.setAttribute(M,v.hex),"stroke"==M&&v[e]("opacity")&&h(s,{"stroke-opacity":v.opacity>1?v.opacity/100:v.opacity}),"stroke"==M&&o._.arrows&&("startString"in o._.arrows&&N(o,o._.arrows.startString),"endString"in o._.arrows&&N(o,o._.arrows.endString,1));break;case"gradient":("circle"==o.type||"ellipse"==o.type||"r"!=n(p).charAt())&&I(o,p);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&h(s,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(c.gradient){U=t._g.doc.getElementById(s.getAttribute("fill").replace(/^url\(#|\)$/g,u)),U&&(S=U.getElementsByTagName("stop"),h(S[S.length-1],{"stop-opacity":p}));break}default:"font-size"==M&&(p=i(p,10)+"px");var k=M.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});s.style[k]=p,o._.dirty=1,s.setAttribute(M,p)}}x(o,r),s.style.visibility=g},D=1.2,x=function(o,r){if("text"==o.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var A=o.attrs,a=o.node,s=a.firstChild?i(t._g.doc.defaultView.getComputedStyle(a.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(A.text=r.text;a.firstChild;)a.removeChild(a.firstChild);for(var l,c=n(r.text).split("\n"),g=[],d=0,M=c.length;d"));var Z=X.getBoundingClientRect();f.W=g.w=(Z.right-Z.left)/W,f.H=g.h=(Z.bottom-Z.top)/W,f.X=g.x,f.Y=g.y+f.H/2,("x"in s||"y"in s)&&(f.path.v=t.format("m{0},{1}l{2},{1}",r(g.x*E),r(g.y*E),r(g.x*E)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=i.sqrt(.25-a(e-.5,2))*(2*(n>.5)-1)+.5),l=e+d+n),M}),r=r.split(/\s*\-\s*/),"linear"==s){var c=r.shift();if(c=-o(c),isNaN(c))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(A),A.on=!0,A.method="none",A.color=u[0].color,A.color2=u[u.length-1].color;for(var g=[],p=0,h=u.length;p')}}catch(t){Q=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,o=e.height,i=e.width,r=e.x,A=e.y;if(!n)throw new Error("VML container not found.");var a=new t._Paper,s=a.canvas=t._g.doc.createElement("div"),l=s.style;return r=r||0,A=A||0,i=i||512,o=o||342,a.width=i,a.height=o,i==+i&&(i+="px"),o==+o&&(o+="px"),a.coordsize=1e3*E+d+1e3*E,a.coordorigin="0 0",a.span=t._g.doc.createElement("span"),a.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",s.appendChild(a.span),l.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,o),1==n?(t._g.doc.body.appendChild(s),l.left=r+"px",l.top=A+"px",l.position="absolute"):n.firstChild?n.insertBefore(s,n.firstChild):n.appendChild(s),a.renderfix=function(){},a},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=M,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var j=t.st;for(var v in m)m[e](v)&&!j[e](v)&&(j[v]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(v))}}.apply(e,o),!(void 0!==i&&(t.exports=i))}])})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(i=(t+1)/2),o.splice(i,1),2===o.length)o=e.connection._buildStraightLinePathInfo();else{var r=o[1],A=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),a=o[0];a[1]=A.x,a[2]=A.y;var s=o[o.length-2],l=e.connection._buildToFigureIntersetion({x:s[1],y:s[2]},!0),c=o[o.length-1];c[1]=l.x,c[2]=l.y}e.path.attr("path",o),e.remove()});var g=function(o,i){e.context.snapto&&(o-=o%10,i-=i%10);var a=this.ox+o,s=this.oy+i;if(!(a<1||s<1)){e.context.resizePaper(a+15,s+15),this.attr("x",a),this.attr("y",s),A=Math.round(t/2);var l=e.path.attr("path"),c=l.length,u=void 0,g=void 0,d=void 0,M=2*(n.length-1)-1;if(0===t||1===t){if(d=l[1],u=e.connection._buildFromFigureIntersetion({x:d[1],y:d[2]},!0),g=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:a,y:s},!0);if(p){var h=n[n.length-1];h[1]=p.x,h[2]=p.y}}}else M!==t&&M!==t+1&&M!==t+2||(d=l[c-2],u=e.connection._buildToFigureIntersetion({x:a,y:s},!0),g=n[n.length-1]);u&&(g[1]=u.x,g[2]=u.y);var I=[];n.forEach(function(t,e){r?e===A?I.push(["L",a,s]):I.push(t):(I.push(t),e===A&&I.push(["L",a,s]))}),e.path.attr("path",I),e.connection._buildText()}},d=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},M=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,o=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(o);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(o);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(g,d,M)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=i},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'}}]),e}(l.default);e.default=c},function(t,e){"use strict";function n(t){var e=A("消息提示",t);e.modal("show")}function o(t,e){var n=A("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function i(t,e,n){var o=A(t,e,[{name:"确认",click:function(){n.call(this)}}]);o.modal("show")}function r(t,e,n,o,i){var r=A(t,e,n,i);if(r.modal("show"),o){var a=!0,s=!1,l=void 0;try{for(var c,u=o[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;r.on(g.name,g.callback)}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}}}function A(t,e,n,o){var i=this,r="modal-dialog"+(o?" modal-lg":""),A=$(''),s=$('
    ');A.append(s); +var l=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new s.default(this.context),this.context.flowDesigner=this;var o="_prop_container",i=$('
    ');this.canvasContainer.append(i);var A=$('');i.append(A),A.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var a=$('
    ');a.append('
    属性值修改后,请回车以确认
    '),a.append(this.propContainer),i.append(a),i.draggable();var l=$("#__prop_panel_tool__");l.click(function(){a.toggle();var t=a.css("display");t&&"none"!==t?(l.removeClass("glyphicon-circle-arrow-left"),l.addClass("glyphicon-circle-arrow-down")):(l.removeClass("glyphicon-circle-arrow-down"),l.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return A(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void f.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void f.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void f.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,o=t.y,i=t.width,r=t.height,A=t.name;n=parseInt(n),o=parseInt(o),i=parseInt(i),r=parseInt(r);var a=n+i+10,s=o+r+10;this.context.resizePaper(a+50,s+50);var l=e._newNodeInstance(n,o,A);l.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;g.eventEmitter.on(g.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,o=!0,i=!1,r=void 0;try{for(var A,a=function(){var e=A.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},s=this.buttons[Symbol.iterator]();!(o=(A=s.next()).done);o=!0)a()}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}var l=$('');this.toolbar.append(l),l.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var d=$('');this.toolbar.append(d),d.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var I=$('');this.toolbar.append(I),I.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),g.eventEmitter.emit(g.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,o=void 0;try{for(var i,r=function(){var e=i.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){g.eventEmitter.emit(g.TRIGGER_TOOL,e.getType())})},A=this.context.toolsMap.values()[Symbol.iterator]();!(e=(i=A.next()).done);e=!0)r()}catch(t){n=!0,o=t}finally{try{!e&&A.return&&A.return()}finally{if(n)throw o}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;g.eventEmitter.on(g.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof M.default){var o=n.name||n.text.attr("text"),i=$('
    '),r=$('');i.append(r),t.propContainer.append(i),r.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,A=!1,a=!0,s=!1,l=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;if(g instanceof M.default&&g!==n&&g.name===o){A=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}return A?void f.alert("节点名已存在!"):(n.name=o,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t.text.attr("text",i)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof h.default){var A=$('
    '),a=$('');A.append(a),t.propContainer.append(A),a.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,A=n.from.fromConnections,a=!1,s=!0,l=!1,c=void 0;try{for(var u,g=A[Symbol.iterator]();!(s=(u=g.next()).done);s=!0){var d=u.value;if(d!==n&&d.name===o){a=!0;break}}}catch(t){l=!0,c=t}finally{try{!s&&g.return&&g.return()}finally{if(l)throw c}}return a?void f.alert("连线名已存在"):(n.name=o,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t._buildText()}}))});var s=$('
    '),l=$('');s.append(l),l.val(n.type),l.change(function(t){var o=$(this).val(),i=n.uuid,r=n.type;n.type=o,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.type=o,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(i);t.type=r,t.updatePath()}})}),t.propContainer.append(s),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),g.eventEmitter.on(g.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),g.eventEmitter.emit(g.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(f.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,o=void 0;try{for(var i,r=this.context.allFigures[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var A=i.value;if(A instanceof M.default){var a=A.validate();a&&t.push(a)}}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}if(t.length>0){var s="";return t.forEach(function(t,e){s+=e+1+"."+t+"
    "}),s='错误:
    '+s+"
    ",f.alert(s),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof M.default&&t.push(e.toJSON())}),t}}]),t}();e.default=T},function(t,e,n){var o=n(254);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var o=n(260);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,o=this;t(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||t(o).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var n='[data-dismiss="alert"]',o=function(e){t(e).on("click",n,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function n(){A.detach().trigger("closed.bs.alert").remove()}var i=t(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var A=t("#"===r?[]:r);e&&e.preventDefault(),A.length||(A=i.closest(".alert")),A.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(A.removeClass("in"),t.support.transition&&A.hasClass("fade")?A.one("bsTransitionEnd",n).emulateTransitionEnd(o.TRANSITION_DURATION):n())};var i=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,o.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.button"),r="object"==typeof e&&e;i||o.data("bs.button",i=new n(this,r)),"toggle"==e?i.toggle():e&&i.setState(e)})}var n=function(e,o){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,o),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();e+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(t.proxy(function(){o[i](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var o=t(n.target).closest(".btn");e.call(o,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.carousel"),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e),A="string"==typeof e?e:r.slide;i||o.data("bs.carousel",i=new n(this,r)),"number"==typeof e?i.to(e):A?i[A]():r.interval&&i.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),o="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(o&&!this.options.wrap)return e;var i="prev"==t?-1:1,r=(n+i)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(e,i),A=this.interval,a="next"==e?"left":"right",s=this;if(r.hasClass("active"))return this.sliding=!1;var l=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:l,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,A&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var g=t.Event("slid.bs.carousel",{relatedTarget:l,direction:a});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,i.addClass(a),r.addClass(a),i.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),i.removeClass(["active",a].join(" ")),s.sliding=!1,setTimeout(function(){s.$element.trigger(g)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(g)),A&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var i=function(n){var o,i=t(this),r=t(i.attr("data-target")||(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var A=t.extend({},r.data(),i.data()),a=i.attr("data-slide-to");a&&(A.interval=!1),e.call(r,A),a&&r.data("bs.carousel").to(a),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,o=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function n(e){return this.each(function(){var n=t(this),i=n.data("bs.collapse"),r=t.extend({},o.DEFAULTS,n.data(),"object"==typeof e&&e);!i&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),i||n.data("bs.collapse",i=new o(this,r)),"string"==typeof e&&i[e]()})}var o=function(e,n){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),e||i.data("bs.collapse",null));var A=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[A](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var a=function(){this.$element.removeClass("collapsing").addClass("collapse in")[A](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return a.call(this);var s=t.camelCase(["scroll",A].join("-"));this.$element.one("bsTransitionEnd",t.proxy(a,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[A](this.$element[0][s])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(o.TRANSITION_DURATION):i.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,o){var i=t(o);this.addAriaAndCollapsedClass(e(i),i)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var i=t(this);i.attr("data-target")||o.preventDefault();var r=e(i),A=r.data("bs.collapse"),a=A?"toggle":i.data();n.call(r,a)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o=n&&t(n);return o&&o.length?o:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(r).each(function(){var o=t(this),i=e(o),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(o.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function o(e){return this.each(function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new A(this)),"string"==typeof e&&o[e].call(n)})}var i=".dropdown-backdrop",r='[data-toggle="dropdown"]',A=function(e){t(e).on("click.bs.dropdown",this.toggle)};A.VERSION="3.3.7",A.prototype.toggle=function(o){var i=t(this);if(!i.is(".disabled, :disabled")){var r=e(i),A=r.hasClass("open");if(n(),!A){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var a={relatedTarget:this};if(r.trigger(o=t.Event("show.bs.dropdown",a)),o.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",a))}return!1}},A.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var i=e(o),A=i.hasClass("open");if(!A&&27!=n.which||A&&27==n.which)return 27==n.which&&i.find(r).trigger("focus"),o.trigger("click");var a=" li:not(.disabled):visible a",s=i.find(".dropdown-menu"+a);if(s.length){var l=s.index(n.target);38==n.which&&l>0&&l--,40==n.which&&ldocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,o){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var A=i[r];if("click"==A)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=A){var a="hover"==A?"mouseenter":"focusin",s="hover"==A?"mouseleave":"focusout";this.$element.on(a+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,o){n[t]!=o&&(e[t]=o)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var i=this,r=this.tip(),A=this.getUID(this.type);this.setContent(),r.attr("id",A),this.$element.attr("aria-describedby",A),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,s=/\s?auto?\s?/i,l=s.test(a);l&&(a=a.replace(s,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=r[0].offsetWidth,g=r[0].offsetHeight;if(l){var d=a,M=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+g>M.bottom?"top":"top"==a&&c.top-gM.width?"left":"left"==a&&c.left-uA.top+A.height&&(i.top=A.top+A.height-s)}else{var l=e.left-r,c=e.left+r+n;lA.right&&(i.left=A.left+A.width-c)}return i},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.popover"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||o.data("bs.popover",i=new n(this,r)),"string"==typeof e&&i[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,o){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var o=t(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new e(this,r)),"string"==typeof n&&i[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),r=/^#./.test(i)&&t(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,A=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=o)return A!=(t=r[r.length-1])&&this.activate(t);if(A&&e=i[t]&&(void 0===i[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var A=o.find("> .active"),a=i&&t.support.transition&&(A.length&&A.hasClass("fade")||!!o.find("> .fade").length);A.length&&a?A.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),A.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var i=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.affix"),r="object"==typeof e&&e;i||o.data("bs.affix",i=new n(this,r)),"string"==typeof e&&i[e]()})}var n=function(e,o){this.options=t.extend({},n.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),A=this.$target.height();if(null!=n&&"top"==this.affixed)return i=t-o&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,A=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var a=this.getState(A,e,i,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var s="affix"+(a?"-"+a:""),l=t.Event(s+".bs.affix");if(this.$element.trigger(l),l.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(s).trigger(s.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:A-e-r})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),o=n.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(n,o)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,o,i=t(this),r=n.handle?t(n.handle,i):i;r.on({mousedown:function(r){var A=r.target,a="",s=!1;if(A&&(a=A.className,a&&(a=a.trim(),a.indexOf("cm-")>-1?s=!0:a.indexOf("CodeMirror-")>-1&&(s=!0))),(!a||"form-control"!==a&&"presentation"!==a&&!s)&&!(a.indexOf("ureport")>-1||a.indexOf("ds_name")>-1||a.indexOf("dataset_name")>-1||"A"===A.tagName||"INPUT"===A.tagName||A&&"presentation"===t(A).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,i)))){var l=i.offset();e=r.pageX-l.left,o=r.pageY-l.top,t(document).on("mousemove.drag",function(t){i.offset({top:t.pageY-o,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&A.push(u)}else{var h=u.rect,I=h.getBBox();(I.x>=n.x&&I.x<=n.x2||I.x2>=n.x&&I.x2<=n.x2)&&(I.y>=n.y&&I.y<=n.y2||I.y2>=n.y&&I.y2<=n.y2)&&s.push(u)}}s.length>0?s.forEach(function(t,e){i.addSelection(t)}):A.forEach(function(t,e){i.addSelection(t)}),i.endSelect()}}var o=null,i=this.context,r=i.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=i.currentTool;if(!(!e||e instanceof u.default||e instanceof l.default)){var n=t.offsetX,o=t.offsetY,r=e._newNodeInstance(n,o);r&&!function(){var t=r.uuid,A=r.name,a=r.toJSON();i.addRedoUndo({redo:function(){r=e._newNodeInstance(n,o,A),r.initFromJson(a)},undo:function(){i.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(i.currentTool&&i.currentTool instanceof u.default){var e=i.currentConnection;if(e){var n=t.offsetX,o=t.offsetY;e.endX=n,e.endY=o,e.updatePath()}}})}}]),t}();e.default=M},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>o&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof T.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof T.default&&e.select()}),t&&N.eventEmitter.emit(N.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof T.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),N.eventEmitter.emit(N.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return d.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a instanceof C.default&&(a.rect.id===t||a.icon.id===t||a.text.id===t)){e=a;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,A=this.allFigures[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;if(a.uuid===t){e=a;break}}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;N.eventEmitter.on(N.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),N.eventEmitter.on(N.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var o=e.toJSON(),i=e.uuid,r=t;e instanceof T.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(i),e=t.from.uuid,n=t.to.uuid,A=r.context.getNodeByUUID(e),a=r.context.getNodeByUUID(n),s=new T.default(A,{x:A.rect.attr("x"),y:A.rect.attr("y")});A.fromConnections.push(s),a.toConnections.push(s),s.to=a,s.fromJSON(o)},undo:function(){r.removeFigureByUUID(i)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(i)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(o),t._buildConnections())}})}(),t.removeFigureByUUID(i)}))}),N.eventEmitter.on(N.ALIGN_CENTER,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof T.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),o=u.rect.attr("width"),e+=o/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.ALIGN_MIDDLE,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,A=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(A=(l=c.next()).done);A=!0){var u=l.value;if(u instanceof T.default)break;var g={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),o=u.rect.attr("height"),n+=o/2):u.moveTo(e,n),g.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,g),r++}}catch(t){a=!0,s=t}finally{try{!A&&c.return&&c.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.newXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var A=o.value,a=d.getNodeByUUID(A),s=i.get(A),l=s.oldXY;a.move(l.x,l.y,a.rect.attr("width"),a.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),N.eventEmitter.on(N.UNIFY_SIZE,function(){var e=void 0,n=void 0,o=new Map,i=0,r=!0,A=!1,a=void 0;try{for(var s,l=t.selectionFigures[Symbol.iterator]();!(r=(s=l.next()).done);r=!0){var c=s.value;if(c instanceof T.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===i?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},o.set(c.uuid,u),i++}}catch(t){A=!0,a=t}finally{try{!r&&l.return&&l.return()}finally{if(A)throw a}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=g.getNodeByUUID(A),s=o.get(A),l=s.newWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value,a=g.getNodeByUUID(A),s=o.get(A),l=s.oldWH;a.changeSize(l.w,l.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new I.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=y},function(t,e,n){var o;!function(){"use strict";function i(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],o=-1,r=0,A=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(A=!0,t[e](),A=!1,this):this},{add:function(e){return A?this:(n.splice(o+1,n.length-o),n.push(e),r&&n.length>r&&i(n,0,-(r+1)),o=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var i=n[o];return i?(e(i,"undo"),o-=1,t&&t(),this):this},redo:function(){var i=n[o+1];return i?(e(i,"redo"),o+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],o=-1,t&&e>0&&t()},hasUndo:function(){return o!==-1},hasRedo:function(){return o>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function a(){try{var t=n(284).randomBytes;M=g=t&&function(){return t(16)},g()}catch(t){}}function s(t,e,n){var o=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[o+i++]=f[t])});i<16;)e[o+i++]=0;return e}function l(t,e){var n=e||0,o=I;return o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]}function c(t,e,n){var o=e&&n||0,i=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:w,A=null!=t.msecs?t.msecs:(new Date).getTime(),a=null!=t.nsecs?t.nsecs:y+1,s=A-C+(a-y)/1e4;if(s<0&&null==t.clockseq&&(r=r+1&16383),(s<0||A>C)&&null==t.nsecs&&(a=0),a>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");C=A,y=a,w=r,A+=122192928e5;var c=(1e4*(268435455&A)+a)%4294967296;i[o++]=c>>>24&255,i[o++]=c>>>16&255,i[o++]=c>>>8&255,i[o++]=255&c;var u=A/4294967296*1e4&268435455;i[o++]=u>>>8&255,i[o++]=255&u,i[o++]=u>>>24&15|16,i[o++]=u>>>16&255,i[o++]=r>>>8|128,i[o++]=255&r;for(var g=t.node||N,d=0;d<6;d++)i[o+d]=g[d];return e?e:l(i)}function u(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new h(16):null,t=null),t=t||{};var i=t.random||(t.rng||g)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var r=0;r<16;r++)e[o+r]=i[r];return e||l(i)}var g,d,M,p;r?A():a();for(var h="function"==typeof i?i:Array,I=[],f={},T=0;T<256;T++)I[T]=(T+256).toString(16).substr(1),f[I[T]]=T;var E=g(),N=[1|E[0],E[1],E[2],E[3],E[4],E[5]],w=16383&(E[6]<<8|E[7]),C=0,y=0,D=u;D.v1=c,D.v4=u,D.parse=s,D.unparse=l,D.BufferClass=h,D._rng=g,D._mathRNG=d,D._nodeRNG=M,D._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=D:(o=function(){return D}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,o){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function A(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function h(e){return+e!=e&&(e=0),t.alloc(+e)}function I(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return J(e).length;default:if(i)return P(e).length;n=(""+n).toLowerCase(),i=!0}}function f(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return v(this,e,n);case"utf8":case"utf-8":return L(this,e,n);case"ascii":return Q(this,e,n);case"latin1":case"binary":return j(this,e,n);case"base64":return B(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function T(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function E(e,n,o,i,r){if(0===e.length)return-1;if("string"==typeof o?(i=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=r?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(o<0){if(!r)return-1;o=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:N(e,n,o,i,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,o):Uint8Array.prototype.lastIndexOf.call(e,n,o):N(e,[n],o,i,r); +throw new TypeError("val must be string, number or Buffer")}function N(t,e,n,o,i){function r(t,e){return 1===A?t[e]:t.readUInt16BE(e*A)}var A=1,a=t.length,s=e.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;A=2,a/=2,s/=2,n/=2}var l;if(i){var c=-1;for(l=n;la&&(n=a-s),l=n;l>=0;l--){for(var u=!0,g=0;gi&&(o=i)):o=i;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var A=0;A239?4:r>223?3:r>191?2:1;if(i+a<=n){var s,l,c,u;switch(a){case 1:r<128&&(A=r);break;case 2:s=t[i+1],128===(192&s)&&(u=(31&r)<<6|63&s,u>127&&(A=u));break;case 3:s=t[i+1],l=t[i+2],128===(192&s)&&128===(192&l)&&(u=(15&r)<<12|(63&s)<<6|63&l,u>2047&&(u<55296||u>57343)&&(A=u));break;case 4:s=t[i+1],l=t[i+2],c=t[i+3],128===(192&s)&&128===(192&l)&&128===(192&c)&&(u=(15&r)<<18|(63&s)<<12|(63&l)<<6|63&c,u>65535&&u<1114112&&(A=u))}}null===A?(A=65533,a=1):A>65535&&(A-=65536,o.push(A>>>10&1023|55296),A=56320|1023&A),o.push(A),i+=a}return m(o)}function m(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",o=0;oo)&&(n=o);for(var i="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,o,i,r,A){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function z(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i>>8*(o?i:1-i)}function Y(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i>>8*(o?i:3-i)&255}function R(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function F(t,e,n,o,i){return i||R(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,o,23,4),n+4}function O(t,e,n,o,i){return i||R(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,o,52,8),n+8}function V(t){if(t=H(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function H(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function G(t){return t<16?"0"+t.toString(16):t.toString(16)}function P(t,e){e=e||1/0;for(var n,o=t.length,i=null,r=[],A=0;A55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(A+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function X(t){for(var e=[],n=0;n>8,i=n%256,r.push(i),r.push(o);return r}function J(t){return _.toByteArray(V(t))}function Z(t,e,n,o){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=h,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==o.TYPED_ARRAY_SUPPORT?o.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return a(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return l(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var o=e.length,i=n.length,r=0,A=Math.min(o,i);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,o,i,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===o&&(o=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),n<0||o>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&n>=o)return 0;if(i>=r)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var A=r-i,a=o-n,s=Math.min(A,a),l=this.slice(i,r),c=e.slice(n,o),u=0;ui)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return w(this,t,e,n);case"utf8":case"utf-8":return C(this,t,e,n);case"ascii":return y(this,t,e,n);case"latin1":case"binary":return D(this,t,e,n);case"base64":return x(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var o=this.length;e=~~e,n=void 0===n?o:~~n,e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n0&&(i*=256);)o+=this[t+--e]*i;return o},t.prototype.readUInt8=function(t,e){return e||S(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||S(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||S(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||S(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||S(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var o=this[t],i=1,r=0;++r=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||S(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||S(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||S(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||S(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||S(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||S(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||S(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||S(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e|=0,n|=0,!o){var i=Math.pow(2,8*n)-1;k(this,t,e,n,i,0)}var r=1,A=0;for(this[e]=255&t;++A=0&&(A*=256);)this[e+r]=t/A&255;return e+n},t.prototype.writeUInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):Y(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=0,A=1,a=0;for(this[e]=255&t;++r>0)-a&255;return e+n},t.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=n-1,A=1,a=0;for(this[e+r]=255&t;--r>=0&&(A*=256);)t<0&&0===a&&0!==this[e+r+1]&&(a=1),this[e+r]=(t/A>>0)-a&255;return e+n},t.prototype.writeInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):z(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):z(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):Y(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):Y(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return F(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return F(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return O(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return O(this,t,e,!1,n)},t.prototype.copy=function(e,n,o,i){if(o||(o=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--r)e[r+n]=this[r+o];else if(A<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,o=void 0===o?this.length:o>>>0,e||(e=0);var A;if("number"==typeof e)for(A=n;A0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,o,i,r,A,a,s=t.length;A=n(t),a=new c(3*s/4-A),i=A>0?s-4:s;var u=0;for(e=0,o=0;e>16&255,a[u++]=r>>8&255,a[u++]=255&r;return 2===A?(r=l[t.charCodeAt(e)]<<2|l[t.charCodeAt(e+1)]>>4,a[u++]=255&r):1===A&&(r=l[t.charCodeAt(e)]<<10|l[t.charCodeAt(e+1)]<<4|l[t.charCodeAt(e+2)]>>2,a[u++]=r>>8&255,a[u++]=255&r),a}function r(t){return s[t>>18&63]+s[t>>12&63]+s[t>>6&63]+s[63&t]}function A(t,e,n){for(var o,i=[],A=e;Ac?c:l+a));return 1===o?(e=t[n-1],i+=s[e>>2],i+=s[e<<4&63],i+="=="):2===o&&(e=(t[n-2]<<8)+t[n-1],i+=s[e>>10],i+=s[e>>4&63],i+=s[e<<2&63],i+="="),r.push(i),r.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=a;for(var s=[],l=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g=0,d=u.length;g>1,c=-7,u=n?i-1:0,g=n?-1:1,d=t[e+u];for(u+=g,r=d&(1<<-c)-1,d>>=-c,c+=a;c>0;r=256*r+t[e+u],u+=g,c-=8);for(A=r&(1<<-c)-1,r>>=-c,c+=o;c>0;A=256*A+t[e+u],u+=g,c-=8);if(0===r)r=1-l;else{if(r===s)return A?NaN:(d?-1:1)*(1/0);A+=Math.pow(2,o),r-=l}return(d?-1:1)*A*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var A,a,s,l=8*r-i-1,c=(1<>1,g=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=o?0:r-1,M=o?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(a=isNaN(e)?1:0,A=c):(A=Math.floor(Math.log(e)/Math.LN2),e*(s=Math.pow(2,-A))<1&&(A--,s*=2),e+=A+u>=1?g/s:g*Math.pow(2,1-u),e*s>=2&&(A++,s/=2),A+u>=c?(a=0,A=c):A+u>=1?(a=(e*s-1)*Math.pow(2,i),A+=u):(a=e*Math.pow(2,u-1)*Math.pow(2,i),A=0));i>=8;t[n+d]=255&a,d+=M,a/=256,i-=8);for(A=A<0;t[n+d]=255&A,d+=M,A/=256,l-=8);t[n+d-M]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function o(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var A=n(300)(e);e.pbkdf2=A.pbkdf2,e.pbkdf2Sync=A.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){o("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,o){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new o(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function o(t){return function(){var n=[],o={update:function(t,o){return e.isBuffer(t)||(t=new e(t,o)),n.push(t),this},digest:function(o){var i=e.concat(n),r=t(i);return n=null,o?r.toString(o):r}};return o}}var i=n(288),r=o(n(296)),A=o(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new A:i(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},o=n(280).Buffer,i=n(289)(o);e.sha1=n(290)(o,i),e.sha256=n(294)(o,i),e.sha512=n(295)(o,i)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var o=this._len+=e.length,i=this._s=this._s||0,r=0,A=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){return M.length?M.pop().init():this instanceof n?(this._w=d,e.call(this,64,56),this._h=null,void this.init()):new n}function i(t,e,n,o){return t<20?e&n|~e&o:t<40?e^n^o:t<60?e&n|e&o|n&o:e^n^o}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function A(t,e){return t+e|0}function a(t,e){return t<>>32-e}var s=0,l=4,c=8,u=12,g=16,d=new("undefined"==typeof Int32Array?Array:Int32Array)(80),M=[];return o(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=M,n.prototype._update=function(t){var e,n,o,s,l,c,u,g,d,M;e=c=this._a,n=u=this._b,o=g=this._c,s=d=this._d,l=M=this._e;for(var p=this._w,h=0;h<80;h++){var I=p[h]=h<16?t.readInt32BE(4*h):a(p[h-3]^p[h-8]^p[h-14]^p[h-16],1),f=A(A(a(e,5),i(h,n,o,s)),A(A(l,I),r(h)));l=s,s=o,o=a(n,30),n=e,e=f}this._a=A(e,c),this._b=A(n,u),this._c=A(o,g),this._d=A(s,d),this._e=A(l,M)},n.prototype._hash=function(){M.length<100&&M.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,s),e.writeInt32BE(0|this._b,l),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,g),e},n}},function(t,e,n){(function(t,o){function i(t,n){var o={seen:[],stylize:A};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),p(n)?o.showHidden=n:n&&e._extend(o,n),N(o.showHidden)&&(o.showHidden=!1),N(o.depth)&&(o.depth=2),N(o.colors)&&(o.colors=!1),N(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=r),s(o,t,o.depth)}function r(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function A(t,e){return t}function a(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function s(t,n,o){if(t.customInspect&&n&&x(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(o,t);return T(i)||(i=s(t,i,o)),i}var r=l(t,n);if(r)return r;var A=Object.keys(n),p=a(A);if(t.showHidden&&(A=Object.getOwnPropertyNames(n)),D(n)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(n);if(0===A.length){if(x(n)){var h=n.name?": "+n.name:"";return t.stylize("[Function"+h+"]","special")}if(w(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(y(n))return t.stylize(Date.prototype.toString.call(n),"date");if(D(n))return c(n)}var I="",f=!1,E=["{","}"];if(M(n)&&(f=!0,E=["[","]"]),x(n)){var N=n.name?": "+n.name:"";I=" [Function"+N+"]"}if(w(n)&&(I=" "+RegExp.prototype.toString.call(n)),y(n)&&(I=" "+Date.prototype.toUTCString.call(n)),D(n)&&(I=" "+c(n)),0===A.length&&(!f||0==n.length))return E[0]+I+E[1];if(o<0)return w(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var C;return C=f?u(t,n,o,p,A):A.map(function(e){return g(t,n,o,p,e,f)}),t.seen.pop(),d(C,I,E)}function l(t,e){if(N(e))return t.stylize("undefined","undefined");if(T(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return f(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):h(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,o,i){for(var r=[],A=0,a=e.length;A-1&&(a=r?a.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+a.split("\n").map(function(t){return" "+t}).join("\n"))):a=t.stylize("[Circular]","special")),N(A)){if(r&&i.match(/^\d+$/))return a;A=JSON.stringify(""+i),A.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(A=A.substr(1,A.length-2),A=t.stylize(A,"name")):(A=A.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),A=t.stylize(A,"string"))}return A+": "+a}function d(t,e,n){var o=0,i=t.reduce(function(t,e){return o++,e.indexOf("\n")>=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function M(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function h(t){return null===t}function I(t){return null==t}function f(t){return"number"==typeof t}function T(t){return"string"==typeof t}function E(t){return"symbol"==typeof t}function N(t){return void 0===t}function w(t){return C(t)&&"[object RegExp]"===B(t)}function C(t){return"object"==typeof t&&null!==t}function y(t){return C(t)&&"[object Date]"===B(t)}function D(t){return C(t)&&("[object Error]"===B(t)||t instanceof Error)}function x(t){return"function"==typeof t}function b(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function B(t){return Object.prototype.toString.call(t)}function L(t){return t<10?"0"+t.toString(10):t.toString(10)}function m(){var t=new Date,e=[L(t.getHours()),L(t.getMinutes()),L(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function Q(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var j=/%[sdj%]/g;e.format=function(t){if(!T(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return t}}),a=o[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function A(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}function s(t){return i(t,2)^i(t,13)^i(t,22)}function l(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^r(t,3)}function u(t){return i(t,17)^i(t,19)^r(t,10)}var g=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],d=new Array(64);return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,i,r,d,M,p,h,I,f=this._w;e=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,r=0|this._e,d=0|this._f,M=0|this._g,p=0|this._h;for(var T=0;T<64;T++){var E=f[T]=T<16?t.readInt32BE(4*T):u(f[T-2])+f[T-7]+c(f[T-15])+f[T-16];h=p+l(r)+A(r,d,M)+g[T]+E,I=s(e)+a(e,n,o),p=M,M=d,d=r,r=i+h,i=o,o=n,n=e,e=h+I}this._a=e+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=r+this._e|0,this._f=d+this._f|0,this._g=M+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=s,e.call(this,128,112)}function i(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function A(t,e,n){return t&e^t&n^e&n}var a=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],s=new Array(160); +return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,s,l,c,u,g,d,M,p,h,I,f,T,E,N=this._w;e=0|this._a,n=0|this._b,o=0|this._c,s=0|this._d,l=0|this._e,c=0|this._f,u=0|this._g,g=0|this._h,d=0|this._al,M=0|this._bl,p=0|this._cl,h=0|this._dl,I=0|this._el,f=0|this._fl,T=0|this._gl,E=0|this._hl;for(var w=0;w<80;w++){var C,y,D=2*w;if(w<16)C=N[D]=t.readInt32BE(4*D),y=N[D+1]=t.readInt32BE(4*D+4);else{var x=N[D-30],b=N[D-30+1],B=i(x,b,1)^i(x,b,8)^x>>>7,L=i(b,x,1)^i(b,x,8)^i(b,x,7);x=N[D-4],b=N[D-4+1];var m=i(x,b,19)^i(b,x,29)^x>>>6,Q=i(b,x,19)^i(x,b,29)^i(b,x,6),j=N[D-14],v=N[D-14+1],U=N[D-32],S=N[D-32+1];y=L+v,C=B+j+(y>>>0>>0?1:0),y+=Q,C=C+m+(y>>>0>>0?1:0),y+=S,C=C+U+(y>>>0>>0?1:0),N[D]=C,N[D+1]=y}var k=A(e,n,o),z=A(d,M,p),Y=i(e,d,28)^i(d,e,2)^i(d,e,7),R=i(d,e,28)^i(e,d,2)^i(e,d,7),F=i(l,I,14)^i(l,I,18)^i(I,l,9),O=i(I,l,14)^i(I,l,18)^i(l,I,9),V=a[D],H=a[D+1],G=r(l,c,u),P=r(I,f,T),X=E+O,W=g+F+(X>>>0>>0?1:0);X+=P,W=W+G+(X>>>0

    >>0?1:0),X+=H,W=W+V+(X>>>0>>0?1:0),X+=y,W=W+C+(X>>>0>>0?1:0);var J=R+z,Z=Y+k+(J>>>0>>0?1:0);g=u,E=T,u=c,T=f,c=l,f=I,I=h+X|0,l=s+W+(I>>>0>>0?1:0)|0,s=o,h=p,o=n,p=M,n=e,M=d,d=X+J|0,e=W+Z+(d>>>0>>0?1:0)|0}this._al=this._al+d|0,this._bl=this._bl+M|0,this._cl=this._cl+p|0,this._dl=this._dl+h|0,this._el=this._el+I|0,this._fl=this._fl+f|0,this._gl=this._gl+T|0,this._hl=this._hl+E|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+o+(this._cl>>>0

    >>0?1:0)|0,this._d=this._d+s+(this._dl>>>0>>0?1:0)|0,this._e=this._e+l+(this._el>>>0>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+g+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,o){n.writeInt32BE(t,o),n.writeInt32BE(e,o+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function o(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,o=-271733879,i=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return o<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,o,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var o=t.length+(r-t.length%r);t=e.concat([t,A],o)}for(var i=[],a=n?t.readInt32BE:t.readInt32LE,s=0;s>>32-e}function s(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=p(t),i=8*t.length,r=8*t.length;o[i>>>5]|=128<<24-i%32,o[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var A=0;A>>24)|4278255360&(a<<24|a>>>8)}var s=h(n);return new e(s)}t.exports=s;var l=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],g=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],d=[0,1518500249,1859775393,2400959708,2840853838],M=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,o=0;n>>5]|=t[n]<<24-o%32;return e},h=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},I=function(t,e,s){for(var p=0;p<16;p++){var h=s+p,I=e[h];e[h]=16711935&(I<<8|I>>>24)|4278255360&(I<<24|I>>>8)}var f,T,E,N,w,C,y,D,x,b;C=f=t[0],y=T=t[1],D=E=t[2],x=N=t[3],b=w=t[4];for(var B,p=0;p<80;p+=1)B=f+e[s+l[p]]|0,B+=p<16?n(T,E,N)+d[0]:p<32?o(T,E,N)+d[1]:p<48?i(T,E,N)+d[2]:p<64?r(T,E,N)+d[3]:A(T,E,N)+d[4],B|=0,B=a(B,u[p]),B=B+w|0,f=w,w=N,N=a(E,10),E=T,T=B,B=C+e[s+c[p]]|0,B+=p<16?A(y,D,x)+M[0]:p<32?r(y,D,x)+M[1]:p<48?i(y,D,x)+M[2]:p<64?o(y,D,x)+M[3]:n(y,D,x)+M[4],B|=0,B=a(B,g[p]),B=B+b|0,C=b,b=x,x=a(D,10),D=y,y=B;B=t[1]+E+x|0,t[1]=t[2]+N+b|0,t[2]=t[3]+w+C|0,t[3]=t[4]+f+y|0,t[4]=t[0]+T+D|0,t[0]=B}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function o(t,n){if(!(this instanceof o))return new o(t,n);this._opad=s,this._alg=t;var A="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>A?n=i(t).update(n).digest():n.length(Math.pow(2,32)-1)*a))throw new TypeError("keylen exceeds maximum length");M.copy(l,0,0,a);for(var p=1;pe&&(e=i)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,o){e.push(l.default.createElement("button",{type:"button",key:o,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},l.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,o="modal-dialog"+(n?" modal-lg":"");return l.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},l.default.createElement("div",{className:o},l.default.createElement("div",{className:"modal-content"},l.default.createElement("div",{className:"modal-header"},l.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),l.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,l.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),l.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),l.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(s.Component);e.default=g},,,,,,,,,,,,,function(t,e,n){var o=n(320);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box;text-align:left}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;*border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{filter:progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-o-linear-gradient(top,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:\"\\2191\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu>.dropdown-menu.drop-left{left:-80%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:\" \"}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context-up:before,.dropdown-context:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.dropdown-context-up:after,.dropdown-context:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.dropdown-context-up:after,.dropdown-context-up:before{top:auto;bottom:-7px;z-index:9999}.dropdown-context-up:before{border-right:7px solid transparent;border-top:7px solid #ccc;border-bottom:none;border-left:7px solid transparent}.dropdown-context-up:after{border-right:6px solid transparent;border-top:6px solid #fff;border-left:6px solid transparent;border-bottom:none}.dropdown-context-sub:after,.dropdown-context-sub:before,.dropdown-context .dropdown-submenu:hover .dropdown-menu,.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:none}.compressed-context a{padding-left:14px;padding-top:0;padding-bottom:0;font-size:13px}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}",""])},function(t,e,n){var o=n(322);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".rule-delete{color:#f44336;vertical-align:text-top;cursor:pointer}.rule-text-editor{width:260px;display:inline-block;height:26px;padding:3px}.rule-property{padding-right:10px;padding-left:10px;line-height:28px;display:inline-block;border:1px solid gray;margin-left:5px}.rule-add-property{cursor:pointer;padding-left:10px;line-height:30px;color:blue}.rule-property-del{padding:5px;cursor:pointer;color:#ff0600}.rule-add-action{color:blue;cursor:pointer;padding-left:5px;padding-bottom:5px}.rule-action{padding:1px;line-height:27px}.rule-delete-action{font-size:10pt;cursor:pointer;color:#ff9800}.rule-join-node{color:#795548;font-size:10pt;vertical-align:text-top;margin-left:2px}.rule-join-container{border:1px solid #999;padding:1px;background:#fff}",""])},function(t,e){"use strict";!function(t){window.URule||(window.URule={}),URule.setDomContent=function(t,e){navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent",e):t.prop("innerText",e)},URule.getDomContent=function(t){return navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent"):t.prop("innerText")}}($)},,,function(t,e){"use strict";!function(){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");Math.uuid=function(e,n){var o,i=t,r=[];if(n=n||i.length,e)for(o=0;o>=4,o[r]=n[19==r?3&e|8:e]);return o.join("")},Math.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(t){var e=16*Math.random()|0,n="x"==t?e:3&e|8;return n.toString(16)})}}()},function(t,e){"use strict";window.Remark=function(t){this.remark="",this.defaultRemark="请输入备注内容",this.init(t)},Remark.prototype.init=function(t){var e=$("

    备注
    ");t.append(e);var n=$("");e.append(n);var o=$("
    ");t.append(o),this.remarkLabel=$("
    "+this.defaultRemark+"
    "),o.append(this.remarkLabel),this.remarkEditor=$(""),o.append(this.remarkEditor),this.remarkEditor.hide();var i=this;this.remarkLabel.click(function(){i.remarkEditor.show(),i.remarkEditor.focus(),i.remarkLabel.hide()}),this.remarkEditor.change(function(){i.remark=$(this).val(),""===i.remark?i.remarkLabel.text(i.defaultRemark):i.remarkLabel.html(i.parseBreak(i.remark)),window.setDirty&&window.setDirty(),window._setDirty&&window._setDirty()}),this.remarkEditor.blur(function(){i.remarkEditor.hide(),i.remarkLabel.show()}),e.click(function(){o.collapse("toggle")}),o.on("show.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-right"),n.addClass("glyphicon-circle-arrow-down")}),o.on("hide.bs.collapse",function(){n.removeClass("glyphicon-circle-arrow-down"),n.addClass("glyphicon-circle-arrow-right")}),o.collapse("hide")},Remark.prototype.setData=function(t){t&&""!==t&&(this.remark=t,this.remarkEditor.val(t),this.remarkLabel.html(this.parseBreak(t)))},Remark.prototype.toXml=function(){return""},Remark.prototype.parseBreak=function(t){return t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("\n","gm"),"
    ")}},function(t,e,n){"use strict";var o=n(241);window._ConstantValueArray=[],window._ActionTypeArray=[],window._VariableValueArray=[],window._ParameterValueArray=[],window._FunctionValueArray=[],window.actionLibraries=[],window.variableLibraries=[],window.constantLibraries=[],window.parameterLibraries=[],window.urule={},window.generateContainer=function(){var t=$(".");return t.css({height:"20px",cursor:"pointer",margin:"0px",color:"white",border:"dashed transparent 1px"}),t.mouseover(function(){t.css({border:"dashed gray 1px"})}),t.mouseout(function(){t.css({border:"dashed transparent 1px"})}),t},window.refreshParameterLibraries=function(){for(var t="",e=0;e"),e=o[0],this._dom=e,n=this.menuItems;var i=this;if(n.length>20){var r=$("
    ");r.append(" "),this.search=$(""),r.append(this.search),o.append(r),this.search.click(function(t){t.stopPropagation()}),this.search.dblclick(function(t){t.stopPropagation()}),this.search.keypress(function(t){var e=t.keyCode?t.keyCode:t.which;if("13"===e||13===e){var o=$(this).val();if(!i.oldSearchValue||i.oldSearchValue!==o){for(i.oldSearchValue=o;i.menuItems.length>0;)i.menuItems[0].remove();for(var r=0;r-1&&i.addMenuItem(A):i.addMenuItem(A)}}}})}this.menuItems=[];for(var A=0;A$("html").height()+10&&t.pageY>r?e.addClass("dropdown-context-up").css({top:t.pageY-20-r,left:t.pageX-13}).fadeIn(this.fadeSpeed):e.css({top:t.pageY+10,left:t.pageX-13}).fadeIn(this.fadeSpeed)}this.onShow&&this.onShow(this)},URule.menu.Menu.prototype.hide=function(){var t=$(this._dom);t.is(":visible")&&(this.onHide&&this.onHide(this),t.fadeOut(this.fadeSpeed,function(){t.css({display:""}).find(".drop-left").removeClass("drop-left")}),this.parent&&this.parent.parent.hide())},URule.menu.MenuItem=function(t){URule.menu.MenuItem.prototype.superClass.call(this,t),$.extend(this,t)},URule.menu.MenuItem.prototype=new URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.superClass=URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.constructor=URule.menu.MenuItem,URule.menu.MenuItem.prototype.createDom=function(){var t,e,n;return n=this,t=$("
  • "),this._dom=t[0],e=this.icon?" "+this.label:this.label,t.on("mouseenter",function(){t.siblings(".dropdown-submenu").each(function(){$(this).find("ul.dropdown-context-sub").each(function(){var t=$(this).data("ref");$(this).fadeOut(t.fadeSpeed)})})}),"divider"===this.type?(t.addClass("divider"),t.append(e)):"header"==this.type?(t.addClass("nav-header"),t.append(e)):(t.append(""+e+""),this.subMenu&&this.setSubMenu(this.subMenu)),n.onClick&&(this.parent&&this.parent.search?(t.click(function(t){t.stopPropagation()}),t.dblclick(function(t){n.onClick(n,{event:t}),t.preventDefault(),t.stopPropagation(),n.parent.hide()})):t.click(function(t){t.preventDefault(),t.stopPropagation(),n.onClick(n,{event:t}),n.parent.hide()})),t[0]},URule.menu.MenuItem.prototype.setSubMenu=function(t){var e,n;return n=this,e=n.getDom(),t instanceof URule.menu.Menu?n.subMenu=t:n.subMenu=new URule.menu.Menu(t),n.subMenu.parent=this,$(e).attr("class","dropdown-submenu").on("mouseenter",function(){ +var t=$(this).find(".dropdown-context-sub:first"),e=t.width(),o=t.offset().left,i=e+o>window.innerWidth;i&&t.addClass("drop-left"),$(n.subMenu.getDom()).fadeIn(n.subMenu.fadeSpeed)}),this.subMenu.render(e),$(this.subMenu.getDom()).addClass("dropdown-context-sub"),this.subMenu},URule.menu.MenuItem.prototype.remove=function(){URule.menu.MenuItem.prototype.superClass.prototype.remove.call(this);var t;t=this.parent.menuItems.indexOf(this),this.parent.menuItems.splice(t,1)},URule.menu.MenuItem.prototype.show=function(){$(this._dom).show()},URule.menu.MenuItem.prototype.hide=function(){$(this._dom).hide()},$(document).on("dblclick","html",function(){$(".dropdown-context").each(function(){var t;t=$(this).data("ref"),t.hide()})}),URule.menu.AbstractMenu.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",function(t){t.preventDefault()})}()},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(245),r=o(i);urule.Context=function(t,e){this.container=t,this.paper=new r.default(this.container.get(0),"100%","100%"),this.rule=e,this.rootJoin=null},urule.Context.prototype.putToNamedMap=function(t,e){this.rule.namedMap.set(t,e)},urule.Context.prototype.deleteFromNamedMap=function(t){this.rule.namedMap.delete(t)},urule.Context.prototype.getVariableCategoryFromNamedMap=function(t){return this.rule.namedMap.get(t)},urule.Context.prototype.getCanvas=function(){return this.container},urule.Context.prototype.getPaper=function(){return this.paper},urule.Context.prototype.setRootJoin=function(t){this.rootJoin=t},urule.Context.prototype.getRootJoin=function(){return this.rootJoin},urule.Context.prototype.getTotalChildrenCount=function(){return this.rootJoin.getChildrenCount()}},,function(t,e){"use strict";urule.ComparisonOperator=function(t){this.inputType=null,this.operator="",this.container=generateContainer(),URule.setDomContent(this.container,"请选择比较操作符"),this.container.css({"font-size":"13px",color:"red",fontWeight:"bold","margin-right":"3px"});var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({onHide:function(){t()},menuItems:[{label:"大于",name:"GreaterThen",onClick:n},{label:"大于或等于",name:"GreaterThenEquals",onClick:n},{label:"小于",name:"LessThen",onClick:n},{label:"小于或等于",name:"LessThenEquals",onClick:n},{label:"等于",name:"Equals",onClick:n},{label:"等于(不分大小写)",name:"EqualsIgnoreCase",onClick:n},{label:"开始于",name:"StartWith",onClick:n},{label:"不开始于",name:"NotStartWith",onClick:n},{label:"结束于",name:"EndWith",onClick:n},{label:"不结束于",name:"NotEndWith",onClick:n},{label:"不等于",name:"NotEquals",onClick:n},{label:"不等于(不分大小写)",name:"NotEqualsIgnoreCase",onClick:n},{label:"在集合",name:"In",onClick:n},{label:"不在集合",name:"NotIn",onClick:n},{label:"为空",name:"Null",onClick:n},{label:"不为空",name:"NotNull",onClick:n},{label:"匹配正则表达式",name:"Match",onClick:n},{label:"不匹配正则表达式",name:"NotMatch",onClick:n},{label:"包含",name:"Contain",onClick:n},{label:"不包含",name:"NotContain",onClick:n}]}),this.container.click(function(t){e.menu.show(t)})},urule.ComparisonOperator.prototype.initRightValue=function(t){this.inputType&&this.inputType.setValueType(t.valueType,t)},urule.ComparisonOperator.prototype.setOperator=function(t){switch(t){case"GreaterThen":this.operator="GreaterThen",URule.setDomContent(this.container,"大于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"GreaterThenEquals":this.operator="GreaterThenEquals",URule.setDomContent(this.container,"大于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThen":this.operator="LessThen",URule.setDomContent(this.container,"小于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"LessThenEquals":this.operator="LessThenEquals",URule.setDomContent(this.container,"小于或等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"StartWith":this.operator="StartWith",URule.setDomContent(this.container,"开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Equals":this.operator="Equals",URule.setDomContent(this.container,"等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EqualsIgnoreCase":this.operator="EqualsIgnoreCase",URule.setDomContent(this.container,"等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotStartWith":this.operator="NotStartWith",URule.setDomContent(this.container,"不开始于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"EndWith":this.operator="EndWith",URule.setDomContent(this.container,"结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEndWith":this.operator="NotEndWith",URule.setDomContent(this.container,"不结束于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEquals":this.operator="NotEquals",URule.setDomContent(this.container,"不等于"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotEqualsIgnoreCase":this.operator="NotEqualsIgnoreCase",URule.setDomContent(this.container,"不等于(不分大小写)"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"In":this.operator="In",URule.setDomContent(this.container,"在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"NotIn":this.operator="NotIn",URule.setDomContent(this.container,"不在集合"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType("之中");break;case"Null":this.operator="Null",URule.setDomContent(this.container,"为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"NotNull":this.operator="NotNull",URule.setDomContent(this.container,"不为空"),this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null);break;case"Match":this.operator="Match",URule.setDomContent(this.container,"匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotMatch":this.operator="NotMatch",URule.setDomContent(this.container,"不匹配正则表达式"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"Contain":this.operator="Contain",URule.setDomContent(this.container,"包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType;break;case"NotContain":this.operator="NotContain",URule.setDomContent(this.container,"不包含"),this.inputType&&this.inputType.getContainer().remove(),this.inputType=new urule.InputType}window._setDirty()},urule.ComparisonOperator.prototype.getOperator=function(){if(""==this.operator)throw"请选择比较操作符!";return this.operator},urule.ComparisonOperator.prototype.getInputType=function(){return this.inputType},urule.ComparisonOperator.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.ComplexArithmetic=function(t){this.container=$(""),this.operator="",this.rule=t,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod"}),this.container.append(this.selectorLabel),this.nextType=null;var e=this,n=function(t){e.setOperator(t.name)};e.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:n},{label:"-",name:"Sub",onClick:n},{label:"x",name:"Mul",onClick:n},{label:"÷",name:"Div",onClick:n},{label:"%",name:"Mod",onClick:n},{label:"删除",onClick:function(){window._setDirty(),e.nextType&&(e.nextType.getContainer().remove(),e.nextType=null,URule.setDomContent(e.selectorLabel,"."),e.selectorLabel.css({color:"#fff","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.ComplexArithmetic.prototype.setOperator=function(t){switch(window._setDirty(),this.operator=t,this.info="",t){case"Add":this.info="+";break;case"Sub":this.info="-";break;case"Mul":this.info="x";break;case"Div":this.info="÷";break;case"Mod":this.info="%"}URule.setDomContent(this.selectorLabel,this.info),this.selectorLabel.css({color:"green","padding-left":"4px","padding-right":"4px"}),this.nextType||(this.nextType=new urule.NextType(this.rule),this.container.append(this.nextType.getContainer()))},urule.ComplexArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.nextType.initData(t)}},urule.ComplexArithmetic.prototype.getDisplayContainer=function(){if(this.nextType){var t=$(""+this.info+"");return t.append(this.nextType.getDisplayContainer()),t}return null},urule.ComplexArithmetic.prototype.toXml=function(){if(!this.nextType)return"";var t='';return t+=this.nextType.toXml(),t+=""},urule.ComplexArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.VariableValue=function(t,e,n,o){this.arithmetic=t,this.container=$("");this.label=generateContainer(),this.functionProperty=o,this.container.append(this.label),this.label.css({color:"darkcyan"}),URule.setDomContent(this.label,"请选择变量"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._VariableValueArray.push(this),this.act=n,this.initMenu()},urule.VariableValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.variableLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.VariableValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.VariableValue.prototype.initMenu=function(t){var e=window._uruleEditorVariableLibraries;if(t&&(e=t),e){var n,o,i,r;n=this,o=function(t){n.setValue({variableCategory:t.label,variables:t.variables})},i=function(t){n.setValue({variables:t.parent.parent.variables,variableCategory:t.parent.parent.label,variableLabel:t.label,variableName:t.name,datatype:t.datatype})},r={menuItems:[]},$.each(e,function(t,e){$.each(e,function(t,e){var A=e.variables;n.functionProperty&&n.category&&e.name==n.category&&n.functionProperty.initMenu(A);var a={label:e.name,variables:A,onClick:o};$.each(A||[],function(t,e){if(a.subMenu||(a.subMenu={menuItems:[]}),n.matchAct(e.act)){var o={name:e.name,label:e.label,datatype:e.type,act:e.act,variables:A,onClick:i};a.subMenu.menuItems.push(o)}}),r.menuItems.push(a)})}),n.menu?n.menu.setConfig(r):n.menu=new URule.menu.Menu(r),this.label.click(function(t){n.menu.show(t)})}},urule.VariableValue.prototype.setValue=function(t){this.category=t.variableCategory,this.variableName=t.variableName,this.variableLabel=t.variableLabel,this.datatype=t.datatype,this.functionProperty&&this.functionProperty.initMenu(t.variables),this.variableLabel?URule.setDomContent(this.label,this.category+"."+this.variableLabel):URule.setDomContent(this.label,this.category),window._setDirty()},urule.VariableValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.VariableValue.prototype.toXml=function(){if(!this.category||""==this.category)throw"变量不能为空!";var t='var-category="'+this.category+'"';return this.variableName&&(t+=' var="'+this.variableName+'" var-label="'+this.variableLabel+'" datatype="'+this.datatype+'"'),t},urule.VariableValue.prototype.getType=function(){return this.variableName?"Variable":"VariableCategory"},urule.VariableValue.prototype.getContainer=function(){return this.container}},,,function(t,e){"use strict";urule.ConstantValue=function(t,e){this.arithmetic=t,this.container=$(""),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#0174DF"}),this.label.prop("innerText","请选择常量"),t&&this.container.append(t.getContainer()),e&&(this.setValue(e),t.initData(e.arithmetic)),this.initMenu(),window._ConstantValueArray.push(this)},urule.ConstantValue.prototype.setValue=function(t){this.category=t.constantCategory,this.constantName=t.constantName,this.constantLabel=t.constantLabel,URule.setDomContent(this.label,this.category+"."+this.constantLabel),window._setDirty()},urule.ConstantValue.prototype.initMenu=function(t){var e=window._uruleEditorConstantLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({constantCategory:t.parent.parent.label,constantLabel:t.label,constantName:t.name})},i={menuItems:[]},$.each(e,function(t,e){var n=e.categories;$.each(n,function(t,e){var n={label:e.label},r=e.constants;$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.name,label:e.label,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ConstantValue.prototype.getDisplayContainer=function(){var t=$(""+this.category+"."+this.constantLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ConstantValue.prototype.toXml=function(){if(!this.category)throw"常量不能为空!";var t='const-category="'+this.category+'" const="'+this.constantName+'" const-label="'+this.constantLabel+'"';return t},urule.ConstantValue.prototype.getContainer=function(){return this.container}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigActionDialog=function(t){this.parent=t,this.init()},urule.ConfigActionDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("动作库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ActionLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.actionLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("动作库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.actionLibraries.push(o),window.refreshActionLibraries(),void window._setDirty())}})}}])},urule.ConfigActionDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    动作库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.actionLibraries.indexOf(t);window.actionLibraries.splice(n,1),e.remove(),window.refreshActionLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var i=n(240),r=o(i);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigConstantDialog=function(t){this.parent=t,this.init()},urule.ConfigConstantDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("常量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ConstantLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.constantLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("常量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.constantLibraries.push(o),window.refreshConstantLibraries(),void window._setDirty())}})}}])},urule.ConfigConstantDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    常量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.constantLibraries.indexOf(t);window.constantLibraries.splice(n,1),e.remove(),window.refreshConstantLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigParameterDialog=function(t){this.parent=t,this.init()},urule.ConfigParameterDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("参数库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ParameterLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.parameterLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("参数库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.parameterLibraries.push(o),window.refreshParameterLibraries(),void window._setDirty())}})}}])},urule.ConfigParameterDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    参数库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.parameterLibraries.indexOf(t);window.parameterLibraries.splice(n,1),e.remove(),window.refreshParameterLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),A=o(r);urule.ConfigVariableDialog=function(t){this.parent=t,this.init()},urule.ConfigVariableDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("变量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){A.eventEmitter.emit(A.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"VariableLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.variableLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("变量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.variableLibraries.push(o),window.refreshVariableLibraries(),void window._setDirty())}})}}])},urule.ConfigVariableDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    变量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.variableLibraries.indexOf(t);window.variableLibraries.splice(n,1),e.remove(),window.refreshVariableLibraries(),window._setDirty()}),e.append(n),e}},,,,function(t,e){"use strict";urule.SimpleArithmetic=function(){this.container=$(""),this.selectorLabel=generateContainer(),URule.setDomContent(this.selectorLabel,"."),this.selectorLabel.css({color:"#FFF"}),this.operator="",this.container.append(this.selectorLabel),this.value=null;var t=this,e=function(e){t.setOperator(e.name)};t.menu=new URule.menu.Menu({menuItems:[{label:"+",name:"Add",onClick:e},{label:"-",name:"Sub",onClick:e},{label:"x",name:"Mul",onClick:e},{label:"÷",name:"Div",onClick:e},{label:"%",name:"Mod",onClick:e},{label:"删除",onClick:function(){t.value&&(t.value.getContainer().remove(),t.operator=null,t.value=null,URule.setDomContent(t.selectorLabel,"."),t.selectorLabel.css({color:"#FFF","padding-left":"0px","padding-right":"0px"}))}}]}),this.selectorLabel.click(function(e){t.menu.show(e)})},urule.SimpleArithmetic.prototype.initData=function(t){if(t){var e=t.type;this.setOperator(e),this.value.initData(t.value)}},urule.SimpleArithmetic.prototype.setOperator=function(t){window._setDirty(),this.operator=t;var e="";switch(t){case"Add":e="+";break;case"Sub":e="-";break;case"Mul":e="x";break;case"Div":e="÷";break;case"Mod":e="%"}this.selectorLabel.css({color:"green",fontWeight:"blod","padding-left":"5px","padding-right":"5px"}),URule.setDomContent(this.selectorLabel,e),this.value||(this.simpleArithmetic=new urule.SimpleArithmetic,this.value=new urule.SimpleValue(this.simpleArithmetic),this.container.append(this.value.getContainer()))},urule.SimpleArithmetic.prototype.toXml=function(){if(!this.operator||""==this.operator)return"";if(!this.value)throw"请输入具体值!";var t=this.value.getValue();if(""==t)throw"请输入具体值!";var e='';return e+=this.simpleArithmetic.toXml(),e+=""},urule.SimpleArithmetic.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.RuleProperty=function(t,e,n,o){this.parent=t,this.value=n,this.editorType=o,this.container=$("");var i=$("");this.name=e;var r=this.getLabel();URule.setDomContent(i,r+":"),this.container.append(i);var A=$(""),a=generateContainer();""==n&&(n="无"),a.css({color:"#000"}),URule.setDomContent(a,n),A.append(a),this.container.append(A);var s=null;this.radioName=Math.uuid(15),this.yesRadio=null,this.noRadio=null,1==o?s=$(""):2==o?s=$(""):3==o&&(this.yesRadio=$(" 是 "),this.noRadio=$(" 否"));var l=this;if(3!=o){if(s.blur(function(){l.value=s.prop("value"),s.hide(),""==l.value?URule.setDomContent(a,"无"):URule.setDomContent(a,l.value),a.show(),window._setDirty()}),a.click(function(){a.hide(),s.prop("value",l.value),s.show(),s.focus()}),this.container.append(s),s.hide(),2==o&&"无"!==n){new Date(n);this.value=n,URule.setDomContent(a,this.value)}}else 1==n?this.yesRadio.prop("checked",!0):this.noRadio.prop("checked",!0),this.yesRadio.change(function(){window._setDirty()}),this.noRadio.change(function(){window._setDirty()}),a.hide(),this.container.append(this.yesRadio),this.container.append(this.noRadio);var c=$('');c.click(function(){l.container.remove();var t=l.parent.properties.indexOf(l);l.parent.properties.splice(t,1),window._setDirty()}),this.container.append(c)},urule.RuleProperty.prototype.getLabel=function(){var t="";return"salience"==this.name?t="优先级":"loop"==this.name?t="允许循环触发":"effective-date"==this.name?t="生效日期":"expires-date"==this.name?t="失效日期":"enabled"==this.name?t="是否启用":"debug"==this.name?t="允许调试信息输出":"activation-group"==this.name?t="互斥组":"agenda-group"==this.name?t="执行组":"auto-focus"==this.name?t="自动获取焦点":"ruleflow-group"==this.name&&(t="规则流组"),t},urule.RuleProperty.prototype.toXml=function(){var t=this.name;if(3==this.editorType)t+=this.yesRadio.prop("checked")?'="true"':'="false"';else{if(!this.value||""==this.value)throw"请输入属性"+this.name+"的具体值!";t+='="'+this.value+'"'}return t},urule.RuleProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.Join=function(t){this.type="and",this.context=t,this.H=30,this.W=60,this.children=[],this.joinContainer=$(""),this.joinContainer.css({border:"solid gray 1px",padding:"3px",background:"#fff"}),this.joinLabel=$("并且"),this.joinContainer.append(this.joinLabel)},urule.Join.prototype.initData=function(t){var e=[],n=t.conditions,o=t.joints;if(this.setType(t.type),n&&(e=n),o&&(e=e.concat(o)),0!=e.length)for(var i=0;i'),n=this;n.menu=new URule.menu.Menu({menuItems:[{label:"并且",onClick:function(){n.setType("and")}},{label:"或者",onClick:function(){n.setType("or")}},{label:"添加条件",onClick:function(){n.addItem(!1)}}]}),this.joinContainer.click(function(t){n.menu.show(t)}),this.joinContainer.append(e)},urule.Join.prototype.clean=function(){for(;this.children.length>0;){var t=this.children[0];this.removeConnection(t)}},urule.Join.prototype.removeConnection=function(t){var e=this.children.indexOf(t);this.children.length>1&&this.resetItemPosition(e+1,!1),t.remove(),this.children.splice(e,1),this.resetContainerSize(),window._setDirty()},urule.Join.prototype.addItem=function(t){window._setDirty();var e=this.getChildrenCount();if(e>0&&this.parent){var n=this.parent.getChildren(),o=n.indexOf(this.parentConnection);this.parent.resetItemPosition(o+1,!0)}var i=e*this.H,r=parseInt(this.joinContainer.css("left")),A=parseInt(this.joinContainer.css("top")),a=r+this.W/2,s=A+this.H/5,l=a+this.W-25,c=s+i;t&&(c-=5);var u=new urule.Connection(this.context,t,this);return u.drawPath(a,s,l,c),this.children.push(u),this.resetContainerSize(),u},urule.Join.prototype.toXml=function(){for(var t='',e=0;e0&&this.parent){var r=this.parent.getChildren(),A=r.indexOf(this.parentConnection),a=this.parentConnection.getParentJoin();a.resetItemPosition(A+1,e)}window._setDirty()}},urule.Join.prototype.resetContainerSize=function(){var t=this.context.getCanvas(),e=t.css("height");e=parseInt(e);var n=this.context.getTotalChildrenCount();0==n&&(n=1);var o=n*this.H+10;t.css({height:o+"px"})},urule.Join.prototype.getChildrenCount=function(){for(var t=0,e=0;e"),e=0;e0&&("or"==this.type?t.append($(" 或 ")):t.append($(" 并且 "))),t.append(o))}return t},urule.Join.prototype.getChildren=function(){return this.children},urule.Join.prototype.getContainer=function(){return this.joinContainer}},function(t,e){"use strict";urule.Connection=function(t,e,n){this.isJoin=e,this.context=t,this.parentJoin=n},urule.Connection.prototype.drawPath=function(t,e,n,o){this.startX=t,this.endX=n,this.isJoin?(this.startY=e-3,this.endY=o+2):(this.startY=e-3,this.endY=o-3),this.path=this.context.getPaper().path(this.buildPathInfo()),this.path.attr({stroke:"#777"}),this.isJoin?this.initJoin():this.initCondition()},urule.Connection.prototype.toXml=function(){var t="";return t=this.isJoin?this.join.toXml():this.condition.toXml()},urule.Connection.prototype.initJoin=function(){this.join=new urule.Join(this.context),this.join.init(this);var t=this.join.getContainer(),e=this.endX+10+"px",n=this.endY+"px";t.css({position:"absolute",left:e,top:n}),this.context.getCanvas().append(t)},urule.Connection.prototype.getDisplayContainer=function(){return this.join?this.join.getDisplayContainer():this.condition.getDisplayContainer()},urule.Connection.prototype.remove=function(){this.path.remove(),this.join?this.join.getContainer().remove():this.conditionContainer.remove(),window._setDirty()},urule.Connection.prototype.initCondition=function(){this.conditionContainer=$("
    ");var t=this.endX+10+"px",e=this.endY+"px";this.conditionContainer.css({position:"absolute",left:t,top:e}),this.condition=new urule.Condition(this.conditionContainer);var n=$(''),o=this;n.click(function(){o.parentJoin.removeConnection(o)}),this.conditionContainer.append(n),this.context.getCanvas().append(this.conditionContainer)},urule.Connection.prototype.update=function(t){var e=this.buildPathInfo();this.path.attr("path",e);var n=this.endY+"px";this.conditionContainer?this.conditionContainer.css({top:n}):this.join.getContainer().css({top:n}),this.join&&this.join.resetItemPosition(0,t)},urule.Connection.prototype.getParentJoin=function(){return this.parentJoin},urule.Connection.prototype.getCondition=function(){return this.condition},urule.Connection.prototype.getJoin=function(){return this.join},urule.Connection.prototype.getStartX=function(){return this.startX},urule.Connection.prototype.getStartY=function(){return this.startY},urule.Connection.prototype.getEndX=function(){return this.endX},urule.Connection.prototype.getEndY=function(){return this.endY},urule.Connection.prototype.setStartX=function(t){this.startX=t},urule.Connection.prototype.setStartY=function(t){this.startY=t},urule.Connection.prototype.setEndX=function(t){this.endX=t},urule.Connection.prototype.setEndY=function(t){this.endY=t},urule.Connection.prototype.buildPathInfo=function(){var t=10,e=8;return"M"+(this.startX+t)+","+(this.startY+e)+" C"+(this.startX+t)+","+(this.endY+e)+","+(this.startX+t)+","+(this.endY+e)+","+(this.endX+t)+","+(this.endY+e)}},function(t,e){"use strict";urule.InputType=function(t,e,n,o){this.container=$(""),this.label=generateContainer(),this.rule=o,this.container.append(this.label),e?(URule.setDomContent(this.label,e),this.label.css({color:"gray"})):(URule.setDomContent(this.label,"选择值类型"),this.label.css({color:"blue"})),this.functionProperty=n,this.variableValue=null,this.simpleValue=null,this.referenceValue=null,this.methodValue=null,this.constantValue=null,this.functionValue=null, +this.dataContainer=$(""),this.container.append(this.dataContainer),this.type="";var i=this,r=function(t){i.setValueType(t.name)};if(i.menu=new URule.menu.Menu({menuItems:[{label:"输入值",name:"Input",onClick:r},{label:"选择变量",name:"Variable",onClick:r},{label:"选择常量",name:"Constant",onClick:r},{label:"选择参数",name:"Parameter",onClick:r}]}),i.menu.menuItems.push({label:"选择方法",name:"Method",onClick:r},{label:"选择函数",name:"CommonFunction",onClick:r}),this.label.click(function(t){i.menu.show(t)}),t){var A=$(""+t+"");this.container.append(A)}},urule.InputType.prototype.getDisplayContainer=function(){var t=$("");return"Input"==this.type?t.append(this.simpleValue.getDisplayContainer()):"Variable"==this.type||"VariableCategory"==this.type?t.append(this.variableValue.getDisplayContainer()):"Constant"==this.type?t.append(this.constantValue.getDisplayContainer()):"Method"==this.type?t.append(this.methodValue.getDisplayContainer()):"Parameter"==this.type?t.append(this.parameterValue.getDisplayContainer()):"CommonFunction"==this.type?t.append(this.functionValue.getDisplayContainer()):"NamedReference"==this.type&&t.append(this.referenceValue.getDisplayContainer()),t},urule.InputType.prototype.setValueType=function(t,e){switch(window._setDirty(),this.type=t,this.variableValue&&this.variableValue.getContainer().hide(),this.constantValue&&this.constantValue.getContainer().hide(),this.simpleValue&&this.simpleValue.getContainer().hide(),this.referenceValue&&this.referenceValue.getContainer().hide(),this.methodValue&&this.methodValue.getContainer().hide(),this.parameterValue&&this.parameterValue.getContainer().hide(),this.functionValue&&this.functionValue.getContainer().hide(),URule.setDomContent(this.label,"."),this.label.css({color:"#FDFDFD"}),t){case"Input":this.simpleValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.simpleValue=new urule.SimpleValue(this.arithmetic,e),this.dataContainer.append(this.simpleValue.getContainer())),this.simpleValue.getContainer().show(),this.type="Input";break;case"NamedReference":this.referenceValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.referenceValue=new urule.NamedReferenceValue(this.arithmetic,e,this.rule),this.dataContainer.append(this.referenceValue.getContainer())),this.referenceValue.getContainer().show(),this.type="NamedReference";break;case"Constant":this.constantValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.constantValue=new urule.ConstantValue(this.arithmetic,e),this.dataContainer.append(this.constantValue.getContainer())),this.constantValue.getContainer().show(),this.type="Constant";break;case"Method":this.methodValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.methodValue=new urule.MethodValue(this.arithmetic,e,this.dataContainer),this.dataContainer.append(this.methodValue.getContainer())),this.methodValue.getContainer().show(),this.type="Method";break;case"Parameter":this.parameterValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.parameterValue=new urule.ParameterValue(this.arithmetic,e,"In"),this.dataContainer.append(this.parameterValue.getContainer())),this.parameterValue.getContainer().show(),this.type="Parameter";break;case"CommonFunction":this.functionValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.functionValue=new urule.FunctionValue(this.arithmetic,e,"In"),this.dataContainer.append(this.functionValue.getContainer())),this.functionValue.getContainer().show(),this.type="CommonFunction";break;default:this.variableValue||(this.arithmetic=new urule.ComplexArithmetic(this.rule),this.variableValue=new urule.VariableValue(this.arithmetic,e,"In",this.functionProperty),this.dataContainer.append(this.variableValue.getContainer())),this.variableValue.getContainer().show(),this.type="Variable"}},urule.InputType.prototype.toXml=function(){if(""==this.type)return"";var t=""),this.rule=t,this.inputType=null,this.paren=null,this.selectorLabel=generateContainer(),this.selectorLabel.css({fontWeight:"blod",color:"#fff"}),this.container.append(this.selectorLabel),URule.setDomContent(this.selectorLabel,".");var e=this,n=function(t){var n=t.name;e.doNext(n),window._setDirty()};e.menu=new URule.menu.Menu({menuItems:[{label:"值",name:"value",onClick:n},{label:"括号",name:"paren",onClick:n}]}),this.selectorLabel.click(function(t){e.menu.show(t)})},urule.NextType.prototype.initData=function(t){var e=t.value,n=e.valueType;"Paren"==n?(this.doNext("paren"),this.paren.initData(e)):(this.doNext("value"),this.inputType.setValueType(n,e))},urule.NextType.prototype.toXml=function(){return this.paren?this.paren.toXml():this.inputType?this.inputType.toXml():""},urule.NextType.prototype.getDisplayContainer=function(){return this.inputType?this.inputType.getDisplayContainer():this.paren?this.paren.getDisplayContainer():null},urule.NextType.prototype.getContainer=function(){return this.container},urule.NextType.prototype.doNext=function(t){"value"==t?(this.paren&&(this.paren.getContainer().remove(),this.paren=null),this.inputType||(this.inputType=new urule.InputType(null,null,null,this.rule),this.container.append(this.inputType.getContainer()))):"paren"==t&&(this.inputType&&(this.inputType.getContainer().remove(),this.inputType=null),this.paren||(this.paren=new urule.Paren(this.rule),this.container.append(this.paren.getContainer())))}},function(t,e){"use strict";urule.Paren=function(t){this.container=$(""),this.leftParen=$("("),this.leftParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.rightParen=$(")"),this.rightParen.css({color:"#000",fontWeight:"blod","padding-left":"3px","padding-right":"3px"}),this.parenContainer=$(""),this.container.append(this.leftParen),this.container.append(this.parenContainer),this.container.append(this.rightParen),this.inputType=new urule.InputType(null,null,null,t),this.parenContainer.append(this.inputType.getContainer()),this.arithmetic=new urule.ComplexArithmetic(t),this.container.append(this.arithmetic.getContainer())},urule.Paren.prototype.initData=function(t){var e=t.value,n=e.valueType;this.inputType.setValueType(n,e),this.arithmetic.initData(t.arithmetic)},urule.Paren.prototype.getDisplayContainer=function(){return this.inputType.getDisplayContainer()},urule.Paren.prototype.toXml=function(){if(!this.inputType)throw"请输入括号内容!";var t="";return t+=this.inputType.toXml(),this.arithmetic&&(t+=this.arithmetic.toXml()),t+=""},urule.Paren.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodParameter=function(t){this.inputType=new urule.InputType(null,null,null,t),this.container=this.inputType.getContainer()},urule.MethodParameter.prototype.initData=function(t){if(t&&(this.name=t.name,this.type=t.type,t.value)){var e=t.value;e.valueType&&this.inputType.setValueType(e.valueType,e)}},urule.MethodParameter.prototype.toXml=function(){var t='';return t+=this.inputType.toXml(),t+=""},urule.MethodParameter.prototype.getContainer=function(){return this.container},urule.MethodParameter.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";urule.MethodAction=function(t){this.parameters=[],this.rule=t,this.init()},urule.MethodAction.prototype.init=function(){this.container=$(""),this.nameContainer=$(""),this.container.append(this.nameContainer),this.nameContainer.css({color:"darkblue"})},urule.MethodAction.prototype.initData=function(t){if(t){this.bean=t.beanId,this.name=t.beanLabel,this.method=t.methodName,this.methodLabel=t.methodLabel;var e=t.parameters;if(this.parameterCount=0,e&&(this.parameterCount=e.length),0===this.parameterCount){URule.setDomContent(this.nameContainer,this.methodLabel);var n=$("(无参数)");this.container.append(n)}else URule.setDomContent(this.nameContainer,this.methodLabel+"(");if(0!=this.parameterCount){for(var o=0;o0){var r=$(";");this.container.append(r)}if(this.parameterCount>0){var A=$(" "+i.name+":");this.container.append(A)}var a=new urule.MethodParameter(this.rule);this.parameters.push(a),this.container.append(a.getContainer()),a.initData(i)}this.container.append(")")}}},urule.MethodAction.prototype.toXml=function(){if(!this.name||""==this.name)throw"请选择要执行的方法!";for(var t='',e=0;e"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#6b3db0"}),URule.setDomContent(this.label,"请选择参数"),t&&this.container.append(t.getContainer()),e&&this.initData(e),window._ParameterValueArray.push(this),this.act=n,this.initMenu()},urule.ParameterValue.prototype.getDisplayContainer=function(){var t=$("参数."+this.parameterLabel+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.ParameterValue.prototype.matchAct=function(t){return!this.act||t.indexOf(this.act)>-1},urule.ParameterValue.prototype.initMenu=function(t){var e=window._uruleEditorParameterLibraries;if(t&&(e=t),e){var n,o,i;n=this,o=function(t){n.setValue({variableName:t.name,variableLabel:t.label,datatype:t.datatype})},i={menuItems:[]},$.each(e,function(t,e){$.each(e||[],function(t,e){if(n.matchAct(e.act)){var r={name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:o};i.menuItems.push(r)}})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})}},urule.ParameterValue.prototype.setValue=function(t){this.parameterName=t.variableName,this.parameterLabel=t.variableLabel,this.datatype=t.datatype,URule.setDomContent(this.label,"参数."+this.parameterLabel),window._setDirty()},urule.ParameterValue.prototype.initData=function(t){this.setValue(t),this.arithmetic&&this.arithmetic.initData(t.arithmetic)},urule.ParameterValue.prototype.toXml=function(){if(!this.parameterLabel||""==this.parameterLabel)throw"参数不能为空!";var t=' var-category="参数" var="'+this.parameterName+'" var-label="'+this.parameterLabel+'" datatype="'+this.datatype+'"';return t},urule.ParameterValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.MethodValue=function(t,e){this.arithmetic=t,this.container=$(""),this.rightParn=$("]"),this.label=generateContainer(),this.fetchLength=!1,this.uppercase=!1,this.lowercase=!1,this.fetchSize=!1,this.container.append(this.label),this.label.css({color:"blue"}),this.actionContainer=$(""),this.container.append(this.actionContainer),URule.setDomContent(this.label,"请选择方法"),t&&this.container.append(t.getContainer()),e&&(this.setAction(e),t.initData(e.arithmetic)),window._ActionTypeArray.push(this),this.initMenu()},urule.MethodValue.prototype.initMenu=function(t){var e=window._uruleEditorActionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){var e=t.parent.parent;n.setAction({beanLabel:e.label,beanId:e.name,methodLabel:t.label,methodName:t.name,parameters:t.parameters})},i={menuItems:[]},$.each(e||[],function(t,e){var n=e.springBeans||[];$.each(n,function(t,e){var n={name:e.id,label:e.name},r=e.methods||[];$.each(r,function(t,e){n.subMenu||(n.subMenu={menuItems:[]}),n.subMenu.menuItems.push({name:e.methodName,label:e.name,parameters:e.parameters,onClick:o})}),i.menuItems.push(n)})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.MethodValue.prototype.setAction=function(t){window._setDirty(),this.action&&this.action.getContainer().remove(),this.action=new urule.MethodAction,URule.setDomContent(this.label,"["),this.actionContainer.append(this.action.getContainer()),this.actionContainer.append(this.rightParn),this.action.initData(t)},urule.MethodValue.prototype.getDisplayContainer=function(){var t="",e="";this.action&&(t=this.action.name,e=this.action.methodLabel);var n=$(""+e+"");if(this.arithmetic){var o=this.arithmetic.getDisplayContainer();o&&n.append(o)}return n},urule.MethodValue.prototype.toXml=function(){if(!this.action.bean||""==this.action.name)throw"执行方法不能为空!";var t='bean-name="'+this.action.bean+'"';return t+=' bean-label="'+this.action.name+'"',t+=' method-name="'+this.action.method+'"',t+=' method-label="'+this.action.methodLabel+'"'},urule.MethodValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionProperty=function(){this.container=$(""),this.label=generateContainer(),this.container.append(this.label),URule.setDomContent(this.label,"选择属性"),this.label.css({color:"#004C85"})},urule.FunctionProperty.prototype.toXml=function(){if(!this.variableName)throw"请选择函数属性";var t='property-name="'+this.variableName+'"';return t+=' property-label="'+this.variableLabel+'"'},urule.FunctionProperty.prototype.initMenu=function(t){if(t){var e=this,n=function(t){e.setProperty({name:t.name,label:t.label,datatype:t.type})},o={menuItems:[]};$.each(t,function(t,e){o.menuItems.push({name:e.name,label:e.label,datatype:e.type,onClick:n})}),this.menu=new URule.menu.Menu(o),this.label.click(function(t){e.menu.show(t)})}},urule.FunctionProperty.prototype.setProperty=function(t){window._setDirty(),this.variableName=t.name,this.variableLabel=t.label,URule.setDomContent(this.label,this.variableLabel)},urule.FunctionProperty.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionParameter=function(t){this.container=$(""),this.nameContainer=$(""),this.rule=t,this.container.append(this.nameContainer),this.nameContainer.css({color:"gray"})},urule.FunctionParameter.prototype.initData=function(t){if(t){this.name=t.name,URule.setDomContent(this.nameContainer,this.name+":"),(t.needProperty||t.property)&&(this.functionProperty=new urule.FunctionProperty,this.functionProperty.setProperty({name:t.property,label:t.propertyLabel})),this.inputType=new urule.InputType(null,null,this.functionProperty,this.rule);var e=t.objectParameter;if(e){var n=e.valueType;this.inputType.setValueType(n,e)}this.container.append(this.inputType.getContainer()),this.functionProperty&&(this.container.append($("")),this.container.append($("属性:")),this.container.append(this.functionProperty.getContainer()))}},urule.FunctionParameter.prototype.toXml=function(){if(!this.name)return"";var t="",t+=this.inputType.toXml(),t+=""},urule.FunctionParameter.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.FunctionValue=function(t,e,n){this.arithmetic=t,this.container=$(""),this.rule=n,this.leftParn=$("("),this.rightParn=$(")"),this.label=generateContainer(),this.container.append(this.label),this.label.css({color:"#008080"}),this.functionContainer=$(""),this.container.append(this.functionContainer),URule.setDomContent(this.label,"请选择函数"),t&&this.container.append(t.getContainer()),e&&(this.setFunction(e),t&&t.initData(e.arithmetic)),window._FunctionValueArray.push(this),this.initMenu()},urule.FunctionValue.prototype.getDisplayContainer=function(){var t=$(""+this.functionName+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.FunctionValue.prototype.toXml=function(){if(!this.functionLabel)throw"请选择函数";if(!this.functionName)throw"请选择函数";var t=' function-label="'+this.functionLabel+'"';return t+=' function-name="'+this.functionName+'"'},urule.FunctionValue.prototype.initMenu=function(t){var e=window._uruleEditorFunctionLibraries;t&&(e=t);var n,o,i;n=this,o=function(t){n.setFunction({parameter:t.parameter,label:t.label,name:t.name})},i={menuItems:[]},$.each(e||[],function(t,e){i.menuItems.push({name:e.name,label:e.label,parameter:e.argument,onClick:o})}),n.menu?n.menu.setConfig(i):n.menu=new URule.menu.Menu(i),this.label.click(function(t){n.menu.show(t)})},urule.FunctionValue.prototype.initData=function(t){t&&this.setFunction(t)},urule.FunctionValue.prototype.setFunction=function(t){window._setDirty(),this.functionContainer.empty(),URule.setDomContent(this.label,t.label),this.functionContainer.append(this.leftParn),this.functionLabel=t.label,this.functionName=t.name,this.parameter=new urule.FunctionParameter(this.rule),this.parameter.initData(t.parameter),this.functionContainer.append(this.parameter.getContainer()),this.functionContainer.append(this.rightParn)},urule.FunctionValue.prototype.getFirstParameter=function(){return this.firstParameter},urule.FunctionValue.prototype.getParameter=function(){return this.parameter},urule.FunctionValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.SimpleValue=function(t,e){var n="请输入值";this.container=$(""),this.valueContainer=generateContainer(),this.valueContainer.css({color:"rgb(180,95,4)"}),this.editor=$('');var o=this;this.container.append(this.valueContainer).append(this.editor),this.editor.blur(function(){o.editor.hide();var t=o.editor.prop("value");""!=t&&URule.setDomContent(o.valueContainer,t),o.valueContainer.show(),$(this).trigger("DOMSubtreeModified"),window._setDirty()}).mousedown(function(t){t.stopPropagation()}).keydown(function(t){t.stopPropagation()}),o.editor.hide(),this.valueContainer.prop("innerText",n),this.valueContainer.click(function(){o.valueContainer.hide();var t=o.container.parent(),e=120;if(t&&t.parent()&&t.parent().parent()){t=t.parent().parent();var n=t.prop("class");n&&"htMiddle htDimmed current"==n&&(e=t.width()-20)}o.editor.css({width:e}),o.editor.css({display:"inline"}),o.editor.focus(),$(this).trigger("DOMSubtreeModified")}),this.arithmetic=t,this.container.append(t.getContainer()),this.initData(e)},urule.SimpleValue.prototype.getDisplayContainer=function(){var t=$(""+this.editor.prop("value")+"");if(this.arithmetic){var e=this.arithmetic.getDisplayContainer();e&&t.append(e)}return t},urule.SimpleValue.prototype.initData=function(t){if(t){var e=t.content;URule.setDomContent(this.valueContainer,e),this.editor.prop("value",e),this.arithmetic&&this.arithmetic.initData(t.arithmetic)}},urule.SimpleValue.prototype.getValue=function(){var t=this.editor.prop("value");return t=t.replace(new RegExp("&","gm"),"&"),t=t.replace(new RegExp("<","gm"),"<"),t=t.replace(new RegExp(">","gm"),">"),t=t.replace(new RegExp("'","gm"),"'"),t=t.replace(new RegExp('"',"gm"),""")},urule.SimpleValue.prototype.getContainer=function(){return this.container}},function(t,e){"use strict";urule.Condition=function(t){this.container=$(""),t.append(this.container);var e=this;this.operator=new urule.ComparisonOperator(function(){e.inputType=e.operator.getInputType(),e.inputType&&e.container.append(e.inputType.getContainer())}),e.container.append(this.operator.getContainer())},urule.Condition.prototype.initData=function(t){var e=t.op;this.operator.setOperator(e),this.operator.initRightValue(t.value),this.inputType=this.operator.getInputType(),this.inputType&&this.container.append(this.inputType.getContainer())},urule.Condition.prototype.getDisplayContainer=function(){var t=$(""),e=URule.getDomContent(this.operator.getContainer());return t.append($(""+e+"")),this.inputType&&t.append(this.inputType.getDisplayContainer()),t},urule.Condition.prototype.toXml=function(){var t='';return this.inputType&&(t+=this.inputType.toXml()),t+=""},urule.Condition.prototype.getOperator=function(){return this.operator},urule.Condition.prototype.getInputType=function(){return this.inputType}},function(t,e){"use strict";window._conditionId=0,urule.CellCondition=function(t){this.container=$(t),this.container.css({height:"40px",position:"relative"});var e=new urule.Context(this.container);this.join=new urule.Join(e),this.join.init(null),this.join.initTopJoin(this.container),this.join.setType("and"),this.id=window._conditionId++},urule.CellCondition.prototype.clean=function(){this.join.clean(),window._setDirty()},urule.CellCondition.prototype.getId=function(){return this.id},urule.CellCondition.prototype.renderTo=function(t){t.append(this.container)},urule.CellCondition.prototype.getDisplayContainer=function(){var t=null;return this.join&&(t=this.join.getDisplayContainer()),t||(t=$("")),t},urule.CellCondition.prototype.initData=function(t){this.join&&this.join.initData(t)},urule.CellCondition.prototype.toXml=function(){return this.join.toXml()}},,,,,,,,function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l=function(){function t(t,e){for(var n=0;n ul > li");o.is(":visible")?(o.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(o.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var i=this.props.expandLevel;if(o._level>=i){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(o)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var o="treenodemenu"+t.id;e.contextmenu({target:"#"+o})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,o=e.dispatch,i=n.children,r="node-"+n.id,A="treenodemenu"+n.id,a=[];if(n.contextMenu&&a.push(u.default.createElement(I.default,{items:n.contextMenu,key:n.id,data:n,dispatch:o,menuId:A})),i&&i.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"", +className:n.lock?"rf rf-lock":""}))),a,u.default.createElement(p.default,{dispatch:o,children:i,expandLevel:this.props.expandLevel}));var l=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var o=window._server+n.editorPath+"?file="+n.fullPath;T.eventEmitter.emit(T.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:o,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),a)}}();return"object"===("undefined"==typeof l?"undefined":s(l))?l.v:void 0}}]),e}(c.Component);e.default=E},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    ");e.container.append(n),this.remark=new Remark(n),this.weightSupport=!1;var o=$('
    ');this.weightSupportContainer=$('权重:'),this.initWeightSupportOptions(),o.append(this.weightSupportContainer);var r=$("");e.container.append(o),o.append(r),this.propertyConfig=new u.default(r),this.attributeRows=[],this.customCols=[],this.config=e,this.table=$('
    '),e.container.append(this.table);var A=$('
    ');e.container.append(A),this.tableAction=new d.default(A)}return r(t,[{key:"initWeightSupportOptions",value:function(){var t=$("");this.weightSupportContainer.append(t);var e=$('');t.append(e),this.weightSupportOption=$('支持'),e.append(this.weightSupportOption);var n=$('');t.append(n),this.weightNonsupportOption=$('不支持'),n.append(this.weightNonsupportOption);var o=this;this.weightSupportOption.change(function(){if("on"===$(this).val()){var t=!0,e=!1,n=void 0;try{for(var i,r=o.attributeRows[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value;A.attributeCell.showWeight()}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}o.weightSupport=!0}}),this.weightNonsupportOption.change(function(){if("on"===$(this).val()){var t=!0,e=!1,n=void 0;try{for(var i,r=o.attributeRows[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var A=i.value;A.attributeCell.hideWeight()}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}o.weightSupport=!1}})}},{key:"init",value:function(t){this.data=t||{},this.data.weightSupport?(this.weightSupport=!0,this.weightSupportOption.prop("checked",!0)):(this.weightSupport=!1,this.weightNonsupportOption.prop("checked",!0)),this.remark.setData(t.remark),this.propertyConfig.initData(t),this.tableAction.initData(t);var e=$("");this.table.append(e),this.headerRow=$(""),e.append(this.headerRow),this.body=$(""),this.table.append(this.body),this.initAttributeCol(t),this.initConditionCol(t),this.initScoreCol(t);var n=t.customCols||[],o=!0,i=!1,r=void 0;try{for(var A,a=n[Symbol.iterator]();!(o=(A=a.next()).done);o=!0){var s=A.value;this.addCustomCol(s)}}catch(t){i=!0,r=t}finally{try{!o&&a.return&&a.return()}finally{if(i)throw r}}var l=t.rows||[],c=!0,u=!1,g=void 0;try{for(var d,M=l[Symbol.iterator]();!(c=(d=M.next()).done);c=!0){var p=d.value;this.addAttributeRow(p)}}catch(t){u=!0,g=t}finally{try{!c&&M.return&&M.return()}finally{if(u)throw g}}}},{key:"getCell",value:function(t,e){if(!this.data)return null;var n=this.data.cells,o=!0,i=!1,r=void 0;try{for(var A,a=n[Symbol.iterator]();!(o=(A=a.next()).done);o=!0){var s=A.value;if(s.row===t&&s.col===e)return s}}catch(t){i=!0,r=t}finally{try{!o&&a.return&&a.return()}finally{if(i)throw r}}throw"Cell ["+t+","+e+"] not exist."}},{key:"initAttributeCol",value:function(t){var e=t.attributeColWidth||"200",n=t.attributeColName||"属性",o=t.attributeColVariableCategory;this.attributeCol=new p.default(this,n,e,o)}},{key:"initConditionCol",value:function(t){var e=t.conditionColWidth||"220",n=t.conditionColName||"条件";this.conditionCol=new I.default(this,n,e)}},{key:"initScoreCol",value:function(t){var e=t.scoreColWidth||"180",n=t.scoreColName||"分值";this.scoreCol=new T.default(this,n,e)}},{key:"addAttributeRow",value:function(t){var e=new a.default(this,t);this.attributeRows.push(e),this.body.append(e.tr),t&&e.initConditionRows(t),window._setDirty()}},{key:"addCustomCol",value:function(t){var e=this;if(t){var n=new l.default(this,t.name,t.width);this.customCols.push(n),window._setDirty()}else!function(){var t=e;bootbox.prompt("请输入列名",function(e){if(e&&!(e.length<1)){var n=new l.default(t,e);t.customCols.push(n),window._setDirty()}})}()}},{key:"toXml",value:function(){if(0===this.attributeRows.length)throw"属性至少要有一行";var t='';t+='",t+=this.remark.toXml(),$.each(window.parameterLibraries,function(e,n){t+=''}),$.each(window.variableLibraries,function(e,n){t+=''}),$.each(window.constantLibraries,function(e,n){t+=''}),$.each(window.actionLibraries,function(e,n){t+=''});var e=!0,n=!1,o=void 0;try{for(var i,r=this.attributeRows[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var A=i.value;t+=A.cellsToXml()}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}var a=!0,s=!1,l=void 0;try{for(var c,u=this.attributeRows[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;t+=g.toXml()}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}var d=!0,M=!1,p=void 0;try{for(var h,I=this.customCols[Symbol.iterator]();!(d=(h=I.next()).done);d=!0){var f=h.value;t+=f.toXml()}}catch(t){M=!0,p=t}finally{try{!d&&I.return&&I.return()}finally{if(M)throw p}}return t+=""}}]),t}();e.default=E},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'),o.tr.append(o.newAttributeCell()),o.tr.append(o.newConditionCell()),o.tr.append(o.newScoreCell()),o.initCustomCells(),o}return A(e,t),a(e,[{key:"addCustomCol",value:function(t){var e=new p.default(this,t);this.tr.append(e.td),t.customCells.push(e);var n=!0,o=!1,i=void 0;try{for(var r,A=this.conditionRows[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;a.addCustomCol(t)}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}}},{key:"removeCustomCol",value:function(t){for(var e=[],n=0;n0?this.conditionRows[this.conditionRows.length-1].tr.after(e.tr):this.tr.after(e.tr),this.conditionRows.push(e)}},{key:"toXml",value:function(){var t='',e=!0,n=!1,o=void 0;try{for(var i,r=this.conditionRows[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var A=i.value;t+=A.toXml()}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}return t+=""}}]),e}(u.default);e.default=h},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    ");this.td.append(e),this.propContainer=generateContainer(),t?(this.variableLabel=t.variableLabel,this.variableName=t.variableName,this.weight=t.weight,URule.setDomContent(this.propContainer,this.variableLabel||this.variableName)):URule.setDomContent(this.propContainer,"请选择属性"),e.append(this.propContainer),this.propContainer.css({color:"green"});var n=this,o=$('');e.append(o),o.click(function(){bootbox.confirm("真的要删除?",function(t){t&&n.row.remove()})});var i=$('');e.append(i),i.click(function(){n.row.addConditionRow()}),this.row.scoreCardTable.attributeCol.category&&this.refreshAttributeCellMenus(this.row.scoreCardTable.attributeCol.category.variables),this.weightContainer=$("
    "),this.row.scoreCardTable.weightSupport||this.weightContainer.hide(),this.weightEditor=$(''),this.weightContainer.append(this.weightEditor),this.weight&&this.weightEditor.val(this.weight),this.weightEditor.change(function(){n.weight=$(this).val()}),e.append(this.weightContainer)}},{key:"showWeight",value:function(){this.weightContainer.show(),this.weight=null,this.weightEditor.val("")}},{key:"hideWeight",value:function(){this.weightContainer.hide(),this.weight=null,this.weightEditor.val("")}},{key:"refreshAttributeCellMenus",value:function(t){var e=[],n=this,o=!0,i=!1,r=void 0;try{for(var A,a=function(){var t=A.value;e.push({label:t.label||t.name,onClick:function(){n.variable=t,URule.setDomContent(n.propContainer,t.label||t.name)}})},s=t[Symbol.iterator]();!(o=(A=s.next()).done);o=!0)a()}catch(t){i=!0,r=t}finally{try{!o&&s.return&&s.return()}finally{if(i)throw r}}this.propContainer.menu?this.propContainer.menu.setConfig({menuItems:e}):(this.propContainer.menu=new URule.menu.Menu({menuItems:e}),this.propContainer.click(function(t){n.propContainer.menu.show(t)}))}}]),e}(l.default);e.default=c},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n'),this.initCell(t)}},{key:"toXml",value:function(){var t=''}else if("condition"===this.type){if(t+=">",!this.cellCondition)throw"请配置好条件.";t+=this.cellCondition.toXml()}else if("score"===this.type){if(!this.inputType)throw"请配置好分值";var e=this.inputType.toXml();if(""===e)throw"请配置好分值";t+=">",t+=e}else if("custom"===this.type){if(!this.inputType)throw"请配置好自定义值";var n=this.inputType.toXml();if(""===n)throw"请配置好自定义值";t+=">",t+=n}return t+=""}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n
    ");if(this.inputType=new urule.InputType(null,"无"),e.append(this.inputType.getContainer()),t&&t.value){var n=t.value;this.inputType.setValueType(n.valueType,n)}this.td.append(e)}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    ");this.td.append(o);var i=$('');o.append(i);var r=$('');o.append(r),t&&(this.cellCondition=new urule.CellCondition("
    "),this.cellCondition.initData(t.joint),i.empty(),i.append(this.cellCondition.getDisplayContainer())),r.click(function(){var t=$("
    ");n.cellCondition||(n.cellCondition=new urule.CellCondition("
    ")),n.cellCondition.renderTo(t);var e="配置条件";s.MsgBox.showDialog(e,t,[],[{name:"hide.bs.modal",callback:function(){i.empty(),i.append(n.cellCondition.getDisplayContainer())}}],!0)}),this.row.rowType&&"condition"===this.row.rowType&&!function(){var t=e,n=$('');o.append(n),n.click(function(){bootbox.confirm("真的要删除?",function(e){e&&t.row.remove()})})}()}}]),e}(c.default);e.default=u},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n
    ");if(this.inputType=new urule.InputType(null,"无"),e.append(this.inputType.getContainer()),t&&t.value){var n=t.value;this.inputType.setValueType(n.valueType,n)}this.td.append(e)}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'),A.tr.append(A.newConditionCell()),A.tr.append(A.newScoreCell()),A.initCustomCells(),A}return A(e,t), +a(e,[{key:"addCustomCol",value:function(t){var e=new u.default(this,t);t.customCells.push(e),this.tr.append(e.td)}},{key:"removeCustomCol",value:function(t){for(var e=[],n=0;n';return t+=""}}]),e}(l.default);e.default=g},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'+this.name+"");var e=$("");this.td.append(e),e.click(function(){bootbox.confirm("真的要删除当前列?",function(e){e&&t.remove()})}),this.td.append(this.buildColResizeTrigger());var n=!0,o=!1,i=void 0;try{for(var r,A=this.scoreCardTable.attributeRows[Symbol.iterator]();!(n=(r=A.next()).done);n=!0){var a=r.value;a.addCustomCol(this)}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}this.scoreCardTable.headerRow.append(this.td),this.bindColResize()}},{key:"remove",value:function(){var t=!0,e=!1,n=void 0;try{for(var o,i=this.scoreCardTable.attributeRows[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var r=o.value;r.removeCustomCol(this)}}catch(t){e=!0,n=t}finally{try{!t&&i.return&&i.return()}finally{if(e)throw n}}var A=this.scoreCardTable.customCols.indexOf(this);this.scoreCardTable.customCols.splice(A,1);var a=!0,s=!1,l=void 0;try{for(var c,u=this.customCells[Symbol.iterator]();!(a=(c=u.next()).done);a=!0){var g=c.value;g.td.remove()}}catch(t){s=!0,l=t}finally{try{!a&&u.return&&u.return()}finally{if(s)throw l}}this.td.remove(),window._setDirty()}},{key:"toXml",value:function(){var t='';return t}}]),e}(l.default);e.default=c},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n '),this.resizeTrigger}},{key:"getColNumber",value:function(){switch(this.type){case"attribute":return 1;case"condition":return 2;case"score":return 3}var t=this.scoreCardTable.customCols.indexOf(this);return t+4}},{key:"bindColResize",value:function(){var t=!1,e=void 0,n=void 0,o=void 0,i=this;this.resizeTrigger.mousedown(function(i){e=$(this).parent(),t=!0,n=i.pageX,o=e.width(),i.preventDefault()}),$(document).mousemove(function(r){if(t){var A=o+(r.pageX-n);i.width=A,e.width(A),r.preventDefault()}}),$(document).mouseup(function(e){t=!1,window._setDirty()})}}]),t}();e.default=i},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n名称:"),this.namePropertyContainer.css({padding:"10px"}),this.container.append(this.namePropertyContainer),this.nameEditor=$(""),this.namePropertyContainer.append(this.nameEditor),this.nameEditor.change(function(){t.name=$(this).val(),window._setDirty()}),this.propertyContainer=$(""),this.propertyContainer.css({padding:"10px"});var e=$("");this.container.append(e),this.container.append(this.propertyContainer);var n=function(e){var n=new urule.RuleProperty(t,e.name,e.defaultValue,e.editorType);t.addProperty(n)};t.menu=new URule.menu.Menu({menuItems:[{label:"优先级",name:"salience",defaultValue:"10",editorType:1,onClick:n},{label:"生效日期",name:"effective-date",defaultValue:"",editorType:2,onClick:n},{label:"失效日期",name:"expires-date",defaultValue:"",editorType:2,onClick:n},{label:"是否启用",name:"enabled",defaultValue:!0,editorType:3,onClick:n},{label:"允许调试信息输出",name:"debug",defaultValue:!0,editorType:3,onClick:n}]}),e.click(function(e){t.menu.show(e)})}},{key:"initData",value:function(t){this.name=t.name,this.nameEditor.val(t.name);var e=t.salience;e&&this.addProperty(new urule.RuleProperty(this,"salience",e,1));var n=t.loop;null!=n&&this.addProperty(new urule.RuleProperty(this,"loop",n,3));var o=t.debug;null!=o&&this.addProperty(new urule.RuleProperty(this,"debug",o,3));var i=t.effectiveDate;i&&this.addProperty(new urule.RuleProperty(this,"effective-date",i,2));var r=t.expiresDate;r&&this.addProperty(new urule.RuleProperty(this,"expires-date",r,2));var A=t.enabled;null!=A&&this.addProperty(new urule.RuleProperty(this,"enabled",A,3))}},{key:"addProperty",value:function(t){this.propertyContainer.append(t.getContainer()),this.properties.push(t),window._setDirty()}},{key:"toXml",value:function(){if(!this.name||this.name.length<1)throw"评分卡名称不能为空";for(var t=' name="'+this.name+'"',e=0;e得分计算方式:
    ');this.container.append(t),this.scoringSettingSelect=$(''),t.append(this.scoringSettingSelect),this.scoringSettingSelect.append(''),this.scoringSettingSelect.append(''),this.scoringSettingSelect.append(''),this.customContainer=$('自定义计算得分的Bean ID:'),t.append(this.customContainer),this.customContainer.hide(),this.customBeanEditor=$(''),this.customContainer.append(this.customBeanEditor);var e=this;this.customBeanEditor.change(function(){e.customScoringBean=$(this).val()}),this.scoringSettingSelect.change(function(){e.scoringType=$(this).val(),"custom"===e.scoringType?e.customContainer.show():e.customContainer.hide()})}},{key:"initAssignSetting",value:function(){var t=$('
    将得分值赋给:
    ');this.container.append(t),this.assignTargetContainer=generateContainer(),t.append(this.assignTargetContainer),URule.setDomContent(this.assignTargetContainer,"请选择值类型"),this.assignTargetContainer.css({color:"blue"}),this.variableTarget=new urule.VariableValue(null,null,"Out"),this.parameterTarget=new urule.ParameterValue(null,null,"Out"),this.variableTarget.getContainer().hide(),this.parameterTarget.getContainer().hide(),t.append(this.variableTarget.getContainer()),t.append(this.parameterTarget.getContainer());var e=this;e.menu=new URule.menu.Menu({menuItems:[{label:"选择变量",onClick:function(){e.parameterTarget.getContainer().hide(),e.variableTarget.getContainer().show(),e.assignTargetType="variable",URule.setDomContent(e.assignTargetContainer,"."),e.assignTargetContainer.css({color:"white"})}},{label:"选择参数",onClick:function(){e.variableTarget.getContainer().hide(),e.parameterTarget.getContainer().show(),e.assignTargetType="parameter",URule.setDomContent(e.assignTargetContainer,"."),e.assignTargetContainer.css({color:"white"})}},{label:"不赋值",onClick:function(){e.variableTarget.getContainer().hide(),e.parameterTarget.getContainer().hide(),e.assignTargetType="none",URule.setDomContent(e.assignTargetContainer,"不赋值"),e.assignTargetContainer.css({color:"#999"})}}]}),this.assignTargetContainer.click(function(t){e.menu.show(t)})}},{key:"toXml",value:function(){if(!this.scoringType)throw"请选择得分计算方式";if(!this.assignTargetType)throw"请选择得分赋值对象";if("custom"===this.scoringType&&(!this.customScoringBean||this.customScoringBean.length<1))throw"请输入自定义计算得分的Bean ID";var t=' scoring-type="'+this.scoringType+'" assign-target-type="'+this.assignTargetType+'" ';return"variable"===this.assignTargetType?t+=this.variableTarget.toXml():"parameter"===this.assignTargetType&&(t+=this.parameterTarget.toXml()),"custom"===this.scoringType&&(t+=' custom-scoring-bean="'+this.customScoringBean+'"'),t}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n');var t=$('');this.objectContainer=$(""),this.variableCategory?URule.setDomContent(this.objectContainer,this.name+" ["+this.variableCategory+"]"):URule.setDomContent(this.objectContainer,this.name),t.append(this.objectContainer),t.append(' '),this.td.append(t),this.td.append(this.buildColResizeTrigger()),this.scoreCardTable.headerRow.append(this.td),this.initMenu([]),window._VariableValueArray.push(this),this.bindColResize()}},{key:"initMenu",value:function(t){var e=this,n=this;this.menuDef?this.menuDef.empty():(this.menuDef=$(''),this.td.append(this.menuDef),$(".dropdown-toggle").dropdown());var o=!0,i=!1,r=void 0;try{for(var A,a=t[Symbol.iterator]();!(o=(A=a.next()).done);o=!0){var s=A.value,l=!0,c=!1,u=void 0;try{for(var g,d=function(){var t=g.value;if(!e.category&&e.variableCategory&&t.name===e.variableCategory){e.category=t;var o=t.variables,i=!0,r=!1,A=void 0;try{for(var a,s=n.scoreCardTable.attributeRows[Symbol.iterator]();!(i=(a=s.next()).done);i=!0){var l=a.value;if(l.attributeCell.variableLabel){var c=!0,u=!1,d=void 0;try{for(var M,p=o[Symbol.iterator]();!(c=(M=p.next()).done);c=!0){var h=M.value;if(h.label===l.attributeCell.variableLabel&&h.name===l.attributeCell.variableName){l.attributeCell.variable=h;break}}}catch(t){u=!0,d=t}finally{try{!c&&p.return&&p.return()}finally{if(u)throw d}}l.attributeCell.refreshAttributeCellMenus(o)}}}catch(t){r=!0,A=t}finally{try{!i&&s.return&&s.return()}finally{if(r)throw A}}}var I=$('
  • '+t.name+"
  • ");e.menuDef.append(I),I.click(function(){n.category=t,URule.setDomContent(n.objectContainer,n.name+" ["+t.name+"]");var e=!0,o=!1,i=void 0;try{for(var r,A=n.scoreCardTable.attributeRows[Symbol.iterator]();!(e=(r=A.next()).done);e=!0){var a=r.value;a.attributeCell.refreshAttributeCellMenus(t.variables),a.attributeCell.variable=null,URule.setDomContent(a.attributeCell.propContainer,"请选择属性")}}catch(t){o=!0,i=t}finally{try{!e&&A.return&&A.return()}finally{if(o)throw i}}})},M=s[Symbol.iterator]();!(l=(g=M.next()).done);l=!0)d()}catch(t){c=!0,u=t}finally{try{!l&&M.return&&M.return()}finally{if(c)throw u}}}}catch(t){i=!0,r=t}finally{try{!o&&a.return&&a.return()}finally{if(i)throw r}}}},{key:"toXml",value:function(){if(!this.category)throw"请先定义属性对象";var t=' attr-col-width="'+this.width+'" attr-col-name="'+this.name+'" attr-col-category="'+this.category.name+'"';return t}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'+this.name+""),this.td.append(this.buildColResizeTrigger()),this.scoreCardTable.headerRow.append(this.td),this.bindColResize()}},{key:"toXml",value:function(){var t=' condition-col-width="'+this.width+'" condition-col-name="'+this.name+'"';return t}}]),e}(l.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function A(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var a=function(){function t(t,e){for(var n=0;n'),this.td.append(this.buildColResizeTrigger());var t=$(''+this.name+"");this.td.append(t),this.scoreCardTable.headerRow.append(this.td),this.bindColResize()}},{key:"toXml",value:function(){var t=' score-col-width="'+this.width+'" score-col-name="'+this.name+'"';return t}}]),e}(l.default);e.default=c},function(t,e,n){var o=n(498);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".col-resize-trigger{cursor:col-resize;width:2px;float:right}.attribute-operation{vertical-align:middle;font-size:12pt;margin-left:3px}",""])}]); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scriptDecisionTableEditor.bundle.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scriptDecisionTableEditor.bundle.js new file mode 100644 index 0000000..c30a546 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/js/scriptDecisionTableEditor.bundle.js @@ -0,0 +1,36 @@ +!function(t){function e(o){if(n[o])return n[o].exports;var i=n[o]={exports:{},id:o,loaded:!1};return t[o].call(i.exports,i,i.exports,e),i.loaded=!0,i.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}n(390),n(392),n(394),n(1),n(499),n(315),n(317),n(319),n(10),n(321),n(328),n(329),n(330),n(338),n(340),n(341),n(342),n(323),n(324),n(325),n(501);var i=n(370),r=o(i),a=n(14),s=o(a),l=n(41),A=o(l);$(document).ready(function(){A.default.render(s.default.createElement(r.default,null),document.getElementById("dialogContainer")),new URule.DecisionTable("container")})},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'/*!\n * Bootstrap v3.3.7 (http://getbootstrap.com)\n * Copyright 2011-2016 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n */\n/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */html{font-family:sans-serif;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}body{margin:0}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block;vertical-align:baseline}audio:not([controls]){display:none;height:0}[hidden],template{display:none}a{background-color:transparent}a:active,a:hover{outline:0}abbr[title]{border-bottom:1px dotted}b,strong{font-weight:700}dfn{font-style:italic}h1{margin:.67em 0;font-size:2em}mark{color:#000;background:#ff0}small{font-size:80%}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}img{border:0}svg:not(:root){overflow:hidden}figure{margin:1em 40px}hr{height:0;box-sizing:content-box}pre{overflow:auto}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}button,input,optgroup,select,textarea{margin:0;font:inherit;color:inherit}button{overflow:visible}button,select{text-transform:none}button,html input[type=button],input[type=reset],input[type=submit]{-webkit-appearance:button;cursor:pointer}button[disabled],html input[disabled]{cursor:default}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}input{line-height:normal}input[type=checkbox],input[type=radio]{box-sizing:border-box;padding:0}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{height:auto}input[type=search]{box-sizing:content-box;-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}fieldset{padding:.35em .625em .75em;margin:0 2px;border:1px solid silver}legend{padding:0;border:0}textarea{overflow:auto}optgroup{font-weight:700}table{border-spacing:0;border-collapse:collapse}td,th{padding:0}\n/*! Source: https://github.com/h5bp/html5-boilerplate/blob/master/src/css/main.css */@media print{*,:after,:before{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}a[href^="#"]:after,a[href^="javascript:"]:after{content:""}blockquote,pre{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}img,tr{page-break-inside:avoid}img{max-width:100%!important}h2,h3,p{orphans:3;widows:3}h2,h3{page-break-after:avoid}.navbar{display:none}.btn>.caret,.dropup>.btn>.caret{border-top-color:#000!important}.label{border:1px solid #000}.table{border-collapse:collapse!important}.table td,.table th{background-color:#fff!important}.table-bordered td,.table-bordered th{border:1px solid #ddd!important}}@font-face{font-family:Glyphicons Halflings;src:url('+n(4)+");src:url("+n(4)+"?#iefix) format('embedded-opentype'),url("+n(5)+") format('woff2'),url("+n(6)+") format('woff'),url("+n(7)+") format('truetype'),url("+n(8)+'#glyphicons_halflingsregular) format(\'svg\')}.glyphicon{position:relative;top:1px;display:inline-block;font-family:Glyphicons Halflings;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glyphicon-asterisk:before{content:"*"}.glyphicon-plus:before{content:"+"}.glyphicon-eur:before,.glyphicon-euro:before{content:"\\20AC"}.glyphicon-minus:before{content:"\\2212"}.glyphicon-cloud:before{content:"\\2601"}.glyphicon-envelope:before{content:"\\2709"}.glyphicon-pencil:before{content:"\\270F"}.glyphicon-glass:before{content:"\\E001"}.glyphicon-music:before{content:"\\E002"}.glyphicon-search:before{content:"\\E003"}.glyphicon-heart:before{content:"\\E005"}.glyphicon-star:before{content:"\\E006"}.glyphicon-star-empty:before{content:"\\E007"}.glyphicon-user:before{content:"\\E008"}.glyphicon-film:before{content:"\\E009"}.glyphicon-th-large:before{content:"\\E010"}.glyphicon-th:before{content:"\\E011"}.glyphicon-th-list:before{content:"\\E012"}.glyphicon-ok:before{content:"\\E013"}.glyphicon-remove:before{content:"\\E014"}.glyphicon-zoom-in:before{content:"\\E015"}.glyphicon-zoom-out:before{content:"\\E016"}.glyphicon-off:before{content:"\\E017"}.glyphicon-signal:before{content:"\\E018"}.glyphicon-cog:before{content:"\\E019"}.glyphicon-trash:before{content:"\\E020"}.glyphicon-home:before{content:"\\E021"}.glyphicon-file:before{content:"\\E022"}.glyphicon-time:before{content:"\\E023"}.glyphicon-road:before{content:"\\E024"}.glyphicon-download-alt:before{content:"\\E025"}.glyphicon-download:before{content:"\\E026"}.glyphicon-upload:before{content:"\\E027"}.glyphicon-inbox:before{content:"\\E028"}.glyphicon-play-circle:before{content:"\\E029"}.glyphicon-repeat:before{content:"\\E030"}.glyphicon-refresh:before{content:"\\E031"}.glyphicon-list-alt:before{content:"\\E032"}.glyphicon-lock:before{content:"\\E033"}.glyphicon-flag:before{content:"\\E034"}.glyphicon-headphones:before{content:"\\E035"}.glyphicon-volume-off:before{content:"\\E036"}.glyphicon-volume-down:before{content:"\\E037"}.glyphicon-volume-up:before{content:"\\E038"}.glyphicon-qrcode:before{content:"\\E039"}.glyphicon-barcode:before{content:"\\E040"}.glyphicon-tag:before{content:"\\E041"}.glyphicon-tags:before{content:"\\E042"}.glyphicon-book:before{content:"\\E043"}.glyphicon-bookmark:before{content:"\\E044"}.glyphicon-print:before{content:"\\E045"}.glyphicon-camera:before{content:"\\E046"}.glyphicon-font:before{content:"\\E047"}.glyphicon-bold:before{content:"\\E048"}.glyphicon-italic:before{content:"\\E049"}.glyphicon-text-height:before{content:"\\E050"}.glyphicon-text-width:before{content:"\\E051"}.glyphicon-align-left:before{content:"\\E052"}.glyphicon-align-center:before{content:"\\E053"}.glyphicon-align-right:before{content:"\\E054"}.glyphicon-align-justify:before{content:"\\E055"}.glyphicon-list:before{content:"\\E056"}.glyphicon-indent-left:before{content:"\\E057"}.glyphicon-indent-right:before{content:"\\E058"}.glyphicon-facetime-video:before{content:"\\E059"}.glyphicon-picture:before{content:"\\E060"}.glyphicon-map-marker:before{content:"\\E062"}.glyphicon-adjust:before{content:"\\E063"}.glyphicon-tint:before{content:"\\E064"}.glyphicon-edit:before{content:"\\E065"}.glyphicon-share:before{content:"\\E066"}.glyphicon-check:before{content:"\\E067"}.glyphicon-move:before{content:"\\E068"}.glyphicon-step-backward:before{content:"\\E069"}.glyphicon-fast-backward:before{content:"\\E070"}.glyphicon-backward:before{content:"\\E071"}.glyphicon-play:before{content:"\\E072"}.glyphicon-pause:before{content:"\\E073"}.glyphicon-stop:before{content:"\\E074"}.glyphicon-forward:before{content:"\\E075"}.glyphicon-fast-forward:before{content:"\\E076"}.glyphicon-step-forward:before{content:"\\E077"}.glyphicon-eject:before{content:"\\E078"}.glyphicon-chevron-left:before{content:"\\E079"}.glyphicon-chevron-right:before{content:"\\E080"}.glyphicon-plus-sign:before{content:"\\E081"}.glyphicon-minus-sign:before{content:"\\E082"}.glyphicon-remove-sign:before{content:"\\E083"}.glyphicon-ok-sign:before{content:"\\E084"}.glyphicon-question-sign:before{content:"\\E085"}.glyphicon-info-sign:before{content:"\\E086"}.glyphicon-screenshot:before{content:"\\E087"}.glyphicon-remove-circle:before{content:"\\E088"}.glyphicon-ok-circle:before{content:"\\E089"}.glyphicon-ban-circle:before{content:"\\E090"}.glyphicon-arrow-left:before{content:"\\E091"}.glyphicon-arrow-right:before{content:"\\E092"}.glyphicon-arrow-up:before{content:"\\E093"}.glyphicon-arrow-down:before{content:"\\E094"}.glyphicon-share-alt:before{content:"\\E095"}.glyphicon-resize-full:before{content:"\\E096"}.glyphicon-resize-small:before{content:"\\E097"}.glyphicon-exclamation-sign:before{content:"\\E101"}.glyphicon-gift:before{content:"\\E102"}.glyphicon-leaf:before{content:"\\E103"}.glyphicon-fire:before{content:"\\E104"}.glyphicon-eye-open:before{content:"\\E105"}.glyphicon-eye-close:before{content:"\\E106"}.glyphicon-warning-sign:before{content:"\\E107"}.glyphicon-plane:before{content:"\\E108"}.glyphicon-calendar:before{content:"\\E109"}.glyphicon-random:before{content:"\\E110"}.glyphicon-comment:before{content:"\\E111"}.glyphicon-magnet:before{content:"\\E112"}.glyphicon-chevron-up:before{content:"\\E113"}.glyphicon-chevron-down:before{content:"\\E114"}.glyphicon-retweet:before{content:"\\E115"}.glyphicon-shopping-cart:before{content:"\\E116"}.glyphicon-folder-close:before{content:"\\E117"}.glyphicon-folder-open:before{content:"\\E118"}.glyphicon-resize-vertical:before{content:"\\E119"}.glyphicon-resize-horizontal:before{content:"\\E120"}.glyphicon-hdd:before{content:"\\E121"}.glyphicon-bullhorn:before{content:"\\E122"}.glyphicon-bell:before{content:"\\E123"}.glyphicon-certificate:before{content:"\\E124"}.glyphicon-thumbs-up:before{content:"\\E125"}.glyphicon-thumbs-down:before{content:"\\E126"}.glyphicon-hand-right:before{content:"\\E127"}.glyphicon-hand-left:before{content:"\\E128"}.glyphicon-hand-up:before{content:"\\E129"}.glyphicon-hand-down:before{content:"\\E130"}.glyphicon-circle-arrow-right:before{content:"\\E131"}.glyphicon-circle-arrow-left:before{content:"\\E132"}.glyphicon-circle-arrow-up:before{content:"\\E133"}.glyphicon-circle-arrow-down:before{content:"\\E134"}.glyphicon-globe:before{content:"\\E135"}.glyphicon-wrench:before{content:"\\E136"}.glyphicon-tasks:before{content:"\\E137"}.glyphicon-filter:before{content:"\\E138"}.glyphicon-briefcase:before{content:"\\E139"}.glyphicon-fullscreen:before{content:"\\E140"}.glyphicon-dashboard:before{content:"\\E141"}.glyphicon-paperclip:before{content:"\\E142"}.glyphicon-heart-empty:before{content:"\\E143"}.glyphicon-link:before{content:"\\E144"}.glyphicon-phone:before{content:"\\E145"}.glyphicon-pushpin:before{content:"\\E146"}.glyphicon-usd:before{content:"\\E148"}.glyphicon-gbp:before{content:"\\E149"}.glyphicon-sort:before{content:"\\E150"}.glyphicon-sort-by-alphabet:before{content:"\\E151"}.glyphicon-sort-by-alphabet-alt:before{content:"\\E152"}.glyphicon-sort-by-order:before{content:"\\E153"}.glyphicon-sort-by-order-alt:before{content:"\\E154"}.glyphicon-sort-by-attributes:before{content:"\\E155"}.glyphicon-sort-by-attributes-alt:before{content:"\\E156"}.glyphicon-unchecked:before{content:"\\E157"}.glyphicon-expand:before{content:"\\E158"}.glyphicon-collapse-down:before{content:"\\E159"}.glyphicon-collapse-up:before{content:"\\E160"}.glyphicon-log-in:before{content:"\\E161"}.glyphicon-flash:before{content:"\\E162"}.glyphicon-log-out:before{content:"\\E163"}.glyphicon-new-window:before{content:"\\E164"}.glyphicon-record:before{content:"\\E165"}.glyphicon-save:before{content:"\\E166"}.glyphicon-open:before{content:"\\E167"}.glyphicon-saved:before{content:"\\E168"}.glyphicon-import:before{content:"\\E169"}.glyphicon-export:before{content:"\\E170"}.glyphicon-send:before{content:"\\E171"}.glyphicon-floppy-disk:before{content:"\\E172"}.glyphicon-floppy-saved:before{content:"\\E173"}.glyphicon-floppy-remove:before{content:"\\E174"}.glyphicon-floppy-save:before{content:"\\E175"}.glyphicon-floppy-open:before{content:"\\E176"}.glyphicon-credit-card:before{content:"\\E177"}.glyphicon-transfer:before{content:"\\E178"}.glyphicon-cutlery:before{content:"\\E179"}.glyphicon-header:before{content:"\\E180"}.glyphicon-compressed:before{content:"\\E181"}.glyphicon-earphone:before{content:"\\E182"}.glyphicon-phone-alt:before{content:"\\E183"}.glyphicon-tower:before{content:"\\E184"}.glyphicon-stats:before{content:"\\E185"}.glyphicon-sd-video:before{content:"\\E186"}.glyphicon-hd-video:before{content:"\\E187"}.glyphicon-subtitles:before{content:"\\E188"}.glyphicon-sound-stereo:before{content:"\\E189"}.glyphicon-sound-dolby:before{content:"\\E190"}.glyphicon-sound-5-1:before{content:"\\E191"}.glyphicon-sound-6-1:before{content:"\\E192"}.glyphicon-sound-7-1:before{content:"\\E193"}.glyphicon-copyright-mark:before{content:"\\E194"}.glyphicon-registration-mark:before{content:"\\E195"}.glyphicon-cloud-download:before{content:"\\E197"}.glyphicon-cloud-upload:before{content:"\\E198"}.glyphicon-tree-conifer:before{content:"\\E199"}.glyphicon-tree-deciduous:before{content:"\\E200"}.glyphicon-cd:before{content:"\\E201"}.glyphicon-save-file:before{content:"\\E202"}.glyphicon-open-file:before{content:"\\E203"}.glyphicon-level-up:before{content:"\\E204"}.glyphicon-copy:before{content:"\\E205"}.glyphicon-paste:before{content:"\\E206"}.glyphicon-alert:before{content:"\\E209"}.glyphicon-equalizer:before{content:"\\E210"}.glyphicon-king:before{content:"\\E211"}.glyphicon-queen:before{content:"\\E212"}.glyphicon-pawn:before{content:"\\E213"}.glyphicon-bishop:before{content:"\\E214"}.glyphicon-knight:before{content:"\\E215"}.glyphicon-baby-formula:before{content:"\\E216"}.glyphicon-tent:before{content:"\\26FA"}.glyphicon-blackboard:before{content:"\\E218"}.glyphicon-bed:before{content:"\\E219"}.glyphicon-apple:before{content:"\\F8FF"}.glyphicon-erase:before{content:"\\E221"}.glyphicon-hourglass:before{content:"\\231B"}.glyphicon-lamp:before{content:"\\E223"}.glyphicon-duplicate:before{content:"\\E224"}.glyphicon-piggy-bank:before{content:"\\E225"}.glyphicon-scissors:before{content:"\\E226"}.glyphicon-bitcoin:before,.glyphicon-btc:before,.glyphicon-xbt:before{content:"\\E227"}.glyphicon-jpy:before,.glyphicon-yen:before{content:"\\A5"}.glyphicon-rub:before,.glyphicon-ruble:before{content:"\\20BD"}.glyphicon-scale:before{content:"\\E230"}.glyphicon-ice-lolly:before{content:"\\E231"}.glyphicon-ice-lolly-tasted:before{content:"\\E232"}.glyphicon-education:before{content:"\\E233"}.glyphicon-option-horizontal:before{content:"\\E234"}.glyphicon-option-vertical:before{content:"\\E235"}.glyphicon-menu-hamburger:before{content:"\\E236"}.glyphicon-modal-window:before{content:"\\E237"}.glyphicon-oil:before{content:"\\E238"}.glyphicon-grain:before{content:"\\E239"}.glyphicon-sunglasses:before{content:"\\E240"}.glyphicon-text-size:before{content:"\\E241"}.glyphicon-text-color:before{content:"\\E242"}.glyphicon-text-background:before{content:"\\E243"}.glyphicon-object-align-top:before{content:"\\E244"}.glyphicon-object-align-bottom:before{content:"\\E245"}.glyphicon-object-align-horizontal:before{content:"\\E246"}.glyphicon-object-align-left:before{content:"\\E247"}.glyphicon-object-align-vertical:before{content:"\\E248"}.glyphicon-object-align-right:before{content:"\\E249"}.glyphicon-triangle-right:before{content:"\\E250"}.glyphicon-triangle-left:before{content:"\\E251"}.glyphicon-triangle-bottom:before{content:"\\E252"}.glyphicon-triangle-top:before{content:"\\E253"}.glyphicon-console:before{content:"\\E254"}.glyphicon-superscript:before{content:"\\E255"}.glyphicon-subscript:before{content:"\\E256"}.glyphicon-menu-left:before{content:"\\E257"}.glyphicon-menu-right:before{content:"\\E258"}.glyphicon-menu-down:before{content:"\\E259"}.glyphicon-menu-up:before{content:"\\E260"}*,:after,:before{box-sizing:border-box}html{font-size:10px;-webkit-tap-highlight-color:rgba(0,0,0,0)}body{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.42857143;color:#333;background-color:#fff}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit}a{color:#337ab7;text-decoration:none}a:focus,a:hover{color:#23527c;text-decoration:underline}a:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}figure{margin:0}img{vertical-align:middle}.carousel-inner>.item>a>img,.carousel-inner>.item>img,.img-responsive,.thumbnail>img,.thumbnail a>img{display:block;max-width:100%;height:auto}.img-rounded{border-radius:6px}.img-thumbnail{display:inline-block;max-width:100%;height:auto;padding:4px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:all .2s ease-in-out;transition:all .2s ease-in-out}.img-circle{border-radius:50%}hr{margin-top:20px;margin-bottom:20px;border:0;border-top:1px solid #eee}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}.sr-only-focusable:active,.sr-only-focusable:focus{position:static;width:auto;height:auto;margin:0;overflow:visible;clip:auto}[role=button]{cursor:pointer}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{font-family:inherit;font-weight:500;line-height:1.1;color:inherit}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-weight:400;line-height:1;color:#777}.h1,.h2,.h3,h1,h2,h3{margin-top:20px;margin-bottom:10px}.h1 .small,.h1 small,.h2 .small,.h2 small,.h3 .small,.h3 small,h1 .small,h1 small,h2 .small,h2 small,h3 .small,h3 small{font-size:65%}.h4,.h5,.h6,h4,h5,h6{margin-top:10px;margin-bottom:10px}.h4 .small,.h4 small,.h5 .small,.h5 small,.h6 .small,.h6 small,h4 .small,h4 small,h5 .small,h5 small,h6 .small,h6 small{font-size:75%}.h1,h1{font-size:36px}.h2,h2{font-size:30px}.h3,h3{font-size:24px}.h4,h4{font-size:18px}.h5,h5{font-size:14px}.h6,h6{font-size:12px}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:16px;font-weight:300;line-height:1.4}@media (min-width:768px){.lead{font-size:21px}}.small,small{font-size:85%}.mark,mark{padding:.2em;background-color:#fcf8e3}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}.text-justify{text-align:justify}.text-nowrap{white-space:nowrap}.text-lowercase{text-transform:lowercase}.text-uppercase{text-transform:uppercase}.text-capitalize{text-transform:capitalize}.text-muted{color:#777}.text-primary{color:#337ab7}a.text-primary:focus,a.text-primary:hover{color:#286090}.text-success{color:#3c763d}a.text-success:focus,a.text-success:hover{color:#2b542c}.text-info{color:#31708f}a.text-info:focus,a.text-info:hover{color:#245269}.text-warning{color:#8a6d3b}a.text-warning:focus,a.text-warning:hover{color:#66512c}.text-danger{color:#a94442}a.text-danger:focus,a.text-danger:hover{color:#843534}.bg-primary{color:#fff;background-color:#337ab7}a.bg-primary:focus,a.bg-primary:hover{background-color:#286090}.bg-success{background-color:#dff0d8}a.bg-success:focus,a.bg-success:hover{background-color:#c1e2b3}.bg-info{background-color:#d9edf7}a.bg-info:focus,a.bg-info:hover{background-color:#afd9ee}.bg-warning{background-color:#fcf8e3}a.bg-warning:focus,a.bg-warning:hover{background-color:#f7ecb5}.bg-danger{background-color:#f2dede}a.bg-danger:focus,a.bg-danger:hover{background-color:#e4b9b9}.page-header{padding-bottom:9px;margin:40px 0 20px;border-bottom:1px solid #eee}ol,ul{margin-top:0;margin-bottom:10px}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}.list-inline,.list-unstyled{padding-left:0;list-style:none}.list-inline{margin-left:-5px}.list-inline>li{display:inline-block;padding-right:5px;padding-left:5px}dl{margin-top:0;margin-bottom:20px}dd,dt{line-height:1.42857143}dt{font-weight:700}dd{margin-left:0}@media (min-width:768px){.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}}abbr[data-original-title],abbr[title]{cursor:help;border-bottom:1px dotted #777}.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:10px 20px;margin:0 0 20px;font-size:17.5px;border-left:5px solid #eee}blockquote ol:last-child,blockquote p:last-child,blockquote ul:last-child{margin-bottom:0}blockquote .small,blockquote footer,blockquote small{display:block;font-size:80%;line-height:1.42857143;color:#777}blockquote .small:before,blockquote footer:before,blockquote small:before{content:\'\\2014 \\A0\'}.blockquote-reverse,blockquote.pull-right{padding-right:15px;padding-left:0;text-align:right;border-right:5px solid #eee;border-left:0}.blockquote-reverse .small:before,.blockquote-reverse footer:before,.blockquote-reverse small:before,blockquote.pull-right .small:before,blockquote.pull-right footer:before,blockquote.pull-right small:before{content:\'\'}.blockquote-reverse .small:after,.blockquote-reverse footer:after,.blockquote-reverse small:after,blockquote.pull-right .small:after,blockquote.pull-right footer:after,blockquote.pull-right small:after{content:\'\\A0 \\2014\'}address{margin-bottom:20px;font-style:normal;line-height:1.42857143}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Courier New,monospace}code{color:#c7254e;background-color:#f9f2f4;border-radius:4px}code,kbd{padding:2px 4px;font-size:90%}kbd{color:#fff;background-color:#333;border-radius:3px;box-shadow:inset 0 -1px 0 rgba(0,0,0,.25)}kbd kbd{padding:0;font-size:100%;font-weight:700;box-shadow:none}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:1.42857143;color:#333;word-break:break-all;word-wrap:break-word;background-color:#f5f5f5;border:1px solid #ccc;border-radius:4px}pre code{padding:0;font-size:inherit;color:inherit;white-space:pre-wrap;background-color:transparent;border-radius:0}.pre-scrollable{max-height:340px;overflow-y:scroll}.container{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}@media (min-width:768px){.container{width:750px}}@media (min-width:992px){.container{width:970px}}@media (min-width:1200px){.container{width:1170px}}.container-fluid{padding-right:15px;padding-left:15px;margin-right:auto;margin-left:auto}.row{margin-right:-15px;margin-left:-15px}.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12,.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12,.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12,.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.col-xs-1,.col-xs-2,.col-xs-3,.col-xs-4,.col-xs-5,.col-xs-6,.col-xs-7,.col-xs-8,.col-xs-9,.col-xs-10,.col-xs-11,.col-xs-12{float:left}.col-xs-12{width:100%}.col-xs-11{width:91.66666667%}.col-xs-10{width:83.33333333%}.col-xs-9{width:75%}.col-xs-8{width:66.66666667%}.col-xs-7{width:58.33333333%}.col-xs-6{width:50%}.col-xs-5{width:41.66666667%}.col-xs-4{width:33.33333333%}.col-xs-3{width:25%}.col-xs-2{width:16.66666667%}.col-xs-1{width:8.33333333%}.col-xs-pull-12{right:100%}.col-xs-pull-11{right:91.66666667%}.col-xs-pull-10{right:83.33333333%}.col-xs-pull-9{right:75%}.col-xs-pull-8{right:66.66666667%}.col-xs-pull-7{right:58.33333333%}.col-xs-pull-6{right:50%}.col-xs-pull-5{right:41.66666667%}.col-xs-pull-4{right:33.33333333%}.col-xs-pull-3{right:25%}.col-xs-pull-2{right:16.66666667%}.col-xs-pull-1{right:8.33333333%}.col-xs-pull-0{right:auto}.col-xs-push-12{left:100%}.col-xs-push-11{left:91.66666667%}.col-xs-push-10{left:83.33333333%}.col-xs-push-9{left:75%}.col-xs-push-8{left:66.66666667%}.col-xs-push-7{left:58.33333333%}.col-xs-push-6{left:50%}.col-xs-push-5{left:41.66666667%}.col-xs-push-4{left:33.33333333%}.col-xs-push-3{left:25%}.col-xs-push-2{left:16.66666667%}.col-xs-push-1{left:8.33333333%}.col-xs-push-0{left:auto}.col-xs-offset-12{margin-left:100%}.col-xs-offset-11{margin-left:91.66666667%}.col-xs-offset-10{margin-left:83.33333333%}.col-xs-offset-9{margin-left:75%}.col-xs-offset-8{margin-left:66.66666667%}.col-xs-offset-7{margin-left:58.33333333%}.col-xs-offset-6{margin-left:50%}.col-xs-offset-5{margin-left:41.66666667%}.col-xs-offset-4{margin-left:33.33333333%}.col-xs-offset-3{margin-left:25%}.col-xs-offset-2{margin-left:16.66666667%}.col-xs-offset-1{margin-left:8.33333333%}.col-xs-offset-0{margin-left:0}@media (min-width:768px){.col-sm-1,.col-sm-2,.col-sm-3,.col-sm-4,.col-sm-5,.col-sm-6,.col-sm-7,.col-sm-8,.col-sm-9,.col-sm-10,.col-sm-11,.col-sm-12{float:left}.col-sm-12{width:100%}.col-sm-11{width:91.66666667%}.col-sm-10{width:83.33333333%}.col-sm-9{width:75%}.col-sm-8{width:66.66666667%}.col-sm-7{width:58.33333333%}.col-sm-6{width:50%}.col-sm-5{width:41.66666667%}.col-sm-4{width:33.33333333%}.col-sm-3{width:25%}.col-sm-2{width:16.66666667%}.col-sm-1{width:8.33333333%}.col-sm-pull-12{right:100%}.col-sm-pull-11{right:91.66666667%}.col-sm-pull-10{right:83.33333333%}.col-sm-pull-9{right:75%}.col-sm-pull-8{right:66.66666667%}.col-sm-pull-7{right:58.33333333%}.col-sm-pull-6{right:50%}.col-sm-pull-5{right:41.66666667%}.col-sm-pull-4{right:33.33333333%}.col-sm-pull-3{right:25%}.col-sm-pull-2{right:16.66666667%}.col-sm-pull-1{right:8.33333333%}.col-sm-pull-0{right:auto}.col-sm-push-12{left:100%}.col-sm-push-11{left:91.66666667%}.col-sm-push-10{left:83.33333333%}.col-sm-push-9{left:75%}.col-sm-push-8{left:66.66666667%}.col-sm-push-7{left:58.33333333%}.col-sm-push-6{left:50%}.col-sm-push-5{left:41.66666667%}.col-sm-push-4{left:33.33333333%}.col-sm-push-3{left:25%}.col-sm-push-2{left:16.66666667%}.col-sm-push-1{left:8.33333333%}.col-sm-push-0{left:auto}.col-sm-offset-12{margin-left:100%}.col-sm-offset-11{margin-left:91.66666667%}.col-sm-offset-10{margin-left:83.33333333%}.col-sm-offset-9{margin-left:75%}.col-sm-offset-8{margin-left:66.66666667%}.col-sm-offset-7{margin-left:58.33333333%}.col-sm-offset-6{margin-left:50%}.col-sm-offset-5{margin-left:41.66666667%}.col-sm-offset-4{margin-left:33.33333333%}.col-sm-offset-3{margin-left:25%}.col-sm-offset-2{margin-left:16.66666667%}.col-sm-offset-1{margin-left:8.33333333%}.col-sm-offset-0{margin-left:0}}@media (min-width:992px){.col-md-1,.col-md-2,.col-md-3,.col-md-4,.col-md-5,.col-md-6,.col-md-7,.col-md-8,.col-md-9,.col-md-10,.col-md-11,.col-md-12{float:left}.col-md-12{width:100%}.col-md-11{width:91.66666667%}.col-md-10{width:83.33333333%}.col-md-9{width:75%}.col-md-8{width:66.66666667%}.col-md-7{width:58.33333333%}.col-md-6{width:50%}.col-md-5{width:41.66666667%}.col-md-4{width:33.33333333%}.col-md-3{width:25%}.col-md-2{width:16.66666667%}.col-md-1{width:8.33333333%}.col-md-pull-12{right:100%}.col-md-pull-11{right:91.66666667%}.col-md-pull-10{right:83.33333333%}.col-md-pull-9{right:75%}.col-md-pull-8{right:66.66666667%}.col-md-pull-7{right:58.33333333%}.col-md-pull-6{right:50%}.col-md-pull-5{right:41.66666667%}.col-md-pull-4{right:33.33333333%}.col-md-pull-3{right:25%}.col-md-pull-2{right:16.66666667%}.col-md-pull-1{right:8.33333333%}.col-md-pull-0{right:auto}.col-md-push-12{left:100%}.col-md-push-11{left:91.66666667%}.col-md-push-10{left:83.33333333%}.col-md-push-9{left:75%}.col-md-push-8{left:66.66666667%}.col-md-push-7{left:58.33333333%}.col-md-push-6{left:50%}.col-md-push-5{left:41.66666667%}.col-md-push-4{left:33.33333333%}.col-md-push-3{left:25%}.col-md-push-2{left:16.66666667%}.col-md-push-1{left:8.33333333%}.col-md-push-0{left:auto}.col-md-offset-12{margin-left:100%}.col-md-offset-11{margin-left:91.66666667%}.col-md-offset-10{margin-left:83.33333333%}.col-md-offset-9{margin-left:75%}.col-md-offset-8{margin-left:66.66666667%}.col-md-offset-7{margin-left:58.33333333%}.col-md-offset-6{margin-left:50%}.col-md-offset-5{margin-left:41.66666667%}.col-md-offset-4{margin-left:33.33333333%}.col-md-offset-3{margin-left:25%}.col-md-offset-2{margin-left:16.66666667%}.col-md-offset-1{margin-left:8.33333333%}.col-md-offset-0{margin-left:0}}@media (min-width:1200px){.col-lg-1,.col-lg-2,.col-lg-3,.col-lg-4,.col-lg-5,.col-lg-6,.col-lg-7,.col-lg-8,.col-lg-9,.col-lg-10,.col-lg-11,.col-lg-12{float:left}.col-lg-12{width:100%}.col-lg-11{width:91.66666667%}.col-lg-10{width:83.33333333%}.col-lg-9{width:75%}.col-lg-8{width:66.66666667%}.col-lg-7{width:58.33333333%}.col-lg-6{width:50%}.col-lg-5{width:41.66666667%}.col-lg-4{width:33.33333333%}.col-lg-3{width:25%}.col-lg-2{width:16.66666667%}.col-lg-1{width:8.33333333%}.col-lg-pull-12{right:100%}.col-lg-pull-11{right:91.66666667%}.col-lg-pull-10{right:83.33333333%}.col-lg-pull-9{right:75%}.col-lg-pull-8{right:66.66666667%}.col-lg-pull-7{right:58.33333333%}.col-lg-pull-6{right:50%}.col-lg-pull-5{right:41.66666667%}.col-lg-pull-4{right:33.33333333%}.col-lg-pull-3{right:25%}.col-lg-pull-2{right:16.66666667%}.col-lg-pull-1{right:8.33333333%}.col-lg-pull-0{right:auto}.col-lg-push-12{left:100%}.col-lg-push-11{left:91.66666667%}.col-lg-push-10{left:83.33333333%}.col-lg-push-9{left:75%}.col-lg-push-8{left:66.66666667%}.col-lg-push-7{left:58.33333333%}.col-lg-push-6{left:50%}.col-lg-push-5{left:41.66666667%}.col-lg-push-4{left:33.33333333%}.col-lg-push-3{left:25%}.col-lg-push-2{left:16.66666667%}.col-lg-push-1{left:8.33333333%}.col-lg-push-0{left:auto}.col-lg-offset-12{margin-left:100%}.col-lg-offset-11{margin-left:91.66666667%}.col-lg-offset-10{margin-left:83.33333333%}.col-lg-offset-9{margin-left:75%}.col-lg-offset-8{margin-left:66.66666667%}.col-lg-offset-7{margin-left:58.33333333%}.col-lg-offset-6{margin-left:50%}.col-lg-offset-5{margin-left:41.66666667%}.col-lg-offset-4{margin-left:33.33333333%}.col-lg-offset-3{margin-left:25%}.col-lg-offset-2{margin-left:16.66666667%}.col-lg-offset-1{margin-left:8.33333333%}.col-lg-offset-0{margin-left:0}}table{background-color:transparent}caption{padding-top:8px;padding-bottom:8px;color:#777}caption,th{text-align:left}.table{width:100%;max-width:100%;margin-bottom:20px}.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td,.table>thead>tr>th{padding:8px;line-height:1.42857143;vertical-align:top;border-top:1px solid #ddd}.table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.table>caption+thead>tr:first-child>td,.table>caption+thead>tr:first-child>th,.table>colgroup+thead>tr:first-child>td,.table>colgroup+thead>tr:first-child>th,.table>thead:first-child>tr:first-child>td,.table>thead:first-child>tr:first-child>th{border-top:0}.table>tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed>tbody>tr>td,.table-condensed>tbody>tr>th,.table-condensed>tfoot>tr>td,.table-condensed>tfoot>tr>th,.table-condensed>thead>tr>td,.table-condensed>thead>tr>th{padding:5px}.table-bordered,.table-bordered>tbody>tr>td,.table-bordered>tbody>tr>th,.table-bordered>tfoot>tr>td,.table-bordered>tfoot>tr>th,.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border:1px solid #ddd}.table-bordered>thead>tr>td,.table-bordered>thead>tr>th{border-bottom-width:2px}.table-striped>tbody>tr:nth-of-type(odd){background-color:#f9f9f9}.table-hover>tbody>tr:hover{background-color:#f5f5f5}table col[class*=col-]{position:static;display:table-column;float:none}table td[class*=col-],table th[class*=col-]{position:static;display:table-cell;float:none}.table>tbody>tr.active>td,.table>tbody>tr.active>th,.table>tbody>tr>td.active,.table>tbody>tr>th.active,.table>tfoot>tr.active>td,.table>tfoot>tr.active>th,.table>tfoot>tr>td.active,.table>tfoot>tr>th.active,.table>thead>tr.active>td,.table>thead>tr.active>th,.table>thead>tr>td.active,.table>thead>tr>th.active{background-color:#f5f5f5}.table-hover>tbody>tr.active:hover>td,.table-hover>tbody>tr.active:hover>th,.table-hover>tbody>tr:hover>.active,.table-hover>tbody>tr>td.active:hover,.table-hover>tbody>tr>th.active:hover{background-color:#e8e8e8}.table>tbody>tr.success>td,.table>tbody>tr.success>th,.table>tbody>tr>td.success,.table>tbody>tr>th.success,.table>tfoot>tr.success>td,.table>tfoot>tr.success>th,.table>tfoot>tr>td.success,.table>tfoot>tr>th.success,.table>thead>tr.success>td,.table>thead>tr.success>th,.table>thead>tr>td.success,.table>thead>tr>th.success{background-color:#dff0d8}.table-hover>tbody>tr.success:hover>td,.table-hover>tbody>tr.success:hover>th,.table-hover>tbody>tr:hover>.success,.table-hover>tbody>tr>td.success:hover,.table-hover>tbody>tr>th.success:hover{background-color:#d0e9c6}.table>tbody>tr.info>td,.table>tbody>tr.info>th,.table>tbody>tr>td.info,.table>tbody>tr>th.info,.table>tfoot>tr.info>td,.table>tfoot>tr.info>th,.table>tfoot>tr>td.info,.table>tfoot>tr>th.info,.table>thead>tr.info>td,.table>thead>tr.info>th,.table>thead>tr>td.info,.table>thead>tr>th.info{background-color:#d9edf7}.table-hover>tbody>tr.info:hover>td,.table-hover>tbody>tr.info:hover>th,.table-hover>tbody>tr:hover>.info,.table-hover>tbody>tr>td.info:hover,.table-hover>tbody>tr>th.info:hover{background-color:#c4e3f3}.table>tbody>tr.warning>td,.table>tbody>tr.warning>th,.table>tbody>tr>td.warning,.table>tbody>tr>th.warning,.table>tfoot>tr.warning>td,.table>tfoot>tr.warning>th,.table>tfoot>tr>td.warning,.table>tfoot>tr>th.warning,.table>thead>tr.warning>td,.table>thead>tr.warning>th,.table>thead>tr>td.warning,.table>thead>tr>th.warning{background-color:#fcf8e3}.table-hover>tbody>tr.warning:hover>td,.table-hover>tbody>tr.warning:hover>th,.table-hover>tbody>tr:hover>.warning,.table-hover>tbody>tr>td.warning:hover,.table-hover>tbody>tr>th.warning:hover{background-color:#faf2cc}.table>tbody>tr.danger>td,.table>tbody>tr.danger>th,.table>tbody>tr>td.danger,.table>tbody>tr>th.danger,.table>tfoot>tr.danger>td,.table>tfoot>tr.danger>th,.table>tfoot>tr>td.danger,.table>tfoot>tr>th.danger,.table>thead>tr.danger>td,.table>thead>tr.danger>th,.table>thead>tr>td.danger,.table>thead>tr>th.danger{background-color:#f2dede}.table-hover>tbody>tr.danger:hover>td,.table-hover>tbody>tr.danger:hover>th,.table-hover>tbody>tr:hover>.danger,.table-hover>tbody>tr>td.danger:hover,.table-hover>tbody>tr>th.danger:hover{background-color:#ebcccc}.table-responsive{min-height:.01%;overflow-x:auto}@media screen and (max-width:767px){.table-responsive{width:100%;margin-bottom:15px;overflow-y:hidden;-ms-overflow-style:-ms-autohiding-scrollbar;border:1px solid #ddd}.table-responsive>.table{margin-bottom:0}.table-responsive>.table>tbody>tr>td,.table-responsive>.table>tbody>tr>th,.table-responsive>.table>tfoot>tr>td,.table-responsive>.table>tfoot>tr>th,.table-responsive>.table>thead>tr>td,.table-responsive>.table>thead>tr>th{white-space:nowrap}.table-responsive>.table-bordered{border:0}.table-responsive>.table-bordered>tbody>tr>td:first-child,.table-responsive>.table-bordered>tbody>tr>th:first-child,.table-responsive>.table-bordered>tfoot>tr>td:first-child,.table-responsive>.table-bordered>tfoot>tr>th:first-child,.table-responsive>.table-bordered>thead>tr>td:first-child,.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.table-responsive>.table-bordered>tbody>tr>td:last-child,.table-responsive>.table-bordered>tbody>tr>th:last-child,.table-responsive>.table-bordered>tfoot>tr>td:last-child,.table-responsive>.table-bordered>tfoot>tr>th:last-child,.table-responsive>.table-bordered>thead>tr>td:last-child,.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.table-responsive>.table-bordered>tbody>tr:last-child>td,.table-responsive>.table-bordered>tbody>tr:last-child>th,.table-responsive>.table-bordered>tfoot>tr:last-child>td,.table-responsive>.table-bordered>tfoot>tr:last-child>th{border-bottom:0}}fieldset{min-width:0;margin:0}fieldset,legend{padding:0;border:0}legend{display:block;width:100%;margin-bottom:20px;font-size:21px;line-height:inherit;color:#333;border-bottom:1px solid #e5e5e5}label{display:inline-block;max-width:100%;margin-bottom:5px;font-weight:700}input[type=search]{box-sizing:border-box}input[type=checkbox],input[type=radio]{margin:4px 0 0;margin-top:1px\\9;line-height:normal}input[type=file]{display:block}input[type=range]{display:block;width:100%}select[multiple],select[size]{height:auto}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}output{padding-top:7px}.form-control,output{display:block;font-size:14px;line-height:1.42857143;color:#555}.form-control{width:100%;height:34px;padding:6px 12px;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075);-webkit-transition:border-color .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out}.form-control:focus{border-color:#66afe9;outline:0;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(102,175,233,.6)}.form-control::-moz-placeholder{color:#999;opacity:1}.form-control:-ms-input-placeholder{color:#999}.form-control::-webkit-input-placeholder{color:#999}.form-control::-ms-expand{background-color:transparent;border:0}.form-control[disabled],.form-control[readonly],fieldset[disabled] .form-control{background-color:#eee;opacity:1}.form-control[disabled],fieldset[disabled] .form-control{cursor:not-allowed}textarea.form-control{height:auto}input[type=search]{-webkit-appearance:none}@media screen and (-webkit-min-device-pixel-ratio:0){input[type=date].form-control,input[type=datetime-local].form-control,input[type=month].form-control,input[type=time].form-control{line-height:34px}.input-group-sm input[type=date],.input-group-sm input[type=datetime-local],.input-group-sm input[type=month],.input-group-sm input[type=time],input[type=date].input-sm,input[type=datetime-local].input-sm,input[type=month].input-sm,input[type=time].input-sm{line-height:30px}.input-group-lg input[type=date],.input-group-lg input[type=datetime-local],.input-group-lg input[type=month],.input-group-lg input[type=time],input[type=date].input-lg,input[type=datetime-local].input-lg,input[type=month].input-lg,input[type=time].input-lg{line-height:46px}}.form-group{margin-bottom:15px}.checkbox,.radio{position:relative;display:block;margin-top:10px;margin-bottom:10px}.checkbox label,.radio label{min-height:20px;padding-left:20px;margin-bottom:0;font-weight:400;cursor:pointer}.checkbox-inline input[type=checkbox],.checkbox input[type=checkbox],.radio-inline input[type=radio],.radio input[type=radio]{position:absolute;margin-top:4px\\9;margin-left:-20px}.checkbox+.checkbox,.radio+.radio{margin-top:-5px}.checkbox-inline,.radio-inline{position:relative;display:inline-block;padding-left:20px;margin-bottom:0;font-weight:400;vertical-align:middle;cursor:pointer}.checkbox-inline+.checkbox-inline,.radio-inline+.radio-inline{margin-top:0;margin-left:10px}.checkbox-inline.disabled,.checkbox.disabled label,.radio-inline.disabled,.radio.disabled label,fieldset[disabled] .checkbox-inline,fieldset[disabled] .checkbox label,fieldset[disabled] .radio-inline,fieldset[disabled] .radio label,fieldset[disabled] input[type=checkbox],fieldset[disabled] input[type=radio],input[type=checkbox].disabled,input[type=checkbox][disabled],input[type=radio].disabled,input[type=radio][disabled]{cursor:not-allowed}.form-control-static{min-height:34px;padding-top:7px;padding-bottom:7px;margin-bottom:0}.form-control-static.input-lg,.form-control-static.input-sm{padding-right:0;padding-left:0}.input-sm{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-sm{height:30px;line-height:30px}select[multiple].input-sm,textarea.input-sm{height:auto}.form-group-sm .form-control{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.form-group-sm select.form-control{height:30px;line-height:30px}.form-group-sm select[multiple].form-control,.form-group-sm textarea.form-control{height:auto}.form-group-sm .form-control-static{height:30px;min-height:32px;padding:6px 10px;font-size:12px;line-height:1.5}.input-lg{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-lg{height:46px;line-height:46px}select[multiple].input-lg,textarea.input-lg{height:auto}.form-group-lg .form-control{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.form-group-lg select.form-control{height:46px;line-height:46px}.form-group-lg select[multiple].form-control,.form-group-lg textarea.form-control{height:auto}.form-group-lg .form-control-static{height:46px;min-height:38px;padding:11px 16px;font-size:18px;line-height:1.3333333}.has-feedback{position:relative}.has-feedback .form-control{padding-right:42.5px}.form-control-feedback{position:absolute;top:0;right:0;z-index:2;display:block;width:34px;height:34px;line-height:34px;text-align:center;pointer-events:none}.form-group-lg .form-control+.form-control-feedback,.input-group-lg+.form-control-feedback,.input-lg+.form-control-feedback{width:46px;height:46px;line-height:46px}.form-group-sm .form-control+.form-control-feedback,.input-group-sm+.form-control-feedback,.input-sm+.form-control-feedback{width:30px;height:30px;line-height:30px}.has-success .checkbox,.has-success .checkbox-inline,.has-success.checkbox-inline label,.has-success.checkbox label,.has-success .control-label,.has-success .help-block,.has-success .radio,.has-success .radio-inline,.has-success.radio-inline label,.has-success.radio label{color:#3c763d}.has-success .form-control{border-color:#3c763d;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-success .form-control:focus{border-color:#2b542c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #67b168}.has-success .input-group-addon{color:#3c763d;background-color:#dff0d8;border-color:#3c763d}.has-success .form-control-feedback{color:#3c763d}.has-warning .checkbox,.has-warning .checkbox-inline,.has-warning.checkbox-inline label,.has-warning.checkbox label,.has-warning .control-label,.has-warning .help-block,.has-warning .radio,.has-warning .radio-inline,.has-warning.radio-inline label,.has-warning.radio label{color:#8a6d3b}.has-warning .form-control{border-color:#8a6d3b;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-warning .form-control:focus{border-color:#66512c;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #c0a16b}.has-warning .input-group-addon{color:#8a6d3b;background-color:#fcf8e3;border-color:#8a6d3b}.has-warning .form-control-feedback{color:#8a6d3b}.has-error .checkbox,.has-error .checkbox-inline,.has-error.checkbox-inline label,.has-error.checkbox label,.has-error .control-label,.has-error .help-block,.has-error .radio,.has-error .radio-inline,.has-error.radio-inline label,.has-error.radio label{color:#a94442}.has-error .form-control{border-color:#a94442;box-shadow:inset 0 1px 1px rgba(0,0,0,.075)}.has-error .form-control:focus{border-color:#843534;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 6px #ce8483}.has-error .input-group-addon{color:#a94442;background-color:#f2dede;border-color:#a94442}.has-error .form-control-feedback{color:#a94442}.has-feedback label~.form-control-feedback{top:25px}.has-feedback label.sr-only~.form-control-feedback{top:0}.help-block{display:block;margin-top:5px;margin-bottom:10px;color:#737373}@media (min-width:768px){.form-inline .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.form-inline .form-control{display:inline-block;width:auto;vertical-align:middle}.form-inline .form-control-static{display:inline-block}.form-inline .input-group{display:inline-table;vertical-align:middle}.form-inline .input-group .form-control,.form-inline .input-group .input-group-addon,.form-inline .input-group .input-group-btn{width:auto}.form-inline .input-group>.form-control{width:100%}.form-inline .control-label{margin-bottom:0;vertical-align:middle}.form-inline .checkbox,.form-inline .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.form-inline .checkbox label,.form-inline .radio label{padding-left:0}.form-inline .checkbox input[type=checkbox],.form-inline .radio input[type=radio]{position:relative;margin-left:0}.form-inline .has-feedback .form-control-feedback{top:0}}.form-horizontal .checkbox,.form-horizontal .checkbox-inline,.form-horizontal .radio,.form-horizontal .radio-inline{padding-top:7px;margin-top:0;margin-bottom:0}.form-horizontal .checkbox,.form-horizontal .radio{min-height:27px}.form-horizontal .form-group{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.form-horizontal .control-label{padding-top:7px;margin-bottom:0;text-align:right}}.form-horizontal .has-feedback .form-control-feedback{right:15px}@media (min-width:768px){.form-horizontal .form-group-lg .control-label{padding-top:11px;font-size:18px}}@media (min-width:768px){.form-horizontal .form-group-sm .control-label{padding-top:6px;font-size:12px}}.btn{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px}.btn.active.focus,.btn.active:focus,.btn.focus,.btn:active.focus,.btn:active:focus,.btn:focus{outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.focus,.btn:focus,.btn:hover{color:#333;text-decoration:none}.btn.active,.btn:active{background-image:none;outline:0;box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn.disabled,.btn[disabled],fieldset[disabled] .btn{cursor:not-allowed;filter:alpha(opacity=65);box-shadow:none;opacity:.65}a.btn.disabled,fieldset[disabled] a.btn{pointer-events:none}.btn-default{color:#333;background-color:#fff;border-color:#ccc}.btn-default.focus,.btn-default:focus{color:#333;background-color:#e6e6e6;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.btn-default:hover,.open>.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.active,.btn-default:active,.open>.dropdown-toggle.btn-default{background-image:none}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary.active,.btn-primary:active,.btn-primary:hover,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{background-image:none}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success.active,.btn-success:active,.btn-success:hover,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{background-image:none}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info.active,.btn-info:active,.btn-info:hover,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{background-image:none}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.btn-warning:hover,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{background-image:none}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger.active,.btn-danger:active,.btn-danger:hover,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{background-image:none}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-timing-function:ease;transition-timing-function:ease;-webkit-transition-duration:.35s;transition-duration:.35s;-webkit-transition-property:height,visibility;transition-property:height,visibility}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio],[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group-addon,.input-group-btn,.input-group .form-control{display:table-cell}.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child),.input-group .form-control:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle),.input-group .form-control:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle,.input-group .form-control:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.input-group-addon:last-child{border-left:0}.input-group-btn{font-size:0;white-space:nowrap}.input-group-btn,.input-group-btn>.btn{position:relative}.input-group-btn>.btn+.btn{margin-left:-1px}.input-group-btn>.btn:active,.input-group-btn>.btn:focus,.input-group-btn>.btn:hover{z-index:2}.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group{margin-right:-1px}.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group{z-index:2;margin-left:-1px}.nav{padding-left:0;margin-bottom:0;list-style:none}.nav>li,.nav>li>a{position:relative;display:block}.nav>li>a{padding:10px 15px}.nav>li>a:focus,.nav>li>a:hover{text-decoration:none;background-color:#eee}.nav>li.disabled>a{color:#777}.nav>li.disabled>a:focus,.nav>li.disabled>a:hover{color:#777;text-decoration:none;cursor:not-allowed;background-color:transparent}.nav .open>a,.nav .open>a:focus,.nav .open>a:hover{background-color:#eee;border-color:#337ab7}.nav .nav-divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.nav>li>a>img{max-width:none}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{float:left;margin-bottom:-1px}.nav-tabs>li>a{margin-right:2px;line-height:1.42857143;border:1px solid transparent;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover{border-color:#eee #eee #ddd}.nav-tabs>li.active>a,.nav-tabs>li.active>a:focus,.nav-tabs>li.active>a:hover{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-tabs.nav-justified{width:100%;border-bottom:0}.nav-tabs.nav-justified>li{float:none}.nav-tabs.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-tabs.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-tabs.nav-justified>li{display:table-cell;width:1%}.nav-tabs.nav-justified>li>a{margin-bottom:0}}.nav-tabs.nav-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs.nav-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs.nav-justified>.active>a,.nav-tabs.nav-justified>.active>a:focus,.nav-tabs.nav-justified>.active>a:hover{border-bottom-color:#fff}}.nav-pills>li{float:left}.nav-pills>li>a{border-radius:4px}.nav-pills>li+li{margin-left:2px}.nav-pills>li.active>a,.nav-pills>li.active>a:focus,.nav-pills>li.active>a:hover{color:#fff;background-color:#337ab7}.nav-stacked>li{float:none}.nav-stacked>li+li{margin-top:2px;margin-left:0}.nav-justified{width:100%}.nav-justified>li{float:none}.nav-justified>li>a{margin-bottom:5px;text-align:center}.nav-justified>.dropdown .dropdown-menu{top:auto;left:auto}@media (min-width:768px){.nav-justified>li{display:table-cell;width:1%}.nav-justified>li>a{margin-bottom:0}}.nav-tabs-justified{border-bottom:0}.nav-tabs-justified>li>a{margin-right:0;border-radius:4px}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border:1px solid #ddd}@media (min-width:768px){.nav-tabs-justified>li>a{border-bottom:1px solid #ddd;border-radius:4px 4px 0 0}.nav-tabs-justified>.active>a,.nav-tabs-justified>.active>a:focus,.nav-tabs-justified>.active>a:hover{border-bottom-color:#fff}}.tab-content>.tab-pane{display:none}.tab-content>.active{display:block}.nav-tabs .dropdown-menu{margin-top:-1px;border-top-left-radius:0;border-top-right-radius:0}.navbar{position:relative;min-height:50px;margin-bottom:20px;border:1px solid transparent}@media (min-width:768px){.navbar{border-radius:4px}}@media (min-width:768px){.navbar-header{float:left}}.navbar-collapse{padding-right:15px;padding-left:15px;overflow-x:visible;-webkit-overflow-scrolling:touch;border-top:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1)}.navbar-collapse.in{overflow-y:auto}@media (min-width:768px){.navbar-collapse{width:auto;border-top:0;box-shadow:none}.navbar-collapse.collapse{display:block!important;height:auto!important;padding-bottom:0;overflow:visible!important}.navbar-collapse.in{overflow-y:visible}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse,.navbar-static-top .navbar-collapse{padding-right:0;padding-left:0}}.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:340px}@media (max-device-width:480px) and (orientation:landscape){.navbar-fixed-bottom .navbar-collapse,.navbar-fixed-top .navbar-collapse{max-height:200px}}.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:-15px;margin-left:-15px}@media (min-width:768px){.container-fluid>.navbar-collapse,.container-fluid>.navbar-header,.container>.navbar-collapse,.container>.navbar-header{margin-right:0;margin-left:0}}.navbar-static-top{z-index:1000;border-width:0 0 1px}@media (min-width:768px){.navbar-static-top{border-radius:0}}.navbar-fixed-bottom,.navbar-fixed-top{position:fixed;right:0;left:0;z-index:1030}@media (min-width:768px){.navbar-fixed-bottom,.navbar-fixed-top{border-radius:0}}.navbar-fixed-top{top:0;border-width:0 0 1px}.navbar-fixed-bottom{bottom:0;margin-bottom:0;border-width:1px 0 0}.navbar-brand{float:left;height:50px;padding:15px;font-size:18px;line-height:20px}.navbar-brand:focus,.navbar-brand:hover{text-decoration:none}.navbar-brand>img{display:block}@media (min-width:768px){.navbar>.container-fluid .navbar-brand,.navbar>.container .navbar-brand{margin-left:-15px}}.navbar-toggle{position:relative;float:right;padding:9px 10px;margin-top:8px;margin-right:15px;margin-bottom:8px;background-color:transparent;background-image:none;border:1px solid transparent;border-radius:4px}.navbar-toggle:focus{outline:0}.navbar-toggle .icon-bar{display:block;width:22px;height:2px;border-radius:1px}.navbar-toggle .icon-bar+.icon-bar{margin-top:4px}@media (min-width:768px){.navbar-toggle{display:none}}.navbar-nav{margin:7.5px -15px}.navbar-nav>li>a{padding-top:10px;padding-bottom:10px;line-height:20px}@media (max-width:767px){.navbar-nav .open .dropdown-menu{position:static;float:none;width:auto;margin-top:0;background-color:transparent;border:0;box-shadow:none}.navbar-nav .open .dropdown-menu .dropdown-header,.navbar-nav .open .dropdown-menu>li>a{padding:5px 15px 5px 25px}.navbar-nav .open .dropdown-menu>li>a{line-height:20px}.navbar-nav .open .dropdown-menu>li>a:focus,.navbar-nav .open .dropdown-menu>li>a:hover{background-image:none}}@media (min-width:768px){.navbar-nav{float:left;margin:0}.navbar-nav>li{float:left}.navbar-nav>li>a{padding-top:15px;padding-bottom:15px}}.navbar-form{padding:10px 15px;margin:8px -15px;border-top:1px solid transparent;border-bottom:1px solid transparent;box-shadow:inset 0 1px 0 hsla(0,0%,100%,.1),0 1px 0 hsla(0,0%,100%,.1)}@media (min-width:768px){.navbar-form .form-group{display:inline-block;margin-bottom:0;vertical-align:middle}.navbar-form .form-control{display:inline-block;width:auto;vertical-align:middle}.navbar-form .form-control-static{display:inline-block}.navbar-form .input-group{display:inline-table;vertical-align:middle}.navbar-form .input-group .form-control,.navbar-form .input-group .input-group-addon,.navbar-form .input-group .input-group-btn{width:auto}.navbar-form .input-group>.form-control{width:100%}.navbar-form .control-label{margin-bottom:0;vertical-align:middle}.navbar-form .checkbox,.navbar-form .radio{display:inline-block;margin-top:0;margin-bottom:0;vertical-align:middle}.navbar-form .checkbox label,.navbar-form .radio label{padding-left:0}.navbar-form .checkbox input[type=checkbox],.navbar-form .radio input[type=radio]{position:relative;margin-left:0}.navbar-form .has-feedback .form-control-feedback{top:0}}@media (max-width:767px){.navbar-form .form-group{margin-bottom:5px}.navbar-form .form-group:last-child{margin-bottom:0}}@media (min-width:768px){.navbar-form{width:auto;padding-top:0;padding-bottom:0;margin-right:0;margin-left:0;border:0;box-shadow:none}}.navbar-nav>li>.dropdown-menu{margin-top:0;border-top-left-radius:0;border-top-right-radius:0}.navbar-fixed-bottom .navbar-nav>li>.dropdown-menu{margin-bottom:0;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.navbar-btn{margin-top:8px;margin-bottom:8px}.navbar-btn.btn-sm{margin-top:10px;margin-bottom:10px}.navbar-btn.btn-xs{margin-top:14px;margin-bottom:14px}.navbar-text{margin-top:15px;margin-bottom:15px}@media (min-width:768px){.navbar-text{float:left;margin-right:15px;margin-left:15px}}@media (min-width:768px){.navbar-left{float:left!important}.navbar-right{float:right!important;margin-right:-15px}.navbar-right~.navbar-right{margin-right:0}}.navbar-default{background-color:#f8f8f8;border-color:#e7e7e7}.navbar-default .navbar-brand{color:#777}.navbar-default .navbar-brand:focus,.navbar-default .navbar-brand:hover{color:#5e5e5e;background-color:transparent}.navbar-default .navbar-nav>li>a,.navbar-default .navbar-text{color:#777}.navbar-default .navbar-nav>li>a:focus,.navbar-default .navbar-nav>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.active>a:focus,.navbar-default .navbar-nav>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav>.disabled>a,.navbar-default .navbar-nav>.disabled>a:focus,.navbar-default .navbar-nav>.disabled>a:hover{color:#ccc;background-color:transparent}.navbar-default .navbar-toggle{border-color:#ddd}.navbar-default .navbar-toggle:focus,.navbar-default .navbar-toggle:hover{background-color:#ddd}.navbar-default .navbar-toggle .icon-bar{background-color:#888}.navbar-default .navbar-collapse,.navbar-default .navbar-form{border-color:#e7e7e7}.navbar-default .navbar-nav>.open>a,.navbar-default .navbar-nav>.open>a:focus,.navbar-default .navbar-nav>.open>a:hover{color:#555;background-color:#e7e7e7}@media (max-width:767px){.navbar-default .navbar-nav .open .dropdown-menu>li>a{color:#777}.navbar-default .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>li>a:hover{color:#333;background-color:transparent}.navbar-default .navbar-nav .open .dropdown-menu>.active>a,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.active>a:hover{color:#555;background-color:#e7e7e7}.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-default .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#ccc;background-color:transparent}}.navbar-default .navbar-link{color:#777}.navbar-default .navbar-link:hover{color:#333}.navbar-default .btn-link{color:#777}.navbar-default .btn-link:focus,.navbar-default .btn-link:hover{color:#333}.navbar-default .btn-link[disabled]:focus,.navbar-default .btn-link[disabled]:hover,fieldset[disabled] .navbar-default .btn-link:focus,fieldset[disabled] .navbar-default .btn-link:hover{color:#ccc}.navbar-inverse{background-color:#222;border-color:#080808}.navbar-inverse .navbar-brand{color:#9d9d9d}.navbar-inverse .navbar-brand:focus,.navbar-inverse .navbar-brand:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>li>a,.navbar-inverse .navbar-text{color:#9d9d9d}.navbar-inverse .navbar-nav>li>a:focus,.navbar-inverse .navbar-nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.active>a:focus,.navbar-inverse .navbar-nav>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav>.disabled>a,.navbar-inverse .navbar-nav>.disabled>a:focus,.navbar-inverse .navbar-nav>.disabled>a:hover{color:#444;background-color:transparent}.navbar-inverse .navbar-toggle{border-color:#333}.navbar-inverse .navbar-toggle:focus,.navbar-inverse .navbar-toggle:hover{background-color:#333}.navbar-inverse .navbar-toggle .icon-bar{background-color:#fff}.navbar-inverse .navbar-collapse,.navbar-inverse .navbar-form{border-color:#101010}.navbar-inverse .navbar-nav>.open>a,.navbar-inverse .navbar-nav>.open>a:focus,.navbar-inverse .navbar-nav>.open>a:hover{color:#fff;background-color:#080808}@media (max-width:767px){.navbar-inverse .navbar-nav .open .dropdown-menu>.dropdown-header{border-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu .divider{background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a{color:#9d9d9d}.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-color:#080808}.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:focus,.navbar-inverse .navbar-nav .open .dropdown-menu>.disabled>a:hover{color:#444;background-color:transparent}}.navbar-inverse .navbar-link{color:#9d9d9d}.navbar-inverse .navbar-link:hover{color:#fff}.navbar-inverse .btn-link{color:#9d9d9d}.navbar-inverse .btn-link:focus,.navbar-inverse .btn-link:hover{color:#fff}.navbar-inverse .btn-link[disabled]:focus,.navbar-inverse .btn-link[disabled]:hover,fieldset[disabled] .navbar-inverse .btn-link:focus,fieldset[disabled] .navbar-inverse .btn-link:hover{color:#444}.breadcrumb{padding:8px 15px;margin-bottom:20px;list-style:none;background-color:#f5f5f5;border-radius:4px}.breadcrumb>li{display:inline-block}.breadcrumb>li+li:before{padding:0 5px;color:#ccc;content:"/\\A0"}.breadcrumb>.active{color:#777}.pagination{display:inline-block;padding-left:0;margin:20px 0;border-radius:4px}.pagination>li{display:inline}.pagination>li>a,.pagination>li>span{position:relative;float:left;padding:6px 12px;margin-left:-1px;line-height:1.42857143;color:#337ab7;text-decoration:none;background-color:#fff;border:1px solid #ddd}.pagination>li:first-child>a,.pagination>li:first-child>span{margin-left:0;border-top-left-radius:4px;border-bottom-left-radius:4px}.pagination>li:last-child>a,.pagination>li:last-child>span{border-top-right-radius:4px;border-bottom-right-radius:4px}.pagination>li>a:focus,.pagination>li>a:hover,.pagination>li>span:focus,.pagination>li>span:hover{z-index:2;color:#23527c;background-color:#eee;border-color:#ddd}.pagination>.active>a,.pagination>.active>a:focus,.pagination>.active>a:hover,.pagination>.active>span,.pagination>.active>span:focus,.pagination>.active>span:hover{z-index:3;color:#fff;cursor:default;background-color:#337ab7;border-color:#337ab7}.pagination>.disabled>a,.pagination>.disabled>a:focus,.pagination>.disabled>a:hover,.pagination>.disabled>span,.pagination>.disabled>span:focus,.pagination>.disabled>span:hover{color:#777;cursor:not-allowed;background-color:#fff;border-color:#ddd}.pagination-lg>li>a,.pagination-lg>li>span{padding:10px 16px;font-size:18px;line-height:1.3333333}.pagination-lg>li:first-child>a,.pagination-lg>li:first-child>span{border-top-left-radius:6px;border-bottom-left-radius:6px}.pagination-lg>li:last-child>a,.pagination-lg>li:last-child>span{border-top-right-radius:6px;border-bottom-right-radius:6px}.pagination-sm>li>a,.pagination-sm>li>span{padding:5px 10px;font-size:12px;line-height:1.5}.pagination-sm>li:first-child>a,.pagination-sm>li:first-child>span{border-top-left-radius:3px;border-bottom-left-radius:3px}.pagination-sm>li:last-child>a,.pagination-sm>li:last-child>span{border-top-right-radius:3px;border-bottom-right-radius:3px}.pager{padding-left:0;margin:20px 0;text-align:center;list-style:none}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;border-radius:15px}.pager li>a:focus,.pager li>a:hover{text-decoration:none;background-color:#eee}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:focus,.pager .disabled>a:hover,.pager .disabled>span{color:#777;cursor:not-allowed;background-color:#fff}.label{display:inline;padding:.2em .6em .3em;font-size:75%;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:baseline;border-radius:.25em}a.label:focus,a.label:hover{color:#fff;text-decoration:none;cursor:pointer}.label:empty{display:none}.btn .label{position:relative;top:-1px}.label-default{background-color:#777}.label-default[href]:focus,.label-default[href]:hover{background-color:#5e5e5e}.label-primary{background-color:#337ab7}.label-primary[href]:focus,.label-primary[href]:hover{background-color:#286090}.label-success{background-color:#5cb85c}.label-success[href]:focus,.label-success[href]:hover{background-color:#449d44}.label-info{background-color:#5bc0de}.label-info[href]:focus,.label-info[href]:hover{background-color:#31b0d5}.label-warning{background-color:#f0ad4e}.label-warning[href]:focus,.label-warning[href]:hover{background-color:#ec971f}.label-danger{background-color:#d9534f}.label-danger[href]:focus,.label-danger[href]:hover{background-color:#c9302c}.badge{display:inline-block;min-width:10px;padding:3px 7px;font-size:12px;font-weight:700;line-height:1;color:#fff;text-align:center;white-space:nowrap;vertical-align:middle;background-color:#777;border-radius:10px}.badge:empty{display:none}.btn .badge{position:relative;top:-1px}.btn-group-xs>.btn .badge,.btn-xs .badge{top:0;padding:1px 5px}a.badge:focus,a.badge:hover{color:#fff;text-decoration:none;cursor:pointer}.list-group-item.active>.badge,.nav-pills>.active>a>.badge{color:#337ab7;background-color:#fff}.list-group-item>.badge{float:right}.list-group-item>.badge+.badge{margin-right:5px}.nav-pills>li>a>.badge{margin-left:3px}.jumbotron{padding-top:30px;padding-bottom:30px;margin-bottom:30px;background-color:#eee}.jumbotron,.jumbotron .h1,.jumbotron h1{color:inherit}.jumbotron p{margin-bottom:15px;font-size:21px;font-weight:200}.jumbotron>hr{border-top-color:#d5d5d5}.container-fluid .jumbotron,.container .jumbotron{padding-right:15px;padding-left:15px;border-radius:6px}.jumbotron .container{max-width:100%}@media screen and (min-width:768px){.jumbotron{padding-top:48px;padding-bottom:48px}.container-fluid .jumbotron,.container .jumbotron{padding-right:60px;padding-left:60px}.jumbotron .h1,.jumbotron h1{font-size:63px}}.thumbnail{display:block;padding:4px;margin-bottom:20px;line-height:1.42857143;background-color:#fff;border:1px solid #ddd;border-radius:4px;-webkit-transition:border .2s ease-in-out;transition:border .2s ease-in-out}.thumbnail>img,.thumbnail a>img{margin-right:auto;margin-left:auto}a.thumbnail.active,a.thumbnail:focus,a.thumbnail:hover{border-color:#337ab7}.thumbnail .caption{padding:9px;color:#333}.alert{padding:15px;margin-bottom:20px;border:1px solid transparent;border-radius:4px}.alert h4{margin-top:0;color:inherit}.alert .alert-link{font-weight:700}.alert>p,.alert>ul{margin-bottom:0}.alert>p+p{margin-top:5px}.alert-dismissable,.alert-dismissible{padding-right:35px}.alert-dismissable .close,.alert-dismissible .close{position:relative;top:-2px;right:-21px;color:inherit}.alert-success{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.alert-success hr{border-top-color:#c9e2b3}.alert-success .alert-link{color:#2b542c}.alert-info{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.alert-info hr{border-top-color:#a6e1ec}.alert-info .alert-link{color:#245269}.alert-warning{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.alert-warning hr{border-top-color:#f7e1b5}.alert-warning .alert-link{color:#66512c}.alert-danger{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.alert-danger hr{border-top-color:#e4b9c0}.alert-danger .alert-link{color:#843534}@-webkit-keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}@keyframes progress-bar-stripes{0%{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f5f5f5;border-radius:4px;box-shadow:inset 0 1px 2px rgba(0,0,0,.1)}.progress-bar{float:left;width:0;height:100%;font-size:12px;line-height:20px;color:#fff;text-align:center;background-color:#337ab7;box-shadow:inset 0 -1px 0 rgba(0,0,0,.15);-webkit-transition:width .6s ease;transition:width .6s ease}.progress-bar-striped,.progress-striped .progress-bar{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-size:40px 40px}.progress-bar.active,.progress.active .progress-bar{-webkit-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-bar-success{background-color:#5cb85c}.progress-striped .progress-bar-success{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-info{background-color:#5bc0de}.progress-striped .progress-bar-info{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-warning{background-color:#f0ad4e}.progress-striped .progress-bar-warning{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.progress-bar-danger{background-color:#d9534f}.progress-striped .progress-bar-danger{background-image:-webkit-linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent);background-image:linear-gradient(45deg,hsla(0,0%,100%,.15) 25%,transparent 0,transparent 50%,hsla(0,0%,100%,.15) 0,hsla(0,0%,100%,.15) 75%,transparent 0,transparent)}.media{margin-top:15px}.media:first-child{margin-top:0}.media,.media-body{overflow:hidden;zoom:1}.media-body{width:10000px}.media-object{display:block}.media-object.img-thumbnail{max-width:none}.media-right,.media>.pull-right{padding-left:10px}.media-left,.media>.pull-left{padding-right:10px}.media-body,.media-left,.media-right{display:table-cell;vertical-align:top}.media-middle{vertical-align:middle}.media-bottom{vertical-align:bottom}.media-heading{margin-top:0;margin-bottom:5px}.media-list{padding-left:0;list-style:none}.list-group{padding-left:0;margin-bottom:20px}.list-group-item{position:relative;display:block;padding:10px 15px;margin-bottom:-1px;background-color:#fff;border:1px solid #ddd}.list-group-item:first-child{border-top-left-radius:4px;border-top-right-radius:4px}.list-group-item:last-child{margin-bottom:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}a.list-group-item,button.list-group-item{color:#555}a.list-group-item .list-group-item-heading,button.list-group-item .list-group-item-heading{color:#333}a.list-group-item:focus,a.list-group-item:hover,button.list-group-item:focus,button.list-group-item:hover{color:#555;text-decoration:none;background-color:#f5f5f5}button.list-group-item{width:100%;text-align:left}.list-group-item.disabled,.list-group-item.disabled:focus,.list-group-item.disabled:hover{color:#777;cursor:not-allowed;background-color:#eee}.list-group-item.disabled .list-group-item-heading,.list-group-item.disabled:focus .list-group-item-heading,.list-group-item.disabled:hover .list-group-item-heading{color:inherit}.list-group-item.disabled .list-group-item-text,.list-group-item.disabled:focus .list-group-item-text,.list-group-item.disabled:hover .list-group-item-text{color:#777}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{z-index:2;color:#fff;background-color:#337ab7;border-color:#337ab7}.list-group-item.active .list-group-item-heading,.list-group-item.active .list-group-item-heading>.small,.list-group-item.active .list-group-item-heading>small,.list-group-item.active:focus .list-group-item-heading,.list-group-item.active:focus .list-group-item-heading>.small,.list-group-item.active:focus .list-group-item-heading>small,.list-group-item.active:hover .list-group-item-heading,.list-group-item.active:hover .list-group-item-heading>.small,.list-group-item.active:hover .list-group-item-heading>small{color:inherit}.list-group-item.active .list-group-item-text,.list-group-item.active:focus .list-group-item-text,.list-group-item.active:hover .list-group-item-text{color:#c7ddef}.list-group-item-success{color:#3c763d;background-color:#dff0d8}a.list-group-item-success,button.list-group-item-success{color:#3c763d}a.list-group-item-success .list-group-item-heading,button.list-group-item-success .list-group-item-heading{color:inherit}a.list-group-item-success:focus,a.list-group-item-success:hover,button.list-group-item-success:focus,button.list-group-item-success:hover{color:#3c763d;background-color:#d0e9c6}a.list-group-item-success.active,a.list-group-item-success.active:focus,a.list-group-item-success.active:hover,button.list-group-item-success.active,button.list-group-item-success.active:focus,button.list-group-item-success.active:hover{color:#fff;background-color:#3c763d;border-color:#3c763d}.list-group-item-info{color:#31708f;background-color:#d9edf7}a.list-group-item-info,button.list-group-item-info{color:#31708f}a.list-group-item-info .list-group-item-heading,button.list-group-item-info .list-group-item-heading{color:inherit}a.list-group-item-info:focus,a.list-group-item-info:hover,button.list-group-item-info:focus,button.list-group-item-info:hover{color:#31708f;background-color:#c4e3f3}a.list-group-item-info.active,a.list-group-item-info.active:focus,a.list-group-item-info.active:hover,button.list-group-item-info.active,button.list-group-item-info.active:focus,button.list-group-item-info.active:hover{color:#fff;background-color:#31708f;border-color:#31708f}.list-group-item-warning{color:#8a6d3b;background-color:#fcf8e3}a.list-group-item-warning,button.list-group-item-warning{color:#8a6d3b}a.list-group-item-warning .list-group-item-heading,button.list-group-item-warning .list-group-item-heading{color:inherit}a.list-group-item-warning:focus,a.list-group-item-warning:hover,button.list-group-item-warning:focus,button.list-group-item-warning:hover{color:#8a6d3b;background-color:#faf2cc}a.list-group-item-warning.active,a.list-group-item-warning.active:focus,a.list-group-item-warning.active:hover,button.list-group-item-warning.active,button.list-group-item-warning.active:focus,button.list-group-item-warning.active:hover{color:#fff;background-color:#8a6d3b;border-color:#8a6d3b}.list-group-item-danger{color:#a94442;background-color:#f2dede}a.list-group-item-danger,button.list-group-item-danger{color:#a94442}a.list-group-item-danger .list-group-item-heading,button.list-group-item-danger .list-group-item-heading{color:inherit}a.list-group-item-danger:focus,a.list-group-item-danger:hover,button.list-group-item-danger:focus,button.list-group-item-danger:hover{color:#a94442;background-color:#ebcccc}a.list-group-item-danger.active,a.list-group-item-danger.active:focus,a.list-group-item-danger.active:hover,button.list-group-item-danger.active,button.list-group-item-danger.active:focus,button.list-group-item-danger.active:hover{color:#fff;background-color:#a94442;border-color:#a94442}.list-group-item-heading{margin-top:0;margin-bottom:5px}.list-group-item-text{margin-bottom:0;line-height:1.3}.panel{margin-bottom:20px;background-color:#fff;border:1px solid transparent;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.05)}.panel-body{padding:15px}.panel-heading{padding:10px 15px;border-bottom:1px solid transparent;border-top-left-radius:3px;border-top-right-radius:3px}.panel-heading>.dropdown .dropdown-toggle,.panel-title{color:inherit}.panel-title{margin-top:0;margin-bottom:0;font-size:16px}.panel-title>.small,.panel-title>.small>a,.panel-title>a,.panel-title>small,.panel-title>small>a{color:inherit}.panel-footer{padding:10px 15px;background-color:#f5f5f5;border-top:1px solid #ddd;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.list-group,.panel>.panel-collapse>.list-group{margin-bottom:0}.panel>.list-group .list-group-item,.panel>.panel-collapse>.list-group .list-group-item{border-width:1px 0;border-radius:0}.panel>.list-group:first-child .list-group-item:first-child,.panel>.panel-collapse>.list-group:first-child .list-group-item:first-child{border-top:0;border-top-left-radius:3px;border-top-right-radius:3px}.panel>.list-group:last-child .list-group-item:last-child,.panel>.panel-collapse>.list-group:last-child .list-group-item:last-child{border-bottom:0;border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.panel-heading+.panel-collapse>.list-group .list-group-item:first-child{border-top-left-radius:0;border-top-right-radius:0}.list-group+.panel-footer,.panel-heading+.list-group .list-group-item:first-child{border-top-width:0}.panel>.panel-collapse>.table,.panel>.table,.panel>.table-responsive>.table{margin-bottom:0}.panel>.panel-collapse>.table caption,.panel>.table-responsive>.table caption,.panel>.table caption{padding-right:15px;padding-left:15px}.panel>.table-responsive:first-child>.table:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child,.panel>.table:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child,.panel>.table:first-child>thead:first-child>tr:first-child{border-top-left-radius:3px;border-top-right-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:first-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:first-child,.panel>.table:first-child>thead:first-child>tr:first-child td:first-child,.panel>.table:first-child>thead:first-child>tr:first-child th:first-child{border-top-left-radius:3px}.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table-responsive:first-child>.table:first-child>thead:first-child>tr:first-child th:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child td:last-child,.panel>.table:first-child>tbody:first-child>tr:first-child th:last-child,.panel>.table:first-child>thead:first-child>tr:first-child td:last-child,.panel>.table:first-child>thead:first-child>tr:first-child th:last-child{border-top-right-radius:3px}.panel>.table-responsive:last-child>.table:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child,.panel>.table:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child{border-bottom-right-radius:3px;border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:first-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:first-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:first-child{border-bottom-left-radius:3px}.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table-responsive:last-child>.table:last-child>tfoot:last-child>tr:last-child th:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child td:last-child,.panel>.table:last-child>tbody:last-child>tr:last-child th:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child td:last-child,.panel>.table:last-child>tfoot:last-child>tr:last-child th:last-child{border-bottom-right-radius:3px}.panel>.panel-body+.table,.panel>.panel-body+.table-responsive,.panel>.table+.panel-body,.panel>.table-responsive+.panel-body{border-top:1px solid #ddd}.panel>.table>tbody:first-child>tr:first-child td,.panel>.table>tbody:first-child>tr:first-child th{border-top:0}.panel>.table-bordered,.panel>.table-responsive>.table-bordered{border:0}.panel>.table-bordered>tbody>tr>td:first-child,.panel>.table-bordered>tbody>tr>th:first-child,.panel>.table-bordered>tfoot>tr>td:first-child,.panel>.table-bordered>tfoot>tr>th:first-child,.panel>.table-bordered>thead>tr>td:first-child,.panel>.table-bordered>thead>tr>th:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:first-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:first-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:first-child,.panel>.table-responsive>.table-bordered>thead>tr>td:first-child,.panel>.table-responsive>.table-bordered>thead>tr>th:first-child{border-left:0}.panel>.table-bordered>tbody>tr>td:last-child,.panel>.table-bordered>tbody>tr>th:last-child,.panel>.table-bordered>tfoot>tr>td:last-child,.panel>.table-bordered>tfoot>tr>th:last-child,.panel>.table-bordered>thead>tr>td:last-child,.panel>.table-bordered>thead>tr>th:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>td:last-child,.panel>.table-responsive>.table-bordered>tbody>tr>th:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>td:last-child,.panel>.table-responsive>.table-bordered>tfoot>tr>th:last-child,.panel>.table-responsive>.table-bordered>thead>tr>td:last-child,.panel>.table-responsive>.table-bordered>thead>tr>th:last-child{border-right:0}.panel>.table-bordered>tbody>tr:first-child>td,.panel>.table-bordered>tbody>tr:first-child>th,.panel>.table-bordered>tbody>tr:last-child>td,.panel>.table-bordered>tbody>tr:last-child>th,.panel>.table-bordered>tfoot>tr:last-child>td,.panel>.table-bordered>tfoot>tr:last-child>th,.panel>.table-bordered>thead>tr:first-child>td,.panel>.table-bordered>thead>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:first-child>th,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>td,.panel>.table-responsive>.table-bordered>tbody>tr:last-child>th,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>td,.panel>.table-responsive>.table-bordered>tfoot>tr:last-child>th,.panel>.table-responsive>.table-bordered>thead>tr:first-child>td,.panel>.table-responsive>.table-bordered>thead>tr:first-child>th{border-bottom:0}.panel>.table-responsive{margin-bottom:0;border:0}.panel-group{margin-bottom:20px}.panel-group .panel{margin-bottom:0;border-radius:4px}.panel-group .panel+.panel{margin-top:5px}.panel-group .panel-heading{border-bottom:0}.panel-group .panel-heading+.panel-collapse>.list-group,.panel-group .panel-heading+.panel-collapse>.panel-body{border-top:1px solid #ddd}.panel-group .panel-footer{border-top:0}.panel-group .panel-footer+.panel-collapse .panel-body{border-bottom:1px solid #ddd}.panel-default{border-color:#ddd}.panel-default>.panel-heading{color:#333;background-color:#f5f5f5;border-color:#ddd}.panel-default>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ddd}.panel-default>.panel-heading .badge{color:#f5f5f5;background-color:#333}.panel-default>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ddd}.panel-primary{border-color:#337ab7}.panel-primary>.panel-heading{color:#fff;background-color:#337ab7;border-color:#337ab7}.panel-primary>.panel-heading+.panel-collapse>.panel-body{border-top-color:#337ab7}.panel-primary>.panel-heading .badge{color:#337ab7;background-color:#fff}.panel-primary>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#337ab7}.panel-success{border-color:#d6e9c6}.panel-success>.panel-heading{color:#3c763d;background-color:#dff0d8;border-color:#d6e9c6}.panel-success>.panel-heading+.panel-collapse>.panel-body{border-top-color:#d6e9c6}.panel-success>.panel-heading .badge{color:#dff0d8;background-color:#3c763d}.panel-success>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#d6e9c6}.panel-info{border-color:#bce8f1}.panel-info>.panel-heading{color:#31708f;background-color:#d9edf7;border-color:#bce8f1}.panel-info>.panel-heading+.panel-collapse>.panel-body{border-top-color:#bce8f1}.panel-info>.panel-heading .badge{color:#d9edf7;background-color:#31708f}.panel-info>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#bce8f1}.panel-warning{border-color:#faebcc}.panel-warning>.panel-heading{color:#8a6d3b;background-color:#fcf8e3;border-color:#faebcc}.panel-warning>.panel-heading+.panel-collapse>.panel-body{border-top-color:#faebcc}.panel-warning>.panel-heading .badge{color:#fcf8e3;background-color:#8a6d3b}.panel-warning>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#faebcc}.panel-danger{border-color:#ebccd1}.panel-danger>.panel-heading{color:#a94442;background-color:#f2dede;border-color:#ebccd1}.panel-danger>.panel-heading+.panel-collapse>.panel-body{border-top-color:#ebccd1}.panel-danger>.panel-heading .badge{color:#f2dede;background-color:#a94442}.panel-danger>.panel-footer+.panel-collapse>.panel-body{border-bottom-color:#ebccd1}.embed-responsive{position:relative;display:block;height:0;padding:0;overflow:hidden}.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video{position:absolute;top:0;bottom:0;left:0;width:100%;height:100%;border:0}.embed-responsive-16by9{padding-bottom:56.25%}.embed-responsive-4by3{padding-bottom:75%}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;border-radius:4px;box-shadow:inset 0 1px 1px rgba(0,0,0,.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,.15)}.well-lg{padding:24px;border-radius:6px}.well-sm{padding:9px;border-radius:3px}.close{float:right;font-size:21px;font-weight:700;line-height:1;color:#000;text-shadow:0 1px 0 #fff;filter:alpha(opacity=20);opacity:.2}.close:focus,.close:hover{color:#000;text-decoration:none;cursor:pointer;filter:alpha(opacity=50);opacity:.5}button.close{-webkit-appearance:none;padding:0;cursor:pointer;background:transparent;border:0}.modal,.modal-open{overflow:hidden}.modal{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1050;display:none;-webkit-overflow-scrolling:touch;outline:0}.modal.fade .modal-dialog{-webkit-transition:-webkit-transform .3s ease-out;transition:transform .3s ease-out;-webkit-transform:translateY(-25%);transform:translateY(-25%)}.modal.in .modal-dialog{-webkit-transform:translate(0);transform:translate(0)}.modal-open .modal{overflow-x:hidden;overflow-y:auto}.modal-dialog{position:relative;width:auto;margin:10px}.modal-content{position:relative;background-color:#fff;background-clip:padding-box;border:1px solid #999;border:1px solid rgba(0,0,0,.2);border-radius:6px;outline:0;box-shadow:0 3px 9px rgba(0,0,0,.5)}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{filter:alpha(opacity=0);opacity:0}.modal-backdrop.in{filter:alpha(opacity=50);opacity:.5}.modal-header{padding:15px;border-bottom:1px solid #e5e5e5}.modal-header .close{margin-top:-2px}.modal-title{margin:0;line-height:1.42857143}.modal-body{position:relative;padding:15px}.modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.modal-scrollbar-measure{position:absolute;top:-9999px;width:50px;height:50px;overflow:scroll}@media (min-width:768px){.modal-dialog{width:600px;margin:30px auto}.modal-content{box-shadow:0 5px 15px rgba(0,0,0,.5)}.modal-sm{width:300px}}@media (min-width:992px){.modal-lg{width:900px}}.tooltip{position:absolute;z-index:1070;display:block;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;filter:alpha(opacity=0);opacity:0;line-break:auto}.tooltip.in{filter:alpha(opacity=90);opacity:.9}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:3px 8px;color:#fff;text-align:center;background-color:#000;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-left .tooltip-arrow{right:5px}.tooltip.top-left .tooltip-arrow,.tooltip.top-right .tooltip-arrow{bottom:0;margin-bottom:-5px;border-width:5px 5px 0;border-top-color:#000}.tooltip.top-right .tooltip-arrow{left:5px}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-left .tooltip-arrow{top:0;right:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.tooltip.bottom-right .tooltip-arrow{top:0;left:5px;margin-top:-5px;border-width:0 5px 5px;border-bottom-color:#000}.popover{position:absolute;top:0;left:0;z-index:1060;display:none;max-width:276px;padding:1px;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;font-style:normal;font-weight:400;line-height:1.42857143;text-align:left;text-align:start;text-decoration:none;text-shadow:none;text-transform:none;letter-spacing:normal;word-break:normal;word-spacing:normal;word-wrap:normal;white-space:normal;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);line-break:auto}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;border-radius:5px 5px 0 0}.popover-content{padding:9px 14px}.popover>.arrow,.popover>.arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover>.arrow{border-width:11px}.popover>.arrow:after{content:"";border-width:10px}.popover.top>.arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,.25);border-bottom-width:0}.popover.top>.arrow:after{bottom:1px;margin-left:-10px;content:" ";border-top-color:#fff;border-bottom-width:0}.popover.right>.arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,.25);border-left-width:0}.popover.right>.arrow:after{bottom:-10px;left:1px;content:" ";border-right-color:#fff;border-left-width:0}.popover.bottom>.arrow{top:-11px;left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,.25)}.popover.bottom>.arrow:after{top:1px;margin-left:-10px;content:" ";border-top-width:0;border-bottom-color:#fff}.popover.left>.arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0,0,0,.25)}.popover.left>.arrow:after{right:1px;bottom:-10px;content:" ";border-right-width:0;border-left-color:#fff}.carousel,.carousel-inner{position:relative}.carousel-inner{width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:left .6s ease-in-out;transition:left .6s ease-in-out}.carousel-inner>.item>a>img,.carousel-inner>.item>img{line-height:1}@media (-webkit-transform-3d),all and (transform-3d){.carousel-inner>.item{-webkit-transition:-webkit-transform .6s ease-in-out;transition:transform .6s ease-in-out;-webkit-backface-visibility:hidden;backface-visibility:hidden;-webkit-perspective:1000px;perspective:1000px}.carousel-inner>.item.active.right,.carousel-inner>.item.next{left:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}.carousel-inner>.item.active.left,.carousel-inner>.item.prev{left:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}.carousel-inner>.item.active,.carousel-inner>.item.next.left,.carousel-inner>.item.prev.right{left:0;-webkit-transform:translateZ(0);transform:translateZ(0)}}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:0;bottom:0;left:0;width:15%;font-size:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6);background-color:transparent;filter:alpha(opacity=50);opacity:.5}.carousel-control.left{background-image:-webkit-linear-gradient(left,rgba(0,0,0,.5),rgba(0,0,0,.0001));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.0001)));background-image:linear-gradient(90deg,rgba(0,0,0,.5) 0,rgba(0,0,0,.0001));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#80000000\',endColorstr=\'#00000000\',GradientType=1);background-repeat:repeat-x}.carousel-control.right{right:0;left:auto;background-image:-webkit-linear-gradient(left,rgba(0,0,0,.0001),rgba(0,0,0,.5));background-image:-webkit-gradient(linear,left top,right top,from(rgba(0,0,0,.0001)),to(rgba(0,0,0,.5)));background-image:linear-gradient(90deg,rgba(0,0,0,.0001) 0,rgba(0,0,0,.5));filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=\'#00000000\',endColorstr=\'#80000000\',GradientType=1);background-repeat:repeat-x}.carousel-control:focus,.carousel-control:hover{color:#fff;text-decoration:none;filter:alpha(opacity=90);outline:0;opacity:.9}.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{position:absolute;top:50%;z-index:5;display:inline-block;margin-top:-10px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{left:50%;margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{right:50%;margin-right:-10px}.carousel-control .icon-next,.carousel-control .icon-prev{width:20px;height:20px;font-family:serif;line-height:1}.carousel-control .icon-prev:before{content:\'\\2039\'}.carousel-control .icon-next:before{content:\'\\203A\'}.carousel-indicators{position:absolute;bottom:10px;left:50%;z-index:15;width:60%;padding-left:0;margin-left:-30%;text-align:center;list-style:none}.carousel-indicators li{display:inline-block;width:10px;height:10px;margin:1px;text-indent:-999px;cursor:pointer;background-color:#000\\9;background-color:transparent;border:1px solid #fff;border-radius:10px}.carousel-indicators .active{width:12px;height:12px;margin:0;background-color:#fff}.carousel-caption{position:absolute;right:15%;bottom:20px;left:15%;z-index:10;padding-top:20px;padding-bottom:20px;color:#fff;text-align:center;text-shadow:0 1px 2px rgba(0,0,0,.6)}.carousel-caption .btn{text-shadow:none}@media screen and (min-width:768px){.carousel-control .glyphicon-chevron-left,.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next,.carousel-control .icon-prev{width:30px;height:30px;margin-top:-10px;font-size:30px}.carousel-control .glyphicon-chevron-left,.carousel-control .icon-prev{margin-left:-10px}.carousel-control .glyphicon-chevron-right,.carousel-control .icon-next{margin-right:-10px}.carousel-caption{right:20%;left:20%;padding-bottom:30px}.carousel-indicators{bottom:20px}}.btn-group-vertical>.btn-group:after,.btn-group-vertical>.btn-group:before,.btn-toolbar:after,.btn-toolbar:before,.clearfix:after,.clearfix:before,.container-fluid:after,.container-fluid:before,.container:after,.container:before,.dl-horizontal dd:after,.dl-horizontal dd:before,.form-horizontal .form-group:after,.form-horizontal .form-group:before,.modal-footer:after,.modal-footer:before,.modal-header:after,.modal-header:before,.nav:after,.nav:before,.navbar-collapse:after,.navbar-collapse:before,.navbar-header:after,.navbar-header:before,.navbar:after,.navbar:before,.pager:after,.pager:before,.panel-body:after,.panel-body:before,.row:after,.row:before{display:table;content:" "}.btn-group-vertical>.btn-group:after,.btn-toolbar:after,.clearfix:after,.container-fluid:after,.container:after,.dl-horizontal dd:after,.form-horizontal .form-group:after,.modal-footer:after,.modal-header:after,.nav:after,.navbar-collapse:after,.navbar-header:after,.navbar:after,.pager:after,.panel-body:after,.row:after{clear:both}.center-block{display:block;margin-right:auto;margin-left:auto}.pull-right{float:right!important}.pull-left{float:left!important}.hide{display:none!important}.show{display:block!important}.invisible{visibility:hidden}.text-hide{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.hidden{display:none!important}.affix{position:fixed}@-ms-viewport{width:device-width}.visible-lg,.visible-lg-block,.visible-lg-inline,.visible-lg-inline-block,.visible-md,.visible-md-block,.visible-md-inline,.visible-md-inline-block,.visible-sm,.visible-sm-block,.visible-sm-inline,.visible-sm-inline-block,.visible-xs,.visible-xs-block,.visible-xs-inline,.visible-xs-inline-block{display:none!important}@media (max-width:767px){.visible-xs{display:block!important}table.visible-xs{display:table!important}tr.visible-xs{display:table-row!important}td.visible-xs,th.visible-xs{display:table-cell!important}}@media (max-width:767px){.visible-xs-block{display:block!important}}@media (max-width:767px){.visible-xs-inline{display:inline!important}}@media (max-width:767px){.visible-xs-inline-block{display:inline-block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm{display:block!important}table.visible-sm{display:table!important}tr.visible-sm{display:table-row!important}td.visible-sm,th.visible-sm{display:table-cell!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-block{display:block!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline{display:inline!important}}@media (min-width:768px) and (max-width:991px){.visible-sm-inline-block{display:inline-block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md{display:block!important}table.visible-md{display:table!important}tr.visible-md{display:table-row!important}td.visible-md,th.visible-md{display:table-cell!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-block{display:block!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline{display:inline!important}}@media (min-width:992px) and (max-width:1199px){.visible-md-inline-block{display:inline-block!important}}@media (min-width:1200px){.visible-lg{display:block!important}table.visible-lg{display:table!important}tr.visible-lg{display:table-row!important}td.visible-lg,th.visible-lg{display:table-cell!important}}@media (min-width:1200px){.visible-lg-block{display:block!important}}@media (min-width:1200px){.visible-lg-inline{display:inline!important}}@media (min-width:1200px){.visible-lg-inline-block{display:inline-block!important}}@media (max-width:767px){.hidden-xs{display:none!important}}@media (min-width:768px) and (max-width:991px){.hidden-sm{display:none!important}}@media (min-width:992px) and (max-width:1199px){.hidden-md{display:none!important}}@media (min-width:1200px){.hidden-lg{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:block!important}table.visible-print{display:table!important}tr.visible-print{display:table-row!important}td.visible-print,th.visible-print{display:table-cell!important}}.visible-print-block{display:none!important}@media print{.visible-print-block{display:block!important}}.visible-print-inline{display:none!important}@media print{.visible-print-inline{display:inline!important}}.visible-print-inline-block{display:none!important}@media print{.visible-print-inline-block{display:inline-block!important}}@media print{.hidden-print{display:none!important}}',""]); +},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e=0&&T.splice(e,1)}function s(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function l(t){var e=document.createElement("link");return e.rel="stylesheet",r(t,e),e}function A(t,e){var n,o,i;if(e.singleton){var r=w++;n=M||(M=s(e)),o=c.bind(null,n,r,!1),i=c.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=l(e),o=d.bind(null,n),i=function(){a(n),n.href&&URL.revokeObjectURL(n.href)}):(n=s(e),o=u.bind(null,n),i=function(){a(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}function c(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=C(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}function u(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function d(t,e){var n=e.css,o=e.sourceMap;o&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([n],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(i),r&&URL.revokeObjectURL(r)}var g={},h=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},p=h(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),f=h(function(){return document.head||document.getElementsByTagName("head")[0]}),M=null,w=0,T=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=p()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=i(t);return o(n,e),function(t){for(var r=[],a=0;a1){for(var f=Array(p),M=0;M1){for(var T=Array(w),C=0;C>"),x={array:a("array"),bool:a("boolean"),func:a("function"),number:a("number"),object:a("object"),string:a("string"),symbol:a("symbol"),any:s(),arrayOf:l,element:A(),instanceOf:c,node:h(),objectOf:d,oneOf:u,oneOfType:g,shape:p};i.prototype=Error.prototype,t.exports=x},function(t,e){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";t.exports=n},function(t,e){"use strict";t.exports="15.4.1"},function(t,e,n){"use strict";function o(t){return r.isValidElement(t)?void 0:i("143"),t}var i=n(19),r=n(21);n(20);t.exports=o},function(t,e,n){"use strict";t.exports=n(42)},function(t,e,n){"use strict";var o=n(43),i=n(48),r=n(174),a=n(71),s=n(68),l=n(179),A=n(180),c=n(181),u=n(182);n(56);i.inject();var d={findDOMNode:A,render:r.render,unmountComponentAtNode:r.unmountComponentAtNode,version:l,unstable_batchedUpdates:s.batchedUpdates,unstable_renderSubtreeIntoContainer:u};"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.inject&&__REACT_DEVTOOLS_GLOBAL_HOOK__.inject({ComponentTree:{getClosestInstanceFromNode:o.getClosestInstanceFromNode,getNodeFromInstance:function(t){return t._renderedComponent&&(t=c(t)),t?o.getNodeFromInstance(t):null}},Mount:r,Reconciler:a});t.exports=d},function(t,e,n){"use strict";function o(t){for(var e;e=t._renderedComponent;)t=e;return t}function i(t,e){var n=o(t);n._hostNode=e,e[p]=n}function r(t){var e=t._hostNode;e&&(delete e[p],t._hostNode=null)}function a(t,e){if(!(t._flags&h.hasCachedChildNodes)){var n=t._renderedChildren,r=e.firstChild;t:for(var a in n)if(n.hasOwnProperty(a)){var s=n[a],l=o(s)._domID;if(0!==l){for(;null!==r;r=r.nextSibling)if(1===r.nodeType&&r.getAttribute(g)===String(l)||8===r.nodeType&&r.nodeValue===" react-text: "+l+" "||8===r.nodeType&&r.nodeValue===" react-empty: "+l+" "){i(s,r);continue t}c("32",l)}}t._flags|=h.hasCachedChildNodes}}function s(t){if(t[p])return t[p];for(var e=[];!t[p];){if(e.push(t),!t.parentNode)return null;t=t.parentNode}for(var n,o;t&&(o=t[p]);t=e.pop())n=o,e.length&&a(o,t);return n}function l(t){var e=s(t);return null!=e&&e._hostNode===t?e:null}function A(t){if(void 0===t._hostNode?c("33"):void 0,t._hostNode)return t._hostNode;for(var e=[];!t._hostNode;)e.push(t),t._hostParent?void 0:c("34"),t=t._hostParent;for(;e.length;t=e.pop())a(t,t._hostNode);return t._hostNode}var c=n(44),u=n(45),d=n(47),g=(n(46),u.ID_ATTRIBUTE_NAME),h=d,p="__reactInternalInstance$"+Math.random().toString(36).slice(2),f={getClosestInstanceFromNode:s,getInstanceFromNode:l,getNodeFromInstance:A,precacheChildNodes:a,precacheNode:i,uncacheNode:r};t.exports=f},function(t,e){"use strict";function n(t){for(var e=arguments.length-1,n="Minified React error #"+t+"; visit http://facebook.github.io/react/docs/error-decoder.html?invariant="+t,o=0;o8&&y<=11),m=32,N=String.fromCharCode(m),b={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["topCompositionEnd","topKeyPress","topTextInput","topPaste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:["topBlur","topCompositionEnd","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:["topBlur","topCompositionStart","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:["topBlur","topCompositionUpdate","topKeyDown","topKeyPress","topKeyUp","topMouseDown"]}},x=!1,D=null,v={eventTypes:b,extractEvents:function(t,e,n,o){return[A(t,e,n,o),d(t,e,n,o)]}};t.exports=v},function(t,e,n){"use strict";function o(t,e,n){var o=e.dispatchConfig.phasedRegistrationNames[n];return M(t,o)}function i(t,e,n){var i=o(t,n,e);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}function r(t){t&&t.dispatchConfig.phasedRegistrationNames&&h.traverseTwoPhase(t._targetInst,i,t)}function a(t){if(t&&t.dispatchConfig.phasedRegistrationNames){var e=t._targetInst,n=e?h.getParentInstance(e):null;h.traverseTwoPhase(n,i,t)}}function s(t,e,n){if(n&&n.dispatchConfig.registrationName){var o=n.dispatchConfig.registrationName,i=M(t,o);i&&(n._dispatchListeners=p(n._dispatchListeners,i),n._dispatchInstances=p(n._dispatchInstances,t))}}function l(t){t&&t.dispatchConfig.registrationName&&s(t._targetInst,null,t)}function A(t){f(t,r)}function c(t){f(t,a)}function u(t,e,n,o){h.traverseEnterLeave(n,o,s,t,e)}function d(t){f(t,l)}var g=n(52),h=n(54),p=n(58),f=n(59),M=(n(56),g.getListener),w={accumulateTwoPhaseDispatches:A,accumulateTwoPhaseDispatchesSkipTarget:c,accumulateDirectDispatches:d,accumulateEnterLeaveDispatches:u};t.exports=w},function(t,e,n){"use strict";function o(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}function i(t,e,n){switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":return!(!n.disabled||!o(e));default:return!1}}var r=n(44),a=n(53),s=n(54),l=n(55),A=n(58),c=n(59),u=(n(46),{}),d=null,g=function(t,e){t&&(s.executeDispatchesInOrder(t,e),t.isPersistent()||t.constructor.release(t))},h=function(t){return g(t,!0)},p=function(t){return g(t,!1)},f=function(t){return"."+t._rootNodeID},M={injection:{injectEventPluginOrder:a.injectEventPluginOrder,injectEventPluginsByName:a.injectEventPluginsByName},putListener:function(t,e,n){"function"!=typeof n?r("94",e,typeof n):void 0;var o=f(t),i=u[e]||(u[e]={});i[o]=n;var s=a.registrationNameModules[e];s&&s.didPutListener&&s.didPutListener(t,e,n)},getListener:function(t,e){var n=u[e];if(i(e,t._currentElement.type,t._currentElement.props))return null;var o=f(t);return n&&n[o]},deleteListener:function(t,e){var n=a.registrationNameModules[e];n&&n.willDeleteListener&&n.willDeleteListener(t,e);var o=u[e];if(o){var i=f(t);delete o[i]}},deleteAllListeners:function(t){var e=f(t);for(var n in u)if(u.hasOwnProperty(n)&&u[n][e]){var o=a.registrationNameModules[n];o&&o.willDeleteListener&&o.willDeleteListener(t,n),delete u[n][e]}},extractEvents:function(t,e,n,o){for(var i,r=a.plugins,s=0;s-1?void 0:a("96",t),!A.plugins[n]){e.extractEvents?void 0:a("97",t),A.plugins[n]=e;var o=e.eventTypes;for(var r in o)i(o[r],e,r)?void 0:a("98",r,t)}}}function i(t,e,n){A.eventNameDispatchConfigs.hasOwnProperty(n)?a("99",n):void 0,A.eventNameDispatchConfigs[n]=t;var o=t.phasedRegistrationNames;if(o){for(var i in o)if(o.hasOwnProperty(i)){var s=o[i];r(s,e,n)}return!0}return!!t.registrationName&&(r(t.registrationName,e,n),!0)}function r(t,e,n){A.registrationNameModules[t]?a("100",t):void 0,A.registrationNameModules[t]=e,A.registrationNameDependencies[t]=e.eventTypes[n].dependencies}var a=n(44),s=(n(46),null),l={},A={plugins:[],eventNameDispatchConfigs:{},registrationNameModules:{},registrationNameDependencies:{},possibleRegistrationNames:null,injectEventPluginOrder:function(t){s?a("101"):void 0,s=Array.prototype.slice.call(t),o()},injectEventPluginsByName:function(t){var e=!1;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];l.hasOwnProperty(n)&&l[n]===i||(l[n]?a("102",n):void 0,l[n]=i,e=!0)}e&&o()},getPluginModuleForEvent:function(t){var e=t.dispatchConfig;if(e.registrationName)return A.registrationNameModules[e.registrationName]||null;if(void 0!==e.phasedRegistrationNames){var n=e.phasedRegistrationNames;for(var o in n)if(n.hasOwnProperty(o)){var i=A.registrationNameModules[n[o]];if(i)return i}}return null},_resetEventPlugins:function(){s=null;for(var t in l)l.hasOwnProperty(t)&&delete l[t];A.plugins.length=0;var e=A.eventNameDispatchConfigs;for(var n in e)e.hasOwnProperty(n)&&delete e[n];var o=A.registrationNameModules;for(var i in o)o.hasOwnProperty(i)&&delete o[i]}};t.exports=A},function(t,e,n){"use strict";function o(t){return"topMouseUp"===t||"topTouchEnd"===t||"topTouchCancel"===t}function i(t){return"topMouseMove"===t||"topTouchMove"===t}function r(t){return"topMouseDown"===t||"topTouchStart"===t}function a(t,e,n,o){var i=t.type||"unknown-event";t.currentTarget=M.getNodeFromInstance(o),e?p.invokeGuardedCallbackWithCatch(i,n,t):p.invokeGuardedCallback(i,n,t),t.currentTarget=null}function s(t,e){var n=t._dispatchListeners,o=t._dispatchInstances;if(Array.isArray(n))for(var i=0;i1?1-e:void 0;return this._fallbackText=i.slice(t,s),this._fallbackText}}),r.addPoolingTo(o),t.exports=o},function(t,e,n){"use strict";var o=n(44),i=(n(46),function(t){var e=this;if(e.instancePool.length){var n=e.instancePool.pop();return e.call(n,t),n}return new e(t)}),r=function(t,e){var n=this;if(n.instancePool.length){var o=n.instancePool.pop();return n.call(o,t,e),o}return new n(t,e)},a=function(t,e,n){var o=this;if(o.instancePool.length){var i=o.instancePool.pop();return o.call(i,t,e,n),i}return new o(t,e,n)},s=function(t,e,n,o){var i=this;if(i.instancePool.length){var r=i.instancePool.pop();return i.call(r,t,e,n,o),r}return new i(t,e,n,o)},l=function(t,e,n,o,i){var r=this;if(r.instancePool.length){var a=r.instancePool.pop();return r.call(a,t,e,n,o,i),a}return new r(t,e,n,o,i)},A=function(t){var e=this;t instanceof e?void 0:o("25"),t.destructor(),e.instancePool.length8));var Q=!1;C.canUseDOM&&(Q=N("input")&&(!document.documentMode||document.documentMode>11));var j={get:function(){return B.get.call(this)},set:function(t){L=""+t,B.set.call(this,t)}},U={eventTypes:x,extractEvents:function(t,e,n,i){var r,a,s=e?y.getNodeFromInstance(e):window;if(o(s)?S?r=l:a=A:b(s)?Q?r=g:(r=p,a=h):f(s)&&(r=M),r){var c=r(t,e);if(c){var u=E.getPooled(x.change,c,n,i);return u.type="change",T.accumulateTwoPhaseDispatches(u),u}}a&&a(t,s,e)}};t.exports=U},function(t,e,n){"use strict";function o(){x.ReactReconcileTransaction&&y?void 0:c("123")}function i(){this.reinitializeTransaction(),this.dirtyComponentsLength=null,this.callbackQueue=d.getPooled(),this.reconcileTransaction=x.ReactReconcileTransaction.getPooled(!0)}function r(t,e,n,i,r,a){return o(),y.batchedUpdates(t,e,n,i,r,a)}function a(t,e){return t._mountOrder-e._mountOrder}function s(t){var e=t.dirtyComponentsLength;e!==M.length?c("124",e,M.length):void 0,M.sort(a),w++;for(var n=0;n]/,l=n(91),A=l(function(t,e){if(t.namespaceURI!==r.svg||"innerHTML"in t)t.innerHTML=e;else{o=o||document.createElement("div"),o.innerHTML=""+e+"";for(var n=o.firstChild;n.firstChild;)t.appendChild(n.firstChild)}});if(i.canUseDOM){var c=document.createElement("div");c.innerHTML=" ",""===c.innerHTML&&(A=function(t,e){if(t.parentNode&&t.parentNode.replaceChild(t,t),a.test(e)||"<"===e[0]&&s.test(e)){t.innerHTML=String.fromCharCode(65279)+e;var n=t.firstChild;1===n.data.length?t.removeChild(n):n.deleteData(0,1)}else t.innerHTML=e}),c=null}t.exports=A},function(t,e){"use strict";var n=function(t){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,n,o,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,o,i)})}:t};t.exports=n},function(t,e,n){"use strict";var o=n(60),i=n(93),r=n(90),a=function(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&3===n.nodeType)return void(n.nodeValue=e)}t.textContent=e};o.canUseDOM&&("textContent"in document.documentElement||(a=function(t,e){return 3===t.nodeType?void(t.nodeValue=e):void r(t,i(e))})),t.exports=a},function(t,e){"use strict";function n(t){var e=""+t,n=i.exec(e);if(!n)return e;var o,r="",a=0,s=0;for(a=n.index;a]/;t.exports=o},function(t,e,n){"use strict";var o=n(44),i=n(88),r=n(60),a=n(95),s=n(57),l=(n(46),{dangerouslyReplaceNodeWithMarkup:function(t,e){if(r.canUseDOM?void 0:o("56"),e?void 0:o("57"),"HTML"===t.nodeName?o("58"):void 0,"string"==typeof e){var n=a(e,s)[0];t.parentNode.replaceChild(n,t)}else i.replaceChildWithTree(t,e)}});t.exports=l},function(t,e,n){"use strict";function o(t){var e=t.match(c);return e&&e[1].toLowerCase()}function i(t,e){var n=A;A?void 0:l(!1);var i=o(t),r=i&&s(i);if(r){n.innerHTML=r[1]+t+r[2];for(var c=r[0];c--;)n=n.lastChild}else n.innerHTML=t;var u=n.getElementsByTagName("script");u.length&&(e?void 0:l(!1),a(u).forEach(e));for(var d=Array.from(n.childNodes);n.lastChild;)n.removeChild(n.lastChild);return d}var r=n(60),a=n(96),s=n(97),l=n(46),A=r.canUseDOM?document.createElement("div"):null,c=/^\s*<(\w+)/;t.exports=i},function(t,e,n){"use strict";function o(t){var e=t.length;if(Array.isArray(t)||"object"!=typeof t&&"function"!=typeof t?a(!1):void 0,"number"!=typeof e?a(!1):void 0,0===e||e-1 in t?void 0:a(!1),"function"==typeof t.callee?a(!1):void 0,t.hasOwnProperty)try{return Array.prototype.slice.call(t)}catch(t){}for(var n=Array(e),o=0;o":a.innerHTML="<"+t+">",s[t]=!a.firstChild),s[t]?d[t]:null}var i=n(60),r=n(46),a=i.canUseDOM?document.createElement("div"):null,s={},l=[1,'"],A=[1,"","
    "],c=[3,"","
    "],u=[1,'',""],d={"*":[1,"?
    ","
    "],area:[1,"",""],col:[2,"","
    "],legend:[1,"
    ","
    "],param:[1,"",""],tr:[2,"","
    "],optgroup:l,option:l,caption:A,colgroup:A,tbody:A,tfoot:A,thead:A,td:c,th:c},g=["circle","clipPath","defs","ellipse","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","text","tspan"];g.forEach(function(t){d[t]=u,s[t]=!0}),t.exports=o},function(t,e,n){"use strict";var o=n(87),i=n(43),r={dangerouslyProcessChildrenUpdates:function(t,e){var n=i.getNodeFromInstance(t);o.processUpdates(n,e)}};t.exports=r},function(t,e,n){"use strict";function o(t){if(t){var e=t._currentElement._owner||null;if(e){var n=e.getName();if(n)return" This DOM node was rendered by `"+n+"`."}}return""}function i(t,e){e&&(J[t._tag]&&(null!=e.children||null!=e.dangerouslySetInnerHTML?p("137",t._tag,t._currentElement._owner?" Check the render method of "+t._currentElement._owner.getName()+".":""):void 0),null!=e.dangerouslySetInnerHTML&&(null!=e.children?p("60"):void 0,"object"==typeof e.dangerouslySetInnerHTML&&F in e.dangerouslySetInnerHTML?void 0:p("61")),null!=e.style&&"object"!=typeof e.style?p("62",o(t)):void 0)}function r(t,e,n,o){if(!(o instanceof Q)){var i=t._hostContainerInfo,r=i._node&&i._node.nodeType===P,s=r?i._node:i._ownerDocument;z(e,s),o.getReactMountReady().enqueue(a,{inst:t,registrationName:e,listener:n})}}function a(){var t=this;E.putListener(t.inst,t.registrationName,t.listener)}function s(){var t=this;D.postMountWrapper(t)}function l(){var t=this;B.postMountWrapper(t)}function A(){var t=this;v.postMountWrapper(t)}function c(){var t=this;t._rootNodeID?void 0:p("63");var e=R(t);switch(e?void 0:p("64"),t._tag){case"iframe":case"object":t._wrapperState.listeners=[N.trapBubbledEvent("topLoad","load",e)];break;case"video":case"audio":t._wrapperState.listeners=[];for(var n in G)G.hasOwnProperty(n)&&t._wrapperState.listeners.push(N.trapBubbledEvent(n,G[n],e));break;case"source":t._wrapperState.listeners=[N.trapBubbledEvent("topError","error",e)];break;case"img":t._wrapperState.listeners=[N.trapBubbledEvent("topError","error",e),N.trapBubbledEvent("topLoad","load",e)];break;case"form":t._wrapperState.listeners=[N.trapBubbledEvent("topReset","reset",e),N.trapBubbledEvent("topSubmit","submit",e)];break;case"input":case"select":case"textarea":t._wrapperState.listeners=[N.trapBubbledEvent("topInvalid","invalid",e)]}}function u(){L.postUpdateWrapper(this)}function d(t){_.call(K,t)||(Z.test(t)?void 0:p("65",t),K[t]=!0)}function g(t,e){return t.indexOf("-")>=0||null!=e.is}function h(t){var e=t.type;d(e),this._currentElement=t,this._tag=e.toLowerCase(),this._namespaceURI=null, +this._renderedChildren=null,this._previousStyle=null,this._previousStyleCopy=null,this._hostNode=null,this._hostParent=null,this._rootNodeID=0,this._domID=0,this._hostContainerInfo=null,this._wrapperState=null,this._topLevelWrapper=null,this._flags=0}var p=n(44),f=n(16),M=n(100),w=n(102),T=n(88),C=n(89),y=n(45),I=n(110),E=n(52),m=n(53),N=n(112),b=n(47),x=n(43),D=n(115),v=n(118),L=n(119),B=n(120),S=(n(74),n(121)),Q=n(141),j=(n(57),n(93)),U=(n(46),n(77),n(130),n(144),n(56),b),k=E.deleteListener,R=x.getNodeFromInstance,z=N.listenTo,O=m.registrationNameModules,Y={string:!0,number:!0},H="style",F="__html",V={children:null,dangerouslySetInnerHTML:null,suppressContentEditableWarning:null},P=11,G={topAbort:"abort",topCanPlay:"canplay",topCanPlayThrough:"canplaythrough",topDurationChange:"durationchange",topEmptied:"emptied",topEncrypted:"encrypted",topEnded:"ended",topError:"error",topLoadedData:"loadeddata",topLoadedMetadata:"loadedmetadata",topLoadStart:"loadstart",topPause:"pause",topPlay:"play",topPlaying:"playing",topProgress:"progress",topRateChange:"ratechange",topSeeked:"seeked",topSeeking:"seeking",topStalled:"stalled",topSuspend:"suspend",topTimeUpdate:"timeupdate",topVolumeChange:"volumechange",topWaiting:"waiting"},W={area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0},X={listing:!0,pre:!0,textarea:!0},J=f({menuitem:!0},W),Z=/^[a-zA-Z][a-zA-Z:_\.\-\d]*$/,K={},_={}.hasOwnProperty,q=1;h.displayName="ReactDOMComponent",h.Mixin={mountComponent:function(t,e,n,o){this._rootNodeID=q++,this._domID=n._idCounter++,this._hostParent=e,this._hostContainerInfo=n;var r=this._currentElement.props;switch(this._tag){case"audio":case"form":case"iframe":case"img":case"link":case"object":case"source":case"video":this._wrapperState={listeners:null},t.getReactMountReady().enqueue(c,this);break;case"input":D.mountWrapper(this,r,e),r=D.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"option":v.mountWrapper(this,r,e),r=v.getHostProps(this,r);break;case"select":L.mountWrapper(this,r,e),r=L.getHostProps(this,r),t.getReactMountReady().enqueue(c,this);break;case"textarea":B.mountWrapper(this,r,e),r=B.getHostProps(this,r),t.getReactMountReady().enqueue(c,this)}i(this,r);var a,u;null!=e?(a=e._namespaceURI,u=e._tag):n._tag&&(a=n._namespaceURI,u=n._tag),(null==a||a===C.svg&&"foreignobject"===u)&&(a=C.html),a===C.html&&("svg"===this._tag?a=C.svg:"math"===this._tag&&(a=C.mathml)),this._namespaceURI=a;var d;if(t.useCreateElement){var g,h=n._ownerDocument;if(a===C.html)if("script"===this._tag){var p=h.createElement("div"),f=this._currentElement.type;p.innerHTML="<"+f+">",g=p.removeChild(p.firstChild)}else g=r.is?h.createElement(this._currentElement.type,r.is):h.createElement(this._currentElement.type);else g=h.createElementNS(a,this._currentElement.type);x.precacheNode(this,g),this._flags|=U.hasCachedChildNodes,this._hostParent||I.setAttributeForRoot(g),this._updateDOMProperties(null,r,t);var w=T(g);this._createInitialChildren(t,r,o,w),d=w}else{var y=this._createOpenTagMarkupAndPutListeners(t,r),E=this._createContentMarkup(t,r,o);d=!E&&W[this._tag]?y+"/>":y+">"+E+""}switch(this._tag){case"input":t.getReactMountReady().enqueue(s,this),r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"textarea":t.getReactMountReady().enqueue(l,this),r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"select":r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"button":r.autoFocus&&t.getReactMountReady().enqueue(M.focusDOMComponent,this);break;case"option":t.getReactMountReady().enqueue(A,this)}return d},_createOpenTagMarkupAndPutListeners:function(t,e){var n="<"+this._currentElement.type;for(var o in e)if(e.hasOwnProperty(o)){var i=e[o];if(null!=i)if(O.hasOwnProperty(o))i&&r(this,o,i,t);else{o===H&&(i&&(i=this._previousStyleCopy=f({},e.style)),i=w.createMarkupForStyles(i,this));var a=null;null!=this._tag&&g(this._tag,e)?V.hasOwnProperty(o)||(a=I.createMarkupForCustomAttribute(o,i)):a=I.createMarkupForProperty(o,i),a&&(n+=" "+a)}}return t.renderToStaticMarkup?n:(this._hostParent||(n+=" "+I.createMarkupForRoot()),n+=" "+I.createMarkupForID(this._domID))},_createContentMarkup:function(t,e,n){var o="",i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&(o=i.__html);else{var r=Y[typeof e.children]?e.children:null,a=null!=r?null:e.children;if(null!=r)o=j(r);else if(null!=a){var s=this.mountChildren(a,t,n);o=s.join("")}}return X[this._tag]&&"\n"===o.charAt(0)?"\n"+o:o},_createInitialChildren:function(t,e,n,o){var i=e.dangerouslySetInnerHTML;if(null!=i)null!=i.__html&&T.queueHTML(o,i.__html);else{var r=Y[typeof e.children]?e.children:null,a=null!=r?null:e.children;if(null!=r)T.queueText(o,r);else if(null!=a)for(var s=this.mountChildren(a,t,n),l=0;l1)for(var n=1;n0&&o.length<20?n+" (keys: "+o.join(", ")+")":n}function r(t,e){var n=s.get(t);if(!n){return null}return n}var a=n(44),s=(n(22),n(123)),l=(n(74),n(68)),A=(n(46),n(56),{isMounted:function(t){var e=s.get(t);return!!e&&!!e._renderedComponent},enqueueCallback:function(t,e,n){A.validateCallback(e,n);var i=r(t);return i?(i._pendingCallbacks?i._pendingCallbacks.push(e):i._pendingCallbacks=[e],void o(i)):null},enqueueCallbackInternal:function(t,e){t._pendingCallbacks?t._pendingCallbacks.push(e):t._pendingCallbacks=[e],o(t)},enqueueForceUpdate:function(t){var e=r(t,"forceUpdate");e&&(e._pendingForceUpdate=!0,o(e))},enqueueReplaceState:function(t,e){var n=r(t,"replaceState");n&&(n._pendingStateQueue=[e],n._pendingReplaceState=!0,o(n))},enqueueSetState:function(t,e){var n=r(t,"setState");if(n){var i=n._pendingStateQueue||(n._pendingStateQueue=[]);i.push(e),o(n)}},enqueueElementInternal:function(t,e,n){t._pendingElement=e,t._context=n,o(t)},validateCallback:function(t,e){t&&"function"!=typeof t?a("122",e,i(t)):void 0}});t.exports=A},function(t,e,n){"use strict";var o=(n(16),n(57)),i=(n(56),o);t.exports=i},function(t,e,n){"use strict";var o=n(16),i=n(88),r=n(43),a=function(t){this._currentElement=null,this._hostNode=null,this._hostParent=null,this._hostContainerInfo=null,this._domID=0};o(a.prototype,{mountComponent:function(t,e,n,o){var a=n._idCounter++;this._domID=a,this._hostParent=e,this._hostContainerInfo=n;var s=" react-empty: "+this._domID+" ";if(t.useCreateElement){var l=n._ownerDocument,A=l.createComment(s);return r.precacheNode(this,A),i(A)}return t.renderToStaticMarkup?"":""},receiveComponent:function(){},getHostNode:function(){return r.getNodeFromInstance(this)},unmountComponent:function(){r.uncacheNode(this)}}),t.exports=a},function(t,e,n){"use strict";function o(t,e){"_hostNode"in t?void 0:l("33"),"_hostNode"in e?void 0:l("33");for(var n=0,o=t;o;o=o._hostParent)n++;for(var i=0,r=e;r;r=r._hostParent)i++;for(;n-i>0;)t=t._hostParent,n--;for(;i-n>0;)e=e._hostParent,i--;for(var a=n;a--;){if(t===e)return t;t=t._hostParent,e=e._hostParent}return null}function i(t,e){"_hostNode"in t?void 0:l("35"),"_hostNode"in e?void 0:l("35");for(;e;){if(e===t)return!0;e=e._hostParent}return!1}function r(t){return"_hostNode"in t?void 0:l("36"),t._hostParent}function a(t,e,n){for(var o=[];t;)o.push(t),t=t._hostParent;var i;for(i=o.length;i-- >0;)e(o[i],"captured",n);for(i=0;i0;)n(l[A],"captured",r)}var l=n(44);n(46);t.exports={isAncestor:i,getLowestCommonAncestor:o,getParentInstance:r,traverseTwoPhase:a,traverseEnterLeave:s}},function(t,e,n){"use strict";var o=n(44),i=n(16),r=n(87),a=n(88),s=n(43),l=n(93),A=(n(46),n(144),function(t){this._currentElement=t,this._stringText=""+t,this._hostNode=null,this._hostParent=null,this._domID=0,this._mountIndex=0,this._closingComment=null,this._commentNodes=null});i(A.prototype,{mountComponent:function(t,e,n,o){var i=n._idCounter++,r=" react-text: "+i+" ",A=" /react-text ";if(this._domID=i,this._hostParent=e,t.useCreateElement){var c=n._ownerDocument,u=c.createComment(r),d=c.createComment(A),g=a(c.createDocumentFragment());return a.queueChild(g,a(u)),this._stringText&&a.queueChild(g,a(c.createTextNode(this._stringText))),a.queueChild(g,a(d)),s.precacheNode(this,u),this._closingComment=d,g}var h=l(this._stringText);return t.renderToStaticMarkup?h:""+h+""},receiveComponent:function(t,e){if(t!==this._currentElement){this._currentElement=t;var n=""+t;if(n!==this._stringText){this._stringText=n;var o=this.getHostNode();r.replaceDelimitedText(o[0],o[1],n)}}},getHostNode:function(){var t=this._commentNodes;if(t)return t;if(!this._closingComment)for(var e=s.getNodeFromInstance(this),n=e.nextSibling;;){if(null==n?o("67",this._domID):void 0,8===n.nodeType&&" /react-text "===n.nodeValue){this._closingComment=n;break}n=n.nextSibling}return t=[this._hostNode,this._closingComment],this._commentNodes=t,t},unmountComponent:function(){this._closingComment=null,this._commentNodes=null,s.uncacheNode(this)}}),t.exports=A},function(t,e,n){"use strict";function o(){this.reinitializeTransaction()}var i=n(16),r=n(68),a=n(75),s=n(57),l={initialize:s,close:function(){d.isBatchingUpdates=!1}},A={initialize:s,close:r.flushBatchedUpdates.bind(r)},c=[A,l];i(o.prototype,a,{getTransactionWrappers:function(){return c}});var u=new o,d={isBatchingUpdates:!1,batchedUpdates:function(t,e,n,o,i,r){var a=d.isBatchingUpdates;return d.isBatchingUpdates=!0,a?t(e,n,o,i,r):u.perform(t,null,e,n,o,i,r)}};t.exports=d},function(t,e,n){"use strict";function o(t){for(;t._hostParent;)t=t._hostParent;var e=u.getNodeFromInstance(t),n=e.parentNode;return u.getClosestInstanceFromNode(n)}function i(t,e){this.topLevelType=t,this.nativeEvent=e,this.ancestors=[]}function r(t){var e=g(t.nativeEvent),n=u.getClosestInstanceFromNode(e),i=n;do t.ancestors.push(i),i=i&&o(i);while(i);for(var r=0;re.end?(n=e.end,o=e.start):(n=e.start,o=e.end),i.moveToElementText(t),i.moveStart("character",n),i.setEndPoint("EndToStart",i),i.moveEnd("character",o-n),i.select()}function s(t,e){if(window.getSelection){var n=window.getSelection(),o=t[c()].length,i=Math.min(e.start,o),r=void 0===e.end?i:Math.min(e.end,o);if(!n.extend&&i>r){var a=r;r=i,i=a}var s=A(t,i),l=A(t,r);if(s&&l){var u=document.createRange();u.setStart(s.node,s.offset),n.removeAllRanges(),i>r?(n.addRange(u),n.extend(l.node,l.offset)):(u.setEnd(l.node,l.offset),n.addRange(u))}}}var l=n(60),A=n(156),c=n(63),u=l.canUseDOM&&"selection"in document&&!("getSelection"in window),d={getOffsets:u?i:r,setOffsets:u?a:s};t.exports=d},function(t,e){"use strict";function n(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function o(t){for(;t;){if(t.nextSibling)return t.nextSibling;t=t.parentNode}}function i(t,e){for(var i=n(t),r=0,a=0;i;){if(3===i.nodeType){if(a=r+i.textContent.length,r<=e&&a>=e)return{node:i,offset:e-r};r=a}i=n(o(i))}}t.exports=i},function(t,e,n){"use strict";function o(t,e){return!(!t||!e)&&(t===e||!i(t)&&(i(e)?o(t,e.parentNode):"contains"in t?t.contains(e):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(e))))}var i=n(158);t.exports=o},function(t,e,n){"use strict";function o(t){return i(t)&&3==t.nodeType}var i=n(159);t.exports=o},function(t,e){"use strict";function n(t){return!(!t||!("function"==typeof Node?t instanceof Node:"object"==typeof t&&"number"==typeof t.nodeType&&"string"==typeof t.nodeName))}t.exports=n},function(t,e){"use strict";function n(){if("undefined"==typeof document)return null;try{return document.activeElement||document.body}catch(t){return document.body}}t.exports=n},function(t,e){"use strict";var n={xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace"},o={accentHeight:"accent-height",accumulate:0,additive:0,alignmentBaseline:"alignment-baseline",allowReorder:"allowReorder",alphabetic:0,amplitude:0,arabicForm:"arabic-form",ascent:0,attributeName:"attributeName",attributeType:"attributeType",autoReverse:"autoReverse",azimuth:0,baseFrequency:"baseFrequency",baseProfile:"baseProfile",baselineShift:"baseline-shift",bbox:0,begin:0,bias:0,by:0,calcMode:"calcMode",capHeight:"cap-height",clip:0,clipPath:"clip-path",clipRule:"clip-rule",clipPathUnits:"clipPathUnits",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",contentScriptType:"contentScriptType",contentStyleType:"contentStyleType",cursor:0,cx:0,cy:0,d:0,decelerate:0,descent:0,diffuseConstant:"diffuseConstant",direction:0,display:0,divisor:0,dominantBaseline:"dominant-baseline",dur:0,dx:0,dy:0,edgeMode:"edgeMode",elevation:0,enableBackground:"enable-background",end:0,exponent:0,externalResourcesRequired:"externalResourcesRequired",fill:0,fillOpacity:"fill-opacity",fillRule:"fill-rule",filter:0,filterRes:"filterRes",filterUnits:"filterUnits",floodColor:"flood-color",floodOpacity:"flood-opacity",focusable:0,fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",format:0,from:0,fx:0,fy:0,g1:0,g2:0,glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",glyphRef:"glyphRef",gradientTransform:"gradientTransform",gradientUnits:"gradientUnits",hanging:0,horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",ideographic:0,imageRendering:"image-rendering",in:0,in2:0,intercept:0,k:0,k1:0,k2:0,k3:0,k4:0,kernelMatrix:"kernelMatrix",kernelUnitLength:"kernelUnitLength",kerning:0,keyPoints:"keyPoints",keySplines:"keySplines",keyTimes:"keyTimes",lengthAdjust:"lengthAdjust",letterSpacing:"letter-spacing",lightingColor:"lighting-color",limitingConeAngle:"limitingConeAngle",local:0,markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",markerHeight:"markerHeight",markerUnits:"markerUnits",markerWidth:"markerWidth",mask:0,maskContentUnits:"maskContentUnits",maskUnits:"maskUnits",mathematical:0,mode:0,numOctaves:"numOctaves",offset:0,opacity:0,operator:0,order:0,orient:0,orientation:0,origin:0,overflow:0,overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pathLength:"pathLength",patternContentUnits:"patternContentUnits",patternTransform:"patternTransform",patternUnits:"patternUnits",pointerEvents:"pointer-events",points:0,pointsAtX:"pointsAtX",pointsAtY:"pointsAtY",pointsAtZ:"pointsAtZ",preserveAlpha:"preserveAlpha",preserveAspectRatio:"preserveAspectRatio",primitiveUnits:"primitiveUnits",r:0,radius:0,refX:"refX",refY:"refY",renderingIntent:"rendering-intent",repeatCount:"repeatCount",repeatDur:"repeatDur",requiredExtensions:"requiredExtensions",requiredFeatures:"requiredFeatures",restart:0,result:0,rotate:0,rx:0,ry:0,scale:0,seed:0,shapeRendering:"shape-rendering",slope:0,spacing:0,specularConstant:"specularConstant",specularExponent:"specularExponent",speed:0,spreadMethod:"spreadMethod",startOffset:"startOffset",stdDeviation:"stdDeviation",stemh:0,stemv:0,stitchTiles:"stitchTiles",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",string:0,stroke:0,strokeDasharray:"stroke-dasharray",strokeDashoffset:"stroke-dashoffset",strokeLinecap:"stroke-linecap",strokeLinejoin:"stroke-linejoin",strokeMiterlimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",surfaceScale:"surfaceScale",systemLanguage:"systemLanguage",tableValues:"tableValues",targetX:"targetX",targetY:"targetY",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",textLength:"textLength",to:0,transform:0,u1:0,u2:0,underlinePosition:"underline-position", +underlineThickness:"underline-thickness",unicode:0,unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",values:0,vectorEffect:"vector-effect",version:0,vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",viewBox:"viewBox",viewTarget:"viewTarget",visibility:0,widths:0,wordSpacing:"word-spacing",writingMode:"writing-mode",x:0,xHeight:"x-height",x1:0,x2:0,xChannelSelector:"xChannelSelector",xlinkActuate:"xlink:actuate",xlinkArcrole:"xlink:arcrole",xlinkHref:"xlink:href",xlinkRole:"xlink:role",xlinkShow:"xlink:show",xlinkTitle:"xlink:title",xlinkType:"xlink:type",xmlBase:"xml:base",xmlns:0,xmlnsXlink:"xmlns:xlink",xmlLang:"xml:lang",xmlSpace:"xml:space",y:0,y1:0,y2:0,yChannelSelector:"yChannelSelector",z:0,zoomAndPan:"zoomAndPan"},i={Properties:{},DOMAttributeNamespaces:{xlinkActuate:n.xlink,xlinkArcrole:n.xlink,xlinkHref:n.xlink,xlinkRole:n.xlink,xlinkShow:n.xlink,xlinkTitle:n.xlink,xlinkType:n.xlink,xmlBase:n.xml,xmlLang:n.xml,xmlSpace:n.xml},DOMAttributeNames:{}};Object.keys(o).forEach(function(t){i.Properties[t]=0,o[t]&&(i.DOMAttributeNames[t]=o[t])}),t.exports=i},function(t,e,n){"use strict";function o(t){if("selectionStart"in t&&l.hasSelectionCapabilities(t))return{start:t.selectionStart,end:t.selectionEnd};if(window.getSelection){var e=window.getSelection();return{anchorNode:e.anchorNode,anchorOffset:e.anchorOffset,focusNode:e.focusNode,focusOffset:e.focusOffset}}if(document.selection){var n=document.selection.createRange();return{parentElement:n.parentElement(),text:n.text,top:n.boundingTop,left:n.boundingLeft}}}function i(t,e){if(w||null==p||p!==c())return null;var n=o(p);if(!M||!d(M,n)){M=n;var i=A.getPooled(h.select,f,t,e);return i.type="select",i.target=p,r.accumulateTwoPhaseDispatches(i),i}return null}var r=n(51),a=n(60),s=n(43),l=n(154),A=n(65),c=n(160),u=n(78),d=n(130),g=a.canUseDOM&&"documentMode"in document&&document.documentMode<=11,h={select:{phasedRegistrationNames:{bubbled:"onSelect",captured:"onSelectCapture"},dependencies:["topBlur","topContextMenu","topFocus","topKeyDown","topKeyUp","topMouseDown","topMouseUp","topSelectionChange"]}},p=null,f=null,M=null,w=!1,T=!1,C={eventTypes:h,extractEvents:function(t,e,n,o){if(!T)return null;var r=e?s.getNodeFromInstance(e):window;switch(t){case"topFocus":(u(r)||"true"===r.contentEditable)&&(p=r,f=e,M=null);break;case"topBlur":p=null,f=null,M=null;break;case"topMouseDown":w=!0;break;case"topContextMenu":case"topMouseUp":return w=!1,i(n,o);case"topSelectionChange":if(g)break;case"topKeyDown":case"topKeyUp":return i(n,o)}return null},didPutListener:function(t,e,n){"onSelect"===e&&(T=!0)}};t.exports=C},function(t,e,n){"use strict";function o(t){return"."+t._rootNodeID}function i(t){return"button"===t||"input"===t||"select"===t||"textarea"===t}var r=n(44),a=n(150),s=n(51),l=n(43),A=n(164),c=n(165),u=n(65),d=n(166),g=n(167),h=n(81),p=n(170),f=n(171),M=n(172),w=n(82),T=n(173),C=n(57),y=n(168),I=(n(46),{}),E={};["abort","animationEnd","animationIteration","animationStart","blur","canPlay","canPlayThrough","click","contextMenu","copy","cut","doubleClick","drag","dragEnd","dragEnter","dragExit","dragLeave","dragOver","dragStart","drop","durationChange","emptied","encrypted","ended","error","focus","input","invalid","keyDown","keyPress","keyUp","load","loadedData","loadedMetadata","loadStart","mouseDown","mouseMove","mouseOut","mouseOver","mouseUp","paste","pause","play","playing","progress","rateChange","reset","scroll","seeked","seeking","stalled","submit","suspend","timeUpdate","touchCancel","touchEnd","touchMove","touchStart","transitionEnd","volumeChange","waiting","wheel"].forEach(function(t){var e=t[0].toUpperCase()+t.slice(1),n="on"+e,o="top"+e,i={phasedRegistrationNames:{bubbled:n,captured:n+"Capture"},dependencies:[o]};I[t]=i,E[o]=i});var m={},N={eventTypes:I,extractEvents:function(t,e,n,o){var i=E[t];if(!i)return null;var a;switch(t){case"topAbort":case"topCanPlay":case"topCanPlayThrough":case"topDurationChange":case"topEmptied":case"topEncrypted":case"topEnded":case"topError":case"topInput":case"topInvalid":case"topLoad":case"topLoadedData":case"topLoadedMetadata":case"topLoadStart":case"topPause":case"topPlay":case"topPlaying":case"topProgress":case"topRateChange":case"topReset":case"topSeeked":case"topSeeking":case"topStalled":case"topSubmit":case"topSuspend":case"topTimeUpdate":case"topVolumeChange":case"topWaiting":a=u;break;case"topKeyPress":if(0===y(n))return null;case"topKeyDown":case"topKeyUp":a=g;break;case"topBlur":case"topFocus":a=d;break;case"topClick":if(2===n.button)return null;case"topDoubleClick":case"topMouseDown":case"topMouseMove":case"topMouseUp":case"topMouseOut":case"topMouseOver":case"topContextMenu":a=h;break;case"topDrag":case"topDragEnd":case"topDragEnter":case"topDragExit":case"topDragLeave":case"topDragOver":case"topDragStart":case"topDrop":a=p;break;case"topTouchCancel":case"topTouchEnd":case"topTouchMove":case"topTouchStart":a=f;break;case"topAnimationEnd":case"topAnimationIteration":case"topAnimationStart":a=A;break;case"topTransitionEnd":a=M;break;case"topScroll":a=w;break;case"topWheel":a=T;break;case"topCopy":case"topCut":case"topPaste":a=c}a?void 0:r("86",t);var l=a.getPooled(i,e,n,o);return s.accumulateTwoPhaseDispatches(l),l},didPutListener:function(t,e,n){if("onClick"===e&&!i(t._tag)){var r=o(t),s=l.getNodeFromInstance(t);m[r]||(m[r]=a.listen(s,"click",C))}},willDeleteListener:function(t,e){if("onClick"===e&&!i(t._tag)){var n=o(t);m[n].remove(),delete m[n]}}};t.exports=N},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={animationName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r={relatedTarget:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(168),a=n(169),s=n(84),l={key:a,location:null,ctrlKey:null,shiftKey:null,altKey:null,metaKey:null,repeat:null,locale:null,getModifierState:s,charCode:function(t){return"keypress"===t.type?r(t):0},keyCode:function(t){return"keydown"===t.type||"keyup"===t.type?t.keyCode:0},which:function(t){return"keypress"===t.type?r(t):"keydown"===t.type||"keyup"===t.type?t.keyCode:0}};i.augmentClass(o,l),t.exports=o},function(t,e){"use strict";function n(t){var e,n=t.keyCode;return"charCode"in t?(e=t.charCode,0===e&&13===n&&(e=13)):e=n,e>=32||13===e?e:0}t.exports=n},function(t,e,n){"use strict";function o(t){if(t.key){var e=r[t.key]||t.key;if("Unidentified"!==e)return e}if("keypress"===t.type){var n=i(t);return 13===n?"Enter":String.fromCharCode(n)}return"keydown"===t.type||"keyup"===t.type?a[t.keyCode]||"Unidentified":""}var i=n(168),r={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},a={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"};t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={dataTransfer:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(82),r=n(84),a={touches:null,targetTouches:null,changedTouches:null,altKey:null,metaKey:null,ctrlKey:null,shiftKey:null,getModifierState:r};i.augmentClass(o,a),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(65),r={propertyName:null,elapsedTime:null,pseudoElement:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e,n,o){return i.call(this,t,e,n,o)}var i=n(81),r={deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:null,deltaMode:null};i.augmentClass(o,r),t.exports=o},function(t,e,n){"use strict";function o(t,e){for(var n=Math.min(t.length,e.length),o=0;o.":"function"==typeof e?" Instead of passing a class like Foo, pass React.createElement(Foo) or .":null!=e&&void 0!==e.props?" This may be caused by unintentionally loading two independent copies of React.":"");var a,s=f.createElement(z,{child:e});if(t){var l=I.get(t);a=l._processChildContext(l._context)}else a=x;var c=d(n);if(c){var u=c._currentElement,h=u.props.child;if(L(h,e)){var p=c._renderedComponent.getPublicInstance(),M=o&&function(){o.call(p)};return O._updateRootComponent(c,s,a,n,M),p}O.unmountComponentAtNode(n)}var w=i(n),T=w&&!!r(w),C=A(n),y=T&&!c&&!C,E=O._renderNewRootComponent(s,n,y,a)._renderedComponent.getPublicInstance();return o&&o.call(E),E},render:function(t,e,n){return O._renderSubtreeIntoContainer(null,t,e,n)},unmountComponentAtNode:function(t){c(t)?void 0:g("40");var e=d(t);if(!e){A(t),1===t.nodeType&&t.hasAttribute(S);return!1}return delete k[e._instance.rootID],b.batchedUpdates(l,e,t,!1),!0},_mountImageIntoNode:function(t,e,n,r,a){if(c(e)?void 0:g("41"),r){var s=i(e);if(E.canReuseMarkup(t,s))return void w.precacheNode(n,s);var l=s.getAttribute(E.CHECKSUM_ATTR_NAME);s.removeAttribute(E.CHECKSUM_ATTR_NAME);var A=s.outerHTML;s.setAttribute(E.CHECKSUM_ATTR_NAME,l);var u=t,d=o(u,A),p=" (client) "+u.substring(d-20,d+20)+"\n (server) "+A.substring(d-20,d+20);e.nodeType===j?g("42",p):void 0}if(e.nodeType===j?g("43"):void 0,a.useCreateElement){for(;e.lastChild;)e.removeChild(e.lastChild);h.insertTreeBefore(e,t,null)}else v(e,t),w.precacheNode(n,e.firstChild)}};t.exports=O},function(t,e,n){"use strict";function o(t,e){var n={_topLevelWrapper:t,_idCounter:1,_ownerDocument:e?e.nodeType===i?e:e.ownerDocument:null,_node:e,_tag:e?e.nodeName.toLowerCase():null,_namespaceURI:e?e.namespaceURI:null};return n}var i=(n(144),9);t.exports=o},function(t,e){"use strict";var n={useCreateElement:!0,useFiber:!1};t.exports=n},function(t,e,n){"use strict";var o=n(178),i=/\/?>/,r=/^<\!\-\-/,a={CHECKSUM_ATTR_NAME:"data-react-checksum",addChecksumToMarkup:function(t){var e=o(t);return r.test(t)?t:t.replace(i," "+a.CHECKSUM_ATTR_NAME+'="'+e+'"$&')},canReuseMarkup:function(t,e){var n=e.getAttribute(a.CHECKSUM_ATTR_NAME);n=n&&parseInt(n,10);var i=o(t);return i===n}};t.exports=a},function(t,e){"use strict";function n(t){for(var e=1,n=0,i=0,r=t.length,a=r&-4;i服务端错误:"+t.responseText+""):bootbox.alert("服务端出错")}})}function r(t,e){if("number"==typeof t&&(t=new Date(t)),"string"==typeof t)return t;var n={"M+":t.getMonth()+1,"d+":t.getDate(),"H+":t.getHours(),"m+":t.getMinutes(),"s+":t.getSeconds()};/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(t.getFullYear()+"").substr(4-RegExp.$1.length)));for(var o in n)new RegExp("("+o+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?n[o]:("00"+n[o]).substr((""+n[o]).length)));return e}Object.defineProperty(e,"__esModule",{value:!0}),e.nextIFrameId=n,e.getParameter=o,e.ajaxSave=i,e.formatDate=r,window.iframe_id_=1},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(){var t="_ui_"+c++;return t}function r(t,e){var n=window._server+"/frame/loadFileVersions";$.ajax({url:n,data:{file:t},type:"POST",success:function(t){s(t),e(t)},error:function(){alert("加载文件["+t+"]的版本信息失败.")}})}function a(t,e){var n=window._server+"/common/loadResourceTreeData";$.ajax({url:n,data:t,type:"POST",success:function(t){s(t),e(t)},error:function(){alert("加载资源失败.")}})}function s(t){switch(t.type){case"root":t._icon=A.default.frameStyle.getRootIcon(),t._style=A.default.frameStyle.getRootIconStyle();break;case"folder":t._icon=A.default.frameStyle.getFolderIcon(),t._style=A.default.frameStyle.getFolderIconStyle();break;case"rule":t._icon=A.default.frameStyle.getRuleIcon(),t._style=A.default.frameStyle.getRuleIconStyle(),t.editorPath="/ruleeditor";break;case"project":t._icon=A.default.frameStyle.getProjectIcon(),t._style=A.default.frameStyle.getProjectIconStyle();break;case"resource":t._icon=A.default.frameStyle.getResourceIcon(),t._style=A.default.frameStyle.getResourceIconStyle();break;case"resourcePackage":t._icon=A.default.frameStyle.getResourcePackageIcon(),t._style=A.default.frameStyle.getResourcePackageIconStyle(),t.editorPath="/packageeditor";break;case"lib":t._icon=A.default.frameStyle.getLibIcon(),t._style=A.default.frameStyle.getLibIconStyle();break;case"action":t._icon=A.default.frameStyle.getActionIcon(),t._style=A.default.frameStyle.getActionIconStyle(),t.editorPath="/actioneditor";break;case"parameter":t._icon=A.default.frameStyle.getParameterIcon(),t._style=A.default.frameStyle.getParameterIconStyle(),t.editorPath="/parametereditor";break;case"constant":t._icon=A.default.frameStyle.getConstantIcon(),t._style=A.default.frameStyle.getConstantIconStyle(),t.editorPath="/constanteditor";break;case"variable":t._icon=A.default.frameStyle.getVariableIcon(),t._style=A.default.frameStyle.getVariableIconStyle(),t.editorPath="/variableeditor";break;case"ruleLib":t._icon=A.default.frameStyle.getRuleLibIcon(),t._style=A.default.frameStyle.getRuleLibIconStyle();break;case"decisionTableLib":t._icon=A.default.frameStyle.getDecisionTableLibIcon(),t._style=A.default.frameStyle.getDecisionTableLibIconStyle();break;case"decisionTreeLib":t._icon=A.default.frameStyle.getDecisionTreeLibIcon(),t._style=A.default.frameStyle.getDecisionTreeLibIconStyle();break;case"flowLib":t._icon=A.default.frameStyle.getFlowLibIcon(),t._style=A.default.frameStyle.getFlowLibIconStyle();break;case"ul":t._icon=A.default.frameStyle.getUlIcon(),t._style=A.default.frameStyle.getUlIconStyle(),t.editorPath="/uleditor";break;case"decisionTable":t._icon=A.default.frameStyle.getDecisionTableIcon(),t._style=A.default.frameStyle.getDecisionTableIconStyle(),t.editorPath="/decisiontableeditor";break;case"scriptDecisionTable":t._icon=A.default.frameStyle.getScriptDecisionTableIcon(),t._style=A.default.frameStyle.getScriptDecisionTableIconStyle(),t.editorPath="/scriptdecisiontableeditor";break;case"decisionTree":t._icon=A.default.frameStyle.getDecisionTreeIcon(),t._style=A.default.frameStyle.getDecisionTreeIconStyle(),t.editorPath="/decisiontreeditor";break;case"flow":t._icon=A.default.frameStyle.getFlowIcon(),t._style=A.default.frameStyle.getFlowIconStyle(),t.editorPath="/floweditor";break;case"scorecard":t._icon=A.default.frameStyle.getScorecardIcon(),t._style=A.default.frameStyle.getScorecardIconStyle(),t.editorPath="/scorecardeditor"}var e=t.children;e&&e.forEach(function(t,e){s(t)})}Object.defineProperty(e,"__esModule",{value:!0}),e.uniqueID=i,e.loadFileVersions=r,e.loadResourceTreeData=a;var l=n(228),A=o(l),c=1},function(t,e){"use strict";function n(t,e){return window._frameStyles?window._frameStyles[t]:e}Object.defineProperty(e,"__esModule",{value:!0});var o={};o.frameStyle={getRootIcon:function(){return n("rootIcon","rf rf-root")},getRootIconStyle:function(){return n("rootIconStyle",{color:"rgb(102, 102, 102)"})},getProjectIcon:function(){return n("projectIcon","rf rf-project")},getProjectIconStyle:function(){return n("projectIconStyle",{color:"rgb(188, 15, 105)"})},getResourceIcon:function(){return n("resourceIcon","rf rf-library")},getResourceIconStyle:function(){return n("resourceIconStyle",{color:"rgb(88, 45, 170)"})},getResourcePackageIcon:function(){return n("resourcePackageIcon","rf rf-package")},getResourcePackageIconStyle:function(){return n("resourcePackageIconStyle",{color:"rgb(180, 133, 19)"})},getLibIcon:function(){return n("libIcon","rf rf-database")},getLibIconStyle:function(){return n("libIconStyle",{color:"rgb(24, 121, 27)"})},getActionIcon:function(){return n("actionIcon","rf rf-action")},getActionIconStyle:function(){return n("actionIconStyle",{color:"rgb(24, 121, 27)"})},getVariableIcon:function(){return n("variableIcon","rf rf-variable")},getVariableIconStyle:function(){return n("variableIconStyle",{color:"rgb(24, 121, 27)"})},getConstantIcon:function(){return n("constantIcon","rf rf-constant")},getConstantIconStyle:function(){return n("constantIconStyle",{color:"rgb(24, 121, 27)"})},getParameterIcon:function(){return n("parameterIcon","rf rf-parameter")},getParameterIconStyle:function(){return n("parameterIconStyle",{color:"rgb(24, 121, 27)"})},getRuleIcon:function(){return n("ruleIcon","rf rf-rule")},getRuleIconStyle:function(){return n("ruleIconStyle",{color:"rgb(31, 90, 163)"})},getUlIcon:function(){return n("ulIcon","rf rf-script")},getUlIconStyle:function(){return n("ulIconStyle",{color:"rgb(31, 90, 163)"})},getRuleLibIcon:function(){return n("ruleLibIcon","rf rf-rule")},getRuleLibIconStyle:function(){return n("ruleLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableIcon:function(){return n("decisionTableIcon","rf rf-table")},getDecisionTableIconStyle:function(){return n("decisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getScriptDecisionTableIcon:function(){return n("scriptDecisionTableIcon","rf rf-scripttable")},getScriptDecisionTableIconStyle:function(){return n("scriptDecisionTableIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTableLibIcon:function(){return n("decisionTableLibIcon","rf rf-table")},getDecisionTableLibIconStyle:function(){return n("decisionTableLibIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeIcon:function(){return n("decisionTreeIcon","rf rf-tree")},getDecisionTreeIconStyle:function(){return n("decisionTreeIconStyle",{color:"rgb(31, 90, 163)"})},getDecisionTreeLibIcon:function(){return n("decisionTreeLibIcon","rf rf-tree")},getDecisionTreeLibIconStyle:function(){return n("decisionTreeLibIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardIcon:function(){return n("scorecardIcon","rf rf-scorecard")},getScorecardIconStyle:function(){return n("scorecardIconStyle",{color:"rgb(31, 90, 163)"})},getScorecardLibIcon:function(){return n("scorecardLibIcon","rf rf-scorecard")},getScorecardLibIconStyle:function(){return n("scorecardLibIconStyle",{color:"rgb(31, 90, 163)"})},getFlowIcon:function(){return n("flowIcon","rf rf-flow")},getFlowIconStyle:function(){return n("flowIconStyle",{color:"rgb(31, 90, 163)"})},getFlowLibIcon:function(){return n("flowLibIcon","rf rf-flow")},getFlowLibIconStyle:function(){return n("flowLibIconStyle",{color:"rgb(31, 90, 163)"})},getFolderIcon:function(){return n("flowIcon","rf rf-folder")},getFolderIconStyle:function(){return n("flowIconStyle",{color:"rgb(224, 126, 1)"})}},e.default=o},,,,,,function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n-1&&(c=!0),!1}}),c?A.show():A.hide()}}}}},{key:"render",value:function(){var t=this,e=this.props,n=e.headers,o=e.operationConfig,i=e.dispatch,r=e.selectFirst,a=(e.uniqueKey,this.props.rows||[]),s=[],l=[];n.forEach(function(e,n){e.editable?s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:e.width}},A.default.createElement("label",null,e.label),A.default.createElement(p.default,{onchange:t.props.onchange,onblur:function(e){t.setState({display:"none"}),t.props.onblur(e)},header:e,display:t.state.display}))):s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:e.width}},A.default.createElement("label",null,e.label)))}),o&&s.push(A.default.createElement("td",{key:(0,f.uniqueID)(),style:{width:o.width}},A.default.createElement("label",null,"操作列")));var c=A.default.createElement("tr",{key:"filterrow",style:{background:"#eee"}},n.map(function(e,n){return e.filterable?A.default.createElement("td",{key:(0,f.uniqueID)()},A.default.createElement("input",{type:"text",onKeyPress:t.onFilter.bind(t,n),name:e.id,className:"form-control",style:{height:"26px"},placeholder:"请输入过滤条件,回车查询..."})):A.default.createElement("td",{key:(0,f.uniqueID)()}," ")}),o?A.default.createElement("td",null):null);l.push(c),a.forEach(function(e,a){e.id||(e.id=(0,f.uniqueID)());var s=e.id;0===a&&r?l.push(A.default.createElement(g.default,{key:s,select:!0,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:a})):l.push(A.default.createElement(g.default,{key:s,ready:t.props.ready,headers:n,dispatch:i,rowClick:t.props.rowClick,operations:o?o.operations:null,rowData:e,rowIndex:a}))});var u={margin:0,width:this.props.width?this.props.width:"100%"};return A.default.createElement("table",{className:"table table-bordered",style:u},A.default.createElement("thead",null,A.default.createElement("tr",{className:"well"},s)),A.default.createElement("tbody",null,l))}}]),e}(l.Component);M.propTypes={headers:A.default.PropTypes.array.isRequired,operationConfig:l.PropTypes.object},e.default=M},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n');break;case"date":this.cellEditor=$('');break;case"boolean":this.cellEditor=$('');break;case"list":this.cellEditor=$(''),this.cellEditor.dblclick(function(){var o=e[t];o&&""!==o||(o="{}");var i=JSON.parse(o)||{},r=i.rows||[],a=i.type,s=function(o){var i={type:a,rows:o},r=JSON.stringify(i);e[t]=r;var s=n.find("div");s.html(r)};if(a){var l=null,A=!0,c=!1,u=void 0;try{for(var d,g=simulatorCategoryData[Symbol.iterator]();!(A=(d=g.next()).done);A=!0){var h=d.value;if(a===h.clazz){l=h;break}}}catch(t){c=!0,u=t}finally{try{!A&&g.return&&g.return()}finally{if(c)throw u}}var f=l.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:f,rows:r,callback:s})}else!function(){var t=window.simulatorCategoryData||[],e=$(''),n=!0,o=!1,i=void 0;try{for(var l,A=t[Symbol.iterator]();!(n=(l=A.next()).done);n=!0){var c=l.value;e.append('")}}catch(t){o=!0,i=t}finally{try{!n&&A.return&&A.return()}finally{if(o)throw i}}e.append(''),M.MsgBox.dialog("选择子对象类型",e,function(){if(a=e.val(),!a||""===a)return void M.MsgBox.alert("请先选择子对象类型!");var n=null,o=!0,i=!1,l=void 0; +try{for(var A,c=t[Symbol.iterator]();!(o=(A=c.next()).done);o=!0){var u=A.value;if(a===u.clazz){n=u;break}}}catch(t){i=!0,l=t}finally{try{!o&&c.return&&c.return()}finally{if(i)throw l}}var d=n.variables||[];p.eventEmitter.emit(p.SHOW_CHILD_LIST_DIALOG,{variables:d,rows:r,callback:s})})}()});break;default:this.cellEditor=$('')}n.append(this.cellEditor),this.cellEditor.blur(function(){e[t]=$(this).val();var o=n.find("div");o.html(e[t]),o.show(),$(this).hide()})}this.cellEditor.val(e[t]),this.cellEditor.show(),this.cellEditor.focus()}},{key:"render",value:function(){var t=this,e=this.props,n=e.rowData,o=e.header,i=o.dateFormat,r=n[o.name];if(i){var a=new Date(r);r=(0,f.formatDate)(a,i)}r&&"object"===("undefined"==typeof r?"undefined":l(r))&&(r=JSON.stringify(r));var s={marginTop:"5px",minHeight:"26px",wordBreak:"break-all"};return u.default.createElement("td",{style:{padding:"1px 5px"}},u.default.createElement("div",{style:s,onClick:function(e){if(o.editable){var i=e.target;$(i).css({display:"none"}),n._editorType?t._showEditor(o.name):p.eventEmitter.emit(p.SHOW_CELL_EDITOR,{targetDiv:i,rowData:n,colId:o.id})}}},r))}}]),e}(c.Component);e.default=w},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_CHILD_LIST_DIALOG=e.SHOW_CHILD_LIST_DIALOG=e.HIDE_CELL_EDITOR=e.SHOW_CELL_EDITOR=void 0;var i=n(240),r=o(i);e.SHOW_CELL_EDITOR="show_cell_editor",e.HIDE_CELL_EDITOR="hide_cell_editor",e.SHOW_CHILD_LIST_DIALOG="show_child_list_dialog",e.HIDE_CHILD_LIST_DIALOG="hide_child_list_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e){function n(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function o(t){return"function"==typeof t}function i(t){return"number"==typeof t}function r(t){return"object"==typeof t&&null!==t}function a(t){return void 0===t}t.exports=n,n.EventEmitter=n,n.prototype._events=void 0,n.prototype._maxListeners=void 0,n.defaultMaxListeners=10,n.prototype.setMaxListeners=function(t){if(!i(t)||t<0||isNaN(t))throw TypeError("n must be a positive number");return this._maxListeners=t,this},n.prototype.emit=function(t){var e,n,i,s,l,A;if(this._events||(this._events={}),"error"===t&&(!this._events.error||r(this._events.error)&&!this._events.error.length)){if(e=arguments[1],e instanceof Error)throw e;var c=new Error('Uncaught, unspecified "error" event. ('+e+")");throw c.context=e,c}if(n=this._events[t],a(n))return!1;if(o(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:s=Array.prototype.slice.call(arguments,1),n.apply(this,s)}else if(r(n))for(s=Array.prototype.slice.call(arguments,1),A=n.slice(),i=A.length,l=0;l0&&this._events[t].length>i&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),"function"==typeof console.trace&&console.trace())),this},n.prototype.on=n.prototype.addListener,n.prototype.once=function(t,e){function n(){this.removeListener(t,n),i||(i=!0,e.apply(this,arguments))}if(!o(e))throw TypeError("listener must be a function");var i=!1;return n.listener=e,this.on(t,n),this},n.prototype.removeListener=function(t,e){var n,i,a,s;if(!o(e))throw TypeError("listener must be a function");if(!this._events||!this._events[t])return this;if(n=this._events[t],a=n.length,i=-1,n===e||o(n.listener)&&n.listener===e)delete this._events[t],this._events.removeListener&&this.emit("removeListener",t,e);else if(r(n)){for(s=a;s-- >0;)if(n[s]===e||n[s].listener&&n[s].listener===e){i=s;break}if(i<0)return this;1===n.length?(n.length=0,delete this._events[t]):n.splice(i,1),this._events.removeListener&&this.emit("removeListener",t,e)}return this},n.prototype.removeAllListeners=function(t){var e,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[t]&&delete this._events[t],this;if(0===arguments.length){for(e in this._events)"removeListener"!==e&&this.removeAllListeners(e);return this.removeAllListeners("removeListener"),this._events={},this}if(n=this._events[t],o(n))this.removeListener(t,n);else if(n)for(;n.length;)this.removeListener(t,n[n.length-1]);return delete this._events[t],this},n.prototype.listeners=function(t){var e;return e=this._events&&this._events[t]?o(this._events[t])?[this._events[t]]:this._events[t].slice():[]},n.prototype.listenerCount=function(t){if(this._events){var e=this._events[t];if(o(e))return 1;if(e)return e.length}return 0},n.listenerCount=function(t,e){return t.listenerCount(e)}},function(t,e,n){var o=n(242).default,i=n(243).default,r=n(251),a=n(252).default,s=n(302);t.exports={Tool:o,Node:i,MsgBox:r,Event:s,FlowDesigner:a}},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n"}}},{key:"getConnectionPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_newNodeInstance",value:function(t,e,n){var o=this.newNode();return o?(o._tool=this,o._initConfigs(this.getConfigs()),n||(n=this._buildNodeName()),o._createFigure(this.context,{x:t,y:e},n),o):null}},{key:"_buildNodeName",value:function(){var t=this.getType()+this.count++,e=!1,n=!0,o=!1,i=void 0;try{for(var r,a=this.context.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s instanceof Node&&s.name===t){e=!0;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e?this._buildNodeName():t}}]),t}();e.default=i},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);el-c&&sl-c&&s>A-c?this.attr("cursor","se-resize"):aA-c?this.attr("cursor","sw-resize"):this.attr("cursor","move")}}},o=function(n){if(!this.dragging){var o=t.currentTool;if(o){if(o instanceof g.default||o instanceof u.default||(t.currentTool=t.selectTool,o=t.currentTool,t.flowDesigner.nodeToolbar.children("label").removeClass("active")),o instanceof u.default)if(0===t.selectionFigures.length)t.selectFigure(e);else{var i=!1,r=!0,a=!1,s=void 0;try{for(var l,c=t.selectionFigures[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var d=l.value;if(d===e){i=!0;break}}}catch(t){a=!0,s=t}finally{try{!r&&c.return&&c.return()}finally{if(a)throw s}}i||(t.resetSelection(),t.selectFigure(e))}if(o instanceof g.default){var h=n.offsetX,f=n.offsetY,M=t.currentConnection;if(M){if(0===e.in)return void p.alert("当前节点不允许有进入的连线.");if(e.in!==-1&&e.toConnections.length>=e.in)return void p.alert("当前节点进入的连线最多只能有"+e.in+"条.");M.endX=h,M.endY=f,M.from!==e?!function(){M.endPath(e),t.currentConnection=null;var n=M.from.uuid,o=e.uuid,i=M.uuid;t.addRedoUndo({redo:function(){var e=t.getNodeByUUID(n),r=t.getNodeByUUID(o);M=new A.default(e,{endX:e.rect.attr("x"),endY:e.rect.attr("y")}),M.uuid=i,M.endPath(r)},undo:function(){e.context.removeFigureByUUID(i)}})}():p.alert("连线的起始节点不能为同一节点.")}else{if(0===e.out)return void p.alert("当前节点不允许有出去的连线.");if(e.out!==-1&&e.fromConnections.length>=e.out)return void p.alert("当前节点出去的连线最多只能有"+e.out+"条.");M=new A.default(e,{endX:h,endY:f}),t.currentConnection=M}}}}};this.rect.mouseover(n),this.rect.mousedown(o),this.icon.mouseover(n),this.icon.mousedown(o);var i=function(){var n=e.rect,o=t.currentTool;if(o&&o instanceof u.default){var i=!1,r=t.selectionFigures,a=!0,s=!1,l=void 0;try{for(var c,d=r[Symbol.iterator]();!(a=(c=d.next()).done);a=!0){var g=c.value;if(g===e){i=!0;break}}}catch(t){s=!0,l=t}finally{try{!a&&d.return&&d.return()}finally{if(s)throw l}}if(!i)return void t.resetSelection();r.forEach(function(t,e){t instanceof A.default||t._recordRectPosition()}),n.ow=n.attr("width"),n.oh=n.attr("height"),n.dragging=!0}},r=function(n,o){var i=t.currentTool;if(i&&i instanceof u.default){e.context.snapto&&(n-=n%10,o-=o%10);var r=t.selectionFigures,a=e.rect,s=(e.icon,a.ox+n),l=a.oy+o;if(!(s<1||l<1)){e.context.resizePaper(s+150,l+150);var c=void 0,d=void 0;switch(this.attr("cursor")){case"nw-resize":c=a.ow-n,d=a.oh-o,c>20&&d>20&&a.attr({x:s,y:l,width:c,height:d});break;case"ne-resize":c=a.ow+n,d=a.oh-o,c>20&&d>20&&a.attr({y:l,width:c,height:d});break;case"se-resize":c=a.ow+n,d=a.oh+o,c>20&&d>20&&a.attr({width:c,height:d});break;case"sw-resize":c=a.ow-n,d=a.oh+o,c>20&&d>20&&a.attr({x:s,width:c,height:d});break;default:r.forEach(function(t,e){t instanceof A.default||t._moveRect(n,o)})}r.forEach(function(t,e){t instanceof A.default||(t._moveAndResizeTextAndIcon(),t._resetConnections())})}}},a=function(){e.rect.dragging=!1;var n=[],o=new Map,i=new Map,r=e.rect.ow,a=e.rect.oh,s=e.rect.attr("width"),l=e.rect.attr("height"),c=e.uuid,u=!0,d=!1,g=void 0;try{for(var h,p=t.selectionFigures[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var f=h.value;if(!(f instanceof A.default)){n.push(f.uuid);var M=f.rect.ox,w=f.rect.oy;M=M?M:0,w=w?w:0;var T=f.rect.attr("x"),C=f.rect.attr("y");o.set(f.uuid,{x:T,y:C}),i.set(f.uuid,{x:M,y:w})}}}catch(t){d=!0,g=t}finally{try{!u&&p.return&&p.return()}finally{if(d)throw g}}e.context.addRedoUndo({redo:function(){var e=!0,i=!1,r=void 0;try{for(var a,A=n[Symbol.iterator]();!(e=(a=A.next()).done);e=!0){var u=a.value,d=t.getNodeByUUID(u),g=o.get(u);d.rect.attr({x:g.x,y:g.y}),u===c&&d.rect.attr({width:s,height:l})}}catch(t){i=!0,r=t}finally{try{!e&&A.return&&A.return()}finally{if(i)throw r}}var h=!0,p=!1,f=void 0;try{for(var M,w=n[Symbol.iterator]();!(h=(M=w.next()).done);h=!0){var T=M.value,C=t.getNodeByUUID(T);C._moveAndResizeTextAndIcon(),C._resetConnections()}}catch(t){p=!0,f=t}finally{try{!h&&w.return&&w.return()}finally{if(p)throw f}}},undo:function(){var e=!0,o=!1,s=void 0;try{for(var l,A=n[Symbol.iterator]();!(e=(l=A.next()).done);e=!0){var u=l.value,d=t.getNodeByUUID(u),g=i.get(u);d.rect.attr({x:g.x,y:g.y}),u===c&&d.rect.attr({width:r,height:a})}}catch(t){o=!0,s=t}finally{try{!e&&A.return&&A.return()}finally{if(o)throw s}}var h=!0,p=!1,f=void 0;try{for(var M,w=n[Symbol.iterator]();!(h=(M=w.next()).done);h=!0){var T=M.value,C=t.getNodeByUUID(T);C._moveAndResizeTextAndIcon(),C._resetConnections()}}catch(t){p=!0,f=t}finally{try{!h&&w.return&&w.return()}finally{if(p)throw f}}}})};this.rect.drag(r,i,a),this.icon.drag(r,i,a)}},{key:"remove",value:function(){var t=this,e=[].concat(r(this.toConnections)),n=[].concat(r(this.fromConnections));e.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),n.forEach(function(e,n){t.context.removeFigureByUUID(e.uuid)}),this.text.remove(),this.icon.remove(),this.rect.remove()}},{key:"_recordRectPosition",value:function(){this.rect.ox=this.rect.attr("x"),this.rect.oy=this.rect.attr("y")}},{key:"_moveRect",value:function(t,e){var n=void 0,o=void 0;this.rect.ox&&0!==this.rect.ox?(n=this.rect.ox+t,o=this.rect.oy+e):(n=this.rect.attr("x")+t,o=this.rect.attr("x")+e),this.rect.attr({x:n,y:o})}},{key:"_moveAndResizeTextAndIcon",value:function(){var t=this.rect.attr("width"),e=this.rect.attr("height");this.text.attr({x:this.rect.attr("x")+t/2,y:this.rect.attr("y")+e-16}),this.icon.attr({x:this.rect.attr("x"),y:this.rect.attr("y"),width:t,height:e-30})}},{key:"_resetConnections",value:function(){var t=[].concat(r(this.fromConnections),r(this.toConnections));t.forEach(function(t,e){t.updatePath()})}},{key:"getPathInfo",value:function(t){var e=this.rect.attr("x"),n=this.rect.attr("y"),o=this.rect.attr("width"),i=this.rect.attr("height");return t&&(e-=5,n-=5,o+=10,i+=10),"M "+e+" "+n+" L "+(e+o)+" "+n+" L "+(e+o)+" "+(n+i)+" L "+e+" "+(n+i)+" L "+e+" "+n}}]),t}();e.default=f},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol?"symbol":typeof t},a=function(){function t(t,e){for(var n=0;n0){({x:t[1][1],y:t[1][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildToFigureIntersetion",value:function(t,e){if(e){var n=this.to.rect,o=n.attr("x"),i=n.attr("y"),r=n.attr("width"),a=n.attr("height");o+=r/2,i+=a/2-10;var s=t.x,A=t.y;t=[],t.push(["M",s,A]),t.push(["L",o,i])}var c=this.to.getPathInfo(!0),u=l.default.pathIntersection(c,t);if(u.length>0){({x:t[0][1],y:t[0][2]});return{x:u[0].x,y:u[0].y}}return null}},{key:"_buildCurveLinePathInfo",value:function(){var t=this.from.rect,e=t.attr("x"),n=t.attr("y"),o=t.attr("width"),i=t.attr("height");e+=o/2,n+=i/2-10;var r=this.endX,a=this.endY,s=0,A=0,c=null;if(this.to){var u=this.to.rect;r=u.attr("x"),a=u.attr("y"),s=u.attr("width"),A=u.attr("height"),r+=s/2,a+=A/2-10}var d=this.from.getPathInfo(!0),g=Math.abs(e+o/2-(r-s/2)),h=Math.abs(n+i/2-(a-A/2)),p="M"+e+" "+n;if(g>=h){var f=p+" L"+r+" "+n,M=l.default.pathIntersection(d,f);if(M.length>0&&(e=M[0].x,n=M[0].y,p="M"+M[0].x+" "+M[0].y),this.to){var w="M"+e+" "+a+" L"+r+" "+a,T=this.to.getPathInfo(!0);M=l.default.pathIntersection(T,w),M.length>0&&(r=M[0].x,a=M[0].y,e0&&(e=E[0].x,n=E[0].y,p="M"+E[0].x+" "+E[0].y),this.to){var m="M"+r+" "+n+" L"+r+" "+a,N=this.to.getPathInfo(!0);E=l.default.pathIntersection(N,m),E.length>0&&(r=E[0].x,a=E[0].y,n=1e3&&delete s[l.shift()],l.push(a),s[a]=t[D](e,r),n?n(s[a]):s[a])}return i}function r(){return this.hex}function a(t,e){for(var n=[],o=0,i=t.length;i-2*!e>o;o+=2){var r=[{x:+t[o-2],y:+t[o-1]},{x:+t[o],y:+t[o+1]},{x:+t[o+2],y:+t[o+3]},{x:+t[o+4],y:+t[o+5]}];e?o?i-4==o?r[3]={x:+t[0],y:+t[1]}:i-2==o&&(r[2]={x:+t[0],y:+t[1]},r[3]={x:+t[2],y:+t[3]}):r[0]={x:+t[i-2],y:+t[i-1]}:i-4==o?r[3]=r[2]:o||(r[0]={x:+t[o],y:+t[o+1]}),n.push(["C",(-r[0].x+6*r[1].x+r[2].x)/6,(-r[0].y+6*r[1].y+r[2].y)/6,(r[1].x+6*r[2].x-r[3].x)/6,(r[1].y+6*r[2].y-r[3].y)/6,r[2].x,r[2].y])}return n}function s(t,e,n,o,i){var r=-3*e+9*n-9*o+3*i,a=t*r+6*e-12*n+6*o;return t*a-3*e+3*n}function l(t,e,n,o,i,r,a,l,A){null==A&&(A=1),A=A>1?1:A<0?0:A;for(var c=A/2,u=12,d=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],g=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],h=0,p=0;ph;)d/=2,g+=(cO(i,a)||O(e,o)O(r,s))){var l=(t*o-e*n)*(i-a)-(t-n)*(i*s-r*a),A=(t*o-e*n)*(r-s)-(e-o)*(i*s-r*a),c=(t-n)*(r-s)-(e-o)*(i-a);if(c){var u=l/c,d=A/c,g=+u.toFixed(2),h=+d.toFixed(2);if(!(g<+Y(t,n).toFixed(2)||g>+O(t,n).toFixed(2)||g<+Y(i,a).toFixed(2)||g>+O(i,a).toFixed(2)||h<+Y(e,o).toFixed(2)||h>+O(e,o).toFixed(2)||h<+Y(r,s).toFixed(2)||h>+O(r,s).toFixed(2)))return{x:u,y:d}}}}function u(t,n,o){var i=e.bezierBBox(t),r=e.bezierBBox(n);if(!e.isBBoxIntersect(i,r))return o?0:[];for(var a=l.apply(0,t),s=l.apply(0,n),A=O(~~(a/5),1),u=O(~~(s/5),1),d=[],g=[],h={},p=o?0:[],f=0;f=0&&b<=1.001&&x>=0&&x<=1.001&&(o?p++:p.push({x:N.x,y:N.y,t1:Y(b,1),t2:Y(x,1)}))}}return p}function d(t,n,o){t=e._path2curve(t),n=e._path2curve(n);for(var i,r,a,s,l,A,c,d,g,h,p=o?0:[],f=0,M=t.length;fo)return o;for(;nr?n=i:o=i,i=(o-n)/2+n}return i}var A=3*e,c=3*(o-e)-A,u=1-A-c,d=3*n,g=3*(i-n)-d,h=1-d-g;return s(t,1/(200*r))}function f(t,e){var n=[],o={};if(this.ms=e,this.times=1,t){for(var i in t)t[m](i)&&(o[q(i)]=t[i],n.push(q(i)));n.sort(ct)}this.anim=o,this.top=n[n.length-1],this.percents=n}function M(n,o,i,r,a,s){i=q(i);var l,A,c,u,d,h,f=n.ms,M={},w={},T={};if(r)for(I=0,E=re.length;Ir*n.top){i=n.percents[I],d=n.percents[I-1]||0,f=f/n.top*(i-d),u=n.percents[I+1],l=n.anim[i];break}r&&o.attr(n.anim[n.percents[I]])}if(l){if(A)A.initstatus=r,A.start=new Date-A.ms*r;else{for(var N in l)if(l[m](N)&&(nt[m](N)||o.paper.customAttributes[m](N)))switch(M[N]=o.attr(N),null==M[N]&&(M[N]=et[N]),w[N]=l[N],nt[N]){case P:T[N]=(w[N]-M[N])/f;break;case"colour":M[N]=e.getRGB(M[N]);var b=e.getRGB(w[N]);T[N]={r:(b.r-M[N].r)/f,g:(b.g-M[N].g)/f,b:(b.b-M[N].b)/f};break;case"path":var x=jt(M[N],w[N]),D=x[1];for(M[N]=x[0],T[N]=[],I=0,E=M[N].length;I',ft=Mt.firstChild,ft.style.behavior="url(#default#VML)",!ft||"object"!=typeof ft.adj)return e.type=B;Mt=null}e.svg=!(e.vml="VML"==e.type),e._Paper=x,e.fn=C=x.prototype=e.prototype,e._id=0,e.is=function(t,e){return e=R.call(e),"finite"==e?!Z[m](+t):"array"==e?t instanceof Array:"null"==e&&null===t||e==typeof t&&null!==t||"object"==e&&t===Object(t)||"array"==e&&Array.isArray&&Array.isArray(t)||X.call(t).slice(8,-1).toLowerCase()==e},e.angle=function(t,n,o,i,r,a){if(null==r){var s=t-o,l=n-i;return s||l?(180+180*z.atan2(-l,-s)/V+360)%360:0}return e.angle(t,n,r,a)-e.angle(o,i,r,a)},e.rad=function(t){return t%360*V/180},e.deg=function(t){return Math.round(180*t/V%360*1e3)/1e3},e.snapTo=function(t,n,o){if(o=e.is(o,"finite")?o:10,e.is(t,W)){for(var i=t.length;i--;)if(H(t[i]-n)<=o)return t[i]}else{t=+t;var r=n%t;if(rt-o)return n-r+t}return n};e.createUUID=function(t,e){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(t,e).toUpperCase()}}(/[xy]/g,function(t){var e=16*z.random()|0,n="x"==t?e:3&e|8;return n.toString(16)});e.setWindow=function(n){t("raphael.setWindow",e,N.win,n),N.win=n,N.doc=N.win.document,e._engine.initWin&&e._engine.initWin(N.win)};var wt=function(t){if(e.vml){var n,o=/^\s+|\s+$/g;try{var r=new ActiveXObject("htmlfile");r.write(""),r.close(),n=r.body}catch(t){n=createPopup().document.body}var a=n.createTextRange();wt=i(function(t){try{n.style.color=Q(t).replace(o,B);var e=a.queryCommandValue("ForeColor");return e=(255&e)<<16|65280&e|(16711680&e)>>>16,"#"+("000000"+e.toString(16)).slice(-6)}catch(t){return"none"}})}else{var s=N.doc.createElement("i");s.title="Raphaël Colour Picker",s.style.display="none",N.doc.body.appendChild(s),wt=i(function(t){return s.style.color=t,N.doc.defaultView.getComputedStyle(s,B).getPropertyValue("color")})}return wt(t)},Tt=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ct=function(){return"hsl("+[this.h,this.s,this.l]+")"},yt=function(){return this.hex},It=function(t,n,o){if(null==n&&e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t&&(o=t.b,n=t.g,t=t.r),null==n&&e.is(t,G)){var i=e.getRGB(t);t=i.r,n=i.g,o=i.b}return(t>1||n>1||o>1)&&(t/=255,n/=255,o/=255),[t,n,o]},Et=function(t,n,o,i){t*=255,n*=255,o*=255;var r={r:t,g:n,b:o,hex:e.rgb(t,n,o),toString:yt};return e.is(i,"finite")&&(r.opacity=i),r};e.color=function(t){var n;return e.is(t,"object")&&"h"in t&&"s"in t&&"b"in t?(n=e.hsb2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):e.is(t,"object")&&"h"in t&&"s"in t&&"l"in t?(n=e.hsl2rgb(t),t.r=n.r,t.g=n.g,t.b=n.b,t.hex=n.hex):(e.is(t,"string")&&(t=e.getRGB(t)),e.is(t,"object")&&"r"in t&&"g"in t&&"b"in t?(n=e.rgb2hsl(t),t.h=n.h,t.s=n.s,t.l=n.l,n=e.rgb2hsb(t),t.v=n.b):(t={hex:"none"},t.r=t.g=t.b=t.h=t.s=t.v=t.l=-1)),t.toString=yt,t},e.hsb2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"b"in t&&(n=t.b,e=t.s,o=t.o,t=t.h),t*=360;var i,r,a,s,l;return t=t%360/60,l=n*e,s=l*(1-H(t%2-1)),i=r=a=n-l,t=~~t,i+=[l,s,0,0,s,l][t],r+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],Et(i,r,a,o)},e.hsl2rgb=function(t,e,n,o){this.is(t,"object")&&"h"in t&&"s"in t&&"l"in t&&(n=t.l,e=t.s,t=t.h),(t>1||e>1||n>1)&&(t/=360,e/=100,n/=100),t*=360;var i,r,a,s,l;return t=t%360/60,l=2*e*(n<.5?n:1-n),s=l*(1-H(t%2-1)),i=r=a=n-l/2,t=~~t,i+=[l,s,0,0,s,l][t],r+=[s,l,l,s,0,0][t],a+=[0,0,s,l,l,s][t],Et(i,r,a,o)},e.rgb2hsb=function(t,e,n){n=It(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,a;return r=O(t,e,n),a=r-Y(t,e,n),o=0==a?null:r==t?(e-n)/a:r==e?(n-t)/a+2:(t-e)/a+4,o=(o+360)%6*60/360,i=0==a?0:a/r,{h:o,s:i,b:r,toString:Tt}},e.rgb2hsl=function(t,e,n){n=It(t,e,n),t=n[0],e=n[1],n=n[2];var o,i,r,a,s,l;return a=O(t,e,n),s=Y(t,e,n),l=a-s,o=0==l?null:a==t?(e-n)/l:a==e?(n-t)/l+2:(t-e)/l+4,o=(o+360)%6*60/360,r=(a+s)/2,i=0==l?0:r<.5?l/(2*r):l/(2-2*r),{h:o,s:i,l:r,toString:Ct}},e._path2string=function(){return this.join(",").replace(rt,"$1")};e._preload=function(t,e){var n=N.doc.createElement("img");n.style.cssText="position:absolute;left:-9999em;top:-9999em",n.onload=function(){e.call(this),this.onload=null,N.doc.body.removeChild(this)},n.onerror=function(){N.doc.body.removeChild(this)},N.doc.body.appendChild(n),n.src=t};e.getRGB=i(function(t){if(!t||(t=Q(t)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r};if("none"==t)return{r:-1,g:-1,b:-1,hex:"none",toString:r};!(it[m](t.toLowerCase().substring(0,2))||"#"==t.charAt())&&(t=wt(t));var n,o,i,a,s,l,A=t.match(J);return A?(A[2]&&(i=$(A[2].substring(5),16),o=$(A[2].substring(3,5),16),n=$(A[2].substring(1,3),16)),A[3]&&(i=$((s=A[3].charAt(3))+s,16),o=$((s=A[3].charAt(2))+s,16),n=$((s=A[3].charAt(1))+s,16)),A[4]&&(l=A[4][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),"rgba"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100)),A[5]?(l=A[5][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsba"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsb2rgb(n,o,i,a)):A[6]?(l=A[6][j](ot),n=q(l[0]),"%"==l[0].slice(-1)&&(n*=2.55),o=q(l[1]),"%"==l[1].slice(-1)&&(o*=2.55),i=q(l[2]),"%"==l[2].slice(-1)&&(i*=2.55),("deg"==l[0].slice(-3)||"°"==l[0].slice(-1))&&(n/=360),"hsla"==A[1].toLowerCase().slice(0,4)&&(a=q(l[3])),l[3]&&"%"==l[3].slice(-1)&&(a/=100),e.hsl2rgb(n,o,i,a)):(A={r:n,g:o,b:i,toString:r},A.hex="#"+(16777216|i|o<<8|n<<16).toString(16).slice(1),e.is(a,"finite")&&(A.opacity=a),A)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:r}},e),e.hsb=i(function(t,n,o){return e.hsb2rgb(t,n,o).hex}),e.hsl=i(function(t,n,o){return e.hsl2rgb(t,n,o).hex}),e.rgb=i(function(t,e,n){function o(t){return t+.5|0}return"#"+(16777216|o(n)|o(e)<<8|o(t)<<16).toString(16).slice(1)}),e.getColor=function(t){var e=this.getColor.start=this.getColor.start||{h:0,s:1,b:t||.75},n=this.hsb2rgb(e.h,e.s,e.b);return e.h+=.075,e.h>1&&(e.h=0,e.s-=.2,e.s<=0&&(this.getColor.start={h:0,s:1,b:e.b})),n.hex},e.getColor.reset=function(){delete this.start},e.parsePathString=function(t){if(!t)return null;var n=mt(t);if(n.arr)return bt(n.arr);var o={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},i=[];return e.is(t,W)&&e.is(t[0],W)&&(i=bt(t)),i.length||Q(t).replace(at,function(t,e,n){var r=[],a=e.toLowerCase();if(n.replace(lt,function(t,e){e&&r.push(+e)}),"m"==a&&r.length>2&&(i.push([e][v](r.splice(0,2))),a="l",e="m"==e?"l":"L"),"r"==a)i.push([e][v](r));else for(;r.length>=o[a]&&(i.push([e][v](r.splice(0,o[a]))),o[a]););}),i.toString=e._path2string,n.arr=bt(i),i},e.parseTransformString=i(function(t){if(!t)return null;var n=[];return e.is(t,W)&&e.is(t[0],W)&&(n=bt(t)),n.length||Q(t).replace(st,function(t,e,o){var i=[];R.call(e);o.replace(lt,function(t,e){e&&i.push(+e)}),n.push([e][v](i))}),n.toString=e._path2string,n});var mt=function(t){var e=mt.ps=mt.ps||{};return e[t]?e[t].sleep=100:e[t]={sleep:100},setTimeout(function(){for(var n in e)e[m](n)&&n!=t&&(e[n].sleep--,!e[n].sleep&&delete e[n])}),e[t]};e.findDotsAtSegment=function(t,e,n,o,i,r,a,s,l){var A=1-l,c=F(A,3),u=F(A,2),d=l*l,g=d*l,h=c*t+3*u*l*n+3*A*l*l*i+g*a,p=c*e+3*u*l*o+3*A*l*l*r+g*s,f=t+2*l*(n-t)+d*(i-2*n+t),M=e+2*l*(o-e)+d*(r-2*o+e),w=n+2*l*(i-n)+d*(a-2*i+n),T=o+2*l*(r-o)+d*(s-2*r+o),C=A*t+l*n,y=A*e+l*o,I=A*i+l*a,E=A*r+l*s,m=90-180*z.atan2(f-w,M-T)/V;return(f>w||M=t.x&&e<=t.x2&&n>=t.y&&n<=t.y2},e.isBBoxIntersect=function(t,n){var o=e.isPointInsideBBox;return o(n,t.x,t.y)||o(n,t.x2,t.y)||o(n,t.x,t.y2)||o(n,t.x2,t.y2)||o(t,n.x,n.y)||o(t,n.x2,n.y)||o(t,n.x,n.y2)||o(t,n.x2,n.y2)||(t.xn.x||n.xt.x)&&(t.yn.y||n.yt.y)},e.pathIntersection=function(t,e){return d(t,e)},e.pathIntersectionNumber=function(t,e){return d(t,e,1)},e.isPointInsidePath=function(t,n,o){var i=e.pathBBox(t);return e.isPointInsideBBox(i,n,o)&&d(t,[["M",n,o],["H",i.x2+10]],1)%2==1},e._removedFactory=function(e){return function(){t("raphael.log",null,"Raphaël: you are calling to method “"+e+"” of removed object",e)}};var Nt=e.pathBBox=function(t){var e=mt(t);if(e.bbox)return n(e.bbox);if(!t)return{x:0,y:0,width:0,height:0,x2:0,y2:0};t=jt(t);for(var o,i=0,r=0,a=[],s=[],l=0,A=t.length;l1&&(w=z.sqrt(w),n*=w,o*=w);var T=n*n,C=o*o,y=(a==s?-1:1)*z.sqrt(H((T*C-T*M*M-C*f*f)/(T*M*M+C*f*f))),I=y*n*M/o+(t+l)/2,E=y*-o*f/n+(e+A)/2,m=z.asin(((e-E)/o).toFixed(9)),N=z.asin(((A-E)/o).toFixed(9));m=tN&&(m-=2*V),!s&&N>m&&(N-=2*V)}var b=N-m;if(H(b)>d){var x=N,D=l,L=A;N=m+d*(s&&N>m?1:-1),l=I+n*z.cos(N),A=E+o*z.sin(N),h=Bt(l,A,n,o,r,0,s,D,L,[N,x,I,E])}b=N-m;var B=z.cos(m),S=z.sin(m),Q=z.cos(N),U=z.sin(N),k=z.tan(b/4),R=4/3*n*k,O=4/3*o*k,Y=[t,e],F=[t+R*S,e-O*B],P=[l+R*U,A-O*Q],G=[l,A];if(F[0]=2*Y[0]-F[0],F[1]=2*Y[1]-F[1],c)return[F,P,G][v](h);h=[F,P,G][v](h).join()[j](",");for(var W=[],X=0,J=h.length;X"1e12"&&(d=.5),H(g)>"1e12"&&(g=.5),d>0&&d<1&&(l=St(t,e,n,o,i,r,a,s,d),p.push(l.x),h.push(l.y)),g>0&&g<1&&(l=St(t,e,n,o,i,r,a,s,g),p.push(l.x),h.push(l.y)),A=r-2*o+e-(s-2*r+o),c=2*(o-e)-2*(r-o),u=e-o,d=(-c+z.sqrt(c*c-4*A*u))/2/A,g=(-c-z.sqrt(c*c-4*A*u))/2/A,H(d)>"1e12"&&(d=.5),H(g)>"1e12"&&(g=.5),d>0&&d<1&&(l=St(t,e,n,o,i,r,a,s,d),p.push(l.x),h.push(l.y)),g>0&&g<1&&(l=St(t,e,n,o,i,r,a,s,g),p.push(l.x),h.push(l.y)),{min:{x:Y[D](0,p),y:Y[D](0,h)},max:{x:O[D](0,p),y:O[D](0,h)}}}),jt=e._path2curve=i(function(t,e){var n=!e&&mt(t);if(!e&&n.curve)return bt(n.curve);for(var o=Dt(t),i=e&&Dt(e),r={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},a={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},s=(function(t,e,n){var o,i,r={T:1,Q:1};if(!t)return["C",e.x,e.y,e.x,e.y,e.x,e.y];switch(!(t[0]in r)&&(e.qx=e.qy=null),t[0]){case"M":e.X=t[1],e.Y=t[2];break;case"A":t=["C"][v](Bt[D](0,[e.x,e.y][v](t.slice(1))));break;case"S":"C"==n||"S"==n?(o=2*e.x-e.bx,i=2*e.y-e.by):(o=e.x,i=e.y),t=["C",o,i][v](t.slice(1));break;case"T":"Q"==n||"T"==n?(e.qx=2*e.x-e.qx,e.qy=2*e.y-e.qy):(e.qx=e.x,e.qy=e.y),t=["C"][v](Lt(e.x,e.y,e.qx,e.qy,t[1],t[2]));break;case"Q":e.qx=t[1],e.qy=t[2],t=["C"][v](Lt(e.x,e.y,t[1],t[2],t[3],t[4]));break;case"L":t=["C"][v](vt(e.x,e.y,t[1],t[2]));break;case"H":t=["C"][v](vt(e.x,e.y,t[1],e.y));break;case"V":t=["C"][v](vt(e.x,e.y,e.x,t[1]));break;case"Z":t=["C"][v](vt(e.x,e.y,e.X,e.Y))}return t}),l=function(t,e){if(t[e].length>7){t[e].shift();for(var n=t[e];n.length;)c[e]="A",i&&(u[e]="A"),t.splice(e++,0,["C"][v](n.splice(0,6)));t.splice(e,1),p=O(o.length,i&&i.length||0)}},A=function(t,e,n,r,a){t&&e&&"M"==t[a][0]&&"M"!=e[a][0]&&(e.splice(a,0,["M",r.x,r.y]),n.bx=0,n.by=0,n.x=t[a][1],n.y=t[a][2],p=O(o.length,i&&i.length||0))},c=[],u=[],d="",g="",h=0,p=O(o.length,i&&i.length||0);hi){if(n&&!d.start){if(c=$t(a,s,l[1],l[2],l[3],l[4],l[5],l[6],i-g),u+=["C"+c.start.x,c.start.y,c.m.x,c.m.y,c.x,c.y],r)return u;d.start=u,u=["M"+c.x,c.y+"C"+c.n.x,c.n.y,c.end.x,c.end.y,l[5],l[6]].join(),g+=A,a=+l[5],s=+l[6];continue}if(!t&&!n)return c=$t(a,s,l[1],l[2],l[3],l[4],l[5],l[6],i-g),{x:c.x,y:c.y,alpha:c.alpha}}g+=A,a=+l[5],s=+l[6]}u+=l.shift()+l}return d.end=u,c=t?g:n?d:e.findDotsAtSegment(a,s,l[0],l[1],l[2],l[3],l[4],l[5],1),c.alpha&&(c={x:c.x,y:c.y,alpha:c.alpha}),c}},ee=te(1),ne=te(),oe=te(0,1);e.getTotalLength=ee,e.getPointAtLength=ne,e.getSubpath=function(t,e,n){if(this.getTotalLength(t)-n<1e-6)return oe(t,e).end;var o=oe(t,n,1);return e?oe(o,e).end:o},Zt.getTotalLength=function(){var t=this.getPath();if(t)return this.node.getTotalLength?this.node.getTotalLength():ee(t)},Zt.getPointAtLength=function(t){var e=this.getPath();if(e)return ne(e,t)},Zt.getPath=function(){var t,n=e._getPath[this.type];if("text"!=this.type&&"set"!=this.type)return n&&(t=n(this)),t},Zt.getSubpath=function(t,n){var o=this.getPath();if(o)return e.getSubpath(o,t,n)};var ie=e.easing_formulas={linear:function(t){return t},"<":function(t){return F(t,1.7)},">":function(t){return F(t,.48)},"<>":function(t){var e=.48-t/1.04,n=z.sqrt(.1734+e*e),o=n-e,i=F(H(o),1/3)*(o<0?-1:1),r=-n-e,a=F(H(r),1/3)*(r<0?-1:1),s=i+a+.5;return 3*(1-s)*s*s+s*s*s},backIn:function(t){var e=1.70158;return t*t*((e+1)*t-e)},backOut:function(t){t-=1;var e=1.70158;return t*t*((e+1)*t+e)+1},elastic:function(t){return t==!!t?t:F(2,-10*t)*z.sin((t-.075)*(2*V)/.3)+1},bounce:function(t){var e,n=7.5625,o=2.75;return t<1/o?e=n*t*t:t<2/o?(t-=1.5/o,e=n*t*t+.75):t<2.5/o?(t-=2.25/o,e=n*t*t+.9375):(t-=2.625/o,e=n*t*t+.984375),e}};ie.easeIn=ie["ease-in"]=ie["<"],ie.easeOut=ie["ease-out"]=ie[">"],ie.easeInOut=ie["ease-in-out"]=ie["<>"],ie["back-in"]=ie.backIn,ie["back-out"]=ie.backOut;var re=[],ae=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(t){setTimeout(t,16)},se=function(){for(var n=+new Date,o=0;o1&&!i.next){for(a in d)d[m](a)&&(p[a]=i.totalOrigin[a]);i.el.attr(p),M(i.anim,i.el,i.anim.percents[0],null,i.totalOrigin,i.repeat-1)}i.next&&!i.stop&&M(i.anim,i.el,i.next,null,i.totalOrigin,i.repeat)}}}re.length&&ae(se)},le=function(t){return t>255?255:t<0?0:t};Zt.animateWith=function(t,n,o,i,r,a){var s=this;if(s.removed)return a&&a.call(s),s;var l=o instanceof f?o:e.animation(o,i,r,a);M(l,s,l.percents[0],null,s.attr());for(var A=0,c=re.length;Al&&(l=c)}l+="%",!t[l].callback&&(t[l].callback=i)}return new f(t,n)},Zt.animate=function(t,n,o,i){var r=this;if(r.removed)return i&&i.call(r),r;var a=t instanceof f?t:e.animation(t,n,o,i);return M(a,r,a.percents[0],null,r.attr()),r},Zt.setTime=function(t,e){return t&&null!=e&&this.status(t,Y(e,t.ms)/t.ms),this},Zt.status=function(t,e){var n,o,i=[],r=0;if(null!=e)return M(t,this,-1,Y(e,1)),this;for(n=re.length;r1)for(var o=0,i=n.length;o.5)-1;l(d-.5,2)+l(g-.5,2)>.25&&(g=r.sqrt(.25-l(d-.5,2))*i+.5)&&.5!=g&&(g=g.toFixed(5)-1e-5*i)}return u}),i=i.split(/\s*\-\s*/),"linear"==A){var C=i.shift();if(C=-o(C),isNaN(C))return null;var y=[0,0,r.cos(t.rad(C)),r.sin(t.rad(C))],I=1/(a(s(y[2]),s(y[3]))||1);y[2]*=I,y[3]*=I,y[2]<0&&(y[0]=-y[2],y[2]=0),y[3]<0&&(y[1]=-y[3],y[3]=0)}var E=t._parseDots(i);if(!E)return null;if(c=c.replace(/[\(\)\s,\xb0#]/g,"_"),e.gradient&&c!=e.gradient.id&&(p.defs.removeChild(e.gradient),delete e.gradient),!e.gradient){w=f(A+"Gradient",{id:c}),e.gradient=w,f(w,"radial"==A?{fx:d,fy:g}:{x1:y[0],y1:y[1],x2:y[2],y2:y[3],gradientTransform:e.matrix.invert()}),p.defs.appendChild(w);for(var m=0,N=E.length;m1?Q.opacity/100:Q.opacity});case"stroke":Q=t.getRGB(p),l.setAttribute(h,Q.hex),"stroke"==h&&Q[e]("opacity")&&f(l,{"stroke-opacity":Q.opacity>1?Q.opacity/100:Q.opacity}),"stroke"==h&&o._.arrows&&("startString"in o._.arrows&&y(o,o._.arrows.startString),"endString"in o._.arrows&&y(o,o._.arrows.endString,1));break;case"gradient":("circle"==o.type||"ellipse"==o.type||"r"!=n(p).charAt())&&M(o,p);break;case"opacity":c.gradient&&!c[e]("stroke-opacity")&&f(l,{"stroke-opacity":p>1?p/100:p});case"fill-opacity":if(c.gradient){j=t._g.doc.getElementById(l.getAttribute("fill").replace(/^url\(#|\)$/g,u)),j&&(U=j.getElementsByTagName("stop"),f(U[U.length-1],{"stop-opacity":p}));break}default:"font-size"==h&&(p=i(p,10)+"px");var k=h.replace(/(\-.)/g,function(t){return t.substring(1).toUpperCase()});l.style[k]=p,o._.dirty=1,l.setAttribute(h,p)}}b(o,r),l.style.visibility=d},N=1.2,b=function(o,r){if("text"==o.type&&(r[e]("text")||r[e]("font")||r[e]("font-size")||r[e]("x")||r[e]("y"))){var a=o.attrs,s=o.node,l=s.firstChild?i(t._g.doc.defaultView.getComputedStyle(s.firstChild,u).getPropertyValue("font-size"),10):10;if(r[e]("text")){for(a.text=r.text;s.firstChild;)s.removeChild(s.firstChild);for(var A,c=n(r.text).split("\n"),d=[],g=0,h=c.length;g"));var Z=W.getBoundingClientRect();w.W=d.w=(Z.right-Z.left)/X,w.H=d.h=(Z.bottom-Z.top)/X,w.X=d.x,w.Y=d.y+w.H/2,("x"in l||"y"in l)&&(w.path.v=t.format("m{0},{1}l{2},{1}",r(d.x*C),r(d.y*C),r(d.x*C)+1));for(var K=["x","y","text","font","font-family","font-weight","font-style","font-size"],_=0,q=K.length;_.25&&(n=i.sqrt(.25-s(e-.5,2))*(2*(n>.5)-1)+.5),A=e+g+n),h}),r=r.split(/\s*\-\s*/),"linear"==l){var c=r.shift();if(c=-o(c),isNaN(c))return null}var u=t._parseDots(r);if(!u)return null;if(e=e.shape||e.node,u.length){e.removeChild(a),a.on=!0,a.method="none",a.color=u[0].color,a.color2=u[u.length-1].color;for(var d=[],p=0,f=u.length;p')}}catch(t){B=function(t){return e.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},t._engine.initWin(t._g.win),t._engine.create=function(){var e=t._getContainer.apply(0,arguments),n=e.container,o=e.height,i=e.width,r=e.x,a=e.y;if(!n)throw new Error("VML container not found.");var s=new t._Paper,l=s.canvas=t._g.doc.createElement("div"),A=l.style;return r=r||0,a=a||0,i=i||512,o=o||342,s.width=i,s.height=o,i==+i&&(i+="px"),o==+o&&(o+="px"),s.coordsize=1e3*C+g+1e3*C,s.coordorigin="0 0",s.span=t._g.doc.createElement("span"),s.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",l.appendChild(s.span),A.cssText=t.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",i,o),1==n?(t._g.doc.body.appendChild(l),A.left=r+"px",A.top=a+"px",A.position="absolute"):n.firstChild?n.insertBefore(l,n.firstChild):n.appendChild(l),s.renderfix=function(){},s},t.prototype.clear=function(){t.eve("raphael.clear",this),this.canvas.innerHTML=h,this.span=t._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},t.prototype.remove=function(){t.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var e in this)this[e]="function"==typeof this[e]?t._removedFactory(e):null;return!0};var S=t.st;for(var Q in L)L[e](Q)&&!S[e](Q)&&(S[Q]=function(t){return function(){var e=arguments;return this.forEach(function(n){n[t].apply(n,e)})}}(Q))}}.apply(e,o),!(void 0!==i&&(t.exports=i))}])})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n1&&(i=(t+1)/2),o.splice(i,1),2===o.length)o=e.connection._buildStraightLinePathInfo();else{var r=o[1],a=e.connection._buildFromFigureIntersetion({x:r[1],y:r[2]},!0),s=o[0];s[1]=a.x,s[2]=a.y;var l=o[o.length-2],A=e.connection._buildToFigureIntersetion({x:l[1],y:l[2]},!0),c=o[o.length-1];c[1]=A.x,c[2]=A.y}e.path.attr("path",o),e.remove()});var d=function(o,i){e.context.snapto&&(o-=o%10,i-=i%10);var s=this.ox+o,l=this.oy+i;if(!(s<1||l<1)){e.context.resizePaper(s+15,l+15),this.attr("x",s),this.attr("y",l),a=Math.round(t/2);var A=e.path.attr("path"),c=A.length,u=void 0,d=void 0,g=void 0,h=2*(n.length-1)-1;if(0===t||1===t){if(g=A[1],u=e.connection._buildFromFigureIntersetion({x:g[1],y:g[2]},!0),d=n[0],2===n.length){var p=e.connection._buildToFigureIntersetion({x:s,y:l},!0);if(p){var f=n[n.length-1];f[1]=p.x,f[2]=p.y}}}else h!==t&&h!==t+1&&h!==t+2||(g=A[c-2],u=e.connection._buildToFigureIntersetion({x:s,y:l},!0),d=n[n.length-1]);u&&(d[1]=u.x,d[2]=u.y);var M=[];n.forEach(function(t,e){r?e===a?M.push(["L",s,l]):M.push(t):(M.push(t),e===a&&M.push(["L",s,l]))}),e.path.attr("path",M),e.connection._buildText()}},g=function(){this.ox=this.attr("x"),this.oy=this.attr("y"),e.controller.removeOthers(e),this.oldConnectionPathInfo=e.connection.buildPathInfo()},h=function(){var t=e.connection.buildPathInfo(),n=this.oldConnectionPathInfo,o=e.connection.uuid;e.context.addRedoUndo({redo:function(){var n=e.context.getNodeByUUID(o);n.pathInfo=t,n.updatePath(),n._buildText()},undo:function(){var t=e.context.getNodeByUUID(o);t.pathInfo=n,t.updatePath(),t._buildText()}})};this.rect.drag(d,g,h)}},{key:"remove",value:function(){this.rect.remove()}}]),t}();e.default=i},function(t,e){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n'}}]),e}(A.default);e.default=c},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;n'}}]),e}(A.default);e.default=c},function(t,e){"use strict";function n(t){var e=a("消息提示",t);e.modal("show")}function o(t,e){var n=a("确认提示",t,[{name:"确认",click:function(){e.call(this)}}]);n.modal("show")}function i(t,e,n){var o=a(t,e,[{name:"确认",click:function(){n.call(this)}}]);o.modal("show")}function r(t,e,n,o,i){var r=a(t,e,n,i);if(r.modal("show"),o){var s=!0,l=!1,A=void 0;try{for(var c,u=o[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;r.on(d.name,d.callback)}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}}}function a(t,e,n,o){var i=this,r="modal-dialog"+(o?" modal-lg":""),a=$(''),l=$('
    ');a.append(l); +var A=$(''),n.append(this.toolbar),this.toolbarInfo=$(''),this.toolbar.append(this.toolbarInfo),this.nodeToolbar=$('
    '),n.append(this.nodeToolbar),this.canvasContainer=$('
    '),this.canvasContainer.css("height",$(window).height()-100),n.append(this.canvasContainer),this.context=new c.default(this.canvasContainer),this.canvas=new l.default(this.context),this.context.flowDesigner=this;var o="_prop_container",i=$('
    ');this.canvasContainer.append(i);var a=$('');i.append(a),a.mousedown(function(t){t.preventDefault()}),this.propContainer=$('
    ');var s=$('
    ');s.append('
    属性值修改后,请回车以确认
    '),s.append(this.propContainer),i.append(s),i.draggable();var A=$("#__prop_panel_tool__");A.click(function(){s.toggle();var t=s.css("display");t&&"none"!==t?(A.removeClass("glyphicon-circle-arrow-left"),A.addClass("glyphicon-circle-arrow-down")):(A.removeClass("glyphicon-circle-arrow-down"),A.addClass("glyphicon-circle-arrow-left"))}),this._bindSnapToEvent(),this._bindShortcutKey()}return a(t,[{key:"setInfo",value:function(t){this.toolbarInfo.html(t)}},{key:"addNode",value:function(t){if(!t.type)return void w.alert("添加节点没有type属性,无法添加.");if(!t.x||!t.y||!t.name)return void w.alert("添加节点需要有x、y及name属性,否则无法添加");if(!this.context.toolsMap.has(t.type))return void w.alert("添加的节点类型"+t.type+"不存在.");var e=this.context.toolsMap.get(t.type),n=t.x,o=t.y,i=t.width,r=t.height,a=t.name;n=parseInt(n),o=parseInt(o),i=parseInt(i),r=parseInt(r);var s=n+i+10,l=o+r+10;this.context.resizePaper(s+50,l+50);var A=e._newNodeInstance(n,o,a);A.initFromJson(t)}},{key:"_bindShortcutKey",value:function(){var t=this,e=!1;$(document).keydown(function(n){17===n.which&&(e=!0),e&&(90===n.which?t.context.undoManager.undo():89===n.which&&t.context.undoManager.redo())}).keyup(function(t){17===t.which&&(e=!1)})}},{key:"_bindSnapToEvent",value:function(){var t=this;d.eventEmitter.on(d.SNAPTO_SELECTED,function(){t.canvasContainer.hasClass("snaptogrid")?(t.canvasContainer.removeClass("snaptogrid"),t.canvasContainer.addClass("nosnaptogrid"),t.context.snapto=!1):(t.canvasContainer.removeClass("nosnaptogrid"),t.canvasContainer.addClass("snaptogrid"),t.context.snapto=!0)})}},{key:"buildDesigner",value:function(){this._buildTools(),this._bindSelectionEvent()}},{key:"getPropertiesProducer",value:function(){return function(){return"
    "}}},{key:"_buildTools",value:function(){var t=this,e=this.context,n=this,o=!0,i=!1,r=void 0;try{for(var a,s=function(){var e=a.value,n=$('");n.click(function(){e.click.call(this)}),t.toolbar.append(n)},l=this.buttons[Symbol.iterator]();!(o=(a=l.next()).done);o=!0)s()}catch(t){i=!0,r=t}finally{try{!o&&l.return&&l.return()}finally{if(i)throw r}}var A=$('');this.toolbar.append(A),A.click(function(t){e.cancelConnection(),e.currentTool=e.selectTool,n.nodeToolbar.children("label").removeClass("active")});var c=$('');this.toolbar.append(c),c.click(function(t){e.cancelConnection(),e.currentTool=e.connectionTool,n.nodeToolbar.children("label").removeClass("active")});var u=$('');this.toolbar.append(u),u.click(function(t){e.cancelConnection(),e.undoManager.undo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var g=$('');this.toolbar.append(g),g.click(function(t){e.cancelConnection(),e.undoManager.redo(),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var h=$('');this.toolbar.append(h),h.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.SNAPTO_SELECTED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var p=$('');this.toolbar.append(p),p.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.REMOVE_CLICKED),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var f=$('');this.toolbar.append(f),f.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.ALIGN_CENTER),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var M=$('');this.toolbar.append(M),M.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.ALIGN_MIDDLE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool});var w=$('');this.toolbar.append(w),w.click(function(t){e.cancelConnection(),d.eventEmitter.emit(d.UNIFY_SIZE),n.nodeToolbar.children("label").removeClass("active"),e.currentTool=e.selectTool}),this._buildNodeTools()}},{key:"_buildNodeTools",value:function(){var t=this,e=!0,n=!1,o=void 0;try{for(var i,r=function(){var e=i.value,n=$('\n \n ");t.nodeToolbar.append(n),n.click(function(){d.eventEmitter.emit(d.TRIGGER_TOOL,e.getType())})},a=this.context.toolsMap.values()[Symbol.iterator]();!(e=(i=a.next()).done);e=!0)r()}catch(t){n=!0,o=t}finally{try{!e&&a.return&&a.return()}finally{if(n)throw o}}}},{key:"_bindSelectionEvent",value:function(){var t=this,e=this;d.eventEmitter.on(d.OBJECT_SELECTED,function(n){if(t.propContainer.empty(),n instanceof h.default){var o=n.name||n.text.attr("text"),i=$('
    '),r=$('');i.append(r),t.propContainer.append(i),r.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,a=!1,s=!0,l=!1,A=void 0;try{for(var c,u=e.context.allFigures[Symbol.iterator]();!(s=(c=u.next()).done);s=!0){var d=c.value;if(d instanceof h.default&&d!==n&&d.name===o){a=!0;break}}}catch(t){l=!0,A=t}finally{try{!s&&u.return&&u.return()}finally{if(l)throw A}}return a?void w.alert("节点名已存在!"):(n.name=o,n.text.attr("text",$(this).val()),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t.text.attr("text",o)},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t.text.attr("text",i)}}))}),t.propContainer.append(n._tool.getPropertiesProducer().call(n))}else if(n instanceof f.default){var a=$('
    '),s=$('');a.append(s),t.propContainer.append(a),s.change(function(t){var o=$(this).val(),i=n.name,r=n.uuid,a=n.from.fromConnections,s=!1,l=!0,A=!1,c=void 0;try{for(var u,d=a[Symbol.iterator]();!(l=(u=d.next()).done);l=!0){var g=u.value;if(g!==n&&g.name===o){s=!0;break}}}catch(t){A=!0,c=t}finally{try{!l&&d.return&&d.return()}finally{if(A)throw c}}return s?void w.alert("连线名已存在"):(n.name=o,n._buildText(),void e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(r);t.name=o,t._buildText()},undo:function(){var t=e.context.getNodeByUUID(r);t.name=i,t._buildText()}}))});var l=$('
    '),A=$('');l.append(A),A.val(n.type),A.change(function(t){var o=$(this).val(),i=n.uuid,r=n.type;n.type=o,n.updatePath(),e.context.resetSelection(),e.context.addRedoUndo({redo:function(){var t=e.context.getNodeByUUID(i);t.type=o,t.updatePath()},undo:function(){var t=e.context.getNodeByUUID(i);t.type=r,t.updatePath()}})}),t.propContainer.append(l),t.propContainer.append(n.from._tool.getConnectionPropertiesProducer().call(n))}}),d.eventEmitter.on(d.CANVAS_SELECTED,function(){t.propContainer.empty(),t.propContainer.append(t.getPropertiesProducer().call(t))}),d.eventEmitter.emit(d.CANVAS_SELECTED)}},{key:"addButton",value:function(t){return t.icon&&t.tip&&t.click?(this.buttons.push(t),!0):(w.alert("添加到设计器工具栏的按钮对象必须要有icon、tip及click三个属性."),!1)}},{key:"addTool",value:function(t){return t.context=this.context,this.context.registerTool(t),this}},{key:"toJSON",value:function(){return this.elementsToJSON()}},{key:"validate",value:function(){var t=[],e=!0,n=!1,o=void 0;try{for(var i,r=this.context.allFigures[Symbol.iterator]();!(e=(i=r.next()).done);e=!0){var a=i.value;if(a instanceof h.default){var s=a.validate();s&&t.push(s)}}}catch(t){n=!0,o=t}finally{try{!e&&r.return&&r.return()}finally{if(n)throw o}}if(t.length>0){var l="";return t.forEach(function(t,e){l+=e+1+"."+t+"
    "}),l='错误:
    '+l+"
    ",w.alert(l),!1}return!0}},{key:"elementsToJSON",value:function(){var t=[];return this.context.allFigures.forEach(function(e,n){e instanceof h.default&&t.push(e.toJSON())}),t}}]),t}();e.default=T},function(t,e,n){var o=n(254);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"@font-face{font-family:fd;src:url("+n(255)+");src:url("+n(255)+") format('embedded-opentype'),url("+n(256)+") format('woff'),url("+n(257)+") format('truetype'),url("+n(258)+') format(\'svg\')}.fd{font-family:fd!important;font-size:16px;font-style:normal;-webkit-font-smoothing:antialiased;-webkit-text-stroke-width:.2px;-moz-osx-font-smoothing:grayscale}.fd-delete:before{content:"\\E605"}.fd-undo:before{content:"\\E609"}.fd-snapto:before{content:"\\E603"}.fd-redo:before{content:"\\E60A"}.fd-select:before{content:"\\E601"}.fd-align-center:before{content:"\\E607"}.fd-align-middle:before{content:"\\E608"}.fd-line:before{content:"\\E602"}.fd-samesize:before{content:"\\E606"}',""])},function(t,e){t.exports="data:application/vnd.ms-fontobject;base64,cB0AAGwcAAABAAIAAAAAAAIABgMAAAAAAAABAPQBAAAAAExQAQAAAAAAABAAAAAAAAAAAAEAAAAAAAAA2nlVlQAAAAAAAAAAAAAAAAAAAAAAAAQAZgBkAAAADABNAGUAZABpAHUAbQAAAIwAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwAAAAQAZgBkAAAAAAAAAQAAAA8AgAADAHBGRlRNc5KkUQAAAPwAAAAcT1MvMleQXLMAAAEYAAAAYGNtYXDmHu1WAAABeAAAAVJjdnQgDWX+sgAAEhgAAAAkZnBnbTD3npUAABI8AAAJlmdhc3AAAAAQAAASEAAAAAhnbHlmy/1O2gAAAswAAAwMaGVhZAp0RV4AAA7YAAAANmhoZWEH3gNtAAAPEAAAACRobXR4JrUCywAADzQAAAAybG9jYRFUFFwAAA9oAAAAHG1heHABUwpdAAAPhAAAACBuYW1lMQqIYQAAD6QAAAHmcG9zdLYOmO0AABGMAAAAhHByZXClub5mAAAb1AAAAJUAAAABAAAAAMw9os8AAAAA06qAwAAAAADTqoDBAAQD/QH0AAUAAAKZAswAAACPApkCzAAAAesAMwEJAAACAAYDAAAAAAAAAAAAARAAAAAAAAAAAAAAAFBmRWQAwAB45goDgP+AAFwDgAChAAAAAQAAAAADGAAAAAAAIAABAAAAAwAAAAMAAAAcAAEAAAAAAEwAAwABAAAAHAAEADAAAAAIAAgAAgAAAHjmA+YK//8AAAB45gHmBf///4saAxoCAAEAAAAAAAAAAAAAAQYAAAEAAAAAAAAAAQIAAAACAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACACIAAAEyAqoAAwAHAClAJgAAAAMCAANXAAIBAQJLAAICAU8EAQECAUMAAAcGBQQAAwADEQUPKzMRIREnMxEjIgEQ7szMAqr9ViICZgAAAAUALP/hA7wDGAAWADAAOgBSAF4Bd0uwE1BYQEoCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoGCV4RAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBdQWEBLAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgxeAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0uwGFBYQEwCAQANDg0ADmYAAw4BDgNeAAEICAFcEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CG0BOAgEADQ4NAA5mAAMOAQ4DAWYAAQgOAQhkEAEJCAoICQpmEQEMBgQGDARmAAsEC2kPAQgABgwIBlgACgcFAgQLCgRZEgEODg1RAA0NCg5CWVlZQChTUzs7MjEXF1NeU15bWDtSO1JLQzc1MToyOhcwFzBRETEYESgVQBMWKwEGKwEiDgIdASE1NCY1NC4CKwEVIQUVFBYUDgIjBiYrASchBysBIiciLgI9ARciBhQWMzI2NCYXBgcOAx4BOwYyNicuAScmJwE1ND4COwEyFh0BARkbGlMSJRwSA5ABChgnHoX+SgKiARUfIw4OHw4gLf5JLB0iFBkZIBMIdwwSEgwNEhKMCAYFCwQCBA8OJUNRUEAkFxYJBQkFBQb+pAUPGhW8HykCHwEMGScaTCkQHAQNIBsSYYg0Fzo6JRcJAQGAgAETGyAOpz8RGhERGhF8GhYTJA4QDQgYGg0jERMUAXfkCxgTDB0m4wAAAQC3/4MDRgOAABwAIUAeDgEBAAFAAAACAQIAAWYAAgIBUQABAQsBQicrIwMRKwEWBwYrARMWBg8BBiYnAwcGIyInJjURNDc2MzIXAz4SCgoY2nMGDA5lDhwGbbILDwcHFhYHBxAKASwRFhf+8A4cBisGDA0BA7MLAwoYA1sYCgMLAAAAAwAp/4MD1wMvACMAJwArACVACysqKSgnJiUkCAA9S7AWUFi1AAAACgBCG7MAAABfWbISAQ8rAScmIg8BDgEXAS4BBg8BBhQfAR4BNj8BPgEnAR4BPgE/ATY0ASc3FwEnNxcDvUEcTBxBGAUT/k0SKioQQRoaQRIvLxJBFwYSAbQOHx8eDEEa/O9eXl4CFl5eXgLUQRoaQRhEG/5ODQYOD0EcTBxBEQ0NEUEYQxsBtAkIAw0MQRtM/QdeXl4CFl5dXQAAAAMAgP/AA4ADQAA9AEYATgBdQFpNTEVEBAIDSj4CBgJHQjEsFhEGAQYDQBgBAj8BBgI/BAECAwYDAgZmAAYBAwYBZAUBAQFnBwEAAwMATQcBAAADUQADAANFAQBBQDQyKikiIRoZEA4APQE9CA4rAQ4BFRQWFx4DHwIWMzI/AzY1JicwIyYnLgE1NDYyFhUUBgcGByMGBxQfAxYzMj8BNjc+ATU0JgEVMDMHJic3FgUnNjU2NxcGAgCu0gsSCRcTEQUFAQcNBAQDZQQLAQEBOREQC4jCiAsQEjgBAQELBGQEAwUNBgIuIBIL0v6sAVYsG1USAdZWATQTVRsDQAHYt01pSSVKNSkLCwIMAQIpAgYNBQOER0NTQWmMjGlAVENKgQMFDQYCKQIBDAJgg0lpTbfY/MkCI2BxGE6bIwEBdU8YcQAAAAYAgP+BA4ADAQAMABAAFAAYABwAIADSS7AUUFhAMA4MAgoCCwIKXg8NAgsICAtcBxAFAwEJBAICCgECVwAIAAMIA1QABgYATwAAAAoGQhtLsBZQWEAyDgwCCgILAgoLZg8NAgsIAgsIZAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbQDgODAIKAgsCCgtmDw0CCwgCCwhkAAAABgEABlcHEAUDAQkEAgIKAQJXAAgDAwhLAAgIA1AAAwgDRFlZQCEAACAfHh0cGxoZGBcWFRQTEhEQDw4NAAwADBEREREhERMrATUjIRUjFTMRIREzNSUhFSEBIREhBTMRIxMzESMBMxEjAqoB/qzVVQJWVf3/AQD/AAGB/gACAP7rKiqAKir/ACoqAoGAgCr9KgLWKlZW/SsCq0D91QIr/dUCK/3VAAAEAAv/jwP1A3cAIwBEAGUAiADkQCOCe3odBAAEbwQCAwCHAQEDZEMCCwZZLQIIC05NRjgECggGQEuwMlBYQEUVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0TAQUNAQkFCVURAgIBAQRRFAEEBApBDwcCBgYKUQwBCgoLCkIbQEMVAQMAAQADAWYWEAILBggGCwhmEgEAAwEATQ4BCAoGCE0PBwIGDAEKCQYKWRMBBQ0BCQUJVRECAgEBBFEUAQQECgRCWUApRUWGhYB9eHdzcWtnRWVFZWFdV1VRUEtIQkE+OzY1JhElFTUUIhYgFxcrARcyFhcVFAYHJzAxIyInJj8BIzA1NzQ2OwEyFhUHATYyFhQHATY7ATEzHgEdAQ4BIwcBFhQGIicBFxQGKwEiJjUnMyc0BxUOASsBIiY/AQEGIiY0NwEnIiYnNTQ2Nxc7ATIXFhUHAwYrAgcuAT0BPgEzNwEmNDYyFwEnJjY7ATIWFxUUMSMXFALplAoPAQ4J4QwJBwYBAQEBDQoQCg0BAQQJGhIJ/pUJBw7hCQ4BDwqUAQMJEhoJ/vsBDQoRCg0BAQH6AQ0KEAkOAQH++wkaEgkBA5QJDwIOCuABCwoGBgIEBgoLAeAKDgIPCZT+/QkSGgkBBQEBDgkQCg0BAQICQQEMCxAKDQEBBgYLCwHhCgsOCZgBAgkTGQr9vQgBDQoQCwwB/v8JGhMJAQKXCg4LCuIMChbiCgsOCpj+/QkTGgkBAQEMCxAKDQEBBgYKDQEmBgEBDQoQCwwBAQAKGRMJ/v6YCQ4LCuEBCwsAAAADAJL/gAMlA4AAAwAHABsAU0BQAAsKC2gABgUGaQwBCgACAwoCWAADDg0CCQQDCVcIAQQAAAEEAFcAAQUFAUsAAQEFTwcBBQEFQwgICBsIGxoZGBcWFRQTERERERIREREQDxcrNyEVIRMhFSEXFSERIRUzNSERITUzESM1IxUjEdsCAP4ASgFt/pOS/tsBJUkBJf7b29tJ3O6TAkqTSZL+25KSASWSASWSkv7bAAAAAAMAAABbBAAC7gADAAcAGwBfQFwACAAACggAVwAKAAIHCgJXCwkCBwwGAgQDBwRXDwEDAA0BAw1XDgEBBQUBSw4BAQEFTwAFAQVDBAQAABsaGRgXFhUUExIREA8ODQwLCgkIBAcEBwYFAAMAAxEQDyslETMRJREzETczESERMzUjESERIzUhFSMVMxUhApKT/baTSZIBJZKS/tuS/tuSkgElpQIA/gBJAW3+k5L+2wElSQEl/tvc3EnbAAAAAQAA/18EAALGAC8AO0A4GQgCAgEBQAMBAQQCBAECZgACBQQCBWQAAAAEAQAEWQAFBgYFTQAFBQZRAAYFBkUjJRYVFRcSBxUrAS4BIg4CHQEnJiIGFB8BFjI/ATY0JiIPATU0PgEyHgEUDgEjIgYUFjMyPgI0JgOBPp+un3xBbggVDwiZCBUHmgcPFQduZ7HQsWdnsWgLDw8LV597QkICRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+eAAABAAD/XwQAAsYAMABJQEYZCAICAQFACAEHBAEEBwFmAwEBAgQBAmQAAgUEAgVkAAAABAcABFkABQYGBU0ABQUGUQAGBQZFAAAAMAAwIyUWFRUXEgkVKxM+ATIeAh0BNzYyFhQPAQYiLwEmNDYyHwE1NC4BIg4BFB4BMzIWFAYjIi4CNDY3gD2frp98Qm0IFQ8HmgcWB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCPQJGPkJCfJ5YQm4IDxYHmgcHmgcWDwhuQmmxZmax0bFnDxUPQnufr54+AAABAAAAAQAAlVV52l8PPPUACwQAAAAAANOqgMEAAAAA06qAwQAA/18EAAOAAAAACAACAAAAAAAAAAEAAAOA/18AXAQBAAAAAAQAAAEAAAAAAAAAAAAAAAAAAAAMAXYAIgAAAAABVQAAA+kALAQAALcEAAApBAAAgAQAAIAEAAALBAAAkgQAAAAEAQAAAAAAAAAAACgAKAAoAWQBpgIIAqoDTgSABNgFNgWaBgYAAQAAAA0AiQAGAAAAAAACAC4APABsAAAApQmWAAAAAAAAAAwAlgABAAAAAAABAAIAAAABAAAAAAACAAYAAgABAAAAAAADAB4ACAABAAAAAAAEAAIAJgABAAAAAAAFAEYAKAABAAAAAAAGAAIAbgADAAEECQABAAQAcAADAAEECQACAAwAdAADAAEECQADADwAgAADAAEECQAEAAQAvAADAAEECQAFAIwAwAADAAEECQAGAAQBTGZkTWVkaXVtRm9udEZvcmdlIDIuMCA6IGZkIDogMTItNy0yMDE2ZmRWZXJzaW9uIDEuMCA7IHR0ZmF1dG9oaW50ICh2MC45NCkgLWwgOCAtciA1MCAtRyAyMDAgLXggMTQgLXcgIkciIC1mIC1zZmQAZgBkAE0AZQBkAGkAdQBtAEYAbwBuAHQARgBvAHIAZwBlACAAMgAuADAAIAA6ACAAZgBkACAAOgAgADEAMgAtADcALQAyADAAMQA2AGYAZABWAGUAcgBzAGkAbwBuACAAMQAuADAAIAA7ACAAdAB0AGYAYQB1AHQAbwBoAGkAbgB0ACAAKAB2ADAALgA5ADQAKQAgAC0AbAAgADgAIAAtAHIAIAA1ADAAIAAtAEcAIAAyADAAMAAgAC0AeAAgADEANAAgAC0AdwAgACIARwAiACAALQBmACAALQBzAGYAZAAAAAIAAAAAAAD/gwAyAAAAAAAAAAAAAAAAAAAAAAAAAAAADQAAAAEAAgBbAQIBAwEEAQUBBgEHAQgBCQEKB3VuaUU2MDEHdW5pRTYwMgd1bmlFNjAzB3VuaUU2MDUHdW5pRTYwNgd1bmlFNjA3B3VuaUU2MDgHdW5pRTYwOQd1bmlFNjBBAAEAAf//AA8AAAAAAAAAAAAAAAAAAAAAADIAMgMY/+EDgP9fAxj/4QOA/1+wACywIGBmLbABLCBkILDAULAEJlqwBEVbWCEjIRuKWCCwUFBYIbBAWRsgsDhQWCGwOFlZILAKRWFksChQWCGwCkUgsDBQWCGwMFkbILDAUFggZiCKimEgsApQWGAbILAgUFghsApgGyCwNlBYIbA2YBtgWVlZG7AAK1lZI7AAUFhlWVktsAIsIEUgsAQlYWQgsAVDUFiwBSNCsAYjQhshIVmwAWAtsAMsIyEjISBksQViQiCwBiNCsgoAAiohILAGQyCKIIqwACuxMAUlilFYYFAbYVJZWCNZISCwQFNYsAArGyGwQFkjsABQWGVZLbAELLAII0KwByNCsAAjQrAAQ7AHQ1FYsAhDK7IAAQBDYEKwFmUcWS2wBSywAEMgRSCwAkVjsAFFYmBELbAGLLAAQyBFILAAKyOxBAQlYCBFiiNhIGQgsCBQWCGwABuwMFBYsCAbsEBZWSOwAFBYZVmwAyUjYURELbAHLLEFBUWwAWFELbAILLABYCAgsApDSrAAUFggsAojQlmwC0NKsABSWCCwCyNCWS2wCSwguAQAYiC4BABjiiNhsAxDYCCKYCCwDCNCIy2wCixLVFixBwFEWSSwDWUjeC2wCyxLUVhLU1ixBwFEWRshWSSwE2UjeC2wDCyxAA1DVVixDQ1DsAFhQrAJK1mwAEOwAiVCsgABAENgQrEKAiVCsQsCJUKwARYjILADJVBYsABDsAQlQoqKIIojYbAIKiEjsAFhIIojYbAIKiEbsABDsAIlQrACJWGwCCohWbAKQ0ewC0NHYLCAYiCwAkVjsAFFYmCxAAATI0SwAUOwAD6yAQEBQ2BCLbANLLEABUVUWACwDSNCIGCwAWG1Dg4BAAwAQkKKYLEMBCuwaysbIlktsA4ssQANKy2wDyyxAQ0rLbAQLLECDSstsBEssQMNKy2wEiyxBA0rLbATLLEFDSstsBQssQYNKy2wFSyxBw0rLbAWLLEIDSstsBcssQkNKy2wGCywByuxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAZLLEAGCstsBossQEYKy2wGyyxAhgrLbAcLLEDGCstsB0ssQQYKy2wHiyxBRgrLbAfLLEGGCstsCAssQcYKy2wISyxCBgrLbAiLLEJGCstsCMsIGCwDmAgQyOwAWBDsAIlsAIlUVgjIDywAWAjsBJlHBshIVktsCQssCMrsCMqLbAlLCAgRyAgsAJFY7ABRWJgI2E4IyCKVVggRyAgsAJFY7ABRWJgI2E4GyFZLbAmLLEABUVUWACwARawJSqwARUwGyJZLbAnLLAHK7EABUVUWACwARawJSqwARUwGyJZLbAoLCA1sAFgLbApLACwA0VjsAFFYrAAK7ACRWOwAUVisAArsAAWtAAAAAAARD4jOLEoARUqLbAqLCA8IEcgsAJFY7ABRWJgsABDYTgtsCssLhc8LbAsLCA8IEcgsAJFY7ABRWJgsABDYbABQ2M4LbAtLLECABYlIC4gR7AAI0KwAiVJiopHI0cjYSBYYhshWbABI0KyLAEBFRQqLbAuLLAAFrAEJbAEJUcjRyNhsAZFK2WKLiMgIDyKOC2wLyywABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyCwCUMgiiNHI0cjYSNGYLAEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmEjICCwBCYjRmE4GyOwCUNGsAIlsAlDRyNHI2FgILAEQ7CAYmAjILAAKyOwBENgsAArsAUlYbAFJbCAYrAEJmEgsAQlYGQjsAMlYGRQWCEbIyFZIyAgsAQmI0ZhOFktsDAssAAWICAgsAUmIC5HI0cjYSM8OC2wMSywABYgsAkjQiAgIEYjR7AAKyNhOC2wMiywABawAyWwAiVHI0cjYbAAVFguIDwjIRuwAiWwAiVHI0cjYSCwBSWwBCVHI0cjYbAGJbAFJUmwAiVhsAFFYyMgWGIbIVljsAFFYmAjLiMgIDyKOCMhWS2wMyywABYgsAlDIC5HI0cjYSBgsCBgZrCAYiMgIDyKOC2wNCwjIC5GsAIlRlJYIDxZLrEkARQrLbA1LCMgLkawAiVGUFggPFkusSQBFCstsDYsIyAuRrACJUZSWCA8WSMgLkawAiVGUFggPFkusSQBFCstsDcssC4rIyAuRrACJUZSWCA8WS6xJAEUKy2wOCywLyuKICA8sAQjQoo4IyAuRrACJUZSWCA8WS6xJAEUK7AEQy6wJCstsDkssAAWsAQlsAQmIC5HI0cjYbAGRSsjIDwgLiM4sSQBFCstsDossQkEJUKwABawBCWwBCUgLkcjRyNhILAEI0KwBkUrILBgUFggsEBRWLMCIAMgG7MCJgMaWUJCIyBHsARDsIBiYCCwACsgiophILACQ2BkI7ADQ2FkUFiwAkNhG7ADQ2BZsAMlsIBiYbACJUZhOCMgPCM4GyEgIEYjR7AAKyNhOCFZsSQBFCstsDsssC4rLrEkARQrLbA8LLAvKyEjICA8sAQjQiM4sSQBFCuwBEMusCQrLbA9LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA+LLAAFSBHsAAjQrIAAQEVFBMusCoqLbA/LLEAARQTsCsqLbBALLAtKi2wQSywABZFIyAuIEaKI2E4sSQBFCstsEIssAkjQrBBKy2wQyyyAAA6Ky2wRCyyAAE6Ky2wRSyyAQA6Ky2wRiyyAQE6Ky2wRyyyAAA7Ky2wSCyyAAE7Ky2wSSyyAQA7Ky2wSiyyAQE7Ky2wSyyyAAA3Ky2wTCyyAAE3Ky2wTSyyAQA3Ky2wTiyyAQE3Ky2wTyyyAAA5Ky2wUCyyAAE5Ky2wUSyyAQA5Ky2wUiyyAQE5Ky2wUyyyAAA8Ky2wVCyyAAE8Ky2wVSyyAQA8Ky2wViyyAQE8Ky2wVyyyAAA4Ky2wWCyyAAE4Ky2wWSyyAQA4Ky2wWiyyAQE4Ky2wWyywMCsusSQBFCstsFwssDArsDQrLbBdLLAwK7A1Ky2wXiywABawMCuwNistsF8ssDErLrEkARQrLbBgLLAxK7A0Ky2wYSywMSuwNSstsGIssDErsDYrLbBjLLAyKy6xJAEUKy2wZCywMiuwNCstsGUssDIrsDUrLbBmLLAyK7A2Ky2wZyywMysusSQBFCstsGgssDMrsDQrLbBpLLAzK7A1Ky2waiywMyuwNistsGssK7AIZbADJFB4sAEVMC0AAEu4AMhSWLEBAY5ZuQgACABjILABI0QgsAMjcLAORSAgS7gADlFLsAZTWliwNBuwKFlgZiCKVViwAiVhsAFFYyNisAIjRLMKCQUEK7MKCwUEK7MODwUEK1myBCgJRVJEswoNBgQrsQYBRLEkAYhRWLBAiFixBgNEsSYBiFFYuAQAiFixBgFEWVlZWbgB/4WwBI2xBQBEAAAA"},function(t,e){t.exports="data:application/font-woff;base64,d09GRgABAAAAABKIABAAAAAAHKwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAABbAAAABsAAAAcc5KkUUdERUYAAAGIAAAAHQAAACAAOgAET1MvMgAAAagAAABNAAAAYFeQXLNjbWFwAAAB+AAAAFAAAAFS5h7tVmN2dCAAAAJIAAAAGAAAACQNZf6yZnBnbQAAAmAAAAT8AAAJljD3npVnYXNwAAAHXAAAAAgAAAAIAAAAEGdseWYAAAdkAAAIVAAADAzL/U7aaGVhZAAAD7gAAAAvAAAANgqIRV5oaGVhAAAP6AAAAB4AAAAkB94DbWhtdHgAABAIAAAAKwAAADImtQLLbG9jYQAAEDQAAAAcAAAAHBFUFFxtYXhwAAAQUAAAACAAAAAgAVMCPm5hbWUAABBwAAABMwAAAfiNvy6hcG9zdAAAEaQAAABKAAAAhLYOmO1wcmVwAAAR8AAAAJUAAACVpbm+ZnicY2BgYGQAgjO2i86D6MurGg5A6YMAUcwH9wB4nGNgZGBg4ANiCQYQYGJgBEIeIGYB8xgABM4APwAAAHicY2Bh/sv4hYGVgYFpJtMZBgaGfgjN+JrBmJETKMrAxswAA4wCDAgQkOaawnCAoeIZF3PD/waGGOYGhoUgNSA5ZgmwEgUGRgDm+w3rAAAAeJxjYGBgZoBgGQZGBhDwAfIYwXwWBgMgzQGETEC64hnzM67//8Esxmes////75ZilmKC6gIDRjYGOJcRpIeJARUwMtAMMNPOaJIAAJ7oC0J4nGNgQANGDEbMEv8fMjf8j4fRAEQcCB14nJ1VaXfTRhSVvGRP2pLEUETbMROnNBqZsAUDLgQpsgvp4kBoJegiJzFd+AN87Gf9mqfQntOP/LTeO14SWnpO2xxL776ZO2/TexNxjKjseSCuUUdKXveksv5UKvGzpK7rXp4o6fWSumynnpIWUStNlczF/SO5RHUuVrJJsEnG616inqs874PSSzKsKEsi2iLayrwsTVNPHD9NtTi9ZJCmgZSMgp1Ko48QqlEvkaoOZUqHXr2eipsFUjYa8aijonoQKu4czzmljTpgpHKVw1yxWW3ke0nW8/qP0kSn2Nt+nGDDY/QjV4FUjMzA9jQeh08k09FeIjORf+y4TpSFUhtcAK9qsMegSvGhuPFBthPI1HjN8XVRqTQyFee6z7LZLB2PlRDlwd/YoZQbur+Ds9OmqFZjcfvAMwY5KZQoekgWgA5Tmaf2CNo8tEBmjfqj4hzwdQgvshBlKs+ULOhQBzJndveTYtrdSddkcaBfBjJvdveS3cfDRa+O9WW7vmAKZzF6khSLixHchzLrp0y71AhHGRdzwMU8XuLWtELIyAKMSiPMUVv4ntmoa5wdY290Ho/VU2TSRfzdTH49OKlY4TjLekfcSJy7x67rwlUgiwinGu8njizqUGWw+vvSkussOGGYZ8VCxZcXvncR+S8xbj+Qd0zhUr5rihLle6YoU54xRYVyGYWlXDHFFOWqKaYpa6aYoTxrilnKc0am/X/p+334Pocz5+Gb0oNvygvwTfkBfFN+CN+UH8E3pYJvyjp8U16Eb0pt4G0pUxGqmLF0+O0lWrWhajkzuMA+D2TNiPZFbwTSMEp11Ukpdb+lVf4k+euix2Prk5K6NWlsiLu6abP4+HTGb25dMuqGnatPjCPloT109dg0oVP7zeHfzl3dKi65q4hqw6g2IpgEgDbotwLxTfNsOxDzll18/EMwAtTPqTVUU3Xt1JUaD/K8q7sYnuTA44hjoI3rrq7ASxNTVkPz4WcpMhX7g7yplWrnsHX5ZFs1hzakwtsi9pVknKbtveRVSZWV96q0Xj6fhiF6ehbXhLZs3cmkEqFRM87x8K4qRdmRlnLUP0Lnl6K+B5xxdkHrwzHuRN1BtTXsdPj5ZiNrCyaGprS9E6BkLF0VY1HlWZxjdA1rHW/cEp6upycW8Sk2mY/CSnV9lI9uI80rdllm0ahKdXSX9lnsqzb9MjtoWB1nP2mqNu7qYVuNKlI9Vb4GtAd2Vt34UA8rPuqgUVU12+jayGM0LmvGfwzIYlz560arJtPv4JZqp81izV1Bc9+YLPdOL2+9yX4r56aRpv9Woy0jl/0cjvltEeDfOSh2U9ZAvTVpiHEB2QsYLtVE5w7N3cYg4jr7H53T/W/NwiA5q22N2Tz14erpKJI7THmcZZtZ1vUozVG0k8Q+RWKrw4nBTY3hWG7KBgbk7j+s38M94K4siw+8bSSAuM/axKie6uDuHlcjNOwruQ8YmWPHuQ2wA+ASxObYtSsdALvSJecOwGfkEDwgh+AhOQS75NwE+Jwcgi/IIfiSHIKvyLkF0COHYI8cgkfkEDwmpw2wTw7BE3IIviaH4BtyWgAJOQQpOQRPySF4ZmRzUuZvqch1oO8sugH0ve0aKFtQfjByZcLOqFh23yKyDywi9dDI1Qn1iIqlDiwi9blFpP5o5NqE+hMVS/3ZIlJ/sYjUF8aXmYGU13oveUcHfwIrvqx+AAEAAf//AA94nJ1WXWwcVxU+596ZO3+7Mzu7OzPrXf/tbnY33k0de73rDbFsz67jFNtxYsf1H0mcVnLsWihBUYWCSJAcSiEPlaiSIAJIjYRASKEqcVvISyshHpCQ+gARLRXJQ1P6gpACL7zQes0ZO0CJAg2s5s7vOWfPd+/5vnOBQQYAy+wGcFCgy88DAGfA54EhsglgDI9IdIcjAIqQJTLjtmyV+uy0XeizsxmM3H/7bXZjcy7DVshXhj1b9/ibPAEu9MB+OApLeG7iZmxqwR9nCGEzDOYKcBNNvgSoqng8gpqqC23JxpCQRGgJDMlYs1AFEVLFAuiKzCRDlxajaJrhaQiHdbORmrjpUcSJ/xJR1fSV/zFkgkIeeryQ0spjxfQPPxQOVyieiery/xdwcXHR3z0zMzBQ7vW8maWZpWMLA0cHjk6M1Kq9+8v7vR6vZ9ruTdi7HT/mllCUMGOyNkxXK/lqpZuV0EnLTtyNmywr8iUspBWyKGS62SB6GRF3+8r9lbwnFJO344Ao9xe6sZAvYLUyxAaw7LYhtqSSM9Fca5S/hHqi0P5Cc5x9H52OrGl2mJ1PNMf2tGXiLS2dMfVcKBoNhaPRF1UhGxKTLDM3Mj3l7/JcTdZkWTR/IFtJ582OLtaBoZZC8lBXpFUKd6aiz1yqePv35zwNcX0dY6lO80fDdtKm40LSje0yI2E1kQxn7Vgcz31oJGKhtvwfqITh1tbz/CBfh1ZI++0mIqAPVMQMaM6piqcB0cBGoZTldgldheYm5goLRb7AFZHNFPJVu1Lr7yt7fCiq64nfPydC5imzVZx+zbAUxXUVJaLjHtv1mn+htyURCiN/3eB6gh9L6NwIeANdlMPv+F7IQgFKkPONUrFrdyGf26XC4MRNd2rhp2SmQyP1Ol1PLr4WRYtWIZ+x0EQPuzHIJ96B7dg/jENYoJshHMb+ChZqXjD4W/XWQ631hBxrTkaLxUg9maxH9+6N1j0RxTfMjo72UD358Z+XlpaYG5x+GxgkDqSah8PCtLZ97XDYridGUviGpvJwqJ46tKns2J84sY1hfevnfJ37MAgH4TCc8D83eWj0gMT4+BAT7MlG7x7XFii4n0A2jIINS8i44EysgEAucFlGxFUFgXOYpAvw6UAzRhHqfqVc7Mqkky0REwZxUDVLBJvK0WvnHYxqb5j3V/OFnmyeyq5a6S+7TlwoQskKJd7Bg+/YXxuiL3l0evqUfKHmyoX+an/NEwxevW1ENS9myzIqYUnipySD8viMHTEu/eKSEYnuoydDWpa4HBasuzNq3G6+gnN7UrNRfHcOK7HZFPfxvVuTa2O58WqXYbAQsi4mwjL/2pMjM/W1F19c858aGb+47d/FMMSefn5sbfLWex//imWfPps4/L0s4hePJM7SHAqaw4s0hwghiEAcElSTnXB74macBKbHDDGdGUxfssLMUFXjuBKROWoSYzqyeVCBq/wpEAKOBLUiAmGiwvHL//AzVrYd6Vj+NE9/3yOcggQRxPxDzpyrE6CqfCqIcoB0Jg3Q2dHe1ppKtiQ8WopY1I5YJGUhCNn0S9uxElazaSfrBL2gr5pLO2lM22mZukKMBtJgN7D5yjuzbG52cwthC/BiExg0/1QsrheLW1Assovr68XNInu3ODe3WWI/9jffYaWdASCBsfVN/ld+jvh0AE7BJfjQz371/JfbJJC+QBUJ30DkyyPMEItPMNU4PHlwn6Srwp+4WaYJG3WQkyyQ5LoRMlGFoa5Eg2eYJAHWhToZQzmMpEazNukDStNxlCS9bilMCH06hLpu6DSHI58aJ/Agc03oi48MKTUW/a7R0a+/sP6VL5177uznV0dPjZ565sT87PTUxGcb9aEBKns751TjGbfT80rolV0vKP1CT2+gS8OY7anWKv2BAjsKEi/idB7A3r52bCMGZRV04yJTQC8eCH6+WugrVBTHxOBhGFFk8pUaFjL5ApGq5lEYWk6FixJTunGQFKavhnmiGylMfvtP6M97s16c/fGqTsKk3QtpiiD6YFiP6GFCpSWjWvNbmmLe00y09KvItWhSa35EBnZggH8LTOkbNj8KbJFf1Sxm6u+joQvBJKEb+L5uMku72twMXJE0w9S2gzNWx5CxfSuEYeA93TC1a8i0WIu++ZYaBDZC2NzSkjEN2bd109A/COnuB2SmX6NoMYqG/4pA57zAB14IektMazavaeR1D40dzb68tc5z1DeC/U8KZvwpMHTjWRCyWKNFBcZ1tkDNO8w0iWvzKkrUbCSYBySpmaCmIh9RKH95RFXVlPpPsgQUidKIWF6pRsyI0fAcoofTV6VzlchRzTpZ+w7RAcbxdPPK5eYdzI1hrnnnzp2xu/evsPErY/Tu8mXMBQfdwna+AMckYPcf5HvSP07EB12ljChZRWfzhsaUEE0zV6R5i2qX+lR4nhYjyJculDAE+UoE5CFuhwxdUyVFoo3e9j4vYpVydp8djNoOybN0zla3Se+k2eUrmz+jJHeye5DrDwNAY/8O6O7dsSB5agZbJyn3X8JeGPD3tagBR3xOFcWoiVCXliUmB/okIUiLIAshTwJtFaaDxRjN5lzH8aKKU6JGub2tocYZdEs3aAyVoInSPgXL7RgnTuzsZoZYJc8vDl1/9fqF+hnVsdTvqI7yXcVylDOrG7/eWF3deNawLGP++vlGgx0cajQuvLzQOKNaLhnR4VrqmcbaxsrKxm82Vi3Hapy//pOXP4mjB8b8gw9wqKhIKCm4QoACPMufwKM8Ag+974GeB6g0pxQLcidUtYDgtA/I7N1mZQehCvBivB376AttVboZ8Xh9MEDVOE2ogkz/E6rBx4U1BH8HE1HbonicY2BkYGAA4imc72fE89t8ZZBnYQCBy6saDiLo//EsDMwNQC4HAxNIFABHjAtUAHicY2BkYGBu+B/PEMMCZDEwsDAwgGkkwAMAQ24CVQAAeJxjLGNQYgACxlAGBuaXDDosDAzbgVgTiBugmBuIJwExAwsjSCUAjA4EpgAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUBdwAAAAB4nEWPvWvDQAzFnxMnEOjUpVsRnpLhzNk4zVfneOpaKBRKIL7EkNpgXz6gU6Fj5/69fb4crQ9JP510TzKAG/wgQPcF6GHouaM7z33c49VzyMqn5wHWwa3nIXrBGzuDcMSb0L3quEf9kec+Hql05ZDnw/MA3/jyPEQYvMBgCxjaEwpiiSPemRTb8si4Ro0K1sUGO7YIUsTQjEta9/pKCe8VZrSU1QQPfFxXdl03u0LSWMtSzJYuSdVMpTph/W/0M3UbtBzeTeu0rhNWNMtjsOFaltU9e7p9BGOc2BNjgQwT5goH+rmjhn7qFBRyt7H22cWpZ47P9BHrkcuM8y2XKZq2rCtJuPNKrDWbo633ZWVlfNLxIpuIOshcVCNTLSqXVDNcJMlEnSXKI1FGVPv/d78dYkLkAHicY2BiAIP/zQxGDNgALxAzMjAxRDMyMTIzsjCyMrIxsjNyMHIycrGX5mW6mhkYQmkjKG0MpU2htBmUNofSFlDaEko7AgDi2xY5AABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="},function(t,e){t.exports="data:application/x-font-ttf;base64,AAEAAAAPAIAAAwBwRkZUTXOSpFEAAAD8AAAAHE9TLzJXkFyzAAABGAAAAGBjbWFw5h7tVgAAAXgAAAFSY3Z0IA1l/rIAABIYAAAAJGZwZ20w956VAAASPAAACZZnYXNwAAAAEAAAEhAAAAAIZ2x5Zsv9TtoAAALMAAAMDGhlYWQKdEVeAAAO2AAAADZoaGVhB94DbQAADxAAAAAkaG10eCa1AssAAA80AAAAMmxvY2ERVBRcAAAPaAAAABxtYXhwAVMKXQAAD4QAAAAgbmFtZTEKiGEAAA+kAAAB5nBvc3S2DpjtAAARjAAAAIRwcmVwpbm+ZgAAG9QAAACVAAAAAQAAAADMPaLPAAAAANOqgMAAAAAA06qAwQAEA/0B9AAFAAACmQLMAAAAjwKZAswAAAHrADMBCQAAAgAGAwAAAAAAAAAAAAEQAAAAAAAAAAAAAABQZkVkAMAAeOYKA4D/gABcA4AAoQAAAAEAAAAAAxgAAAAAACAAAQAAAAMAAAADAAAAHAABAAAAAABMAAMAAQAAABwABAAwAAAACAAIAAIAAAB45gPmCv//AAAAeOYB5gX///+LGgMaAgABAAAAAAAAAAAAAAEGAAABAAAAAAAAAAECAAAAAgAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAiAAABMgKqAAMABwApQCYAAAADAgADVwACAQECSwACAgFPBAEBAgFDAAAHBgUEAAMAAxEFDyszESERJzMRIyIBEO7MzAKq/VYiAmYAAAAFACz/4QO8AxgAFgAwADoAUgBeAXdLsBNQWEBKAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKBgleEQEMBgQGDF4ACwQLaQ8BCAAGDAgGWAAKBwUCBAsKBFkSAQ4ODVEADQ0KDkIbS7AXUFhASwIBAA0ODQAOZgADDgEOA14AAQgIAVwQAQkICggJCmYRAQwGBAYMXgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtLsBhQWEBMAgEADQ4NAA5mAAMOAQ4DXgABCAgBXBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQhtATgIBAA0ODQAOZgADDgEOAwFmAAEIDgEIZBABCQgKCAkKZhEBDAYEBgwEZgALBAtpDwEIAAYMCAZYAAoHBQIECwoEWRIBDg4NUQANDQoOQllZWUAoU1M7OzIxFxdTXlNeW1g7UjtSS0M3NTE6MjoXMBcwURExGBEoFUATFisBBisBIg4CHQEhNTQmNTQuAisBFSEFFRQWFA4CIwYmKwEnIQcrASInIi4CPQEXIgYUFjMyNjQmFwYHDgMeATsGMjYnLgEnJicBNTQ+AjsBMhYdAQEZGxpTEiUcEgOQAQoYJx6F/koCogEVHyMODh8OIC3+SSwdIhQZGSATCHcMEhIMDRISjAgGBQsEAgQPDiVDUVBAJBcWCQUJBQUG/qQFDxoVvB8pAh8BDBknGkwpEBwEDSAbEmGINBc6OiUXCQEBgIABExsgDqc/ERoRERoRfBoWEyQOEA0IGBoNIxETFAF35AsYEwwdJuMAAAEAt/+DA0YDgAAcACFAHg4BAQABQAAAAgECAAFmAAICAVEAAQELAUInKyMDESsBFgcGKwETFgYPAQYmJwMHBiMiJyY1ETQ3NjMyFwM+EgoKGNpzBgwOZQ4cBm2yCw8HBxYWBwcQCgEsERYX/vAOHAYrBgwNAQOzCwMKGANbGAoDCwAAAAMAKf+DA9cDLwAjACcAKwAlQAsrKikoJyYlJAgAPUuwFlBYtQAAAAoAQhuzAAAAX1myEgEPKwEnJiIPAQ4BFwEuAQYPAQYUHwEeATY/AT4BJwEeAT4BPwE2NAEnNxcBJzcXA71BHEwcQRgFE/5NEioqEEEaGkESLy8SQRcGEgG0Dh8fHgxBGvzvXl5eAhZeXl4C1EEaGkEYRBv+Tg0GDg9BHEwcQRENDRFBGEMbAbQJCAMNDEEbTP0HXl5eAhZeXV0AAAADAID/wAOAA0AAPQBGAE4AXUBaTUxFRAQCA0o+AgYCR0IxLBYRBgEGA0AYAQI/AQYCPwQBAgMGAwIGZgAGAQMGAWQFAQEBZwcBAAMDAE0HAQAAA1EAAwADRQEAQUA0MiopIiEaGRAOAD0BPQgOKwEOARUUFhceAx8CFjMyPwM2NSYnMCMmJy4BNTQ2MhYVFAYHBgcjBgcUHwMWMzI/ATY3PgE1NCYBFTAzByYnNxYFJzY1NjcXBgIArtILEgkXExEFBQEHDQQEA2UECwEBATkREAuIwogLEBI4AQEBCwRkBAMFDQYCLiASC9L+rAFWLBtVEgHWVgE0E1UbA0AB2LdNaUklSjUpCwsCDAECKQIGDQUDhEdDU0FpjIxpQFRDSoEDBQ0GAikCAQwCYINJaU232PzJAiNgcRhOmyMBAXVPGHEAAAAGAID/gQOAAwEADAAQABQAGAAcACAA0kuwFFBYQDAODAIKAgsCCl4PDQILCAgLXAcQBQMBCQQCAgoBAlcACAADCANUAAYGAE8AAAAKBkIbS7AWUFhAMg4MAgoCCwIKC2YPDQILCAILCGQHEAUDAQkEAgIKAQJXAAgAAwgDVAAGBgBPAAAACgZCG0A4DgwCCgILAgoLZg8NAgsIAgsIZAAAAAYBAAZXBxAFAwEJBAICCgECVwAIAwMISwAICANQAAMIA0RZWUAhAAAgHx4dHBsaGRgXFhUUExIREA8ODQAMAAwRERERIRETKwE1IyEVIxUzESERMzUlIRUhASERIQUzESMTMxEjATMRIwKqAf6s1VUCVlX9/wEA/wABgf4AAgD+6yoqgCoq/wAqKgKBgIAq/SoC1ipWVv0rAqtA/dUCK/3VAiv91QAABAAL/48D9QN3ACMARABlAIgA5EAjgnt6HQQABG8EAgMAhwEBA2RDAgsGWS0CCAtOTUY4BAoIBkBLsDJQWEBFFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNEwEFDQEJBQlVEQICAQEEURQBBAQKQQ8HAgYGClEMAQoKCwpCG0BDFQEDAAEAAwFmFhACCwYIBgsIZhIBAAMBAE0OAQgKBghNDwcCBgwBCgkGClkTAQUNAQkFCVURAgIBAQRRFAEEBAoEQllAKUVFhoWAfXh3c3FrZ0VlRWVhXVdVUVBLSEJBPjs2NSYRJRU1FCIWIBcXKwEXMhYXFRQGBycwMSMiJyY/ASMwNTc0NjsBMhYVBwE2MhYUBwE2OwExMx4BHQEOASMHARYUBiInARcUBisBIiY1JzMnNAcVDgErASImPwEBBiImNDcBJyImJzU0NjcXOwEyFxYVBwMGKwIHLgE9AT4BMzcBJjQ2MhcBJyY2OwEyFhcVFDEjFxQC6ZQKDwEOCeEMCQcGAQEBAQ0KEAoNAQEECRoSCf6VCQcO4QkOAQ8KlAEDCRIaCf77AQ0KEQoNAQEB+gENChAJDgEB/vsJGhIJAQOUCQ8CDgrgAQsKBgYCBAYKCwHgCg4CDwmU/v0JEhoJAQUBAQ4JEAoNAQECAkEBDAsQCg0BAQYGCwsB4QoLDgmYAQIJExkK/b0IAQ0KEAsMAf7/CRoTCQEClwoOCwriDAoW4goLDgqY/v0JExoJAQEBDAsQCg0BAQYGCg0BJgYBAQ0KEAsMAQEAChkTCf7+mAkOCwrhAQsLAAAAAwCS/4ADJQOAAAMABwAbAFNAUAALCgtoAAYFBmkMAQoAAgMKAlgAAw4NAgkEAwlXCAEEAAABBABXAAEFBQFLAAEBBU8HAQUBBUMICAgbCBsaGRgXFhUUExERERESEREREA8XKzchFSETIRUhFxUhESEVMzUhESE1MxEjNSMVIxHbAgD+AEoBbf6Tkv7bASVJASX+29vbSdzukwJKk0mS/tuSkgElkgElkpL+2wAAAAADAAAAWwQAAu4AAwAHABsAX0BcAAgAAAoIAFcACgACBwoCVwsJAgcMBgIEAwcEVw8BAwANAQMNVw4BAQUFAUsOAQEBBU8ABQEFQwQEAAAbGhkYFxYVFBMSERAPDg0MCwoJCAQHBAcGBQADAAMREA8rJREzESURMxE3MxEhETM1IxEhESM1IRUjFTMVIQKSk/22k0mSASWSkv7bkv7bkpIBJaUCAP4ASQFt/pOS/tsBJUkBJf7b3NxJ2wAAAAEAAP9fBAACxgAvADtAOBkIAgIBAUADAQEEAgQBAmYAAgUEAgVkAAAABAEABFkABQYGBU0ABQUGUQAGBQZFIyUWFRUXEgcVKwEuASIOAh0BJyYiBhQfARYyPwE2NCYiDwE1ND4BMh4BFA4BIyIGFBYzMj4CNCYDgT6frp98QW4IFQ8ImQgVB5oHDxUHbmex0LFnZ7FoCw8PC1efe0JCAkY+QkJ8nlhCbggPFgeaBweaBxYPCG5CabFmZrHRsWcPFQ9Ce5+vngAAAQAA/18EAALGADAASUBGGQgCAgEBQAgBBwQBBAcBZgMBAQIEAQJkAAIFBAIFZAAAAAQHAARZAAUGBgVNAAUFBlEABgUGRQAAADAAMCMlFhUVFxIJFSsTPgEyHgIdATc2MhYUDwEGIi8BJjQ2Mh8BNTQuASIOARQeATMyFhQGIyIuAjQ2N4A9n66ffEJtCBUPB5oHFgeaBw8VB25nsdCxZ2exaAsPDwtXn3tCQj0CRj5CQnyeWEJuCA8WB5oHB5oHFg8IbkJpsWZmsdGxZw8VD0J7n6+ePgAAAQAAAAEAAJVVedpfDzz1AAsEAAAAAADTqoDBAAAAANOqgMEAAP9fBAADgAAAAAgAAgAAAAAAAAABAAADgP9fAFwEAQAAAAAEAAABAAAAAAAAAAAAAAAAAAAADAF2ACIAAAAAAVUAAAPpACwEAAC3BAAAKQQAAIAEAACABAAACwQAAJIEAAAABAEAAAAAAAAAAAAoACgAKAFkAaYCCAKqA04EgATYBTYFmgYGAAEAAAANAIkABgAAAAAAAgAuADwAbAAAAKUJlgAAAAAAAAAMAJYAAQAAAAAAAQACAAAAAQAAAAAAAgAGAAIAAQAAAAAAAwAeAAgAAQAAAAAABAACACYAAQAAAAAABQBGACgAAQAAAAAABgACAG4AAwABBAkAAQAEAHAAAwABBAkAAgAMAHQAAwABBAkAAwA8AIAAAwABBAkABAAEALwAAwABBAkABQCMAMAAAwABBAkABgAEAUxmZE1lZGl1bUZvbnRGb3JnZSAyLjAgOiBmZCA6IDEyLTctMjAxNmZkVmVyc2lvbiAxLjAgOyB0dGZhdXRvaGludCAodjAuOTQpIC1sIDggLXIgNTAgLUcgMjAwIC14IDE0IC13ICJHIiAtZiAtc2ZkAGYAZABNAGUAZABpAHUAbQBGAG8AbgB0AEYAbwByAGcAZQAgADIALgAwACAAOgAgAGYAZAAgADoAIAAxADIALQA3AC0AMgAwADEANgBmAGQAVgBlAHIAcwBpAG8AbgAgADEALgAwACAAOwAgAHQAdABmAGEAdQB0AG8AaABpAG4AdAAgACgAdgAwAC4AOQA0ACkAIAAtAGwAIAA4ACAALQByACAANQAwACAALQBHACAAMgAwADAAIAAtAHgAIAAxADQAIAAtAHcAIAAiAEcAIgAgAC0AZgAgAC0AcwBmAGQAAAACAAAAAAAA/4MAMgAAAAAAAAAAAAAAAAAAAAAAAAAAAA0AAAABAAIAWwECAQMBBAEFAQYBBwEIAQkBCgd1bmlFNjAxB3VuaUU2MDIHdW5pRTYwMwd1bmlFNjA1B3VuaUU2MDYHdW5pRTYwNwd1bmlFNjA4B3VuaUU2MDkHdW5pRTYwQQABAAH//wAPAAAAAAAAAAAAAAAAAAAAAAAyADIDGP/hA4D/XwMY/+EDgP9fsAAssCBgZi2wASwgZCCwwFCwBCZasARFW1ghIyEbilggsFBQWCGwQFkbILA4UFghsDhZWSCwCkVhZLAoUFghsApFILAwUFghsDBZGyCwwFBYIGYgiophILAKUFhgGyCwIFBYIbAKYBsgsDZQWCGwNmAbYFlZWRuwACtZWSOwAFBYZVlZLbACLCBFILAEJWFkILAFQ1BYsAUjQrAGI0IbISFZsAFgLbADLCMhIyEgZLEFYkIgsAYjQrIKAAIqISCwBkMgiiCKsAArsTAFJYpRWGBQG2FSWVgjWSEgsEBTWLAAKxshsEBZI7AAUFhlWS2wBCywCCNCsAcjQrAAI0KwAEOwB0NRWLAIQyuyAAEAQ2BCsBZlHFktsAUssABDIEUgsAJFY7ABRWJgRC2wBiywAEMgRSCwACsjsQQEJWAgRYojYSBkILAgUFghsAAbsDBQWLAgG7BAWVkjsABQWGVZsAMlI2FERC2wByyxBQVFsAFhRC2wCCywAWAgILAKQ0qwAFBYILAKI0JZsAtDSrAAUlggsAsjQlktsAksILgEAGIguAQAY4ojYbAMQ2AgimAgsAwjQiMtsAosS1RYsQcBRFkksA1lI3gtsAssS1FYS1NYsQcBRFkbIVkksBNlI3gtsAwssQANQ1VYsQ0NQ7ABYUKwCStZsABDsAIlQrIAAQBDYEKxCgIlQrELAiVCsAEWIyCwAyVQWLAAQ7AEJUKKiiCKI2GwCCohI7ABYSCKI2GwCCohG7AAQ7ACJUKwAiVhsAgqIVmwCkNHsAtDR2CwgGIgsAJFY7ABRWJgsQAAEyNEsAFDsAA+sgEBAUNgQi2wDSyxAAVFVFgAsA0jQiBgsAFhtQ4OAQAMAEJCimCxDAQrsGsrGyJZLbAOLLEADSstsA8ssQENKy2wECyxAg0rLbARLLEDDSstsBIssQQNKy2wEyyxBQ0rLbAULLEGDSstsBUssQcNKy2wFiyxCA0rLbAXLLEJDSstsBgssAcrsQAFRVRYALANI0IgYLABYbUODgEADABCQopgsQwEK7BrKxsiWS2wGSyxABgrLbAaLLEBGCstsBsssQIYKy2wHCyxAxgrLbAdLLEEGCstsB4ssQUYKy2wHyyxBhgrLbAgLLEHGCstsCEssQgYKy2wIiyxCRgrLbAjLCBgsA5gIEMjsAFgQ7ACJbACJVFYIyA8sAFgI7ASZRwbISFZLbAkLLAjK7AjKi2wJSwgIEcgILACRWOwAUViYCNhOCMgilVYIEcgILACRWOwAUViYCNhOBshWS2wJiyxAAVFVFgAsAEWsCUqsAEVMBsiWS2wJyywByuxAAVFVFgAsAEWsCUqsAEVMBsiWS2wKCwgNbABYC2wKSwAsANFY7ABRWKwACuwAkVjsAFFYrAAK7AAFrQAAAAAAEQ+IzixKAEVKi2wKiwgPCBHILACRWOwAUViYLAAQ2E4LbArLC4XPC2wLCwgPCBHILACRWOwAUViYLAAQ2GwAUNjOC2wLSyxAgAWJSAuIEewACNCsAIlSYqKRyNHI2EgWGIbIVmwASNCsiwBARUUKi2wLiywABawBCWwBCVHI0cjYbAGRStlii4jICA8ijgtsC8ssAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgsAlDIIojRyNHI2EjRmCwBEOwgGJgILAAKyCKimEgsAJDYGQjsANDYWRQWLACQ2EbsANDYFmwAyWwgGJhIyAgsAQmI0ZhOBsjsAlDRrACJbAJQ0cjRyNhYCCwBEOwgGJgIyCwACsjsARDYLAAK7AFJWGwBSWwgGKwBCZhILAEJWBkI7ADJWBkUFghGyMhWSMgILAEJiNGYThZLbAwLLAAFiAgILAFJiAuRyNHI2EjPDgtsDEssAAWILAJI0IgICBGI0ewACsjYTgtsDIssAAWsAMlsAIlRyNHI2GwAFRYLiA8IyEbsAIlsAIlRyNHI2EgsAUlsAQlRyNHI2GwBiWwBSVJsAIlYbABRWMjIFhiGyFZY7ABRWJgIy4jICA8ijgjIVktsDMssAAWILAJQyAuRyNHI2EgYLAgYGawgGIjICA8ijgtsDQsIyAuRrACJUZSWCA8WS6xJAEUKy2wNSwjIC5GsAIlRlBYIDxZLrEkARQrLbA2LCMgLkawAiVGUlggPFkjIC5GsAIlRlBYIDxZLrEkARQrLbA3LLAuKyMgLkawAiVGUlggPFkusSQBFCstsDgssC8riiAgPLAEI0KKOCMgLkawAiVGUlggPFkusSQBFCuwBEMusCQrLbA5LLAAFrAEJbAEJiAuRyNHI2GwBkUrIyA8IC4jOLEkARQrLbA6LLEJBCVCsAAWsAQlsAQlIC5HI0cjYSCwBCNCsAZFKyCwYFBYILBAUVizAiADIBuzAiYDGllCQiMgR7AEQ7CAYmAgsAArIIqKYSCwAkNgZCOwA0NhZFBYsAJDYRuwA0NgWbADJbCAYmGwAiVGYTgjIDwjOBshICBGI0ewACsjYTghWbEkARQrLbA7LLAuKy6xJAEUKy2wPCywLyshIyAgPLAEI0IjOLEkARQrsARDLrAkKy2wPSywABUgR7AAI0KyAAEBFRQTLrAqKi2wPiywABUgR7AAI0KyAAEBFRQTLrAqKi2wPyyxAAEUE7ArKi2wQCywLSotsEEssAAWRSMgLiBGiiNhOLEkARQrLbBCLLAJI0KwQSstsEMssgAAOistsEQssgABOistsEUssgEAOistsEYssgEBOistsEcssgAAOystsEgssgABOystsEkssgEAOystsEossgEBOystsEsssgAANystsEwssgABNystsE0ssgEANystsE4ssgEBNystsE8ssgAAOSstsFAssgABOSstsFEssgEAOSstsFIssgEBOSstsFMssgAAPCstsFQssgABPCstsFUssgEAPCstsFYssgEBPCstsFcssgAAOCstsFgssgABOCstsFkssgEAOCstsFossgEBOCstsFsssDArLrEkARQrLbBcLLAwK7A0Ky2wXSywMCuwNSstsF4ssAAWsDArsDYrLbBfLLAxKy6xJAEUKy2wYCywMSuwNCstsGEssDErsDUrLbBiLLAxK7A2Ky2wYyywMisusSQBFCstsGQssDIrsDQrLbBlLLAyK7A1Ky2wZiywMiuwNistsGcssDMrLrEkARQrLbBoLLAzK7A0Ky2waSywMyuwNSstsGossDMrsDYrLbBrLCuwCGWwAyRQeLABFTAtAABLuADIUlixAQGOWbkIAAgAYyCwASNEILADI3CwDkUgIEu4AA5RS7AGU1pYsDQbsChZYGYgilVYsAIlYbABRWMjYrACI0SzCgkFBCuzCgsFBCuzDg8FBCtZsgQoCUVSRLMKDQYEK7EGAUSxJAGIUViwQIhYsQYDRLEmAYhRWLgEAIhYsQYBRFlZWVm4Af+FsASNsQUARAAAAA=="; +},function(t,e){t.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pg0KPCFET0NUWVBFIHN2ZyBQVUJMSUMgIi0vL1czQy8vRFREIFNWRyAxLjEvL0VOIiAiaHR0cDovL3d3dy53My5vcmcvR3JhcGhpY3MvU1ZHLzEuMS9EVEQvc3ZnMTEuZHRkIiA+DQo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+DQo8bWV0YWRhdGE+DQpDcmVhdGVkIGJ5IEZvbnRGb3JnZSAyMDEyMDczMSBhdCBUdWUgSnVsIDEyIDE5OjEwOjU3IDIwMTYNCiBCeSBhZG1pbg0KPC9tZXRhZGF0YT4NCjxkZWZzPg0KPGZvbnQgaWQ9ImZkIiBob3Jpei1hZHYteD0iMTAyNCIgPg0KICA8Zm9udC1mYWNlIA0KICAgIGZvbnQtZmFtaWx5PSJmZCINCiAgICBmb250LXdlaWdodD0iNTAwIg0KICAgIGZvbnQtc3RyZXRjaD0ibm9ybWFsIg0KICAgIHVuaXRzLXBlci1lbT0iMTAyNCINCiAgICBwYW5vc2UtMT0iMiAwIDYgMyAwIDAgMCAwIDAgMCINCiAgICBhc2NlbnQ9Ijg5NiINCiAgICBkZXNjZW50PSItMTI4Ig0KICAgIHgtaGVpZ2h0PSI3OTIiDQogICAgYmJveD0iMCAtMTYxIDEwMjQgODk2Ig0KICAgIHVuZGVybGluZS10aGlja25lc3M9IjUwIg0KICAgIHVuZGVybGluZS1wb3NpdGlvbj0iLTEwMCINCiAgICB1bmljb2RlLXJhbmdlPSJVKzAwNzgtRTYwQSINCiAgLz4NCjxtaXNzaW5nLWdseXBoIGhvcml6LWFkdi14PSIzNzQiIA0KZD0iTTM0IDB2NjgyaDI3MnYtNjgyaC0yNzJ6TTY4IDM0aDIwNHY2MTRoLTIwNHYtNjE0eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0iLm5vdGRlZiIgaG9yaXotYWR2LXg9IjM3NCIgDQpkPSJNMzQgMHY2ODJoMjcydi02ODJoLTI3MnpNNjggMzRoMjA0djYxNGgtMjA0di02MTR6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSIubnVsbCIgaG9yaXotYWR2LXg9IjAiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9Im5vbm1hcmtpbmdyZXR1cm4iIGhvcml6LWFkdi14PSIzNDEiIA0KIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9IngiIHVuaWNvZGU9IngiIGhvcml6LWFkdi14PSIxMDAxIiANCmQ9Ik0yODEgNTQzcS0yNyAtMSAtNTMgLTFoLTgzcS0xOCAwIC0zNi41IC02dC0zMi41IC0xOC41dC0yMyAtMzJ0LTkgLTQ1LjV2LTc2aDkxMnY0MXEwIDE2IC0wLjUgMzB0LTAuNSAxOHEwIDEzIC01IDI5dC0xNyAyOS41dC0zMS41IDIyLjV0LTQ5LjUgOWgtMTMzdi05N2gtNDM4djk3ek05NTUgMzEwdi01MnEwIC0yMyAwLjUgLTUydDAuNSAtNTh0LTEwLjUgLTQ3LjV0LTI2IC0zMHQtMzMgLTE2dC0zMS41IC00LjVxLTE0IC0xIC0yOS41IC0wLjUNCnQtMjkuNSAwLjVoLTMybC00NSAxMjhoLTQzOWwtNDQgLTEyOGgtMjloLTM0cS0yMCAwIC00NSAxcS0yNSAwIC00MSA5LjV0LTI1LjUgMjN0LTEzLjUgMjkuNXQtNCAzMHYxNjdoOTExek0xNjMgMjQ3cS0xMiAwIC0yMSAtOC41dC05IC0yMS41dDkgLTIxLjV0MjEgLTguNXExMyAwIDIyIDguNXQ5IDIxLjV0LTkgMjEuNXQtMjIgOC41ek0zMTYgMTIzcS04IC0yNiAtMTQgLTQ4cS01IC0xOSAtMTAuNSAtMzd0LTcuNSAtMjV0LTMgLTE1dDEgLTE0LjUNCnQ5LjUgLTEwLjV0MjEuNSAtNGgzN2g2N2g4MWg4MGg2NGgzNnEyMyAwIDM0IDEydDIgMzhxLTUgMTMgLTkuNSAzMC41dC05LjUgMzQuNXEtNSAxOSAtMTEgMzloLTM2OHpNMzM2IDQ5OHYyMjhxMCAxMSAyLjUgMjN0MTAgMjEuNXQyMC41IDE1LjV0MzQgNmgxODhxMzEgMCA1MS41IC0xNC41dDIwLjUgLTUyLjV2LTIyN2gtMzI3eiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwMSIgdW5pY29kZT0iJiN4ZTYwMTsiIA0KZD0iTTgzMCAzMDBxMTggLTE3IDggLTM5cS0xMCAtMjMgLTM0IC0yM2gtMjE4bDExNSAtMjcycTYgLTE0IDAgLTI4dC0yMCAtMjBsLTEwMSAtNDNxLTE0IC02IC0yOCAwdC0yMCAxOWwtMTA5IDI1OWwtMTc4IC0xNzlxLTExIC0xMSAtMjYgLTExcS03IDAgLTE0IDNxLTIyIDEwIC0yMiAzNHY4NTlxMCAyNCAyMiAzNHE3IDMgMTQgM3ExNiAwIDI2IC0xMXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDIiIHVuaWNvZGU9IiYjeGU2MDI7IiANCmQ9Ik05NTcgNzI0bC02NSA2NXEtMjggMjYgLTY2IDI2dC02NiAtMjZsLTY1IC02NXEtMjQgLTI0IC0yNi41IC01OHQxNi41IC02MWwtNDM1IC00MzRxLTE4IDEzIC0zOSAxNnQtNDIgLTR0LTM3IC0yMmwtNjUgLTY1cS0yNiAtMjggLTI2IC02NnQyNiAtNjZsNjUgLTY1cTE4IC0xNyA0MS41IC0yMy41dDQ3IDB0NDEuNSAyMy41bDY1IDY1cTIzIDI0IDI2IDU3LjV0LTE1IDYwLjVsNDM2IDQzNnExNCAtOSAyOS41IC0xM3QzMSAtMi41dDMwLjUgOA0KdDI3IDE4LjVsNjUgNjVxMjYgMjcgMjYgNjV0LTI2IDY1ek0xOTggLTY0bC05NCA5NGw5NCA5NGw5NCAtOTR6TTgyNiA1NjRsLTk0IDk0bDk0IDkzbDk0IC05M3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDMiIHVuaWNvZGU9IiYjeGU2MDM7IiANCmQ9Ik01MTIgODMycS0xNzQgLTEgLTI3OSAtMTA5dC0xMDUgLTI5MXEwIC03NyA1LjUgLTEyOS41dDIzLjUgLTEyNS41cTkgLTM3IDIwLjUgLTc0dDIxIC02My41dDE4IC00N3QxMy41IC0zMS41bDUgLTExbDEgLTJxNyAtMTIgMjAgLTEycTQgMCA4IDFsMyAybDEwMSA0MWw0IDJxMTEgNiAxMSAxOXEtMSA1IC0yIDhoLTFxLTU3IDEzMiAtNzQgMjAzcS0xNiA2NyAtMjEuNSAxMDguNXQtNS41IDEwNi41cTAgMTA1IDY4IDE3NXQxNjUgNzANCnQxNjUgLTcwdDY4IC0xNzVxMCAtNjQgLTUuNSAtMTA2dC0yMS41IC0xMDlxLTE4IC03NCAtNzQgLTIwM2gtMXEtMSAtMyAtMiAtOHEwIC0xMyAxMSAtMTlsNCAtMmwxMDAgLTQxbDQgLTJxMyAtMSA4IC0xcTEzIDAgMTkgMTJsMiAycTQ2IDk2IDc4IDIyN3ExOCA3MyAyMy41IDEyNS41dDUuNSAxMjkuNXEwIDE4MyAtMTA1IDI5MXQtMjc5IDEwOXpNMzQ2IDh2LTJoMWwtODYgLTM1cS00NCA5NiAtNzEgMjA5bDg1IDI0cTE4IC03OCA3MSAtMTk2eg0KTTc2MyAtMjlsLTg2IDM1cTEgMSAxIDJxNTIgMTE3IDcxIDE5Nmw4NSAtMjRxLTI3IC0xMTMgLTcxIC0yMDl6IiAvPg0KICAgIDxnbHlwaCBnbHlwaC1uYW1lPSJ1bmlFNjA1IiB1bmljb2RlPSImI3hlNjA1OyIgDQpkPSJNNjgyIDY0MXYxMjhoLTFoLTM0MHYtMTI4aC0yMTN2LTQyaDg1di03MjZoNTk4djcyNmg4NXY0MmgtMjE0ek0zODMgNzI3aDI1NnYtODZoLTI1NnY4NnpNNzY4IC04NGgtNTEydjY4M2g1MTJ2LTY4M3pNNDkxIDUzNWg0MnYtNTU1aC00MnY1NTV6TTYxOSA1MzVoNDJ2LTU1NWgtNDJ2NTU1ek0zNjMgNTM1aDQydi01NTVoLTQydjU1NXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDYiIHVuaWNvZGU9IiYjeGU2MDY7IiANCmQ9Ik03NDUgNTc3bDE0OCAtMXExMCAwIDE3LjUgLTZ0OC41IC0xN3YtMTZxMCAtMTAgLTcgLTE2LjV0LTE2IC03LjVsLTIyNSAxdjBoLTEycS05IDAgLTE2IDZxLTYgNiAtNSAxN2wxIDExaC0xdjFsMSAyMjVxMCAxMCA2LjUgMTUuNXQxNi41IDUuNWgxNnExMCAwIDE2LjUgLTd0Ni41IC0xNmwtMSAtMTUybDI2MCAyNThxOSA5IDIyIDl0MjIgLTkuNXQ5IC0yMnQtOSAtMjIuNXpNNjQxIDI1NHE5IDggMTYgOGgxNHYwaDIyNXE5IC0xIDE2IC03LjUNCnQ3IC0xNi41di0xNnEtMSAtMTEgLTguNSAtMTd0LTE3LjUgLTZsLTE0OCAtMWwyNTkgLTI1N3E5IC05IDkgLTIydC05IC0yMi41dC0yMiAtOS41dC0yMiA5bC0yNjEgMjU4bDEgLTE1MXEwIC0xMCAtNi41IC0xN3QtMTYuNSAtN2gtMTdxLTEwIDAgLTE2LjUgNS41dC02LjUgMTUuNWwtMSAyMjZoMWwtMSAxMnEwIDEwIDUgMTZ6TTM4NiAyMjZ2LTIyNnEtMSAtMTAgLTcuNSAtMTUuNXQtMTYuNSAtNS41aC0xNnEtOSAwIC0xNiA3dC02IDE3bDEgMTUyDQpsLTI2MSAtMjU5cS05IC05IC0yMiAtOXQtMjIgOS41dC05IDIyLjV0OSAyMmwyNTkgMjU3bC0xNDggMXEtOSAwIC0xNi41IDZ0LTkuNSAxN3YxNnEwIDEwIDcgMTYuNXQxNyA3LjVsMjI0IC0xaDFoMTFxMTAgMCAxNiAtNnQ2IC0xNmwtMiAtMTNoMXpNMzgxIDUyMHEtNiAtNiAtMTYgLTZoLTExaC0xbC0yMjQgLTFxLTEwIDEgLTE3IDcuNXQtNyAxNi41djE2cTIgMTEgOS41IDE3dDE2LjUgNmwxNDggMWwtMjU5IDI1NnEtOSAxMCAtOSAyMi41DQp0OSAyMnQyMiA5LjV0MjIgLTlsMjYxIC0yNThsLTEgMTUycS0xIDkgNiAxNnQxNiA3aDE2cTEwIDAgMTYuNSAtNS41dDcuNSAtMTUuNXYtMjI1di0xaC0xbDIgLTExcTAgLTExIC02IC0xN3oiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDciIHVuaWNvZGU9IiYjeGU2MDc7IiANCmQ9Ik0yMTkgMjM4aDUxMnYtMTQ3aC01MTJ2MTQ3ek0yOTMgNjc3aDM2NXYtMTQ3aC0zNjV2MTQ3ek00MzkgNDU3di0xNDZoLTI5M3YtMjkzaDI5M3YtMTQ2aDczdjE0NmgyOTN2MjkzaC0yOTN2MTQ2aDIxOXYyOTNoLTIxOXYxNDZoLTczdi0xNDZoLTIyMHYtMjkzaDIyMHoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDgiIHVuaWNvZGU9IiYjeGU2MDg7IiANCmQ9Ik02NTggMTY1djUxMmgxNDd2LTUxMmgtMTQ3ek0yMTkgMjM4djM2NWgxNDd2LTM2NWgtMTQ3ek00MzkgMzg0aDE0NnYtMjkzaDI5M3YyOTNoMTQ2djczaC0xNDZ2MjkzaC0yOTN2LTI5M2gtMTQ2djIyMGgtMjkzdi0yMjBoLTE0NnYtNzNoMTQ2di0yMTloMjkzdjIxOXoiIC8+DQogICAgPGdseXBoIGdseXBoLW5hbWU9InVuaUU2MDkiIHVuaWNvZGU9IiYjeGU2MDk7IiBob3Jpei1hZHYteD0iMTAyNSIgDQpkPSJNODk3IDU4MnEtNjIgNjIgLTE0MS41IDk1dC0xNjYuNSAzM3QtMTY2LjUgLTMzdC0xNDEuNSAtOTV0LTk0LjUgLTE0MXQtMzIuNSAtMTY3di02NmwtMTEwIDExMHEtOCA4IC0xOC41IDh0LTE4IC03LjV0LTcuNSAtMTguNXQ4IC0xOGwxNTMgLTE1NHE4IC03IDE4LjUgLTd0MTcuNSA3bDE1NCAxNTRxNyA3IDcgMTh0LTcuNSAxOC41dC0xOCA3LjV0LTE3LjUgLThsLTExMCAtMTEwdjY2cTAgMTA1IDUxLjUgMTkzLjV0MTQwIDEzOS41DQp0MTkyLjUgNTF0MTkyLjUgLTUxdDE0MCAtMTM5LjV0NTEuNSAtMTkzdC01MS41IC0xOTN0LTE0MCAtMTQwdC0xOTIuNSAtNTEuNXEtMTEgMCAtMTguNSAtNy41dC03LjUgLTE4dDcuNSAtMTh0MTguNSAtNy41cTg3IDAgMTY2LjUgMzN0MTQxIDk0LjV0OTQuNSAxNDF0MzMgMTY3dC0zMyAxNjYuNXQtOTQgMTQxeiIgLz4NCiAgICA8Z2x5cGggZ2x5cGgtbmFtZT0idW5pRTYwQSIgdW5pY29kZT0iJiN4ZTYwYTsiIGhvcml6LWFkdi14PSIxMDI1IiANCmQ9Ik0xMjggNTgycTYxIDYyIDE0MC41IDk1dDE2Ni41IDMzdDE2Ni41IC0zM3QxNDEuNSAtOTV0OTUgLTE0MXQzMyAtMTY3di02NmwxMDkgMTEwcTggOCAxOC41IDh0MTggLTcuNXQ3LjUgLTE4LjV0LTcgLTE4bC0xNTQgLTE1NHEtNyAtNyAtMTggLTd0LTE4IDdsLTE1NCAxNTRxLTcgNyAtNyAxOHQ3LjUgMTguNXQxOCA3LjV0MTcuNSAtOGwxMTAgLTExMHY2NnEwIDEwNSAtNTEuNSAxOTMuNXQtMTQwIDEzOS41dC0xOTIuNSA1MXQtMTkyLjUgLTUxDQp0LTE0MCAtMTM5LjV0LTUxLjUgLTE5M3Q1MS41IC0xOTN0MTQwIC0xNDB0MTkyLjUgLTUxLjVxMTEgMCAxOC41IC03LjV0Ny41IC0xOHQtNy41IC0xOHQtMTguNSAtNy41cS04NyAwIC0xNjYuNSAzM3QtMTQxIDk0LjV0LTk0LjUgMTQxdC0zMyAxNjd0MzMgMTY2LjV0OTQgMTQxaDF6IiAvPg0KICA8L2ZvbnQ+DQo8L2RlZnM+PC9zdmc+DQo="},function(t,e,n){var o=n(260);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".fd-toolbar{border:1px solid #ddd;width:100%;background:#fff}.fd-node-toolbar{border-left:1px solid #ddd;border-right:1px solid #ddd;width:100%;background:#fff}.fd-canvas-container{border:1px solid #eee;background-color:#fff}.fd-property-panel{width:400px;border:1px solid #999;border-radius:5px;top:36px;left:600px;position:absolute;background:#fff;box-shadow:5px 5px 5px #888}.snaptogrid{background-image:url("+n(261)+")}.nosnaptogrid{background-image:none}",""])},function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAYAAACNMs+9AAAAHUlEQVQYV2NkYGAwBuKzQIwXMBJSAJMfVUidcAQAnUQBC6jEGBUAAAAASUVORK5CYII="},function(t,e,n){n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(271),n(272),n(273),n(274)},function(t,e){+function(t){"use strict";function e(){var t=document.createElement("bootstrap"),e={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in e)if(void 0!==t.style[n])return{end:e[n]};return!1}t.fn.emulateTransitionEnd=function(e){var n=!1,o=this;t(this).one("bsTransitionEnd",function(){n=!0});var i=function(){n||t(o).trigger(t.support.transition.end)};return setTimeout(i,e),this},t(function(){t.support.transition=e(),t.support.transition&&(t.event.special.bsTransitionEnd={bindType:t.support.transition.end,delegateType:t.support.transition.end,handle:function(e){if(t(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var n=t(this),i=n.data("bs.alert");i||n.data("bs.alert",i=new o(this)),"string"==typeof e&&i[e].call(n)})}var n='[data-dismiss="alert"]',o=function(e){t(e).on("click",n,this.close)};o.VERSION="3.3.7",o.TRANSITION_DURATION=150,o.prototype.close=function(e){function n(){a.detach().trigger("closed.bs.alert").remove()}var i=t(this),r=i.attr("data-target");r||(r=i.attr("href"),r=r&&r.replace(/.*(?=#[^\s]*$)/,""));var a=t("#"===r?[]:r);e&&e.preventDefault(),a.length||(a=i.closest(".alert")),a.trigger(e=t.Event("close.bs.alert")),e.isDefaultPrevented()||(a.removeClass("in"),t.support.transition&&a.hasClass("fade")?a.one("bsTransitionEnd",n).emulateTransitionEnd(o.TRANSITION_DURATION):n())};var i=t.fn.alert;t.fn.alert=e,t.fn.alert.Constructor=o,t.fn.alert.noConflict=function(){return t.fn.alert=i,this},t(document).on("click.bs.alert.data-api",n,o.prototype.close)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.button"),r="object"==typeof e&&e;i||o.data("bs.button",i=new n(this,r)),"toggle"==e?i.toggle():e&&i.setState(e)})}var n=function(e,o){this.$element=t(e),this.options=t.extend({},n.DEFAULTS,o),this.isLoading=!1};n.VERSION="3.3.7",n.DEFAULTS={loadingText:"loading..."},n.prototype.setState=function(e){var n="disabled",o=this.$element,i=o.is("input")?"val":"html",r=o.data();e+="Text",null==r.resetText&&o.data("resetText",o[i]()),setTimeout(t.proxy(function(){o[i](null==r[e]?this.options[e]:r[e]),"loadingText"==e?(this.isLoading=!0,o.addClass(n).attr(n,n).prop(n,!0)):this.isLoading&&(this.isLoading=!1,o.removeClass(n).removeAttr(n).prop(n,!1))},this),0)},n.prototype.toggle=function(){var t=!0,e=this.$element.closest('[data-toggle="buttons"]');if(e.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(t=!1),e.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(t=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),t&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var o=t.fn.button;t.fn.button=e,t.fn.button.Constructor=n,t.fn.button.noConflict=function(){return t.fn.button=o,this},t(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(n){var o=t(n.target).closest(".btn");e.call(o,"toggle"),t(n.target).is('input[type="radio"], input[type="checkbox"]')||(n.preventDefault(),o.is("input,button")?o.trigger("focus"):o.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){t(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.carousel"),r=t.extend({},n.DEFAULTS,o.data(),"object"==typeof e&&e),a="string"==typeof e?e:r.slide;i||o.data("bs.carousel",i=new n(this,r)),"number"==typeof e?i.to(e):a?i[a]():r.interval&&i.pause().cycle()})}var n=function(e,n){this.$element=t(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=n,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",t.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",t.proxy(this.pause,this)).on("mouseleave.bs.carousel",t.proxy(this.cycle,this))};n.VERSION="3.3.7",n.TRANSITION_DURATION=600,n.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},n.prototype.keydown=function(t){if(!/input|textarea/i.test(t.target.tagName)){switch(t.which){case 37:this.prev();break;case 39:this.next();break;default:return}t.preventDefault()}},n.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(t.proxy(this.next,this),this.options.interval)),this},n.prototype.getItemIndex=function(t){return this.$items=t.parent().children(".item"),this.$items.index(t||this.$active)},n.prototype.getItemForDirection=function(t,e){var n=this.getItemIndex(e),o="prev"==t&&0===n||"next"==t&&n==this.$items.length-1;if(o&&!this.options.wrap)return e;var i="prev"==t?-1:1,r=(n+i)%this.$items.length;return this.$items.eq(r)},n.prototype.to=function(t){var e=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(t>this.$items.length-1||t<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){e.to(t)}):n==t?this.pause().cycle():this.slide(t>n?"next":"prev",this.$items.eq(t))},n.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},n.prototype.next=function(){if(!this.sliding)return this.slide("next")},n.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},n.prototype.slide=function(e,o){var i=this.$element.find(".item.active"),r=o||this.getItemForDirection(e,i),a=this.interval,s="next"==e?"left":"right",l=this;if(r.hasClass("active"))return this.sliding=!1;var A=r[0],c=t.Event("slide.bs.carousel",{relatedTarget:A,direction:s});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,a&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var u=t(this.$indicators.children()[this.getItemIndex(r)]);u&&u.addClass("active")}var d=t.Event("slid.bs.carousel",{relatedTarget:A,direction:s});return t.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),r[0].offsetWidth,i.addClass(s),r.addClass(s),i.one("bsTransitionEnd",function(){r.removeClass([e,s].join(" ")).addClass("active"),i.removeClass(["active",s].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger(d)},0)}).emulateTransitionEnd(n.TRANSITION_DURATION)):(i.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(d)),a&&this.cycle(),this}};var o=t.fn.carousel;t.fn.carousel=e,t.fn.carousel.Constructor=n,t.fn.carousel.noConflict=function(){return t.fn.carousel=o,this};var i=function(n){var o,i=t(this),r=t(i.attr("data-target")||(o=i.attr("href"))&&o.replace(/.*(?=#[^\s]+$)/,""));if(r.hasClass("carousel")){var a=t.extend({},r.data(),i.data()),s=i.attr("data-slide-to");s&&(a.interval=!1),e.call(r,a),s&&r.data("bs.carousel").to(s),n.preventDefault()}};t(document).on("click.bs.carousel.data-api","[data-slide]",i).on("click.bs.carousel.data-api","[data-slide-to]",i),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var n=t(this);e.call(n,n.data())})})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n,o=e.attr("data-target")||(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"");return t(o)}function n(e){return this.each(function(){var n=t(this),i=n.data("bs.collapse"),r=t.extend({},o.DEFAULTS,n.data(),"object"==typeof e&&e);!i&&r.toggle&&/show|hide/.test(e)&&(r.toggle=!1),i||n.data("bs.collapse",i=new o(this,r)),"string"==typeof e&&i[e]()})}var o=function(e,n){this.$element=t(e),this.options=t.extend({},o.DEFAULTS,n),this.$trigger=t('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};o.VERSION="3.3.7",o.TRANSITION_DURATION=350,o.DEFAULTS={toggle:!0},o.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},o.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,i=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(i&&i.length&&(e=i.data("bs.collapse"),e&&e.transitioning))){var r=t.Event("show.bs.collapse");if(this.$element.trigger(r),!r.isDefaultPrevented()){i&&i.length&&(n.call(i,"hide"),e||i.data("bs.collapse",null));var a=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[a](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("collapse in")[a](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var l=t.camelCase(["scroll",a].join("-"));this.$element.one("bsTransitionEnd",t.proxy(s,this)).emulateTransitionEnd(o.TRANSITION_DURATION)[a](this.$element[0][l])}}}},o.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var n=this.dimension();this.$element[n](this.$element[n]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var i=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return t.support.transition?void this.$element[n](0).one("bsTransitionEnd",t.proxy(i,this)).emulateTransitionEnd(o.TRANSITION_DURATION):i.call(this)}}},o.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},o.prototype.getParent=function(){return t(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(t.proxy(function(n,o){var i=t(o);this.addAriaAndCollapsedClass(e(i),i)},this)).end()},o.prototype.addAriaAndCollapsedClass=function(t,e){var n=t.hasClass("in");t.attr("aria-expanded",n),e.toggleClass("collapsed",!n).attr("aria-expanded",n)};var i=t.fn.collapse;t.fn.collapse=n,t.fn.collapse.Constructor=o,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(o){var i=t(this);i.attr("data-target")||o.preventDefault();var r=e(i),a=r.data("bs.collapse"),s=a?"toggle":i.data();n.call(r,s)})}(jQuery)},function(t,e){+function(t){"use strict";function e(e){var n=e.attr("data-target");n||(n=e.attr("href"),n=n&&/#[A-Za-z]/.test(n)&&n.replace(/.*(?=#[^\s]*$)/,""));var o=n&&t(n);return o&&o.length?o:e.parent()}function n(n){n&&3===n.which||(t(i).remove(),t(r).each(function(){var o=t(this),i=e(o),r={relatedTarget:this};i.hasClass("open")&&(n&&"click"==n.type&&/input|textarea/i.test(n.target.tagName)&&t.contains(i[0],n.target)||(i.trigger(n=t.Event("hide.bs.dropdown",r)),n.isDefaultPrevented()||(o.attr("aria-expanded","false"),i.removeClass("open").trigger(t.Event("hidden.bs.dropdown",r)))))}))}function o(e){return this.each(function(){var n=t(this),o=n.data("bs.dropdown");o||n.data("bs.dropdown",o=new a(this)),"string"==typeof e&&o[e].call(n)})}var i=".dropdown-backdrop",r='[data-toggle="dropdown"]',a=function(e){t(e).on("click.bs.dropdown",this.toggle)};a.VERSION="3.3.7",a.prototype.toggle=function(o){var i=t(this);if(!i.is(".disabled, :disabled")){var r=e(i),a=r.hasClass("open");if(n(),!a){"ontouchstart"in document.documentElement&&!r.closest(".navbar-nav").length&&t(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(t(this)).on("click",n);var s={relatedTarget:this};if(r.trigger(o=t.Event("show.bs.dropdown",s)),o.isDefaultPrevented())return;i.trigger("focus").attr("aria-expanded","true"),r.toggleClass("open").trigger(t.Event("shown.bs.dropdown",s))}return!1}},a.prototype.keydown=function(n){if(/(38|40|27|32)/.test(n.which)&&!/input|textarea/i.test(n.target.tagName)){var o=t(this);if(n.preventDefault(),n.stopPropagation(),!o.is(".disabled, :disabled")){var i=e(o),a=i.hasClass("open");if(!a&&27!=n.which||a&&27==n.which)return 27==n.which&&i.find(r).trigger("focus"),o.trigger("click");var s=" li:not(.disabled):visible a",l=i.find(".dropdown-menu"+s);if(l.length){var A=l.index(n.target);38==n.which&&A>0&&A--,40==n.which&&Adocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&t?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!t?this.scrollbarWidth:""})},n.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},n.prototype.checkScrollbar=function(){var t=window.innerWidth;if(!t){var e=document.documentElement.getBoundingClientRect();t=e.right-Math.abs(e.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},n.prototype.init=function(e,n,o){if(this.enabled=!0,this.type=e,this.$element=t(n),this.options=this.getOptions(o),this.$viewport=this.options.viewport&&t(t.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var i=this.options.trigger.split(" "),r=i.length;r--;){var a=i[r];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var s="hover"==a?"mouseenter":"focusin",l="hover"==a?"mouseleave":"focusout";this.$element.on(s+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},n.prototype.getDelegateOptions=function(){var e={},n=this.getDefaults();return this._options&&t.each(this._options,function(t,o){n[t]!=o&&(e[t]=o)}),e},n.prototype.enter=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);return n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusin"==e.type?"focus":"hover"]=!0),n.tip().hasClass("in")||"in"==n.hoverState?void(n.hoverState="in"):(clearTimeout(n.timeout),n.hoverState="in",n.options.delay&&n.options.delay.show?void(n.timeout=setTimeout(function(){"in"==n.hoverState&&n.show()},n.options.delay.show)):n.show())},n.prototype.isInStateTrue=function(){for(var t in this.inState)if(this.inState[t])return!0;return!1},n.prototype.leave=function(e){var n=e instanceof this.constructor?e:t(e.currentTarget).data("bs."+this.type);if(n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n)),e instanceof t.Event&&(n.inState["focusout"==e.type?"focus":"hover"]=!1),!n.isInStateTrue())return clearTimeout(n.timeout),n.hoverState="out",n.options.delay&&n.options.delay.hide?void(n.timeout=setTimeout(function(){"out"==n.hoverState&&n.hide()},n.options.delay.hide)):n.hide()},n.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var o=t.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!o)return;var i=this,r=this.tip(),a=this.getUID(this.type);this.setContent(),r.attr("id",a),this.$element.attr("aria-describedby",a),this.options.animation&&r.addClass("fade");var s="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,l=/\s?auto?\s?/i,A=l.test(s);A&&(s=s.replace(l,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(s).data("bs."+this.type,this), +this.options.container?r.appendTo(this.options.container):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),u=r[0].offsetWidth,d=r[0].offsetHeight;if(A){var g=s,h=this.getPosition(this.$viewport);s="bottom"==s&&c.bottom+d>h.bottom?"top":"top"==s&&c.top-dh.width?"left":"left"==s&&c.left-ua.top+a.height&&(i.top=a.top+a.height-l)}else{var A=e.left-r,c=e.left+r+n;Aa.right&&(i.left=a.left+a.width-c)}return i},n.prototype.getTitle=function(){var t,e=this.$element,n=this.options;return t=e.attr("data-original-title")||("function"==typeof n.title?n.title.call(e[0]):n.title)},n.prototype.getUID=function(t){do t+=~~(1e6*Math.random());while(document.getElementById(t));return t},n.prototype.tip=function(){if(!this.$tip&&(this.$tip=t(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},n.prototype.enable=function(){this.enabled=!0},n.prototype.disable=function(){this.enabled=!1},n.prototype.toggleEnabled=function(){this.enabled=!this.enabled},n.prototype.toggle=function(e){var n=this;e&&(n=t(e.currentTarget).data("bs."+this.type),n||(n=new this.constructor(e.currentTarget,this.getDelegateOptions()),t(e.currentTarget).data("bs."+this.type,n))),e?(n.inState.click=!n.inState.click,n.isInStateTrue()?n.enter(n):n.leave(n)):n.tip().hasClass("in")?n.leave(n):n.enter(n)},n.prototype.destroy=function(){var t=this;clearTimeout(this.timeout),this.hide(function(){t.$element.off("."+t.type).removeData("bs."+t.type),t.$tip&&t.$tip.detach(),t.$tip=null,t.$arrow=null,t.$viewport=null,t.$element=null})};var o=t.fn.tooltip;t.fn.tooltip=e,t.fn.tooltip.Constructor=n,t.fn.tooltip.noConflict=function(){return t.fn.tooltip=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.popover"),r="object"==typeof e&&e;!i&&/destroy|hide/.test(e)||(i||o.data("bs.popover",i=new n(this,r)),"string"==typeof e&&i[e]())})}var n=function(t,e){this.init("popover",t,e)};if(!t.fn.tooltip)throw new Error("Popover requires tooltip.js");n.VERSION="3.3.7",n.DEFAULTS=t.extend({},t.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),n.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),n.prototype.constructor=n,n.prototype.getDefaults=function(){return n.DEFAULTS},n.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),n=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof n?"html":"append":"text"](n),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},n.prototype.hasContent=function(){return this.getTitle()||this.getContent()},n.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},n.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var o=t.fn.popover;t.fn.popover=e,t.fn.popover.Constructor=n,t.fn.popover.noConflict=function(){return t.fn.popover=o,this}}(jQuery)},function(t,e){+function(t){"use strict";function e(n,o){this.$body=t(document.body),this.$scrollElement=t(t(n).is(document.body)?window:n),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",t.proxy(this.process,this)),this.refresh(),this.process()}function n(n){return this.each(function(){var o=t(this),i=o.data("bs.scrollspy"),r="object"==typeof n&&n;i||o.data("bs.scrollspy",i=new e(this,r)),"string"==typeof n&&i[n]()})}e.VERSION="3.3.7",e.DEFAULTS={offset:10},e.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},e.prototype.refresh=function(){var e=this,n="offset",o=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),t.isWindow(this.$scrollElement[0])||(n="position",o=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=t(this),i=e.data("target")||e.attr("href"),r=/^#./.test(i)&&t(i);return r&&r.length&&r.is(":visible")&&[[r[n]().top+o,i]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),o=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,r=this.targets,a=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),e>=o)return a!=(t=r[r.length-1])&&this.activate(t);if(a&&e=i[t]&&(void 0===i[t+1]||e .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),s?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),i&&i()}var a=o.find("> .active"),s=i&&t.support.transition&&(a.length&&a.hasClass("fade")||!!o.find("> .fade").length);a.length&&s?a.one("bsTransitionEnd",r).emulateTransitionEnd(n.TRANSITION_DURATION):r(),a.removeClass("in")};var o=t.fn.tab;t.fn.tab=e,t.fn.tab.Constructor=n,t.fn.tab.noConflict=function(){return t.fn.tab=o,this};var i=function(n){n.preventDefault(),e.call(t(this),"show")};t(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',i).on("click.bs.tab.data-api",'[data-toggle="pill"]',i)}(jQuery)},function(t,e){+function(t){"use strict";function e(e){return this.each(function(){var o=t(this),i=o.data("bs.affix"),r="object"==typeof e&&e;i||o.data("bs.affix",i=new n(this,r)),"string"==typeof e&&i[e]()})}var n=function(e,o){this.options=t.extend({},n.DEFAULTS,o),this.$target=t(this.options.target).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};n.VERSION="3.3.7",n.RESET="affix affix-top affix-bottom",n.DEFAULTS={offset:0,target:window},n.prototype.getState=function(t,e,n,o){var i=this.$target.scrollTop(),r=this.$element.offset(),a=this.$target.height();if(null!=n&&"top"==this.affixed)return i=t-o&&"bottom"},n.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(n.RESET).addClass("affix");var t=this.$target.scrollTop(),e=this.$element.offset();return this.pinnedOffset=e.top-t},n.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},n.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),o=this.options.offset,i=o.top,r=o.bottom,a=Math.max(t(document).height(),t(document.body).height());"object"!=typeof o&&(r=i=o),"function"==typeof i&&(i=o.top(this.$element)),"function"==typeof r&&(r=o.bottom(this.$element));var s=this.getState(a,e,i,r);if(this.affixed!=s){null!=this.unpin&&this.$element.css("top","");var l="affix"+(s?"-"+s:""),A=t.Event(l+".bs.affix");if(this.$element.trigger(A),A.isDefaultPrevented())return;this.affixed=s,this.unpin="bottom"==s?this.getPinnedOffset():null,this.$element.removeClass(n.RESET).addClass(l).trigger(l.replace("affix","affixed")+".bs.affix")}"bottom"==s&&this.$element.offset({top:a-e-r})}};var o=t.fn.affix;t.fn.affix=e,t.fn.affix.Constructor=n,t.fn.affix.noConflict=function(){return t.fn.affix=o,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var n=t(this),o=n.data();o.offset=o.offset||{},null!=o.offsetBottom&&(o.offset.bottom=o.offsetBottom),null!=o.offsetTop&&(o.offset.top=o.offsetTop),e.call(n,o)})})}(jQuery)},function(t,e){"use strict";!function(t){t.fn.draggable=function(e){var n=t.extend({handle:0,exclude:0},e);return this.each(function(){var e,o,i=t(this),r=n.handle?t(n.handle,i):i;r.on({mousedown:function(r){var a=r.target,s="",l=!1;if(a&&(s=a.className,s&&(s=s.trim(),s.indexOf("cm-")>-1?l=!0:s.indexOf("CodeMirror-")>-1&&(l=!0))),(!s||"form-control"!==s&&"presentation"!==s&&!l)&&!(s.indexOf("ureport")>-1||s.indexOf("ds_name")>-1||s.indexOf("dataset_name")>-1||"A"===a.tagName||"INPUT"===a.tagName||a&&"presentation"===t(a).attr("role")||n.exclude&&~t.inArray(r.target,t(n.exclude,i)))){var A=i.offset();e=r.pageX-A.left,o=r.pageY-A.top,t(document).on("mousemove.drag",function(t){i.offset({top:t.pageY-o,left:t.pageX-e})})}},mouseup:function(e){t(document).off("mousemove.drag")}})})}}(jQuery)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(t,e){for(var n=0;n0&&a.push(u)}else{var f=u.rect,M=f.getBBox();(M.x>=n.x&&M.x<=n.x2||M.x2>=n.x&&M.x2<=n.x2)&&(M.y>=n.y&&M.y<=n.y2||M.y2>=n.y&&M.y2<=n.y2)&&l.push(u)}}l.length>0?l.forEach(function(t,e){i.addSelection(t)}):a.forEach(function(t,e){i.addSelection(t)}),i.endSelect()}}var o=null,i=this.context,r=i.paper;r.set();this.canvas=r.rect(0,0,r.width,r.height).attr({fill:"#FFF",opacity:0}),this.canvas.toBack(),this.canvas.drag(e,t,n),this.canvas.click(function(t){var e=i.currentTool;if(!(!e||e instanceof u.default||e instanceof A.default)){var n=t.offsetX,o=t.offsetY,r=e._newNodeInstance(n,o);r&&!function(){var t=r.uuid,a=r.name,s=r.toJSON();i.addRedoUndo({redo:function(){r=e._newNodeInstance(n,o,a),r.initFromJson(s)},undo:function(){i.removeFigureByUUID(t)}})}()}}),this.canvas.mousemove(function(t){if(i.currentTool&&i.currentTool instanceof u.default){var e=i.currentConnection;if(e){var n=t.offsetX,o=t.offsetY;e.endX=n,e.endY=o,e.updatePath()}}})}}]),t}();e.default=h},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);en&&this.container.width(t+10),e>o&&this.container.height(e+10)}},{key:"addRedoUndo",value:function(t){this.undoManager.add(t)}},{key:"addSelection",value:function(t){this.selectionFigures.push(t),t instanceof T.default?this.selectionPaths.push(t.path):this.selectionRects.push(t.rect)}},{key:"endSelect",value:function(){this.selectionRects.attr("stroke","#FF9800"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"20"});var t=null;this.selectionFigures.forEach(function(e,n){t||(t=e),e instanceof T.default&&e.select()}),t&&y.eventEmitter.emit(y.OBJECT_SELECTED,t)}},{key:"resetSelection",value:function(){this.selectionRects.attr("stroke","#fff"),this.selectionPaths.attr({stroke:"#999","stroke-dasharray":"none"}),this.selectionRects=this.paper.set(),this.selectionPaths=this.paper.set(),this.selectionFigures.forEach(function(t,e){t instanceof T.default&&t.unSelect()}),this.selectionFigures.splice(0,this.selectionFigures.length),y.eventEmitter.emit(y.CANVAS_SELECTED)}},{key:"registerTool",value:function(t){var e=t.getType();if(this.toolsMap.has(e))throw"Figure ["+e+"] already exist.";this.toolsMap.set(e,t)}},{key:"nextUUID",value:function(){return g.default.v1()}},{key:"getFigureById",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,a=this.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s instanceof E.default&&(s.rect.id===t||s.icon.id===t||s.text.id===t)){e=s;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}},{key:"getNodeByUUID",value:function(t){var e=void 0,n=!0,o=!1,i=void 0;try{for(var r,a=this.allFigures[Symbol.iterator]();!(n=(r=a.next()).done);n=!0){var s=r.value;if(s.uuid===t){e=s;break}}}catch(t){o=!0,i=t}finally{try{!n&&a.return&&a.return()}finally{if(o)throw i}}return e}},{key:"removeFigureByUUID",value:function(t){var e=this.getNodeByUUID(t),n=this.allFigures.indexOf(e);this.allFigures.splice(n,1),e.remove()}},{key:"cancelConnection",value:function(){if(this.currentConnection){var t=this.currentConnection.from.fromConnections,e=t.indexOf(this.currentConnection);t.splice(e,1),this.currentConnection.path.remove(),this.currentConnection.text&&this.currentConnection.text.remove()}this.currentConnection=null}},{key:"_initEvent",value:function(){var t=this;y.eventEmitter.on(y.TRIGGER_TOOL,function(e){if(!t.toolsMap.has(e))throw"Node "+e+" not exist.";t.currentTool=t.toolsMap.get(e),t.cancelConnection()}),y.eventEmitter.on(y.REMOVE_CLICKED,function(){var e=[].concat(r(t.selectionFigures));0!==e&&(t.resetSelection(),e.forEach(function(e,n){var o=e.toJSON(),i=e.uuid,r=t;e instanceof T.default?t.addRedoUndo({redo:function(){var t=r.getNodeByUUID(i),e=t.from.uuid,n=t.to.uuid,a=r.context.getNodeByUUID(e),s=r.context.getNodeByUUID(n),l=new T.default(a,{x:a.rect.attr("x"),y:a.rect.attr("y")});a.fromConnections.push(l),s.toConnections.push(l),l.to=s,l.fromJSON(o)},undo:function(){r.removeFigureByUUID(i)}}):!function(){var n=e._tool;t.addRedoUndo({redo:function(){r.removeFigureByUUID(i)},undo:function(){var t=n._newNodeInstance(10,10,"");t&&(t.initFromJson(o),t._buildConnections())}})}(),t.removeFigureByUUID(i)}))}),y.eventEmitter.on(y.ALIGN_CENTER,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,a=!0,s=!1,l=void 0;try{for(var A,c=t.selectionFigures[Symbol.iterator]();!(a=(A=c.next()).done);a=!0){var u=A.value;if(u instanceof T.default)break;var d={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(e=u.rect.attr("x"),o=u.rect.attr("width"),e+=o/2):u.moveTo(e,n),d.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,d),r++}}catch(t){s=!0,l=t}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.newXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.oldXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),y.eventEmitter.on(y.ALIGN_MIDDLE,function(){var e=-1,n=-1,o=void 0,i=new Map,r=0,a=!0,s=!1,l=void 0;try{for(var A,c=t.selectionFigures[Symbol.iterator]();!(a=(A=c.next()).done);a=!0){var u=A.value;if(u instanceof T.default)break;var d={oldXY:{x:u.rect.attr("x"),y:u.rect.attr("y")}};0===r?(n=u.rect.attr("y"),o=u.rect.attr("height"),n+=o/2):u.moveTo(e,n),d.newXY={x:u.rect.attr("x"),y:u.rect.attr("y")},i.set(u.uuid,d),r++}}catch(t){s=!0,l=t}finally{try{!a&&c.return&&c.return()}finally{if(s)throw l}}var g=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.newXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var o,r=i.keys()[Symbol.iterator]();!(t=(o=r.next()).done);t=!0){var a=o.value,s=g.getNodeByUUID(a),l=i.get(a),A=l.oldXY;s.move(A.x,A.y,s.rect.attr("width"),s.rect.attr("height"))}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})}),y.eventEmitter.on(y.UNIFY_SIZE,function(){var e=void 0,n=void 0,o=new Map,i=0,r=!0,a=!1,s=void 0;try{for(var l,A=t.selectionFigures[Symbol.iterator]();!(r=(l=A.next()).done);r=!0){var c=l.value;if(c instanceof T.default)break;var u={oldWH:{w:c.rect.attr("width"),h:c.rect.attr("height")}};0===i?(e=c.rect.attr("width"),n=c.rect.attr("height")):c.changeSize(e,n),u.newWH={w:c.rect.attr("width"),h:c.rect.attr("height")},o.set(c.uuid,u),i++}}catch(t){a=!0,s=t}finally{try{!r&&A.return&&A.return()}finally{if(a)throw s}}var d=t;t.addRedoUndo({redo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,s=d.getNodeByUUID(a),l=o.get(a),A=l.newWH;s.changeSize(A.w,A.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}},undo:function(){var t=!0,e=!1,n=void 0;try{for(var i,r=o.keys()[Symbol.iterator]();!(t=(i=r.next()).done);t=!0){var a=i.value,s=d.getNodeByUUID(a),l=o.get(a),A=l.oldWH;s.changeSize(A.w,A.h)}}catch(t){e=!0,n=t}finally{try{!t&&r.return&&r.return()}finally{if(e)throw n}}}})})}},{key:"_initBuiltinTools",value:function(){this.selectTool=new p.default,this.connectionTool=new M.default,this.selectTool.context=this,this.connectionTool.context=this,this.currentTool=this.selectTool}}]),t}();e.default=m},function(t,e,n){var o;!function(){"use strict";function i(t,e,n){return t.splice(e,!n||1+n-e+(!(n<0^e>=0)&&(n<0||-1)*t.length)),t.length}var r=function(){var t,e,n=[],o=-1,r=0,a=!1;return e=function(t,e){return t&&"function"==typeof t[e]?(a=!0,t[e](),a=!1,this):this},{add:function(e){return a?this:(n.splice(o+1,n.length-o),n.push(e),r&&n.length>r&&i(n,0,-(r+1)),o=n.length-1,t&&t(),this)},setCallback:function(e){t=e},undo:function(){var i=n[o];return i?(e(i,"undo"),o-=1,t&&t(),this):this},redo:function(){var i=n[o+1];return i?(e(i,"redo"),o+=1,t&&t(),this):this},clear:function(){var e=n.length;n=[],o=-1,t&&e>0&&t()},hasUndo:function(){return o!==-1},hasRedo:function(){return o>>((3&e)<<3)&255;return n},"undefined"!=typeof console&&console.warn&&console.warn("[SECURITY] node-uuid: crypto not usable, falling back to insecure Math.random()")}}function s(){try{var t=n(284).randomBytes;h=d=t&&function(){return t(16)},d()}catch(t){}}function l(t,e,n){var o=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){i<16&&(e[o+i++]=w[t])});i<16;)e[o+i++]=0;return e}function A(t,e){var n=e||0,o=M;return o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+"-"+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]+o[t[n++]]}function c(t,e,n){var o=e&&n||0,i=e||[];t=t||{};var r=null!=t.clockseq?t.clockseq:I,a=null!=t.msecs?t.msecs:(new Date).getTime(),s=null!=t.nsecs?t.nsecs:m+1,l=a-E+(s-m)/1e4;if(l<0&&null==t.clockseq&&(r=r+1&16383),(l<0||a>E)&&null==t.nsecs&&(s=0),s>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");E=a,m=s,I=r,a+=122192928e5;var c=(1e4*(268435455&a)+s)%4294967296;i[o++]=c>>>24&255,i[o++]=c>>>16&255,i[o++]=c>>>8&255,i[o++]=255&c;var u=a/4294967296*1e4&268435455;i[o++]=u>>>8&255,i[o++]=255&u,i[o++]=u>>>24&15|16,i[o++]=u>>>16&255,i[o++]=r>>>8|128,i[o++]=255&r;for(var d=t.node||y,g=0;g<6;g++)i[o+g]=d[g];return e?e:A(i)}function u(t,e,n){var o=e&&n||0;"string"==typeof t&&(e="binary"===t?new f(16):null,t=null),t=t||{};var i=t.random||(t.rng||d)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e)for(var r=0;r<16;r++)e[o+r]=i[r];return e||A(i)}var d,g,h,p;r?a():s();for(var f="function"==typeof i?i:Array,M=[],w={},T=0;T<256;T++)M[T]=(T+256).toString(16).substr(1),w[M[T]]=T;var C=d(),y=[1|C[0],C[1],C[2],C[3],C[4],C[5]],I=16383&(C[6]<<8|C[7]),E=0,m=0,N=u;N.v1=c,N.v4=u,N.parse=l,N.unparse=A,N.BufferClass=f,N._rng=d,N._mathRNG=g,N._nodeRNG=h,N._whatwgRNG=p,"undefined"!=typeof t&&t.exports?t.exports=N:(o=function(){return N}.call(e,n,e,t),!(void 0!==o&&(t.exports=o)))}("undefined"!=typeof window?window:null)}).call(e,n(280).Buffer)},function(t,e,n){(function(t,o){"use strict";function i(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}function r(){return t.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function a(e,n){if(r()=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|t}function f(e){return+e!=e&&(e=0),t.alloc(+e)}function M(e,n){if(t.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var o=e.length;if(0===o)return 0;for(var i=!1;;)switch(n){case"ascii":case"latin1":case"binary":return o;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*o;case"hex":return o>>>1;case"base64":return J(e).length;default:if(i)return G(e).length;n=(""+n).toLowerCase(),i=!0}}function w(t,e,n){var o=!1;if((void 0===e||e<0)&&(e=0),e>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,e>>>=0,n<=e)return"";for(t||(t="utf8");;)switch(t){case"hex":return Q(this,e,n);case"utf8":case"utf-8":return v(this,e,n);case"ascii":return B(this,e,n);case"latin1":case"binary":return S(this,e,n);case"base64":return D(this,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,e,n);default:if(o)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),o=!0}}function T(t,e,n){var o=t[e];t[e]=t[n],t[n]=o}function C(e,n,o,i,r){if(0===e.length)return-1;if("string"==typeof o?(i=o,o=0):o>2147483647?o=2147483647:o<-2147483648&&(o=-2147483648),o=+o,isNaN(o)&&(o=r?0:e.length-1),o<0&&(o=e.length+o),o>=e.length){if(r)return-1;o=e.length-1}else if(o<0){if(!r)return-1;o=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:y(e,n,o,i,r);if("number"==typeof n)return n&=255,t.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,o):Uint8Array.prototype.lastIndexOf.call(e,n,o):y(e,[n],o,i,r); +throw new TypeError("val must be string, number or Buffer")}function y(t,e,n,o,i){function r(t,e){return 1===a?t[e]:t.readUInt16BE(e*a)}var a=1,s=t.length,l=e.length;if(void 0!==o&&(o=String(o).toLowerCase(),"ucs2"===o||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(t.length<2||e.length<2)return-1;a=2,s/=2,l/=2,n/=2}var A;if(i){var c=-1;for(A=n;As&&(n=s-l),A=n;A>=0;A--){for(var u=!0,d=0;di&&(o=i)):o=i;var r=e.length;if(r%2!==0)throw new TypeError("Invalid hex string");o>r/2&&(o=r/2);for(var a=0;a239?4:r>223?3:r>191?2:1;if(i+s<=n){var l,A,c,u;switch(s){case 1:r<128&&(a=r);break;case 2:l=t[i+1],128===(192&l)&&(u=(31&r)<<6|63&l,u>127&&(a=u));break;case 3:l=t[i+1],A=t[i+2],128===(192&l)&&128===(192&A)&&(u=(15&r)<<12|(63&l)<<6|63&A,u>2047&&(u<55296||u>57343)&&(a=u));break;case 4:l=t[i+1],A=t[i+2],c=t[i+3],128===(192&l)&&128===(192&A)&&128===(192&c)&&(u=(15&r)<<18|(63&l)<<12|(63&A)<<6|63&c,u>65535&&u<1114112&&(a=u))}}null===a?(a=65533,s=1):a>65535&&(a-=65536,o.push(a>>>10&1023|55296),a=56320|1023&a),o.push(a),i+=s}return L(o)}function L(t){var e=t.length;if(e<=tt)return String.fromCharCode.apply(String,t);for(var n="",o=0;oo)&&(n=o);for(var i="",r=e;rn)throw new RangeError("Trying to access beyond buffer length")}function k(e,n,o,i,r,a){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||ne.length)throw new RangeError("Index out of range")}function R(t,e,n,o){e<0&&(e=65535+e+1);for(var i=0,r=Math.min(t.length-n,2);i>>8*(o?i:1-i)}function z(t,e,n,o){e<0&&(e=4294967295+e+1);for(var i=0,r=Math.min(t.length-n,4);i>>8*(o?i:3-i)&255}function O(t,e,n,o,i,r){if(n+o>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function Y(t,e,n,o,i){return i||O(t,e,n,4,3.4028234663852886e38,-3.4028234663852886e38),q.write(t,e,n,o,23,4),n+4}function H(t,e,n,o,i){return i||O(t,e,n,8,1.7976931348623157e308,-1.7976931348623157e308),q.write(t,e,n,o,52,8),n+8}function F(t){if(t=V(t).replace(et,""),t.length<2)return"";for(;t.length%4!==0;)t+="=";return t}function V(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function P(t){return t<16?"0"+t.toString(16):t.toString(16)}function G(t,e){e=e||1/0;for(var n,o=t.length,i=null,r=[],a=0;a55295&&n<57344){if(!i){if(n>56319){(e-=3)>-1&&r.push(239,191,189);continue}if(a+1===o){(e-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(e-=3)>-1&&r.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(e-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((e-=1)<0)break;r.push(n)}else if(n<2048){if((e-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((e-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((e-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function W(t){for(var e=[],n=0;n>8,i=n%256,r.push(i),r.push(o);return r}function J(t){return _.toByteArray(F(t))}function Z(t,e,n,o){for(var i=0;i=e.length||i>=t.length);++i)e[i+n]=t[i];return i}function K(t){return t!==t}var _=n(281),q=n(282),$=n(283);e.Buffer=t,e.SlowBuffer=f,e.INSPECT_MAX_BYTES=50,t.TYPED_ARRAY_SUPPORT=void 0!==o.TYPED_ARRAY_SUPPORT?o.TYPED_ARRAY_SUPPORT:i(),e.kMaxLength=r(),t.poolSize=8192,t._augment=function(e){return e.__proto__=t.prototype,e},t.from=function(t,e,n){return s(null,t,e,n)},t.TYPED_ARRAY_SUPPORT&&(t.prototype.__proto__=Uint8Array.prototype,t.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&t[Symbol.species]===t&&Object.defineProperty(t,Symbol.species,{value:null,configurable:!0})),t.alloc=function(t,e,n){return A(null,t,e,n)},t.allocUnsafe=function(t){return c(null,t)},t.allocUnsafeSlow=function(t){return c(null,t)},t.isBuffer=function(t){return!(null==t||!t._isBuffer)},t.compare=function(e,n){if(!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError("Arguments must be Buffers");if(e===n)return 0;for(var o=e.length,i=n.length,r=0,a=Math.min(o,i);r0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),""},t.prototype.compare=function(e,n,o,i,r){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===n&&(n=0),void 0===o&&(o=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),n<0||o>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&n>=o)return 0;if(i>=r)return-1;if(n>=o)return 1;if(n>>>=0,o>>>=0,i>>>=0,r>>>=0,this===e)return 0;for(var a=r-i,s=o-n,l=Math.min(a,s),A=this.slice(i,r),c=e.slice(n,o),u=0;ui)&&(n=i),t.length>0&&(n<0||e<0)||e>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var r=!1;;)switch(o){case"hex":return I(this,t,e,n);case"utf8":case"utf-8":return E(this,t,e,n);case"ascii":return m(this,t,e,n);case"latin1":case"binary":return N(this,t,e,n);case"base64":return b(this,t,e,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,t,e,n);default:if(r)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var tt=4096;t.prototype.slice=function(e,n){var o=this.length;e=~~e,n=void 0===n?o:~~n,e<0?(e+=o,e<0&&(e=0)):e>o&&(e=o),n<0?(n+=o,n<0&&(n=0)):n>o&&(n=o),n0&&(i*=256);)o+=this[t+--e]*i;return o},t.prototype.readUInt8=function(t,e){return e||U(t,1,this.length),this[t]},t.prototype.readUInt16LE=function(t,e){return e||U(t,2,this.length),this[t]|this[t+1]<<8},t.prototype.readUInt16BE=function(t,e){return e||U(t,2,this.length),this[t]<<8|this[t+1]},t.prototype.readUInt32LE=function(t,e){return e||U(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},t.prototype.readUInt32BE=function(t,e){return e||U(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},t.prototype.readIntLE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var o=this[t],i=1,r=0;++r=i&&(o-=Math.pow(2,8*e)),o},t.prototype.readIntBE=function(t,e,n){t|=0,e|=0,n||U(t,e,this.length);for(var o=e,i=1,r=this[t+--o];o>0&&(i*=256);)r+=this[t+--o]*i;return i*=128,r>=i&&(r-=Math.pow(2,8*e)),r},t.prototype.readInt8=function(t,e){return e||U(t,1,this.length),128&this[t]?(255-this[t]+1)*-1:this[t]},t.prototype.readInt16LE=function(t,e){e||U(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(t,e){e||U(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(t,e){return e||U(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},t.prototype.readInt32BE=function(t,e){return e||U(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},t.prototype.readFloatLE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!0,23,4)},t.prototype.readFloatBE=function(t,e){return e||U(t,4,this.length),q.read(this,t,!1,23,4)},t.prototype.readDoubleLE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!0,52,8)},t.prototype.readDoubleBE=function(t,e){return e||U(t,8,this.length),q.read(this,t,!1,52,8)},t.prototype.writeUIntLE=function(t,e,n,o){if(t=+t,e|=0,n|=0,!o){var i=Math.pow(2,8*n)-1;k(this,t,e,n,i,0)}var r=1,a=0;for(this[e]=255&t;++a=0&&(a*=256);)this[e+r]=t/a&255;return e+n},t.prototype.writeUInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,255,0),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[n]=255&e,n+1},t.prototype.writeUInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},t.prototype.writeUInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,65535,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},t.prototype.writeUInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n+3]=e>>>24,this[n+2]=e>>>16,this[n+1]=e>>>8,this[n]=255&e):z(this,e,n,!0),n+4},t.prototype.writeUInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,4294967295,0),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):z(this,e,n,!1),n+4},t.prototype.writeIntLE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=0,a=1,s=0;for(this[e]=255&t;++r>0)-s&255;return e+n},t.prototype.writeIntBE=function(t,e,n,o){if(t=+t,e|=0,!o){var i=Math.pow(2,8*n-1);k(this,t,e,n,i-1,-i)}var r=n-1,a=1,s=0;for(this[e+r]=255&t;--r>=0&&(a*=256);)t<0&&0===s&&0!==this[e+r+1]&&(s=1),this[e+r]=(t/a>>0)-s&255;return e+n},t.prototype.writeInt8=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,1,127,-128),t.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[n]=255&e,n+1},t.prototype.writeInt16LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8):R(this,e,n,!0),n+2},t.prototype.writeInt16BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,2,32767,-32768),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>8,this[n+1]=255&e):R(this,e,n,!1),n+2},t.prototype.writeInt32LE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),t.TYPED_ARRAY_SUPPORT?(this[n]=255&e,this[n+1]=e>>>8,this[n+2]=e>>>16,this[n+3]=e>>>24):z(this,e,n,!0),n+4},t.prototype.writeInt32BE=function(e,n,o){return e=+e,n|=0,o||k(this,e,n,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),t.TYPED_ARRAY_SUPPORT?(this[n]=e>>>24,this[n+1]=e>>>16,this[n+2]=e>>>8,this[n+3]=255&e):z(this,e,n,!1),n+4},t.prototype.writeFloatLE=function(t,e,n){return Y(this,t,e,!0,n)},t.prototype.writeFloatBE=function(t,e,n){return Y(this,t,e,!1,n)},t.prototype.writeDoubleLE=function(t,e,n){return H(this,t,e,!0,n)},t.prototype.writeDoubleBE=function(t,e,n){return H(this,t,e,!1,n)},t.prototype.copy=function(e,n,o,i){if(o||(o=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i=this.length)throw new RangeError("sourceStart out of bounds");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n=0;--r)e[r+n]=this[r+o];else if(a<1e3||!t.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,o=void 0===o?this.length:o>>>0,e||(e=0);var a;if("number"==typeof e)for(a=n;a0)throw new Error("Invalid string. Length must be a multiple of 4");return"="===t[e-2]?2:"="===t[e-1]?1:0}function o(t){return 3*t.length/4-n(t)}function i(t){var e,o,i,r,a,s,l=t.length;a=n(t),s=new c(3*l/4-a),i=a>0?l-4:l;var u=0;for(e=0,o=0;e>16&255,s[u++]=r>>8&255,s[u++]=255&r;return 2===a?(r=A[t.charCodeAt(e)]<<2|A[t.charCodeAt(e+1)]>>4,s[u++]=255&r):1===a&&(r=A[t.charCodeAt(e)]<<10|A[t.charCodeAt(e+1)]<<4|A[t.charCodeAt(e+2)]>>2,s[u++]=r>>8&255,s[u++]=255&r),s}function r(t){return l[t>>18&63]+l[t>>12&63]+l[t>>6&63]+l[63&t]}function a(t,e,n){for(var o,i=[],a=e;ac?c:A+s));return 1===o?(e=t[n-1],i+=l[e>>2],i+=l[e<<4&63],i+="=="):2===o&&(e=(t[n-2]<<8)+t[n-1],i+=l[e>>10],i+=l[e>>4&63],i+=l[e<<2&63],i+="="),r.push(i),r.join("")}e.byteLength=o,e.toByteArray=i,e.fromByteArray=s;for(var l=[],A=[],c="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d=0,g=u.length;d>1,c=-7,u=n?i-1:0,d=n?-1:1,g=t[e+u];for(u+=d,r=g&(1<<-c)-1,g>>=-c,c+=s;c>0;r=256*r+t[e+u],u+=d,c-=8);for(a=r&(1<<-c)-1,r>>=-c,c+=o;c>0;a=256*a+t[e+u],u+=d,c-=8);if(0===r)r=1-A;else{if(r===l)return a?NaN:(g?-1:1)*(1/0);a+=Math.pow(2,o),r-=A}return(g?-1:1)*a*Math.pow(2,r-o)},e.write=function(t,e,n,o,i,r){var a,s,l,A=8*r-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,g=o?0:r-1,h=o?1:-1,p=e<0||0===e&&1/e<0?1:0;for(e=Math.abs(e),isNaN(e)||e===1/0?(s=isNaN(e)?1:0,a=c):(a=Math.floor(Math.log(e)/Math.LN2),e*(l=Math.pow(2,-a))<1&&(a--,l*=2),e+=a+u>=1?d/l:d*Math.pow(2,1-u),e*l>=2&&(a++,l/=2),a+u>=c?(s=0,a=c):a+u>=1?(s=(e*l-1)*Math.pow(2,i),a+=u):(s=e*Math.pow(2,u-1)*Math.pow(2,i),a=0));i>=8;t[n+g]=255&s,g+=h,s/=256,i-=8);for(a=a<0;t[n+g]=255&a,g+=h,a/=256,A-=8);t[n+g-h]|=128*p}},function(t,e){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,e,n){(function(t){function o(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var n in t)e(t[n],n)}var r=n(285);e.createHash=n(287),e.createHmac=n(299),e.randomBytes=function(e,n){if(!n||!n.call)return new t(r(e));try{n.call(this,void 0,new t(r(e)))}catch(t){n(t)}},e.getHashes=function(){return["sha1","sha256","sha512","md5","rmd160"]};var a=n(300)(e);e.pbkdf2=a.pbkdf2,e.pbkdf2Sync=a.pbkdf2Sync,i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman"],function(t){e[t]=function(){o("sorry,",t,"is not implemented yet")}})}).call(e,n(280).Buffer)},function(t,e,n){(function(e,o){!function(){var i=("undefined"==typeof window?e:window)||{};_crypto=i.crypto||i.msCrypto||n(286),t.exports=function(t){if(_crypto.getRandomValues){var e=new o(t);return _crypto.getRandomValues(e),e}if(_crypto.randomBytes)return _crypto.randomBytes(t);throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}}()}).call(e,function(){return this}(),n(280).Buffer)},function(t,e){},function(t,e,n){(function(e){function o(t){return function(){var n=[],o={update:function(t,o){return e.isBuffer(t)||(t=new e(t,o)),n.push(t),this},digest:function(o){var i=e.concat(n),r=t(i);return n=null,o?r.toString(o):r}};return o}}var i=n(288),r=o(n(296)),a=o(n(298));t.exports=function(t){return"md5"===t?new r:"rmd160"===t?new a:i(t)}}).call(e,n(280).Buffer)},function(t,e,n){var e=t.exports=function(t){var n=e[t];if(!n)throw new Error(t+" is not supported (we accept pull requests)");return new n},o=n(280).Buffer,i=n(289)(o);e.sha1=n(290)(o,i),e.sha256=n(294)(o,i),e.sha512=n(295)(o,i)},function(t,e){t.exports=function(t){function e(e,n){this._block=new t(e),this._finalSize=n,this._blockSize=e,this._len=0,this._s=0}return e.prototype.init=function(){this._s=0,this._len=0},e.prototype.update=function(e,n){"string"==typeof e&&(n=n||"utf8",e=new t(e,n));for(var o=this._len+=e.length,i=this._s=this._s||0,r=0,a=this._block;i=8*this._finalSize&&(this._update(this._block),this._block.fill(0)),this._block.writeInt32BE(e,this._blockSize-4);var n=this._update(this._block)||this._hash();return t?n.toString(t):n},e.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){return h.length?h.pop().init():this instanceof n?(this._w=g,e.call(this,64,56),this._h=null,void this.init()):new n}function i(t,e,n,o){return t<20?e&n|~e&o:t<40?e^n^o:t<60?e&n|e&o|n&o:e^n^o}function r(t){return t<20?1518500249:t<40?1859775393:t<60?-1894007588:-899497514}function a(t,e){return t+e|0}function s(t,e){return t<>>32-e}var l=0,A=4,c=8,u=12,d=16,g=new("undefined"==typeof Int32Array?Array:Int32Array)(80),h=[];return o(n,e),n.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,e.prototype.init.call(this),this},n.prototype._POOL=h,n.prototype._update=function(t){var e,n,o,l,A,c,u,d,g,h;e=c=this._a,n=u=this._b,o=d=this._c,l=g=this._d,A=h=this._e;for(var p=this._w,f=0;f<80;f++){var M=p[f]=f<16?t.readInt32BE(4*f):s(p[f-3]^p[f-8]^p[f-14]^p[f-16],1),w=a(a(s(e,5),i(f,n,o,l)),a(a(A,M),r(f)));A=l,l=o,o=s(n,30),n=e,e=w}this._a=a(e,c),this._b=a(n,u),this._c=a(o,d),this._d=a(l,g),this._e=a(A,h)},n.prototype._hash=function(){h.length<100&&h.push(this);var e=new t(20);return e.writeInt32BE(0|this._a,l),e.writeInt32BE(0|this._b,A),e.writeInt32BE(0|this._c,c),e.writeInt32BE(0|this._d,u),e.writeInt32BE(0|this._e,d),e},n}},function(t,e,n){(function(t,o){function i(t,n){var o={seen:[],stylize:a};return arguments.length>=3&&(o.depth=arguments[2]),arguments.length>=4&&(o.colors=arguments[3]),p(n)?o.showHidden=n:n&&e._extend(o,n),y(o.showHidden)&&(o.showHidden=!1),y(o.depth)&&(o.depth=2),y(o.colors)&&(o.colors=!1),y(o.customInspect)&&(o.customInspect=!0),o.colors&&(o.stylize=r),l(o,t,o.depth)}function r(t,e){var n=i.styles[e];return n?"["+i.colors[n][0]+"m"+t+"["+i.colors[n][1]+"m":t}function a(t,e){return t}function s(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}function l(t,n,o){if(t.customInspect&&n&&b(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var i=n.inspect(o,t);return T(i)||(i=l(t,i,o)),i}var r=A(t,n);if(r)return r;var a=Object.keys(n),p=s(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),N(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return c(n);if(0===a.length){if(b(n)){var f=n.name?": "+n.name:"";return t.stylize("[Function"+f+"]","special")}if(I(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(m(n))return t.stylize(Date.prototype.toString.call(n),"date");if(N(n))return c(n)}var M="",w=!1,C=["{","}"];if(h(n)&&(w=!0,C=["[","]"]),b(n)){var y=n.name?": "+n.name:"";M=" [Function"+y+"]"}if(I(n)&&(M=" "+RegExp.prototype.toString.call(n)),m(n)&&(M=" "+Date.prototype.toUTCString.call(n)),N(n)&&(M=" "+c(n)),0===a.length&&(!w||0==n.length))return C[0]+M+C[1];if(o<0)return I(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special");t.seen.push(n);var E;return E=w?u(t,n,o,p,a):a.map(function(e){return d(t,n,o,p,e,w)}),t.seen.pop(),g(E,M,C)}function A(t,e){if(y(e))return t.stylize("undefined","undefined");if(T(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}return w(e)?t.stylize(""+e,"number"):p(e)?t.stylize(""+e,"boolean"):f(e)?t.stylize("null","null"):void 0}function c(t){return"["+Error.prototype.toString.call(t)+"]"}function u(t,e,n,o,i){for(var r=[],a=0,s=e.length;a-1&&(s=r?s.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+s.split("\n").map(function(t){return" "+t}).join("\n"))):s=t.stylize("[Circular]","special")),y(a)){if(r&&i.match(/^\d+$/))return s;a=JSON.stringify(""+i),a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+s}function g(t,e,n){var o=0,i=t.reduce(function(t,e){return o++,e.indexOf("\n")>=0&&o++,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0);return i>60?n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1]:n[0]+e+" "+t.join(", ")+" "+n[1]}function h(t){return Array.isArray(t)}function p(t){return"boolean"==typeof t}function f(t){return null===t}function M(t){return null==t}function w(t){return"number"==typeof t}function T(t){return"string"==typeof t}function C(t){return"symbol"==typeof t}function y(t){return void 0===t}function I(t){return E(t)&&"[object RegExp]"===D(t)}function E(t){return"object"==typeof t&&null!==t}function m(t){return E(t)&&"[object Date]"===D(t)}function N(t){return E(t)&&("[object Error]"===D(t)||t instanceof Error)}function b(t){return"function"==typeof t}function x(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||"undefined"==typeof t}function D(t){return Object.prototype.toString.call(t)}function v(t){return t<10?"0"+t.toString(10):t.toString(10)}function L(){var t=new Date,e=[v(t.getHours()),v(t.getMinutes()),v(t.getSeconds())].join(":");return[t.getDate(),U[t.getMonth()],e].join(" ")}function B(t,e){return Object.prototype.hasOwnProperty.call(t,e)}var S=/%[sdj%]/g;e.format=function(t){if(!T(t)){for(var e=[],n=0;n=r)return t;switch(t){case"%s":return String(o[n++]);case"%d":return Number(o[n++]);case"%j":try{return JSON.stringify(o[n++])}catch(t){return"[Circular]"}default:return t}}),s=o[n];n>>e|t<<32-e}function r(t,e){return t>>>e}function a(t,e,n){return t&e^~t&n}function s(t,e,n){return t&e^t&n^e&n}function l(t){return i(t,2)^i(t,13)^i(t,22)}function A(t){return i(t,6)^i(t,11)^i(t,25)}function c(t){return i(t,7)^i(t,18)^r(t,3)}function u(t){return i(t,17)^i(t,19)^r(t,10)}var d=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],g=new Array(64);return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,i,r,g,h,p,f,M,w=this._w;e=0|this._a,n=0|this._b,o=0|this._c,i=0|this._d,r=0|this._e,g=0|this._f,h=0|this._g,p=0|this._h;for(var T=0;T<64;T++){var C=w[T]=T<16?t.readInt32BE(4*T):u(w[T-2])+w[T-7]+c(w[T-15])+w[T-16];f=p+A(r)+a(r,g,h)+d[T]+C,M=l(e)+s(e,n,o),p=h,h=g,g=r,r=i+f,i=o,o=n,n=e,e=f+M}this._a=e+this._a|0,this._b=n+this._b|0,this._c=o+this._c|0,this._d=i+this._d|0,this._e=r+this._e|0,this._f=g+this._f|0,this._g=h+this._g|0,this._h=p+this._h|0},n.prototype._hash=function(){var e=new t(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},n}},function(t,e,n){var o=n(291).inherits;t.exports=function(t,e){function n(){this.init(),this._w=l,e.call(this,128,112)}function i(t,e,n){return t>>>n|e<<32-n}function r(t,e,n){return t&e^~t&n}function a(t,e,n){return t&e^t&n^e&n}var s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],l=new Array(160); +return o(n,e),n.prototype.init=function(){return this._a=1779033703,this._b=-1150833019,this._c=1013904242,this._d=-1521486534,this._e=1359893119,this._f=-1694144372,this._g=528734635,this._h=1541459225,this._al=-205731576,this._bl=-2067093701,this._cl=-23791573,this._dl=1595750129,this._el=-1377402159,this._fl=725511199,this._gl=-79577749,this._hl=327033209,this._len=this._s=0,this},n.prototype._update=function(t){var e,n,o,l,A,c,u,d,g,h,p,f,M,w,T,C,y=this._w;e=0|this._a,n=0|this._b,o=0|this._c,l=0|this._d,A=0|this._e,c=0|this._f,u=0|this._g,d=0|this._h,g=0|this._al,h=0|this._bl,p=0|this._cl,f=0|this._dl,M=0|this._el,w=0|this._fl,T=0|this._gl,C=0|this._hl;for(var I=0;I<80;I++){var E,m,N=2*I;if(I<16)E=y[N]=t.readInt32BE(4*N),m=y[N+1]=t.readInt32BE(4*N+4);else{var b=y[N-30],x=y[N-30+1],D=i(b,x,1)^i(b,x,8)^b>>>7,v=i(x,b,1)^i(x,b,8)^i(x,b,7);b=y[N-4],x=y[N-4+1];var L=i(b,x,19)^i(x,b,29)^b>>>6,B=i(x,b,19)^i(b,x,29)^i(x,b,6),S=y[N-14],Q=y[N-14+1],j=y[N-32],U=y[N-32+1];m=v+Q,E=D+S+(m>>>0>>0?1:0),m+=B,E=E+L+(m>>>0>>0?1:0),m+=U,E=E+j+(m>>>0>>0?1:0),y[N]=E,y[N+1]=m}var k=a(e,n,o),R=a(g,h,p),z=i(e,g,28)^i(g,e,2)^i(g,e,7),O=i(g,e,28)^i(e,g,2)^i(e,g,7),Y=i(A,M,14)^i(A,M,18)^i(M,A,9),H=i(M,A,14)^i(M,A,18)^i(A,M,9),F=s[N],V=s[N+1],P=r(A,c,u),G=r(M,w,T),W=C+H,X=d+Y+(W>>>0>>0?1:0);W+=G,X=X+P+(W>>>0>>0?1:0),W+=V,X=X+F+(W>>>0>>0?1:0),W+=m,X=X+E+(W>>>0>>0?1:0);var J=O+R,Z=z+k+(J>>>0>>0?1:0);d=u,C=T,u=c,T=w,c=A,w=M,M=f+W|0,A=l+X+(M>>>0>>0?1:0)|0,l=o,f=p,o=n,p=h,n=e,h=g,g=W+J|0,e=X+Z+(g>>>0>>0?1:0)|0}this._al=this._al+g|0,this._bl=this._bl+h|0,this._cl=this._cl+p|0,this._dl=this._dl+f|0,this._el=this._el+M|0,this._fl=this._fl+w|0,this._gl=this._gl+T|0,this._hl=this._hl+C|0,this._a=this._a+e+(this._al>>>0>>0?1:0)|0,this._b=this._b+n+(this._bl>>>0>>0?1:0)|0,this._c=this._c+o+(this._cl>>>0

    >>0?1:0)|0,this._d=this._d+l+(this._dl>>>0>>0?1:0)|0,this._e=this._e+A+(this._el>>>0>>0?1:0)|0,this._f=this._f+c+(this._fl>>>0>>0?1:0)|0,this._g=this._g+u+(this._gl>>>0>>0?1:0)|0,this._h=this._h+d+(this._hl>>>0>>0?1:0)|0},n.prototype._hash=function(){function e(t,e,o){n.writeInt32BE(t,o),n.writeInt32BE(e,o+4)}var n=new t(64);return e(this._a,this._al,0),e(this._b,this._bl,8),e(this._c,this._cl,16),e(this._d,this._dl,24),e(this._e,this._el,32),e(this._f,this._fl,40),e(this._g,this._gl,48),e(this._h,this._hl,56),n},n}},function(t,e,n){function o(t,e){t[e>>5]|=128<>>9<<4)+14]=e;for(var n=1732584193,o=-271733879,i=-1732584194,c=271733878,u=0;u>16)+(e>>16)+(n>>16);return o<<16|65535&n}function c(t,e){return t<>>32-e}var u=n(297);t.exports=function(t){return u.hash(t,o,16)}},function(t,e,n){(function(e){function n(t,n){if(t.length%r!==0){var o=t.length+(r-t.length%r);t=e.concat([t,a],o)}for(var i=[],s=n?t.readInt32BE:t.readInt32LE,l=0;l>>32-e}function l(t){var n=[1732584193,4023233417,2562383102,271733878,3285377520];"string"==typeof t&&(t=new e(t,"utf8"));var o=p(t),i=8*t.length,r=8*t.length;o[i>>>5]|=128<<24-i%32,o[(i+64>>>9<<4)+14]=16711935&(r<<8|r>>>24)|4278255360&(r<<24|r>>>8);for(var a=0;a>>24)|4278255360&(s<<24|s>>>8)}var l=f(n);return new e(l)}t.exports=l;var A=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],c=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],u=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],d=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],g=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0],p=function(t){for(var e=[],n=0,o=0;n>>5]|=t[n]<<24-o%32;return e},f=function(t){for(var e=[],n=0;n<32*t.length;n+=8)e.push(t[n>>>5]>>>24-n%32&255);return e},M=function(t,e,l){for(var p=0;p<16;p++){var f=l+p,M=e[f];e[f]=16711935&(M<<8|M>>>24)|4278255360&(M<<24|M>>>8)}var w,T,C,y,I,E,m,N,b,x;E=w=t[0],m=T=t[1],N=C=t[2],b=y=t[3],x=I=t[4];for(var D,p=0;p<80;p+=1)D=w+e[l+A[p]]|0,D+=p<16?n(T,C,y)+g[0]:p<32?o(T,C,y)+g[1]:p<48?i(T,C,y)+g[2]:p<64?r(T,C,y)+g[3]:a(T,C,y)+g[4],D|=0,D=s(D,u[p]),D=D+I|0,w=I,I=y,y=s(C,10),C=T,T=D,D=E+e[l+c[p]]|0,D+=p<16?a(m,N,b)+h[0]:p<32?r(m,N,b)+h[1]:p<48?i(m,N,b)+h[2]:p<64?o(m,N,b)+h[3]:n(m,N,b)+h[4],D|=0,D=s(D,d[p]),D=D+x|0,E=x,x=b,b=s(N,10),N=m,m=D;D=t[1]+C+b|0,t[1]=t[2]+y+x|0,t[2]=t[3]+I+E|0,t[3]=t[4]+w+m|0,t[4]=t[0]+T+N|0,t[0]=D}}).call(e,n(280).Buffer)},function(t,e,n){(function(e){function o(t,n){if(!(this instanceof o))return new o(t,n);this._opad=l,this._alg=t;var a="sha512"===t?128:64;n=this._key=e.isBuffer(n)?n:new e(n),n.length>a?n=i(t).update(n).digest():n.length(Math.pow(2,32)-1)*s))throw new TypeError("keylen exceeds maximum length");h.copy(A,0,0,s);for(var p=1;pe&&(e=i)}}),t.css("z-index",e+1)})}},{key:"render",value:function(){var t=this,e=[];this.props.buttons.forEach(function(n,o){e.push(A.default.createElement("button",{type:"button",key:o,className:n.className,onClick:function(e){n.click(t.props.dispatch)}},A.default.createElement("i",{className:n.icon})," ",n.name))});var n=this.props.large,o="modal-dialog"+(n?" modal-lg":"");return A.default.createElement("div",{className:"modal fade",tabIndex:"-1",role:"dialog","aria-hidden":"true",style:{overflow:"auto"}},A.default.createElement("div",{className:o},A.default.createElement("div",{className:"modal-content"},A.default.createElement("div",{className:"modal-header"},A.default.createElement("button",{type:"button",className:"close","data-dismiss":"modal","aria-hidden":"true"},"×"),A.default.createElement("h3",{className:"modal-title",id:"myModalLabel",style:{wordWrap:"break-word"}},this.props.title,A.default.createElement("div",{className:"text-danger",style:{fontSize:"12pt"}},this.props.info?this.props.info:null))),A.default.createElement("div",{className:"modal-body",style:{padding:"10px"}},this.props.body),A.default.createElement("div",{className:"modal-footer"},e))))}}]),e}(l.Component);e.default=d},,,,,,,,,function(t,e,n){var o=n(316);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,"/*!\r\n * Handsontable 0.11.2\r\n * Handsontable is a simple jQuery plugin for editable tables with basic copy-paste compatibility with Excel and Google Docs\r\n *\r\n * Copyright 2012-2014 Marcin Warpechowski\r\n * Licensed under the MIT license.\r\n * http://handsontable.com/\r\n *\r\n * Date: Thu Sep 11 2014 23:41:54 GMT+0200 (CEST)\r\n */.handsontable,.handsontable .relative{position:relative}.handsontable.htAutoColumnSize{visibility:hidden;left:0;position:absolute;top:0}.handsontable div,.handsontable table,.handsontable tbody,.handsontable td,.handsontable th,.handsontable thead{box-sizing:content-box;-webkit-box-sizing:content-box;-moz-box-sizing:content-box}.handsontable table.htCore{border-collapse:separate;position:relative;border-spacing:0;margin:0;border-width:0;table-layout:fixed;width:0;outline-width:0;max-width:none;max-height:none}.handsontable col,.handsontable col.rowHeader{width:50px}.handsontable td,.handsontable th{border-right:1px solid #ccc;border-bottom:1px solid #ccc;height:22px;empty-cells:show;line-height:21px;padding:0 4px;background-color:#fff;vertical-align:top;overflow:hidden;outline-width:0;white-space:pre-line}.handsontable td.htInvalid{background-color:#ff4c42!important}.handsontable td.htNoWrap{white-space:nowrap}.handsontable th:last-child{border-right:1px solid #ccc;border-bottom:1px solid #ccc}.handsontable th.htNoFrame,.handsontable th:first-child.htNoFrame,.handsontable tr:first-child th.htNoFrame{border-left-width:0;background-color:#fff;border-color:#fff}.handsontable .htNoFrame+td,.handsontable .htNoFrame+th,.handsontable td:first-child,.handsontable th:first-child{border-left:1px solid #ccc}.handsontable tr:first-child td,.handsontable tr:first-child th{border-top:1px solid #ccc}.handsontable thead tr.lastChild th,.handsontable thead tr:last-child th{border-bottom-width:0}.handsontable th{background-color:#eee;color:#222;text-align:center;font-weight:400;white-space:nowrap}.handsontable thead th{padding:0}.handsontable th.active{background-color:#ccc}.handsontable thead th .relative{padding:2px 4px}.handsontable .manualColumnMover{left:0;width:5px;height:25px}.handsontable .manualColumnMover,.handsontable .manualRowMover{position:fixed;top:0;background-color:transparent;z-index:999;cursor:move}.handsontable .manualRowMover{left:-4px;height:5px;width:50px}.handsontable .manualColumnMoverGuide,.handsontable .manualRowMoverGuide{position:fixed;left:0;top:0;background-color:#ccc;width:25px;height:25px;opacity:.7;display:none}.handsontable .manualColumnMoverGuide.active,.handsontable .manualRowMoverGuide.active{display:block}.handsontable .manualColumnMover.active,.handsontable .manualColumnMover:hover,.handsontable .manualRowMover.active,.handsontable .manualRowMover:hover{background-color:#88f}.handsontable .manualColumnResizer{position:fixed;top:0;cursor:col-resize;z-index:110;width:5px;height:25px}.handsontable .manualRowResizer{position:fixed;left:0;cursor:row-resize;z-index:110;height:5px;width:50px}.handsontable .manualColumnResizer.active,.handsontable .manualColumnResizer:hover,.handsontable .manualRowResizer.active,.handsontable .manualRowResizer:hover{background-color:#aab}.handsontable .manualColumnResizerGuide{position:fixed;right:0;top:0;background-color:#aab;display:none;width:0;border-right:1px dashed #777;margin-left:5px}.handsontable .manualRowResizerGuide{position:fixed;left:0;bottom:0;background-color:#aab;display:none;height:0;border-bottom:1px dashed #777;margin-top:5px}.handsontable .manualColumnResizerGuide.active,.handsontable .manualRowResizerGuide.active{display:block}.handsontable .columnSorting:hover{text-decoration:underline;cursor:pointer}.handsontable .wtBorder{position:absolute;font-size:0}.handsontable .wtBorder.hidden{display:none!important}.handsontable td.area{background-color:#eef4ff}.handsontable .wtBorder.corner{font-size:0;cursor:crosshair}.handsontable .htBorder.htFillBorder{background:red;width:1px;height:1px}.handsontableInput{border:2px solid #5292f7;outline-width:0;margin:0;padding:1px 4px 0 2px;font-family:inherit;line-height:inherit;font-size:inherit;box-shadow:1px 2px 5px rgba(0,0,0,.4);resize:none;display:inline-block;color:#000;border-radius:0;background-color:#fff}.handsontableInputHolder{position:absolute;top:0;left:0;z-index:100}.htSelectEditor{-webkit-appearance:menulist-button!important;position:absolute}.handsontable .htDimmed{color:#777}.handsontable .htSubmenu :after{content:'\\25B6';color:#777;position:absolute;right:5px}.handsontable .htLeft{text-align:left}.handsontable .htCenter{text-align:center}.handsontable .htRight{text-align:right}.handsontable .htJustify{text-align:justify}.handsontable .htTop{vertical-align:top}.handsontable .htMiddle{vertical-align:middle}.handsontable .htBottom{vertical-align:bottom}.handsontable .htPlaceholder{color:#999}.handsontable .htAutocompleteArrow{float:right;font-size:10px;color:#eee;cursor:default;width:16px;text-align:center}.handsontable td .htAutocompleteArrow:hover{color:#777}.handsontable .htCheckboxRendererInput.noValue{opacity:.5}.handsontable .htNumeric{text-align:right}.htCommentCell{position:relative}.htCommentCell:after{content:'';position:absolute;top:0;right:0;border-left:6px solid transparent;border-top:6px solid red}.handsontable .handsontable .wtHider{padding:0 0 5px}.handsontable .handsontable table{box-shadow:1px 2px 5px rgba(0,0,0,.4)}.handsontable .autocompleteEditor.handsontable{padding-right:17px}.handsontable .autocompleteEditor.handsontable.htMacScroll{padding-right:15px}.handsontable.listbox{margin:0}.handsontable.listbox .ht_master table{border:1px solid #ccc;border-collapse:separate;background:#fff}.handsontable.listbox td,.handsontable.listbox th,.handsontable.listbox tr:first-child td,.handsontable.listbox tr:first-child th,.handsontable.listbox tr:last-child th{border-width:0}.handsontable.listbox td,.handsontable.listbox th{white-space:nowrap;text-overflow:ellipsis}.handsontable.listbox td.htDimmed{cursor:default;color:inherit;font-style:inherit}.handsontable.listbox .wtBorder{visibility:hidden}.handsontable.listbox tr:hover td,.handsontable.listbox tr td.current{background:#eee}.htContextMenu{display:none;position:absolute;z-index:1060}.htContextMenu .ht_clone_corner,.htContextMenu .ht_clone_left,.htContextMenu .ht_clone_top{display:none}.ht_clone_top{z-index:101}.ht_clone_left{z-index:102}.ht_clone_corner{z-index:103}.htContextMenu table.htCore{outline:1px solid #bbb}.htContextMenu .wtBorder{visibility:hidden}.htContextMenu table tbody tr td{background:#fff;border-width:0;padding:4px 6px 0;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.htContextMenu table tbody tr td:first-child{border:0}.htContextMenu table tbody tr td.htDimmed{font-style:normal;color:#323232}.htContextMenu table tbody tr td.current{background:#e9e9e9}.htContextMenu table tbody tr td.htSeparator{border-top:1px solid #bbb;height:0;padding:0}.htContextMenu table tbody tr td.htDisabled{color:#999}.htContextMenu table tbody tr td.htDisabled:hover{background:#fff;color:#999;cursor:default}.htContextMenu table tbody tr td div{padding-left:10px}.htContextMenu table tbody tr td div span.selected{margin-top:-2px;position:absolute;left:4px}.handsontable td.htSearchResult{background:#fcedd9;color:#583707}.htBordered{border-width:1px}.htBordered.htTopBorderSolid{border-top-style:solid;border-top-color:#000}.htBordered.htRightBorderSolid{border-right-style:solid;border-right-color:#000}.htBordered.htBottomBorderSolid{border-bottom-style:solid;border-bottom-color:#000}.htBordered.htLeftBorderSolid{border-left-style:solid;border-left-color:#000}.htCommentTextArea{background-color:#fffacd;box-shadow:1px 1px 2px #bbb;font-family:Arial;-webkit-box-shadow:1px 1px 2px #bbb;-moz-box-shadow:1px 1px 2px #bbb}.wtDebugHidden{display:none}.wtDebugVisible{display:block;-webkit-animation-duration:.5s;-webkit-animation-name:wtFadeInFromNone;animation-duration:.5s;animation-name:wtFadeInFromNone}@keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}@-webkit-keyframes wtFadeInFromNone{0%{display:none;opacity:0}1%{display:block;opacity:0}to{display:block;opacity:1}}",""])},function(t,e,n){var o=n(318);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".bootstrap-table .table{margin-bottom:0!important;border-bottom:1px solid #ddd;border-collapse:collapse!important;border-radius:1px}.bootstrap-table .table,.table>tbody>tr>td,.table>tbody>tr>th,.table>tfoot>tr>td,.table>tfoot>tr>th,.table>thead>tr>td{padding:8px!important}.fixed-table-container{position:relative;clear:both;border:1px solid #ddd;border-radius:4px;-webkit-border-radius:4px;-moz-border-radius:4px}.fixed-table-footer,.fixed-table-header{height:37px;overflow:hidden;border-radius:4px 4px 0 0;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0}.fixed-table-header{border-bottom:1px solid #ddd}.fixed-table-footer{border-top:1px solid #ddd}.fixed-table-body{overflow-x:auto;overflow-y:auto;height:100%}.fixed-table-container table{width:100%}.fixed-table-container thead th{height:0;padding:0;margin:0;border-left:1px solid #ddd}.fixed-table-container thead th:first-child{border-left:none;border-top-left-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px}.fixed-table-container thead th .th-inner{padding:8px;line-height:24px;vertical-align:top;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fixed-table-container thead th .sortable{cursor:pointer}.fixed-table-container tbody td{border-left:1px solid #ddd}.fixed-table-container tbody tr:first-child td{border-top:none}.fixed-table-container tbody td:first-child{border-left:none}.fixed-table-container tbody .selected td{background-color:#f5f5f5}.fixed-table-container .bs-checkbox{text-align:center}.fixed-table-container .bs-checkbox .th-inner{padding:8px 0}.fixed-table-container input[type=checkbox],.fixed-table-container input[type=radio]{margin:0 auto!important}.fixed-table-container .no-records-found{text-align:center}.fixed-table-pagination .pagination,.fixed-table-pagination .pagination-detail{margin-top:10px;margin-bottom:10px}.fixed-table-pagination .pagination a{padding:6px 12px;line-height:1.428571429}.fixed-table-pagination .pagination-info{line-height:34px;margin-right:5px}.fixed-table-pagination .btn-group{position:relative;display:inline-block;vertical-align:middle}.fixed-table-pagination .dropup .dropdown-menu{margin-bottom:0}.fixed-table-pagination .page-list{display:inline-block}.fixed-table-toolbar .columns-left{margin-right:5px}.fixed-table-toolbar .columns-right{margin-left:5px}.fixed-table-toolbar .columns label{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.428571429}.fixed-table-toolbar .bars,.fixed-table-toolbar .columns,.fixed-table-toolbar .search{position:relative;margin-top:10px;margin-bottom:10px;line-height:34px}.fixed-table-pagination li.disabled a{pointer-events:none;cursor:default}.fixed-table-loading{display:none;position:absolute;top:42px;right:0;bottom:0;left:0;z-index:99;background-color:#fff;text-align:center}.fixed-table-body .card-view .title{font-weight:700;display:inline-block;min-width:30%;text-align:left!important}.fixed-table-body thead th .th-inner,.table td,.table th{box-sizing:border-box}.table td,.table th{vertical-align:middle}.fixed-table-toolbar .dropdown-menu{text-align:left;max-height:300px;overflow:auto}.fixed-table-toolbar .btn-group>.btn-group{display:inline-block;margin-left:-1px!important}.fixed-table-toolbar .btn-group>.btn-group>.btn{border-radius:0}.fixed-table-toolbar .btn-group>.btn-group:first-child>.btn{border-top-left-radius:4px;border-bottom-left-radius:4px}.fixed-table-toolbar .btn-group>.btn-group:last-child>.btn{border-top-right-radius:4px;border-bottom-right-radius:4px}.bootstrap-table .table>thead>tr>th{vertical-align:bottom;border-bottom:2px solid #ddd}.bootstrap-table .table thead>tr>th{padding:0;margin:0}.pull-right .dropdown-menu{right:0;left:auto}p.fixed-table-scroll-inner{width:100%;height:200px}div.fixed-table-scroll-outer{top:0;left:0;visibility:hidden;width:200px;height:150px;overflow:hidden}",""])},function(t,e,n){var o=n(320);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:700;line-height:20px;color:#999;text-shadow:0 1px 0 hsla(0,0%,100%,.5);text-transform:uppercase}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,.2);font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:14px;*border-right-width:2px;*border-bottom-width:2px;border-radius:6px;box-shadow:0 5px 10px rgba(0,0,0,.2);background-clip:padding-box;text-align:left}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;*border-bottom:1px solid #fff}.dropdown-menu a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;text-decoration:none}.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{filter:progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:focus,.dropdown-menu li>a:hover,.dropdown-submenu:hover>a{color:#fff;text-decoration:none;background-color:#08c;background-color:#0081c2;background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(180deg,#08c,#0077b3);background-repeat:repeat-x}.dropdown-menu .active>a,.dropdown-menu .active>a:hover{background-image:-o-linear-gradient(top,#08c,#0077b3);outline:0}.dropdown-menu .disabled>a,.dropdown-menu .disabled>a:hover{color:#999}.dropdown-menu .disabled>a:hover{text-decoration:none;cursor:default;background-color:transparent}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:\"\\2191\"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;border-radius:0 6px 6px 6px}.dropdown-submenu>.dropdown-menu.drop-left{left:-80%}.dropdown-submenu:hover .dropdown-menu{display:block}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:\" \"}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.dropdown-context .nav-header{cursor:default}.dropdown-context-up:before,.dropdown-context:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,.2);content:''}.dropdown-context-up:after,.dropdown-context:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.dropdown-context-up:after,.dropdown-context-up:before{top:auto;bottom:-7px;z-index:9999}.dropdown-context-up:before{border-right:7px solid transparent;border-top:7px solid #ccc;border-bottom:none;border-left:7px solid transparent}.dropdown-context-up:after{border-right:6px solid transparent;border-top:6px solid #fff;border-left:6px solid transparent;border-bottom:none}.dropdown-context-sub:after,.dropdown-context-sub:before,.dropdown-context .dropdown-submenu:hover .dropdown-menu,.dropdown-context .dropdown-submenu:hover>.dropdown-menu{display:none}.compressed-context a{padding-left:14px;padding-top:0;padding-bottom:0;font-size:13px}.compressed-context .divider{margin:5px 1px}.compressed-context .nav-header{padding:1px 13px}",""]); +},function(t,e,n){var o=n(322);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".rule-delete{color:#f44336;vertical-align:text-top;cursor:pointer}.rule-text-editor{width:260px;display:inline-block;height:26px;padding:3px}.rule-property{padding-right:10px;padding-left:10px;line-height:28px;display:inline-block;border:1px solid gray;margin-left:5px}.rule-add-property{cursor:pointer;padding-left:10px;line-height:30px;color:blue}.rule-property-del{padding:5px;cursor:pointer;color:#ff0600}.rule-add-action{color:blue;cursor:pointer;padding-left:5px;padding-bottom:5px}.rule-action{padding:1px;line-height:27px}.rule-delete-action{font-size:10pt;cursor:pointer;color:#ff9800}.rule-join-node{color:#795548;font-size:10pt;vertical-align:text-top;margin-left:2px}.rule-join-container{border:1px solid #999;padding:1px;background:#fff}",""])},function(t,e){"use strict";!function(t){window.URule||(window.URule={}),URule.setDomContent=function(t,e){navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent",e):t.prop("innerText",e)},URule.getDomContent=function(t){return navigator.userAgent.indexOf("Firefox")>0?t.prop("textContent"):t.prop("innerText")}}($)},function(t,e,n){var o,i,r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};window.Handsontable={plugins:{},helper:{}},function(t,n,o){"use strict";function i(){this.refCounter=0,this.init()}function a(){function t(){var t=this;t._registerTimeout(setTimeout(function(){t.updateSettings({observeChanges:!0})},0))}function e(t){return function(e,n){return e[1]===n[1]?0:null===e[1]?1:null===n[1]?-1:e[1]n[1]?t?1:-1:0}}function n(t){return function(e,n){if(e[1]===n[1])return 0;if(null===e[1])return 1;if(null===n[1])return-1;var o=new Date(e[1]),i=new Date(n[1]);return oi?t?1:-1:0}}function i(t){return"undefined"!=typeof t.sortColumn}var r=this;this.init=function(e){var n,o,i=this,a=i.getSettings().columnSorting;if(i.sortingEnabled=!!a,i.sortingEnabled){i.sortIndex=[];var A=s.call(i);"undefined"!=typeof A?(n=A.sortColumn,o=A.sortOrder):(n=a.column,o=a.sortOrder),r.sortByColumn.call(i,n,o),i.sort=function(){var t=Array.prototype.slice.call(arguments);return r.sortByColumn.apply(i,t)},"undefined"==typeof i.getSettings().observeChanges&&t.call(i),"afterInit"==e&&(l.call(i),i.addHook("afterCreateRow",r.afterCreateRow),i.addHook("afterRemoveRow",r.afterRemoveRow),i.addHook("afterLoadData",r.init))}else delete i.sort,i.removeHook("afterCreateRow",r.afterCreateRow),i.removeHook("afterRemoveRow",r.afterRemoveRow),i.removeHook("afterLoadData",r.init)},this.setSortingColumn=function(t,e){var n=this;return"undefined"==typeof t?(delete n.sortColumn,void delete n.sortOrder):(n.sortColumn===t&&"undefined"==typeof e?n.sortOrder=!n.sortOrder:n.sortOrder="undefined"==typeof e||e,void(n.sortColumn=t))},this.sortByColumn=function(t,e){var n=this;r.setSortingColumn.call(n,t,e),"undefined"!=typeof n.sortColumn&&(o.hooks.run(n,"beforeColumnSort",n.sortColumn,n.sortOrder),r.sort.call(n),n.render(),a.call(n),o.hooks.run(n,"afterColumnSort",n.sortColumn,n.sortOrder))};var a=function(){var t=this,e={};"undefined"!=typeof t.sortColumn&&(e.sortColumn=t.sortColumn),"undefined"!=typeof t.sortOrder&&(e.sortOrder=t.sortOrder),(e.hasOwnProperty("sortColumn")||e.hasOwnProperty("sortOrder"))&&o.hooks.run(t,"persistentStateSave","columnSorting",e)},s=function(){var t=this,e={};return o.hooks.run(t,"persistentStateLoad","columnSorting",e),e.value},l=function(){function t(){var t=n.view.TBODY.querySelector("tr").querySelectorAll("th");return t.length}function e(e){var n=o.Dom.closest(e,"TH");return o.Dom.index(n)-t()}var n=this;n.rootElement.on("click.handsontable",".columnSorting",function(t){if(o.Dom.hasClass(t.target,"columnSorting")){var i=e(t.target);r.sortByColumn.call(n,i)}})};this.sort=function(){var t=this;if("undefined"!=typeof t.sortOrder){t.sortingEnabled=!1,t.sortIndex.length=0;for(var o=this.colOffset(),i=0,r=this.countRows()-t.getSettings().minSpareRows;i=t&&(n.sortIndex[o][0]+=e);for(var o=0;oo&&(n.sortIndex[s][0]-=e);a.call(n)}},this.afterChangeSort=function(t){var e=this,n=!1,o={};if(t){for(var i=0;i1&&i(n,a,e),s(),r()}}t(document).on("mousedown.htCommment",o.helper.proxy(a))},s=function(){t(document).off("mousedown.htCommment"),t(document).on("mouseover.htCommment",o.helper.proxy(c))},l=function(t,n){var i=e.view.wt.wtTable.getCell(t.from),r=o.Dom.offset(i),s=e.getColWidth(t.from.col);n.style.position="absolute",n.style.left=r.left+s+"px",n.style.top=r.top+"px",n.style.zIndex=2,a(t,n)},A=function(t){var e=document.getElementsByClassName("htComments")[0];if(!e){e=document.createElement("DIV");var n=document.createElement("TEXTAREA");o.Dom.addClass(n,"htCommentTextArea"),e.appendChild(n),o.Dom.addClass(e,"htComments"),document.getElementsByTagName("body")[0].appendChild(e)}return t=t||"",document.getElementsByClassName("htCommentTextArea")[0].value=t,e},c=function(t){if(t.target.className.indexOf("htCommentCell")!=-1){s();var n=e.view.wt.wtTable.getCoords(t.target),i={from:new p(n.row,n.col)};o.Comments.showComment(i)}else"htCommentTextArea"!=t.target.className&&r()};return{init:function(){t(document).on("mouseover.htCommment",o.helper.proxy(c))},showComment:function(t){var n=e.getCellMeta(t.from.row,t.from.col),o="";n.comment&&(o=n.comment);var i=A(o);i.style.display="block",l(t,i)},removeComment:function(t,n){e.removeCellMeta(t,n,"comment"),e.render()},checkSelectionCommentsConsistency:function(){var t=!1,n=e.getSelectedRange().from;return e.getCellMeta(n.row,n.col).comment&&(t=!0),t}}}function l(t){var e,o=function(){n.localStorage[t+"__persistentStateKeys"]=JSON.stringify(e)},i=function(){var o=n.localStorage[t+"__persistentStateKeys"],i="string"==typeof o?JSON.parse(o):void 0;e=i?i:[]},r=function(){e=[],o()};i(),this.saveValue=function(i,r){n.localStorage[t+"_"+i]=JSON.stringify(r),e.indexOf(i)==-1&&(e.push(i),o())},this.loadValue=function(e,o){e="undefined"!=typeof e?e:o;var i=n.localStorage[t+"_"+e];return"undefined"==typeof i?void 0:JSON.parse(i)},this.reset=function(e){n.localStorage.removeItem(t+"_"+e)},this.resetAll=function(){for(var o=0;o=t&&this[n].col<=e&&this[n].col+this[n].colspan-1>=e)return this[n]},t.setInfo=function(t){for(var e=0,n=this.length;eMath.ceil(o.top+o.height)||(t.clientXMath.ceil(o.left+o.width)||void 0)))};A.on("mousemove.border."+e.guid,function(t){r(t)&&(A.off("mousemove.border."+e.guid),i.show())})}})}}function p(t,e){"undefined"!=typeof t&&"undefined"!=typeof e?(this.row=t,this.col=e):(this.row=null,this.col=null)}function f(t,e,n){this.highlight=t,this.from=e,this.to=n}function M(){this.cache=[]}function w(t,e){this.total=t,this.countTH=e}function T(t,e,n,o){var i,r=0;for(g.apply(this,arguments),this.containerSizeFn=e,this.cellSizesSum=0,this.cellSizes=[],this.cellStretch=[],this.cellCount=0,this.visibleCellCount=0,this.remainingSize=0,this.strategy=o;;){if(i=n(r),void 0===i)break;this.cellSizesSum-5&&t.clientX-i<5&&t.clientY-r>-5&&t.clientY-r<5||(i=t.clientX,r=t.clientY,o.Dom.addClass(a,"wtDebugHidden"),o.Dom.removeClass(a,"wtDebugVisible"),clearTimeout(this.lastTimeout),this.lastTimeout=setTimeout(function(){o.Dom.removeClass(a,"wtDebugHidden"),o.Dom.addClass(a,"wtDebugVisible")},1e3)))})}function I(e){var i=this;this.instance=e;var r=[null,null];this.dblClickTimeout=[null,null];var a,s=function(t){var e=i.parentCell(t.target);o.Dom.hasClass(t.target,"corner")?i.instance.getSetting("onCellCornerMouseDown",t,t.target):e.TD&&i.instance.hasSetting("onCellMouseDown")&&i.instance.getSetting("onCellMouseDown",t,e.coords,e.TD,i.instance),2!==t.button&&e.TD&&(r[0]=e.TD,clearTimeout(i.dblClickTimeout[0]),i.dblClickTimeout[0]=setTimeout(function(){r[0]=null},1e3))},l=function(t){if(i.instance.hasSetting("onCellMouseOver")){var e=i.instance.wtTable.TABLE,n=o.Dom.closest(t.target,["TD","TH"],e);n&&n!==a&&o.Dom.isChildOf(n,e)&&(a=n,i.instance.getSetting("onCellMouseOver",t,i.instance.wtTable.getCoords(n),n,i.instance))}},A=function(t){if(2!==t.button){var e=i.parentCell(t.target);e.TD===r[0]&&e.TD===r[1]?(o.Dom.hasClass(t.target,"corner")?i.instance.getSetting("onCellCornerDblClick",t,e.coords,e.TD,i.instance):i.instance.getSetting("onCellDblClick",t,e.coords,e.TD,i.instance),r[0]=null,r[1]=null):e.TD===r[0]&&(r[1]=e.TD,clearTimeout(i.dblClickTimeout[1]),i.dblClickTimeout[1]=setTimeout(function(){r[1]=null},500))}};t(this.instance.wtTable.holder).on("mousedown",s),t(this.instance.wtTable.TABLE).on("mouseover",l),t(this.instance.wtTable.holder).on("mouseup",A),t(n).on("resize."+this.instance.guid,function(){i.instance.draw()})}function E(){function t(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}return t()+t()+t()+t()}function m(t,e,n){this.offset=t,this.total=e,this.countTH=n}function N(t,e,n){g.apply(this,arguments),this.containerSizeFn=e,this.sizeAtIndex=n,this.cellSizesSum=0,this.cellSizes=[],this.cellCount=0,this.visiblCellCount=0,this.remainingSize=-(1/0),this.maxOuts=10,this.curOuts=this.maxOuts}function b(t){this.instance=t}function x(t){this.instance=t,this.type="corner",this.init(),this.clone=this.makeClone("corner")}function D(t){this.instance=t,this.type="horizontal",this.cellSize=50,this.offset=0,this.init(),this.clone=this.makeClone("left")}function v(t){this.instance=t,this.type="vertical",this.cellSize=this.instance.wtSettings.settings.defaultRowHeight,this.offset,this.total,this.init(),this.clone=this.makeClone("top")}function L(t){this.instance=t,t.update("scrollbarWidth",o.Dom.getScrollbarWidth()),t.update("scrollbarHeight",o.Dom.getScrollbarWidth()),this.vertical=new v(t),this.horizontal=new D(t),this.corner=new x(t),t.getSetting("debug")&&(this.debug=new y(t)),this.registerListeners()}function B(t,e){this.settings=t,this.cellRange=e||null,this.instanceBorders={}}function S(t,e){var n=this;this.instance=t,this.defaults={table:void 0,debug:!1,stretchH:"none",currentRowClassName:null,currentColumnClassName:null,data:void 0,offsetRow:0,fixedColumnsLeft:0,fixedRowsTop:0,rowHeaders:function(){return[]},columnHeaders:function(){return[]},totalRows:void 0,totalColumns:void 0,width:null,height:null,cellRenderer:function(t,e,i){var r=n.getSetting("data",t,e);o.Dom.fastInnerText(i,void 0===r||null===r?"":r)},columnWidth:50,rowHeight:function(t){return 23},defaultRowHeight:23,selections:null,hideBorderOnMouseDownOver:!1,onCellMouseDown:null,onCellMouseOver:null,onCellDblClick:null,onCellCornerMouseDown:null,onCellCornerDblClick:null,beforeDraw:null,onDraw:null,onBeforeDrawBorders:null,onScrollVertically:null,onScrollHorizontally:null,scrollbarWidth:10,scrollbarHeight:10,renderAllRows:!1},this.settings={};for(var i in this.defaults)if(this.defaults.hasOwnProperty(i))if(void 0!==e[i])this.settings[i]=e[i];else{if(void 0===this.defaults[i])throw new Error('A required setting "'+i+'" was not provided');this.settings[i]=this.defaults[i]}}function Q(t,e){this.instance=t,this.TABLE=e,o.Dom.removeTextNodes(this.TABLE);var n=this.TABLE.parentNode;if(!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var i=document.createElement("DIV");i.className="wtSpreader",n&&n.insertBefore(i,this.TABLE),i.appendChild(this.TABLE)}if(this.spreader=this.TABLE.parentNode,n=this.spreader.parentNode,!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var r=document.createElement("DIV");r.className="wtHider",n&&n.insertBefore(r,this.spreader),r.appendChild(this.spreader)}if(this.hider=this.spreader.parentNode,this.hiderStyle=this.hider.style,this.hiderStyle.position="relative",n=this.hider.parentNode,!n||1!==n.nodeType||!o.Dom.hasClass(n,"wtHolder")){var a=document.createElement("DIV");a.style.position="relative",a.className="wtHolder",t.cloneSource||(a.className+=" ht_master"),n&&n.insertBefore(a,this.hider),a.appendChild(this.hider)}if(this.holder=this.hider.parentNode,this.TBODY=this.TABLE.getElementsByTagName("TBODY")[0],this.TBODY||(this.TBODY=document.createElement("TBODY"),this.TABLE.appendChild(this.TBODY)),this.THEAD=this.TABLE.getElementsByTagName("THEAD")[0],this.THEAD||(this.THEAD=document.createElement("THEAD"),this.TABLE.insertBefore(this.THEAD,this.TBODY)),this.COLGROUP=this.TABLE.getElementsByTagName("COLGROUP")[0],this.COLGROUP||(this.COLGROUP=document.createElement("COLGROUP"),this.TABLE.insertBefore(this.COLGROUP,this.THEAD)),this.instance.getSetting("columnHeaders").length&&!this.THEAD.childNodes.length){var s=document.createElement("TR");this.THEAD.appendChild(s)}this.colgroupChildrenLength=this.COLGROUP.childNodes.length,this.theadChildrenLength=this.THEAD.firstChild?this.THEAD.firstChild.childNodes.length:0,this.tbodyChildrenLength=this.TBODY.childNodes.length,this.oldCellCache=new M,this.currentCellCache=new M,this.rowFilter=null,this.columnFilter=null,this.columnWidthCache=[]}function j(t){this.wtTable=t,this.instance=t.instance,this.rowFilter=t.rowFilter,this.columnFilter=t.columnFilter,this.TABLE=t.TABLE,this.THEAD=t.THEAD,this.TBODY=t.TBODY,this.COLGROUP=t.COLGROUP,this.utils=j.utils}function U(e){this.instance=e,this.resetSettings();var o=this;t(n).on("resize.walkontable."+this.instance.guid,function(){o.clientHeight=o.getWorkspaceHeight()})}Array.prototype.indexOf||(Array.prototype.indexOf=function(t){var e=this.length>>>0,n=Number(arguments[1])||0;for(n=n<0?Math.ceil(n):Math.floor(n),n<0&&(n+=e);n>>0)+(o++ +"__"),e||(this._wmCache=[])};e?i.prototype={set:function(e,n){var o=e[this.name];o&&o[0]===e?o[1]=n:t(e,this.name,{value:[e,n],writable:!0})},get:function(t){var e;return(e=t[this.name])&&e[0]===t?e[1]:void 0},delete:function(t){this.set(t,void 0)}}:i.prototype={set:function(t,e){if("undefined"!=typeof t&&"undefined"!=typeof e){for(var n=0,o=this._wmCache.length;n=0;l--)if(null===e[l])e.splice(l,1);else{var A=e[l][0],c=M.propToCol(e[l][1]),u=y.runHooksAndReturn("modifyCol",c),d=y.getCellMeta(A,u);if("numeric"===d.type&&"string"==typeof e[l][3]&&e[l][3].length>0&&/^-?[\d\s]*(\.|\,)?\d*$/.test(e[l][3])){var g=e[l][3].length;"undefined"==typeof d.language?numeral.language("en"):e[l][3].indexOf(".")===g-3&&e[l][3].indexOf(",")===-1?numeral.language("en"):numeral.language(d.language),e[l][3]=numeral().unformat(e[l][3]||"0")}y.getCellValidator(d)&&(s.addValidatorToQueue(),y.validateCell(e[l][3],d,function(t,n){return function(o){if("boolean"!=typeof o)throw new Error("Validation error: result is not boolean");o===!1&&n.allowInvalid===!1&&(e.splice(t,1),n.valid=!0,--t),s.removeValidatorFormQueue()}}(l,d),n))}s.checkIfQueueIsEmpty()}function l(t,e){var n=t.length-1;if(!(n<0)){for(;0<=n;n--)if(null!==t[n]){if(null!=t[n][2]||null!=t[n][3]){if(h.settings.minSpareRows)for(;t[n][0]>y.countRows()-1;)M.createRow();if("array"===y.dataType&&h.settings.minSpareCols)for(;M.propToCol(t[n][1])>y.countCols()-1;)M.createCol();M.set(t[n][0],t[n][1],t[n][3])}}else t.splice(n,1);y.forceFullRender=!0,w.adjustRowsAndCols(),o.hooks.run(y,"beforeChangeRender",t,e),T.refreshBorders(null,!0),o.hooks.run(y,"afterChange",t,e||"edit")}}function A(e,n,o){return"object"===("undefined"==typeof e?"undefined":r(e))?e:t.isPlainObject(o)?o:[[e,n,o]]}function c(t){if(t.hasOwnProperty("type")){var e,n={};if("object"===r(t.type))e=t.type;else if("string"==typeof t.type&&(e=o.cellTypes[t.type],void 0===e))throw new Error('You declared cell type "'+t.type+'" as a string that is not mapped to a known object. Cell type must be an object or a string mapped to an object in Handsontable.cellTypes');for(var i in e)e.hasOwnProperty(i)&&!t.hasOwnProperty(i)&&(n[i]=e[i]);return n}}function u(t){return o.hooks.execute(y,"modifyRow",t)}function d(t){return o.hooks.execute(y,"modifyCol",t)}function g(){throw new Error("This method cannot be called because this Handsontable instance has been destroyed")}var h,M,w,T,C,y=this,I=function(){},E=t(document.documentElement),m=t(document.body);o.helper.extend(I.prototype,k.prototype),o.helper.extend(I.prototype,i),o.helper.extend(I.prototype,c(i)),this.rootElement=e,this.container=document.createElement("DIV"),this.container.className="htContainer",e.prepend(this.container),this.container=t(this.container),this.guid="ht_"+o.helper.randomString(),this.rootElement[0].id||(this.rootElement[0].id=this.guid),h={cellSettings:[],columnSettings:[],columnsSettingConflicts:["data","width"],settings:new I,selRange:null,isPopulated:null,scrollable:null,firstRun:!0},w={alter:function(t,e,n,i,r){var a;switch(n=n||1,t){case"insert_row":a=M.createRow(e,n),a&&(T.isSelected()&&h.selRange.from.row>=e?(h.selRange.from.row=h.selRange.from.row+a,T.transformEnd(a,0)):T.refreshBorders());break;case"insert_col":if(a=M.createCol(e,n)){if(o.helper.isArray(y.getSettings().colHeaders)){var s=[e,0];s.length+=a,Array.prototype.splice.apply(y.getSettings().colHeaders,s)}T.isSelected()&&h.selRange.from.col>=e?(h.selRange.from.col=h.selRange.from.col+a,T.transformEnd(0,a)):T.refreshBorders()}break;case"remove_row":M.removeRow(e,n),h.cellSettings.splice(e,n),w.adjustRowsAndCols(),T.refreshBorders();break;case"remove_col":M.removeCol(e,n);for(var l=0,A=M.getAll().length;li-1?(s=i-1,a=!0,A>s&&(A=s)):A>i-1&&(A=i-1,a=!0,s>A&&(s=A)),l>r-1?(l=r-1,a=!0,c>l&&(c=l)):c>r-1&&(c=r-1,a=!0,l>c&&(l=c)),a&&y.selectCell(s,l,A,c)}},populateFromArray:function(t,e,n,i,r){var a,s,l,A,c=[],u={};if(s=e.length,0===s)return!1;var d,g,p,f;switch(r){case"shift_down":for(d=n?n.col-t.col+1:0,g=n?n.row-t.row+1:0,e=o.helper.translateRowsToColumns(e),l=0,A=e.length,p=Math.max(A,d);ln.row||!h.settings.minSpareRows&&u.row>y.countRows()-1||u.row>=h.settings.maxRows);a++){for(u.col=t.col,A=e[a]?e[a].length:0,l=0;ln.col||!h.settings.minSpareCols&&u.col>y.countCols()-1||u.col>=h.settings.maxCols);l++)y.getCellMeta(u.row,u.col).readOnly||c.push([u.row,u.col,e[a][l]]),u.col++,n&&l===A-1&&(l=-1);u.row++,n&&a===s-1&&(a=-1)}y.setDataAtCell(c,null,null,i||"populateFromArray")}}},this.selection=T={inProgress:!1,begin:function(){y.selection.inProgress=!0},finish:function(){var t=y.getSelected();o.hooks.run(y,"afterSelectionEnd",t[0],t[1],t[2],t[3]),o.hooks.run(y,"afterSelectionEndByProp",t[0],y.colToProp(t[1]),t[2],y.colToProp(t[3])),y.selection.inProgress=!1},isInProgress:function(){return y.selection.inProgress},setRangeStart:function(t){o.hooks.run(y,"beforeSetRangeStart",t),h.selRange=new f(t,t,t),T.setRangeEnd(t)},setRangeEnd:function(t,e){o.hooks.run(y,"beforeSetRangeEnd",t),y.selection.begin(),h.selRange.to=t,h.settings.multiSelect||(h.selRange.from=t),y.view.wt.selections.current.clear(),y.view.wt.selections.current.add(h.selRange.highlight),y.view.wt.selections.area.clear(),T.isMultiple()&&(y.view.wt.selections.area.add(h.selRange.from),y.view.wt.selections.area.add(h.selRange.to)),(h.settings.currentRowClassName||h.settings.currentColClassName)&&(y.view.wt.selections.highlight.clear(),y.view.wt.selections.highlight.add(h.selRange.from),y.view.wt.selections.highlight.add(h.selRange.to)),o.hooks.run(y,"afterSelection",h.selRange.from.row,h.selRange.from.col,h.selRange.to.row,h.selRange.to.col),o.hooks.run(y,"afterSelectionByProp",h.selRange.from.row,M.colToProp(h.selRange.from.col),h.selRange.to.row,M.colToProp(h.selRange.to.col)),e!==!1&&y.view.mainViewIsActive()&&y.view.scrollViewport(t),T.refreshBorders()},refreshBorders:function(t,e){e||C.destroyEditor(t),y.view.render(),T.isSelected()&&!e&&C.prepareEditor()},isMultiple:function t(){var t=!(h.selRange.to.col===h.selRange.from.col&&h.selRange.to.row===h.selRange.from.row),e=o.hooks.execute(y,"afterIsMultipleSelection",t);if(t)return e},transformStart:function(t,e,n){var o=new p(t,e);y.runHooks("modifyTransformStart",o),h.selRange.highlight.row+t>y.countRows()-1?n&&h.settings.minSpareRows>0?y.alter("insert_row",y.countRows()):h.settings.autoWrapCol&&(o.row=1-y.countRows(),o.col=h.selRange.highlight.col+o.col==y.countCols()-1?1-y.countCols():1):h.settings.autoWrapCol&&h.selRange.highlight.row+o.row<0&&h.selRange.highlight.col+o.col>=0&&(o.row=y.countRows()-1,o.col=h.selRange.highlight.col+o.col==0?y.countCols()-1:-1),h.selRange.highlight.col+o.col>y.countCols()-1?n&&h.settings.minSpareCols>0?y.alter("insert_col",y.countCols()):h.settings.autoWrapRow&&(o.row=h.selRange.highlight.row+o.row==y.countRows()-1?1-y.countRows():1,o.col=1-y.countCols()):h.settings.autoWrapRow&&h.selRange.highlight.col+o.col<0&&h.selRange.highlight.row+o.row>=0&&(o.row=h.selRange.highlight.row+o.row==0?y.countRows()-1:-1,o.col=y.countCols()-1);var i=y.countRows(),r=y.countCols(),a=new p(h.selRange.highlight.row+o.row,h.selRange.highlight.col+o.col);a.row<0?a.row=0:a.row>0&&a.row>=i&&(a.row=i-1),a.col<0?a.col=0:a.col>0&&a.col>=r&&(a.col=r-1),T.setRangeStart(a)},transformEnd:function(t,e){var n=new p(t,e);y.runHooks("modifyTransformEnd",n);var o=y.countRows(),i=y.countCols(),r=new p(h.selRange.to.row+n.row,h.selRange.to.col+n.col);r.row<0?r.row=0:r.row>0&&r.row>=o&&(r.row=o-1),r.col<0?r.col=0:r.col>0&&r.col>=i&&(r.col=i-1),T.setRangeEnd(r)},isSelected:function(){return null!==h.selRange},inInSelection:function(t){return!!T.isSelected()&&h.selRange.includes(t)},deselect:function(){T.isSelected()&&(y.selection.inProgress=!1,h.selRange=null,y.view.wt.selections.current.clear(),y.view.wt.selections.area.clear(),(h.settings.currentRowClassName||h.settings.currentColClassName)&&y.view.wt.selections.highlight.clear(),C.destroyEditor(),T.refreshBorders(),o.hooks.run(y,"afterDeselect"))},selectAll:function(){h.settings.multiSelect&&(T.setRangeStart(new p(0,0)),T.setRangeEnd(new p(y.countRows()-1,y.countCols()-1),!1))},empty:function(){if(T.isSelected()){var t,e,n=h.selRange.getTopLeftCorner(),o=h.selRange.getBottomRightCorner(),i=[];for(t=n.row;t<=o.row;t++)for(e=n.col;e<=o.col;e++)y.getCellMeta(t,e).readOnly||i.push([t,e,""]);y.setDataAtCell(i)}}},this.init=function(){o.hooks.run(y,"beforeInit"),this.updateSettings(h.settings,!0),this.view=new o.TableView(this),C=new o.EditorManager(y,h,T,M),this.forceFullRender=!0,this.view.render(),"object"===r(h.firstRun)&&(o.hooks.run(y,"afterChange",h.firstRun[0],h.firstRun[1]),h.firstRun=!1),o.hooks.run(y,"afterInit")},this.validateCell=function(t,e,n,i){var r=y.getCellValidator(e);"[object RegExp]"===Object.prototype.toString.call(r)&&(r=function(t){return function(e,n){n(t.test(e))}}(r)),"function"==typeof r?(t=o.hooks.execute(y,"beforeValidate",t,e.row,e.prop,i),y._registerTimeout(setTimeout(function(){return r.call(e,t,function(r){e.valid=r,r=o.hooks.execute(y,"afterValidate",r,t,e.row,e.prop,i),n(r)}),t},0))):(e.valid=!0,n(!0))},this.setDataAtCell=function(t,e,n,o){var i,a,c,u=A(t,e,n),d=[];for(i=0,a=u.length;i0){var r,a;for(n=0;n=0;){for(var o=y.countCols()-1;o>=0;)e.addValidatorToQueue(),y.validateCell(y.getDataAtCell(n,o),y.getCellMeta(n,o),function(){e.removeValidatorFormQueue()},"validateCells"),o--;n--}e.checkIfQueueIsEmpty()},this.getRowHeader=function(t){if(void 0===t){for(var e=[],n=0,o=y.countRows();n=0;){if(e=o.hooks.execute(this,"modifyRow",n),y.isEmptyRow(e))i++;else if(t)break;n--}return i},this.countEmptyCols=function(t){if(y.countRows()<1)return 0;for(var e=y.countCols()-1,n=0;e>=0;){if(y.isEmptyCol(e))n++;else if(t)break;e--}return n},this.isEmptyRow=function(t){return h.settings.isEmptyRow.call(y,t)},this.isEmptyCol=function(t){return h.settings.isEmptyCol.call(y,t)},this.selectCell=function(t,e,n,o,i){if("number"!=typeof t||t<0||t>=y.countRows())return!1;if("number"!=typeof e||e<0||e>=y.countCols())return!1;if("undefined"!=typeof n){if("number"!=typeof n||n<0||n>=y.countRows())return!1;if("number"!=typeof o||o<0||o>=y.countCols())return!1}var r=new p(t,e);return h.selRange=new f(r,r,r),document.activeElement&&document.activeElement!==document.documentElement&&document.activeElement!==document.body&&document.activeElement.blur(),y.listen(),"undefined"==typeof n?T.setRangeEnd(h.selRange.from,i):T.setRangeEnd(new p(n,o),i),y.selection.finish(),!0},this.selectCellByProp=function(t,e,n,o,i){return arguments[1]=M.propToCol(arguments[1]),"undefined"!=typeof arguments[3]&&(arguments[3]=M.propToCol(arguments[3])),y.selectCell.apply(y,arguments)},this.deselectCell=function(){T.deselect()},this.destroy=function(){y._clearTimeouts(),y.view&&y.view.wt.destroy(),y.rootElement.empty(),y.rootElement.removeData("handsontable"),y.rootElement.off(".handsontable"),t(n).off("."+y.guid),E.off("."+y.guid),m.off("."+y.guid),o.hooks.run(y,"afterDestroy"),o.hooks.destroy(y);for(var e in y)y.hasOwnProperty(e)&&("function"==typeof y[e]?"runHooks"!==e&&"runHooksAndReturn"!==e&&(y[e]=g):"guid"!==e&&(y[e]=null));h=null,M=null,w=null,T=null,C=null,y=null,I=null,E=null,m=null},this.getActiveEditor=function(){return C.getActiveEditor()},this.getInstance=function(){return y},this.addHook=function(t,e){o.hooks.add(t,e,y)},this.addHookOnce=function(t,e){o.hooks.once(t,e,y)},this.removeHook=function(t,e){o.hooks.remove(t,e,y)},this.runHooks=function(t,e,n,i,r,a,s){o.hooks.run(y,t,e,n,i,r,a,s)},this.runHooksAndReturn=function(t,e,n,i,r,a,s){return o.hooks.execute(y,t,e,n,i,r,a,s)},this.timeouts=[],this._registerTimeout=function(t){this.timeouts.push(t)},this._clearTimeouts=function(){for(var t=0,e=this.timeouts.length;t1)for(e=1,n=arguments.length;e-1)return t;t=t.parentNode}return null},o.Dom.isChildOf=function(t,e){for(var n=t.parentNode;null!=n;){if(n==e)return!0;n=n.parentNode}return!1},o.Dom.index=function(t){for(var e=0;t=t.previousSibling;)++e;return e},document.documentElement.classList?(o.Dom.hasClass=function(t,e){return t.classList.contains(e)},o.Dom.addClass=function(t,e){t.classList.add(e)},o.Dom.removeClass=function(t,e){t.classList.remove(e)}):(o.Dom.hasClass=function(t,e){return t.className.match(new RegExp("(\\s|^)"+e+"(\\s|$)"))},o.Dom.addClass=function(t,e){""==t.className?t.className=e:this.hasClass(t,e)||(t.className+=" "+e)},o.Dom.removeClass=function(t,e){if(this.hasClass(t,e)){var n=new RegExp("(\\s|^)"+e+"(\\s|$)");t.className=t.className.replace(n," ").trim()}}),o.Dom.removeTextNodes=function(t,e){if(3===t.nodeType)e.removeChild(t);else if(["TABLE","THEAD","TBODY","TFOOT","TR"].indexOf(t.nodeName)>-1)for(var n=t.childNodes,o=n.length-1;o>=0;o--)this.removeTextNodes(n[o],t)},o.Dom.empty=function(t){for(var e;e=t.lastChild;)t.removeChild(e)},o.Dom.HTML_CHARACTERS=/(<(.*)>|&(.*);)/,o.Dom.fastInnerHTML=function(t,e){this.HTML_CHARACTERS.test(e)?t.innerHTML=e:this.fastInnerText(t,e)},document.createTextNode("test").textContent?o.Dom.fastInnerText=function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.textContent=e:(this.empty(t),t.appendChild(document.createTextNode(e)))}:o.Dom.fastInnerText=function(t,e){var n=t.firstChild;n&&3===n.nodeType&&null===n.nextSibling?n.data=e:(this.empty(t),t.appendChild(document.createTextNode(e)))},o.Dom.isVisible=function(t){for(var e=t;e!==document.documentElement;){if(null===e)return!1;if(11===e.nodeType){if(e.host){if(e.host.impl)return o.Dom.isVisible(e.host.impl);if(e.host)return o.Dom.isVisible(e.host);throw new Error("Lost in Web Components world")}return!1}if("none"===e.style.display)return!1;e=e.parentNode}return!0},o.Dom.offset=function(t){if(this.hasCaptionProblem()&&t.firstChild&&"CAPTION"===t.firstChild.nodeName){var e=t.getBoundingClientRect();return{top:e.top+(n.pageYOffset||document.documentElement.scrollTop)-(document.documentElement.clientTop||0),left:e.left+(n.pageXOffset||document.documentElement.scrollLeft)-(document.documentElement.clientLeft||0)}}for(var o=t.offsetLeft,i=t.offsetTop,r=t;(t=t.offsetParent)&&t!==document.body;)o+=t.offsetLeft,i+=t.offsetTop,r=t;return r&&"fixed"===r.style.position&&(o+=n.pageXOffset||document.documentElement.scrollLeft,i+=n.pageYOffset||document.documentElement.scrollTop),{left:o,top:i}},o.Dom.getWindowScrollTop=function(){var t=n.scrollY;return void 0==t&&(t=document.documentElement.scrollTop),t},o.Dom.getWindowScrollLeft=function(){var t=n.scrollX;return void 0==t&&(t=document.documentElement.scrollLeft),t},o.Dom.getScrollTop=function(t){return t===n?o.Dom.getWindowScrollTop(t):t.scrollTop},o.Dom.getScrollLeft=function(t){return t===n?o.Dom.getWindowScrollLeft(t):t.scrollLeft},o.Dom.getComputedStyle=function(t){return t.currentStyle||document.defaultView.getComputedStyle(t)},o.Dom.outerWidth=function(t){return t.offsetWidth},o.Dom.outerHeight=function(t){return this.hasCaptionProblem()&&t.firstChild&&"CAPTION"===t.firstChild.nodeName?t.offsetHeight+t.firstChild.offsetHeight:t.offsetHeight},o.Dom.innerHeight=function(t){return t.clientHeight},o.Dom.innerWidth=function(t){return t.innerWidth},function(){function t(){var t=document.createElement("TABLE");t.style.borderSpacing=0,t.style.borderWidth=0,t.style.padding=0;var e=document.createElement("TBODY");t.appendChild(e),e.appendChild(document.createElement("TR")),e.firstChild.appendChild(document.createElement("TD")),e.firstChild.firstChild.innerHTML="t
    t";var o=document.createElement("CAPTION");o.innerHTML="c
    c
    c
    c",o.style.padding=0,o.style.margin=0,t.insertBefore(o,e),document.body.appendChild(t),n=t.offsetHeight<2*t.lastChild.offsetHeight,document.body.removeChild(t)}function e(){var t=document.createElement("p");t.style.width="100%",t.style.height="200px";var e=document.createElement("div");e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.visibility="hidden",e.style.width="200px",e.style.height="150px",e.style.overflow="hidden",e.appendChild(t),(document.body||document.documentElement).appendChild(e);var n=t.offsetWidth;e.style.overflow="scroll";var o=t.offsetWidth;return n==o&&(o=e.clientWidth),(document.body||document.documentElement).removeChild(e),n-o}var n;o.Dom.hasCaptionProblem=function(){return void 0===n&&t(),n},o.Dom.getCaretPosition=function(t){if(t.selectionStart)return t.selectionStart;if(document.selection){t.focus();var e=document.selection.createRange();if(null==e)return 0;var n=t.createTextRange(),o=n.duplicate();return n.moveToBookmark(e.getBookmark()),o.setEndPoint("EndToStart",n),o.text.length}return 0},o.Dom.getSelectionEndPosition=function(t){if(t.selectionEnd)return t.selectionEnd;if(document.selection){var e=document.selection.createRange();if(null==e)return 0;var n=t.createTextRange();return n.text.indexOf(e.text)+e.text.length}},o.Dom.setCaretPosition=function(t,e,n){if(void 0===n&&(n=e),t.setSelectionRange)t.focus(),t.setSelectionRange(e,n);else if(t.createTextRange){var o=t.createTextRange();o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o.select()}};var i;o.Dom.getScrollbarWidth=function(){return void 0===i&&(i=e()),i}}(),o.TableView=function(e){var i=this,r=t(document.documentElement);this.instance=e,this.settings=e.getSettings(),e.rootElement.data("originalStyle",e.rootElement[0].getAttribute("style")),e.rootElement.addClass("handsontable");var a=document.createElement("TABLE");a.className="htCore",this.THEAD=document.createElement("THEAD"),a.appendChild(this.THEAD),this.TBODY=document.createElement("TBODY"),a.appendChild(this.TBODY),e.$table=t(a),e.container.prepend(e.$table),e.rootElement.on("mousedown.handsontable",function(t){i.isTextSelectionAllowed(t.target)||(l(),t.preventDefault(),n.focus())}),r.on("keyup."+e.guid,function(t){e.selection.isInProgress()&&!t.shiftKey&&e.selection.finish()});var s;this.isMouseDown=function(){return s},r.on("mouseup."+e.guid,function(t){e.selection.isInProgress()&&1===t.which&&e.selection.finish(),s=!1,o.helper.isOutsideInput(document.activeElement)&&e.unlisten()}),r.on("mousedown."+e.guid,function(t){var n=t.target;if(!n.shadowRoot){if(n!==i.wt.wtTable.spreader)for(;n!==document.documentElement;){if(null===n)return;if(n===e.rootElement[0])return;n=n.parentNode}i.settings.outsideClickDeselects?e.deselectCell():e.destroyEditor()}}),e.$table.on("selectstart",function(t){i.settings.fragmentSelection||t.preventDefault()});var l=function(){n.getSelection?n.getSelection().empty?n.getSelection().empty():n.getSelection().removeAllRanges&&n.getSelection().removeAllRanges():document.selection&&document.selection.empty()},A=[new B({className:"current",border:{width:2,color:"#5292F7",cornerVisible:function(){return i.settings.fillHandle&&!i.isCellEdited()&&!e.selection.isMultiple()}}}),new B({className:"area",border:{width:1,color:"#89AFF9",cornerVisible:function(){return i.settings.fillHandle&&!i.isCellEdited()&&e.selection.isMultiple()}}}),new B({className:"highlight",highlightRowClassName:i.settings.currentRowClassName,highlightColumnClassName:i.settings.currentColClassName}),new B({className:"fill",border:{width:1,color:"red"}})];A.current=A[0],A.area=A[1],A.highlight=A[2],A.fill=A[3];var c={debug:function(){return i.settings.debug},table:a,stretchH:this.settings.stretchH,data:e.getDataAtCell,totalRows:e.countRows,totalColumns:e.countCols,offsetRow:0,fixedColumnsLeft:function(){return i.settings.fixedColumnsLeft},fixedRowsTop:function(){return i.settings.fixedRowsTop},renderAllRows:i.settings.renderAllRows,rowHeaders:function(){return e.hasRowHeaders()?[function(t,e){i.appendRowHeader(t,e)}]:[]},columnHeaders:function(){return e.hasColHeaders()?[function(t,e){i.appendColHeader(t,e)}]:[]},columnWidth:e.getColWidth,rowHeight:e.getRowHeight,cellRenderer:function(t,e,n){var r=i.instance.colToProp(e),a=i.instance.getCellMeta(t,e),s=i.instance.getCellRenderer(a),l=i.instance.getDataAtRowProp(t,r);s(i.instance,n,t,e,r,l,a),o.hooks.run(i.instance,"afterRenderer",n,t,e,r,l,a)},selections:A,hideBorderOnMouseDownOver:function(){return i.settings.fragmentSelection},onCellMouseDown:function(t,n,r,a){e.listen(),i.activeWt=a,s=!0,2===t.button&&e.selection.inInSelection(n)||(t.shiftKey?n.row>=0&&n.col>=0&&e.selection.setRangeEnd(n):n.row<0||n.col<0?(n.row<0&&e.selectCell(0,n.col,e.countRows()-1,n.col),n.col<0&&e.selectCell(n.row,0,n.row,e.countCols()-1)):e.selection.setRangeStart(n)),o.hooks.run(e,"afterOnCellMouseDown",t,n,r),i.activeWt=i.wt},onCellMouseOver:function(t,n,r,a){i.activeWt=a,n.row>=0&&n.col>=0&&s&&e.selection.setRangeEnd(n),o.hooks.run(e,"afterOnCellMouseOver",t,n,r),i.activeWt=i.wt},onCellCornerMouseDown:function(t){t.preventDefault(),o.hooks.run(e,"afterOnCellCornerMouseDown",t)},beforeDraw:function(t){i.beforeRender(t)},onDraw:function(t){i.onDraw(t)},onScrollVertically:function(){e.runHooks("afterScrollVertically")},onScrollHorizontally:function(){e.runHooks("afterScrollHorizontally")},onBeforeDrawBorders:function(t,n){e.runHooks("beforeDrawBorders",t,n)}};o.hooks.run(e,"beforeInitWalkontable",c),this.wt=new C(c),this.activeWt=this.wt,t(i.wt.wtTable.spreader).on("mousedown.handsontable, contextmenu.handsontable",function(t){t.target===i.wt.wtTable.spreader&&3===t.which&&t.stopPropagation()}),r.on("click."+e.guid,function(){i.settings.observeDOMVisibility&&i.wt.drawInterrupted&&(i.instance.forceFullRender=!0,i.render())})},o.TableView.prototype.isTextSelectionAllowed=function(t){return!!o.helper.isInput(t)||!(!this.settings.fragmentSelection||!o.Dom.isChildOf(t,this.TBODY))},o.TableView.prototype.isCellEdited=function(){var t=this.instance.getActiveEditor();return t&&t.isOpened()},o.TableView.prototype.beforeRender=function(t){t&&o.hooks.run(this.instance,"beforeRender",this.instance.forceFullRender)},o.TableView.prototype.onDraw=function(t){t&&o.hooks.run(this.instance,"afterRender",this.instance.forceFullRender)},o.TableView.prototype.render=function(){this.wt.draw(!this.instance.forceFullRender),this.instance.forceFullRender=!1,this.instance.rootElement.triggerHandler("render.handsontable")},o.TableView.prototype.getCellAtCoords=function(t){var e=this.wt.wtTable.getCell(t);return e<0?null:e},o.TableView.prototype.scrollViewport=function(t){this.wt.scrollViewport(t)},o.TableView.prototype.appendRowHeader=function(t,e){var n=document.createElement("DIV"),i=document.createElement("SPAN");n.className="relative",i.className="rowHeader",t>-1?o.Dom.fastInnerHTML(i,this.instance.getRowHeader(t)):o.Dom.fastInnerText(i," "),n.appendChild(i),o.Dom.empty(e),e.appendChild(n),o.hooks.run(this.instance,"afterGetRowHeader",t,e)},o.TableView.prototype.appendColHeader=function(t,e){var n=document.createElement("DIV"),i=document.createElement("SPAN");n.className="relative",i.className="colHeader",o.Dom.fastInnerHTML(i,this.instance.getColHeader(t)),n.appendChild(i),o.Dom.empty(e),e.appendChild(n),o.hooks.run(this.instance,"afterGetColHeader",t,e)},o.TableView.prototype.maximumVisibleElementWidth=function(t){this.wt.wtScrollbars.horizontal.readWindowSize();var e=this.wt.wtViewport.getWorkspaceWidth(),n=e-t;return n>0?n:0},o.TableView.prototype.maximumVisibleElementHeight=function(t){this.wt.wtScrollbars.vertical.readWindowSize();var e=this.wt.wtViewport.getWorkspaceHeight(),n=e-t;return n>0?n:0},o.TableView.prototype.mainViewIsActive=function(){return this.wt===this.activeWt},function(t){function e(t){var e,n;n={},e=t,this.getInstance=function(t){return t.guid in n||(n[t.guid]=new e(t)),n[t.guid]}}var n={},o=new WeakMap;t.editors={registerEditor:function(t,i){var r=new e(i);"string"==typeof t&&(n[t]=r),o.set(i,r)},getEditor:function(t,e){var i;if("function"==typeof t)o.get(t)||this.registerEditor(null,t),i=o.get(t);else{if("string"!=typeof t)throw Error('Only strings and functions can be passed as "editor" parameter ');i=n[t]}if(!i)throw Error('No editor registered under name "'+t+'"');return i.getInstance(e)}}}(o),function(e){e.EditorManager=function(n,o,i){var r,a=this,s=t(document),l=e.helper.keyCode,A=!1,c=function(){function t(t){if(n.isListening()&&(o.settings.beforeOnKeyDown&&o.settings.beforeOnKeyDown.call(n,t),e.hooks.run(n,"beforeKeyDown",t),!A&&!t.isImmediatePropagationStopped()&&(o.lastKeyCode=t.keyCode,i.isSelected()))){var s=(t.ctrlKey||t.metaKey)&&!t.altKey;if(!(r.isWaiting()||e.helper.isMetaKey(t.keyCode)||s||a.isEditorOpened()))return void a.openEditor("");var c=t.shiftKey?i.setRangeEnd:i.setRangeStart;switch(t.keyCode){case l.A:if(s){i.selectAll(),t.preventDefault(),t.stopPropagation();break}case l.ARROW_UP:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),d(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_DOWN:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),g(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_RIGHT:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),h(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.ARROW_LEFT:a.isEditorOpened()&&!r.isWaiting()&&a.closeEditorAndSaveChanges(s),f(t.shiftKey),t.preventDefault(),t.stopPropagation();break;case l.TAB:var M="function"==typeof o.settings.tabMoves?o.settings.tabMoves(t):o.settings.tabMoves;t.shiftKey?i.transformStart(-M.row,-M.col):i.transformStart(M.row,M.col,!0),t.preventDefault(),t.stopPropagation();break;case l.BACKSPACE:case l.DELETE:i.empty(t),a.prepareEditor(),t.preventDefault();break;case l.F2:a.openEditor(),t.preventDefault();break;case l.ENTER:a.isEditorOpened()?(r.state!==e.EditorState.WAITING&&a.closeEditorAndSaveChanges(s),u(t.shiftKey)):n.getSettings().enterBeginsEditing?a.openEditor():u(t.shiftKey),t.preventDefault(),t.stopImmediatePropagation();break;case l.ESCAPE:a.isEditorOpened()&&a.closeEditorAndRestoreOriginalValue(s),t.preventDefault();break;case l.HOME:c(t.ctrlKey||t.metaKey?new p(0,o.selRange.from.col):new p(o.selRange.from.row,0)),t.preventDefault(),t.stopPropagation();break;case l.END:c(t.ctrlKey||t.metaKey?new p(n.countRows()-1,o.selRange.from.col):new p(o.selRange.from.row,n.countCols()-1)),t.preventDefault(),t.stopPropagation();break;case l.PAGE_UP:i.transformStart(-n.countVisibleRows(),0),n.view.wt.scrollVertical(-n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation();break;case l.PAGE_DOWN:i.transformStart(n.countVisibleRows(),0),n.view.wt.scrollVertical(n.countVisibleRows()),n.view.render(),t.preventDefault(),t.stopPropagation()}}}function c(t,e,n){"TD"==n.nodeName&&a.openEditor()}function u(t){var e="function"==typeof o.settings.enterMoves?o.settings.enterMoves(event):o.settings.enterMoves;t?i.transformStart(-e.row,-e.col):i.transformStart(e.row,e.col,!0)}function d(t){t?i.transformEnd(-1,0):i.transformStart(-1,0)}function g(t){t?i.transformEnd(1,0):i.transformStart(1,0)}function h(t){t?i.transformEnd(0,1):i.transformStart(0,1)}function f(t){t?i.transformEnd(0,-1):i.transformStart(0,-1)}n.addHook("afterDocumentKeyDown",function(e){t(e)}),s.on("keydown."+n.guid,function(t){n.runHooks("afterDocumentKeyDown",t)}),n.view.wt.update("onCellDblClick",c),n.addHook("afterDestroy",function(){A=!0})};this.destroyEditor=function(t){this.closeEditor(t)},this.getActiveEditor=function(){return r},this.prepareEditor=function(){if(r&&r.isWaiting())return void this.closeEditor(!1,!1,function(t){t&&a.prepareEditor()});var t=o.selRange.highlight.row,i=o.selRange.highlight.col,s=n.colToProp(i),l=n.getCell(t,i),A=n.getDataAtCell(t,i),c=n.getCellMeta(t,i),u=n.getCellEditor(c);r=e.editors.getEditor(u,n),r.prepare(t,i,s,l,A,c)},this.isEditorOpened=function(){return r.isOpened()},this.openEditor=function(t){r.cellProperties.readOnly||r.beginEditing(t)},this.closeEditor=function(t,e,n){r?r.finishEditing(t,e,n):n&&n(!1)},this.closeEditorAndSaveChanges=function(t){return this.closeEditor(!1,t)},this.closeEditorAndRestoreOriginalValue=function(t){return this.closeEditor(!0,t)},c()}}(o),function(t){var e={};t.renderers={registerRenderer:function(t,n){e[t]=n},getRenderer:function(t){if("function"==typeof t)return t;if("string"!=typeof t)throw Error('Only strings and functions can be passed as "renderer" parameter ');if(!(t in e))throw Error('No editor registered under name "'+t+'"');return e[t]}}}(o),o.helper.isPrintableChar=function(t){return 32==t||t>=48&&t<=57||t>=96&&t<=111||t>=186&&t<=192||t>=219&&t<=222||t>=226||t>=65&&t<=90},o.helper.isMetaKey=function(t){var e=o.helper.keyCode,n=[e.ARROW_DOWN,e.ARROW_UP,e.ARROW_LEFT,e.ARROW_RIGHT,e.HOME,e.END,e.DELETE,e.BACKSPACE,e.F1,e.F2,e.F3,e.F4,e.F5,e.F6,e.F7,e.F8,e.F9,e.F10,e.F11,e.F12,e.TAB,e.PAGE_DOWN,e.PAGE_UP,e.ENTER,e.ESCAPE,e.SHIFT,e.CAPS_LOCK,e.ALT];return n.indexOf(t)!=-1},o.helper.isCtrlKey=function(t){var e=o.helper.keyCode;return[e.CONTROL_LEFT,224,e.COMMAND_LEFT,e.COMMAND_RIGHT].indexOf(t)!=-1},o.helper.stringify=function(t){switch("undefined"==typeof t?"undefined":r(t)){ +case"string":case"number":return t+"";case"object":return null===t?"":t.toString();case"undefined":return"";default:return t.toString()}},o.helper.spreadsheetColumnLabel=function(t){for(var e,n=t+1,o="";n>0;)e=(n-1)%26,o=String.fromCharCode(65+e)+o,n=parseInt((n-e)/26,10);return o},o.helper.isNumeric=function(t){var e="undefined"==typeof t?"undefined":r(t);return"number"==e?!isNaN(t)&&isFinite(t):"string"==e?!!t.length&&(1==t.length?/\d/.test(t):/^\s*[+-]?\s*(?:(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?)|(?:0x[a-f\d]+))\s*$/i.test(t)):"object"==e&&!(!t||"number"!=typeof t.valueOf()||t instanceof Date)},o.helper.isDescendant=function(t,e){for(var n=e.parentNode;null!=n;){if(n==t)return!0;n=n.parentNode}return!1},o.helper.randomString=function(){return E()},o.helper.inherit=function(t,e){return e.prototype.constructor=e,t.prototype=new e,t.prototype.constructor=t,t},o.helper.extend=function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])},o.helper.getPrototypeOf=function(t){var e;if("object"==r(t.__proto__))e=t.__proto__;else{var n,o=t.constructor;"function"==typeof t.constructor&&(n=o,delete t.constructor&&(o=t.constructor,t.constructor=n)),e=o?o.prototype:null}return e},o.helper.columnFactory=function(t,e){function n(){}o.helper.inherit(n,t);for(var i=0,r=e.length;i-1},o.helper.isOutsideInput=function(t){return o.helper.isInput(t)&&t.className.indexOf("handsontableInput")==-1},o.helper.keyCode={MOUSE_LEFT:1,MOUSE_RIGHT:3,MOUSE_MIDDLE:2,BACKSPACE:8,COMMA:188,INSERT:45,DELETE:46,END:35,ENTER:13,ESCAPE:27,CONTROL_LEFT:91,COMMAND_LEFT:17,COMMAND_RIGHT:93,ALT:18,HOME:36,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,SPACE:32,SHIFT:16,CAPS_LOCK:20,TAB:9,ARROW_RIGHT:39,ARROW_LEFT:37,ARROW_UP:38,ARROW_DOWN:40,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,A:65,X:88,C:67,V:86},o.helper.isObject=function(t){return"[object Object]"==Object.prototype.toString.call(t)},o.helper.isArray=function(t){return Array.isArray?Array.isArray(t):"[object Array]"==Object.prototype.toString.call(t)},o.helper.pivot=function(t){var e=[];if(!t||0==t.length||!t[0]||0==t[0].length)return e;for(var n=t.length,o=t[0].length,i=0;i=this.instance.countRows())&&(n=this.instance.countRows()),a=n;for(var A=this.instance.getSettings().maxRows;l=this.instance.countCols()){for(var c=0;c-1){var o=n.split("."),i=this.dataSource[t];if(!i)return null;for(var r=0,a=o.length;r-1){for(var r=n.split("."),a=this.dataSource[t],s=0,l=r.length-1;s0&&!a.readOnly){n.isImmediatePropagationStopped()||(n.stopImmediatePropagation(),n.preventDefault());for(var d=0,g=r.length;d0&&parseInt(n.css("border-top-width"),10)>0&&(r+=1),A>0&&parseInt(n.css("border-left-width"),10)>0&&(a+=1),this.textareaParentStyle.top=r+"px",this.textareaParentStyle.left=a+"px";var c=this.TD.offsetTop,u=this.TD.offsetLeft-this.instance.view.wt.wtScrollbars.horizontal.getScrollPosition(),d=n.width(),g=this.instance.view.maximumVisibleElementWidth(u)-10,h=n.outerHeight()-4,p=this.instance.view.maximumVisibleElementHeight(c)-2;parseInt(n.css("border-top-width"),10)>0&&(h-=1),parseInt(n.css("border-left-width"),10)>0&&l>0&&(d-=1),this.TEXTAREA.style.fontSize=e.Dom.getComputedStyle(this.TD).fontSize,this.TEXTAREA.style.fontFamily=e.Dom.getComputedStyle(this.TD).fontFamily,this.autoResize.init(this.TEXTAREA,{minHeight:Math.min(h,p),maxHeight:p,minWidth:Math.min(d,g),maxWidth:g}),this.textareaParentStyle.display="block"}},n.prototype.bindEvents=function(){var t=this;this.$textarea.on("cut.editor",function(t){t.stopPropagation()}),this.$textarea.on("paste.editor",function(t){t.stopPropagation()}),this.instance.addHook("afterScrollVertically",function(){t.refreshDimensions()})},e.editors.TextEditor=n,e.editors.registerEditor("text",e.editors.TextEditor)}(o),function(e){var n=e.editors.BaseEditor.prototype.extend();n.prototype.beginEditing=function(){var e=this.TD.querySelector('input[type="checkbox"]');e&&t(e).trigger("click")},n.prototype.finishEditing=function(){},n.prototype.init=function(){},n.prototype.open=function(){},n.prototype.close=function(){},n.prototype.getValue=function(){},n.prototype.setValue=function(){},n.prototype.focus=function(){},e.editors.CheckboxEditor=n,e.editors.registerEditor("checkbox",n)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.init=function(){if(!t.datepicker)throw new Error("jQuery UI Datepicker dependency not found. Did you forget to include jquery-ui.custom.js or its substitute?");e.editors.TextEditor.prototype.init.apply(this,arguments),this.isCellEdited=!1;var n=this;this.instance.addHook("afterDestroy",function(){n.destroyElements()})},n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.datePicker=document.createElement("DIV"),e.Dom.addClass(this.datePicker,"htDatepickerHolder"),this.datePickerStyle=this.datePicker.style,this.datePickerStyle.position="absolute",this.datePickerStyle.top=0,this.datePickerStyle.left=0,this.datePickerStyle.zIndex=99,document.body.appendChild(this.datePicker),this.$datePicker=t(this.datePicker);var n=this,o={dateFormat:"yy-mm-dd",showButtonPanel:!0,changeMonth:!0,changeYear:!0,onSelect:function(t){n.setValue(t),n.finishEditing(!1)}};this.$datePicker.datepicker(o),this.$datePicker.on("mousedown",function(t){t.stopPropagation()}),this.hideDatepicker()},n.prototype.destroyElements=function(){this.$datePicker.datepicker("destroy"),this.$datePicker.remove()},n.prototype.open=function(){e.editors.TextEditor.prototype.open.call(this),this.showDatepicker()},n.prototype.finishEditing=function(t,n){this.hideDatepicker(),e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},n.prototype.showDatepicker=function(){var e=t(this.TD),n=e.offset();this.datePickerStyle.top=n.top+e.height()+"px",this.datePickerStyle.left=n.left+"px";var o={defaultDate:this.originalValue||void 0};t.extend(o,this.cellProperties),this.$datePicker.datepicker("option",o),this.originalValue&&this.$datePicker.datepicker("setDate",this.originalValue),this.datePickerStyle.display="block"},n.prototype.hideDatepicker=function(){this.datePickerStyle.display="none"},e.editors.DateEditor=n,e.editors.registerEditor("date",n)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments);var n=document.createElement("DIV");n.className="handsontableEditor",this.TEXTAREA_PARENT.appendChild(n),this.$htContainer=t(n),this.$htContainer.handsontable()},n.prototype.prepare=function(n,o,i,r,a,s){e.editors.TextEditor.prototype.prepare.apply(this,arguments);var l=this,A={startRows:0,startCols:0,minRows:0,minCols:0,className:"listbox",copyPaste:!1,cells:function(){return{readOnly:!0}},fillHandle:!1,afterOnCellMouseDown:function(){var t=this.getValue();void 0!==t&&l.setValue(t),l.instance.destroyEditor()}};this.cellProperties.handsontable&&(A=t.extend(A,s.handsontable)),this.$htContainer.handsontable("destroy"),this.$htContainer.handsontable(A)};var o=function(t){if(!t.isImmediatePropagationStopped()){var n,o=this.getActiveEditor(),i=o.$htContainer.handsontable("getInstance");if(t.keyCode==e.helper.keyCode.ARROW_DOWN)if(i.getSelected()){var r=i.getSelected()[0],a=i.countRows()-1;n=Math.min(a,r+1)}else n=0;else if(t.keyCode==e.helper.keyCode.ARROW_UP&&i.getSelected()){var r=i.getSelected()[0];n=r-1}void 0!==n&&(n<0?i.deselectCell():i.selectCell(n,0),t.preventDefault(),t.stopImmediatePropagation(),o.instance.listen(),o.TEXTAREA.focus())}};n.prototype.open=function(){this.instance.addHook("beforeKeyDown",o),e.editors.TextEditor.prototype.open.apply(this,arguments),this.$htContainer.handsontable("render"),this.cellProperties.strict?(this.$htContainer.handsontable("selectCell",0,0),this.TEXTAREA.style.visibility="hidden"):(this.$htContainer.handsontable("deselectCell"),this.TEXTAREA.style.visibility="visible"),e.Dom.setCaretPosition(this.TEXTAREA,0,this.TEXTAREA.value.length)},n.prototype.close=function(){this.instance.removeHook("beforeKeyDown",o),this.instance.listen(),e.editors.TextEditor.prototype.close.apply(this,arguments)},n.prototype.focus=function(){this.instance.listen(),e.editors.TextEditor.prototype.focus.apply(this,arguments)},n.prototype.beginEditing=function(t){var n=this.instance.getSettings().onBeginEditing;n&&n()===!1||e.editors.TextEditor.prototype.beginEditing.apply(this,arguments)},n.prototype.finishEditing=function(t,n){if(this.$htContainer.handsontable("isListening")&&this.instance.listen(),this.$htContainer.handsontable("getSelected")){var o=this.$htContainer.handsontable("getInstance").getValue();void 0!==o&&this.setValue(o)}return e.editors.TextEditor.prototype.finishEditing.apply(this,arguments)},e.editors.HandsontableEditor=n,e.editors.registerEditor("handsontable",n)}(o),function(t){var e=t.editors.HandsontableEditor.prototype.extend();e.prototype.init=function(){t.editors.HandsontableEditor.prototype.init.apply(this,arguments),this.query=null,this.choices=[]},e.prototype.createElements=function(){t.editors.HandsontableEditor.prototype.createElements.apply(this,arguments);var e=function(){return n.navigator.platform.indexOf("Mac")!=-1?"htMacScroll":""};this.$htContainer.addClass("autocompleteEditor"),this.$htContainer.addClass(e())};var o=!1,i=function(e){o=!1;var n=this.getActiveEditor(),i=t.helper.keyCode;(t.helper.isPrintableChar(e.keyCode)||e.keyCode===i.BACKSPACE||e.keyCode===i.DELETE||e.keyCode===i.INSERT)&&n.instance._registerTimeout(setTimeout(function(){n.queryChoices(n.TEXTAREA.value),o=!0},0))};e.prototype.prepare=function(){this.instance.addHook("beforeKeyDown",i),t.editors.HandsontableEditor.prototype.prepare.apply(this,arguments)},e.prototype.open=function(){t.editors.HandsontableEditor.prototype.open.apply(this,arguments),this.TEXTAREA.style.visibility="visible",this.focus();var e=this.$htContainer.handsontable("getInstance"),n=this;e.updateSettings({colWidths:[t.Dom.outerWidth(this.TEXTAREA)-2],afterRenderer:function(t,e,o,i,r){var a=this.getCellMeta(e,o).filteringCaseSensitive===!0,s=a?r.indexOf(this.query):r.toLowerCase().indexOf(n.query.toLowerCase());if(s!=-1){var l=r.substr(s,n.query.length);t.innerHTML=r.replace(l,""+l+"")}}}),o&&(o=!1),n.instance._registerTimeout(setTimeout(function(){n.queryChoices(n.TEXTAREA.value)},0))},e.prototype.close=function(){t.editors.HandsontableEditor.prototype.close.apply(this,arguments)},e.prototype.queryChoices=function(e){if(this.query=e,"function"==typeof this.cellProperties.source){var n=this;this.cellProperties.source(e,function(t){n.updateChoicesList(t)})}else if(t.helper.isArray(this.cellProperties.source)){var o;if(e&&this.cellProperties.filter!==!1){var i=this.cellProperties.filteringCaseSensitive===!0,r=e.toLowerCase();o=this.cellProperties.source.filter(function(t){return i?t.indexOf(e)!=-1:t.toLowerCase().indexOf(r)!=-1})}else o=this.cellProperties.source;this.updateChoicesList(o)}else this.updateChoicesList([])},e.prototype.updateChoicesList=function(e){var n=t.Dom.getCaretPosition(this.TEXTAREA),o=t.Dom.getSelectionEndPosition(this.TEXTAREA);this.choices=e,this.$htContainer.handsontable("loadData",t.helper.pivot([e])),this.$htContainer.handsontable("updateSettings",{height:this.getDropdownHeight()}),this.cellProperties.strict===!0&&this.highlightBestMatchingChoice(),this.instance.listen(),this.TEXTAREA.focus(),t.Dom.setCaretPosition(this.TEXTAREA,n,n!=o?o:void 0)},e.prototype.finishEditing=function(e){e||this.instance.removeHook("beforeKeyDown",i),t.editors.HandsontableEditor.prototype.finishEditing.apply(this,arguments)},e.prototype.highlightBestMatchingChoice=function(){var t=this.findBestMatchingChoice();"undefined"==typeof t&&this.cellProperties.allowInvalid===!1&&(t=0),"undefined"==typeof t?this.$htContainer.handsontable("deselectCell"):this.$htContainer.handsontable("selectCell",t,0)},e.prototype.findBestMatchingChoice=function(){for(var t,e,n,o={},i=this.getValue().length,r=0,a=this.choices.length;r0?t.indexOf(this.getValue()):t===this.getValue()?0:-1,e!=-1&&(n=t.length-e-i,("undefined"==typeof o.indexOfValue||o.indexOfValue>e||o.indexOfValue==e&&o.charsLeft>n)&&(o.indexOfValue=e,o.charsLeft=n,o.index=r));return o.index},e.prototype.getDropdownHeight=function(){var t=this.$htContainer.handsontable("getInstance").getRowHeight(0)||23;return this.choices.length>=10?10*t:this.choices.length*t+8},t.editors.AutocompleteEditor=e,t.editors.registerEditor("autocomplete",e)}(o),function(e){var n=e.editors.TextEditor.prototype.extend();n.prototype.createElements=function(){e.editors.TextEditor.prototype.createElements.apply(this,arguments),this.TEXTAREA=document.createElement("input"),this.TEXTAREA.setAttribute("type","password"),this.TEXTAREA.className="handsontableInput",this.textareaStyle=this.TEXTAREA.style,this.textareaStyle.width=0,this.textareaStyle.height=0,this.$textarea=t(this.TEXTAREA),e.Dom.empty(this.TEXTAREA_PARENT),this.TEXTAREA_PARENT.appendChild(this.TEXTAREA)},e.editors.PasswordEditor=n,e.editors.registerEditor("password",n)}(o),function(t){var e=t.editors.BaseEditor.prototype.extend();e.prototype.init=function(){this.select=document.createElement("SELECT"),t.Dom.addClass(this.select,"htSelectEditor"),this.select.style.display="none",this.instance.rootElement[0].appendChild(this.select)},e.prototype.prepare=function(){t.editors.BaseEditor.prototype.prepare.apply(this,arguments);var e,n=this.cellProperties.selectOptions; +e="function"==typeof n?this.prepareOptions(n(this.row,this.col,this.prop)):this.prepareOptions(n),t.Dom.empty(this.select);for(var o in e)if(e.hasOwnProperty(o)){var i=document.createElement("OPTION");i.value=o,t.Dom.fastInnerHTML(i,e[o]),this.select.appendChild(i)}},e.prototype.prepareOptions=function(e){var n={};if(t.helper.isArray(e))for(var o=0,i=e.length;on?t.style.width=e.minWidth+"px":n>e.maxWidth?t.style.width=e.maxWidth+"px":t.style.width=n+"px";var s=t.scrollHeight;e.minHeight>s?t.style.height=e.minHeight+"px":e.maxHeight1&&""===i[i.length-1]&&i.pop(),n=0,o=i.length;n0&&(a+="\t"),r=t[e][o],a+="string"==typeof r?r.indexOf("\n")>-1?'"'+r.replace(/"/g,'""')+'"':r:null===r||void 0===r?"":r;e0&&(t.patches=[],t.callback&&t.callback(i)),i}function h(t,n,o,i){for(var r=I(n),a=I(t),s=!1,l=!1,A=a.length-1;A>=0;A--){var c=a[A],u=t[c];if(n.hasOwnProperty(c)){var d=n[c];u instanceof Object?h(u,d,o,i+"/"+e(c)):u!=d&&(s=!0,o.push({op:"replace",path:i+"/"+e(c),value:d}),t[c]=d)}else o.push({op:"remove",path:i+"/"+e(c)}),delete t[c],l=!0}if(l||r.length!=a.length)for(var A=0;A=A){o=M[n.op].call(n,s,c,t);break}s=s[c]}else{var u=a[l];if(u.indexOf("~")!=-1&&(u=u.replace(/~1/g,"/").replace(/~0/g,"~")),l++,l>=A){o=f[n.op].call(n,s,u,t);break}s=s[u]}i++}return o}var f={add:function(t,e){return t[e]=this.value,!0},remove:function(t,e){return delete t[e],!0},replace:function(t,e){return t[e]=this.value,!0},move:function(t,e,n){var o={op:"_get",path:this.from};return p(n,[o]),p(n,[{op:"remove",path:this.from}]),p(n,[{op:"add",path:this.path,value:o.value}]),!0},copy:function(t,e,n){var o={op:"_get",path:this.from};return p(n,[o]),p(n,[{op:"add",path:this.path,value:o.value}]),!0},test:function(t,e){return JSON.stringify(t[e])===JSON.stringify(this.value)},_get:function(t,e){this.value=t[e]}},M={add:function(t,e){return t.splice(e,0,this.value),!0},remove:function(t,e){return t.splice(e,1),!0},replace:function(t,e){return t[e]=this.value,!0},move:f.move,copy:f.copy,test:f.test,_get:f._get},w={add:function(t,n){var o={op:"add",path:n+e(this.name),value:this.object[this.name]};t.push(o)},delete:function(t,n){var o={op:"remove",path:n+e(this.name)};t.push(o)},update:function(t,n){var o={op:"replace",path:n+e(this.name),value:this.object[this.name]};t.push(o)}},T=[];t.intervals;var C=function(){function t(t){this.observers=[],this.obj=t}return t}(),y=function(){function t(t,e){this.callback=t,this.observer=e}return t}();t.unobserve=A,t.observe=c,t.generate=g;var I;I=Object.keys?Object.keys:function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};var E;E=Array.isArray?Array.isArray:function(t){return t.push&&"number"==typeof t.length},t.apply=p}(Y||(Y={})),e.apply=Y.apply,e.observe=Y.observe,e.unobserve=Y.unobserve,e.generate=Y.generate,o.PluginHookClass=function(){function t(){this.hooks=e(),this.globalBucket={},this.legacy=n}var e=function(){return{beforeInitWalkontable:[],beforeInit:[],beforeRender:[],beforeSetRangeEnd:[],beforeDrawBorders:[],beforeChange:[],beforeChangeRender:[],beforeRemoveCol:[],beforeRemoveRow:[],beforeValidate:[],beforeGetCellMeta:[],beforeAutofill:[],beforeKeyDown:[],afterInit:[],afterLoadData:[],afterUpdateSettings:[],afterRender:[],afterRenderer:[],afterChange:[],afterValidate:[],afterGetCellMeta:[],afterSetCellMeta:[],afterGetColHeader:[],afterGetRowHeader:[],afterDestroy:[],afterRemoveRow:[],afterCreateRow:[],afterRemoveCol:[],afterCreateCol:[],afterDeselect:[],afterSelection:[],afterSelectionByProp:[],afterSelectionEnd:[],afterSelectionEndByProp:[],afterOnCellMouseDown:[],afterOnCellMouseOver:[],afterOnCellCornerMouseDown:[],afterScrollVertically:[],afterScrollHorizontally:[],afterCellMetaReset:[],afterIsMultipleSelectionCheck:[],afterDocumentKeyDown:[],modifyColWidth:[],modifyRowHeight:[],modifyRow:[],modifyCol:[]}},n={onBeforeChange:"beforeChange",onChange:"afterChange",onCreateRow:"afterCreateRow",onCreateCol:"afterCreateCol",onSelection:"afterSelection",onCopyLimit:"afterCopyLimit",onSelectionEnd:"afterSelectionEnd",onSelectionByProp:"afterSelectionByProp",onSelectionEndByProp:"afterSelectionEndByProp"};return t.prototype.getBucket=function(t){return t?(t.pluginHookBucket||(t.pluginHookBucket={}),t.pluginHookBucket):this.globalBucket},t.prototype.add=function(t,e,i){if(o.helper.isArray(e))for(var r=0,a=e.length;rl&&(l=u),s[u]||(s[u]={needed:i,strings:[]}),s[u].needed&&(s[u].strings.push({value:c,row:A}),s[u].needed--)}var d=o.getSettings();d.colHeaders&&o.view.appendColHeader(n,r.theadTh),t.Dom.empty(r.tbody);for(var g in s)if(s.hasOwnProperty(g))for(var h=0,p=s[g].strings.length;ht?this.autoColumnWidths[e]:t},this.afterDestroy=function(){var t=this;t.autoColumnSizeTmp&&t.autoColumnSizeTmp.container&&t.autoColumnSizeTmp.container.parentNode&&t.autoColumnSizeTmp.container.parentNode.removeChild(t.autoColumnSizeTmp.container),t.autoColumnSizeTmp=null}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterUpdateSettings",n.beforeInit)}(o);var H=new a;o.hooks.add("afterInit",function(){H.init.call(this,"afterInit")}),o.hooks.add("afterUpdateSettings",function(){H.init.call(this,"afterUpdateSettings")}),o.hooks.add("modifyRow",H.translateRow),o.hooks.add("afterGetColHeader",H.getColHeader),o.hooks.register("beforeColumnSort"),o.hooks.register("afterColumnSort"),function(e){function n(t,e){return t.indexOf(e)!=-1?t:(t=t.replace("htTop","").replace("htMiddle","").replace("htBottom","").replace(" ",""),t+=" "+e)}function o(t,e){return t.indexOf(e)!=-1?t:(t=t.replace("htLeft","").replace("htCenter","").replace("htRight","").replace("htJustify","").replace(" ",""),t+=" "+e)}function i(t,e,i,r){var a=this.getCellMeta(t,e),s=r;a.className&&(s="vertical"===i?n(a.className,r):o(a.className,r)),this.setCellMeta(t,e,"className",s),this.render()}function r(t,e,n){if(t.from.row==t.to.row&&t.from.col==t.to.col)i.call(this,t.from.row,t.from.col,e,n);else for(var o=t.from.row;o<=t.to.row;o++)for(var r=t.from.col;r<=t.to.col;r++)i.call(this,o,r,e,n)}function a(t,n){this.instance=t;var o=this;o.menus=[],o.triggerRows=[],this.enabled=!0,this.instance.addHook("afterDestroy",function(){o.destroy()}),this.defaultOptions={items:{row_above:{name:"Insert row above",callback:function(t,e){this.alter("insert_row",e.start.row)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return t[0]<0||this.countRows()>=this.getSettings().maxRows||n}},row_below:{name:"Insert row below",callback:function(t,e){this.alter("insert_row",e.end.row+1)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return this.getSelected()[0]<0||this.countRows()>=this.getSettings().maxRows||n}},hsep1:a.SEPARATOR,col_left:{name:"Insert column on the left",callback:function(t,e){this.alter("insert_col",e.start.col)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return this.getSelected()[1]<0||this.countCols()>=this.getSettings().maxCols||n}},col_right:{name:"Insert column on the right",callback:function(t,e){this.alter("insert_col",e.end.col+1)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return t[1]<0||this.countCols()>=this.getSettings().maxCols||n}},hsep2:a.SEPARATOR,remove_row:{name:"Remove row",callback:function(t,e){var n=e.end.row-e.start.row+1;this.alter("remove_row",e.start.row,n)},disabled:function(){var t=this.getSelected(),e=[0,t[1],this.view.wt.wtTable.getRowStrategy().cellCount-1,t[1]],n=e.join(",")==t.join(",");return t[0]<0||n}},remove_col:{name:"Remove column",callback:function(t,e){var n=e.end.col-e.start.col+1;this.alter("remove_col",e.start.col,n)},disabled:function(){var t=this.getSelected(),e=[t[0],0,t[0],this.view.wt.wtTable.getColumnStrategy().cellCount-1],n=e.join(",")==t.join(",");return t[1]<0||n}},hsep3:a.SEPARATOR,undo:{name:"Undo",callback:function(){this.undo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isUndoAvailable()}},redo:{name:"Redo",callback:function(){this.redo()},disabled:function(){return this.undoRedo&&!this.undoRedo.isRedoAvailable()}},hsep4:a.SEPARATOR,make_read_only:{name:function(){var t="Read only",e=o.checkSelectionReadOnlyConsistency(this);return e&&(t=o.markSelected(t)),t},callback:function(){var t=o.checkSelectionReadOnlyConsistency(this),e=this;this.getSelectedRange().forAll(function(n,o){e.getCellMeta(n,o).readOnly=!t}),this.render()}},hsep5:a.SEPARATOR,aligment:{name:"Alignment",submenu:{items:{left:{name:function(){var t="Left",e=o.checkSelectionAlignment(this,"htLeft");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htLeft")},disabled:!1},center:{name:function(){var t="Center",e=o.checkSelectionAlignment(this,"htCenter");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htCenter")},disabled:!1},right:{name:function(){var t="Right",e=o.checkSelectionAlignment(this,"htRight");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htRight")},disabled:!1},justify:{name:function(){var t="Justify",e=o.checkSelectionAlignment(this,"htJustify");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"horizontal","htJustify")},disabled:!1},hsep1:a.SEPARATOR,top:{name:function(){var t="Top",e=o.checkSelectionAlignment(this,"htTop");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htTop")},disabled:!1},middle:{name:function(){var t="Middle",e=o.checkSelectionAlignment(this,"htMiddle");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htMiddle")},disabled:!1},bottom:{name:function(){var t="Bottom",e=o.checkSelectionAlignment(this,"htBottom");return e&&(t=o.markSelected(t)),t},callback:function(){r.call(this,this.getSelectedRange(),"vertical","htBottom")},disabled:!1}}}}}},o.options={},e.helper.extend(o.options,this.defaultOptions),this.updateOptions(n,this.options),this.bindMouseEvents(),this.markSelected=function(t){return""+t},this.checkSelectionAlignment=function(t,e){var n=!1;return t.getSelectedRange().forAll(function(o,i){var r=t.getCellMeta(o,i).className;if(r&&r.indexOf(e)!=-1)return n=!0,!1}),n},this.checkSelectionReadOnlyConsistency=function(t){var e=!1;return t.getSelectedRange().forAll(function(n,o){if(t.getCellMeta(n,o).readOnly)return e=!0,!1}),e},e.hooks.run(t,"afterContextMenuDefaultOptions",this.defaultOptions)}function s(){if(!this.rootElement[0].className.indexOf("htContextMenu")){for(var t=0,e=0,n=this.getSettings().data.length,o=0;o .htContextMenu."+n)[0]:t("body > .htContextMenu")[0],i||(i=document.createElement("DIV"),e.Dom.addClass(i,"htContextMenu"),n&&e.Dom.addClass(i,n),document.getElementsByTagName("body")[0].appendChild(i)),this.menus.indexOf(i)<0&&(this.menus.push(i),o=o||0,this.triggerRows.push(o)),i},a.prototype.bindMouseEvents=function(){function n(n){this.closeAll(),n.preventDefault(),n.stopPropagation();var o=this.instance.getSettings().rowHeaders,i=this.instance.getSettings().colHeaders;if(o||i||"TD"==n.target.nodeName||e.Dom.hasClass(n.target,"current")&&e.Dom.hasClass(n.target,"wtBorder")){var r=this.createMenu(),s=this.getItems(this.options);this.show(r,s),this.setMenuPosition(n,r),t(document).on("mousedown.htContextMenu",e.helper.proxy(a.prototype.closeAll,this))}}this.instance.rootElement.on("contextmenu.htContextMenu",e.helper.proxy(n,this))},a.prototype.bindTableEvents=function(){this._afterScrollCallback=function(){},this.instance.addHook("afterScrollVertically",this._afterScrollCallback),this.instance.addHook("afterScrollHorizontally",this._afterScrollCallback)},a.prototype.unbindTableEvents=function(){this._afterScrollCallback&&(this.instance.removeHook("afterScrollVertically",this._afterScrollCallback),this.instance.removeHook("afterScrollHorizontally",this._afterScrollCallback),this._afterScrollCallback=null)},a.prototype.performAction=function(e,n){var o=this,i=t(n).handsontable("getInstance"),r=i.getSelected()[0],s=i.getData()[r];if(s.disabled!==!0&&("function"!=typeof s.disabled||s.disabled.call(this.instance)!==!0)&&!s.hasOwnProperty("submenu")){if("function"!=typeof s.callback)return;var l=this.instance.getSelectedRange(),A=a.utils.normalizeSelection(l);s.callback.call(this.instance,s.key,A,e),o.closeAll(),this.instance.deselectCell()}},a.prototype.unbindMouseEvents=function(){this.instance.rootElement.off("contextmenu.htContextMenu"),t(document).off("mousedown.htContextMenu")},a.prototype.show=function(n,o){n.style.display="block";var i=this;t(n).off("mousedown.htContextMenu").on("mousedown.htContextMenu",function(t){i.performAction(t,n)}),t(n).handsontable({data:a.utils.convertItemsToArray(o),colHeaders:!1,colWidths:[200],readOnly:!0,copyPaste:!1,columns:[{data:"name",renderer:e.helper.proxy(this.renderer,this)}],beforeKeyDown:function(t){i.onBeforeKeyDown(t,n)},afterOnCellMouseOver:function(t,e,o){i.onCellMouseOver(t,e,o,n)},renderAllRows:!0}),this.bindTableEvents(),t(n).handsontable("listen")},a.prototype.close=function(e){this.hide(e),t(document).off("mousedown.htContextMenu"),this.unbindTableEvents(),this.instance.listen()},a.prototype.closeAll=function(){for(;this.menus.length>0;){var t=this.menus.pop();t&&this.close(t)}this.triggerRows=[]},a.prototype.closeLastOpenedSubMenu=function(){var t=this.menus.pop();t&&this.hide(t)},a.prototype.hide=function(e){e.style.display="none",t(e).handsontable("destroy")},a.prototype.renderer=function(n,o,i,r,s,l){function A(t){return t.hasOwnProperty("submenu")}function c(t){return new RegExp(a.SEPARATOR,"i").test(t.name)}function u(t){return t.disabled===!0||"function"==typeof t.disabled&&t.disabled.call(d.instance)===!0}var d=this,g=n.getData()[i],h=document.createElement("DIV");"function"==typeof l&&(l=l.call(this.instance)),e.Dom.empty(o),o.appendChild(h),c(g)?e.Dom.addClass(o,"htSeparator"):e.Dom.fastInnerHTML(h,l),u(g)?(e.Dom.addClass(o,"htDisabled"),t(h).on("mouseenter",function(){n.deselectCell()})):A(g)?(e.Dom.addClass(o,"htSubmenu"),t(h).on("mouseenter",function(){n.selectCell(i,r)})):(e.Dom.removeClass(o,"htSubmenu"),e.Dom.removeClass(o,"htDisabled"),t(h).on("mouseenter",function(){n.selectCell(i,r)}))},a.prototype.onCellMouseOver=function(e,n,o,i){var r=t(i).handsontable("getInstance"),a=this.menus.length;if(a>0){var s=this.menus[a-1];s.id!=i.id&&this.closeLastOpenedSubMenu()}else this.closeLastOpenedSubMenu();if(o.className.indexOf("htSubmenu")!=-1){var l=r.getData()[n.row],A=this.getItems(l.submenu),c=this.createMenu(l.name,n.row),u=o.getBoundingClientRect();this.show(c,A),this.setSubMenuPosition(u,c)}},a.prototype.onBeforeKeyDown=function(n,o){function i(t){var e=t.getCell(0,0);a.utils.isSeparator(e)||a.utils.isDisabled(e)?s(0,0,t):t.selectCell(0,0)}function r(t){var e=t.countRows()-1,n=t.getCell(e,0);a.utils.isSeparator(n)||a.utils.isDisabled(n)?l(e,0,t):t.selectCell(e,0)}function s(t,e,n){var o=t+1,i=o=0?n.getCell(o,e):null;i&&(a.utils.isSeparator(i)||a.utils.isDisabled(i)?l(o,e,n):n.selectCell(o,e))}function A(e,n,o,i){var r=e.getData()[i],a=n.getItems(r.submenu),s=n.createMenu(r.name,i),l=o.getBoundingClientRect();n.show(s,a),n.setSubMenuPosition(l,s);var A=t(s).handsontable("getInstance");A.selectCell(0,0)}var c=this,u=t(o).handsontable("getInstance"),d=u.getSelected();switch(n.keyCode){ +case e.helper.keyCode.ESCAPE:c.closeAll(),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ENTER:d&&c.performAction(n,o);break;case e.helper.keyCode.ARROW_DOWN:d?s(d[0],d[1],u,c):i(u,c),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_UP:d?l(d[0],d[1],u,c):r(u,c),n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_RIGHT:if(d){var g=d[0],h=u.getCell(d[0],0);a.utils.hasSubMenu(h)&&A(u,c,h,g)}n.preventDefault(),n.stopImmediatePropagation();break;case e.helper.keyCode.ARROW_LEFT:if(d){if(o.className.indexOf("htContextSubMenu_")!=-1){c.closeLastOpenedSubMenu();var p=c.menus.length;if(p>0){o=c.menus[p-1];var f=c.triggerRows.pop();u=t(o).handsontable("getInstance"),u.selectCell(f,0)}}n.preventDefault(),n.stopImmediatePropagation()}}},a.prototype.getItems=function(t){function n(t){"string"==typeof t?this.name=t:e.helper.extend(this,t)}var o={};n.prototype=t;for(var i in t.items)!t.items.hasOwnProperty(i)||this.itemsFilter&&this.itemsFilter.indexOf(i)==-1||(o[i]=new n(t.items[i]));return o},a.prototype.updateOptions=function(t,n){if(t=t||{},t.items)for(var o in t.items){var i={};t.items.hasOwnProperty(o)&&this.defaultOptions.items.hasOwnProperty(o)&&e.helper.isObject(t.items[o])&&(e.helper.extend(i,this.defaultOptions.items[o]),e.helper.extend(i,t.items[o]),t.items[o]=i)}e.helper.extend(n,t)},a.prototype.setSubMenuPosition=function(t,n){var o=e.Dom.getWindowScrollTop(),i=e.Dom.getWindowScrollLeft(),r={top:o+t.top,topRelative:t.top,left:t.left,leftRelative:t.left-i,scrollTop:o,scrollLeft:i,cellHeight:t.height,cellWidth:t.width};this.menuFitsBelowCursor(r,n)?this.positionMenuBelowCursor(r,n,!0):this.menuFitsAboveCursor(r,n)?this.positionMenuAboveCursor(r,n,!0):this.positionMenuBelowCursor(r,n,!0),this.menuFitsOnRightOfCursor(r,n)?this.positionMenuOnRightOfCursor(r,n,!0):this.positionMenuOnLeftOfCursor(r,n,!0)},a.prototype.setMenuPosition=function(t,n){var o=t.pageY,i=t.pageX,r=e.Dom.getWindowScrollTop(),a=e.Dom.getWindowScrollLeft(),s={top:o,topRelative:o-r,left:i,leftRelative:i-a,scrollTop:r,scrollLeft:a,cellHeight:t.target.clientHeight,cellWidth:t.target.clientWidth};this.menuFitsBelowCursor(s,n)?this.positionMenuBelowCursor(s,n):this.menuFitsAboveCursor(s,n)?this.positionMenuAboveCursor(s,n):this.positionMenuBelowCursor(s,n),this.menuFitsOnRightOfCursor(s,n)?this.positionMenuOnRightOfCursor(s,n):this.positionMenuOnLeftOfCursor(s,n)},a.prototype.menuFitsAboveCursor=function(t,e){return t.topRelative>=e.offsetHeight},a.prototype.menuFitsBelowCursor=function(t,e){return t.topRelative+e.offsetHeight<=t.scrollTop+document.body.clientHeight},a.prototype.menuFitsOnRightOfCursor=function(t,e){return t.leftRelative+e.offsetWidth<=t.scrollLeft+document.body.clientWidth},a.prototype.positionMenuBelowCursor=function(t,e){e.style.top=t.top+"px"},a.prototype.positionMenuAboveCursor=function(t,e,n){n?e.style.top=t.top+t.cellHeight-e.offsetHeight+"px":e.style.top=t.top-e.offsetHeight+"px"},a.prototype.positionMenuOnRightOfCursor=function(t,e,n){n?e.style.left=1+t.left+t.cellWidth+"px":e.style.left=1+t.left+"px"},a.prototype.positionMenuOnLeftOfCursor=function(t,e,n){n?e.style.left=t.left-e.offsetWidth+"px":e.style.left=t.left-e.offsetWidth+"px"},a.utils={},a.utils.convertItemsToArray=function(t){var e,n=[];for(var o in t)if(t.hasOwnProperty(o)){if("string"==typeof t[o])e={name:t[o]};else{if(t[o].visible===!1)continue;e=t[o]}e.key=o,n.push(e)}return n},a.utils.normalizeSelection=function(t){return{start:t.getTopLeftCorner(),end:t.getBottomRightCorner()}},a.utils.isSeparator=function(t){return e.Dom.hasClass(t,"htSeparator")},a.utils.hasSubMenu=function(t){return e.Dom.hasClass(t,"htSubmenu")},a.utils.isDisabled=function(t){return e.Dom.hasClass(t,"htDisabled")},a.prototype.enable=function(){this.enabled||(this.enabled=!0,this.bindMouseEvents())},a.prototype.disable=function(){this.enabled&&(this.enabled=!1,this.closeAll(),this.unbindMouseEvents(),this.unbindTableEvents())},a.prototype.destroy=function(){for(this.closeAll();this.menus.length>0;){var t=this.menus.pop();this.triggerRows.pop(),t&&(this.close(t),this.isMenuEnabledByOtherHotInstance()||this.removeMenu(t))}this.unbindMouseEvents(),this.unbindTableEvents()},a.prototype.isMenuEnabledByOtherHotInstance=function(){for(var e=t(".handsontable"),n=!1,o=0,i=e.length;o=0){d=e;var n=h.getBoundingClientRect();u=n.left,p.style.top=n.top+"px",p.style.left=u+"px",g.rootElement[0].appendChild(p)}}function i(t){var e=t.getBoundingClientRect();p.style.left=e.left+"px"}function r(){var t=this;e.Dom.addClass(p,"active"),e.Dom.addClass(f,"active");var n=h.getBoundingClientRect();f.style.width=n.width+"px",f.style.height=t.view.maximumVisibleElementHeight(0)+"px",f.style.top=p.style.top,f.style.left=u+"px",t.rootElement[0].appendChild(f)}function a(t){f.style.left=u+t+"px"}function s(){e.Dom.removeClass(p,"active"),e.Dom.removeClass(f,"active")}var l,A,c,u,d,g,h,p=document.createElement("DIV"),f=document.createElement("DIV"),M=t(n);p.className="manualColumnMover",f.className="manualColumnMoverGuide";var w=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualColumnPositions",t.manualColumnPositions)},T=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualColumnPositions",n),n.value},C=function(){var t,n=this;n.rootElement.on("mouseenter.manualColumnMove."+n.guid,"table thead tr > th",function(e){t?(A=n.view.wt.wtTable.getCoords(e.currentTarget).col,i(e.currentTarget)):o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualColumnMove."+n.guid,".manualColumnMover",function(e){c=e.pageX,r.call(n),t=n,l=d,A=d}),M.on("mousemove.manualColumnMove."+n.guid,function(e){t&&a(e.pageX-c)}),M.on("mouseup.manualColumnMove."+n.guid,function(){t&&(s(),t=!1,l th"),t.rootElement.off("mousedown.manualColumnMove."+t.guid,".manualColumnMover"),M.off("mousemove.manualColumnMove."+t.guid),M.off("mouseup.manualColumnMove."+t.guid)},I=function(t,e){if(t.length0&&(this.forceFullRender=!0,this.render()))}else y.call(this),this.manualColumnPositions=[]},this.modifyCol=function(t){return this.getSettings().manualColumnMove?("undefined"==typeof this.manualColumnPositions[t]&&I(this.manualColumnPositions,t+1),this.manualColumnPositions[t]):t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyCol",i.modifyCol),e.hooks.register("afterColumnMove")}(o),function(e){function o(){function o(t){u=this,l=t;var e=this.view.wt.wtTable.getCoords(t).col;if(e>=0){A=e;var n=l.getBoundingClientRect();p=n.left-6,h=parseInt(n.width,10),f.style.top=n.top+"px",f.style.left=p+h+"px",u.rootElement[0].appendChild(f)}}function i(){f.style.left=p+c+"px"}function r(){var t=this;e.Dom.addClass(f,"active"),e.Dom.addClass(M,"active"),M.style.top=f.style.top,M.style.left=f.style.left,M.style.height=t.view.maximumVisibleElementHeight(0)+"px",t.rootElement[0].appendChild(M)}function a(){M.style.left=f.style.left}function s(){e.Dom.removeClass(f,"active"),e.Dom.removeClass(M,"active")}var l,A,c,u,d,g,h,p,f=document.createElement("DIV"),M=document.createElement("DIV"),w=t(n);f.className="manualColumnResizer",M.className="manualColumnResizerGuide";var T=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualColumnWidths",t.manualColumnWidths)},C=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualColumnWidths",n),n.value},y=function(){var t,n=this,u=0,p=null;n.rootElement.on("mouseenter.manualColumnResize."+n.guid,"table thead tr > th",function(e){t||o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualColumnResize."+n.guid,".manualColumnResizer",function(o){r.call(n),t=n,null==p&&(p=setTimeout(function(){u>=2&&(d=n.determineColumnWidth.call(n,A),E(A,d),n.forceFullRender=!0,n.view.render(),e.hooks.run(n,"afterColumnResize",A,d)),u=0,p=null},500),n._registerTimeout(p)),u++,g=o.pageX,d=h}),w.on("mousemove.manualColumnResize."+n.guid,function(e){t&&(c=h+(e.pageX-g),d=E(A,c),i(),a())}),w.on("mouseup.manualColumnResize."+n.guid,function(){t&&(s(),t=!1,d!=h&&(n.forceFullRender=!0,n.view.render(),T.call(n),e.hooks.run(n,"afterColumnResize",A,d)),o.call(n,l))}),n.addHook("afterDestroy",I)},I=function(){var t=this;t.rootElement.off("mouseenter.manualColumnResize."+t.guid,"table thead tr > th"),t.rootElement.off("mousedown.manualColumnResize."+t.guid,".manualColumnResizer"),w.off("mousemove.manualColumnResize."+t.guid),w.off("mouseup.manualColumnResize."+t.guid)};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnResize;if(n){var o=this.getSettings().manualColumnResize,i=C.call(e);"undefined"!=typeof i?this.manualColumnWidths=i:o instanceof Array?this.manualColumnWidths=o:this.manualColumnWidths=[],"afterInit"==t&&(y.call(this),this.manualColumnWidths.length>0&&(this.forceFullRender=!0,this.render()))}else I.call(this),this.manualColumnWidths=[]};var E=function(t,n){return n=Math.max(n,20),t=e.hooks.execute(u,"modifyCol",t),u.manualColumnWidths[t]=n,n};this.modifyColWidth=function(t,e){return e=this.runHooksAndReturn("modifyCol",e),this.getSettings().manualColumnResize&&this.manualColumnWidths[e]?this.manualColumnWidths[e]:t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyColWidth",i.modifyColWidth),e.hooks.register("afterColumnResize")}(o),function(e){function o(){function o(t){u=this,l=t;var e=this.view.wt.wtTable.getCoords(t).row;if(e>=0){A=e;var n=l.getBoundingClientRect();p=n.top-6,h=parseInt(n.height,10),f.style.left=n.left+"px",f.style.top=p+h+"px",u.rootElement[0].appendChild(f)}}function i(){f.style.top=p+c+"px"}function r(){var t=this;e.Dom.addClass(f,"active"),e.Dom.addClass(M,"active"),M.style.top=f.style.top,M.style.left=f.style.left,M.style.width=t.view.maximumVisibleElementWidth(0)+"px",t.rootElement[0].appendChild(M)}function a(){M.style.top=f.style.top}function s(){e.Dom.removeClass(f,"active"),e.Dom.removeClass(M,"active")}var l,A,c,u,d,g,h,p,f=document.createElement("DIV"),M=document.createElement("DIV"),w=t(n);f.className="manualRowResizer",M.className="manualRowResizerGuide";var T=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualRowHeights",t.manualRowHeights)},C=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualRowHeights",n),n.value},y=function(){var t,n=this,u=0,p=null;n.rootElement.on("mouseenter.manualRowResize."+n.guid,"table tbody tr > th",function(e){t||o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualRowResize."+n.guid,".manualRowResizer",function(o){r.call(n),t=n,null==p&&(p=setTimeout(function(){u>=2&&(E(A,null),n.forceFullRender=!0,n.view.render(),e.hooks.run(n,"afterRowResize",A,d)),u=0,p=null},500),n._registerTimeout(p)),u++,g=o.pageY,d=h}),w.on("mousemove.manualRowResize."+n.guid,function(e){t&&(c=h+(e.pageY-g),d=E(A,c),i(),a())}),w.on("mouseup.manualRowResize."+n.guid,function(){t&&(s(),t=!1,d!=h&&(n.forceFullRender=!0,n.view.render(),T.call(n),e.hooks.run(n,"afterRowResize",A,d)),o.call(n,l))}),n.addHook("afterDestroy",I)},I=function(){var t=this;t.rootElement.off("mouseenter.manualRowResize."+t.guid,"table tbody tr > th"),t.rootElement.off("mousedown.manualRowResize."+t.guid,".manualRowResizer"),w.off("mousemove.manualRowResize."+t.guid),w.off("mouseup.manualRowResize."+t.guid)};this.beforeInit=function(){this.manualRowHeights=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualRowResize;if(n){var o=this.getSettings().manualRowResize,i=C.call(e);"undefined"!=typeof i?this.manualRowHeights=i:o instanceof Array?this.manualRowHeights=o:this.manualRowHeights=[],"afterInit"===t?(y.call(this),this.manualRowHeights.length>0&&(this.forceFullRender=!0,this.render())):(this.forceFullRender=!0,this.render())}else I.call(this),this.manualRowHeights=[]};var E=function(t,n){return t=e.hooks.execute(u,"modifyRow",t),u.manualRowHeights[t]=n,n};this.modifyRowHeight=function(t,e){return this.getSettings().manualRowResize&&(e=this.runHooksAndReturn("modifyRow",e),void 0!==this.manualRowHeights[e])?this.manualRowHeights[e]:t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyRowHeight",i.modifyRowHeight),e.hooks.register("afterRowResize")}(o),function(){function t(){var t=this,n=t.getSettings().observeChanges;n?(t.observer&&i.call(t),e.call(t),a.call(t)):n||i.call(t)}function e(){var t=this;t.observeChangesActive=!0,t.pauseObservingChanges=function(){t.observeChangesActive=!1},t.resumeObservingChanges=function(){t.observeChangesActive=!0},t.observedData=t.getData(),t.observer=Y.observe(t.observedData,function(e){t.observeChangesActive&&(n.call(t,e),t.render()),t.runHooks("afterChangesObserved")})}function n(t){function e(t){var e;return e=o(t),e=n(e)}function n(t){var e=[];return t.filter(function(t){var n=i(t.path);if(["add","remove"].indexOf(t.op)!=-1&&!isNaN(n.col)){if(e.indexOf(n.col)!=-1)return!1;e.push(n.col)}return!0})}function o(t){return t.filter(function(t){return!/[\/]length/gi.test(t.path)})}function i(t){var e=t.match(/^\/(\d+)\/?(.*)?$/);return{row:parseInt(e[1],10),col:/^\d*$/.test(e[2])?parseInt(e[2],10):e[2]}}for(var r=this,a=e(t),s=0,l=a.length;s0},e.UndoRedo.prototype.isRedoAvailable=function(){return this.undoneActions.length>0},e.UndoRedo.prototype.clear=function(){this.doneActions.length=0,this.undoneActions.length=0},e.UndoRedo.Action=function(){},e.UndoRedo.Action.prototype.undo=function(){},e.UndoRedo.Action.prototype.redo=function(){},e.UndoRedo.ChangeAction=function(t){this.changes=t},e.helper.inherit(e.UndoRedo.ChangeAction,e.UndoRedo.Action),e.UndoRedo.ChangeAction.prototype.undo=function(e,n){for(var o=t.extend(!0,[],this.changes),i=e.countEmptyRows(!0),r=e.countEmptyCols(!0),a=0,s=o.length;athis.boundaries.bottom&&(o=e-this.boundaries.bottom),tthis.boundaries.right&&(n=t-this.boundaries.right),this.callback(n,o)};var G,W;if("undefined"!=typeof o){var X=function(t){t.dragToScrollListening=!1;var e=t.view.wt.wtScrollbars.vertical.scrollHandler;G=new A,e!==n&&(e?G.setBoundaries(e.getBoundingClientRect()):G.setBoundaries(t.$table[0].getBoundingClientRect()),G.setCallback(function(n,o){n<0?e?e.scrollLeft-=50:t.view.wt.scrollHorizontal(-1).draw():n>0&&(e?e.scrollLeft+=50:t.view.wt.scrollHorizontal(1).draw()),o<0?e?e.scrollTop-=20:t.view.wt.scrollVertical(-1).draw():o>0&&(e?e.scrollTop+=20:t.view.wt.scrollVertical(1).draw())}),t.dragToScrollListening=!0)};o.hooks.add("afterInit",function(){var e=this;t(document).on("mouseup."+this.guid,function(){e.dragToScrollListening=!1}),t(document).on("mousemove."+this.guid,function(t){e.dragToScrollListening&&G.check(t.clientX,t.clientY)})}),o.hooks.add("afterDestroy",function(){t(document).off("."+this.guid)}),o.hooks.add("afterOnCellMouseDown",function(){X(this)}),o.hooks.add("afterOnCellCornerMouseDown",function(){X(this)}),o.plugins.DragToScroll=A}if(function(t,e,n){function o(o){function i(){o.isListening()&&o.selection.empty()}function r(t){if(o.isListening()&&o.selection.isSelected()){var e=t.replace(/^[\r\n]*/g,"").replace(/[\r\n]*$/g,""),i=n.parse(e),r=o.getSelected(),a=new p(r[0],r[1]),s=new p(r[2],r[3]),l=new f(a,a,s),A=l.getTopLeftCorner(),c=l.getBottomRightCorner(),u=A,d=new p(Math.max(c.row,i.length-1+A.row),Math.max(c.col,i[0].length-1+A.col));o.addHookOnce("afterChange",function(t,e){t&&t.length&&this.selectCell(u.row,u.col,d.row,d.col)}),o.populateFromArray(u.row,u.col,i,d.row,d.col,"paste",o.getSettings().pasteMode)}}function a(e){if(t.helper.isCtrlKey(e.keyCode)&&o.getSelected())return s.setCopyableText(),void e.stopImmediatePropagation();var n=(e.ctrlKey||e.metaKey)&&!e.altKey;e.keyCode==t.helper.keyCode.A&&n&&o._registerTimeout(setTimeout(t.helper.proxy(s.setCopyableText,s),0))}this.copyPasteInstance=e.getInstance(),this.copyPasteInstance.onCut(i),this.copyPasteInstance.onPaste(r);var s=this;o.addHook("beforeKeyDown",a),this.destroy=function(){this.copyPasteInstance.removeCallback(i),this.copyPasteInstance.removeCallback(r),this.copyPasteInstance.destroy(),o.removeHook("beforeKeyDown",a)},o.addHook("afterDestroy",t.helper.proxy(this.destroy,this)),this.triggerPaste=t.helper.proxy(this.copyPasteInstance.triggerPaste,this.copyPasteInstance),this.triggerCut=t.helper.proxy(this.copyPasteInstance.triggerCut,this.copyPasteInstance),this.setCopyableText=function(){var e=o.getSettings(),n=e.copyRowsLimit,i=e.copyColsLimit,r=o.getSelectedRange(),a=r.getTopLeftCorner(),s=r.getBottomRightCorner(),l=a.row,A=a.col,c=s.row,u=s.col,d=Math.min(c,l+n-1),g=Math.min(u,A+i-1);o.copyPaste.copyPasteInstance.copyable(o.getCopyableData(l,A,d,g)),c===d&&u===g||t.hooks.run(o,"afterCopyLimit",c-l+1,u-A+1,n,i)}}function i(){var t=this,e=t.getSettings().copyPaste!==!1;e&&!t.copyPaste?t.copyPaste=new o(t):!e&&t.copyPaste&&(t.copyPaste.destroy(),delete t.copyPaste)}t.hooks.add("afterInit",i),t.hooks.add("afterUpdateSettings",i),t.hooks.register("afterCopyLimit")}(o,O,SheetClip),function(t){function e(){var e=this,n=!!e.getSettings().search;n?e.search=new t.Search(e):delete e.search}t.Search=function(e){this.query=function(n,o,i){var r=e.countRows(),a=e.countCols(),s=[];o||(o=t.Search.global.getDefaultCallback()),i||(i=t.Search.global.getDefaultQueryMethod());for(var l=0;li.row?(this.lastDesiredCoords=new p(o.row+n.row,o.col+n.col),n.row+=i.row-o.row-n.row):o.row==i.row&&n.row>0?n.row+=i.row-o.row+i.rowspan-1:this.lastDesiredCoords&&0===n.row&&(n.row+=this.lastDesiredCoords.row-o.row,this.lastDesiredCoords=null),o.col>i.col?(this.lastDesiredCoords||(this.lastDesiredCoords=new p(o.row+n.row,o.col+n.col)),n.col+=i.col-o.col-n.col):o.col==i.col&&n.col>0?n.col+=i.col-o.col+i.colspan-1:this.lastDesiredCoords&&0===n.col&&(n.col+=this.lastDesiredCoords.col-o.col,this.lastDesiredCoords=null)):this.lastDesiredCoords&&(0==n.col?n.col+=this.lastDesiredCoords.col-o.col:0==n.row&&(n.row+=this.lastDesiredCoords.row-o.row),this.lastDesiredCoords=null)}else{var r=this.mergedCellInfoCollection.getInfo(e.highlight.row,e.highlight.col);r&&e.isSingle()&&(e.from=new p(r.row,r.col),e.to=new p(r.row+r.rowspan-1,r.col+r.colspan-1)),e.isSingle()&&(e.from=new p(e.highlight.row,e.highlight.col),e.to=new p(e.highlight.row,e.highlight.col));var a=function(t){function o(e,n,o){e[i]=n,e[t]=o}var i="col"==t?"row":"col";if(0!=n[t]){var r,a,s=function(){r=e.getTopLeftCorner(),a=e.getBottomRightCorner()};s();var l,A=!1;if(n[t]<0)if(l=a[t]+n[t],a[t]==e.highlight[t])l=r[t]+n[t],A=!0;else for(var c=r[i];c<=a[i];c++){var u=this.mergedCellInfoCollection.getInfo(c,a[t]);if(u&&u[t]<=e.highlight[t]){l=r[t]+n[t],A=!0;break}}else if(n[t]>0)if(l=r[t]+n[t],r[t]==e.highlight[t])l=a[t]+n[t],A=!0;else for(var c=r[i];c<=a[i];c++){var u=this.mergedCellInfoCollection.getInfo(c,r[t]);if(u&&u[t]+u[t+"span"]>e.highlight[t]){l=a[t]+n[t],A=!0;break}}A?n[t]>0?(o(e.from,r[i],r[t]),o(e.to,a[i],Math.max(a[t],l)),s()):(o(e.from,r[i],Math.min(r[t],l)),o(e.to,a[i],a[t]),s()):n[t]>0?(o(e.from,r[i],Math.max(r[t],l)),o(e.to,a[i],a[t]),s()):(o(e.from,r[i],r[t]), +o(e.to,a[i],Math.min(a[t],l)),s());for(var c=r[i];c<=a[i];c++){var u="col"==t?this.mergedCellInfoCollection.getInfo(c,l):this.mergedCellInfoCollection.getInfo(l,c);u&&(A?n[t]>0?(o(e.from,Math.min(r[i],u[i]),Math.min(r[t],u[t])),l>u[t]?o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"])):o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"]-1)),s()):(o(e.from,Math.min(r[i],u[i]),Math.min(r[t],u[t])),o(e.to,Math.max(a[i],u[i]+u[i+"span"]-1),Math.max(a[t],u[t]+u[t+"span"]-1)),s()):n[t]>0?(l>u[t]?(o(e.from,r[i],Math.max(r[t],u[t]+u[t+"span"])),o(e.to,a[i],Math.max(a[t],u[t]+u[t+"span"]))):(o(e.from,r[i],Math.max(r[t],u[t])),o(e.to,a[i],Math.max(a[t],u[t]+u[t+"span"]-1))),s()):(l0&&o.from.row>=i&&(o.from.row=o.from-1),o.from.col<0?o.from.col=0:o.from.col>0&&o.from.col>=r&&(o.from.col=r-1)}}}},$=function(t){this.lastDesiredCoords=null;var e=this.getSettings().mergeCells;if(e){var n=this.getSelectedRange();n.highlight=new p(n.highlight.row,n.highlight.col),n.to=t;for(var o=0,i=this.mergeCells.mergedCellInfoCollection.length;o0},i=function(){n(this.getSettings().customBorders)&&(this.customBorders||(e=this,this.customBorders=new t))},a=function(t){for(var n=0;n=0?e.view.wt.selections[i]=o:e.view.wt.selections.push(o)},l=function(t,e,n){var o=h(t,e);o=p(o,n),this.setCellMeta(t,e,"borders",o),s(o)},A=function(t){for(var e=t.range,n=e.from.row;n<=e.to.row;n++)for(var o=e.from.col;o<=e.to.col;o++){var i=h(n,o),r=0;n==e.from.row&&(r++,t.hasOwnProperty("top")&&(i.top=t.top)),n==e.to.row&&(r++,t.hasOwnProperty("bottom")&&(i.bottom=t.bottom)),o==e.from.col&&(r++,t.hasOwnProperty("left")&&(i.left=t.left)),o==e.to.col&&(r++,t.hasOwnProperty("right")&&(i.right=t.right)),r>0&&(this.setCellMeta(n,o,"borders",i),s(i))}},c=function(t,e){return"border_row"+t+"col"+e},u=function(){return{width:1,color:"#000"}},d=function(){return{hide:!0}},g=function(){return{width:1,color:"#000",cornerVisible:!1}},h=function(t,e){return{className:c(t,e),border:g(),row:t,col:e,top:d(),right:d(),bottom:d(),left:d()}},p=function(t,e){return e.hasOwnProperty("border")&&(t.border=e.border),e.hasOwnProperty("top")&&(t.top=e.top),e.hasOwnProperty("right")&&(t.right=e.right),e.hasOwnProperty("bottom")&&(t.bottom=e.bottom),e.hasOwnProperty("left")&&(t.left=e.left),t},M=function(t){for(var e=document.getElementsByClassName(t),n=0;n✓"+t},E=function(t){this.getSettings().customBorders&&(t.items.bordersCellsSeparator=o.ContextMenu.SEPARATOR,t.items.borders={name:"Borders",submenu:{items:{top:{name:function(){var t="Top",e=y(this,"top");return e&&(t=I(t)),t},callback:function(){var t=y(this,"top");C.call(this,this.getSelectedRange(),"top",t)},disabled:!1},right:{name:function(){var t="Right",e=y(this,"right");return e&&(t=I(t)),t},callback:function(){var t=y(this,"right");C.call(this,this.getSelectedRange(),"right",t)},disabled:!1},bottom:{name:function(){var t="Bottom",e=y(this,"bottom");return e&&(t=I(t)),t},callback:function(){var t=y(this,"bottom");C.call(this,this.getSelectedRange(),"bottom",t)},disabled:!1},left:{name:function(){var t="Left",e=y(this,"left");return e&&(t=I(t)),t},callback:function(){var t=y(this,"left");C.call(this,this.getSelectedRange(),"left",t)},disabled:!1},remove:{name:"Remove border(s)",callback:function(){C.call(this,this.getSelectedRange(),"noBorders")},disabled:function(){return!y(this)}}}}})};o.hooks.add("beforeInit",i),o.hooks.add("afterContextMenuDefaultOptions",E),o.hooks.add("afterInit",function(){var t=this.getSettings().customBorders;if(t){for(var e=0;e=0){d=e;var n=g.getBoundingClientRect();u=n.top,h.style.top=u+"px",h.style.left=n.left+"px",W.rootElement[0].appendChild(h)}}function i(t){var e=t.getBoundingClientRect();h.style.top=e.top+"px"}function r(){var t=this;e.Dom.addClass(h,"active"),e.Dom.addClass(p,"active");var n=g.getBoundingClientRect();p.style.width=t.view.maximumVisibleElementWidth(0)+"px",p.style.height=n.height+"px",p.style.top=u+"px",p.style.left=h.style.left,t.rootElement[0].appendChild(p)}function a(t){p.style.top=u+t+"px"}function s(){e.Dom.removeClass(h,"active"),e.Dom.removeClass(p,"active")}var l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=t(n);h.className="manualRowMover",p.className="manualRowMoverGuide";var M=function(){var t=this;e.hooks.run(t,"persistentStateSave","manualRowPositions",t.manualRowPositions)},w=function(){var t=this,n={};return e.hooks.run(t,"persistentStateLoad","manualRowPositions",n),n.value},T=function(){var t,n=this;n.rootElement.on("mouseenter.manualRowMove."+n.guid,"table tbody tr > th",function(e){t?(A=n.view.wt.wtTable.getCoords(e.currentTarget).row,i(e.currentTarget)):o.call(n,e.currentTarget)}),n.rootElement.on("mousedown.manualRowMove."+n.guid,".manualRowMover",function(e){c=e.pageY,r.call(n),t=n,l=d,A=d}),f.on("mousemove.manualRowMove."+n.guid,function(e){t&&a(e.pageY-c)}),f.on("mouseup.manualRowMove."+n.guid,function(){t&&(s(),t=!1,l th"),t.rootElement.off("mousedown.manualRowMove."+t.guid,".manualRowMover"),f.off("mousemove.manualRowMove."+t.guid),f.off("mouseup.manualRowMove."+t.guid)},y=function(t,e){if(t.length0&&(e.forceFullRender=!0,e.render()))}else C.call(this),e.manualRowPositions=[]},this.modifyRow=function(t){var e=this;return e.getSettings().manualRowMove?("undefined"==typeof e.manualRowPositions[t]&&y(this.manualRowPositions,t+1),e.manualRowPositions[t]):t}}var i=new o;e.hooks.add("beforeInit",i.beforeInit),e.hooks.add("afterInit",function(){i.init.call(this,"afterInit")}),e.hooks.add("afterUpdateSettings",function(){i.init.call(this,"afterUpdateSettings")}),e.hooks.add("modifyRow",i.modifyRow),e.hooks.register("afterRowMove")}(o),function(e){function o(o){this.instance=o,this.addingStarted=!1;var i,r,a=(t(document),!1),s=this,l=function(t){return!o.autofill||void(o.autofill.handle&&o.autofill.handle.isDragged&&(o.autofill.handle.isDragged>1&&o.autofill.apply(),o.autofill.handle.isDragged=0,a=!1))};t(document).off("mouseup.autofill."+o.guid,this.instance.rootElement).on("mouseup.autofill."+o.guid,this.instance.rootElement,function(t){l(t)}),t(document).off("mousemove.moveOutside_"+o.guid).on("mousemove.moveOutside_"+o.guid,function(t){if(!s.instance.autofill)return 0;var o=e.Dom.offset(s.instance.$table[0]).top-(n.pageYOffset||document.documentElement.scrollTop)+e.Dom.outerHeight(s.instance.$table[0]),i=e.Dom.offset(s.instance.$table[0]).left-(n.pageXOffset||document.documentElement.scrollLeft)+e.Dom.outerWidth(s.instance.$table[0]);s.addingStarted===!1&&s.instance.autofill.handle.isDragged>0&&t.clientY>o&&t.clientX<=i?(this.mouseDragOutside=!0,s.addingStarted=!0):this.mouseDragOutside=!1,this.mouseDragOutside&&setTimeout(function(){s.addingStarted=!1,s.instance.alter("insert_row")},200)}),i=this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown,this.instance.view.wt.wtSettings.settings.onCellCornerMouseDown=function(t){o.autofill.handle.isDragged=1,a=!0,i(t)},r=this.instance.view.wt.wtSettings.settings.onCellMouseOver,this.instance.view.wt.wtSettings.settings.onCellMouseOver=function(t,e,n,i){o.autofill&&a&&!o.view.isMouseDown()&&o.autofill.handle&&o.autofill.handle.isDragged&&(o.autofill.handle.isDragged++,o.autofill.showBorder(e),o.autofill.checkIfNewRowNeeded()),r(t,e,n,i)},this.instance.view.wt.wtSettings.settings.onCellCornerDblClick=function(){o.autofill.selectAdjacent()}}o.prototype.init=function(){this.handle={}},o.prototype.disable=function(){this.handle.disabled=!0},o.prototype.selectAdjacent=function(){var t,e,n,o,i;t=this.instance.selection.isMultiple()?this.instance.view.wt.selections.area.getCorners():this.instance.view.wt.selections.current.getCorners(),e=this.instance.getData();t:for(n=t[2]+1;nn[3]?(o=new p(t[0],n[3]+1),i=new p(t[2],t[3])):t[0]n[2]&&t[1]===n[1]&&(o=new p(n[2]+1,t[1]),i=new p(t[2],t[3])),o)){var a={from:this.instance.getSelectedRange().from,to:this.instance.getSelectedRange().to};r=this.instance.getData(a.from.row,a.from.col,a.to.row,a.to.col),e.hooks.run(this.instance,"beforeAutofill",o,i,r),this.instance.populateFromArray(o.row,o.col,r,i.row,i.col,"autofill"),this.instance.selection.setRangeStart(new p(t[0],t[1])),this.instance.selection.setRangeEnd(new p(t[2],t[3]))}},o.prototype.showBorder=function(t){var e=this.instance.getSelectedRange().getTopLeftCorner(),n=this.instance.getSelectedRange().getBottomRightCorner();if("horizontal"!==this.instance.getSettings().fillHandle&&(n.rowt.row))t=new p(t.row,n.col);else{if("vertical"===this.instance.getSettings().fillHandle)return;t=new p(n.row,t.col)}this.instance.view.wt.selections.fill.clear(),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().from),this.instance.view.wt.selections.fill.add(this.instance.getSelectedRange().to),this.instance.view.wt.selections.fill.add(t),this.instance.view.render()},o.prototype.checkIfNewRowNeeded=function(){var t,e=this.instance.countRows(),n=this;this.instance.view.wt.selections.fill.cellRange&&this.addingStarted===!1&&(t=this.instance.view.wt.selections.fill.getCorners(),t[2]===e-1&&(this.addingStarted=!0,this.instance._registerTimeout(setTimeout(function(){n.instance.alter("insert_row"),n.addingStarted=!1},200))))},e.hooks.add("afterInit",function(){var t=new o(this);"undefined"!=typeof this.getSettings().fillHandle&&(t.handle&&this.getSettings().fillHandle===!1?t.disable():t.handle||this.getSettings().fillHandle===!1||(this.autofill=t,this.autofill.init()))}),e.Autofill=o}(o),d.prototype.init=function(){this.TABLE=this.instance.wtTable.TABLE,this.fixed=this.instance.wtTable.hider,this.fixedContainer=this.instance.wtTable.holder,this.scrollHandler=this.getScrollableElement(this.TABLE),this.$scrollHandler=t(this.scrollHandler)},d.prototype.makeClone=function(t){var e=document.createElement("DIV");e.className="ht_clone_"+t+" handsontable",e.style.position="absolute",e.style.overflow="hidden";var n=document.createElement("TABLE");return n.className=this.instance.wtTable.TABLE.className,e.appendChild(n),this.instance.wtTable.holder.parentNode.appendChild(e),new C({cloneSource:this.instance,cloneOverlay:this,table:n})},d.prototype.getScrollableElement=function(t){for(var e=t.parentNode;e&&e.style;){if("visible"!==e.style.overflow&&""!==e.style.overflow)return e;if(this instanceof D&&"visible"!==e.style.overflowX&&""!==e.style.overflowX)return e;e=e.parentNode}return n},d.prototype.onScroll=function(){this.windowScrollPosition=this.getScrollPosition(),this.readSettings(),this.resetFixedPosition()},d.prototype.availableSize=function(){var t;return t=this.windowScrollPosition>this.tableParentOffset?this.instance.wtTable.getLastVisibleRow()===this.total-1?o.Dom.outerHeight(this.TABLE):this.windowSize:this.windowSize-this.tableParentOffset},d.prototype.refresh=function(t){this.clone&&this.clone.draw(t)},d.prototype.destroy=function(){this.$scrollHandler.off("."+this.clone.guid),t(n).off("."+this.clone.guid),t(document).off("."+this.clone.guid),t(document.body).off("."+this.clone.guid)},g.prototype.getSize=function(t){return this.cellSizes[t]},g.prototype.getContainerSize=function(t){return"function"==typeof this.containerSizeFn?this.containerSizeFn(t):this.containerSizeFn},g.prototype.countVisible=function(){return this.cellCount},g.prototype.isLastIncomplete=function(){return this.remainingSize>0},h.prototype.appear=function(t){var e,n,i,r,a,s,l,A,c,u,d,g;if(!this.disabled){var h,f,M,w,T,C,y,I=this.instance;for(C=I.cloneOverlay instanceof v||I.cloneOverlay instanceof x?I.getSetting("fixedRowsTop"):I.wtTable.getRowStrategy().countVisible(),T=0;T=t[0]&&y<=t[2]){h=y;break}for(T=C-1;T>=0;T--)if(y=I.wtTable.rowFilter.visibleToSource(T),y>=t[0]&&y<=t[2]){M=y;break}for(C=I.cloneOverlay instanceof D||I.cloneOverlay instanceof x?I.getSetting("fixedColumnsLeft"):I.wtTable.getColumnStrategy().cellCount,T=0;T=t[1]&&y<=t[3]){f=y;break}for(T=C-1;T>=0;T--)if(y=I.wtTable.columnFilter.visibleToSource(T),y>=t[1]&&y<=t[3]){w=y;break}if(void 0===h||void 0===f)return void this.disappear();e=h!==M||f!==w,n=I.wtTable.getCell(new p(h,f)),i=e?I.wtTable.getCell(new p(M,w)):n,r=o.Dom.offset(n),a=e?o.Dom.offset(i):r,s=o.Dom.offset(I.wtTable.TABLE),A=r.top,d=a.top+o.Dom.outerHeight(i)-A,u=r.left,g=a.left+o.Dom.outerWidth(i)-u,l=A-s.top-1,c=u-s.left-1;var E=o.Dom.getComputedStyle(n);parseInt(E.borderTopWidth,10)>0&&(l+=1,d=d>0?d-1:0),parseInt(E.borderLeftWidth,10)>0&&(c+=1,g=g>0?g-1:0),this.topStyle.top=l+"px",this.topStyle.left=c+"px",this.topStyle.width=g+"px",this.topStyle.display="block",this.leftStyle.top=l+"px",this.leftStyle.left=c+"px",this.leftStyle.height=d+"px",this.leftStyle.display="block";var m=Math.floor(this.settings.border.width/2);this.bottomStyle.top=l+d-m+"px",this.bottomStyle.left=c+"px",this.bottomStyle.width=g+"px",this.bottomStyle.display="block",this.rightStyle.top=l+"px",this.rightStyle.left=c+g-m+"px",this.rightStyle.height=d+1+"px",this.rightStyle.display="block",this.hasSetting(this.settings.border.cornerVisible)?(this.cornerStyle.top=l+d-4+"px",this.cornerStyle.left=c+g-4+"px",this.cornerStyle.display="block"):this.cornerStyle.display="none"}},h.prototype.disappear=function(){this.topStyle.display="none",this.leftStyle.display="none",this.bottomStyle.display="none",this.rightStyle.display="none",this.cornerStyle.display="none"},h.prototype.hasSetting=function(t){return"function"==typeof t?t():!!t},p.prototype.isValid=function(t){return!(this.row<0||this.col<0)&&!(this.row>=t.getSetting("totalRows")||this.col>=t.getSetting("totalColumns"))},p.prototype.isEqual=function(t){return t===this||this.row===t.row&&this.col===t.col},p.prototype.isSouthEastOf=function(t){return this.row>=t.row&&this.col>=t.col},p.prototype.isNorthWestOf=function(t){return this.row<=t.row&&this.col<=t.col},n.WalkontableCellCoords=p,f.prototype.isValid=function(t){return this.from.isValid(t)&&this.to.isValid(t)},f.prototype.isSingle=function(){return this.from.row===this.to.row&&this.from.col===this.to.col},f.prototype.includes=function(t){var e=this.getTopLeftCorner(),n=this.getBottomRightCorner();return e.row<=t.row&&n.row>=t.row&&e.col<=t.col&&n.col>=t.col},f.prototype.includesRange=function(t){return this.includes(t.getTopLeftCorner())&&this.includes(t.getBottomRightCorner())},f.prototype.overlaps=function(t){return t.isSouthEastOf(this.getTopLeftCorner())&&t.isNorthWestOf(this.getBottomRightCorner())},f.prototype.isSouthEastOf=function(t){return this.getTopLeftCorner().isSouthEastOf(t)||this.getBottomRightCorner().isSouthEastOf(t)},f.prototype.isNorthWestOf=function(t){return this.getTopLeftCorner().isNorthWestOf(t)||this.getBottomRightCorner().isNorthWestOf(t)},f.prototype.expand=function(t){var e=this.getTopLeftCorner(),n=this.getBottomRightCorner();return(t.rown.row||t.col>n.col)&&(this.from=new p(Math.min(e.row,t.row),Math.min(e.col,t.col)),this.to=new p(Math.max(n.row,t.row),Math.max(n.col,t.col)),!0)},f.prototype.expandByRange=function(t){if(this.includesRange(t)||!this.overlaps(t))return!1;var e=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=t.getTopLeftCorner(),i=t.getBottomRightCorner(),r=Math.min(e.row,o.row),a=Math.min(e.col,o.col),s=Math.max(n.row,i.row),l=Math.max(n.col,i.col);return this.from=new p(r,a),this.to=new p(s,l),!0},f.prototype.getTopLeftCorner=function(){return new p(Math.min(this.from.row,this.to.row),Math.min(this.from.col,this.to.col))},f.prototype.getBottomRightCorner=function(){return new p(Math.max(this.from.row,this.to.row),Math.max(this.from.col,this.to.col))},f.prototype.getInner=function(){for(var t=this.getTopLeftCorner(),e=this.getBottomRightCorner(),n=[],o=t.row;o<=e.row;o++)for(var i=t.col;i<=e.col;i++)this.from.row===o&&this.from.col===i||this.to.row===o&&this.to.col===i||n.push(new p(o,i));return n},f.prototype.getAll=function(){for(var t=this.getTopLeftCorner(),e=this.getBottomRightCorner(),n=[],o=t.row;o<=e.row;o++)for(var i=t.col;i<=e.col;i++)t.row===o&&t.col===i?n.push(t):e.row===o&&e.col===i?n.push(e):n.push(new p(o,i));return n},f.prototype.forAll=function(t){for(var e=this.getTopLeftCorner(),n=this.getBottomRightCorner(),o=e.row;o<=n.row;o++)for(var i=e.col;i<=n.col;i++){var r=t(o,i);if(r===!1)return}},n.WalkontableCellRange=f,M.prototype.add=function(t,e,n){this.cache[t]||(this.cache[t]=[]),this.cache[t][e]||(this.cache[t][e]=[]),this.cache[t][e][n]=!0},M.prototype.remove=function(t,e,n){this.test(t,e,n)&&(this.cache[t][e][n]=void 0)},M.prototype.test=function(t,e,n){return this.cache[t]&&this.cache[t][e]&&this.cache[t][e][n]},w.prototype.visibleToSource=function(t){return t},w.prototype.sourceToVisible=function(t){return t},w.prototype.offsettedTH=function(t){return t-this.countTH},w.prototype.unOffsettedTH=function(t){return t+this.countTH},w.prototype.visibleRowHeadedColumnToSourceColumn=function(t){return this.visibleToSource(this.offsettedTH(t))},w.prototype.sourceColumnToVisibleRowHeadedColumn=function(t){return this.unOffsettedTH(this.sourceToVisible(t))},T.prototype=new g,T.prototype.getSize=function(t){return this.cellSizes[t]+(this.cellStretch[t]||0)},T.prototype.stretch=function(){var t,e=0;if(t=this.instance.wtTable.allRowsInViewport()?this.getContainerSize():this.getContainerSize(1/0),this.remainingSize=this.cellSizesSum-t,this.cellStretch.length=0,"all"===this.strategy){if(this.remainingSize<0){for(var n,o=t/this.cellSizesSum;e=a},C.prototype.draw=function(t){if(this.drawInterrupted=!1,!t&&!o.Dom.isVisible(this.wtTable.TABLE))return void(this.drawInterrupted=!0);t=t&&this.getSetting("offsetRow")===this.lastOffsetRow,this.lastOffsetRow=this.getSetting("offsetRow");var e=this.getSetting("totalRows");return this.lastOffsetRow>e&&e>0&&(this.scrollVertical(-(1/0)),this.scrollViewport(new p(e-1,0))),this.wtTable.draw(t),this},C.prototype.update=function(t,e){return this.wtSettings.update(t,e)},C.prototype.scrollVertical=function(t){var e=this.wtScroll.scrollVertical(t);return this.getSetting("onScrollVertically"),e},C.prototype.scrollHorizontal=function(t){var e=this.wtScroll.scrollHorizontal(t);return this.getSetting("onScrollHorizontally"),e},C.prototype.scrollViewport=function(t){return this.wtScroll.scrollViewport(t),this},C.prototype.getViewport=function(){return[this.wtTable.getFirstVisibleRow(),this.wtTable.getFirstVisibleColumn(),this.wtTable.getLastVisibleRow(),this.wtTable.getLastVisibleColumn()]},C.prototype.getSetting=function(t,e,n,o,i){return this.wtSettings.getSetting(t,e,n,o,i)},C.prototype.hasSetting=function(t){return this.wtSettings.has(t)},C.prototype.destroy=function(){t(n).off("."+this.guid),t(document.body).off("."+this.guid),this.wtScrollbars.destroy(),this.wtEvent&&this.wtEvent.destroy()},y.prototype=new d,y.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode,e=this.instance.wtTable.holder.getBoundingClientRect();t.style.top=Math.ceil(e.top,10)+"px",t.style.left=Math.ceil(e.left,10)+"px"}},y.prototype.getScrollPosition=function(){},y.prototype.getLastCell=function(){},y.prototype.applyToDOM=function(){},y.prototype.scrollTo=function(){},y.prototype.readWindowSize=function(){},y.prototype.readSettings=function(){},y.prototype.destroy=function(){d.prototype.destroy.call(this),clearTimeout(this.lastTimeout)},I.prototype.parentCell=function(t){var e={},n=this.instance.wtTable.TABLE,i=o.Dom.closest(t,["TD","TH"],n);return i&&o.Dom.isChildOf(i,n)?(e.coords=this.instance.wtTable.getCoords(i),e.TD=i):o.Dom.hasClass(t,"wtBorder")&&o.Dom.hasClass(t,"current")?(e.coords=this.instance.selections[0].cellRange.highlight,e.TD=this.instance.wtTable.getCell(e.coords)):o.Dom.hasClass(t,"wtBorder")&&o.Dom.hasClass(t,"area")&&(e.coords=this.instance.selections[1].cellRange.to,e.TD=this.instance.wtTable.getCell(e.coords)),e},I.prototype.destroy=function(){clearTimeout(this.dblClickTimeout[0]),clearTimeout(this.dblClickTimeout[1])},n.requestAnimFrame=function(){return n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame||n.oRequestAnimationFrame||n.msRequestAnimationFrame||function(t,e){return n.setTimeout(t,1e3/60)}}(),n.cancelRequestAnimFrame=function(){return n.cancelAnimationFrame||n.webkitCancelRequestAnimationFrame||n.mozCancelRequestAnimationFrame||n.oCancelRequestAnimationFrame||n.msCancelRequestAnimationFrame||clearTimeout}(),n.getComputedStyle||!function(){var t,e={getPropertyValue:function(e){return"float"==e&&(e="styleFloat"),t.currentStyle[e.toUpperCase()]||null}};n.getComputedStyle=function(n){return t=n,e}}(),!String.prototype.trim){var ot=/^\s+|\s+$/g;String.prototype.trim=function(){return this.replace(ot,"")}}m.prototype.offsetted=function(t){return t+this.offset},m.prototype.unOffsetted=function(t){return t-this.offset},m.prototype.visibleToSource=function(t){return this.offsetted(t)},m.prototype.sourceToVisible=function(t){return this.unOffsetted(t)},m.prototype.offsettedTH=function(t){return t-this.countTH},m.prototype.visibleColHeadedRowToSourceRow=function(t){return this.visibleToSource(this.offsettedTH(t))},m.prototype.sourceRowToVisibleColHeadedRow=function(t){return this.unOffsettedTH(this.sourceToVisible(t))},N.prototype=new g,N.prototype.add=function(t,e){var n=this.sizeAtIndex(t,e);if(void 0===n)return!1;var o=this.getContainerSize(this.cellSizesSum+n);return this.cellSizes.push(n),this.cellSizesSum+=n,this.cellCount++,this.remainingSize=this.cellSizesSum-o,this.visiblCellCount++,!0},N.prototype.canRenderMoreRows=function(){return this.remainingSize<=0||this.cellCount-this.visiblCellCountthis.curOuts;)this.remove()},N.prototype.countRendered=function(){return this.cellCount},N.prototype.countVisible=function(){return this.visiblCellCount},N.prototype.isLastIncomplete=function(){var t=this.instance.wtTable.getLastVisibleRow(),e=this.instance.wtTable.getFirstVisibleColumn(),n=this.instance.wtTable.getCell(new p(t,e)),i=o.Dom.offset(n).top,r=o.Dom.outerHeight(n),a=i+r,s=this.instance.wtScrollbars.horizontal.scrollHandler.offsetTop+this.instance.wtScrollbars.vertical.getScrollPosition(),l=this.instance.wtViewport.getViewportHeight(),A=s+l;return A0&&!this.instance.wtTable.isLastRowFullyVisible()?this.scrollLogicVertical(t,o,r,i,a,function(t){return t-o=0?n.getSetting("rowHeight",t-o):n.getSetting("rowHeight",t)}):0,e!==o&&this.instance.wtScrollbars.vertical.scrollTo(e),n},b.prototype.scrollHorizontal=function(t){return this.instance.wtScrollbars.horizontal.scrollTo(t),this.instance},b.prototype.scrollLogicVertical=function(t,e,n,o,i,r){var a=e+t;return a>=n-o&&(a=n-o-1),a<0&&(a=0),a},b.prototype.scrollViewport=function(t){if(!this.instance.drawn,0){var e=(this.instance.getSetting("offsetRow"),this.instance.getSetting("totalRows")),n=this.instance.getSetting("totalColumns");if(t.row<0||t.row>e-1)throw new Error("row "+t.row+" does not exist");if(t.col<0||t.col>n-1)throw new Error("column "+t.col+" does not exist");var o=this.instance.wtTable.getCell(t);"object"===("undefined"==typeof o?"undefined":r(o))?t.col>=this.instance.getSetting("fixedColumnsLeft")&&this.scrollToRenderedCell(o):t.row>=this.instance.wtTable.getLastVisibleRow()?(this.scrollVertical(t.row-this.instance.wtTable.getLastVisibleRow()),t.row==this.instance.wtTable.getLastVisibleRow()&&this.instance.wtTable.getRowStrategy().isLastIncomplete()&&this.scrollViewport(t)):t.row>=this.instance.getSetting("fixedRowsTop")&&this.scrollVertical(t.row-this.instance.wtTable.getFirstVisibleRow())}},b.prototype.scrollToRenderedCell=function(t){var e=o.Dom.offset(t),i=o.Dom.outerWidth(t),r=o.Dom.outerHeight(t),a=o.Dom.offset(this.instance.wtTable.TABLE),s={left:this.instance.wtScrollbars.horizontal.getScrollPosition(),top:this.instance.wtScrollbars.vertical.getScrollPosition()},l=this.instance.wtViewport.getWorkspaceWidth(),A=this.instance.wtViewport.getWorkspaceHeight(),c=o.Dom.outerWidth(this.instance.wtScrollbars.horizontal.clone.wtTable.TABLE),u=o.Dom.outerHeight(this.instance.wtScrollbars.vertical.clone.wtTable.TABLE);if(this.instance.wtScrollbars.horizontal.scrollHandler!==n&&(a.left=0,e.left-=o.Dom.offset(this.instance.wtScrollbars.horizontal.scrollHandler).left),this.instance.wtScrollbars.vertical.scrollHandler!==n&&(a.top=0,e.top=e.top-o.Dom.offset(this.instance.wtScrollbars.vertical.scrollHandler).top),ia.left+s.left+l){var d=e.left+i-(a.left+s.left+l);this.instance.wtScrollbars.horizontal.setScrollPosition(s.left+d)}rs.top+A&&(this.instance.wtScrollbars.vertical.setScrollPosition(e.top-A+r),this.instance.wtScrollbars.vertical.onScroll()))},x.prototype=new d,x.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.top),r=Math.ceil(e.left);r<0?t.style.left=-r+"px":t.style.left="0",i<0?t.style.top=-i+"px":t.style.top="0"}else t.style.top=this.instance.wtScrollbars.vertical.windowScrollPosition+"px",t.style.left=this.instance.wtScrollbars.horizontal.windowScrollPosition+"px";t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+4+"px",t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+4+"px"}},x.prototype.refresh=function(t){d.prototype.refresh.call(this,t)},x.prototype.getScrollPosition=function(){},x.prototype.getLastCell=function(){},x.prototype.applyToDOM=function(){},x.prototype.scrollTo=function(){},x.prototype.readWindowSize=function(){},x.prototype.readSettings=function(){},D.prototype=new d,D.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.left);i<0?t.style.left=-i+"px":t.style.left="0",t.style.top=this.instance.wtTable.hider.style.top}else t.style.top=this.instance.wtTable.hider.style.top,t.style.left=this.windowScrollPosition+"px";t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+"px",t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+4+"px"}},D.prototype.refresh=function(t){d.prototype.refresh.call(this,t)},D.prototype.getScrollPosition=function(){return o.Dom.getScrollLeft(this.scrollHandler)},D.prototype.setScrollPosition=function(t){this.scrollHandler===n?n.scrollTo(t,o.Dom.getWindowScrollTop()):this.scrollHandler.scrollLeft=t},D.prototype.onScroll=function(){d.prototype.onScroll.call(this),this.instance.getSetting("onScrollHorizontally")},D.prototype.getLastCell=function(){return this.instance.wtTable.getLastVisibleColumn()},D.prototype.applyToDOM=function(){this.readWindowSize()},D.prototype.scrollTo=function(t){this.setScrollPosition(this.tableParentOffset+t*this.cellSize)},D.prototype.readWindowSize=function(){this.scrollHandler===n?(this.windowSize=document.documentElement.clientWidth,this.tableParentOffset=this.instance.wtTable.holderOffset.left):(this.windowSize=this.scrollHandler.clientWidth,this.tableParentOffset=0),this.windowScrollPosition=this.getScrollPosition()},D.prototype.readSettings=function(){this.readWindowSize(),this.total=this.instance.getSetting("totalColumns")},v.prototype=new d,v.prototype.resetFixedPosition=function(){if(this.instance.wtTable.holder.parentNode){var t=this.clone.wtTable.holder.parentNode;if(this.scrollHandler===n){var e=this.instance.wtTable.holder.getBoundingClientRect(),i=Math.ceil(e.top);t.style.left="0",i<0?t.style.top=-i+"px":t.style.top="0"}else t.style.top=this.windowScrollPosition+"px",t.style.left="0";this.instance.wtScrollbars.horizontal.scrollHandler===n?t.style.width=this.instance.wtViewport.getWorkspaceActualWidth()+"px":t.style.width=o.Dom.outerWidth(this.clone.wtTable.TABLE)+"px",t.style.height=o.Dom.outerHeight(this.clone.wtTable.TABLE)+4+"px"}},v.prototype.getScrollPosition=function(){return o.Dom.getScrollTop(this.scrollHandler)},v.prototype.setScrollPosition=function(t){this.scrollHandler===n?n.scrollTo(o.Dom.getWindowScrollLeft(),t):this.scrollHandler.scrollTop=t},v.prototype.onScroll=function(){},v.prototype.getLastCell=function(){return this.instance.getSetting("offsetRow")+this.instance.wtTable.tbodyChildrenLength-1},v.prototype.sumCellSizes=function(t,e){for(var n=0;t0&&this.scrollHandler.clientHeight>0?this.scrollHandler.clientHeight:1/0,this.tableParentOffset=0}this.windowScrollPosition=this.getScrollPosition()},v.prototype.readSettings=function(){this.readWindowSize(),this.offset=this.instance.getSetting("offsetRow"),this.total=this.instance.getSetting("totalRows");for(var t,e=this.windowScrollPosition-this.tableParentOffset,n=0,o=0;oe));o++);this.offset=Math.min(o,this.total),this.instance.update("offsetRow",this.offset)},L.prototype.registerListeners=function(){function e(){if(s.instance.drawn){if(!s.instance.wtTable.holder.parentNode)return void s.destroy();s.vertical.windowScrollPosition=s.vertical.getScrollPosition(),s.horizontal.windowScrollPosition=s.horizontal.getScrollPosition(),s.box=s.instance.wtTable.hider.getBoundingClientRect(),s.vertical.windowScrollPosition===o&&s.horizontal.windowScrollPosition===i&&s.box.top===r&&s.box.left===a||(s.vertical.onScroll(),s.horizontal.onScroll(),s.corner.onScroll(),o=s.vertical.windowScrollPosition,i=s.horizontal.windowScrollPosition,r=s.box.top,a=s.box.left)}}var o,i,r,a,s=this,l=t(n);this.vertical.$scrollHandler.on("scroll."+this.instance.guid,e),this.vertical.scrollHandler!==this.horizontal.scrollHandler&&this.horizontal.$scrollHandler.on("scroll."+this.instance.guid,e),this.vertical.scrollHandler!==n&&this.horizontal.scrollHandler!==n&&l.on("scroll."+this.instance.guid,e)},L.prototype.destroy=function(){this.vertical&&(this.vertical.destroy(),this.vertical.$scrollHandler.off("scroll."+this.instance.guid)),this.horizontal&&(this.horizontal.destroy(),this.vertical.$scrollHandler.off("scroll."+this.instance.guid)),t(n).off("scroll."+this.instance.guid),this.corner&&this.corner.destroy(),this.debug&&this.debug.destroy()},L.prototype.refresh=function(t){},L.prototype.applyToDOM=function(){this.horizontal&&this.horizontal.applyToDOM(),this.vertical&&this.vertical.applyToDOM(),this.corner&&this.corner.applyToDOM(),this.debug&&this.debug.applyToDOM()},B.prototype.getBorder=function(t){return this.instanceBorders[t.guid]?this.instanceBorders[t.guid]:void(this.instanceBorders[t.guid]=new h(t,this.settings))},B.prototype.isEmpty=function(){return null===this.cellRange},B.prototype.add=function(t){this.isEmpty()?this.cellRange=new f(t,t,t):this.cellRange.expand(t)},B.prototype.replace=function(t,e){if(!this.isEmpty()){if(this.cellRange.from.isEqual(t))return this.cellRange.from=e,!0;if(this.cellRange.to.isEqual(t))return this.cellRange.to=e,!0}return!1},B.prototype.clear=function(){this.cellRange=null},B.prototype.getCorners=function(){var t=this.cellRange.getTopLeftCorner(),e=this.cellRange.getBottomRightCorner();return[t.row,t.col,e.row,e.col]},B.prototype.draw=function(t){var e,n,o,i,r,a=t.wtTable.getRowStrategy().countVisible(),s=t.wtTable.getColumnStrategy().cellCount;if(this.isEmpty()){if(this.settings.border){var l=this.getBorder(t);l&&l.disappear()}}else{for(e=this.getCorners(),n=0;n=e[0]&&i<=e[2]&&r>=e[1]&&r<=e[3]?this.settings.className&&t.wtTable.currentCellCache.add(n,o,this.settings.className):i>=e[0]&&i<=e[2]?(t.wtTable.currentCellCache.add(n,o,this.settings.highlightRowClassName),t.wtTable.currentCellCache.add(n,s,this.settings.highlightRowClassName)):r>=e[1]&&r<=e[3]&&(t.wtTable.currentCellCache.add(n,o,this.settings.highlightColumnClassName),t.wtTable.currentCellCache.add(a,o,this.settings.highlightColumnClassName));if(t.getSetting("onBeforeDrawBorders",e,this.settings.className),this.settings.border){var l=this.getBorder(t);l&&l.appear(e)}}},S.prototype.update=function(t,e){if(void 0===e)for(var n in t)t.hasOwnProperty(n)&&(this.settings[n]=t[n]);else this.settings[t]=e;return this.instance},S.prototype.getSetting=function(t,e,n,o,i){return"function"==typeof this.settings[t]?this.settings[t](e,n,o,i):void 0!==e&&"[object Array]"===Object.prototype.toString.call(this.settings[t])?this.settings[t][e]:this.settings[t]},S.prototype.has=function(t){return!!this.settings[t]},Q.prototype.getRowStrategy=function(){return this.isWorkingOnClone()?this.instance.cloneSource.wtTable.rowStrategy:this.rowStrategy},Q.prototype.getColumnStrategy=function(){return this.isWorkingOnClone()?this.instance.cloneSource.wtTable.columnStrategy:this.columnStrategy},Q.prototype.isWorkingOnClone=function(){return!!this.instance.cloneSource},Q.prototype.refreshHiderDimensions=function(){var t=this.spreader.style;t.position="relative",t.width="auto",t.height="auto"},Q.prototype.draw=function(t){if(t)this.instance.wtScrollbars&&this.instance.wtScrollbars.refresh(!0);else{this.isWorkingOnClone()?this.tableOffset=this.instance.cloneSource.wtTable.tableOffset:(this.holderOffset=o.Dom.offset(this.holder),this.tableOffset=o.Dom.offset(this.TABLE),this.instance.wtScrollbars.vertical.readSettings(),this.instance.wtScrollbars.horizontal.readSettings(),this.instance.wtViewport.resetSettings());var e;e=this.instance.cloneOverlay instanceof y||this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof x?0:this.instance.wtSettings.settings.offsetRow,this.rowFilter=new m(0,this.instance.getSetting("totalRows"),this.instance.getSetting("columnHeaders").length),this.columnFilter=new w(this.instance.getSetting("totalColumns"),this.instance.getSetting("rowHeaders").length),this._doDraw()}return this.refreshPositions(t),t||this.isWorkingOnClone()||(this.instance.wtScrollbars.vertical.resetFixedPosition(),this.instance.wtScrollbars.horizontal.resetFixedPosition(),this.instance.wtScrollbars.corner.resetFixedPosition(),this.instance.wtScrollbars.debug&&this.instance.wtScrollbars.debug.resetFixedPosition()),this.instance.drawn=!0,this},Q.prototype._doDraw=function(){var t=new j(this);t.render()},Q.prototype.refreshPositions=function(t){this.refreshHiderDimensions(),this.refreshSelections(t)},Q.prototype.refreshSelections=function(t){var e,n,i,a,s,l,A,c=[],u=this.getRowStrategy().countVisible(),d=this.getColumnStrategy().cellCount;if(this.oldCellCache=this.currentCellCache,this.currentCellCache=new M(this.instance),this.instance.selections)for(var g=0,h=this.instance.selections.length;g=0},Q.prototype.isRowAfterViewport=function(t){return t>this.getLastVisibleRow()},Q.prototype.isColumnBeforeViewport=function(t){return this.columnFilter.sourceToVisible(t)<0&&t>=0},Q.prototype.isColumnAfterViewport=function(t){return t>this.getLastVisibleColumn()},Q.prototype.isRowInViewport=function(t){return!this.isRowBeforeViewport(t)&&!this.isRowAfterViewport(t)},Q.prototype.isColumnInViewport=function(t){return!this.isColumnBeforeViewport(t)&&!this.isColumnAfterViewport(t)},Q.prototype.isLastRowFullyVisible=function(){return this.getLastVisibleRow()===this.instance.getSetting("totalRows")-1&&!this.getRowStrategy().isLastIncomplete()},Q.prototype.isLastColumnFullyVisible=function(){return this.getLastVisibleColumn()===this.instance.getSetting("totalColumns")-1&&!this.getColumnStrategy().isLastIncomplete()},Q.prototype.getVisibleRowsCount=function(){return this.getRowStrategy().countVisible()},Q.prototype.allRowsInViewport=function(){return this.getRowStrategy().cellCount==this.getVisibleRowsCount()},j.prototype.render=function(){this.wtTable.isWorkingOnClone()||this.instance.getSetting("beforeDraw",!0),this.rowHeaders=this.instance.getSetting("rowHeaders"),this.rowHeaderCount=this.rowHeaders.length,this.fixedRowsTop=this.instance.getSetting("fixedRowsTop"),this.columnHeaders=this.instance.getSetting("columnHeaders");var t,e,n,o=this.instance.getSetting("totalRows"),i=this.instance.getSetting("totalColumns"),r=!1;if(i>0){var a;this.wtTable.isWorkingOnClone()&&(this.instance.cloneOverlay instanceof v||this.instance.cloneOverlay instanceof x?a=this.fixedRowsTop:this.instance.cloneOverlay instanceof D&&(a=this.wtTable.getRowStrategy().cellCount)),this.adjustAvailableNodes(),r=!0,this.renderColGroups(),this.renderColumnHeaders(),e=this.getColumnCount(),this.renderRows(o,a,e),this.wtTable.isWorkingOnClone()||(n=this.instance.wtViewport.getWorkspaceWidth(),this.instance.wtViewport.containerWidth=null,this.wtTable.getColumnStrategy().stretch()),this.adjustColumnWidths(e)}if(r||this.adjustAvailableNodes(),this.instance.cloneOverlay instanceof y||this.removeRedundantRows(),!this.wtTable.isWorkingOnClone()){if(this.markOversizedRows(),n!==this.instance.wtViewport.getWorkspaceWidth()){this.instance.wtViewport.containerWidth=null,this.wtTable.getColumnStrategy().stretch();var s=this.instance.wtTable.columnWidthCache;for(t=0;tt;)this.TBODY.removeChild(this.TBODY.lastChild),this.wtTable.tbodyChildrenLength--},j.prototype.renderRows=function(t,e,n){for(var o,i,r,a=this.instance.getSetting("offsetRow"),s=0,l=this.rowFilter.visibleToSource(s),A=this.wtTable.isWorkingOnClone();l=0;){if(s>1e3)throw new Error("Security brake: Too much TRs. Please define height for your table, which will enforce scrollbars.");if(void 0!==e&&s===e)break;if(i=this.getOrCreateTrForRow(s,i),this.renderRowHeaders(l,i),this.adjustColumns(i,n+this.rowHeaderCount),o=this.renderCells(l,i,n),a=this.instance.getSetting("offsetRow"),!A){if(r=this.wtTable.getRowStrategy().add(s,o),r===!1)break;0==s&&this.instance.wtScrollbars.vertical.readWindowSize(),this.resetOversizedRow(l)}if(i.firstChild){var c=this.instance.getSetting("rowHeight",l);c?i.firstChild.style.height=c+"px":i.firstChild.style.height=""}s++,l=this.rowFilter.visibleToSource(s)}},j.prototype.resetOversizedRow=function(t){this.instance.wtTable.oversizedRows&&this.instance.wtTable.oversizedRows[t]&&(this.instance.wtTable.oversizedRows[t]=void 0)},j.prototype.markOversizedRows=function(){for(var t,e,n,i,r=this.instance.wtTable.TBODY.childNodes.length;r;)r--,n=this.instance.wtTable.rowFilter.visibleToSource(r),t=this.instance.wtSettings.settings.rowHeight(n),i=this.instance.wtTable.getTrForRow(n),e=o.Dom.innerHeight(i)-1,(!t&&this.instance.wtSettings.settings.defaultRowHeight=this.wtTable.tbodyChildrenLength?(n=this.createRow(),this.appendToTbody(n)):n=0===t?this.TBODY.firstChild:e.nextSibling,n},j.prototype.createRow=function(){for(var t=document.createElement("TR"),e=0;et+this.rowHeaderCount;)this.COLGROUP.removeChild(this.COLGROUP.lastChild),this.wtTable.colgroupChildrenLength--,this.wtTable.columnWidthCache&&this.wtTable.columnWidthCache.splice(-1,1)},j.prototype.adjustThead=function(){var t=this.getColumnCount(),e=this.THEAD.firstChild;if(this.columnHeaders.length){for(e||(e=document.createElement("TR"),this.THEAD.appendChild(e)),this.theadChildrenLength=e.childNodes.length;this.theadChildrenLengtht+this.rowHeaderCount;)e.removeChild(e.lastChild),this.theadChildrenLength--}else e&&o.Dom.empty(e)},j.prototype.getTrForColumnHeaders=function(){var t=this.THEAD.firstChild;return this.rowHeaderCount&&this.renderRowHeaders(-1,t),t},j.prototype.renderColumnHeader=function(t,e){return this.columnHeaders[0](t,e)},j.prototype.getColumnCount=function(){return this.wtTable.isWorkingOnClone()&&(this.instance.cloneOverlay instanceof D||this.instance.cloneOverlay instanceof x)?this.instance.getSetting("fixedColumnsLeft"):this.wtTable.getColumnStrategy().cellCount},j.prototype.renderColGroups=function(){for(var t=0;te;)t.removeChild(t.lastChild),n--},j.prototype.refreshStretching=function(){if(!this.wtTable.isWorkingOnClone()){var t=this.instance,e=t.getSetting("stretchH"),n=(t.getSetting("totalRows"),t.getSetting("totalColumns")),o=function(t){var e=i.instance.wtViewport.getViewportWidth(t);return e},i=this,r=function(e){var o=i.columnFilter.visibleToSource(e);if(o0&&(e-=n),e},U.prototype.getRowHeaderWidth=function(){if(this.instance.cloneSource)return this.instance.cloneSource.wtViewport.getRowHeaderWidth();if(isNaN(this.rowHeaderWidth)){var t=this.instance.getSetting("rowHeaders");if(t.length){var e=this.instance.wtTable.TABLE.querySelector("TH");this.rowHeaderWidth=0;for(var n=0,i=t.length;n0?e-n:e},U.prototype.resetSettings=function(){this.rowHeaderWidth=NaN,this.columnHeaderHeight=NaN}}(jQuery,window,Handsontable),function(){function n(t){this._value=t}function r(t,e,n,o){var i,r,a=Math.pow(10,e);return r=(n(t*a)/a).toFixed(e),o&&(i=new RegExp("0{1,"+o+"}$"),r=r.replace(i,"")),r}function a(t,e,n){var o;return o=e.indexOf("$")>-1?l(t,e,n):e.indexOf("%")>-1?A(t,e,n):e.indexOf(":")>-1?c(t,e):d(t._value,e,n)}function s(t,e){var n,o,i,r,a,s=e,l=["KB","MB","GB","TB","PB","EB","ZB","YB"],A=!1;if(e.indexOf(":")>-1)t._value=u(e);else if(e===C)t._value=0;else{for("."!==w[T].delimiters.decimal&&(e=e.replace(/\./g,"").replace(w[T].delimiters.decimal,".")),n=new RegExp("[^a-zA-Z]"+w[T].abbreviations.thousand+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),o=new RegExp("[^a-zA-Z]"+w[T].abbreviations.million+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),i=new RegExp("[^a-zA-Z]"+w[T].abbreviations.billion+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),r=new RegExp("[^a-zA-Z]"+w[T].abbreviations.trillion+"(?:\\)|(\\"+w[T].currency.symbol+")?(?:\\))?)?$"),a=0;a<=l.length&&!(A=e.indexOf(l[a])>-1&&Math.pow(1024,a+1));a++);t._value=(A?A:1)*(s.match(n)?Math.pow(10,3):1)*(s.match(o)?Math.pow(10,6):1)*(s.match(i)?Math.pow(10,9):1)*(s.match(r)?Math.pow(10,12):1)*(e.indexOf("%")>-1?.01:1)*((e.split("-").length+Math.min(e.split("(").length-1,e.split(")").length-1))%2?1:-1)*Number(e.replace(/[^0-9\.]+/g,"")),t._value=A?Math.ceil(t._value):t._value}return t._value}function l(t,e,n){var o,i,r=e.indexOf("$"),a=e.indexOf("("),s=e.indexOf("-"),l="";return e.indexOf(" $")>-1?(l=" ",e=e.replace(" $","")):e.indexOf("$ ")>-1?(l=" ",e=e.replace("$ ","")):e=e.replace("$",""),i=d(t._value,e,n),r<=1?i.indexOf("(")>-1||i.indexOf("-")>-1?(i=i.split(""),o=1,(r-1?(i=i.split(""),i.splice(-1,0,l+w[T].currency.symbol),i=i.join("")):i=i+l+w[T].currency.symbol,i}function A(t,e,n){var o,i="",r=100*t._value;return e.indexOf(" %")>-1?(i=" ",e=e.replace(" %","")):e=e.replace("%",""),o=d(r,e,n),o.indexOf(")")>-1?(o=o.split(""),o.splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o}function c(t){var e=Math.floor(t._value/60/60),n=Math.floor((t._value-60*e*60)/60),o=Math.round(t._value-60*e*60-60*n);return e+":"+(n<10?"0"+n:n)+":"+(o<10?"0"+o:o)}function u(t){var e=t.split(":"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}function d(t,e,n){var o,i,a,s,l,A,c=!1,u=!1,d=!1,g="",h=!1,p=!1,f=!1,M=!1,y=!1,I="",E="",m=Math.abs(t),N=["B","KB","MB","GB","TB","PB","EB","ZB","YB"],b="",x=!1;if(0===t&&null!==C)return C;if(e.indexOf("(")>-1?(c=!0,e=e.slice(1,-1)):e.indexOf("+")>-1&&(u=!0,e=e.replace(/\+/g,"")),e.indexOf("a")>-1&&(h=e.indexOf("aK")>=0,p=e.indexOf("aM")>=0,f=e.indexOf("aB")>=0,M=e.indexOf("aT")>=0,y=h||p||f||M,e.indexOf(" a")>-1?(g=" ",e=e.replace(" a","")):e=e.replace("a",""),m>=Math.pow(10,12)&&!y||M?(g+=w[T].abbreviations.trillion,t/=Math.pow(10,12)):m=Math.pow(10,9)&&!y||f?(g+=w[T].abbreviations.billion,t/=Math.pow(10,9)):m=Math.pow(10,6)&&!y||p?(g+=w[T].abbreviations.million,t/=Math.pow(10,6)):(m=Math.pow(10,3)&&!y||h)&&(g+=w[T].abbreviations.thousand,t/=Math.pow(10,3))),e.indexOf("b")>-1)for(e.indexOf(" b")>-1?(I=" ",e=e.replace(" b","")):e=e.replace("b",""),a=0;a<=N.length;a++)if(o=Math.pow(1024,a),i=Math.pow(1024,a+1),t>=o&&t0&&(t/=o);break}return e.indexOf("o")>-1&&(e.indexOf(" o")>-1?(E=" ",e=e.replace(" o","")):e=e.replace("o",""),E+=w[T].ordinal(t)),e.indexOf("[.]")>-1&&(d=!0,e=e.replace("[.]",".")),s=t.toString().split(".")[0],l=e.split(".")[1],A=e.indexOf(","),l?(l.indexOf("[")>-1?(l=l.replace("]",""),l=l.split("["),b=r(t,l[0].length+l[1].length,n,l[1].length)):b=r(t,l.length,n),s=b.split(".")[0],b=b.split(".")[1].length?w[T].delimiters.decimal+b.split(".")[1]:"",d&&0===Number(b.slice(1))&&(b="")):s=r(t,null,n),s.indexOf("-")>-1&&(s=s.slice(1),x=!0),A>-1&&(s=s.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+w[T].delimiters.thousands)),0===e.indexOf(".")&&(s=""),(c&&x?"(":"")+(!c&&x?"-":"")+(!x&&u?"+":"")+s+b+(E?E:"")+(g?g:"")+(I?I:"")+(c&&x?")":"")}function g(t,e){w[t]=e}function h(t){var e=t.toString().split(".");return e.length<2?1:Math.pow(10,e[1].length)}function p(){var t=Array.prototype.slice.call(arguments);return t.reduce(function(t,e){var n=h(t),o=h(e);return n>o?n:o},-(1/0))}var f,M="1.5.3",w={},T="en",C=null,y="0,0",I="undefined"!=typeof t&&t.exports;f=function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}(function(t){return f.isNumeral(t)?t=t.value():0===t||"undefined"==typeof t?t=0:Number(t)||(t=f.fn.unformat(t)),new n(Number(t))}),f.version=M,f.isNumeral=function(t){return t instanceof n},f.language=function(t,e){if(!t)return T;if(t&&!e){if(!w[t])throw new Error("Unknown language : "+t);T=t}return!e&&w[t]||g(t,e),f},f.languageData=function(t){if(!t)return w[T];if(!w[t])throw new Error("Unknown language : "+t);return w[t]},f.language("en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1===~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),f.zeroFormat=function(t){C="string"==typeof t?t:null},f.defaultFormat=function(t){y="string"==typeof t?t:"0.0"},"function"!=typeof Array.prototype.reduce&&(Array.prototype.reduce=function(t,e){"use strict";if(null===this||"undefined"==typeof this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof t)throw new TypeError(t+" is not a function");var n,o,i=this.length>>>0,r=!1;for(1n;++n)this.hasOwnProperty(n)&&(r?o=t(o,this[n],n,this):(o=this[n],r=!0));if(!r)throw new TypeError("Reduce of empty array with no initial value");return o}),f.fn=n.prototype={clone:function(){return f(this)},format:function(t,e){ +return a(this,t?t:y,void 0!==e?e:Math.round)},unformat:function(t){return"[object Number]"===Object.prototype.toString.call(t)?t:s(this,t?t:y)},value:function(){return this._value},valueOf:function(){return this._value},set:function(t){return this._value=Number(t),this},add:function(t){function e(t,e,o,i){return t+n*e}var n=p.call(null,this._value,t);return this._value=[this._value,t].reduce(e,0)/n,this},subtract:function(t){function e(t,e,o,i){return t-n*e}var n=p.call(null,this._value,t);return this._value=[t].reduce(e,this._value*n)/n,this},multiply:function(t){function e(t,e,n,o){var i=p(t,e);return t*i*(e*i)/(i*i)}return this._value=[this._value,t].reduce(e,1),this},divide:function(t){function e(t,e,n,o){var i=p(t,e);return t*i/(e*i)}return this._value=[this._value,t].reduce(e),this},difference:function(t){return Math.abs(f(this._value).subtract(t).value())}},I&&(t.exports=f),"undefined"==typeof ender&&(this.numeral=f),o=[],i=function(){return f}.apply(e,o),!(void 0!==i&&(t.exports=i))}.call(void 0)},function(t,e){"use strict";var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};!function(t){var e=37,o=null,i=function t(e){var n=arguments,o=!0,t=1;return e=e.replace(/%s/g,function(){var e=n[t++];return"undefined"==typeof e?(o=!1,""):e}),o?e:""},r=function(e,n,o,i){var r="";return t.each(e,function(t,e){return e[n]!==i||(r=e[o],!1)}),r},a=function(e,n){var o=-1;return t.each(e,function(t,e){return e.field!==n||(o=t,!1)}),o},s=function(){if(null===o){var e,n,i=t("

    ").addClass("fixed-table-scroll-inner"),r=t("

    ").addClass("fixed-table-scroll-outer");r.append(i),t("body").append(r),e=i[0].offsetWidth,r.css("overflow","scroll"),n=i[0].offsetWidth,e===n&&(n=r[0].clientWidth),r.remove(),o=e-n}return o},l=function(e,o,i,r){if("string"==typeof o){var a=o.split(".");a.length>1?(o=window,t.each(a,function(t,e){o=o[e]})):o=window[o]}return"object"==("undefined"==typeof o?"undefined":n(o))?o:"function"==typeof o?o.apply(e,i):r},A=function(t){return"string"==typeof t?t.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'"):t},c=function(e,n){this.options=n,this.$el=t(e),this.$el_=this.$el.clone(),this.timeoutId_=0,this.timeoutFooter_=0,this.init()};c.DEFAULTS={classes:"table table-hover",height:void 0,undefinedText:"-",sortName:void 0,sortOrder:"asc",striped:!1,columns:[],data:[],method:"get",url:void 0,cache:!0,contentType:"application/json",dataType:"json",ajaxOptions:{},queryParams:function(t){return t},queryParamsType:"limit",responseHandler:function(t){return t},pagination:!1,sidePagination:"client",totalRows:0,pageNumber:1,pageSize:10,pageList:[10,25,50,100],paginationHAlign:"right",paginationVAlign:"bottom",paginationDetailHAlign:"left",search:!1,searchAlign:"right",selectItemName:"btSelectItem",showHeader:!0,showFooter:!1,showColumns:!1,showPaginationSwitch:!1,showRefresh:!1,showToggle:!1,buttonsAlign:"right",smartDisplay:!0,minimumCountColumns:1,idField:void 0,uniqueId:void 0,cardView:!1,trimOnSearch:!0,clickToSelect:!1,singleSelect:!1,toolbar:void 0,toolbarAlign:"left",checkboxHeader:!0,sortable:!0,maintainSelected:!1,searchTimeOut:500,keyEvents:!1,searchText:"",iconSize:void 0,iconsPrefix:"glyphicon",icons:{paginationSwitchDown:"glyphicon-collapse-down icon-chevron-down",paginationSwitchUp:"glyphicon-collapse-up icon-chevron-up",refresh:"glyphicon-refresh icon-refresh",toggle:"glyphicon-list-alt icon-list-alt",columns:"glyphicon-th icon-th"},rowStyle:function(){return{}},rowAttributes:function(){return{}},onAll:function(){return!1},onClickRow:function(){return!1},onDblClickRow:function(){return!1},onSort:function(){return!1},onCheck:function(){return!1},onUncheck:function(){return!1},onCheckAll:function(){return!1},onUncheckAll:function(){return!1},onLoadSuccess:function(){return!1},onLoadError:function(){return!1},onColumnSwitch:function(){return!1},onColumnSearch:function(){return!1},onPageChange:function(){return!1},onSearch:function(){return!1},onPreBody:function(){return!1},onPostBody:function(){return!1},onPostHeader:function(){return!1}},c.LOCALES=[],c.LOCALES["en-US"]={formatLoadingMessage:function(){return"Loading, please wait..."},formatRecordsPerPage:function(t){return i("%s records per page",t)},formatShowingRows:function(t,e,n){return i("Showing %s to %s of %s rows",t,e,n)},formatSearch:function(){return"Search"},formatNoMatches:function(){return"No matching records found"},formatPaginationSwitch:function(){return"Hide/Show pagination"},formatRefresh:function(){return"Refresh"},formatToggle:function(){return"Toggle"},formatColumns:function(){return"Columns"},formatAllRows:function(){return"All"}},t.extend(c.DEFAULTS,c.LOCALES["en-US"]),c.COLUMN_DEFAULTS={radio:!1,checkbox:!1,checkboxEnabled:!0,field:void 0,title:void 0,class:void 0,align:void 0,halign:void 0,falign:void 0,valign:void 0,width:void 0,sortable:!1,order:"asc",visible:!0,switchable:!0,clickToSelect:!0,formatter:void 0,footerFormatter:void 0,events:void 0,sorter:void 0,cellStyle:void 0,searchable:!0,cardVisible:!0,filterControl:void 0},c.EVENTS={"all.bs.table":"onAll","click-row.bs.table":"onClickRow","dbl-click-row.bs.table":"onDblClickRow","sort.bs.table":"onSort","check.bs.table":"onCheck","uncheck.bs.table":"onUncheck","check-all.bs.table":"onCheckAll","uncheck-all.bs.table":"onUncheckAll","load-success.bs.table":"onLoadSuccess","load-error.bs.table":"onLoadError","column-switch.bs.table":"onColumnSwitch","column-search.bs.table":"onColumnSearch","page-change.bs.table":"onPageChange","search.bs.table":"onSearch","pre-body.bs.table":"onPreBody","post-body.bs.table":"onPostBody","post-header.bs.table":"onPostHeader"},c.prototype.init=function(){this.initContainer(),this.initTable(),this.initHeader(),this.initData(),this.initFooter(),this.initToolbar(),this.initPagination(),this.initBody(),this.initServer(),this.initKeyEvents()},c.prototype.initContainer=function(){this.$container=t(['
    ','
    ',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
    ':"",'
    ','
    ','
    ','
    ',this.options.formatLoadingMessage(),"
    ","
    ",'',"bottom"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?'
    ':"","
    ","
    "].join("")),this.$container.insertAfter(this.$el),this.$container.find(".fixed-table-body").append(this.$el),this.$container.after('
    '),this.$loading=this.$container.find(".fixed-table-loading"),this.$el.addClass(this.options.classes),this.options.striped&&this.$el.addClass("table-striped")},c.prototype.initTable=function(){var e=this,n=[],o=[];this.$header=this.$el.find("thead"),this.$header.length||(this.$header=t("").appendTo(this.$el)),this.$header.find("tr").length||this.$header.append(""),this.$header.find("th").each(function(){var e=t.extend({},{title:t(this).html(),class:t(this).attr("class")},t(this).data());n.push(e)}),this.options.columns=t.extend(!0,[],n,this.options.columns),t.each(this.options.columns,function(n,o){e.options.columns[n]=t.extend({},c.COLUMN_DEFAULTS,{field:n},o)}),this.options.data.length||(this.$el.find("tbody tr").each(function(){var n={};n._id=t(this).attr("id"),n._class=t(this).attr("class"),t(this).find("td").each(function(o){var i=e.options.columns[o].field;n[i]=t(this).html(),n["_"+i+"_id"]=t(this).attr("id"),n["_"+i+"_class"]=t(this).attr("class"),n["_"+i+"_data"]=t(this).data()}),o.push(n)}),this.options.data=o)},c.prototype.initHeader=function(){var n=this,o=[],r=[],a=!1,s=0;this.header={fields:[],styles:[],classes:[],formatters:[],events:[],sorters:[],cellStyles:[],clickToSelects:[],searchables:[]},t.each(this.options.columns,function(t,e){var s="",l="",A="",c="",u=i(' class="%s"',e.class),d=(n.options.sortOrder||e.order,"px"),g="hidden";if(e.visible&&(!n.options.cardView||e.cardVisible)){if(void 0!==e.width&&"string"==typeof e.width&&(e.width.indexOf("%")>-1&&(d="%"),e.width=e.width.replace("%","").replace("px","")),l=i("text-align: %s; ",e.halign?e.halign:e.align),A=i("text-align: %s; ",e.align),c=i("vertical-align: %s; ",e.valign),c+=i("width: %s"+d+"; ",e.checkbox||e.radio?36:e.width),o.push(e),n.header.fields.push(e.field),n.header.styles.push(A+c),n.header.classes.push(u),n.header.formatters.push(e.formatter),n.header.events.push(e.events),n.header.sorters.push(e.sorter),n.header.cellStyles.push(e.cellStyle),n.header.clickToSelects.push(e.clickToSelect),n.header.searchables.push(e.searchable),r.push(""),r.push(i('
    ',n.options.sortable&&e.sortable?"sortable":"")),s=e.title,n.options.sortName===e.field&&n.options.sortable&&e.sortable&&(s+=n.getCaretHtml()),e.checkbox&&(!n.options.singleSelect&&n.options.checkboxHeader&&(s=''),n.header.stateField=e.field),e.radio&&(s="",n.header.stateField=e.field,n.options.singleSelect=!0),r.push(s),r.push("
    "),r.push('
    '),r.push('
    '),e.filterControl&&e.searchable&&(a=!0,g="visible"),void 0!==e.filterControl)switch(e.filterControl.toLowerCase()){case"input":r.push(i('',g));break;case"select":r.push(i('',e.field,g))}else r.push('
    ');r.push("
    "),r.push("")}}),this.$header.find("tr").html(r.join("")),this.$header.find("th").each(function(e){t(this).data(o[e])}),this.$container.off("click",".th-inner").on("click",".th-inner",function(e){n.options.sortable&&t(this).parent().data().sortable&&n.onSort(e)}),!this.options.showHeader||this.options.cardView?(this.$header.hide(),this.$container.find(".fixed-table-header").hide(),this.$loading.css("top",0)):(this.$header.show(),this.$container.find(".fixed-table-header").show(),this.$loading.css("top",e+"px")),this.$selectAll=this.$header.find('[name="btSelectAll"]'),this.$container.off("click",'[name="btSelectAll"]').on("click",'[name="btSelectAll"]',function(){var e=t(this).prop("checked");n[e?"checkAll":"uncheckAll"]()}),a?(this.$header.off("keyup","input").on("keyup","input",function(t){clearTimeout(s),s=setTimeout(function(){n.onColumnSearch(t)},n.options.searchTimeOut)}),this.$header.off("change","select").on("change","select",function(t){clearTimeout(s),s=setTimeout(function(){n.onColumnSearch(t)},n.options.searchTimeOut)})):this.$header.find(".filterControl").hide()},c.prototype.initFooter=function(){this.$footer=this.$container.find(".fixed-table-footer"),!this.options.showFooter||this.options.cardView?this.$footer.hide():this.$footer.show()},c.prototype.initData=function(t,e){this.data="append"===e?this.data.concat(t):"prepend"===e?[].concat(t).concat(this.data):t||this.options.data,this.options.data=this.data,"server"!==this.options.sidePagination&&this.initSort()},c.prototype.initSort=function(){var e=this,n=this.options.sortName,o="desc"===this.options.sortOrder?-1:1,i=t.inArray(this.options.sortName,this.header.fields);-1!==i&&this.data.sort(function(r,a){var s=r[n],A=a[n],c=l(e.header,e.header.sorters[i],[s,A]);return void 0!==c?o*c:void 0!==c?o*c:((void 0===s||null===s)&&(s=""),(void 0===A||null===A)&&(A=""),t.isNumeric(s)&&t.isNumeric(A)?(s=parseFloat(s),A=parseFloat(A),A>s?-1*o:o):s===A?0:("string"!=typeof s&&(s=s.toString()),-1===s.localeCompare(A)?-1*o:o))})},c.prototype.onSort=function(e){var n=t(e.currentTarget).parent(),o=this.$header.find("th").eq(n.index());return this.$header.add(this.$header_).find("span.order").remove(),this.options.sortName===n.data("field")?this.options.sortOrder="asc"===this.options.sortOrder?"desc":"asc":(this.options.sortName=n.data("field"),this.options.sortOrder="asc"===n.data("order")?"desc":"asc"),this.trigger("sort",this.options.sortName,this.options.sortOrder),n.add(o).data("order",this.options.sortOrder).find(".th-inner").append(this.getCaretHtml()),"server"===this.options.sidePagination?void this.initServer():(this.initSort(),void this.initBody())},c.prototype.initToolbar=function(){var e,n,o=this,r=[],a=0,s=0;this.$toolbar=this.$container.find(".fixed-table-toolbar").html(""),"string"==typeof this.options.toolbar&&t(i('
    ',this.options.toolbarAlign)).appendTo(this.$toolbar).append(t(this.options.toolbar)),r=[i('
    ',this.options.buttonsAlign,this.options.buttonsAlign)],"string"==typeof this.options.icons&&(this.options.icons=l(null,this.options.icons)),this.options.showPaginationSwitch&&r.push(i('"),this.options.showRefresh&&r.push(i('"),this.options.showToggle&&r.push(i('"),this.options.showColumns&&(r.push(i('
    ',this.options.formatColumns()),'",'","
    ")),r.push("
    "),(this.showToolbar||r.length>2)&&this.$toolbar.append(r.join("")),this.options.showPaginationSwitch&&this.$toolbar.find('button[name="paginationSwitch"]').off("click").on("click",t.proxy(this.togglePagination,this)),this.options.showRefresh&&this.$toolbar.find('button[name="refresh"]').off("click").on("click",t.proxy(this.refresh,this)),this.options.showToggle&&this.$toolbar.find('button[name="toggle"]').off("click").on("click",function(){o.toggleView()}),this.options.showColumns&&(e=this.$toolbar.find(".keep-open"),s<=this.options.minimumCountColumns&&e.find("input").prop("disabled",!0),e.find("li").off("click").on("click",function(t){t.stopImmediatePropagation()}),e.find("input").off("click").on("click",function(){var e=t(this);o.toggleColumn(e.val(),e.prop("checked"),!1),o.trigger("column-switch",t(this).data("field"),e.prop("checked"))})),this.options.search&&(r=[],r.push('"),this.$toolbar.append(r.join("")),n=this.$toolbar.find(".search input"),n.off("keyup").on("keyup",function(t){clearTimeout(a),a=setTimeout(function(){o.onSearch(t)},o.options.searchTimeOut)}),""!==this.options.searchText&&(n.val(this.options.searchText),clearTimeout(a),a=setTimeout(function(){n.trigger("keyup")},o.options.searchTimeOut)))},c.prototype.onSearch=function(e){var n=t.trim(t(e.currentTarget).val());this.options.trimOnSearch&&t(e.currentTarget).val()!==n&&t(e.currentTarget).val(n),n!==this.searchText&&(this.searchText=n,this.options.pageNumber=1,this.initSearch(),this.updatePagination(),this.trigger("search",n))},c.prototype.onColumnSearch=function(e){var n=t.trim(t(e.currentTarget).val()),o=t(e.currentTarget).parent().parent().data("field");t.isEmptyObject(this.filterColumnsPartial)&&(this.filterColumnsPartial={}),n?this.filterColumnsPartial[o]=n:delete this.filterColumnsPartial[o],this.options.pageNumber=1,this.initSearch(),this.updatePagination()},c.prototype.initSearch=function(){var e=this;if("server"!==this.options.sidePagination){var n=this.searchText&&this.searchText.toLowerCase(),o=t.isEmptyObject(this.filterColumns)?null:this.filterColumns,i=t.isEmptyObject(this.filterColumnsPartial)?null:this.filterColumnsPartial;this.data=o?t.grep(this.options.data,function(t){for(var e in o)if(t[e]!==o[e])return!1;return!0}):this.options.data,this.data=i?t.grep(this.data,function(n,o){for(var r in i){var a=i[r].toLowerCase(),s=n[r];if(s=l(e.header,e.header.formatters[t.inArray(r,e.header.fields)],[s,n,o],s),-1===t.inArray(r,e.header.fields)||"string"!=typeof s&&"number"!=typeof s||-1===(s+"").toLowerCase().indexOf(a))return!1}return!0}):this.data,this.data=n?t.grep(this.data,function(o,i){for(var r in o){r=t.isNumeric(r)?parseInt(r,10):r;var a=o[r];a=l(e.header,e.header.formatters[t.inArray(r,e.header.fields)],[a,o,i],a);var s=t.inArray(r,e.header.fields);if(-1!==s&&e.header.searchables[s]&&("string"==typeof a||"number"==typeof a)&&-1!==(a+"").toLowerCase().indexOf(n))return!0}return!1}):this.data}},c.prototype.initPagination=function(){if(this.$pagination=this.$container.find(".fixed-table-pagination"),!this.options.pagination)return void this.$pagination.hide();this.$pagination.show();var e,n,o,r,a,s,l,A,c,u=this,d=[],g=!1,h=this.getData();if("server"!==this.options.sidePagination&&(this.options.totalRows=h.length),this.totalPages=0,this.options.totalRows){if(this.options.pageSize===this.options.formatAllRows())this.options.pageSize=this.options.totalRows,g=!0;else if(this.options.pageSize===this.options.totalRows){var p="string"==typeof this.options.pageList?this.options.pageList.replace("[","").replace("]","").replace(/ /g,"").toLowerCase().split(","):this.options.pageList;p.indexOf(this.options.formatAllRows().toLowerCase())>-1&&(g=!0)}this.totalPages=~~((this.options.totalRows-1)/this.options.pageSize)+1,this.options.totalPages=this.totalPages}this.totalPages>0&&this.options.pageNumber>this.totalPages&&(this.options.pageNumber=this.totalPages),this.pageFrom=(this.options.pageNumber-1)*this.options.pageSize+1,this.pageTo=this.options.pageNumber*this.options.pageSize,this.pageTo>this.options.totalRows&&(this.pageTo=this.options.totalRows),d.push('
    ','',this.options.formatShowingRows(this.pageFrom,this.pageTo,this.options.totalRows),""),d.push('');var f=[i('',"top"===this.options.paginationVAlign||"both"===this.options.paginationVAlign?"dropdown":"dropup"),'",'"),d.push(this.options.formatRecordsPerPage(f.join(""))),d.push(""),d.push("
    ",'
    ','
      ','
    • <<
    • ','
    • <
    • '),this.totalPages<5?(n=1,o=this.totalPages):(n=this.options.pageNumber-2,o=n+4,1>n&&(n=1,o=5),o>this.totalPages&&(o=this.totalPages,n=o-4)),e=n;o>=e;e++)d.push('
    • ','',e,"","
    • ");d.push('
    • >
    • ','
    • >>
    • ',"
    ","
    "),this.$pagination.html(d.join("")),r=this.$pagination.find(".page-list a"),a=this.$pagination.find(".page-first"),s=this.$pagination.find(".page-pre"),l=this.$pagination.find(".page-next"),A=this.$pagination.find(".page-last"),c=this.$pagination.find(".page-number"),this.options.pageNumber<=1&&(a.addClass("disabled"),s.addClass("disabled")),this.options.pageNumber>=this.totalPages&&(l.addClass("disabled"),A.addClass("disabled")),this.options.smartDisplay&&(this.totalPages<=1&&this.$pagination.find("div.pagination").hide(),(M.length<2||this.options.totalRows<=M[0])&&this.$pagination.find("span.page-list").hide(),this.$pagination[this.getData().length?"show":"hide"]()),g&&(this.options.pageSize=this.options.formatAllRows()),r.off("click").on("click",t.proxy(this.onPageListChange,this)),a.off("click").on("click",t.proxy(this.onPageFirst,this)),s.off("click").on("click",t.proxy(this.onPagePre,this)),l.off("click").on("click",t.proxy(this.onPageNext,this)),A.off("click").on("click",t.proxy(this.onPageLast,this)),c.off("click").on("click",t.proxy(this.onPageNumber,this))},c.prototype.updatePagination=function(e){e&&t(e.currentTarget).hasClass("disabled")||(this.options.maintainSelected||this.resetRows(),this.initPagination(),"server"===this.options.sidePagination?this.initServer():this.initBody(),this.trigger("page-change",this.options.pageNumber,this.options.pageSize))},c.prototype.onPageListChange=function(e){var n=t(e.currentTarget);n.parent().addClass("active").siblings().removeClass("active"),this.options.pageSize=n.text().toUpperCase()===this.options.formatAllRows().toUpperCase()?this.options.formatAllRows():+n.text(),this.$toolbar.find(".page-size").text(this.options.pageSize),this.updatePagination(e)},c.prototype.onPageFirst=function(t){this.options.pageNumber=1,this.updatePagination(t)},c.prototype.onPagePre=function(t){this.options.pageNumber--,this.updatePagination(t)},c.prototype.onPageNext=function(t){this.options.pageNumber++,this.updatePagination(t)},c.prototype.onPageLast=function(t){this.options.pageNumber=this.totalPages,this.updatePagination(t)},c.prototype.onPageNumber=function(e){this.options.pageNumber!==+t(e.currentTarget).text()&&(this.options.pageNumber=+t(e.currentTarget).text(),this.updatePagination(e))},c.prototype.initBody=function(e){var n=this,o=[],s=this.getData();this.trigger("pre-body",s),this.$body=this.$el.find("tbody"),this.$body.length||(this.$body=t("").appendTo(this.$el)),this.options.pagination&&"server"!==this.options.sidePagination||(this.pageFrom=1,this.pageTo=s.length);for(var c=this.pageFrom-1;c"),this.options.cardView&&o.push(i('',this.header.fields.length)),t.each(this.header.fields,function(e,s){var A="",u=d[s],p="",f={},M="",w=n.header.classes[e],T="",C=n.options.columns[a(n.options.columns,s)];if(g=i('style="%s"',h.concat(n.header.styles[e]).join("; ")),u=l(n.header,n.header.formatters[e],[u,d,c],u),d["_"+s+"_id"]&&(M=i(' id="%s"',d["_"+s+"_id"])),d["_"+s+"_class"]&&(w=i(' class="%s"',d["_"+s+"_class"])),f=l(n.header,n.header.cellStyles[e],[u,d,c],f),f.classes&&(w=i(' class="%s"',f.classes)),f.css){var y=[];for(var I in f.css)y.push(I+": "+f.css[I]);g=i('style="%s"',y.concat(n.header.styles[e]).join("; "))}if(d["_"+s+"_data"]&&!t.isEmptyObject(d["_"+s+"_data"])&&t.each(d["_"+s+"_data"],function(t,e){"index"!==t&&(T+=i(' data-%s="%s"',t,e))}),C.checkbox||C.radio)p=C.checkbox?"checkbox":p,p=C.radio?"radio":p,A=[n.options.cardView?'
    ':'',"",n.options.cardView?"
    ":""].join("");else{if(u="undefined"==typeof u||null===u?n.options.undefinedText:u,A=n.options.cardView?['
    ',n.options.showHeader?i('%s',g,r(n.options.columns,"field","title",s)):"",i('%s',u),"
    "].join(""):[i("",M,w,g,T),u,""].join(""),void 0!==C.filterControl&&"select"===C.filterControl.toLowerCase()&&C.searchable){var E,m=t("."+C.field),N=0,b=!1;if(void 0!==m)if(E=m.get(0).options,0===E.length)m.append(t("").attr("value","").text("")),m.append(t("").attr("value",u).text(u));else{for(;N").attr("value",u).text(u))}}n.options.cardView&&n.options.smartDisplay&&""===u&&(A="")}o.push(A)}),this.options.cardView&&o.push(""),o.push("")}o.length||o.push('',i('%s',this.header.fields.length,this.options.formatNoMatches()),""),this.$body.html(o.join("")),e||this.scrollTo(0),this.$body.find("> tr > td").off("click").on("click",function(){var e=t(this).parent();n.trigger("click-row",n.data[e.data("index")],e),n.options.clickToSelect&&n.header.clickToSelects[e.children().index(t(this))]&&e.find(i('[name="%s"]',n.options.selectItemName))[0].click()}),this.$body.find("tr").off("dblclick").on("dblclick",function(){n.trigger("dbl-click-row",n.data[t(this).data("index")],t(this))}),this.$selectItem=this.$body.find(i('[name="%s"]',this.options.selectItemName)),this.$selectItem.off("click").on("click",function(e){e.stopImmediatePropagation();var o=t(this).prop("checked"),i=n.data[t(this).data("index")];i[n.header.stateField]=o,n.trigger(o?"check":"uncheck",i),n.options.singleSelect&&(n.$selectItem.not(this).each(function(){n.data[t(this).data("index")][n.header.stateField]=!1}),n.$selectItem.filter(":checked").not(this).prop("checked",!1)),n.updateSelected()}),t.each(this.header.events,function(e,o){if(o){"string"==typeof o&&(o=l(null,o));for(var i in o)n.$body.find("tr").each(function(){var r=t(this),a=r.find(n.options.cardView?".card-view":"td").eq(e),s=i.indexOf(" "),l=i.substring(0,s),A=i.substring(s+1),c=o[i];a.find(A).off(l).on(l,function(t){var o=r.data("index"),i=n.data[o],a=i[n.header.fields[e]];c.apply(this,[t,a,i,o])})})}}),this.updateSelected(),this.resetView(),this.trigger("post-body")},c.prototype.initServer=function(e,n){var o=this,i={},r={pageSize:this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,pageNumber:this.options.pageNumber,searchText:this.searchText,sortName:this.options.sortName,sortOrder:this.options.sortOrder};this.options.url&&("limit"===this.options.queryParamsType&&(r={search:r.searchText,sort:r.sortName,order:r.sortOrder},this.options.pagination&&(r.limit=this.options.pageSize===this.options.formatAllRows()?this.options.totalRows:this.options.pageSize,r.offset=this.options.pageSize===this.options.formatAllRows()?0:this.options.pageSize*(this.options.pageNumber-1))),t.isEmptyObject(this.filterColumnsPartial)||(r.filter=JSON.stringify(this.filterColumnsPartial,null)),i=l(this.options,this.options.queryParams,[r],i),t.extend(i,n||{}),i!==!1&&(e||this.$loading.show(),t.ajax(t.extend({},l(null,this.options.ajaxOptions),{type:this.options.method,url:this.options.url,data:"application/json"===this.options.contentType&&"post"===this.options.method?JSON.stringify(i):i,cache:this.options.cache,contentType:this.options.contentType,dataType:this.options.dataType,success:function(t){t=l(o.options,o.options.responseHandler,[t],t),o.load(t),o.trigger("load-success",t)},error:function(t){o.trigger("load-error",t.status)},complete:function(){e||o.$loading.hide()}}))))},c.prototype.initKeyEvents=function(){if(this.options.keyEvents){var e=this;t(document).off("keypress").on("keypress",function(t){var n=e.$toolbar.find(".search input"),o=e.$toolbar.find('button[name="refresh"]'),i=e.$toolbar.find('button[name="toggle"]'),r=e.$toolbar.find('button[name="paginationSwitch"]');switch(t.keyCode){case 115:case 83:if(!e.options.search)return;return document.activeElement===n.get(0)||(n.focus(),!1);case 114:case 82:if(!e.options.showRefresh)return;return document.activeElement===n.get(0)||(o.click(),!1);case 116:case 84:if(!e.options.showToggle)return;return document.activeElement===n.get(0)||(i.click(),!1);case 112:case 80:if(!e.options.showPaginationSwitch)return;return document.activeElement===n.get(0)||(r.click(),!1)}})}},c.prototype.getCaretHtml=function(){return['','',""].join("")},c.prototype.updateSelected=function(){var e=this.$selectItem.filter(":enabled").length===this.$selectItem.filter(":enabled").filter(":checked").length;this.$selectAll.add(this.$selectAll_).prop("checked",e),this.$selectItem.each(function(){t(this).parents("tr")[t(this).prop("checked")?"addClass":"removeClass"]("selected")})},c.prototype.updateRows=function(e){var n=this;this.$selectItem.each(function(){n.data[t(this).data("index")][n.header.stateField]=e})},c.prototype.resetRows=function(){var e=this;t.each(this.data,function(t,n){e.$selectAll.prop("checked",!1),e.$selectItem.prop("checked",!1),n[e.header.stateField]=!1})},c.prototype.trigger=function(e){var n=Array.prototype.slice.call(arguments,1);e+=".bs.table",this.options[c.EVENTS[e]].apply(this.options,n),this.$el.trigger(t.Event(e),n),this.options.onAll(e,n),this.$el.trigger(t.Event("all.bs.table"),[e,n])},c.prototype.resetHeader=function(){this.$el.css("margin-top",-this.$header.height()),clearTimeout(this.timeoutId_),this.timeoutId_=setTimeout(t.proxy(this.fitHeader,this),this.$el.is(":hidden")?100:0)},c.prototype.fitHeader=function(){var e,n,o,i=this;return i.$el.is(":hidden")?void(i.timeoutFooter_=setTimeout(t.proxy(i.fitHeader,i),100)):(e=i.$container.find(".fixed-table-header"),n=i.$container.find(".fixed-table-body"),o=i.$el.width()>n.width()?s():0,i.$header_=i.$header.clone(!0,!0),i.$selectAll_=i.$header_.find('[name="btSelectAll"]'),e.css({"margin-right":o}).find("table").css("width",i.$el.css("width")).html("").attr("class",i.$el.attr("class")).append(i.$header_),i.$header.find("th").each(function(e){i.$header_.find("th").eq(e).data(t(this).data())}),i.$body.find("tr:first-child:not(.no-records-found) > *").each(function(e){i.$header_.find("div.fht-cell").eq(e).width(t(this).innerWidth())}),n.off("scroll").on("scroll",function(){ +e.scrollLeft(t(this).scrollLeft())}),void i.trigger("post-header"))},c.prototype.resetFooter=function(){var e=this,n=e.getData(),o=[];this.options.showFooter&&!this.options.cardView&&(t.each(this.options.columns,function(t,r){var a="",s="",A=i(' class="%s"',r.class);r.visible&&(!e.options.cardView||r.cardVisible)&&(a=i("text-align: %s; ",r.falign?r.falign:r.align),s=i("vertical-align: %s; ",r.valign),o.push(""),o.push(l(r,r.footerFormatter,[n]," ")||" "),o.push(""))}),this.$footer.find("tr").html(o.join("")),clearTimeout(this.timeoutFooter_),this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),this.$el.is(":hidden")?100:0))},c.prototype.fitFooter=function(){var e,n,o,i;return clearTimeout(this.timeoutFooter_),this.$el.is(":hidden")?void(this.timeoutFooter_=setTimeout(t.proxy(this.fitFooter,this),100)):(e=this.$container.find(".fixed-table-body"),o=this.$el.css("width"),i=o>e.width()?s():0,this.$footer.css({"margin-right":i}).find("table").css("width",o).attr("class",this.$el.attr("class")),n=this.$footer.find("td"),void e.find("tbody tr:first-child:not(.no-records-found) > td").each(function(e){n.eq(e).outerWidth(t(this).outerWidth())}))},c.prototype.toggleColumn=function(t,e,n){if(-1!==t&&(this.options.columns[t].visible=e,this.initHeader(),this.initSearch(),this.initPagination(),this.initBody(),this.options.showColumns)){var o=this.$toolbar.find(".keep-open input").prop("disabled",!1);n&&o.filter(i('[value="%s"]',t)).prop("checked",e),o.filter(":checked").length<=this.options.minimumCountColumns&&o.filter(":checked").prop("disabled",!0)}},c.prototype.toggleRow=function(e,n,o){-1!==e&&t(this.$body[0]).children().filter(i(n?'[value="%s"]':'[data-index="%s"]',e))[o?"show":"hide"]()},c.prototype.resetView=function(t){var n=this,o=0,i=n.$container.find(".fixed-table-container");if(t&&t.height&&(this.options.height=t.height),this.$selectAll.prop("checked",this.$selectItem.length>0&&this.$selectItem.length===this.$selectItem.filter(":checked").length),this.options.height){var r=+this.$toolbar.children().outerHeight(!0),a=+this.$pagination.children().outerHeight(!0),s=this.options.height-r-a;i.css("height",s+"px")}return this.options.cardView?(n.$el.css("margin-top","0"),void i.css("padding-bottom","0")):(this.options.showHeader&&this.options.height?(this.$container.find(".fixed-table-header").show(),this.resetHeader(),o+=e):(this.$container.find(".fixed-table-header").hide(),this.trigger("post-header")),this.options.showFooter&&(this.resetFooter(),this.options.height&&(o+=e)),void i.css("padding-bottom",o+"px"))},c.prototype.getData=function(){return!this.searchText&&t.isEmptyObject(this.filterColumns)&&t.isEmptyObject(this.filterColumnsPartial)?this.options.data:this.data},c.prototype.load=function(e){var n=!1;"server"===this.options.sidePagination?(this.options.totalRows=e.total,n=e.fixedScroll,e=e.rows):t.isArray(e)||(n=e.fixedScroll,e=e.data),this.initData(e),this.initSearch(),this.initPagination(),this.initBody(n)},c.prototype.append=function(t){this.initData(t,"append"),this.initSearch(),this.initPagination(),this.initBody(!0)},c.prototype.prepend=function(t){this.initData(t,"prepend"),this.initSearch(),this.initPagination(),this.initBody(!0)},c.prototype.remove=function(e){var n,o,i=this.options.data.length;if(e.hasOwnProperty("field")&&e.hasOwnProperty("values")){for(n=i-1;n>=0;n--)o=this.options.data[n],o.hasOwnProperty(e.field)&&-1!==t.inArray(o[e.field],e.values)&&this.options.data.splice(n,1);i!==this.options.data.length&&(this.initSearch(),this.initPagination(),this.initBody(!0))}},c.prototype.insertRow=function(t){t.hasOwnProperty("index")&&t.hasOwnProperty("row")&&(this.data.splice(t.index,0,t.row),this.initSearch(),this.initPagination(),this.initBody(!0))},c.prototype.updateRow=function(e){e.hasOwnProperty("index")&&e.hasOwnProperty("row")&&(t.extend(this.data[e.index],e.row),this.initBody(!0))},c.prototype.showRow=function(t){t.hasOwnProperty("index")&&this.toggleRow(t.index,void 0!==t.isIdField,!0)},c.prototype.hideRow=function(t){t.hasOwnProperty("index")&&this.toggleRow(t.index,void 0!==t.isIdField,!1)},c.prototype.getRowsHidden=function(e){var n=t(this.$body[0]).children().filter(":hidden"),o=0;if(e)for(;oi||0>r||i>=this.data.length)){for(n=i;i+a>n;n++)for(o=r;r+s>o;o++)l.eq(n).find("td").eq(o).hide();A.attr("rowspan",a).attr("colspan",s).show()}},c.prototype.getOptions=function(){return this.options},c.prototype.getSelections=function(){var e=this;return t.grep(this.data,function(t){return t[e.header.stateField]})},c.prototype.checkAll=function(){this.checkAll_(!0)},c.prototype.uncheckAll=function(){this.checkAll_(!1)},c.prototype.checkAll_=function(t){var e;t||(e=this.getSelections()),this.$selectItem.filter(":enabled").prop("checked",t),this.updateRows(t),this.updateSelected(),t&&(e=this.getSelections()),this.trigger(t?"check-all":"uncheck-all",e)},c.prototype.check=function(t){this.check_(!0,t)},c.prototype.uncheck=function(t){this.check_(!1,t)},c.prototype.check_=function(t,e){this.$selectItem.filter(i('[data-index="%s"]',e)).prop("checked",t),this.data[e][this.header.stateField]=t,this.updateSelected(),this.trigger(t?"check":"uncheck",this.data[e])},c.prototype.checkBy=function(t){this.checkBy_(!0,t)},c.prototype.uncheckBy=function(t){this.checkBy_(!1,t)},c.prototype.checkBy_=function(e,n){if(n.hasOwnProperty("field")&&n.hasOwnProperty("values")){var o=this;t.each(this.options.data,function(r,a){return!!a.hasOwnProperty(n.field)&&void(-1!==t.inArray(a[n.field],n.values)&&(o.$selectItem.filter(i('[data-index="%s"]',r)).prop("checked",e),a[o.header.stateField]=e,o.trigger(e?"check":"uncheck",a)))}),this.updateSelected()}},c.prototype.destroy=function(){this.$el.insertBefore(this.$container),t(this.options.toolbar).insertBefore(this.$el),this.$container.next().remove(),this.$container.remove(),this.$el.html(this.$el_.html()).css("margin-top","0").attr("class",this.$el_.attr("class")||"")},c.prototype.showLoading=function(){this.$loading.show()},c.prototype.hideLoading=function(){this.$loading.hide()},c.prototype.togglePagination=function(){this.options.pagination=!this.options.pagination;var t=this.$toolbar.find('button[name="paginationSwitch"] i');this.options.pagination?t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchDown):t.attr("class",this.options.iconsPrefix+" "+this.options.icons.paginationSwitchUp),this.updatePagination()},c.prototype.refresh=function(t){t&&t.url&&(this.options.url=t.url,this.options.pageNumber=1),this.initServer(t&&t.silent,t&&t.query)},c.prototype.showColumn=function(t){this.toggleColumn(a(this.options.columns,t),!0,!0)},c.prototype.hideColumn=function(t){this.toggleColumn(a(this.options.columns,t),!1,!0)},c.prototype.filterBy=function(e){this.filterColumns=t.isEmptyObject(e)?{}:e,this.options.pageNumber=1,this.initSearch(),this.updatePagination()},c.prototype.scrollTo=function(t){var e=this.$container.find(".fixed-table-body");"string"==typeof t&&(t="bottom"===t?e[0].scrollHeight:0),"number"==typeof t&&e.scrollTop(t)},c.prototype.selectPage=function(t){t>0&&t<=this.options.totalPages&&(this.options.pageNumber=t,this.updatePagination())},c.prototype.prevPage=function(){this.options.pageNumber>1&&(this.options.pageNumber--,this.updatePagination())},c.prototype.nextPage=function(){this.options.pageNumber.");return t.css({height:"20px",cursor:"pointer",margin:"0px",color:"white",border:"dashed transparent 1px"}),t.mouseover(function(){t.css({border:"dashed gray 1px"})}),t.mouseout(function(){t.css({border:"dashed transparent 1px"})}),t},window.refreshParameterLibraries=function(){for(var t="",e=0;e"),e=o[0],this._dom=e,n=this.menuItems;var i=this;if(n.length>20){var r=$("
    ");r.append(" "),this.search=$(""),r.append(this.search),o.append(r),this.search.click(function(t){t.stopPropagation()}),this.search.dblclick(function(t){t.stopPropagation()}),this.search.keypress(function(t){var e=t.keyCode?t.keyCode:t.which;if("13"===e||13===e){var o=$(this).val();if(!i.oldSearchValue||i.oldSearchValue!==o){for(i.oldSearchValue=o;i.menuItems.length>0;)i.menuItems[0].remove();for(var r=0;r-1&&i.addMenuItem(a):i.addMenuItem(a)}}}})}this.menuItems=[];for(var a=0;a$("html").height()+10&&t.pageY>r?e.addClass("dropdown-context-up").css({top:t.pageY-20-r,left:t.pageX-13}).fadeIn(this.fadeSpeed):e.css({top:t.pageY+10,left:t.pageX-13}).fadeIn(this.fadeSpeed)}this.onShow&&this.onShow(this)},URule.menu.Menu.prototype.hide=function(){var t=$(this._dom);t.is(":visible")&&(this.onHide&&this.onHide(this),t.fadeOut(this.fadeSpeed,function(){t.css({display:""}).find(".drop-left").removeClass("drop-left")}),this.parent&&this.parent.parent.hide())},URule.menu.MenuItem=function(t){URule.menu.MenuItem.prototype.superClass.call(this,t),$.extend(this,t)},URule.menu.MenuItem.prototype=new URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.superClass=URule.menu.AbstractMenu,URule.menu.MenuItem.prototype.constructor=URule.menu.MenuItem,URule.menu.MenuItem.prototype.createDom=function(){var t,e,n;return n=this,t=$("
  • "),this._dom=t[0],e=this.icon?" "+this.label:this.label,t.on("mouseenter",function(){t.siblings(".dropdown-submenu").each(function(){$(this).find("ul.dropdown-context-sub").each(function(){var t=$(this).data("ref");$(this).fadeOut(t.fadeSpeed)})})}),"divider"===this.type?(t.addClass("divider"),t.append(e)):"header"==this.type?(t.addClass("nav-header"),t.append(e)):(t.append(""+e+""),this.subMenu&&this.setSubMenu(this.subMenu)),n.onClick&&(this.parent&&this.parent.search?(t.click(function(t){t.stopPropagation()}),t.dblclick(function(t){n.onClick(n,{event:t}),t.preventDefault(),t.stopPropagation(),n.parent.hide()})):t.click(function(t){t.preventDefault(),t.stopPropagation(),n.onClick(n,{event:t}),n.parent.hide()})),t[0]},URule.menu.MenuItem.prototype.setSubMenu=function(t){var e,n;return n=this,e=n.getDom(),t instanceof URule.menu.Menu?n.subMenu=t:n.subMenu=new URule.menu.Menu(t),n.subMenu.parent=this,$(e).attr("class","dropdown-submenu").on("mouseenter",function(){var t=$(this).find(".dropdown-context-sub:first"),e=t.width(),o=t.offset().left,i=e+o>window.innerWidth;i&&t.addClass("drop-left"),$(n.subMenu.getDom()).fadeIn(n.subMenu.fadeSpeed)}),this.subMenu.render(e),$(this.subMenu.getDom()).addClass("dropdown-context-sub"),this.subMenu},URule.menu.MenuItem.prototype.remove=function(){URule.menu.MenuItem.prototype.superClass.prototype.remove.call(this);var t;t=this.parent.menuItems.indexOf(this),this.parent.menuItems.splice(t,1)},URule.menu.MenuItem.prototype.show=function(){$(this._dom).show()},URule.menu.MenuItem.prototype.hide=function(){$(this._dom).hide()},$(document).on("dblclick","html",function(){$(".dropdown-context").each(function(){var t;t=$(this).data("ref"),t.hide()})}),URule.menu.AbstractMenu.preventDoubleContext&&$(document).on("contextmenu",".dropdown-context",function(t){t.preventDefault()})}()},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(245),r=o(i);urule.Context=function(t,e){this.container=t,this.paper=new r.default(this.container.get(0),"100%","100%"),this.rule=e,this.rootJoin=null},urule.Context.prototype.putToNamedMap=function(t,e){this.rule.namedMap.set(t,e)},urule.Context.prototype.deleteFromNamedMap=function(t){this.rule.namedMap.delete(t)},urule.Context.prototype.getVariableCategoryFromNamedMap=function(t){return this.rule.namedMap.get(t)},urule.Context.prototype.getCanvas=function(){return this.container},urule.Context.prototype.getPaper=function(){return this.paper},urule.Context.prototype.setRootJoin=function(t){this.rootJoin=t},urule.Context.prototype.getRootJoin=function(){return this.rootJoin},urule.Context.prototype.getTotalChildrenCount=function(){return this.rootJoin.getChildrenCount()}},,,,,,,,function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigActionDialog=function(t){this.parent=t,this.init()},urule.ConfigActionDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("动作库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ActionLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.actionLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("动作库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.actionLibraries.push(o),window.refreshActionLibraries(),void window._setDirty())}})}}])},urule.ConfigActionDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    动作库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.actionLibraries.indexOf(t);window.actionLibraries.splice(n,1),e.remove(),window.refreshActionLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0}),e.eventEmitter=e.HIDE_VERSION_SELECT_DIALOG=e.OPEN_VERSION_SELECT_DIALOG=e.HIDE_KNOWLEDGE_TREE_DIALOG=e.OPEN_KNOWLEDGE_TREE_DIALOG=e.TREE_DIR_NODE_CLICK=e.TREE_NODE_CLICK=e.HIDE_LOADING=e.SHOW_LOADING=void 0;var i=n(240),r=o(i);e.SHOW_LOADING="show_loading",e.HIDE_LOADING="hide_loading",e.TREE_NODE_CLICK="tree_node_click",e.TREE_DIR_NODE_CLICK="tree_dir_node_click",e.OPEN_KNOWLEDGE_TREE_DIALOG="open_knowledge_tree_dialog",e.HIDE_KNOWLEDGE_TREE_DIALOG="hide_knowledge_tree_dialog",e.OPEN_VERSION_SELECT_DIALOG="open_version_select_dialog",e.HIDE_VERSION_SELECT_DIALOG="hide_version_select_dialog",e.eventEmitter=new r.default.EventEmitter},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigConstantDialog=function(t){this.parent=t,this.init()},urule.ConfigConstantDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("常量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ConstantLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.constantLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("常量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.constantLibraries.push(o),window.refreshConstantLibraries(),void window._setDirty())}})}}])},urule.ConfigConstantDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    常量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.constantLibraries.indexOf(t);window.constantLibraries.splice(n,1),e.remove(),window.refreshConstantLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigParameterDialog=function(t){this.parent=t,this.init()},urule.ConfigParameterDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("参数库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"ParameterLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.parameterLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("参数库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.parameterLibraries.push(o),window.refreshParameterLibraries(),void window._setDirty())}})}}])},urule.ConfigParameterDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    参数库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.parameterLibraries.indexOf(t);window.parameterLibraries.splice(n,1),e.remove(),window.refreshParameterLibraries(),window._setDirty()}),e.append(n),e}},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}var i=n(241),r=n(339),a=o(r);urule.ConfigVariableDialog=function(t){this.parent=t,this.init()},urule.ConfigVariableDialog.prototype.open=function(){var t=this;i.MsgBox.showDialog("变量库配置",this.dialogContent,[{name:"添加",holdDialog:!0,click:function(){a.eventEmitter.emit(a.OPEN_KNOWLEDGE_TREE_DIALOG,{project:window._project,fileType:"VariableLibrary",callback:function(e,n){var o="jcr:"+e;"LATEST"!==n&&(o+=":"+n);var r=window.variableLibraries.indexOf(o);return r!==-1?void i.MsgBox.alert("变量库文件已存在"):(t.tbody.append(t.newLibRow(o)),window.variableLibraries.push(o),window.refreshVariableLibraries(),void window._setDirty())}})}}])},urule.ConfigVariableDialog.prototype.init=function(){var t=$('\n\t\t\n\t\t\t\n\t\t\n\t
    变量库文件操作
    ');this.tbody=$(""),t.append(this.tbody),this.dialogContent=$("
    "),this.dialogContent.append(t);for(var e=0;e\n\t\t\t"+t+"\n\t\t"),n=$(""),o=$('');return n.append(o),o.click(function(){var n=window.variableLibraries.indexOf(t);window.variableLibraries.splice(n,1),e.remove(),window.refreshVariableLibraries(),window._setDirty()}),e.append(n),e}},,,,,,,,,,,,,,,,,,,,,,,,function(t,e){"use strict";!function(t){function e(){function e(t){A=this,a=t;var e=this.view.wt.wtTable.getCoords(t).col;if(e>=0){s=e;var n=a.getBoundingClientRect();g=n.left-6,d=parseInt(n.width,10),h.style.top=n.top+"px",h.style.left=g+d+"px",A.rootElement[0].appendChild(h)}}function n(){h.style.left=g+l+"px"}function o(){var e=this;t.Dom.addClass(h,"active"),t.Dom.addClass(p,"active"),p.style.top=h.style.top,p.style.left=h.style.left,p.style.height=e.view.maximumVisibleElementHeight(0)+"px",e.rootElement[0].appendChild(p)}function i(){p.style.left=h.style.left}function r(){t.Dom.removeClass(h,"active"),t.Dom.removeClass(p,"active")}var a,s,l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=$(window);h.className="manualColumnResizer",p.className="manualColumnResizerGuide";var M=function(){var e=this;t.hooks.run(e,"persistentStateSave","manualColumnWidths",e.manualColumnWidths)},w=function(){var e=this,n={};return t.hooks.run(e,"persistentStateLoad","manualColumnWidths",n),n.value},T=function(){var A,g=this,h=0,p=null;g.rootElement.on("mouseenter.manualColumnResize."+g.guid,"table thead tr > th",function(t){A||e.call(g,t.currentTarget)}),g.rootElement.on("mousedown.manualColumnResize."+g.guid,".manualColumnResizer",function(e){o.call(g),A=g,null==p&&(p=setTimeout(function(){h>=2&&(c=g.determineColumnWidth.call(g,s),y(s,c),g.forceFullRender=!0,g.view.render(),t.hooks.run(g,"afterColumnResize",s,c)),h=0,p=null},500),g._registerTimeout(p)),h++,u=e.pageX,c=d}),f.on("mousemove.manualColumnResize."+g.guid,function(t){A&&(l=d+(t.pageX-u),c=y(s,l),n(),i())}),f.on("mouseup.manualColumnResize."+g.guid,function(){A&&(r(),A=!1,c!=d&&(t.hooks.run(g,"beforeColumnResize",s,c),g.forceFullRender=!0,g.view.render(),M.call(g),t.hooks.run(g,"afterColumnResize",s,c)),e.call(g,a))}),g.addHook("afterDestroy",C)},C=function(){var t=this;t.rootElement.off("mouseenter.manualColumnResize."+t.guid,"table thead tr > th"),t.rootElement.off("mousedown.manualColumnResize."+t.guid,".manualColumnResizer"),f.off("mousemove.manualColumnResize."+t.guid),f.off("mouseup.manualColumnResize."+t.guid)};this.beforeInit=function(){this.manualColumnWidths=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualColumnResize;if(n){var o=this.getSettings().manualColumnResize,i=w.call(e);"undefined"!=typeof i?this.manualColumnWidths=i:o instanceof Array?this.manualColumnWidths=o:this.manualColumnWidths=[],"afterInit"==t&&(T.call(this),this.manualColumnWidths.length>0&&(this.forceFullRender=!0,this.render()))}else C.call(this),this.manualColumnWidths=[]};var y=function(e,n){return n=Math.max(n,20),e=t.hooks.execute(A,"modifyCol",e),A.manualColumnWidths[e]=n,n};this.modifyColWidth=function(t,e){return e=this.runHooksAndReturn("modifyCol",e),this.getSettings().manualColumnResize&&this.manualColumnWidths[e]?this.manualColumnWidths[e]:t}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterInit",function(){n.init.call(this,"afterInit")}),t.hooks.add("afterUpdateSettings",function(){n.init.call(this,"afterUpdateSettings")}),t.hooks.add("modifyColWidth",n.modifyColWidth),t.hooks.register("afterColumnResize"),t.hooks.register("beforeColumnResize")}(Handsontable)},function(t,e){"use strict";!function(t){function e(){function e(t){A=this,a=t;var e=this.view.wt.wtTable.getCoords(t).row;if(e>=0){s=e;var n=a.getBoundingClientRect();g=n.top-6,d=parseInt(n.height,10),h.style.left=n.left+"px",h.style.top=g+d+"px",A.rootElement[0].appendChild(h)}}function n(){h.style.top=g+l+"px"}function o(){var e=this;t.Dom.addClass(h,"active"),t.Dom.addClass(p,"active"),p.style.top=h.style.top,p.style.left=h.style.left,p.style.width=e.view.maximumVisibleElementWidth(0)+"px",e.rootElement[0].appendChild(p)}function i(){p.style.top=h.style.top}function r(){t.Dom.removeClass(h,"active"),t.Dom.removeClass(p,"active")}var a,s,l,A,c,u,d,g,h=document.createElement("DIV"),p=document.createElement("DIV"),f=$(window);h.className="manualRowResizer",p.className="manualRowResizerGuide";var M=function(){var e=this;t.hooks.run(e,"persistentStateSave","manualRowHeights",e.manualRowHeights)},w=function(){var e=this,n={};return t.hooks.run(e,"persistentStateLoad","manualRowHeights",n),n.value},T=function(){var A,g=this,h=0,p=null;g.rootElement.on("mouseenter.manualRowResize."+g.guid,"table tbody tr > th",function(t){A||e.call(g,t.currentTarget)}),g.rootElement.on("mousedown.manualRowResize."+g.guid,".manualRowResizer",function(e){o.call(g),A=g,null==p&&(p=setTimeout(function(){h>=2&&(y(s,null),g.forceFullRender=!0,g.view.render(),t.hooks.run(g,"afterRowResize",s,c)),h=0,p=null},500),g._registerTimeout(p)),h++,u=e.pageY,c=d}),f.on("mousemove.manualRowResize."+g.guid,function(t){A&&(l=d+(t.pageY-u),c=y(s,l),n(),i())}),f.on("mouseup.manualRowResize."+g.guid,function(){A&&(r(),A=!1,c!=d&&(t.hooks.run(g,"beforeRowResize",s,c),g.forceFullRender=!0,g.view.render(),M.call(g),t.hooks.run(g,"afterRowResize",s,c)),e.call(g,a))}),g.addHook("afterDestroy",C)},C=function(){var t=this;t.rootElement.off("mouseenter.manualRowResize."+t.guid,"table tbody tr > th"),t.rootElement.off("mousedown.manualRowResize."+t.guid,".manualRowResizer"),f.off("mousemove.manualRowResize."+t.guid),f.off("mouseup.manualRowResize."+t.guid)};this.beforeInit=function(){this.manualRowHeights=[]},this.init=function(t){var e=this,n=!!this.getSettings().manualRowResize;if(n){var o=this.getSettings().manualRowResize,i=w.call(e);"undefined"!=typeof i?this.manualRowHeights=i:o instanceof Array?this.manualRowHeights=o:this.manualRowHeights=[],"afterInit"===t?(T.call(this),this.manualRowHeights.length>0&&(this.forceFullRender=!0,this.render())):(this.forceFullRender=!0,this.render())}else C.call(this),this.manualRowHeights=[]};var y=function(e,n){return e=t.hooks.execute(A,"modifyRow",e),A.manualRowHeights[e]=n,n};this.modifyRowHeight=function(t,e){return this.getSettings().manualRowResize&&(e=this.runHooksAndReturn("modifyRow",e),void 0!==this.manualRowHeights[e])?this.manualRowHeights[e]:t}}var n=new e;t.hooks.add("beforeInit",n.beforeInit),t.hooks.add("afterInit",function(){n.init.call(this,"afterInit")}),t.hooks.add("afterUpdateSettings",function(){n.init.call(this,"afterUpdateSettings"); +}),t.hooks.add("modifyRowHeight",n.modifyRowHeight),t.hooks.register("afterRowResize"),t.hooks.register("beforeRowResize")}(Handsontable)},,,function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l=function(){function t(t,e){for(var n=0;nul>li:after,.tree>ul>li:before{border:0}.tree li:last-child:before{height:30px}.tree-active{border:1px solid #2196f3!important}",""])},function(t,e,n){"use strict";function o(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}function i(t){return t&&t.__esModule?t:{default:t}}function r(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function s(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A=function(){function t(t,e){for(var n=0;n ul > li");o.is(":visible")?(o.hide("fast"),n.children("i:first").addClass("rf-plus").removeClass("rf-minus")):(o.show("fast"),n.children("i:first").addClass("rf-minus").removeClass("rf-plus")),e.stopPropagation()}}),t.hasClass("parent_li")){var i=this.props.expandLevel;if(o._level>=i){var r=e.parent("li.parent_li").find(" > ul > li");r.hide(),e.children("i:first").addClass("rf-plus").removeClass("rf-minus")}else e.children("i:first").addClass("rf-minus").removeClass("rf-plus")}this._bindContextMenu(o)}},{key:"isFile",value:function t(){var e=this.props.data,n=e.name,t=!1;return(n.indexOf(".")>-1||"ul"===n||"知识包"===n)&&(t=!0),t}},{key:"componentWillUnmount",value:function(){var t=this.props.data,e=t.contextMenu;e&&0!==e.length&&$("#node-"+t.id).contextmenu("destroy")}},{key:"componentDidUpdate",value:function(){this._bindContextMenu(this.props.data)}},{key:"_bindContextMenu",value:function(t){var e=$("#node-"+t.id);e.contextmenu("destroy");var n=t.contextMenu;if(n&&0!==n.length){var o="treenodemenu"+t.id;e.contextmenu({target:"#"+o})}}},{key:"render",value:function(){var t=this,e=this.props,n=e.data,o=e.dispatch,i=n.children,r="node-"+n.id,a="treenodemenu"+n.id,s=[];if(n.contextMenu&&s.push(u.default.createElement(M.default,{items:n.contextMenu,key:n.id,data:n,dispatch:o,menuId:a})),i&&i.length>0)return u.default.createElement("li",{className:"parent_li"},u.default.createElement("span",{id:r},u.default.createElement("i",{className:"rf rf-minus",style:{marginRight:"2px"}}),u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),s,u.default.createElement(p.default,{dispatch:o,children:i,expandLevel:this.props.expandLevel}));var A=function(){var e=t.isFile();return{v:u.default.createElement("li",null,u.default.createElement("span",{id:r,onClick:function(t){if(e){var o=window._server+n.editorPath+"?file="+n.fullPath;T.eventEmitter.emit(T.TREE_NODE_CLICK,{id:n.id,name:n.name,fullPath:n.fullPath,path:o,active:!0}),$(".tree").find(".tree-active").removeClass("tree-active"),$("#"+r).addClass("tree-active")}}},u.default.createElement("i",{className:n._icon,style:n._style})," ",u.default.createElement("a",{href:"###",style:n._style}," ",n.name),u.default.createElement("sup",null,u.default.createElement("i",{title:n.lock?n.lockInfo:"",className:n.lock?"rf rf-lock":""}))),s)}}();return"object"===("undefined"==typeof A?"undefined":l(A))?A.v:void 0}}]),e}(c.Component);e.default=C},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function r(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function a(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}Object.defineProperty(e,"__esModule",{value:!0});var s=function(){function t(t,e){for(var n=0;nspan::selection,.CodeMirror-line>span>span::selection{background:#d7d4f0}.CodeMirror-line::-moz-selection,.CodeMirror-line>span::-moz-selection,.CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.cm-searching{background:#ffa;background:rgba(255,255,0,.4)}.cm-force-border{padding-right:.1px}@media print{.CodeMirror div.CodeMirror-cursors{visibility:hidden}}.cm-tab-wrap-hack:after{content:''}span.CodeMirror-selectedtext{background:none}",""])},function(t,e,n){var o=n(393);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;box-shadow:2px 3px 5px rgba(0,0,0,.2);border-radius:3px;border:1px solid silver;background:#fff;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:#000;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:#fff}",""])},function(t,e,n){var o=n(395);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'.CodeMirror-lint-markers{width:16px}.CodeMirror-lint-tooltip{background-color:#ffd;border:1px solid #000;border-radius:4px 4px 4px 4px;color:#000;font-family:monospace;font-size:10pt;overflow:hidden;padding:2px 5px;position:fixed;white-space:pre;white-space:pre-wrap;z-index:100;max-width:600px;opacity:0;transition:opacity .4s;-moz-transition:opacity .4s;-webkit-transition:opacity .4s;-o-transition:opacity .4s;-ms-transition:opacity .4s}.CodeMirror-lint-mark-error,.CodeMirror-lint-mark-warning{background-position:0 100%;background-repeat:repeat-x}.CodeMirror-lint-mark-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==")}.CodeMirror-lint-mark-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-error,.CodeMirror-lint-marker-warning{background-position:50%;background-repeat:no-repeat;cursor:pointer;display:inline-block;height:16px;width:16px;vertical-align:middle;position:relative}.CodeMirror-lint-message-error,.CodeMirror-lint-message-warning{padding-left:18px;background-position:0 0;background-repeat:no-repeat}.CodeMirror-lint-marker-error,.CodeMirror-lint-message-error{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAHlBMVEW7AAC7AACxAAC7AAC7AAAAAAC4AAC5AAD///+7AAAUdclpAAAABnRSTlMXnORSiwCK0ZKSAAAATUlEQVR42mWPOQ7AQAgDuQLx/z8csYRmPRIFIwRGnosRrpamvkKi0FTIiMASR3hhKW+hAN6/tIWhu9PDWiTGNEkTtIOucA5Oyr9ckPgAWm0GPBog6v4AAAAASUVORK5CYII=")}.CodeMirror-lint-marker-warning,.CodeMirror-lint-message-warning{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAANlBMVEX/uwDvrwD/uwD/uwD/uwD/uwD/uwD/uwD/uwD6twD/uwAAAADurwD2tQD7uAD+ugAAAAD/uwDhmeTRAAAADHRSTlMJ8mN1EYcbmiixgACm7WbuAAAAVklEQVR42n3PUQqAIBBFUU1LLc3u/jdbOJoW1P08DA9Gba8+YWJ6gNJoNYIBzAA2chBth5kLmG9YUoG0NHAUwFXwO9LuBQL1giCQb8gC9Oro2vp5rncCIY8L8uEx5ZkAAAAASUVORK5CYII=")}.CodeMirror-lint-marker-multiple{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAMAAADzjKfhAAAACVBMVEUAAAAAAAC/v7914kyHAAAAAXRSTlMAQObYZgAAACNJREFUeNo1ioEJAAAIwmz/H90iFFSGJgFMe3gaLZ0od+9/AQZ0ADosbYraAAAAAElFTkSuQmCC");background-repeat:no-repeat;background-position:100% 100%;width:100%;height:100%}',""])},,,,,,,,,,,function(t,e,n){!function(e,n){t.exports=n()}(this,function(){"use strict";function t(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}function e(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function n(t,n){return e(t).appendChild(n)}function o(t,e,n,o){var i=document.createElement(t);if(n&&(i.className=n),o&&(i.style.cssText=o),"string"==typeof e)i.appendChild(document.createTextNode(e));else if(e)for(var r=0;r=e)return a+(e-r);a+=s-r,a+=n-a%n,r=s+1}}function u(){this.id=null}function d(t,e){for(var n=0;n=e)return o+Math.min(a,e-i);if(i+=r-o,i+=n-i%n,o=r+1,i>=e)return o}}function h(t){for(;ja.length<=t;)ja.push(p(ja)+" ");return ja[t]}function p(t){return t[t.length-1]}function f(t,e){for(var n=[],o=0;o"€"&&(t.toUpperCase()!=t.toLowerCase()||Ua.test(t))}function y(t,e){return e?!!(e.source.indexOf("\\w")>-1&&C(t))||e.test(t):C(t)}function I(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}function E(t){return t.charCodeAt(0)>=768&&ka.test(t)}function m(t,e,n){var i=this;this.input=n,i.scrollbarFiller=o("div",null,"CodeMirror-scrollbar-filler"),i.scrollbarFiller.setAttribute("cm-not-content","true"),i.gutterFiller=o("div",null,"CodeMirror-gutter-filler"),i.gutterFiller.setAttribute("cm-not-content","true"),i.lineDiv=o("div",null,"CodeMirror-code"),i.selectionDiv=o("div",null,null,"position: relative; z-index: 1"),i.cursorDiv=o("div",null,"CodeMirror-cursors"),i.measure=o("div",null,"CodeMirror-measure"),i.lineMeasure=o("div",null,"CodeMirror-measure"),i.lineSpace=o("div",[i.measure,i.lineMeasure,i.selectionDiv,i.cursorDiv,i.lineDiv],null,"position: relative; outline: none"),i.mover=o("div",[o("div",[i.lineSpace],"CodeMirror-lines")],null,"position: relative"),i.sizer=o("div",[i.mover],"CodeMirror-sizer"),i.sizerWidth=null,i.heightForcer=o("div",null,null,"position: absolute; height: "+va+"px; width: 1px;"),i.gutters=o("div",null,"CodeMirror-gutters"),i.lineGutter=null,i.scroller=o("div",[i.sizer,i.heightForcer,i.gutters],"CodeMirror-scroll"),i.scroller.setAttribute("tabIndex","-1"),i.wrapper=o("div",[i.scrollbarFiller,i.gutterFiller,i.scroller],"CodeMirror"),sa&&la<8&&(i.gutters.style.zIndex=-1,i.scroller.style.paddingRight=0),Aa||ia&&Ma||(i.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(i.wrapper):t(i.wrapper)),i.viewFrom=i.viewTo=e.first,i.reportedViewFrom=i.reportedViewTo=e.first,i.view=[],i.renderedView=null,i.externalMeasured=null,i.viewOffset=0,i.lastWrapHeight=i.lastWrapWidth=0,i.updateLineNumbers=null,i.nativeBarWidth=i.barHeight=i.barWidth=0,i.scrollbarsClipped=!1,i.lineNumWidth=i.lineNumInnerWidth=i.lineNumChars=null,i.alignWidgets=!1,i.cachedCharWidth=i.cachedTextHeight=i.cachedPaddingH=null,i.maxLine=null,i.maxLineLength=0,i.maxLineChanged=!1,i.wheelDX=i.wheelDY=i.wheelStartX=i.wheelStartY=null,i.shift=!1,i.selForContextMenu=null,i.activeTouch=null,n.init(i)}function N(t,e){if(e-=t.first,e<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var o=0;;++o){var i=n.children[o],r=i.chunkSize();if(e=t.first&&en?Q(n,N(t,n).text.length):Y(e,N(t,e.line).text.length)}function Y(t,e){var n=t.ch;return null==n||n>e?Q(t.line,e):n<0?Q(t.line,0):t}function H(t,e){for(var n=[],o=0;o=e:r.to>e);(o||(o=[])).push(new P(a,r.from,l?null:r.to))}}return o}function Z(t,e,n){var o;if(t)for(var i=0;i=e:r.to>e);if(s||r.from==e&&"bookmark"==a.type&&(!n||r.marker.insertLeft)){var l=null==r.from||(a.inclusiveLeft?r.from<=e:r.from0&&s)for(var y=0;y0)){var c=[l,1],u=j(A.from,s.from),g=j(A.to,s.to);(u<0||!a.inclusiveLeft&&!u)&&c.push({from:A.from,to:s.from}),(g>0||!a.inclusiveRight&&!g)&&c.push({from:s.to,to:A.to}),i.splice.apply(i,c),l+=c.length-1}}return i}function $(t){var e=t.markedSpans;if(e){for(var n=0;n=0&&u<=0||c<=0&&u>=0)&&(c<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?j(A.to,n)>=0:j(A.to,n)>0)||c>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?j(A.from,o)<=0:j(A.from,o)<0)))return!0}}}function lt(t){for(var e;e=rt(t);)t=e.find(-1,!0).line;return t}function At(t){for(var e,n;e=at(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function ct(t,e){var n=N(t,e),o=lt(n);return n==o?e:v(o)}function ut(t,e){if(e>t.lastLine())return e;var n,o=N(t,e);if(!dt(t,o))return e;for(;n=at(o);)o=n.find(1,!0).line;return v(o)+1}function dt(t,e){var n=za&&e.markedSpans;if(n)for(var o=void 0,i=0;ie.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}function Mt(t,e,n,o){if(!t)return o(e,n,"ltr");for(var i=!1,r=0;re||e==n&&a.to==e)&&(o(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr"),i=!0)}i||o(e,n,"ltr")}function wt(t){return t.level%2?t.to:t.from}function Tt(t){return t.level%2?t.from:t.to}function Ct(t){var e=xt(t);return e?wt(e[0]):0}function yt(t){var e=xt(t);return e?Tt(p(e)):t.text.length}function It(t,e,n){var o=t[0].level;return e==o||n!=o&&ee)return o;if(i.from==e||i.to==e){if(null!=n)return It(t,i.level,t[n].level)?(i.from!=i.to&&(Oa=n),o):(i.from!=i.to&&(Oa=o),n);n=o}}return n}function mt(t,e,n,o){if(!o)return e+n;do e+=n;while(e>0&&E(t.text.charAt(e)));return e}function Nt(t,e,n,o){var i=xt(t);if(!i)return bt(t,e,n,o);for(var r=Et(i,e),a=i[r],s=mt(t,e,a.level%2?-n:n,o);;){if(s>a.from&&s0==a.level%2?a.to:a.from);if(a=i[r+=n],!a)return null;s=n>0==a.level%2?mt(t,a.to,-1,o):mt(t,a.from,1,o)}}function bt(t,e,n,o){var i=e+n;if(o)for(;i>0&&E(t.text.charAt(i));)i+=n;return i<0||i>t.text.length?null:i}function xt(t){var e=t.order;return null==e&&(e=t.order=Ya(t.text)),e}function Dt(t,e){return t._handlers&&t._handlers[e]||Ha}function vt(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var o=t._handlers,i=o&&o[e];if(i){var r=d(i,n);r>-1&&(o[e]=i.slice(0,r).concat(i.slice(r+1)))}}}function Lt(t,e){var n=Dt(t,e);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),i=0;i0}function jt(t){t.prototype.on=function(t,e){Fa(this,t,e)},t.prototype.off=function(t,e){vt(this,t,e)}}function Ut(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function kt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function Rt(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function zt(t){Ut(t),kt(t)}function Ot(t){return t.target||t.srcElement}function Yt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),wa&&t.ctrlKey&&1==e&&(e=3),e}function Ht(t){if(null==xa){var e=o("span","​");n(t,o("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(xa=e.offsetWidth<=1&&e.offsetHeight>2&&!(sa&&la<8))}var i=xa?o("span","​"):o("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return i.setAttribute("cm-text",""),i}function Ft(t){if(null!=Da)return Da;var o=n(t,document.createTextNode("AخA")),i=Ia(o,0,1).getBoundingClientRect(),r=Ia(o,1,2).getBoundingClientRect();return e(t),!(!i||i.left==i.right)&&(Da=r.right-i.right<3)}function Vt(t){if(null!=Xa)return Xa;var e=n(t,o("span","x")),i=e.getBoundingClientRect(),r=Ia(e,0,1).getBoundingClientRect();return Xa=Math.abs(i.left-r.left)>1}function Pt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),Ja[t]=e}function Gt(t,e){Za[t]=e}function Wt(t){if("string"==typeof t&&Za.hasOwnProperty(t))t=Za[t];else if(t&&"string"==typeof t.name&&Za.hasOwnProperty(t.name)){var e=Za[t.name];"string"==typeof e&&(e={name:e}),t=T(e,t),t.name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Wt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Wt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Xt(t,e){e=Wt(e);var n=Ja[e.name];if(!n)return Xt(t,"text/plain");var o=n(t,e);if(Ka.hasOwnProperty(e.name)){var i=Ka[e.name];for(var r in i)i.hasOwnProperty(r)&&(o.hasOwnProperty(r)&&(o["_"+r]=o[r]),o[r]=i[r])}if(o.name=e.name,e.helperType&&(o.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)o[a]=e.modeProps[a];return o}function Jt(t,e){var n=Ka.hasOwnProperty(t)?Ka[t]:Ka[t]={};A(e,n)}function Zt(t,e){if(e===!0)return e;if(t.copyState)return t.copyState(e);var n={};for(var o in e){var i=e[o];i instanceof Array&&(i=i.concat([])),n[o]=i}return n}function Kt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e),n&&n.mode!=t);)e=n.state,t=n.mode;return n||{mode:t,state:e}}function _t(t,e,n){return!t.startState||t.startState(e,n)}function qt(t,e,n,o){var i=[t.state.modeGen],r={};ae(t,e.text,t.doc.mode,n,function(t,e){return i.push(t,e)},r,o);for(var a=function(n){var o=t.state.overlays[n],a=1,s=0;ae(t,e.text,o.mode,!0,function(t,e){for(var n=a;st&&i.splice(a,1,t,i[a+1],r),a+=2,s=Math.min(t,r)}if(e)if(o.opaque)i.splice(n,a-n,t,"overlay "+e),a=n+2;else for(;nt.options.maxHighlightLength?Zt(t.doc.mode,o):o);e.stateAfter=o,e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.frontier&&t.doc.frontier++}return e.styles}function te(t,e,n){var o=t.doc,i=t.display;if(!o.mode.startState)return!0;var r=se(t,e,n),a=r>o.first&&N(o,r-1).stateAfter;return a=a?Zt(o.mode,a):_t(o.mode),o.iter(r,e,function(n){ee(t,n.text,a);var s=r==e-1||r%5==0||r>=i.viewFrom&&re.start)return r}throw new Error("Mode "+t.name+" failed to advance stream.")}function ie(t,e,n,o){var i,r=function(t){return{start:u.start,end:u.pos,string:u.current(),type:i||null,state:t?Zt(a.mode,c):c}},a=t.doc,s=a.mode;e=O(a,e);var l,A=N(a,e.line),c=te(t,e.line,n),u=new _a(A.text,t.options.tabSize);for(o&&(l=[]);(o||u.post.options.maxHighlightLength?(s=!1,a&&ee(t,e,o,u.pos),u.pos=e.length,l=null):l=re(oe(n,u,o,d),r),d){var g=d[0].name;g&&(l="m-"+(l?g+" "+l:g))}if(!s||c!=l){for(;Aa;--s){if(s<=r.first)return r.first;var l=N(r,s-1);if(l.stateAfter&&(!n||s<=r.frontier))return s;var A=c(l.text,null,t.options.tabSize);(null==i||o>A)&&(i=s-1,o=A)}return i}function le(t,e,n){this.text=t,tt(this,e),this.height=n?n(this):1}function Ae(t,e,n,o){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),$(t),tt(t,n);var i=o?o(t):1;i!=t.height&&D(t,i)}function ce(t){t.parent=null,$(t)}function ue(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?ts:$a;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function de(t,e){var n=o("span",null,null,Aa?"padding-right: .1px":null),i={pre:o("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:(sa||Aa)&&t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var a=r?e.rest[r-1]:e.line,l=void 0;i.pos=0,i.addToken=he,Ft(t.display.measure)&&(l=xt(a))&&(i.addToken=fe(i.addToken,l)),i.map=[];var A=e!=t.display.externalMeasured&&v(a);we(a,i,$t(t,a,A)),a.styleClasses&&(a.styleClasses.bgClass&&(i.bgClass=s(a.styleClasses.bgClass,i.bgClass||"")),a.styleClasses.textClass&&(i.textClass=s(a.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Ht(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(Aa){var c=i.content.lastChild;(/\bcm-tab\b/.test(c.className)||c.querySelector&&c.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return Lt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=s(i.pre.className,i.textClass||"")),i}function ge(t){var e=o("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function he(t,e,n,i,r,a,s){if(e){var l,A=t.splitSpaces?pe(e,t.trailingSpace):e,c=t.cm.state.specialChars,u=!1;if(c.test(e)){l=document.createDocumentFragment();for(var d=0;;){c.lastIndex=d;var g=c.exec(e),p=g?g.index-d:e.length-d;if(p){var f=document.createTextNode(A.slice(d,d+p));sa&&la<9?l.appendChild(o("span",[f])):l.appendChild(f),t.map.push(t.pos,t.pos+p,f),t.col+=p,t.pos+=p}if(!g)break;d+=p+1;var M=void 0;if("\t"==g[0]){var w=t.cm.options.tabSize,T=w-t.col%w;M=l.appendChild(o("span",h(T),"cm-tab")),M.setAttribute("role","presentation"),M.setAttribute("cm-text","\t"),t.col+=T}else"\r"==g[0]||"\n"==g[0]?(M=l.appendChild(o("span","\r"==g[0]?"␍":"␤","cm-invalidchar")),M.setAttribute("cm-text",g[0]),t.col+=1):(M=t.cm.options.specialCharPlaceholder(g[0]),M.setAttribute("cm-text",g[0]),sa&&la<9?l.appendChild(o("span",[M])):l.appendChild(M),t.col+=1);t.map.push(t.pos,t.pos+1,M),t.pos++}}else t.col+=e.length,l=document.createTextNode(A),t.map.push(t.pos,t.pos+e.length,l),sa&&la<9&&(u=!0),t.pos+=e.length;if(t.trailingSpace=32==A.charCodeAt(e.length-1),n||i||r||u||s){var C=n||"";i&&(C+=i),r&&(C+=r);var y=o("span",[l],C,s);return a&&(y.title=a),t.content.appendChild(y)}t.content.appendChild(l)}}function pe(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,o="",i=0;iA&&u.from<=A));d++);if(u.to>=c)return t(n,o,i,r,a,s,l);t(n,o.slice(0,u.to-A),i,r,null,s,l),r=null,o=o.slice(u.to-A),A=u.to}}}function Me(t,e,n,o){var i=!o&&n.widgetNode;i&&t.map.push(t.pos,t.pos+e,i),!o&&t.cm.display.input.needsContentAttribute&&(i||(i=t.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(t.cm.display.input.setUneditable(i),t.content.appendChild(i)),t.pos+=e,t.trailingSpace=!1}function we(t,e,n){var o=t.markedSpans,i=t.text,r=0;if(o)for(var a,s,l,A,c,u,d,g=i.length,h=0,p=1,f="",M=0;;){if(M==h){l=A=c=u=s="",d=null,M=1/0;for(var w=[],T=void 0,C=0;Ch||I.collapsed&&y.to==h&&y.from==h)?(null!=y.to&&y.to!=h&&M>y.to&&(M=y.to,A=""),I.className&&(l+=" "+I.className),I.css&&(s=(s?s+";":"")+I.css),I.startStyle&&y.from==h&&(c+=" "+I.startStyle),I.endStyle&&y.to==M&&(T||(T=[])).push(I.endStyle,y.to),I.title&&!u&&(u=I.title),I.collapsed&&(!d||ot(d.marker,I)<0)&&(d=y)):y.from>h&&M>y.from&&(M=y.from)}if(T)for(var E=0;E=g)break;for(var N=Math.min(g,M);;){if(f){var b=h+f.length;if(!d){var x=b>N?f.slice(0,N-h):f;e.addToken(e,x,a?a+l:l,c,h+x.length==M?A:"",u,s)}if(b>=N){f=f.slice(N-h),h=N;break}h=b,c=""}f=i.slice(r,r=n[p++]),a=ue(n[p++],e.cm.options)}}else for(var D=1;D2&&r.push((l.bottom+A.top)/2-n.top)}}r.push(n.bottom-n.top)}}function Xe(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var o=0;on)return{map:t.measure.maps[i],cache:t.measure.caches[i],before:!0}}function Je(t,e){e=lt(e);var o=v(e),i=t.display.externalMeasured=new Te(t.doc,e,o);i.lineN=o;var r=i.built=de(t,i);return i.text=r.pre,n(t.display.lineMeasure,r.pre),i}function Ze(t,e,n,o){return qe(t,_e(t,e),n,o)}function Ke(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(r=l-s,i=r-1,e>=l&&(a="right")),null!=i){if(o=t[A+2],s==l&&n==(o.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;A&&t[A-2]==t[A-3]&&t[A-1].insertLeft;)o=t[(A-=3)+2],a="left";if("right"==n&&i==l-s)for(;A=0&&(n=t[i]).left==n.right;i--);return n}function en(t,e,n,o){var i,r=$e(e.map,n,o),a=r.node,s=r.start,l=r.end,A=r.collapse;if(3==a.nodeType){for(var c=0;c<4;c++){for(;s&&E(e.line.text.charAt(r.coverStart+s));)--s;for(;r.coverStart+l0&&(A=o="right");var u;i=t.options.lineWrapping&&(u=a.getClientRects()).length>1?u["right"==o?u.length-1:0]:a.getBoundingClientRect()}if(sa&&la<9&&!s&&(!i||!i.left&&!i.right)){var d=a.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+wn(t.display),top:d.top,bottom:d.bottom}:os}for(var g=i.top-e.rect.top,h=i.bottom-e.rect.top,p=(g+h)/2,f=e.view.measure.heights,M=0;Mn.from?a(t-1):a(t,o)}o=o||N(t.doc,e.line),i||(i=_e(t,o));var l=xt(o),A=e.ch;if(!l)return a(A);var c=Et(l,A),u=s(A,c);return null!=Oa&&(u.other=s(A,Oa)),u}function gn(t,e){var n=0;e=O(t.doc,e),t.options.lineWrapping||(n=wn(t.display)*e.ch);var o=N(t.doc,e.line),i=ht(o)+Ye(t.display);return{left:n,right:n,top:i,bottom:i+o.height}}function hn(t,e,n,o){var i=Q(t,e);return i.xRel=o,n&&(i.outside=!0),i}function pn(t,e,n){var o=t.doc;if(n+=t.display.viewOffset,n<0)return hn(o.first,0,!0,-1);var i=L(o,n),r=o.first+o.size-1;if(i>r)return hn(o.first+o.size-1,N(o,r).text.length,!0,1);e<0&&(e=0);for(var a=N(o,i);;){var s=fn(t,a,i,e,n),l=at(a),A=l&&l.find(0,!0);if(!l||!(s.ch>A.from.ch||s.ch==A.from.ch&&s.xRel>0))return s;i=v(a=A.to.line)}}function fn(t,e,n,o,i){function r(o){var i=dn(t,Q(n,o),"line",e,A);return s=!0,a>i.bottom?i.left-l:af)return hn(n,g,M,1);for(;;){if(c?g==d||g==Nt(e,d,1):g-d<=1){var w=o0&&w1){var y=qe(t,A,w,"right");a<=y.bottom&&a>=y.top&&Math.abs(o-y.right)1?1:0);return I}var m=Math.ceil(u/2),N=d+m;if(c){N=d;for(var b=0;bo?(g=N,f=x,(M=s)&&(f+=1e3),u=m):(d=N,h=x,p=s,u-=m)}}function Mn(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==qa){qa=o("pre");for(var i=0;i<49;++i)qa.appendChild(document.createTextNode("x")),qa.appendChild(o("br"));qa.appendChild(document.createTextNode("x"))}n(t.measure,qa);var r=qa.offsetHeight/50;return r>3&&(t.cachedTextHeight=r),e(t.measure),r||1}function wn(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=o("span","xxxxxxxxxx"),i=o("pre",[e]);n(t.measure,i);var r=e.getBoundingClientRect(),a=(r.right-r.left)/10;return a>2&&(t.cachedCharWidth=a),a||10}function Tn(t){for(var e=t.display,n={},o={},i=e.gutters.clientLeft,r=e.gutters.firstChild,a=0;r;r=r.nextSibling,++a)n[t.options.gutters[a]]=r.offsetLeft+r.clientLeft+i,o[t.options.gutters[a]]=r.clientWidth; +return{fixedPos:Cn(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperWidth:e.wrapper.clientWidth}}function Cn(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function yn(t){var e=Mn(t.display),n=t.options.lineWrapping,o=n&&Math.max(5,t.display.scroller.clientWidth/wn(t.display)-3);return function(i){if(dt(t.doc,i))return 0;var r=0;if(i.widgets)for(var a=0;a=t.display.viewTo)return null;if(e-=t.display.viewFrom,e<0)return null;for(var n=t.display.view,o=0;o=t.display.viewTo||s.to().line3&&(i(g,p.top,null,p.bottom),g=c,p.bottoml.bottom||A.bottom==l.bottom&&A.right>l.right)&&(l=A),g0?e.blinker=setInterval(function(){return e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Ln(t){t.state.focused||(t.display.input.focus(),Sn(t))}function Bn(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Qn(t))},100)}function Sn(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(Lt(t,"focus",t,e),t.state.focused=!0,a(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),Aa&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),vn(t))}function Qn(t,e){t.state.delayingBlurEvent||(t.state.focused&&(Lt(t,"blur",t,e),t.state.focused=!1,Na(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function jn(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var o=Cn(e)-e.scroller.scrollLeft+t.doc.scrollLeft,i=e.gutters.offsetWidth,r=o+"px",a=0;a.001||l<-.001)&&(D(i.line,r),Rn(i.line),i.rest))for(var A=0;A=a&&(r=L(e,ht(N(e,l))-t.wrapper.clientHeight),a=l)}return{from:r,to:Math.max(a,r+1)}}function On(t,e){Math.abs(t.doc.scrollTop-e)<2||(t.doc.scrollTop=e,ia||Do(t,{top:e}),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e),t.display.scrollbars.setScrollTop(e),ia&&Do(t),Io(t,100))}function Yn(t,e,n){(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)||(e=Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth),t.doc.scrollLeft=e,jn(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function Hn(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail:null==n&&(n=t.wheelDelta),{x:e,y:n}}function Fn(t){var e=Hn(t);return e.x*=rs,e.y*=rs,e}function Vn(t,e){var n=Hn(e),o=n.x,i=n.y,r=t.display,a=r.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(o&&s||i&&l){if(i&&wa&&Aa)t:for(var A=e.target,c=r.view;A!=a;A=A.parentNode)for(var u=0;u(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!pa){var a=o("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Ye(t.display))+"px;\n height: "+(e.bottom-e.top+Ve(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: 2px;");t.display.lineSpace.appendChild(a),a.scrollIntoView(r),t.display.lineSpace.removeChild(a)}}}function _n(t,e,n,o){null==o&&(o=0);for(var i,r=0;r<5;r++){var a=!1;i=dn(t,e);var s=n&&n!=e?dn(t,n):i,l=$n(t,Math.min(i.left,s.left),Math.min(i.top,s.top)-o,Math.max(i.left,s.left),Math.max(i.bottom,s.bottom)+o),A=t.doc.scrollTop,c=t.doc.scrollLeft;if(null!=l.scrollTop&&(On(t,l.scrollTop),Math.abs(t.doc.scrollTop-A)>1&&(a=!0)),null!=l.scrollLeft&&(Yn(t,l.scrollLeft),Math.abs(t.doc.scrollLeft-c)>1&&(a=!0)),!a)break}return i}function qn(t,e,n,o,i){var r=$n(t,e,n,o,i);null!=r.scrollTop&&On(t,r.scrollTop),null!=r.scrollLeft&&Yn(t,r.scrollLeft)}function $n(t,e,n,o,i){var r=t.display,a=Mn(t.display);n<0&&(n=0);var s=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:r.scroller.scrollTop,l=Ge(t),A={};i-n>l&&(i=n+l);var c=t.doc.height+He(r),u=nc-a;if(ns+l){var g=Math.min(n,(d?c:i)-l);g!=s&&(A.scrollTop=g)}var h=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:r.scroller.scrollLeft,p=Pe(t)-(t.options.fixedGutter?r.gutters.offsetWidth:0),f=o-e>p;return f&&(o=e+p),e<10?A.scrollLeft=0:ep+h-3&&(A.scrollLeft=o+(f?0:10)-p),A}function to(t,e,n){null==e&&null==n||no(t),null!=e&&(t.curOp.scrollLeft=(null==t.curOp.scrollLeft?t.doc.scrollLeft:t.curOp.scrollLeft)+e),null!=n&&(t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+n)}function eo(t){no(t);var e=t.getCursor(),n=e,o=e;t.options.lineWrapping||(n=e.ch?Q(e.line,e.ch-1):e,o=Q(e.line,e.ch+1)),t.curOp.scrollToPos={from:n,to:o,margin:t.options.cursorScrollMargin,isCursor:!0}}function no(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=gn(t,e.from),o=gn(t,e.to),i=$n(t,Math.min(n.left,o.left),Math.min(n.top,o.top)-e.margin,Math.max(n.right,o.right),Math.max(n.bottom,o.bottom)+e.margin);t.scrollTo(i.scrollLeft,i.scrollTop)}}function oo(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:null,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++ss},ye(t.curOp)}function io(t){var e=t.curOp;Ee(e,function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new mo(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function so(t){t.updatedDisplay=t.mustUpdate&&bo(t.cm,t.update)}function lo(t){var e=t.cm,n=e.display;t.updatedDisplay&&kn(e),t.barMeasure=Pn(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=Ze(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Ve(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Pe(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection(t.focus))}function Ao(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLefte)&&(i.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=i.viewTo)za&&ct(t.doc,e)i.viewFrom?wo(t):(i.viewFrom+=o,i.viewTo+=o);else if(e<=i.viewFrom&&n>=i.viewTo)wo(t);else if(e<=i.viewFrom){var r=To(t,n,n+o,1);r?(i.view=i.view.slice(r.index),i.viewFrom=r.lineN,i.viewTo+=o):wo(t)}else if(n>=i.viewTo){var a=To(t,e,e,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):wo(t)}else{var s=To(t,e,e,-1),l=To(t,n,n+o,1);s&&l?(i.view=i.view.slice(0,s.index).concat(Ce(t,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=o):wo(t)}var A=i.externalMeasured;A&&(n=i.lineN&&e=o.viewTo)){var r=o.view[mn(t,e)];if(null!=r.node){var a=r.changes||(r.changes=[]);d(a,n)==-1&&a.push(n)}}}function wo(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function To(t,e,n,o){var i,r=mn(t,e),a=t.display.view;if(!za||n==t.doc.first+t.doc.size)return{index:r,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(r==a.length-1)return null;i=s+a[r].size-e,r++}else i=s-e;e+=i,n+=i}for(;ct(t.doc,n)!=n;){if(r==(o<0?0:a.length-1))return null;n+=o*a[r-(o<0?1:0)].size,r+=o}return{index:r,lineN:n}}function Co(t,e,n){var o=t.display,i=o.view;0==i.length||e>=o.viewTo||n<=o.viewFrom?(o.view=Ce(t,e,n),o.viewFrom=e):(o.viewFrom>e?o.view=Ce(t,e,o.viewFrom).concat(o.view):o.viewFromn&&(o.view=o.view.slice(0,mn(t,n)))),o.viewTo=n}function yo(t){for(var e=t.display.view,n=0,o=0;o=t.display.viewTo)){var n=+new Date+t.options.workTime,o=Zt(e.mode,te(t,e.frontier)),i=[];e.iter(e.frontier,Math.min(e.first+e.size,t.display.viewTo+500),function(r){if(e.frontier>=t.display.viewFrom){var a=r.styles,s=r.text.length>t.options.maxHighlightLength,l=qt(t,r,s?Zt(e.mode,o):o,!0);r.styles=l.styles;var A=r.styleClasses,c=l.classes;c?r.styleClasses=c:A&&(r.styleClasses=null);for(var u=!a||a.length!=r.styles.length||A!=c&&(!A||!c||A.bgClass!=c.bgClass||A.textClass!=c.textClass),d=0;!u&&dn)return Io(t,t.options.workDelay),!0}),i.length&&uo(t,function(){for(var e=0;e=o.viewFrom&&n.visible.to<=o.viewTo&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo)&&o.renderedView==o.view&&0==yo(t))return!1;Un(t)&&(wo(t),n.dims=Tn(t));var a=i.first+i.size,s=Math.max(n.visible.from-t.options.viewportMargin,i.first),l=Math.min(a,n.visible.to+t.options.viewportMargin);o.viewFroml&&o.viewTo-l<20&&(l=Math.min(a,o.viewTo)),za&&(s=ct(t.doc,s),l=ut(t.doc,l));var A=s!=o.viewFrom||l!=o.viewTo||o.lastWrapHeight!=n.wrapperHeight||o.lastWrapWidth!=n.wrapperWidth;Co(t,s,l),o.viewOffset=ht(N(t.doc,o.viewFrom)),t.display.mover.style.top=o.viewOffset+"px";var c=yo(t);if(!A&&0==c&&!n.force&&o.renderedView==o.view&&(null==o.updateLineNumbers||o.updateLineNumbers>=o.viewTo))return!1;var u=r();return c>4&&(o.lineDiv.style.display="none"),vo(t,o.updateLineNumbers,n.dims),c>4&&(o.lineDiv.style.display=""),o.renderedView=o.view,u&&r()!=u&&u.offsetHeight&&u.focus(),e(o.cursorDiv),e(o.selectionDiv),o.gutters.style.height=o.sizer.style.minHeight=0,A&&(o.lastWrapHeight=n.wrapperHeight,o.lastWrapWidth=n.wrapperWidth,Io(t,400)),o.updateLineNumbers=null,!0}function xo(t,e){for(var n=e.viewport,o=!0;(o&&t.options.lineWrapping&&e.oldDisplayWidth!=Pe(t)||(n&&null!=n.top&&(n={top:Math.min(t.doc.height+He(t.display)-Ge(t),n.top)}),e.visible=zn(t.display,t.doc,n),!(e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)))&&bo(t,e);o=!1){kn(t);var i=Pn(t);Nn(t),Xn(t,i),Bo(t,i)}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Do(t,e){var n=new mo(t,e);if(bo(t,n)){kn(t),xo(t,n);var o=Pn(t);Nn(t),Xn(t,o),Bo(t,o),n.finish()}}function vo(t,n,o){function i(e){var n=e.nextSibling;return Aa&&wa&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var r=t.display,a=t.options.lineNumbers,s=r.lineDiv,l=s.firstChild,A=r.view,c=r.viewFrom,u=0;u-1&&(h=!1),be(t,g,c,o)),h&&(e(g.lineNumber),g.lineNumber.appendChild(document.createTextNode(S(t.options,c)))),l=g.node.nextSibling}else{var p=je(t,g,c,o);s.insertBefore(p,l)}c+=g.size}for(;l;)l=i(l)}function Lo(t){var e=t.display.gutters.offsetWidth;t.display.sizer.style.marginLeft=e+"px"}function Bo(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Ve(t)+"px"}function So(t){var n=t.display.gutters,i=t.options.gutters;e(n);for(var r=0;r-1&&!t.lineNumbers&&(t.gutters=t.gutters.slice(0),t.gutters.splice(e,1))}function jo(t,e){this.ranges=t,this.primIndex=e}function Uo(t,e){this.anchor=t,this.head=e}function ko(t,e){var n=t[e];t.sort(function(t,e){return j(t.from(),e.from())}),e=d(t,n);for(var o=1;o=0){var a=R(r.from(),i.from()),s=k(r.to(),i.to()),l=r.empty()?i.from()==i.head:r.from()==r.head;o<=e&&--e,t.splice(--o,2,new Uo(l?s:a,l?a:s))}}return new jo(t,e)}function Ro(t,e){return new jo([new Uo(t,e||t)],0)}function zo(t){return t.text?Q(t.from.line+t.text.length-1,p(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function Oo(t,e){if(j(t,e.from)<0)return t;if(j(t,e.to)<=0)return zo(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,o=t.ch;return t.line==e.to.line&&(o+=zo(e).ch-e.to.ch),Q(n,o)}function Yo(t,e){for(var n=[],o=0;o1&&t.remove(s.line+1,h-1),t.insert(s.line+1,w)}me(t,"change",t,e)}function Xo(t,e,n){function o(t,i,r){if(t.linked)for(var a=0;a1&&!t.done[t.done.length-2].ranges?(t.done.pop(),p(t.done)):void 0}function $o(t,e,n,o){var i=t.history;i.undone.length=0;var r,a,s=+new Date;if((i.lastOp==o||i.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&t.cm&&i.lastModTime>s-t.cm.options.historyEventDelay||"*"==e.origin.charAt(0)))&&(r=qo(i,i.lastOp==o)))a=p(r.changes),0==j(e.from,e.to)&&0==j(e.from,a.to)?a.to=zo(e):r.changes.push(Ko(t,e));else{var l=p(i.done);for(l&&l.ranges||ni(t.sel,i.done),r={changes:[Ko(t,e)],generation:i.generation},i.done.push(r);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=o,i.lastOrigin=i.lastSelOrigin=e.origin,a||Lt(t,"historyAdded")}function ti(t,e,n,o){var i=e.charAt(0);return"*"==i||"+"==i&&n.ranges.length==o.ranges.length&&n.somethingSelected()==o.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function ei(t,e,n,o){var i=t.history,r=o&&o.origin;n==i.lastSelOp||r&&i.lastSelOrigin==r&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==r||ti(t,r,p(i.done),e))?i.done[i.done.length-1]=e:ni(e,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=r,i.lastSelOp=n,o&&o.clearRedo!==!1&&_o(i.undone)}function ni(t,e){var n=p(e);n&&n.ranges&&n.equals(t)||e.push(t)}function oi(t,e,n,o){var i=e["spans_"+t.id],r=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,o),function(n){n.markedSpans&&((i||(i=e["spans_"+t.id]={}))[r]=n.markedSpans),++r})}function ii(t){if(!t)return null;for(var e,n=0;n-1&&(p(s)[u]=A[u],delete A[u])}}}return o}function li(t,e,n,o){if(t.cm&&t.cm.display.shift||t.extend){var i=e.anchor;if(o){var r=j(n,i)<0;r!=j(o,i)<0?(i=n,n=o):r!=j(n,o)<0&&(n=o)}return new Uo(i,n)}return new Uo(o||n,n)}function Ai(t,e,n,o){pi(t,new jo([li(t,t.sel.primary(),e,n)],0),o)}function ci(t,e,n){for(var o=[],i=0;i=e.ch:s.to>e.ch))){if(i&&(Lt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(r.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var A=l.find(o<0?1:-1),c=void 0;if((o<0?l.inclusiveRight:l.inclusiveLeft)&&(A=Ii(t,A,-o,A&&A.line==e.line?r:null)),A&&A.line==e.line&&(c=j(A,n))&&(o<0?c<0:c>0))return Ci(t,A,e,o,i)}var u=l.find(o<0?-1:1);return(o<0?l.inclusiveLeft:l.inclusiveRight)&&(u=Ii(t,u,o,u.line==e.line?r:null)), +u?Ci(t,u,e,o,i):null}}return e}function yi(t,e,n,o,i){var r=o||1,a=Ci(t,e,n,r,i)||!i&&Ci(t,e,n,r,!0)||Ci(t,e,n,-r,i)||!i&&Ci(t,e,n,-r,!0);return a?a:(t.cantEdit=!0,Q(t.first,0))}function Ii(t,e,n,o){return n<0&&0==e.ch?e.line>t.first?O(t,Q(e.line-1)):null:n>0&&e.ch==(o||N(t,e.line)).text.length?e.line=0;--i)bi(t,{from:o[i].from,to:o[i].to,text:i?[""]:e.text});else bi(t,e)}}function bi(t,e){if(1!=e.text.length||""!=e.text[0]||0!=j(e.from,e.to)){var n=Yo(t,e);$o(t,e,n,t.cm?t.cm.curOp.id:NaN),vi(t,e,n,K(t,e));var o=[];Xo(t,function(t,n){n||d(o,t.history)!=-1||(ji(t.history,e),o.push(t.history)),vi(t,e,null,K(t,e))})}}function xi(t,e,n){if(!t.cm||!t.cm.state.suppressEdits||n){for(var o,i=t.history,r=t.sel,a="undo"==e?i.done:i.undone,s="undo"==e?i.undone:i.done,l=0;l=0;--g){var h=u(g);if(h)return h.v}}}}function Di(t,e){if(0!=e&&(t.first+=e,t.sel=new jo(f(t.sel.ranges,function(t){return new Uo(Q(t.anchor.line+e,t.anchor.ch),Q(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){fo(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,o=n.viewFrom;ot.lastLine())){if(e.from.liner&&(e={from:e.from,to:Q(r,N(t,r).text.length),text:[e.text[0]],origin:e.origin}),e.removed=b(t,e.from,e.to),n||(n=Yo(t,e)),t.cm?Li(t.cm,e,o):Wo(t,e,o),fi(t,n,Ba)}}function Li(t,e,n){var o=t.doc,i=t.display,r=e.from,a=e.to,s=!1,l=r.line;t.options.lineWrapping||(l=v(lt(N(o,r.line))),o.iter(l,a.line+1,function(t){if(t==i.maxLine)return s=!0,!0})),o.sel.contains(e.from,e.to)>-1&&St(t),Wo(o,e,n,yn(t)),t.options.lineWrapping||(o.iter(l,r.line+e.text.length,function(t){var e=pt(t);e>i.maxLineLength&&(i.maxLine=t,i.maxLineLength=e,i.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),o.frontier=Math.min(o.frontier,r.line),Io(t,400);var A=e.text.length-(a.line-r.line)-1;e.full?fo(t):r.line!=a.line||1!=e.text.length||Go(t.doc,e)?fo(t,r.line,a.line+1,A):Mo(t,r.line,"text");var c=Qt(t,"changes"),u=Qt(t,"change");if(u||c){var d={from:r,to:a,text:e.text,removed:e.removed,origin:e.origin};u&&me(t,"change",t,d),c&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function Bi(t,e,n,o,i){if(o||(o=n),j(o,n)<0){var r=o;o=n,n=r}"string"==typeof e&&(e=t.splitLines(e)),Ni(t,{from:n,to:o,text:e,origin:i})}function Si(t,e,n,o){n0||0==s&&a.clearWhenEmpty!==!1)return a;if(a.replacedWith&&(a.collapsed=!0,a.widgetNode=o("span",[a.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||a.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(a.widgetNode.insertLeft=!0)),a.collapsed){if(st(t,e.line,e,n,a)||e.line!=n.line&&st(t,n.line,e,n,a))throw new Error("Inserting collapsed marker partially overlapping an existing one");V()}a.addToHistory&&$o(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var l,c=e.line,u=t.cm;if(t.iter(c,n.line+1,function(t){u&&a.collapsed&&!u.options.lineWrapping&<(t)==u.display.maxLine&&(l=!0),a.collapsed&&c!=e.line&&D(t,0),X(t,new P(a,c==e.line?e.ch:null,c==n.line?n.ch:null)),++c}),a.collapsed&&t.iter(e.line,n.line+1,function(e){dt(t,e)&&D(e,0)}),a.clearOnEnter&&Fa(a,"beforeCursorEnter",function(){return a.clear()}),a.readOnly&&(F(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),a.collapsed&&(a.id=++ls,a.atomic=!0),u){if(l&&(u.curOp.updateMaxLine=!0),a.collapsed)fo(u,e.line,n.line+1);else if(a.className||a.title||a.startStyle||a.endStyle||a.css)for(var d=e.line;d<=n.line;d++)Mo(u,d,"text");a.atomic&&wi(u.doc),me(u,"markerAdded",u,a)}return a}function Vi(t,e){var n=this;this.markers=t,this.primary=e;for(var o=0;o-1)return e.state.draggingText(t),void setTimeout(function(){return e.display.input.focus()},20);try{var A=t.dataTransfer.getData("Text");if(A){var c;if(e.state.draggingText&&!e.state.draggingText.copy&&(c=e.listSelections()),fi(e.doc,Ro(n,n)),c)for(var u=0;u=0;e--)Bi(t.doc,"",o[e].from,o[e].to,"+delete");eo(t)})}function Ar(t,e){var n=N(t.doc,e),o=lt(n);o!=n&&(e=v(o));var i=xt(o),r=i?i[0].level%2?yt(o):Ct(o):0;return Q(e,r)}function cr(t,e){for(var n,o=N(t.doc,e);n=at(o);)o=n.find(1,!0).line,e=null;var i=xt(o),r=i?i[0].level%2?Ct(o):yt(o):o.text.length;return Q(null==e?v(o):e,r)}function ur(t,e){var n=Ar(t,e.line),o=N(t.doc,n.line),i=xt(o);if(!i||0==i[0].level){var r=Math.max(0,o.text.search(/\S/)),a=e.line==n.line&&e.ch<=r&&e.ch;return Q(n.line,a?0:r)}return n}function dr(t,e,n){if("string"==typeof e&&(e=Cs[e],!e))return!1;t.display.input.ensurePolled();var o=t.display.shift,i=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),i=e(t)!=La}finally{t.display.shift=o,t.state.suppressEdits=!1}return i}function gr(t,e,n){for(var o=0;oi-400&&0==j(Ts.pos,n)?o="triple":ws&&ws.time>i-400&&0==j(ws.pos,n)?(o="double",Ts={time:i,pos:n}):(o="single",ws={time:i,pos:n});var a,s=t.doc.sel,A=wa?e.metaKey:e.ctrlKey;t.options.dragDrop&&Va&&!t.isReadOnly()&&"single"==o&&(a=s.contains(n))>-1&&(j((a=s.ranges[a]).from(),n)<0||n.xRel>0)&&(j(a.to(),n)>0||n.xRel<0)?Er(t,e,n,A):mr(t,e,n,o,A)}function Er(t,e,n,o){var i=t.display,r=+new Date,a=go(t,function(s){Aa&&(i.scroller.draggable=!1),t.state.draggingText=!1,vt(document,"mouseup",a),vt(i.scroller,"drop",a),Math.abs(e.clientX-s.clientX)+Math.abs(e.clientY-s.clientY)<10&&(Ut(s),!o&&+new Date-200C&&i.push(new Uo(Q(f,C),Q(f,g(w,A,r))))}i.length||i.push(new Uo(n,n)),pi(u,ko(p.ranges.slice(0,h).concat(i),h),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var y=d,I=y.anchor,E=e;if("single"!=o){var m;m="double"==o?t.findWordAt(e):new Uo(Q(e.line,0),O(u,Q(e.line+1,0))),j(m.anchor,I)>0?(E=m.head,I=R(y.from(),m.anchor)):(E=m.anchor,I=k(y.to(),m.head))}var b=p.ranges.slice(0);b[h]=new Uo(O(u,I),E),pi(u,ko(b,h),Sa)}}function s(e){var n=++y,i=En(t,e,!0,"rect"==o);if(i)if(0!=j(i,T)){t.curOp.focus=r(),a(i);var l=zn(A,u);(i.line>=l.to||i.lineC.bottom?20:0;c&&setTimeout(go(t,function(){y==n&&(A.scroller.scrollTop+=c,s(e))}),50)}}function l(e){t.state.selectingText=!1,y=1/0,Ut(e),A.input.focus(),vt(document,"mousemove",I),vt(document,"mouseup",E),u.history.lastSelOrigin=null}var A=t.display,u=t.doc;Ut(e);var d,h,p=u.sel,f=p.ranges;if(i&&!e.shiftKey?(h=u.sel.contains(n),d=h>-1?f[h]:new Uo(n,n)):(d=u.sel.primary(),h=u.sel.primIndex),Ta?e.shiftKey&&e.metaKey:e.altKey)o="rect",i||(d=new Uo(n,n)),n=En(t,e,!0,!0),h=-1;else if("double"==o){var M=t.findWordAt(n);d=t.display.shift||u.extend?li(u,d,M.anchor,M.head):M}else if("triple"==o){var w=new Uo(Q(n.line,0),O(u,Q(n.line+1,0)));d=t.display.shift||u.extend?li(u,d,w.anchor,w.head):w}else d=li(u,d,n);i?h==-1?(h=f.length,pi(u,ko(f.concat([d]),h),{scroll:!1,origin:"*mouse"})):f.length>1&&f[h].empty()&&"single"==o&&!e.shiftKey?(pi(u,ko(f.slice(0,h).concat(f.slice(h+1)),0),{scroll:!1,origin:"*mouse"}),p=u.sel):ui(u,h,d,Sa):(h=0,pi(u,new jo([d],0),Sa),p=u.sel);var T=n,C=A.wrapper.getBoundingClientRect(),y=0,I=go(t,function(t){Yt(t)?s(t):l(t)}),E=go(t,l);t.state.selectingText=E,Fa(document,"mousemove",I),Fa(document,"mouseup",E)}function Nr(t,e,n,o){var i,r;try{i=e.clientX,r=e.clientY}catch(t){return!1}if(i>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;o&&Ut(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(r>s.bottom||!Qt(t,n))return Rt(e);r-=s.top-a.viewOffset;for(var l=0;l=i){var c=L(t.doc,r),u=t.options.gutters[l];return Lt(t,n,t,c,u,e),Rt(e)}}}function br(t,e){return Nr(t,e,"gutterClick",!0)}function xr(t,e){Oe(t.display,e)||Dr(t,e)||Bt(t,e,"contextmenu")||t.display.input.onContextMenu(e)}function Dr(t,e){return!!Qt(t,"gutterContextMenu")&&Nr(t,e,"gutterContextMenu",!1)}function vr(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),an(t)}function Lr(t){function e(e,o,i,r){t.defaults[e]=o,i&&(n[e]=r?function(t,e,n){n!=Es&&i(t,e,n)}:i)}var n=t.optionHandlers;t.defineOption=e,t.Init=Es,e("value","",function(t,e){return t.setValue(e)},!0),e("mode",null,function(t,e){t.doc.modeOption=e,Vo(t)},!0),e("indentUnit",2,Vo,!0),e("indentWithTabs",!1),e("smartIndent",!0),e("tabSize",4,function(t){Po(t),an(t),fo(t)},!0),e("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],o=t.doc.first;t.doc.iter(function(t){for(var i=0;;){var r=t.text.indexOf(e,i);if(r==-1)break;i=r+e.length,n.push(Q(o,r))}o++});for(var i=n.length-1;i>=0;i--)Bi(t.doc,e,n[i],Q(n[i].line,n[i].ch+e.length))}}),e("specialChars",/[\u0000-\u001f\u007f\u00ad\u200b-\u200f\u2028\u2029\ufeff]/g,function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Es&&t.refresh()}),e("specialCharPlaceholder",ge,function(t){return t.refresh()},!0),e("electricChars",!0),e("inputStyle",Ma?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),e("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),e("rtlMoveVisually",!Ca),e("wholeLineUpdateBefore",!0),e("theme","default",function(t){vr(t),Br(t)},!0),e("keyMap","default",function(t,e,n){var o=sr(e),i=n!=Es&&sr(n);i&&i.detach&&i.detach(t,o),o.attach&&o.attach(t,i||null)}),e("extraKeys",null),e("lineWrapping",!1,Qr,!0),e("gutters",[],function(t){Qo(t.options),Br(t)},!0),e("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?Cn(t.display)+"px":"0",t.refresh()},!0),e("coverGutterNextToScrollbar",!1,function(t){return Xn(t)},!0),e("scrollbarStyle","native",function(t){Zn(t),Xn(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),e("lineNumbers",!1,function(t){Qo(t.options),Br(t)},!0),e("firstLineNumber",1,Br,!0),e("lineNumberFormatter",function(t){return t},Br,!0),e("showCursorWhenSelecting",!1,Nn,!0),e("resetSelectionOnContextMenu",!0),e("lineWiseCopyCut",!0),e("readOnly",!1,function(t,e){"nocursor"==e?(Qn(t),t.display.input.blur(),t.display.disabled=!0):t.display.disabled=!1,t.display.input.readOnlyChanged(e)}),e("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),e("dragDrop",!0,Sr),e("allowDropFileTypes",null),e("cursorBlinkRate",530),e("cursorScrollMargin",0),e("cursorHeight",1,Nn,!0),e("singleCursorHeightPerLine",!0,Nn,!0),e("workTime",100),e("workDelay",100),e("flattenSpans",!0,Po,!0),e("addModeClass",!1,Po,!0),e("pollInterval",100),e("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),e("historyEventDelay",1250),e("viewportMargin",10,function(t){return t.refresh()},!0),e("maxHighlightLength",1e4,Po,!0),e("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),e("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),e("autofocus",null)}function Br(t){So(t),fo(t),setTimeout(function(){return jn(t)},20)}function Sr(t,e,n){var o=n&&n!=Es;if(!e!=!o){var i=t.display.dragFunctions,r=e?Fa:vt;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Qr(t){t.options.lineWrapping?(a(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(Na(t.display.wrapper,"CodeMirror-wrap"),ft(t)),In(t),fo(t),an(t),setTimeout(function(){return Xn(t)},100)}function jr(t,e){var n=this;if(!(this instanceof jr))return new jr(t,e);this.options=e=e?A(e):{},A(ms,e,!1),Qo(e);var o=e.value;"string"==typeof o&&(o=new cs(o,e.mode,null,e.lineSeparator)),this.doc=o;var i=new jr.inputStyles[e.inputStyle](this),r=this.display=new m(t,o,i);r.wrapper.CodeMirror=this,So(this),vr(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),e.autofocus&&!Ma&&r.input.focus(),Zn(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:!1,cutIncoming:!1,selectingText:!1,draggingText:!1,highlight:new u,keySeq:null,specialChars:null},sa&&la<11&&setTimeout(function(){return n.display.input.reset(!0)},20),Ur(this),$i(),oo(this),this.curOp.forceUpdate=!0,Jo(this,o),e.autofocus&&!Ma||this.hasFocus()?setTimeout(l(Sn,this),20):Qn(this);for(var a in Ns)Ns.hasOwnProperty(a)&&Ns[a](n,e[a],Es);Un(this),e.finishInit&&e.finishInit(this);for(var s=0;s400}var i=t.display;Fa(i.scroller,"mousedown",go(t,yr)),sa&&la<11?Fa(i.scroller,"dblclick",go(t,function(e){if(!Bt(t,e)){var n=En(t,e);if(n&&!br(t,e)&&!Oe(t.display,e)){Ut(e);var o=t.findWordAt(n);Ai(t.doc,o.anchor,o.head)}}})):Fa(i.scroller,"dblclick",function(e){return Bt(t,e)||Ut(e)}),ma||Fa(i.scroller,"contextmenu",function(e){return xr(t,e)});var r,a={end:0};Fa(i.scroller,"touchstart",function(e){if(!Bt(t,e)&&!n(e)){i.input.ensurePolled(),clearTimeout(r);var o=+new Date;i.activeTouch={start:o,moved:!1,prev:o-a.end<=300?a:null},1==e.touches.length&&(i.activeTouch.left=e.touches[0].pageX,i.activeTouch.top=e.touches[0].pageY)}}),Fa(i.scroller,"touchmove",function(){i.activeTouch&&(i.activeTouch.moved=!0)}),Fa(i.scroller,"touchend",function(n){var r=i.activeTouch;if(r&&!Oe(i,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=t.coordsChar(i.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Uo(s,s):!r.prev.prev||o(r,r.prev.prev)?t.findWordAt(s):new Uo(Q(s.line,0),O(t.doc,Q(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),Ut(n)}e()}),Fa(i.scroller,"touchcancel",e),Fa(i.scroller,"scroll",function(){i.scroller.clientHeight&&(On(t,i.scroller.scrollTop),Yn(t,i.scroller.scrollLeft,!0),Lt(t,"scroll",t))}),Fa(i.scroller,"mousewheel",function(e){return Vn(t,e)}),Fa(i.scroller,"DOMMouseScroll",function(e){return Vn(t,e)}),Fa(i.wrapper,"scroll",function(){return i.wrapper.scrollTop=i.wrapper.scrollLeft=0}),i.dragFunctions={enter:function(e){Bt(t,e)||zt(e)},over:function(e){Bt(t,e)||(Ki(t,e),zt(e))},start:function(e){return Zi(t,e)},drop:go(t,Ji),leave:function(e){Bt(t,e)||_i(t)}};var s=i.input.getField();Fa(s,"keyup",function(e){return Tr.call(t,e)}),Fa(s,"keydown",go(t,Mr)),Fa(s,"keypress",go(t,Cr)),Fa(s,"focus",function(e){return Sn(t,e)}),Fa(s,"blur",function(e){return Qn(t,e)})}function kr(t,e,n,o){var i,r=t.doc;null==n&&(n="add"),"smart"==n&&(r.mode.indent?i=te(t,e):n="prev");var a=t.options.tabSize,s=N(r,e),l=c(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var A,u=s.text.match(/^\s*/)[0];if(o||/\S/.test(s.text)){if("smart"==n&&(A=r.mode.indent(i,s.text.slice(u.length),s.text),A==La||A>150)){if(!o)return;n="prev"}}else A=0,n="not";"prev"==n?A=e>r.first?c(N(r,e-1).text,null,a):0:"add"==n?A=l+t.options.indentUnit:"subtract"==n?A=l-t.options.indentUnit:"number"==typeof n&&(A=l+n),A=Math.max(0,A);var d="",g=0;if(t.options.indentWithTabs)for(var p=Math.floor(A/a);p;--p)g+=a,d+="\t";if(g1)if(xs&&xs.text.join("\n")==e){if(o.ranges.length%xs.text.length==0){l=[];for(var A=0;A=0;u--){var d=o.ranges[u],g=d.from(),h=d.to();d.empty()&&(n&&n>0?g=Q(g.line,g.ch-n):t.state.overwrite&&!a?h=Q(h.line,Math.min(N(r,h.line).text.length,h.ch+p(s).length)):xs&&xs.lineWise&&xs.text.join("\n")==e&&(g=h=Q(g.line,0))),c=t.curOp.updateInput;var M={from:g,to:h,text:l?l[u%l.length]:s,origin:i||(a?"paste":t.state.cutIncoming?"cut":"+input")};Ni(t.doc,M),me(t,"inputRead",t,M)}e&&!a&&Yr(t,e),eo(t),t.curOp.updateInput=c,t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=!1}function Or(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||uo(e,function(){return zr(e,n,0,null,"paste")}),!0}function Yr(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,o=n.ranges.length-1;o>=0;o--){var i=n.ranges[o];if(!(i.head.ch>100||o&&n.ranges[o-1].head.line==i.head.line)){var r=t.getModeAt(i.head),a=!1;if(r.electricChars){for(var s=0;s-1){a=kr(t,i.head.line,"smart");break}}else r.electricInput&&r.electricInput.test(N(t.doc,i.head.line).text.slice(0,i.head.ch))&&(a=kr(t,i.head.line,"smart"));a&&me(t,"electricInput",t,i.head.line)}}}function Hr(t){for(var e=[],n=[],o=0;oo&&(kr(e,r.head.line,t,!0),o=r.head.line,i==e.doc.sel.primIndex&&eo(e));else{var a=r.from(),s=r.to(),l=Math.max(o,a.line);o=Math.min(e.lastLine(),s.line-(s.ch?0:1))+1;for(var A=l;A0&&ui(e.doc,i,new Uo(a,c[i].to()),Ba)}}}),getTokenAt:function(t,e){return ie(this,t,e)},getLineTokens:function(t,e){return ie(this,Q(t),e,!0)},getTokenTypeAt:function(t){t=O(this.doc,t);var e,n=$t(this,N(this.doc,t.line)),o=0,i=(n.length-1)/2,r=t.ch;if(0==r)e=n[2];else for(;;){var a=o+i>>1;if((a?n[2*a-1]:0)>=r)i=a;else{if(!(n[2*a+1]r&&(t=r,i=!0),o=N(this.doc,t)}else o=t;return An(this,o,{top:0,left:0},e||"page",n).top+(i?this.doc.height-ht(o):0)},defaultTextHeight:function(){return Mn(this.display)},defaultCharWidth:function(){return wn(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,o,i){var r=this.display;t=dn(this,O(this.doc,t));var a=t.bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),r.sizer.appendChild(e),"over"==o)a=t.top;else if("above"==o||"near"==o){var l=Math.max(r.wrapper.clientHeight,this.doc.height),A=Math.max(r.sizer.clientWidth,r.lineSpace.clientWidth);("above"==o||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>A&&(s=A-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==i?(s=r.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==i?s=0:"middle"==i&&(s=(r.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&qn(this,s,a,s+e.offsetWidth,a+e.offsetHeight)},triggerOnKeyDown:ho(Mr),triggerOnKeyPress:ho(Cr),triggerOnKeyUp:Tr,execCommand:function(t){if(Cs.hasOwnProperty(t))return Cs[t].call(null,this)},triggerElectric:ho(function(t){Yr(this,t)}),findPosH:function(t,e,n,o){var i=this,r=1;e<0&&(r=-1,e=-e);for(var a=O(this.doc,t),s=0;s0&&s(n.charAt(o-1));)--o;for(;i.5)&&In(this),Lt(this,"refresh",this)}),swapDoc:ho(function(t){var e=this.doc;return e.cm=null,Jo(this,t),an(this),this.display.input.reset(),this.scrollTo(t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,me(this,"swapDoc",this,e),e}),getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},jt(t),t.registerHelper=function(e,o,i){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][o]=i},t.registerGlobalHelper=function(e,o,i,r){t.registerHelper(e,o,r),n[e]._global.push({pred:i,val:r})}}function Gr(t,e,n,o,i){function r(){var e=s+n;return!(e=t.first+t.size)&&(s=e,c=N(t,e))}function a(t){var e=(i?Nt:bt)(c,l,n,!0);if(null==e){if(t||!r())return!1;l=i?(n<0?yt:Ct)(c):n<0?c.text.length:0}else l=e;return!0}var s=e.line,l=e.ch,A=n,c=N(t,s);if("char"==o)a();else if("column"==o)a(!0);else if("word"==o||"group"==o)for(var u=null,d="group"==o,g=t.cm&&t.cm.getHelper(e,"wordChars"),h=!0;!(n<0)||a(!h);h=!1){var p=c.text.charAt(l)||"\n",f=y(p,g)?"w":d&&"\n"==p?"n":!d||/\s/.test(p)?null:"p";if(!d||h||f||(f="s"),u&&u!=f){n<0&&(n=1,a());break}if(f&&(u=f),n>0&&!a(!h))break}var M=yi(t,Q(s,l),e,A,!0);return j(e,M)||(M.hitSide=!0),M}function Wr(t,e,n,o){var i,r=t.doc,a=e.left;if("page"==o){var s=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),l=Math.max(s-.5*Mn(t.display),3);i=(n>0?e.bottom:e.top)+n*l}else"line"==o&&(i=n>0?e.bottom+3:e.top-3);for(var A;A=pn(t,a,i),A.outside;){if(n<0?i<=0:i>=r.height){A.hitSide=!0;break}i+=5*n}return A}function Xr(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new u,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null}function Jr(t,e){var n=Ke(t,e.line);if(!n||n.hidden)return null;var o=N(t.doc,e.line),i=Xe(n,o,e.line),r=xt(o),a="left";if(r){var s=Et(r,e.ch);a=s%2?"right":"left"}var l=$e(i.map,e.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function Zr(t,e){return e&&(t.bad=!0),t}function Kr(t,e,n,o,i){function r(t){return function(e){return e.id==t}}function a(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(null!=n)return void(s+=""==n?e.textContent.replace(/\u200b/g,""):n);var c,u=e.getAttribute("cm-marker");if(u){var d=t.findMarks(Q(o,0),Q(i+1,0),r(+u));return void(d.length&&(c=d[0].find())&&(s+=b(t.doc,c.from,c.to).join(A)))}if("false"==e.getAttribute("contenteditable"))return;for(var g=0;g=15&&(da=!1,Aa=!0);var Ia,Ea=wa&&(ca||da&&(null==ya||ya<12.11)),ma=ia||sa&&la>=9,Na=function(e,n){var o=e.className,i=t(n).exec(o);if(i){var r=o.slice(i.index+i[0].length);e.className=o.slice(0,i.index)+(r?i[1]+r:"")}};Ia=document.createRange?function(t,e,n,o){var i=document.createRange();return i.setEnd(o||t,n),i.setStart(t,e),i}:function(t,e,n){var o=document.body.createTextRange();try{o.moveToElementText(t.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o};var ba=function(t){t.select()};fa?ba=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:sa&&(ba=function(t){try{t.select()}catch(t){}}),u.prototype.set=function(t,e){clearTimeout(this.id),this.id=setTimeout(e,t)};var xa,Da,va=30,La={toString:function(){return"CodeMirror.Pass"}},Ba={scroll:!1},Sa={origin:"*mouse"},Qa={origin:"+move"},ja=[""],Ua=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/,ka=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/,Ra=!1,za=!1,Oa=null,Ya=function(){function t(t){return t<=247?n.charAt(t):1424<=t&&t<=1524?"R":1536<=t&&t<=1773?o.charAt(t-1536):1774<=t&&t<=2220?"r":8192<=t&&t<=8203?"w":8204==t?"b":"L"}function e(t,e,n){this.level=t,this.from=e,this.to=n}var n="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",o="rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmm",i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,a=/[LRr]/,s=/[Lb1n]/,l=/[1n]/,A="L";return function(n){if(!i.test(n))return!1;for(var o=n.length,c=[],u=0;u=this.string.length},sol:function(){return this.pos==this.lineStart},peek:function(){return this.string.charAt(this.pos)||void 0},next:function(){if(this.pose},eatSpace:function(){for(var t=this,e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++t.pos;return this.pos>e},skipToEnd:function(){this.pos=this.string.length},skipTo:function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},backUp:function(t){this.pos-=t},column:function(){return this.lastColumnPos0?null:(o&&e!==!1&&(this.pos+=o[0].length),o)}var i=function(t){return n?t.toLowerCase():t},r=this.string.substr(this.pos,t.length);if(i(r)==i(t))return e!==!1&&(this.pos+=t.length),!0},current:function(){return this.string.slice(this.start,this.pos)},hideFirstChars:function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}}},jt(le),le.prototype.lineNo=function(){return v(this)};var qa,$a={},ts={},es=null,ns=null,os={left:0,right:0,top:0,bottom:0},is=0,rs=null;sa?rs=-.53:ia?rs=15:ua?rs=-.7:ga&&(rs=-1/3),Gn.prototype=A({update:function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,o=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?o+"px":"0";var i=t.viewHeight-(e?o:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=t.barLeft+"px";var r=t.viewWidth-t.barLeft-(n?o:0);this.horiz.firstChild.style.width=t.scrollWidth-t.clientWidth+r+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:e?o:0}},setScrollLeft:function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz)},setScrollTop:function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert)},zeroWidthHack:function(){var t=wa&&!ha?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new u,this.disableVert=new u},enableZeroWidthBar:function(t,e){function n(){var o=t.getBoundingClientRect(),i=document.elementFromPoint(o.left+1,o.bottom-1);i!=t?t.style.pointerEvents="none":e.set(1e3,n)}t.style.pointerEvents="auto",e.set(1e3,n)},clear:function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)}},Gn.prototype),Wn.prototype=A({update:function(){return{bottom:0,right:0}},setScrollLeft:function(){},setScrollTop:function(){},clear:function(){}},Wn.prototype);var as={native:Gn,null:Wn},ss=0;mo.prototype.signal=function(t,e){Qt(t,e)&&this.events.push(arguments)},mo.prototype.finish=function(){for(var t=this,e=0;e=0&&j(t,i.to())<=0)return o}return-1}},Uo.prototype={from:function(){return R(this.anchor,this.head)},to:function(){return k(this.anchor,this.head)},empty:function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch}},ki.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=this,o=t,i=t+e;o1||!(this.children[0]instanceof ki))){var l=[];this.collapse(l),this.children=[new ki(l)],this.children[0].parent=this}},collapse:function(t){for(var e=this,n=0;n50){for(var s=r.lines.length%25+25,l=s;l10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var o=this,i=0;ie.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&fo(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&wi(e.doc)),e&&me(e,"markerCleared",e,this),n&&io(e),this.parent&&this.parent.clear()}},Hi.prototype.find=function(t,e){var n=this;null==t&&"bookmark"==this.type&&(t=1);for(var o,i,r=0;r=0;A--)Ni(o,i[A]);l?hi(this,l):this.cm&&eo(this.cm)}),undo:po(function(){xi(this,"undo")}),redo:po(function(){xi(this,"redo")}),undoSelection:po(function(){xi(this,"undo",!0)}),redoSelection:po(function(){xi(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,o=0;o=t.ch)&&e.push(i.marker.parent||i.marker)}return e},findMarks:function(t,e,n){t=O(this,t),e=O(this,e);var o=[],i=t.line;return this.iter(t.line,e.line+1,function(r){var a=r.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&i!=t.line||null!=l.from&&i==e.line&&l.from>=e.ch||n&&!n(l.marker)||o.push(l.marker.parent||l.marker)}++i}),o},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var o=0;ot?(e=t,!0):(t-=r,void++n)}),O(this,Q(n,e))},indexFromPos:function(t){t=O(this,t);var e=t.ch;if(t.linee&&(e=t.from),null!=t.to&&t.to0)i=new Q(i.line,i.ch+1),t.replaceRange(r.charAt(i.ch-1)+r.charAt(i.ch-2),Q(i.line,i.ch-2),i,"+transpose");else if(i.line>t.doc.first){var a=N(t.doc,i.line-1).text;a&&(i=new Q(i.line,1),t.replaceRange(r.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),Q(i.line-1,a.length-1),i,"+transpose"))}n.push(new Uo(i,i))}t.setSelections(n)})},newlineAndIndent:function(t){return uo(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var o=0;ot.firstLine()&&(o=Q(o.line-1,N(t.doc,o.line-1).length)),i.ch==N(t.doc,i.line).text.length&&i.linee.viewTo-1)return!1;var r,a,s;o.line==e.viewFrom||0==(r=mn(t,o.line))?(a=v(e.view[0].line),s=e.view[0].node):(a=v(e.view[r].line),s=e.view[r-1].node.nextSibling);var l,A,c=mn(t,i.line);if(c==e.view.length-1?(l=e.viewTo-1,A=e.lineDiv.lastChild):(l=v(e.view[c+1].line)-1,A=e.view[c+1].node.previousSibling),!s)return!1;for(var u=t.doc.splitLines(Kr(t,s,A,a,l)),d=b(t.doc,Q(a,0),Q(l,N(t.doc,l).text.length));u.length>1&&d.length>1;)if(p(u)==p(d))u.pop(),d.pop(),l--;else{if(u[0]!=d[0])break;u.shift(),d.shift(),a++}for(var g=0,h=0,f=u[0],M=d[0],w=Math.min(f.length,M.length);g1||u[0]||j(I,E)?(Bi(t.doc,u,I,E,"+input"),!0):void 0},ensurePolled:function(){this.forceCompositionEnd()},reset:function(){this.forceCompositionEnd()},forceCompositionEnd:function(){this.composing&&(this.composing=null,this.pollContent()||fo(this.cm),this.div.blur(),this.div.focus())},readFromDOMSoon:function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){t.readDOMTimeout=null,t.composing||!t.cm.isReadOnly()&&t.pollContent()||uo(t.cm,function(){return fo(t.cm)})},80))},setUneditable:function(t){t.contentEditable="false"},onKeyPress:function(t){t.preventDefault(),this.cm.isReadOnly()||go(this.cm,zr)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0)},readOnlyChanged:function(t){this.div.contentEditable=String("nocursor"!=t)},onContextMenu:w,resetPosition:w,needsContentAttribute:!0},Xr.prototype),$r.prototype=A({init:function(t){function e(t){if(!Bt(i,t)){if(i.somethingSelected())Rr({lineWise:!1,text:i.getSelections()}),o.inaccurateSelection&&(o.prevInput="",o.inaccurateSelection=!1,a.value=xs.text.join("\n"),ba(a));else{if(!i.options.lineWiseCopyCut)return;var e=Hr(i);Rr({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,Ba):(o.prevInput="",a.value=e.text.join("\n"),ba(a))}"cut"==t.type&&(i.state.cutIncoming=!0)}}var n=this,o=this,i=this.cm,r=this.wrapper=Vr(),a=this.textarea=r.firstChild;t.wrapper.insertBefore(r,t.wrapper.firstChild),fa&&(a.style.width="0px"),Fa(a,"input",function(){sa&&la>=9&&n.hasSelection&&(n.hasSelection=null),o.poll()}),Fa(a,"paste",function(t){Bt(i,t)||Or(t,i)||(i.state.pasteIncoming=!0,o.fastPoll())}),Fa(a,"cut",e),Fa(a,"copy",e),Fa(t.scroller,"paste",function(e){Oe(t,e)||Bt(i,e)||(i.state.pasteIncoming=!0,o.focus())}),Fa(t.lineSpace,"selectstart",function(e){Oe(t,e)||Ut(e)}),Fa(a,"compositionstart",function(){var t=i.getCursor("from");o.composing&&o.composing.range.clear(),o.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}}),Fa(a,"compositionend",function(){o.composing&&(o.poll(),o.composing.range.clear(),o.composing=null)})},prepareSelection:function(){var t=this.cm,e=t.display,n=t.doc,o=bn(t);if(t.options.moveInputWithCursor){var i=dn(t,n.sel.primary().head,"div"),r=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,i.top+a.top-r.top)),o.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,i.left+a.left-r.left))}return o},showSelection:function(t){var e=this.cm,o=e.display;n(o.cursorDiv,t.cursors),n(o.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},reset:function(t){if(!this.contextMenuPending){var e,n,o=this.cm,i=o.doc;if(o.somethingSelected()){this.prevInput="";var r=i.sel.primary();e=Wa&&(r.to().line-r.from().line>100||(n=o.getSelection()).length>1e3);var a=e?"-":n||o.getSelection();this.textarea.value=a,o.state.focused&&ba(this.textarea),sa&&la>=9&&(this.hasSelection=a)}else t||(this.prevInput=this.textarea.value="",sa&&la>=9&&(this.hasSelection=null));this.inaccurateSelection=e}},getField:function(){return this.textarea},supportsTouch:function(){return!1},focus:function(){if("nocursor"!=this.cm.options.readOnly&&(!Ma||r()!=this.textarea))try{this.textarea.focus()}catch(t){}},blur:function(){this.textarea.blur()},resetPosition:function(){this.wrapper.style.top=this.wrapper.style.left=0},receivedFocus:function(){this.slowPoll()},slowPoll:function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},fastPoll:function(){function t(){var o=n.poll();o||e?(n.pollingFast=!1,n.slowPoll()):(e=!0,n.polling.set(60,t))}var e=!1,n=this;n.pollingFast=!0,n.polling.set(20,t)},poll:function(){var t=this,e=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!e.state.focused||Ga(n)&&!o&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var i=n.value;if(i==o&&!e.somethingSelected())return!1;if(sa&&la>=9&&this.hasSelection===i||wa&&/[\uf700-\uf7ff]/.test(i))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var r=i.charCodeAt(0);if(8203!=r||o||(o="​"),8666==r)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(o.length,i.length);a1e3||i.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=i,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},ensurePolled:function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},onKeyPress:function(){sa&&la>=9&&(this.hasSelection=null),this.fastPoll()},onContextMenu:function(t){function e(){if(null!=a.selectionStart){var t=i.somethingSelected(),e="​"+(t?a.value:"");a.value="⇚",a.value=e,o.prevInput=t?"":"​",a.selectionStart=1,a.selectionEnd=e.length,r.selForContextMenu=i.doc.sel}}function n(){if(o.contextMenuPending=!1,o.wrapper.style.cssText=u,a.style.cssText=c,sa&&la<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=l),null!=a.selectionStart){(!sa||sa&&la<9)&&e();var t=0,n=function(){r.selForContextMenu==i.doc.sel&&0==a.selectionStart&&a.selectionEnd>0&&"​"==o.prevInput?go(i,Ei)(i):t++<10?r.detectingSelectAll=setTimeout(n,500):r.input.reset()};r.detectingSelectAll=setTimeout(n,200)}}var o=this,i=o.cm,r=i.display,a=o.textarea,s=En(i,t),l=r.scroller.scrollTop;if(s&&!da){var A=i.options.resetSelectionOnContextMenu;A&&i.doc.sel.contains(s)==-1&&go(i,pi)(i.doc,Ro(s),Ba);var c=a.style.cssText,u=o.wrapper.style.cssText;o.wrapper.style.cssText="position: absolute";var d=o.wrapper.getBoundingClientRect();a.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-d.top-5)+"px; left: "+(t.clientX-d.left-5)+"px;\n z-index: 1000; background: "+(sa?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);";var g;if(Aa&&(g=window.scrollY),r.input.focus(),Aa&&window.scrollTo(null,g),r.input.reset(),i.somethingSelected()||(a.value=o.prevInput=" "),o.contextMenuPending=!0,r.selForContextMenu=i.doc.sel,clearTimeout(r.detectingSelectAll),sa&&la>=9&&e(),ma){zt(t);var h=function(){vt(window,"mouseup",h),setTimeout(n,20)};Fa(window,"mouseup",h)}else setTimeout(n,50)}},readOnlyChanged:function(t){t||this.reset()},setUneditable:w,needsContentAttribute:!1},$r.prototype),Lr(jr),Pr(jr);var Ds="iter insert remove copy getEditor constructor".split(" ");for(var vs in cs.prototype)cs.prototype.hasOwnProperty(vs)&&d(Ds,vs)<0&&(jr.prototype[vs]=function(t){return function(){return t.apply(this.doc,arguments)}}(cs.prototype[vs]));return jt(cs),jr.inputStyles={textarea:$r,contenteditable:Xr},jr.defineMode=function(t){jr.defaults.mode||"null"==t||(jr.defaults.mode=t),Pt.apply(this,arguments)},jr.defineMIME=Gt,jr.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}),jr.defineMIME("text/plain","null"),jr.defineExtension=function(t,e){jr.prototype[t]=e},jr.defineDocExtension=function(t,e){cs.prototype[t]=e},jr.fromTextArea=ta,ea(jr),jr.version="5.21.0",jr})},,,,,,,,,,,,,,function(t,e,n){!function(t){t(n(406))}(function(t){"use strict";function e(t,e){if(!t.hasOwnProperty(e))throw new Error("Undefined state "+e+" in simple mode")}function n(t,e){if(!t)return/(?:)/;var n="";return t instanceof RegExp?(t.ignoreCase&&(n="i"),t=t.source):t=String(t),new RegExp((e===!1?"":"^")+"(?:"+t+")",n)}function o(t){if(!t)return null;if("string"==typeof t)return t.replace(/\./g," ");for(var e=[],n=0;n2){o.pending=[];for(var d=2;d-1)return t.Pass;var a=o.indent.length-1,s=e[o.state];t:for(;;){for(var A=0;A0&&e.to.ch-e.from.ch!=n.to.ch-n.from.ch}function o(t,e,n){var o=t.options.hintOptions,i={};for(var r in p)i[r]=p[r];if(o)for(var r in o)void 0!==o[r]&&(i[r]=o[r]);if(n)for(var r in n)void 0!==n[r]&&(i[r]=n[r]);return i.hint.resolve&&(i.hint=i.hint.resolve(t,e)),i}function i(t){return"string"==typeof t?t:t.text}function r(t,e){function n(t,n){var i;i="string"!=typeof n?function(t){return n(t,e)}:o.hasOwnProperty(n)?o[n]:n,r[t]=i}var o={Up:function(){e.moveFocus(-1)},Down:function(){e.moveFocus(1)},PageUp:function(){e.moveFocus(-e.menuSize()+1,!0)},PageDown:function(){e.moveFocus(e.menuSize()-1,!0)},Home:function(){e.setFocus(0)},End:function(){e.setFocus(e.length-1)},Enter:e.pick,Tab:e.pick,Esc:e.close},i=t.options.customKeys,r=i?{}:o;if(i)for(var a in i)i.hasOwnProperty(a)&&n(a,i[a]);var s=t.options.extraKeys;if(s)for(var a in s)s.hasOwnProperty(a)&&n(a,s[a]);return r}function a(t,e){for(;e&&e!=t;){if("LI"===e.nodeName.toUpperCase()&&e.parentNode==t)return e;e=e.parentNode}}function s(e,n){this.completion=e,this.data=n,this.picked=!1;var o=this,s=e.cm,l=this.hints=document.createElement("ul");l.className="CodeMirror-hints",this.selectedHint=n.selectedHint||0;for(var A=n.list,c=0;cl.clientHeight+1,N=s.getScrollInfo();if(E>0){var b=I.bottom-I.top,x=f.top-(f.bottom-I.top);if(x-b>0)l.style.top=(w=f.top-b)+"px",T=!1;else if(b>y){l.style.height=y-5+"px",l.style.top=(w=f.bottom-I.top)+"px";var D=s.getCursor();n.from.ch!=D.ch&&(f=s.cursorCoords(D),l.style.left=(M=f.left)+"px",I=l.getBoundingClientRect())}}var v=I.right-C;if(v>0&&(I.right-I.left>C&&(l.style.width=C-5+"px",v-=I.right-I.left-C),l.style.left=(M=f.left-v)+"px"),m)for(var L=l.firstChild;L;L=L.nextSibling)L.style.paddingRight=s.display.nativeBarWidth+"px";if(s.addKeyMap(this.keyMap=r(e,{moveFocus:function(t,e){o.changeActive(o.selectedHint+t,e)},setFocus:function(t){o.changeActive(t)},menuSize:function(){return o.screenAmount()},length:A.length,close:function(){e.close()},pick:function(){o.pick()},data:n})),e.options.closeOnUnfocus){var B;s.on("blur",this.onBlur=function(){B=setTimeout(function(){e.close()},100)}),s.on("focus",this.onFocus=function(){clearTimeout(B)})}return s.on("scroll",this.onScroll=function(){var t=s.getScrollInfo(),n=s.getWrapperElement().getBoundingClientRect(),o=w+N.top-t.top,i=o-(window.pageYOffset||(document.documentElement||document.body).scrollTop);return T||(i+=l.offsetHeight), +i<=n.top||i>=n.bottom?e.close():(l.style.top=o+"px",void(l.style.left=M+N.left-t.left+"px"))}),t.on(l,"dblclick",function(t){var e=a(l,t.target||t.srcElement);e&&null!=e.hintId&&(o.changeActive(e.hintId),o.pick())}),t.on(l,"click",function(t){var n=a(l,t.target||t.srcElement);n&&null!=n.hintId&&(o.changeActive(n.hintId),e.options.completeOnSingleClick&&o.pick())}),t.on(l,"mousedown",function(){setTimeout(function(){s.focus()},20)}),t.signal(n,"select",A[0],l.firstChild),!0}function l(t,e){if(!t.somethingSelected())return e;for(var n=[],o=0;o0?e(t):o(i+1)})}var r=l(t,i);o(0)};return r.async=!0,r.supportsSelection=!0,r}return(o=e.getHelper(e.getCursor(),"hintWords"))?function(e){return t.hint.fromList(e,{words:o})}:t.hint.anyword?function(e,n){return t.hint.anyword(e,n)}:function(){}}var u="CodeMirror-hint",d="CodeMirror-hint-active";t.showHint=function(t,e,n){if(!e)return t.showHint(n);n&&n.async&&(e.async=!0);var o={hint:e};if(n)for(var i in n)o[i]=n[i];return t.showHint(o)},t.defineExtension("showHint",function(n){n=o(this,this.getCursor("start"),n);var i=this.listSelections();if(!(i.length>1)){if(this.somethingSelected()){if(!n.hint.supportsSelection)return;for(var r=0;r=this.data.list.length?e=n?this.data.list.length-1:0:e<0&&(e=n?0:this.data.list.length-1),this.selectedHint!=e){var o=this.hints.childNodes[this.selectedHint];o.className=o.className.replace(" "+d,""),o=this.hints.childNodes[this.selectedHint=e],o.className+=" "+d,o.offsetTopthis.hints.scrollTop+this.hints.clientHeight&&(this.hints.scrollTop=o.offsetTop+o.offsetHeight-this.hints.clientHeight+3),t.signal(this.data,"select",this.data.list[this.selectedHint],o)}},screenAmount:function(){return Math.floor(this.hints.clientHeight/this.hints.firstChild.offsetHeight)||1}},t.registerHelper("hint","auto",{resolve:c}),t.registerHelper("hint","fromList",function(e,n){var o=e.getCursor(),i=e.getTokenAt(o),r=t.Pos(o.line,i.end);if(i.string&&/\w/.test(i.string[i.string.length-1]))var a=i.string,s=t.Pos(o.line,i.start);else var a="",s=r;for(var l=[],A=0;A,]/,closeOnUnfocus:!0,completeOnSingleClick:!0,container:null,customKeys:null,extraKeys:null};t.defineOption("hintOptions",null)})},,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,function(t,e,n){var o=n(500);"string"==typeof o&&(o=[[t.id,o,""]]);n(9)(o,{});o.locals&&(t.exports=o.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,".CodeMirror-hscrollbar,.CodeMirror-vscrollbar{overflow-x:hidden;overflow-y:hidden}.cm-s-default .cm-keyword{color:#708}.cm-s-default .cm-atom{color:#219}.cm-s-default .cm-atom-2{color:#397}.cm-s-default .cm-atom-3{color:#fa1}.cm-s-default .cm-number{color:#164}.cm-s-default .cm-def{color:#00f}.cm-s-default .cm-variable{color:#019dff}.cm-s-default .cm-operator{color:#49adff}.cm-s-default .cm-property{color:#878696}.cm-s-default .cm-variable-2{color:#05a}.cm-s-default .cm-variable-3{color:#085}.cm-s-default .cm-comment{color:#a50}.cm-s-default .cm-string{color:#a11}.cm-s-default .cm-string-2{color:#f50}.cm-s-default .cm-meta,.cm-s-default .cm-qualifier{color:#555}.cm-s-default .cm-builtin{color:#30a}.cm-s-default .cm-bracket{color:#997}.cm-s-default .cm-tag{color:#170}.cm-s-default .cm-attribute{color:#00c}.cm-s-default .cm-header{color:blue}.cm-s-default .cm-quote{color:#090}.cm-s-default .cm-hr{color:#999}.cm-s-default .cm-link{color:#00c}",""])},function(t,e,n){"use strict";var o=n(226);n(421),n(420),n(502),n(503),n(504),n(505),n(506),n(366),n(367),window._dirty=!1,window._setDirty=function(){window._dirty||(window._dirty=!0,$("#saveButton").html(" *保存"),$("#saveButton").removeClass("disabled"),$("#saveButtonNewVersion").html(" *保存新版本"),$("#saveButtonNewVersion").removeClass("disabled"))},function(t){window.URule||(window.URule={}),t.helper.keyCode.ARROW_UP="none",t.helper.keyCode.ARROW_DOWN="none",t.helper.keyCode.ARROW_LEFT="none",t.helper.keyCode.ARROW_RIGHT="none",URule.DecisionTable=function(t){function e(t){if($("#saveButton").hasClass("disabled"))return!1;var e=null;t&&(e=prompt("请输入新版本描述."));var n=(0,o.getParameter)("file"),i=r.toXml(),a={content:i,file:n,newVersion:t},s=window._server+"/common/saveFile";t?bootbox.prompt("请输入新版本描述.",function(t){t&&(a.versionComment=t,(0,o.ajaxSave)(s,a,function(){r.resetState()}))}):(0,o.ajaxSave)(s,a,function(){r.resetState()})}var n;window._VariableValueArray.push(this),window._ParameterValueArray.push(this);var i=$("#"+t);this.hasMod=!0,this.container=i;var r=this,a='',s='',l='',A='";i.append(A),$("#addCriteriaButton").click(function(){var t=r.getCurrentCellData(),e=t.row+t.rowspan,n=t.col;r.mergeRange(n-1),r.translateRow(e),r.createRowData(e),r.createCellDataRange(e,e,n,r.getLastColIndex()),r.insertRow(e-1),r.renderCells(),r.setDirty(),$("#deleteCriteriaButton").removeClass("disabled"),r.invoke("render")}),$("#deleteCriteriaButton").click(function(){var t=r.getHighlight(),e=t.row,n=t.col,o=r.getCellData(e,n),i=o.rowspan;r.mergeRange(n-1,-i),r.removeRowDataRange(e,i),r.removeCellDataRange(e,e+i-1,n,r.getLastColIndex()),r.translateRow(e+i,-i),r.removeRow(e,i),r.renderCells(),r.setDirty(),r.invoke("render"),1==r.countRows()&&$(this).addClass("disabled")}),$("#configVarButton").click(function(){r.configVarDialog||(r.configVarDialog=new urule.ConfigVariableDialog(r)),r.configVarDialog.open()}),$("#configConstantsButton").click(function(){r.configConstantDialog||(r.configConstantDialog=new urule.ConfigConstantDialog(r)),r.configConstantDialog.open()}),$("#configActionButton").click(function(){r.configActionDialog||(r.configActionDialog=new urule.ConfigActionDialog(r)),r.configActionDialog.open()}),$("#configParameterButton").click(function(){r.configParameterDialog||(r.configParameterDialog=new urule.ConfigParameterDialog(r)),r.configParameterDialog.open()}),$("#saveButton").click(function(){e(!1)}),$("#saveButtonNewVersion").click(function(){e(!0)}),r.load(),window.ht=r;var c={type:"urule",manualRowResize:!0,manualColumnResize:!0,autoWrapCol:!0,startCols:r.getColDatas().length,maxRows:2147483647,startRows:r.getRowDatas().length,fillHandle:!1,multiSelect:!1,className:"htMiddle",rowHeaders:!0,maxCols:2147483647,mergeCells:!0,autoWrapRow:!0,outsideClickDeselects:!1,colWidths:120};n=$("
    "),i.append(n),n.handsontable(c),r._handsontable=n.handsontable("getInstance"),r._handsontable.ht=r,c.colHeaders=function(t){var e,n,o=r.getColData(t),i=o.type,a="parameter"==o.variableCategory?"参数":o.variableCategory,s=o.variableLabel,l=o.width,A=a+"."+s;return r.setColWidth(t,l),a&&s||(A=""),"Criteria"==i?(n="glyphicon glyphicon-filter",e="icon-filter"):"ExecuteMethod"==i?(A="执行方法",n="glyphicon glyphicon-flash"):"Assignment"==i?n="glyphicon glyphicon-tasks":"ConsolePrint"==i&&(A="控制台输出",n="glyphicon glyphicon-print")," "+A},c.rowHeaders=function(t){var e=r.getRowData(t),n=e.height;return r.setRowHeight(t,n),t+1},c.cells=function(t,e,n){return{readOnly:!0}},r.updateSettings(c),r.renderCells(),r.addHook("afterSelectionEnd",function(){var t=r.getCurrentColData();r.getCurrentRowData(),r.getCurrentCellData();if("Criteria"==t.type){if($("#addCriteriaButton").removeClass("disabled"),r.dialogCondition&&r.dialogCondition.isShow){var e=r.getRequestParameter("project");t.variableCategory?r.dialogCondition.setOption({title:"常用条件列表【"+t.variableCategory+"."+t.variableLabel+"】"}):r.dialogCondition.setOption({title:"常用条件列表"}),r.dialogCondition.refresh(e,"scriptdecisiontable",t.variableName)}}else $("#addCriteriaButton").addClass("disabled"),r.dialogCondition&&r.dialogCondition.isShow&&(r.dialogCondition.setOption({title:"动作列不支持插入条件!"}),r.dialogCondition.refresh(e,"scriptdecisiontable",""))}),r.addHook("beforeColumnResize",function(t,e){var n=r.getColData(t);n.width=e,r.setDirty(),r.invoke("render")}),r.addHook("beforeRowResize",function(t,e){var n=r.getRowData(t);n.height=e,r.setDirty()}),r.addHook("afterRender",function(){$(".htCore tr").each(function(){$(this).children().css("border-right-width",""),$(this).children().eq(r.countCriteriaCols()).css("border-right-width","3px")})}),r.initMenu(),r.resetState(),n.find(".handsontable").remove(),r.invoke("render")},URule.DecisionTable.prototype={updateSettings:function(t){this._handsontable.updateSettings(t)},getCellRenderer:function(t){return this._handsontable.getCellRenderer(t)},getValue:function(){return this._handsontable.getValue()},alter:function(t,e,n,o){this._handsontable.alter(t,e,n,o)},getCell:function(t,e){return this._handsontable.getCell(t,e)},getCellMeta:function(t,e){return this._handsontable.getCellMeta(t,e)},selectCell:function(t,e,n,o,i){this._handsontable.selectCell(t,e,n,o,i)},deselectCell:function(){this._handsontable.deselectCell()},getSelected:function(){return this._handsontable.getSelected()},getSelectedRange:function(){return this._handsontable.getSelectedRange()},getMergeInfo:function(t,e){return this._handsontable.mergeCells.mergedCellInfoCollection.getInfo(t,e)},setMergeInfo:function(t){this._handsontable.mergeCells.mergedCellInfoCollection.setInfo(t)},removeMergeInfo:function(t,e){return this._handsontable.mergeCells.mergedCellInfoCollection.removeInfo(t,e)},clear:function(){this._handsontable.clear()},countRows:function(){return this._handsontable.countRows()},countCols:function(){return this._handsontable.countCols()},colToProp:function(t){return this._handsontable.colToProp()},getRowHeader:function(t){return this._handsontable.getRowHeader(t)},getColHeader:function(t){return this._handsontable.getColHeader(t)},getColWidth:function(t){return this._handsontable.getColWidth()},getRowHeight:function(t){return this._handsontable.getRowHeight()},propToCol:function(t){return this._handsontable.propToCol(t)},addHook:function(t,e){this._handsontable.addHook(t,e)},invoke:function(t,e){"render"==t?e===!0?(this._handsontable.forceFullRender=!1,this._handsontable.view.render()):this._handsontable.render():jQuery(this._dom).handsontable(t,e)},getInstance:function(){return this._handsontable},setDirty:function(){window._setDirty()},resetState:function(){window._dirty=!1,$("#saveButton").html(" 保存"),$("#saveButton").addClass("disabled"),$("#saveButtonNewVersion").html(" 保存新版本"),$("#saveButtonNewVersion").addClass("disabled")},insertRow:function(t){this.alter("insert_row"),$(".htCore > tbody > tr:eq("+this.getLastRowIndex()+")").insertAfter(".htCore > tbody > tr:eq("+t+")")},removeRow:function(t,e){for(var n=t;n tbody > tr:eq("+t+")").insertAfter(".htCore > tbody > tr:last");this.alter("remove_row",t,e)},insertCol:function(t){this.alter("insert_col"),$(".htCore > tbody > tr").each(function(){$(this).find("td:last").insertAfter($(this).find("td:eq("+t+")"))})},removeCol:function(t){$(".htCore > tbody > tr").each(function(){$(this).find("td:eq("+t+")").insertAfter($(this).find("td:last"))}),this.alter("remove_col")},renderSelection:function(){var t=this.getSelectedRange();if(t)for(var e=t.getTopLeftCorner(),n=t.getBottomRightCorner(),o=e.row;o<=n.row;o++)for(var i=e.col;i<=n.col;i++)this.renderCell(o,i)},getTableData:function(){return this.decisionTable},getCurrentCellData:function(){var t=this.getHighlight(),e=t.row,n=t.col;return this.getCellData(e,n)},getCurrentRowData:function(){var t=this.getHighlight(),e=t.row;return this.getRowData(e)},getCurrentColData:function(){var t=this.getHighlight(),e=t.col;return this.getColData(e)},getCellDatas:function(){var t=this.decisionTable.cellMap;if(!this.decisionTable.cells&&t){this.decisionTable.cells=[];for(var e in t)this.decisionTable.cells.push(t[e])}return this.decisionTable.cells},getRowDatas:function(){return this.decisionTable.rows||[]},getColDatas:function(){return this.decisionTable.columns||[]},getColData:function(t){for(var e=this.getColDatas(),n=0;n0){for(var n=this.getLastRowIndex();n>=t;n--)this.translateRowHeader(n,e);for(var n=this.getLastRowIndex();n>=t;n--)for(var o=0;o0){for(var n=this.getLastColIndex();n>=t;n--)this.translateColHeader(n,e);for(var o=0;o=t;n--)this.translateCell(o,n,0,e)}else if(e<0){for(var n=t;n':"Constant"==o?t+='':"Action"==o?t+='':"Parameter"==o&&(t+='')}),$.each(n,function(e,n){t+='',t+="",t+=""}),$.each(o,function(e,n){t+=''}),$.each(i,function(e,n){var o=n.variableName;t+=o?'':''}),t+=""},load:function(t){var e,n,o;n=this,e=n.getRequestParameter("file"),o=window._server+"/common/loadXml",$.ajax({url:o,async:!1,type:"POST",data:{files:e},error:function(t,e){alert("加载文件失败!")},success:function(e){var o=e[0],i=o.libraries||[];$.each(i,function(t,e){var n,o;switch(n=e.type,o=e.path,n){case"Constant":constantLibraries.push(o);break;case"Action":actionLibraries.push(o);break;case"Variable":variableLibraries.push(o);break;case"Parameter":parameterLibraries.push(o)}}),n.decisionTable=o,refreshActionLibraries(),refreshConstantLibraries(),refreshVariableLibraries(),refreshParameterLibraries(),t&&t()}})},getRequestParameter:function(t){for(var e=null,n=window.location.search.substring(1).split("&"),o=0;o0&&$.each(i,function(t,n){e.push([{name:"parameter",type:"parameter",variables:i.length?n:[]}])});var r=function(e,n,o){var i=t.getHighlight(),r=(i.row,i.col+(o||0));t.translateCol(r);var a=t.createColData(r);a.type=e,a.width=n||200,"Criteria"==e?t.createCellDataByCopyNextCol(r):t.createCellDataRange(0,t.getLastRowIndex(),r,r),t.insertCol(r-1),t.renderCells(),t.setDirty(),t.invoke("render")},a=function(){var e,n,o;e=t.countActionCols(),n=t.countCriteriaCols(),o=this.getMenuItem("delete"),o&&("删除动作列"==o.label?1==e?o.hide():o.show():1==n?o.hide():o.show())},s=[{label:"插入条件列",icon:"glyphicon glyphicon-filter",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){r("Criteria",120)}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){r("Criteria",120,1)}}]}},{label:"删除条件列",icon:"glyphicon glyphicon-minus-sign",name:"delete",onClick:function(){var e=t.getHighlight(),n=e.col;t.removeCellDataRange(0,t.getLastRowIndex(),n,n),t.removeColData(n),t.translateCol(n,-1),t.removeCol(n),t.renderCells(),t.setDirty(),t.invoke("render")}},{label:"插入执行方法动作列",icon:"glyphicon glyphicon-flash",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){r("ExecuteMethod")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){r("ExecuteMethod",200,1)}}]}},{label:"插入变量赋值动作列",icon:"glyphicon glyphicon-tasks",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){r("Assignment")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){r("Assignment",200,1)}}]}},{label:"插入控制台输出动作列",icon:"glyphicon glyphicon-print",subMenu:{menuItems:[{label:"前",icon:"glyphicon glyphicon-chevron-left",onClick:function(){r("ConsolePrint")}},{label:"后",icon:"glyphicon glyphicon-chevron-right",onClick:function(){r("ConsolePrint",200,1)}}]}},{label:"删除动作列",name:"delete",icon:"glyphicon glyphicon-minus-sign",onClick:function(){var e=t.getHighlight(),n=e.col;t.removeColData(n),t.removeCellDataRange(0,t.getLastRowIndex(),n,n),t.translateCol(n,-1),t.removeCol(n),t.setDirty(),t.invoke("render")}}],l=function(e){var n=t.getHighlight(),o=(n.row,n.col),i=e.parent.parent,r=t.getColData(o);r.variableCategory="参数"==i.label?"parameter":i.label,r.variableLabel=e.label,r.variableName=e.name,r.datatype=e.datatype,t.setDirty(),t.invoke("render")},A=[];$.each(e,function(t,e){$.each(e,function(t,e){var n={label:"parameter"==e.name?"参数":e.name,icon:"parameter"==e.type?"glyphicon glyphicon-th-list":"glyphicon glyphicon-tasks"},o=e.variables;$.each(o||[],function(t,e){n.subMenu||(n.subMenu={menuItems:[]});var o={icon:"glyphicon glyphicon-tasks",name:e.name,label:e.label,datatype:e.type,act:e.act,onClick:l};n.subMenu.menuItems.push(o)}),A.push(n)})});var c={onShow:a,menuItems:[]};c.menuItems.push(s[0]),c.menuItems.push(s[1]),c.menuItems=c.menuItems.concat(A);var u={onShow:a,menuItems:[]},d={onShow:a};u.menuItems.push(s[2]),u.menuItems.push(s[3]),u.menuItems.push(s[4]),u.menuItems.push(s[5]),d.menuItems=u.menuItems,d.menuItems=d.menuItems.concat(A);var g={menuItems:[s[7],s[6]]},h={menuItems:[s[7]]};t.criteriaMenu?t.criteriaMenu.setConfig(c):t.criteriaMenu=new URule.menu.Menu(c),t.assignmentMenu?t.assignmentMenu.setConfig(d):t.assignmentMenu=new URule.menu.Menu(d),t.actionMenu?t.actionMenu.setConfig(u):t.actionMenu=new URule.menu.Menu(u),t.criteriaCellMenu?t.criteriaCellMenu.setConfig(g):t.criteriaCellMenu=new URule.menu.Menu(g),t.actionCellMenu?t.actionCellMenu.setConfig(h):t.actionCellMenu=new URule.menu.Menu(h),this.container.contextmenu(function(e){for(var n=$(e.target),o=0;o<50&&!n.is("th")&&!n.is("tr");o++)n=n.parent();if(n.is("th")||n.is("tr")){var i=n.has("span.colHeader .glyphicon-filter").length,r=n.has("span.colHeader .glyphicon-tasks").length,a=n.has("span.colHeader").length,s=(n.has("span.rowHeader").length&&$.trim(n.has(".rowHeader").text()),n.has("td").length,t.getCurrentColData(),t.getHighlight());s.col,t.countCriteriaCols();i&&t.criteriaMenu.menuItems.length>0?t.criteriaMenu.show(e):r&&t.assignmentMenu.menuItems.length>0?t.assignmentMenu.show(e):a&&t.actionMenu.menuItems.length>0&&t.actionMenu.show(e)}})}}}(Handsontable)},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(406),r=o(i);r.default.defineSimpleMode("then",{start:[{regex:/"(?:[^\\]|\\.)*?"/,token:"string"},{regex:/(true|false|null)\b/,token:"atom"},{regex:/\u53C2\u6570/,token:"atom-2"},{regex:/(out)\b/,token:"atom-3"},{regex:/\.([\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*)*/,token:"property"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\/\/.*/,token:"comment"},{regex:/\/(?:[^\\]|\\.)*?\//,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*]+/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/[\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*/,token:"variable"},{regex:/<>/}}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],lineComment:"//"}})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(406),r=o(i);r.default.defineSimpleMode("if",{start:[{regex:/"(?:[^\\]|\\.)*?"/,token:"string"},{regex:/(true|false|null|and|or)\b/,token:"atom"},{regex:/\s+(\u6216\u8005|\u6216|\u5E76\u4E14)\s+/,token:"atom"},{regex:/\u53C2\u6570/,token:"atom-2"},{regex:/(out|eval|all|exist|collect)\b/,token:"atom-3"},{regex:/\.([\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*)*/,token:"property"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\/\/.*/,token:"comment"},{regex:/\/(?:[^\\]|\\.)*?\//,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/(\u5927\u4E8E|\u5927\u4E8E\u7B49\u4E8E|\u5C0F\u4E8E|\u5C0F\u4E8E\u7B49\u4E8E|\u7B49\u4E8E|\u4E0D\u7B49\u4E8E|\u7ED3\u675F\u4E8E|\u4E0D\u7ED3\u675F\u4E8E|\u5F00\u59CB\u4E8E|\u4E0D\u5F00\u59CB\u4E8E|\u5728\u96C6\u5408\u4E2D|\u4E0D\u5728\u96C6\u5408\u4E2D|\u5339\u914D|\u4E0D\u5339\u914D|\u5FFD\u7565\u5927\u5C0F\u5199\u7B49\u4E8E|\u5FFD\u7565\u5927\u5C0F\u5199\u4E0D\u7B49)\s+/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/[\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*/,token:"variable"},{regex:/<>/}}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],lineComment:"//"}})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}var i=n(406),r=o(i);r.default.defineSimpleMode("print",{start:[{regex:/"(?:[^\\]|\\.)*?"/,token:"string"},{regex:/(true|false|null|and|or)\b/,token:"atom"},{regex:/\s+(\u6216\u8005|\u6216|\u5E76\u4E14)\s+/,token:"atom"},{regex:/\u53C2\u6570/,token:"atom-2"},{regex:/(out|eval)\b/,token:"atom-3"},{regex:/\.([\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*)*/,token:"property"},{regex:/0x[a-f\d]+|[-+]?(?:\.\d+|\d+\.?\d*)(?:e[-+]?\d+)?/i,token:"number"},{regex:/\/\/.*/,token:"comment"},{regex:/\/(?:[^\\]|\\.)*?\//,token:"comment"},{regex:/\/\*/,token:"comment",next:"comment"},{regex:/[-+\/*=<>!]+/,token:"operator"},{regex:/(\u5927\u4E8E|\u5927\u4E8E\u7B49\u4E8E|\u5C0F\u4E8E|\u5C0F\u4E8E\u7B49\u4E8E|\u7B49\u4E8E|\u4E0D\u7B49\u4E8E|\u7ED3\u675F\u4E8E|\u4E0D\u7ED3\u675F\u4E8E|\u5F00\u59CB\u4E8E|\u4E0D\u5F00\u59CB\u4E8E|\u5728\u96C6\u5408\u4E2D|\u4E0D\u5728\u96C6\u5408\u4E2D|\u5339\u914D|\u4E0D\u5339\u914D|\u5FFD\u7565\u5927\u5C0F\u5199\u7B49\u4E8E|\u5FFD\u7565\u5927\u5C0F\u5199\u4E0D\u7B49)\s+/,token:"operator"},{regex:/[\{\[\(]/,indent:!0},{regex:/[\}\]\)]/,dedent:!0},{regex:/[\w$_\u4e00-\u9fa5][\w$_\u4e00-\u9fa5\d]*/,token:"variable"},{regex:/<>/}}],comment:[{regex:/.*?\*\//,token:"comment",next:"start"},{regex:/.*/,token:"comment"}],meta:{dontIndentStates:["comment"],lineComment:"//"}})},function(t,e,n){"use strict";function o(t){return t&&t.__esModule?t:{default:t}}function i(t,e){for(var n=0,o=t.length;ni.ch&&(r.end=i.ch,r.string=r.string.slice(0,i.ch-r.start)):r={start:i.ch,end:i.ch,string:"",state:r.state};for(var l=r;;){ +if(l=n(t,d(i.line,l.start)),"property"!=l.type)break;if(l=n(t,d(i.line,l.start)),!c)var c=[];c.push(l)}return{list:A(r,c,e,o),from:d(i.line,r.start),to:d(i.line,r.end)}}}function l(t,e){var n,o=a(t),i=o.name;return"if"==i?n=g:"then"==i?n=h:"print"==i&&(n=p),s(t,n,function(t,e){return t.getTokenAt(e)},e)}function A(t,e,n,o){function a(t){t=t||"",0!=t.toUpperCase().lastIndexOf(A.replace(/\s*/,"").toUpperCase(),0)||r(l,t)||l.push(t)}function s(t){var e=window._uruleEditorActionLibraries||[],n=window._uruleEditorParameterLibraries||[],o=window._uruleEditorVariableLibraries||[],i=window._uruleEditorConstantLibraries||[];$.each(e,function(e,n){for(var o=n.springBeans||[],i=0;i");u=$("", + email: + "", + select: + "", + checkbox: + "
    ", + date: + "", + time: + "", + number: + "", + password: + "" + } + }; + + var defaults = { + // default language + locale: "zh_CN", + // show backdrop or not. Default to static so user has to interact with dialog + backdrop: "static", + // animate the modal in/out + animate: true, + // additional class string applied to the top level dialog + className: null, + // whether or not to include a close button + closeButton: true, + // show the dialog immediately by default + show: true, + // dialog container + container: "body" + }; + + // our public object; augmented after our private API + var exports = {}; + + /** + * @private + */ + function _t(key) { + var locale = locales[defaults.locale]; + return locale ? locale[key] : locales.en[key]; + } + + function processCallback(e, dialog, callback) { + e.stopPropagation(); + e.preventDefault(); + + // by default we assume a callback will get rid of the dialog, + // although it is given the opportunity to override this + + // so, if the callback can be invoked and it *explicitly returns false* + // then we'll set a flag to keep the dialog active... + var preserveDialog = $.isFunction(callback) && callback.call(dialog, e) === false; + + // ... otherwise we'll bin it + if (!preserveDialog) { + dialog.modal("hide"); + } + } + + function getKeyLength(obj) { + // @TODO defer to Object.keys(x).length if available? + var k, t = 0; + for (k in obj) { + t ++; + } + return t; + } + + function each(collection, iterator) { + var index = 0; + $.each(collection, function(key, value) { + iterator(key, value, index++); + }); + } + + function sanitize(options) { + var buttons; + var total; + + if (typeof options !== "object") { + throw new Error("Please supply an object of options"); + } + + if (!options.message) { + throw new Error("Please specify a message"); + } + + // make sure any supplied options take precedence over defaults + options = $.extend({}, defaults, options); + + if (!options.buttons) { + options.buttons = {}; + } + + buttons = options.buttons; + + total = getKeyLength(buttons); + + each(buttons, function(key, button, index) { + + if ($.isFunction(button)) { + // short form, assume value is our callback. Since button + // isn't an object it isn't a reference either so re-assign it + button = buttons[key] = { + callback: button + }; + } + + // before any further checks make sure by now button is the correct type + if ($.type(button) !== "object") { + throw new Error("button with key " + key + " must be an object"); + } + + if (!button.label) { + // the lack of an explicit label means we'll assume the key is good enough + button.label = key; + } + + if (!button.className) { + if (total <= 2 && index === total-1) { + // always add a primary to the main option in a two-button dialog + button.className = "btn-primary"; + } else { + button.className = "btn-default"; + } + } + }); + + return options; + } + + /** + * map a flexible set of arguments into a single returned object + * if args.length is already one just return it, otherwise + * use the properties argument to map the unnamed args to + * object properties + * so in the latter case: + * mapArguments(["foo", $.noop], ["message", "callback"]) + * -> { message: "foo", callback: $.noop } + */ + function mapArguments(args, properties) { + var argn = args.length; + var options = {}; + + if (argn < 1 || argn > 2) { + throw new Error("Invalid argument length"); + } + + if (argn === 2 || typeof args[0] === "string") { + options[properties[0]] = args[0]; + options[properties[1]] = args[1]; + } else { + options = args[0]; + } + + return options; + } + + /** + * merge a set of default dialog options with user supplied arguments + */ + function mergeArguments(defaults, args, properties) { + return $.extend( + // deep merge + true, + // ensure the target is an empty, unreferenced object + {}, + // the base options object for this type of dialog (often just buttons) + defaults, + // args could be an object or array; if it's an array properties will + // map it to a proper options object + mapArguments( + args, + properties + ) + ); + } + + /** + * this entry-level method makes heavy use of composition to take a simple + * range of inputs and return valid options suitable for passing to bootbox.dialog + */ + function mergeDialogOptions(className, labels, properties, args) { + // build up a base set of dialog properties + var baseOptions = { + className: "bootbox-" + className, + buttons: createLabels.apply(null, labels) + }; + + // ensure the buttons properties generated, *after* merging + // with user args are still valid against the supplied labels + return validateButtons( + // merge the generated base properties with user supplied arguments + mergeArguments( + baseOptions, + args, + // if args.length > 1, properties specify how each arg maps to an object key + properties + ), + labels + ); + } + + /** + * from a given list of arguments return a suitable object of button labels + * all this does is normalise the given labels and translate them where possible + * e.g. "ok", "confirm" -> { ok: "OK, cancel: "Annuleren" } + */ + function createLabels() { + var buttons = {}; + + for (var i = 0, j = arguments.length; i < j; i++) { + var argument = arguments[i]; + var key = argument.toLowerCase(); + var value = argument.toUpperCase(); + + buttons[key] = { + label: _t(value) + }; + } + + return buttons; + } + + function validateButtons(options, buttons) { + var allowedButtons = {}; + each(buttons, function(key, value) { + allowedButtons[value] = true; + }); + + each(options.buttons, function(key) { + if (allowedButtons[key] === undefined) { + throw new Error("button key " + key + " is not allowed (options are " + buttons.join("\n") + ")"); + } + }); + + return options; + } + + exports.alert = function() { + var options; + + options = mergeDialogOptions("alert", ["ok"], ["message", "callback"], arguments); + + if (options.callback && !$.isFunction(options.callback)) { + throw new Error("alert requires callback property to be a function when provided"); + } + + /** + * overrides + */ + options.buttons.ok.callback = options.onEscape = function() { + if ($.isFunction(options.callback)) { + return options.callback.call(this); + } + return true; + }; + + return exports.dialog(options); + }; + + exports.confirm = function() { + var options; + + options = mergeDialogOptions("confirm", ["cancel", "confirm"], ["message", "callback"], arguments); + + /** + * overrides; undo anything the user tried to set they shouldn't have + */ + options.buttons.cancel.callback = options.onEscape = function() { + return options.callback.call(this, false); + }; + + options.buttons.confirm.callback = function() { + return options.callback.call(this, true); + }; + + // confirm specific validation + if (!$.isFunction(options.callback)) { + throw new Error("confirm requires a callback"); + } + + return exports.dialog(options); + }; + + exports.prompt = function() { + var options; + var defaults; + var dialog; + var form; + var input; + var shouldShow; + var inputOptions; + + // we have to create our form first otherwise + // its value is undefined when gearing up our options + // @TODO this could be solved by allowing message to + // be a function instead... + form = $(templates.form); + + // prompt defaults are more complex than others in that + // users can override more defaults + // @TODO I don't like that prompt has to do a lot of heavy + // lifting which mergeDialogOptions can *almost* support already + // just because of 'value' and 'inputType' - can we refactor? + defaults = { + className: "bootbox-prompt", + buttons: createLabels("cancel", "confirm"), + value: "", + inputType: "text" + }; + + options = validateButtons( + mergeArguments(defaults, arguments, ["title", "callback"]), + ["cancel", "confirm"] + ); + + // capture the user's show value; we always set this to false before + // spawning the dialog to give us a chance to attach some handlers to + // it, but we need to make sure we respect a preference not to show it + shouldShow = (options.show === undefined) ? true : options.show; + + /** + * overrides; undo anything the user tried to set they shouldn't have + */ + options.message = form; + + options.buttons.cancel.callback = options.onEscape = function() { + return options.callback.call(this, null); + }; + + options.buttons.confirm.callback = function() { + var value; + + switch (options.inputType) { + case "text": + case "textarea": + case "email": + case "select": + case "date": + case "time": + case "number": + case "password": + value = input.val(); + break; + + case "checkbox": + var checkedItems = input.find("input:checked"); + + // we assume that checkboxes are always multiple, + // hence we default to an empty array + value = []; + + each(checkedItems, function(_, item) { + value.push($(item).val()); + }); + break; + } + + return options.callback.call(this, value); + }; + + options.show = false; + + // prompt specific validation + if (!options.title) { + throw new Error("prompt requires a title"); + } + + if (!$.isFunction(options.callback)) { + throw new Error("prompt requires a callback"); + } + + if (!templates.inputs[options.inputType]) { + throw new Error("invalid prompt type"); + } + + // create the input based on the supplied type + input = $(templates.inputs[options.inputType]); + + switch (options.inputType) { + case "text": + case "textarea": + case "email": + case "date": + case "time": + case "number": + case "password": + input.val(options.value); + break; + + case "select": + var groups = {}; + inputOptions = options.inputOptions || []; + + if (!$.isArray(inputOptions)) { + throw new Error("Please pass an array of input options"); + } + + if (!inputOptions.length) { + throw new Error("prompt with select requires options"); + } + + each(inputOptions, function(_, option) { + + // assume the element to attach to is the input... + var elem = input; + + if (option.value === undefined || option.text === undefined) { + throw new Error("given options in wrong format"); + } + + // ... but override that element if this option sits in a group + + if (option.group) { + // initialise group if necessary + if (!groups[option.group]) { + groups[option.group] = $("").attr("label", option.group); + } + + elem = groups[option.group]; + } + + elem.append(""); + }); + + each(groups, function(_, group) { + input.append(group); + }); + + // safe to set a select's value as per a normal input + input.val(options.value); + break; + + case "checkbox": + var values = $.isArray(options.value) ? options.value : [options.value]; + inputOptions = options.inputOptions || []; + + if (!inputOptions.length) { + throw new Error("prompt with checkbox requires options"); + } + + if (!inputOptions[0].value || !inputOptions[0].text) { + throw new Error("given options in wrong format"); + } + + // checkboxes have to nest within a containing element, so + // they break the rules a bit and we end up re-assigning + // our 'input' element to this container instead + input = $("
    "); + + each(inputOptions, function(_, option) { + var checkbox = $(templates.inputs[options.inputType]); + + checkbox.find("input").attr("value", option.value); + checkbox.find("label").append(option.text); + + // we've ensured values is an array so we can always iterate over it + each(values, function(_, value) { + if (value === option.value) { + checkbox.find("input").prop("checked", true); + } + }); + + input.append(checkbox); + }); + break; + } + + // @TODO provide an attributes option instead + // and simply map that as keys: vals + if (options.placeholder) { + input.attr("placeholder", options.placeholder); + } + + if (options.pattern) { + input.attr("pattern", options.pattern); + } + + if (options.maxlength) { + input.attr("maxlength", options.maxlength); + } + + // now place it in our form + form.append(input); + + form.on("submit", function(e) { + e.preventDefault(); + // Fix for SammyJS (or similar JS routing library) hijacking the form post. + e.stopPropagation(); + // @TODO can we actually click *the* button object instead? + // e.g. buttons.confirm.click() or similar + dialog.find(".btn-primary").click(); + }); + + dialog = exports.dialog(options); + + // clear the existing handler focusing the submit button... + dialog.off("shown.bs.modal"); + + // ...and replace it with one focusing our input, if possible + dialog.on("shown.bs.modal", function() { + // need the closure here since input isn't + // an object otherwise + input.focus(); + }); + + if (shouldShow === true) { + dialog.modal("show"); + } + + return dialog; + }; + + exports.dialog = function(options) { + options = sanitize(options); + + var dialog = $(templates.dialog); + var innerDialog = dialog.find(".modal-dialog"); + var body = dialog.find(".modal-body"); + var buttons = options.buttons; + var buttonStr = ""; + var callbacks = { + onEscape: options.onEscape + }; + + if ($.fn.modal === undefined) { + throw new Error( + "$.fn.modal is not defined; please double check you have included " + + "the Bootstrap JavaScript library. See http://getbootstrap.com/javascript/ " + + "for more details." + ); + } + + each(buttons, function(key, button) { + + // @TODO I don't like this string appending to itself; bit dirty. Needs reworking + // can we just build up button elements instead? slower but neater. Then button + // can just become a template too + buttonStr += ""; + callbacks[key] = button.callback; + }); + + body.find(".bootbox-body").html(options.message); + + if (options.animate === true) { + dialog.addClass("fade"); + } + + if (options.className) { + dialog.addClass(options.className); + } + + if (options.size === "large") { + innerDialog.addClass("modal-lg"); + } else if (options.size === "small") { + innerDialog.addClass("modal-sm"); + } + + if (options.title) { + body.before(templates.header); + } + + if (options.closeButton) { + var closeButton = $(templates.closeButton); + + if (options.title) { + dialog.find(".modal-header").prepend(closeButton); + } else { + closeButton.css("margin-top", "-10px").prependTo(body); + } + } + + if (options.title) { + dialog.find(".modal-title").html(options.title); + } + + if (buttonStr.length) { + body.after(templates.footer); + dialog.find(".modal-footer").html(buttonStr); + } + + + /** + * Bootstrap event listeners; used handle extra + * setup & teardown required after the underlying + * modal has performed certain actions + */ + + dialog.on("hidden.bs.modal", function(e) { + // ensure we don't accidentally intercept hidden events triggered + // by children of the current dialog. We shouldn't anymore now BS + // namespaces its events; but still worth doing + if (e.target === this) { + dialog.remove(); + } + }); + + /* + dialog.on("show.bs.modal", function() { + // sadly this doesn't work; show is called *just* before + // the backdrop is added so we'd need a setTimeout hack or + // otherwise... leaving in as would be nice + if (options.backdrop) { + dialog.next(".modal-backdrop").addClass("bootbox-backdrop"); + } + }); + */ + + dialog.on("shown.bs.modal", function() { + dialog.find(".btn-primary:first").focus(); + }); + dialog.on("show.bs.modal", function() { + var index=1050; + $(document).find('.modal').each(function (i,d) { + var zIndex=$(d).css('z-index'); + if(zIndex && zIndex!=='' && !isNaN(zIndex)){ + zIndex=parseInt(zIndex); + if(zIndex>index){ + index=zIndex; + } + } + }); + index++; + dialog.css({'z-index':index}); + }); + + /** + * Bootbox event listeners; experimental and may not last + * just an attempt to decouple some behaviours from their + * respective triggers + */ + + if (options.backdrop !== "static") { + // A boolean true/false according to the Bootstrap docs + // should show a dialog the user can dismiss by clicking on + // the background. + // We always only ever pass static/false to the actual + // $.modal function because with `true` we can't trap + // this event (the .modal-backdrop swallows it) + // However, we still want to sort of respect true + // and invoke the escape mechanism instead + dialog.on("click.dismiss.bs.modal", function(e) { + // @NOTE: the target varies in >= 3.3.x releases since the modal backdrop + // moved *inside* the outer dialog rather than *alongside* it + if (dialog.children(".modal-backdrop").length) { + e.currentTarget = dialog.children(".modal-backdrop").get(0); + } + + if (e.target !== e.currentTarget) { + return; + } + + dialog.trigger("escape.close.bb"); + }); + } + + dialog.on("escape.close.bb", function(e) { + if (callbacks.onEscape) { + processCallback(e, dialog, callbacks.onEscape); + } + }); + + /** + * Standard jQuery event listeners; used to handle user + * interaction with our dialog + */ + + dialog.on("click", ".modal-footer button", function(e) { + var callbackKey = $(this).data("bb-handler"); + + processCallback(e, dialog, callbacks[callbackKey]); + }); + + dialog.on("click", ".bootbox-close-button", function(e) { + // onEscape might be falsy but that's fine; the fact is + // if the user has managed to click the close button we + // have to close the dialog, callback or not + processCallback(e, dialog, callbacks.onEscape); + }); + + dialog.on("keyup", function(e) { + if (e.which === 27) { + dialog.trigger("escape.close.bb"); + } + }); + + // the remainder of this method simply deals with adding our + // dialogent to the DOM, augmenting it with Bootstrap's modal + // functionality and then giving the resulting object back + // to our caller + + $(options.container).append(dialog); + + dialog.modal({ + backdrop: options.useBackdrop ? "static": true, + keyboard: false, + show: false + }); + + if (options.show) { + dialog.modal("show"); + } + + // @TODO should we return the raw element here or should + // we wrap it in an object on which we can expose some neater + // methods, e.g. var d = bootbox.alert(); d.hide(); instead + // of d.modal("hide"); + + /* + function BBDialog(elem) { + this.elem = elem; + } + + BBDialog.prototype = { + hide: function() { + return this.elem.modal("hide"); + }, + show: function() { + return this.elem.modal("show"); + } + }; + */ + + return dialog; + + }; + + exports.setDefaults = function() { + var values = {}; + + if (arguments.length === 2) { + // allow passing of single key/value... + values[arguments[0]] = arguments[1]; + } else { + // ... and as an object too + values = arguments[0]; + } + + $.extend(defaults, values); + }; + + exports.hideAll = function() { + $(".bootbox").modal("hide"); + + return exports; + }; + + + /** + * standard locales. Please add more according to ISO 639-1 standard. Multiple language variants are + * unlikely to be required. If this gets too large it can be split out into separate JS files. + */ + var locales = { + en : { + OK : "OK", + CANCEL : "Cancel", + CONFIRM : "OK" + }, + zh_CN : { + OK : "OK", + CANCEL : "取消", + CONFIRM : "确认" + }, + zh_TW : { + OK : "OK", + CANCEL : "取消", + CONFIRM : "確認" + } + }; + + exports.addLocale = function(name, values) { + $.each(["OK", "CANCEL", "CONFIRM"], function(_, v) { + if (!values[v]) { + throw new Error("Please supply a translation for '" + v + "'"); + } + }); + + locales[name] = { + OK: values.OK, + CANCEL: values.CANCEL, + CONFIRM: values.CONFIRM + }; + + return exports; + }; + + exports.removeLocale = function(name) { + delete locales[name]; + + return exports; + }; + + exports.setLocale = function(name) { + return exports.setDefaults("locale", name); + }; + + exports.init = function(_$) { + return init(_$ || $); + }; + + return exports; +})); diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrap.min.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrap.min.js new file mode 100644 index 0000000..e79c065 --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrap.min.js @@ -0,0 +1,7 @@ +/*! + * Bootstrap v3.3.6 (http://getbootstrap.com) + * Copyright 2011-2015 Twitter, Inc. + * Licensed under the MIT license + */ +if("undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");+function(a){"use strict";var b=a.fn.jquery.split(" ")[0].split(".");if(b[0]<2&&b[1]<9||1==b[0]&&9==b[1]&&b[2]<1||b[0]>2)throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 3")}(jQuery),+function(a){"use strict";function b(){var a=document.createElement("bootstrap"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return{end:b[c]};return!1}a.fn.emulateTransitionEnd=function(b){var c=!1,d=this;a(this).one("bsTransitionEnd",function(){c=!0});var e=function(){c||a(d).trigger(a.support.transition.end)};return setTimeout(e,b),this},a(function(){a.support.transition=b(),a.support.transition&&(a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){return a(b.target).is(this)?b.handleObj.handler.apply(this,arguments):void 0}})})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var c=a(this),e=c.data("bs.alert");e||c.data("bs.alert",e=new d(this)),"string"==typeof b&&e[b].call(c)})}var c='[data-dismiss="alert"]',d=function(b){a(b).on("click",c,this.close)};d.VERSION="3.3.6",d.TRANSITION_DURATION=150,d.prototype.close=function(b){function c(){g.detach().trigger("closed.bs.alert").remove()}var e=a(this),f=e.attr("data-target");f||(f=e.attr("href"),f=f&&f.replace(/.*(?=#[^\s]*$)/,""));var g=a(f);b&&b.preventDefault(),g.length||(g=e.closest(".alert")),g.trigger(b=a.Event("close.bs.alert")),b.isDefaultPrevented()||(g.removeClass("in"),a.support.transition&&g.hasClass("fade")?g.one("bsTransitionEnd",c).emulateTransitionEnd(d.TRANSITION_DURATION):c())};var e=a.fn.alert;a.fn.alert=b,a.fn.alert.Constructor=d,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",c,d.prototype.close)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.button"),f="object"==typeof b&&b;e||d.data("bs.button",e=new c(this,f)),"toggle"==b?e.toggle():b&&e.setState(b)})}var c=function(b,d){this.$element=a(b),this.options=a.extend({},c.DEFAULTS,d),this.isLoading=!1};c.VERSION="3.3.6",c.DEFAULTS={loadingText:"loading..."},c.prototype.setState=function(b){var c="disabled",d=this.$element,e=d.is("input")?"val":"html",f=d.data();b+="Text",null==f.resetText&&d.data("resetText",d[e]()),setTimeout(a.proxy(function(){d[e](null==f[b]?this.options[b]:f[b]),"loadingText"==b?(this.isLoading=!0,d.addClass(c).attr(c,c)):this.isLoading&&(this.isLoading=!1,d.removeClass(c).removeAttr(c))},this),0)},c.prototype.toggle=function(){var a=!0,b=this.$element.closest('[data-toggle="buttons"]');if(b.length){var c=this.$element.find("input");"radio"==c.prop("type")?(c.prop("checked")&&(a=!1),b.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==c.prop("type")&&(c.prop("checked")!==this.$element.hasClass("active")&&(a=!1),this.$element.toggleClass("active")),c.prop("checked",this.$element.hasClass("active")),a&&c.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var d=a.fn.button;a.fn.button=b,a.fn.button.Constructor=c,a.fn.button.noConflict=function(){return a.fn.button=d,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(c){var d=a(c.target);d.hasClass("btn")||(d=d.closest(".btn")),b.call(d,"toggle"),a(c.target).is('input[type="radio"]')||a(c.target).is('input[type="checkbox"]')||c.preventDefault()}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(b){a(b.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(b.type))})}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.carousel"),f=a.extend({},c.DEFAULTS,d.data(),"object"==typeof b&&b),g="string"==typeof b?b:f.slide;e||d.data("bs.carousel",e=new c(this,f)),"number"==typeof b?e.to(b):g?e[g]():f.interval&&e.pause().cycle()})}var c=function(b,c){this.$element=a(b),this.$indicators=this.$element.find(".carousel-indicators"),this.options=c,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",a.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",a.proxy(this.pause,this)).on("mouseleave.bs.carousel",a.proxy(this.cycle,this))};c.VERSION="3.3.6",c.TRANSITION_DURATION=600,c.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},c.prototype.keydown=function(a){if(!/input|textarea/i.test(a.target.tagName)){switch(a.which){case 37:this.prev();break;case 39:this.next();break;default:return}a.preventDefault()}},c.prototype.cycle=function(b){return b||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(a.proxy(this.next,this),this.options.interval)),this},c.prototype.getItemIndex=function(a){return this.$items=a.parent().children(".item"),this.$items.index(a||this.$active)},c.prototype.getItemForDirection=function(a,b){var c=this.getItemIndex(b),d="prev"==a&&0===c||"next"==a&&c==this.$items.length-1;if(d&&!this.options.wrap)return b;var e="prev"==a?-1:1,f=(c+e)%this.$items.length;return this.$items.eq(f)},c.prototype.to=function(a){var b=this,c=this.getItemIndex(this.$active=this.$element.find(".item.active"));return a>this.$items.length-1||0>a?void 0:this.sliding?this.$element.one("slid.bs.carousel",function(){b.to(a)}):c==a?this.pause().cycle():this.slide(a>c?"next":"prev",this.$items.eq(a))},c.prototype.pause=function(b){return b||(this.paused=!0),this.$element.find(".next, .prev").length&&a.support.transition&&(this.$element.trigger(a.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},c.prototype.next=function(){return this.sliding?void 0:this.slide("next")},c.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},c.prototype.slide=function(b,d){var e=this.$element.find(".item.active"),f=d||this.getItemForDirection(b,e),g=this.interval,h="next"==b?"left":"right",i=this;if(f.hasClass("active"))return this.sliding=!1;var j=f[0],k=a.Event("slide.bs.carousel",{relatedTarget:j,direction:h});if(this.$element.trigger(k),!k.isDefaultPrevented()){if(this.sliding=!0,g&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=a(this.$indicators.children()[this.getItemIndex(f)]);l&&l.addClass("active")}var m=a.Event("slid.bs.carousel",{relatedTarget:j,direction:h});return a.support.transition&&this.$element.hasClass("slide")?(f.addClass(b),f[0].offsetWidth,e.addClass(h),f.addClass(h),e.one("bsTransitionEnd",function(){f.removeClass([b,h].join(" ")).addClass("active"),e.removeClass(["active",h].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger(m)},0)}).emulateTransitionEnd(c.TRANSITION_DURATION)):(e.removeClass("active"),f.addClass("active"),this.sliding=!1,this.$element.trigger(m)),g&&this.cycle(),this}};var d=a.fn.carousel;a.fn.carousel=b,a.fn.carousel.Constructor=c,a.fn.carousel.noConflict=function(){return a.fn.carousel=d,this};var e=function(c){var d,e=a(this),f=a(e.attr("data-target")||(d=e.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""));if(f.hasClass("carousel")){var g=a.extend({},f.data(),e.data()),h=e.attr("data-slide-to");h&&(g.interval=!1),b.call(f,g),h&&f.data("bs.carousel").to(h),c.preventDefault()}};a(document).on("click.bs.carousel.data-api","[data-slide]",e).on("click.bs.carousel.data-api","[data-slide-to]",e),a(window).on("load",function(){a('[data-ride="carousel"]').each(function(){var c=a(this);b.call(c,c.data())})})}(jQuery),+function(a){"use strict";function b(b){var c,d=b.attr("data-target")||(c=b.attr("href"))&&c.replace(/.*(?=#[^\s]+$)/,"");return a(d)}function c(b){return this.each(function(){var c=a(this),e=c.data("bs.collapse"),f=a.extend({},d.DEFAULTS,c.data(),"object"==typeof b&&b);!e&&f.toggle&&/show|hide/.test(b)&&(f.toggle=!1),e||c.data("bs.collapse",e=new d(this,f)),"string"==typeof b&&e[b]()})}var d=function(b,c){this.$element=a(b),this.options=a.extend({},d.DEFAULTS,c),this.$trigger=a('[data-toggle="collapse"][href="#'+b.id+'"],[data-toggle="collapse"][data-target="#'+b.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};d.VERSION="3.3.6",d.TRANSITION_DURATION=350,d.DEFAULTS={toggle:!0},d.prototype.dimension=function(){var a=this.$element.hasClass("width");return a?"width":"height"},d.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var b,e=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(e&&e.length&&(b=e.data("bs.collapse"),b&&b.transitioning))){var f=a.Event("show.bs.collapse");if(this.$element.trigger(f),!f.isDefaultPrevented()){e&&e.length&&(c.call(e,"hide"),b||e.data("bs.collapse",null));var g=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[g](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var h=function(){this.$element.removeClass("collapsing").addClass("collapse in")[g](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!a.support.transition)return h.call(this);var i=a.camelCase(["scroll",g].join("-"));this.$element.one("bsTransitionEnd",a.proxy(h,this)).emulateTransitionEnd(d.TRANSITION_DURATION)[g](this.$element[0][i])}}}},d.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var b=a.Event("hide.bs.collapse");if(this.$element.trigger(b),!b.isDefaultPrevented()){var c=this.dimension();this.$element[c](this.$element[c]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var e=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};return a.support.transition?void this.$element[c](0).one("bsTransitionEnd",a.proxy(e,this)).emulateTransitionEnd(d.TRANSITION_DURATION):e.call(this)}}},d.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},d.prototype.getParent=function(){return a(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(a.proxy(function(c,d){var e=a(d);this.addAriaAndCollapsedClass(b(e),e)},this)).end()},d.prototype.addAriaAndCollapsedClass=function(a,b){var c=a.hasClass("in");a.attr("aria-expanded",c),b.toggleClass("collapsed",!c).attr("aria-expanded",c)};var e=a.fn.collapse;a.fn.collapse=c,a.fn.collapse.Constructor=d,a.fn.collapse.noConflict=function(){return a.fn.collapse=e,this},a(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(d){var e=a(this);e.attr("data-target")||d.preventDefault();var f=b(e),g=f.data("bs.collapse"),h=g?"toggle":e.data();c.call(f,h)})}(jQuery),+function(a){"use strict";function b(b){var c=b.attr("data-target");c||(c=b.attr("href"),c=c&&/#[A-Za-z]/.test(c)&&c.replace(/.*(?=#[^\s]*$)/,""));var d=c&&a(c);return d&&d.length?d:b.parent()}function c(c){c&&3===c.which||(a(e).remove(),a(f).each(function(){var d=a(this),e=b(d),f={relatedTarget:this};e.hasClass("open")&&(c&&"click"==c.type&&/input|textarea/i.test(c.target.tagName)&&a.contains(e[0],c.target)||(e.trigger(c=a.Event("hide.bs.dropdown",f)),c.isDefaultPrevented()||(d.attr("aria-expanded","false"),e.removeClass("open").trigger(a.Event("hidden.bs.dropdown",f)))))}))}function d(b){return this.each(function(){var c=a(this),d=c.data("bs.dropdown");d||c.data("bs.dropdown",d=new g(this)),"string"==typeof b&&d[b].call(c)})}var e=".dropdown-backdrop",f='[data-toggle="dropdown"]',g=function(b){a(b).on("click.bs.dropdown",this.toggle)};g.VERSION="3.3.6",g.prototype.toggle=function(d){var e=a(this);if(!e.is(".disabled, :disabled")){var f=b(e),g=f.hasClass("open");if(c(),!g){"ontouchstart"in document.documentElement&&!f.closest(".navbar-nav").length&&a(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(a(this)).on("click",c);var h={relatedTarget:this};if(f.trigger(d=a.Event("show.bs.dropdown",h)),d.isDefaultPrevented())return;e.trigger("focus").attr("aria-expanded","true"),f.toggleClass("open").trigger(a.Event("shown.bs.dropdown",h))}return!1}},g.prototype.keydown=function(c){if(/(38|40|27|32)/.test(c.which)&&!/input|textarea/i.test(c.target.tagName)){var d=a(this);if(c.preventDefault(),c.stopPropagation(),!d.is(".disabled, :disabled")){var e=b(d),g=e.hasClass("open");if(!g&&27!=c.which||g&&27==c.which)return 27==c.which&&e.find(f).trigger("focus"),d.trigger("click");var h=" li:not(.disabled):visible a",i=e.find(".dropdown-menu"+h);if(i.length){var j=i.index(c.target);38==c.which&&j>0&&j--,40==c.which&&jdocument.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&a?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!a?this.scrollbarWidth:""})},c.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},c.prototype.checkScrollbar=function(){var a=window.innerWidth;if(!a){var b=document.documentElement.getBoundingClientRect();a=b.right-Math.abs(b.left)}this.bodyIsOverflowing=document.body.clientWidth
    ',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0}},c.prototype.init=function(b,c,d){if(this.enabled=!0,this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.$viewport=this.options.viewport&&a(a.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var e=this.options.trigger.split(" "),f=e.length;f--;){var g=e[f];if("click"==g)this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this));else if("manual"!=g){var h="hover"==g?"mouseenter":"focusin",i="hover"==g?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this)),this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.getOptions=function(b){return b=a.extend({},this.getDefaults(),this.$element.data(),b),b.delay&&"number"==typeof b.delay&&(b.delay={show:b.delay,hide:b.delay}),b},c.prototype.getDelegateOptions=function(){var b={},c=this.getDefaults();return this._options&&a.each(this._options,function(a,d){c[a]!=d&&(b[a]=d)}),b},c.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusin"==b.type?"focus":"hover"]=!0),c.tip().hasClass("in")||"in"==c.hoverState?void(c.hoverState="in"):(clearTimeout(c.timeout),c.hoverState="in",c.options.delay&&c.options.delay.show?void(c.timeout=setTimeout(function(){"in"==c.hoverState&&c.show()},c.options.delay.show)):c.show())},c.prototype.isInStateTrue=function(){for(var a in this.inState)if(this.inState[a])return!0;return!1},c.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);return c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c)),b instanceof a.Event&&(c.inState["focusout"==b.type?"focus":"hover"]=!1),c.isInStateTrue()?void 0:(clearTimeout(c.timeout),c.hoverState="out",c.options.delay&&c.options.delay.hide?void(c.timeout=setTimeout(function(){"out"==c.hoverState&&c.hide()},c.options.delay.hide)):c.hide())},c.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var d=a.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!d)return;var e=this,f=this.tip(),g=this.getUID(this.type);this.setContent(),f.attr("id",g),this.$element.attr("aria-describedby",g),this.options.animation&&f.addClass("fade");var h="function"==typeof this.options.placement?this.options.placement.call(this,f[0],this.$element[0]):this.options.placement,i=/\s?auto?\s?/i,j=i.test(h);j&&(h=h.replace(i,"")||"top"),f.detach().css({top:0,left:0,display:"block"}).addClass(h).data("bs."+this.type,this),this.options.container?f.appendTo(this.options.container):f.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var k=this.getPosition(),l=f[0].offsetWidth,m=f[0].offsetHeight;if(j){var n=h,o=this.getPosition(this.$viewport);h="bottom"==h&&k.bottom+m>o.bottom?"top":"top"==h&&k.top-mo.width?"left":"left"==h&&k.left-lg.top+g.height&&(e.top=g.top+g.height-i)}else{var j=b.left-f,k=b.left+f+c;jg.right&&(e.left=g.left+g.width-k)}return e},c.prototype.getTitle=function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||("function"==typeof c.title?c.title.call(b[0]):c.title)},c.prototype.getUID=function(a){do a+=~~(1e6*Math.random());while(document.getElementById(a));return a},c.prototype.tip=function(){if(!this.$tip&&(this.$tip=a(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},c.prototype.enable=function(){this.enabled=!0},c.prototype.disable=function(){this.enabled=!1},c.prototype.toggleEnabled=function(){this.enabled=!this.enabled},c.prototype.toggle=function(b){var c=this;b&&(c=a(b.currentTarget).data("bs."+this.type),c||(c=new this.constructor(b.currentTarget,this.getDelegateOptions()),a(b.currentTarget).data("bs."+this.type,c))),b?(c.inState.click=!c.inState.click,c.isInStateTrue()?c.enter(c):c.leave(c)):c.tip().hasClass("in")?c.leave(c):c.enter(c)},c.prototype.destroy=function(){var a=this;clearTimeout(this.timeout),this.hide(function(){a.$element.off("."+a.type).removeData("bs."+a.type),a.$tip&&a.$tip.detach(),a.$tip=null,a.$arrow=null,a.$viewport=null})};var d=a.fn.tooltip;a.fn.tooltip=b,a.fn.tooltip.Constructor=c,a.fn.tooltip.noConflict=function(){return a.fn.tooltip=d,this}}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.popover"),f="object"==typeof b&&b;(e||!/destroy|hide/.test(b))&&(e||d.data("bs.popover",e=new c(this,f)),"string"==typeof b&&e[b]())})}var c=function(a,b){this.init("popover",a,b)};if(!a.fn.tooltip)throw new Error("Popover requires tooltip.js");c.VERSION="3.3.6",c.DEFAULTS=a.extend({},a.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:''}),c.prototype=a.extend({},a.fn.tooltip.Constructor.prototype),c.prototype.constructor=c,c.prototype.getDefaults=function(){return c.DEFAULTS},c.prototype.setContent=function(){var a=this.tip(),b=this.getTitle(),c=this.getContent();a.find(".popover-title")[this.options.html?"html":"text"](b),a.find(".popover-content").children().detach().end()[this.options.html?"string"==typeof c?"html":"append":"text"](c),a.removeClass("fade top bottom left right in"),a.find(".popover-title").html()||a.find(".popover-title").hide()},c.prototype.hasContent=function(){return this.getTitle()||this.getContent()},c.prototype.getContent=function(){var a=this.$element,b=this.options;return a.attr("data-content")||("function"==typeof b.content?b.content.call(a[0]):b.content)},c.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var d=a.fn.popover;a.fn.popover=b,a.fn.popover.Constructor=c,a.fn.popover.noConflict=function(){return a.fn.popover=d,this}}(jQuery),+function(a){"use strict";function b(c,d){this.$body=a(document.body),this.$scrollElement=a(a(c).is(document.body)?window:c),this.options=a.extend({},b.DEFAULTS,d),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function c(c){return this.each(function(){var d=a(this),e=d.data("bs.scrollspy"),f="object"==typeof c&&c;e||d.data("bs.scrollspy",e=new b(this,f)),"string"==typeof c&&e[c]()})}b.VERSION="3.3.6",b.DEFAULTS={offset:10},b.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},b.prototype.refresh=function(){var b=this,c="offset",d=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(c="position",d=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var b=a(this),e=b.data("target")||b.attr("href"),f=/^#./.test(e)&&a(e);return f&&f.length&&f.is(":visible")&&[[f[c]().top+d,e]]||null}).sort(function(a,b){return a[0]-b[0]}).each(function(){b.offsets.push(this[0]),b.targets.push(this[1])})},b.prototype.process=function(){var a,b=this.$scrollElement.scrollTop()+this.options.offset,c=this.getScrollHeight(),d=this.options.offset+c-this.$scrollElement.height(),e=this.offsets,f=this.targets,g=this.activeTarget;if(this.scrollHeight!=c&&this.refresh(),b>=d)return g!=(a=f[f.length-1])&&this.activate(a);if(g&&b=e[a]&&(void 0===e[a+1]||b .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),b.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),h?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu").length&&b.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),e&&e()}var g=d.find("> .active"),h=e&&a.support.transition&&(g.length&&g.hasClass("fade")||!!d.find("> .fade").length);g.length&&h?g.one("bsTransitionEnd",f).emulateTransitionEnd(c.TRANSITION_DURATION):f(),g.removeClass("in")};var d=a.fn.tab;a.fn.tab=b,a.fn.tab.Constructor=c,a.fn.tab.noConflict=function(){return a.fn.tab=d,this};var e=function(c){c.preventDefault(),b.call(a(this),"show")};a(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',e).on("click.bs.tab.data-api",'[data-toggle="pill"]',e)}(jQuery),+function(a){"use strict";function b(b){return this.each(function(){var d=a(this),e=d.data("bs.affix"),f="object"==typeof b&&b;e||d.data("bs.affix",e=new c(this,f)),"string"==typeof b&&e[b]()})}var c=function(b,d){this.options=a.extend({},c.DEFAULTS,d),this.$target=a(this.options.target).on("scroll.bs.affix.data-api",a.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",a.proxy(this.checkPositionWithEventLoop,this)),this.$element=a(b),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};c.VERSION="3.3.6",c.RESET="affix affix-top affix-bottom",c.DEFAULTS={offset:0,target:window},c.prototype.getState=function(a,b,c,d){var e=this.$target.scrollTop(),f=this.$element.offset(),g=this.$target.height();if(null!=c&&"top"==this.affixed)return c>e?"top":!1;if("bottom"==this.affixed)return null!=c?e+this.unpin<=f.top?!1:"bottom":a-d>=e+g?!1:"bottom";var h=null==this.affixed,i=h?e:f.top,j=h?g:b;return null!=c&&c>=e?"top":null!=d&&i+j>=a-d?"bottom":!1},c.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(c.RESET).addClass("affix");var a=this.$target.scrollTop(),b=this.$element.offset();return this.pinnedOffset=b.top-a},c.prototype.checkPositionWithEventLoop=function(){setTimeout(a.proxy(this.checkPosition,this),1)},c.prototype.checkPosition=function(){if(this.$element.is(":visible")){var b=this.$element.height(),d=this.options.offset,e=d.top,f=d.bottom,g=Math.max(a(document).height(),a(document.body).height());"object"!=typeof d&&(f=e=d),"function"==typeof e&&(e=d.top(this.$element)),"function"==typeof f&&(f=d.bottom(this.$element));var h=this.getState(g,b,e,f);if(this.affixed!=h){null!=this.unpin&&this.$element.css("top","");var i="affix"+(h?"-"+h:""),j=a.Event(i+".bs.affix");if(this.$element.trigger(j),j.isDefaultPrevented())return;this.affixed=h,this.unpin="bottom"==h?this.getPinnedOffset():null,this.$element.removeClass(c.RESET).addClass(i).trigger(i.replace("affix","affixed")+".bs.affix")}"bottom"==h&&this.$element.offset({top:g-b-f})}};var d=a.fn.affix;a.fn.affix=b,a.fn.affix.Constructor=c,a.fn.affix.noConflict=function(){return a.fn.affix=d,this},a(window).on("load",function(){a('[data-spy="affix"]').each(function(){var c=a(this),d=c.data();d.offset=d.offset||{},null!=d.offsetBottom&&(d.offset.bottom=d.offsetBottom),null!=d.offsetTop&&(d.offset.top=d.offsetTop),b.call(c,d)})})}(jQuery); \ No newline at end of file diff --git a/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrapValidator.min.js b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrapValidator.min.js new file mode 100644 index 0000000..06282df --- /dev/null +++ b/day02/sfbx-rule/rule-web/src/main/resources/urule-asserts/venderjs/bootstrapValidator.min.js @@ -0,0 +1,14 @@ +/*! + * BootstrapValidator (http://bootstrapvalidator.com) + * The best jQuery plugin to validate form fields. Designed to use with Bootstrap 3 + * + * @version v0.5.3, built on 2014-11-05 9:14:18 PM + * @author https://twitter.com/nghuuphuoc + * @copyright (c) 2013 - 2014 Nguyen Huu Phuoc + * @license Commercial: http://bootstrapvalidator.com/license/ + * Non-commercial: http://creativecommons.org/licenses/by-nc-nd/3.0/ + */ +if("undefined"==typeof jQuery)throw new Error("BootstrapValidator requires jQuery");!function(a){var b=a.fn.jquery.split(" ")[0].split(".");if(+b[0]<2&&+b[1]<9||1===+b[0]&&9===+b[1]&&+b[2]<1)throw new Error("BootstrapValidator requires jQuery version 1.9.1 or higher")}(window.jQuery),function(a){var b=function(b,c){this.$form=a(b),this.options=a.extend({},a.fn.bootstrapValidator.DEFAULT_OPTIONS,c),this.$invalidFields=a([]),this.$submitButton=null,this.$hiddenButton=null,this.STATUS_NOT_VALIDATED="NOT_VALIDATED",this.STATUS_VALIDATING="VALIDATING",this.STATUS_INVALID="INVALID",this.STATUS_VALID="VALID";var d=function(){for(var a=3,b=document.createElement("div"),c=b.all||[];b.innerHTML="",c[0];);return a>4?a:!a}(),e=document.createElement("div");this._changeEvent=9!==d&&"oninput"in e?"input":"keyup",this._submitIfValid=null,this._cacheFields={},this._init()};b.prototype={constructor:b,_init:function(){var b=this,c={autoFocus:this.$form.attr("data-bv-autofocus"),container:this.$form.attr("data-bv-container"),events:{formInit:this.$form.attr("data-bv-events-form-init"),formError:this.$form.attr("data-bv-events-form-error"),formSuccess:this.$form.attr("data-bv-events-form-success"),fieldAdded:this.$form.attr("data-bv-events-field-added"),fieldRemoved:this.$form.attr("data-bv-events-field-removed"),fieldInit:this.$form.attr("data-bv-events-field-init"),fieldError:this.$form.attr("data-bv-events-field-error"),fieldSuccess:this.$form.attr("data-bv-events-field-success"),fieldStatus:this.$form.attr("data-bv-events-field-status"),validatorError:this.$form.attr("data-bv-events-validator-error"),validatorSuccess:this.$form.attr("data-bv-events-validator-success")},excluded:this.$form.attr("data-bv-excluded"),feedbackIcons:{valid:this.$form.attr("data-bv-feedbackicons-valid"),invalid:this.$form.attr("data-bv-feedbackicons-invalid"),validating:this.$form.attr("data-bv-feedbackicons-validating")},group:this.$form.attr("data-bv-group"),live:this.$form.attr("data-bv-live"),message:this.$form.attr("data-bv-message"),onError:this.$form.attr("data-bv-onerror"),onSuccess:this.$form.attr("data-bv-onsuccess"),submitButtons:this.$form.attr("data-bv-submitbuttons"),threshold:this.$form.attr("data-bv-threshold"),trigger:this.$form.attr("data-bv-trigger"),verbose:this.$form.attr("data-bv-verbose"),fields:{}};this.$form.attr("novalidate","novalidate").addClass(this.options.elementClass).on("submit.bv",function(a){a.preventDefault(),b.validate()}).on("click.bv",this.options.submitButtons,function(){b.$submitButton=a(this),b._submitIfValid=!0}).find("[name], [data-bv-field]").each(function(){var d=a(this),e=d.attr("name")||d.attr("data-bv-field"),f=b._parseOptions(d);f&&(d.attr("data-bv-field",e),c.fields[e]=a.extend({},f,c.fields[e]))}),this.options=a.extend(!0,this.options,c),this.$hiddenButton=a("